wjx 9 ماه پیش
والد
کامیت
9776216dd5

+ 4 - 2
src/api/accounts/adApi.js

@@ -52,7 +52,8 @@ export function adtDoAuth(query) {
 
 export function adtYwdyDoAuth(query) {
     return request({
-        url: `/adq/admin/adAccount/adUnit/doAuth`,
+        // url: `/adq/admin/adAccount/adUnit/doAuth`,
+        url: `/adq/admin/adAccount/adUnit/doAuthV2`,
         method: 'POST',
         params: query
     })
@@ -61,7 +62,8 @@ export function adtYwdyDoAuth(query) {
 // 荣新授权
 export function toAuth(query) {
     return request({
-        url: '/adq/admin/adAccount/toAuth',
+        url: '/adq/admin/adAccount/toAuthV2',
+        // url: '/adq/admin/adAccount/toAuth',
         method: 'POST',
         params: query
     })

+ 2 - 2
src/api/accounts/ttAdapi.js

@@ -98,9 +98,9 @@ export function getAdAccountList(data) {
  * @returns 
  */
 export function toAuthUser(data) {
-    let { adAppId, callbackPage } = data
+    let { adAppId, callbackPage, adUnitType } = data
     return request({
-        url: `/oceanengine/admin/authUser/toAuth?adAppId=${adAppId}&callbackPage=${callbackPage}`,
+        url: `/oceanengine/admin/authUser/toAuth?adAppId=${adAppId}&callbackPage=${callbackPage}&adUnitType=${adUnitType}`,
         method: 'POST'
     })
 }

+ 1 - 0
src/assets/icons/svg/tencent_iaa.svg

@@ -0,0 +1 @@
+<svg viewBox="64 64 896 896" focusable="false" data-icon="fund-view" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M681.6768 268.9024a60.928 60.928 0 0 1 10.496 85.5552l-108.288 138.752-156.16 200.192a60.7232 60.7232 0 0 1-102.656-10.8032 61.0304 61.0304 0 0 1 6.7584-64.256l156.16-200.1408 108.288-138.752a60.7744 60.7744 0 0 1 85.4016-10.5472z m108.288 138.752a60.928 60.928 0 0 1 10.496 85.6064l-108.288 138.752-0.4608 0.512-47.4112 60.8256a60.7744 60.7744 0 0 1-102.7072-10.752c-10.1888-20.992-7.5264-45.9264 6.8096-64.256l47.872-61.3376 108.2368-138.8032a60.7744 60.7744 0 0 1 85.4528-10.496zM248.576 546.5088a60.928 60.928 0 0 1 10.496 85.5552l-47.872 61.3376a60.7232 60.7232 0 0 1-102.656-10.752 61.0304 61.0304 0 0 1 6.7584-64.256l47.872-61.3376a60.7744 60.7744 0 0 1 85.4016-10.5472z m649.6256 0a60.928 60.928 0 0 1 10.496 85.5552l-47.872 61.3376a60.7232 60.7232 0 0 1-102.656-10.752c-10.24-20.992-7.5776-45.9264 6.7584-64.256l47.872-61.3376a60.7744 60.7744 0 0 1 85.4016-10.5472z m-433.0496-277.504a60.928 60.928 0 0 1 10.4448 85.504l-113.408 145.408a60.7232 60.7232 0 0 1-102.7072-10.752c-10.1888-20.992-7.5776-45.9264 6.8096-64.3072l113.408-145.408a60.7744 60.7744 0 0 1 85.4528-10.496z" p-id="3118"></path></svg>

+ 15 - 0
src/views/accounts/adWarrant/index.vue

@@ -18,6 +18,16 @@
                     <el-option v-for="item in userAll" :key="item.id" :label="item.nickName" :value="item.id" />
                 </el-select>
             </el-form-item>
+            <el-form-item label="" prop="adUnitType">
+                <el-select v-model="queryParams.adUnitType" placeholder="请选择业务单元类型" clearable filterable style="width: 140px"
+                    size="small" @keyup.enter.native="handleQuery">
+                    <el-option label="小说" value="NOVEL" />
+                    <el-option label="小说IAA" value="NOVEL_IAA" />
+                    <el-option label="游戏" value="GAME" />
+                    <el-option label="游戏IAA" value="GAME_IAA" />
+                    <el-option label="电商" value="SHOP" />
+                </el-select>
+            </el-form-item>
             <el-form-item label="" prop="sourceType">
                 <el-radio-group v-model="queryParams.sourceType" size="small" @change="getList">
                     <el-radio-button :label="null">全部</el-radio-button>
@@ -111,6 +121,11 @@
                     <div>{{ scope.row.putUserInfo ? scope.row.putUserInfo.nickName : scope.row.putUserId }}</div>
                 </template>
             </el-table-column>
+            <el-table-column label="业务单元类型" prop="adUnitType" align="center" width="100">
+                <template slot-scope="scope">
+                    <div>{{ scope.row.adUnitType === 'NOVEL' ? '小说' : scope.row.adUnitType === 'NOVEL_IAA' ? '小说IAA' : scope.row.adUnitType === 'GAME' ? '游戏' : scope.row.adUnitType === 'GAME_IAA' ? '游戏IAA' : scope.row.adUnitType === 'SHOP' ? '电商' : '--' }}</div>
+                </template>
+            </el-table-column>
             <el-table-column label="投放助理" prop="accountUsers" align="center" width="100" :show-overflow-tooltip="true">
                 <template slot-scope="scope">
                     <div>{{ scope.row.accountUsers | filterUser }}</div>

+ 47 - 9
src/views/accounts/ttAdWarrant/index.vue

@@ -1,6 +1,21 @@
 <template>
     <div class="app-container">
-
+        <el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true">
+            <el-form-item label="" prop="adUnitType">
+                <el-select v-model="queryParams.adUnitType" placeholder="请选择业务单元类型" clearable filterable style="width: 140px"
+                    size="small" @keyup.enter.native="handleQuery">
+                    <el-option label="小说" value="NOVEL" />
+                    <el-option label="小说IAA" value="NOVEL_IAA" />
+                    <el-option label="游戏" value="GAME" />
+                    <el-option label="游戏IAA" value="GAME_IAA" />
+                    <el-option label="电商" value="SHOP" />
+                </el-select>
+            </el-form-item>
+            <el-form-item>
+                <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            </el-form-item>
+        </el-form>
         <el-row :gutter="10" class="mb8" align="middle">
             <el-col :span="1.5">
                 <div class="grid-content">
@@ -11,12 +26,19 @@
             </el-col>
             <el-col :span="1.5">
                 <div class="grid-content">
-                    <el-button
-                        type="primary"
-                        icon="el-icon-plus"
-                        size="mini"
-                        @click="handleWarrantOld"
-                    >授权广告平台</el-button>
+                    <el-dropdown @command="handleWarrantOld">
+                        <span class="el-dropdown-link">
+                            <el-button type="success" icon="el-icon-plus" size="mini">授权广告平台<i
+                                    class="el-icon-arrow-down el-icon--right"></i></el-button>
+                        </span>
+                        <el-dropdown-menu slot="dropdown">
+                            <el-dropdown-item command="NOVEL" v-if="queryParams.adAppId === 1">小说</el-dropdown-item>
+                            <el-dropdown-item command="NOVEL_IAA" v-if="queryParams.adAppId === 1">小说IAA</el-dropdown-item>
+                            <el-dropdown-item command="GAME" v-if="queryParams.adAppId === 2">游戏</el-dropdown-item>
+                            <el-dropdown-item command="GAME_IAA" v-if="queryParams.adAppId === 2">游戏IAA</el-dropdown-item>
+                            <el-dropdown-item command="SHOP" v-if="queryParams.adAppId === 1">电商</el-dropdown-item>
+                        </el-dropdown-menu>
+                    </el-dropdown>
                 </div>
             </el-col>
             <el-col :span="1.5">
@@ -34,6 +56,11 @@
             <el-table-column label="授权用户ID" prop="authUserId" align="center" :show-overflow-tooltip="true"/>
             <el-table-column label="邮箱" prop="email" align="center" :show-overflow-tooltip="true"/>
             <el-table-column label="账号" prop="displayName" align="center" :show-overflow-tooltip="true"/>
+            <el-table-column label="业务单元类型" prop="adUnitType" align="center" width="100">
+                <template slot-scope="scope">
+                    <div>{{ scope.row.adUnitType === 'NOVEL' ? '小说' : scope.row.adUnitType === 'NOVEL_IAA' ? '小说IAA' : scope.row.adUnitType === 'GAME' ? '游戏' : scope.row.adUnitType === 'GAME_IAA' ? '游戏IAA' : scope.row.adUnitType === 'SHOP' ? '电商' : '--' }}</div>
+                </template>
+            </el-table-column>
             <!-- <el-table-column label="accessToken" prop="accessToken" align="center" width="200">
                 <template slot-scope="scope">
                     <el-tooltip placement="top" effect="light">
@@ -114,6 +141,16 @@ export default {
         window.removeEventListener('storage', this.listener, false)
     },
     methods: {
+        /** 搜索 */
+        handleQuery() {
+            this.queryParams = { ...this.queryParams, pageNum: 1 }
+            this.getList();
+        },
+        /** 重置搜索条件 */
+        resetQuery() {
+            this.resetForm("queryForm");
+            this.getList();
+        },
         listener(e) {
             if (e.key === 'ttAdMp') {
                 if (e.newValue === 'ok') {
@@ -149,8 +186,9 @@ export default {
             }).catch(() => this.loading = false)
         },
         /** 授权 */
-        handleWarrantOld() {
-            toAuthUser({ adAppId: this.queryParams.adAppId, callbackPage: encodeURIComponent(window.location.origin + '/ttAdCode') }).then(res => {
+        handleWarrantOld(adUnitType) {
+            console.log('---->', adUnitType)
+            toAuthUser({ adAppId: this.queryParams.adAppId, adUnitType, callbackPage: encodeURIComponent(window.location.origin + '/ttAdCode') }).then(res => {
             // toAuthUser({ adAppId: this.queryParams.adAppId, callbackPage: encodeURIComponent('http://erp.zanxiangnet.com/ttAdCode') }).then(res => {
                 if (res.data) {
                     window.open(res.data)

+ 5 - 0
src/views/accounts/ttAdWarrant/lookAccountButton.vue

@@ -20,6 +20,11 @@
                 <el-table-column label="账号ID" prop="accountId" align="center" fixed width="150"
                     :show-overflow-tooltip="true" />
                 <el-table-column label="账号名称" prop="accountName" align="center" :show-overflow-tooltip="true" width="300" />
+                <el-table-column label="业务单元类型" prop="adUnitType" align="center" width="100">
+                    <template slot-scope="scope">
+                        <div>{{ scope.row.adUnitType === 'NOVEL' ? '小说' : scope.row.adUnitType === 'NOVEL_IAA' ? '小说IAA' : scope.row.adUnitType === 'GAME' ? '游戏' : scope.row.adUnitType === 'GAME_IAA' ? '游戏IAA' : scope.row.adUnitType === 'SHOP' ? '电商' : '--' }}</div>
+                    </template>
+                </el-table-column>
                 <el-table-column label="投手" prop="putUser" align="center" width="120" :show-overflow-tooltip="true">
                     <template slot-scope="scope">
                         <span v-if="scope.row.putUser">{{ scope.row.putUser.nickName }}</span>