|
@@ -1,22 +1,25 @@
|
|
|
<template>
|
|
|
<div class="page-wrap page-wrap-put-books">
|
|
|
- <tool-bar :text="['email', 'account_id', 'account_name']"
|
|
|
- :label="['邮箱', '账户ID', '用户名']"
|
|
|
- v-model:loading="inSearching"
|
|
|
- @confirm="onSearch">
|
|
|
+ <tool-bar
|
|
|
+ :text="['email', 'account_id', 'account_name']"
|
|
|
+ :label="['邮箱', '账户ID', '用户名']"
|
|
|
+ v-model:loading="inSearching"
|
|
|
+ @confirm="onSearch"
|
|
|
+ >
|
|
|
<template #exbutton>
|
|
|
- <a-button type="primary"
|
|
|
- class="ml-10">
|
|
|
+ <a-button type="primary" @click="handleClick" class="ml-10">
|
|
|
授权
|
|
|
</a-button>
|
|
|
</template>
|
|
|
</tool-bar>
|
|
|
- <a-table :columns="columns"
|
|
|
- :data-source="list"
|
|
|
- :pagination="tablePageOptions"
|
|
|
- :loading="loading.value"
|
|
|
- @change="handleTableChange"
|
|
|
- rowKey="id">
|
|
|
+ <a-table
|
|
|
+ :columns="columns"
|
|
|
+ :data-source="list"
|
|
|
+ :pagination="tablePageOptions"
|
|
|
+ :loading="loading.value"
|
|
|
+ @change="handleTableChange"
|
|
|
+ rowKey="id"
|
|
|
+ >
|
|
|
</a-table>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -26,7 +29,7 @@ import { defineComponent, reactive, toRefs, ref } from "vue";
|
|
|
import ToolBar from "@/components/tool-bar/index.vue";
|
|
|
import { TableColumnOfPutAdAccount } from "../_pageOptions/table-put";
|
|
|
import usePagination from "@/hooks/usePagination";
|
|
|
-import { getAdPushList } from "@/api";
|
|
|
+import { getAdPushList, getAdauth } from "@/api";
|
|
|
import { ADpushSimple, PageOptions } from "@/types/api";
|
|
|
import useDebounceFn from "@/hooks/useDebounceFn";
|
|
|
|
|
@@ -34,7 +37,8 @@ const PutAdAccount = defineComponent({
|
|
|
components: {
|
|
|
ToolBar,
|
|
|
},
|
|
|
- setup() {
|
|
|
+ setup(a,b) {
|
|
|
+ console.log(a,b)
|
|
|
let { loading, meta, tablePageOptions } = usePagination();
|
|
|
const state = reactive({
|
|
|
list: ref<ADpushSimple[]>([]),
|
|
@@ -74,9 +78,19 @@ const PutAdAccount = defineComponent({
|
|
|
meta.value = res.data.meta;
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
- return { ...toRefs(state), onSearch, handleTableChange };
|
|
|
+ return { ...toRefs(state), onSearch, handleTableChange};
|
|
|
},
|
|
|
+ methods:{
|
|
|
+ async handleClick(){
|
|
|
+ let res:any = await getAdauth();
|
|
|
+
|
|
|
+ if(res.data && res.data.url){
|
|
|
+ window.open(res.data.url)
|
|
|
+ }else{
|
|
|
+ this.$message.error('暂未配置授权地址');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
export default PutAdAccount;
|