wjx 2 년 전
부모
커밋
54d169511b

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

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1667282623981" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2577" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M928 512c0 115.2-44.8 217.6-121.6 294.4l44.8 44.8c89.6-89.6 140.8-204.8 140.8-339.2s-51.2-249.6-140.8-339.2l-44.8 44.8c76.8 76.8 121.6 179.2 121.6 294.4zM96 512c0-115.2 44.8-217.6 121.6-294.4l-44.8-44.8C83.2 262.4 32 377.6 32 512s51.2 249.6 140.8 339.2l44.8-44.8A410.88 410.88 0 0 1 96 512zM300.8 512c0-57.6 25.6-108.8 64-147.2L320 320c-51.2 44.8-83.2 115.2-83.2 192s32 147.2 83.2 192l44.8-44.8c-38.4-38.4-64-89.6-64-147.2zM723.2 512c0 57.6-25.6 108.8-64 147.2l44.8 44.8c51.2-51.2 83.2-115.2 83.2-192s-32-147.2-83.2-192l-44.8 44.8c38.4 38.4 64 89.6 64 147.2z" fill="#333333" p-id="2578"></path><path d="M512 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#333333" p-id="2579"></path></svg>

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

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1667282722082" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4410" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M831 64.2H193c-41.9 0-76 34.1-76 76v744.1c0 41.9 34.1 76 76 76h638c41.9 0 76-34.1 76-76V140.2c-0.1-41.9-34.2-76-76-76zM193 884.3V140.2h638l0.1 744.1H193z" p-id="4411"></path><path d="M701.7 241H322.3c-21 0-38 17-38 38s17 38 38 38h379.4c21 0 38-17 38-38s-17-38-38-38zM701.7 706.8H322.3c-21 0-38 17-38 38s17 38 38 38h379.4c21 0 38-17 38-38s-17-38-38-38zM293.4 644.3c6.7 4.7 14.3 6.9 21.8 6.9 11.9 0 23.7-5.6 31.1-16.1l71.3-101.7 81.5 72.4c16 14.2 37.4 21 58.6 18.7 21.3-2.3 40.6-13.6 53.2-30.9l115.9-160c12.3-17 8.5-40.7-8.5-53-17-12.3-40.7-8.5-53 8.5L549.6 549l-81.5-72.4C452 462.3 430.4 455.5 409 458s-40.9 14-53.3 31.7l-71.5 101.7c-12.1 17.1-7.9 40.8 9.2 52.9z" p-id="4412"></path></svg>

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

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1667283002319" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5391" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M857.92 875.584H763.52a32 32 0 0 1 0-64h94.464c20.224 0 36.736-17.344 36.736-38.656V207.424c0-21.312-16.512-38.656-36.736-38.656H170.752c-20.224 0-36.736 17.344-36.736 38.656v565.504c0 21.312 16.448 38.656 36.736 38.656h384.256a32 32 0 0 1 0 64H170.752c-55.552 0-100.736-46.08-100.736-102.656V207.424c0-56.64 45.184-102.656 100.736-102.656h687.168c55.552 0 100.736 46.08 100.736 102.656v565.504c0 56.576-45.184 102.656-100.736 102.656z" p-id="5392"></path><path d="M397.76 374.464c0-35.2 24.96-49.6 55.424-32l200.32 115.712c30.528 17.6 30.528 46.4 0 64l-200.32 115.712c-30.464 17.6-55.424 3.2-55.424-32V374.464z" p-id="5393"></path></svg>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
src/assets/icons/svg/position.svg


+ 135 - 4
src/views/accounts/adWarrant/index.vue

@@ -98,6 +98,16 @@
                     >指派</el-button>
                 </div>
             </el-col>
+            <el-col :span="1.5">
+                <div class="grid-content">
+                    <el-button
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-refresh"
+                        @click="warrantsHandle"
+                    >批量授权</el-button>
+                </div>
+            </el-col>
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
 
@@ -651,6 +661,62 @@
                 <el-button type="primary" @click="submitPUt('platFormPut')">确 定</el-button>
             </span>
         </el-dialog>
+
+        <!-- 批量授权 -->
+        <el-dialog
+            title="批量授权"
+            :visible.sync="warrantsShow"
+            width="550px"
+        >
+            <el-form :model="queryWarrants" ref="warrantsQueryForm" label-position="top" :rules="rulesWarrants">
+                <el-form-item label="平台选择" prop="adAppIds">
+                    <el-checkbox-group v-model="queryWarrants.adAppIds">
+                        <el-checkbox v-for="val in tenAllList" :label="val.id" :key="val.id">{{val.appName}}</el-checkbox>
+                    </el-checkbox-group>
+                </el-form-item>
+                <el-form-item label="账号ID" prop="users">
+                    <el-input
+                        type="textarea"
+                        :rows="2"
+                        placeholder="每个账号请以,号隔空例:123456,222333,444444"
+                        v-model="queryWarrants.users">
+                    </el-input>
+                </el-form-item>
+            </el-form>
+        
+            <div style="display: flex;">
+                <el-button type="primary" @click="clearAccount()">清空账号状态</el-button>
+                <el-button size="mini" @click="errorHandle()">查询授权失败账户</el-button>
+            </div>
+
+            <div>
+                <div v-if="errorData['1']" style="margin-top: 10px">
+                    <div>趣程数据(旧版)失败列表:</div>
+                    <div style="margin-top: 5px">{{errorData['1']}}</div>
+                </div>
+                <div v-if="errorData['2']" style="margin-top: 10px">
+                    <div>赞象计划监控失败列表:</div>
+                    <div style="margin-top: 5px">{{errorData['2']}}</div>
+                </div>
+                <div v-if="errorData['4']" style="margin-top: 10px">
+                    <div>赞象数据(新版)失败列表</div>
+                    <div style="margin-top: 5px">{{errorData['4']}}</div>
+                </div>
+            </div>
+
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="warrantsShow = false">取 消</el-button>
+                <el-button type="primary" @click="onSubmitWarrants()">确 定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog
+            title="扫码"
+            :visible.sync="imgBase64Show"
+            width="200px"
+        >
+            <img :src="this.imgBase64" width="180">
+        </el-dialog>
     </div>
 </template>
 
@@ -662,6 +728,7 @@ import { allUser } from "@/api/system/user";
 import { searchList } from "@/api/accounts/account";
 import MyTable from './components/myTable.vue';
 import store from '@/store'
+import { getToken } from '@/utils/auth'
 export default {
     name: 'Account',
     components: { MyTable },
@@ -826,15 +893,30 @@ export default {
                 putUserId: [
                     { required: true, message: '请选择投手', trigger: 'blur' }
                 ]
-            }
+            },
+            warrantsShow: false,
+            queryWarrants: {
+                adAppIds: []
+            },
+            rulesWarrants: {
+                adAppIds: [
+                    { required: true, message: '请选择平台', trigger: 'blur' }
+                ],
+                users: [
+                    { required: true, message: '请输入账户ID', trigger: 'blur' }
+                ]
+            },
+            imgBase64: '',
+            imgBase64Show: false,
+            errorData: {}
         }
     },
     mounted(){
         window.addEventListener('storage', (e) => {
             if (e.key === 'adMp') {
                 if (e.newValue === 'ok') {
-                    this.$router.go(0)
-                    // this.getList()
+                    // this.$router.go(0)
+                    this.getList()
                     this.msgSuccess("授权成功");
                     localStorage.removeItem('adMp')
                 } else {
@@ -849,6 +931,55 @@ export default {
         this.getAll()
     },
     methods: {
+        /** 清空账户状态 */
+        clearAccount() {
+            fetch('http://47.99.157.216:8022/qq/delCookie',{
+                method:'GET'
+            }).then(res=>res.json()).then(r=>{
+                this.msgSuccess('清理成功!!!!请重新扫码授权登录!!!');
+            })
+        },
+        /** 查询授权失败账户 */
+        errorHandle() {
+            fetch('http://47.99.157.216:8022/qq/queryErr',{
+                method:'GET'
+            }).then(res=>res.json()).then(r=>{
+                this.errorData = r.data
+            })
+        },
+        /** 授权确定 */
+        onSubmitWarrants() {
+            this.$refs['warrantsQueryForm'].validate((valid) => {
+                if (valid) {
+                    let params = { ...this.queryWarrants, users: this.queryWarrants.users.split(','), callbackPage: encodeURIComponent(window.location.origin + '/adCode'), authorization: 'Bearer ' + getToken() }
+                    console.log(params);
+                    fetch('http://47.99.157.216:8022/qq/auth', { 
+                        method: 'POST', 
+                        headers:{
+                            "content-type": "application/json",
+                        },
+                        body:JSON.stringify(params) 
+                    }).then(response => response.json()).then(json => {
+                        console.log('11111--->',json)
+                        if (json.data.msg) {
+                            this.msgSuccess(json.data.msg);
+                        }
+                        if (json.data.codeImgUrl) {
+                            this.imgBase64 = json.data.codeImgUrl
+                            this.imgBase64Show = true
+                        }
+                    })
+                }
+            })
+        },
+        /** 批量授权 */
+        warrantsHandle() {
+            console.log(1111);
+            this.warrantsShow = true
+            this.$nextTick(() => {
+                this.$set(this.queryWarrants, 'adAppIds', this.tenAllList.map(item => item.id))
+            })
+        },
         /** 刷新服务商 */
         refreshServer() {
             this.reLoading = true
@@ -1185,7 +1316,7 @@ export default {
         },
         /** 老的授权广告平台 */
         handleWarrantOld() {
-            toAuth({ adAppId: this.queryParams.adAppId, callbackPage: encodeURIComponent(window.location.origin + '/admin/adCode') }).then(res => {
+            toAuth({ adAppId: this.queryParams.adAppId, callbackPage: encodeURIComponent(window.location.origin + '/adCode') }).then(res => {
                 if (res.data) {
                     window.open(res.data)
                 }

+ 1 - 1
src/views/ad.vue

@@ -37,7 +37,7 @@ export default {
             if (window.location.hash.indexOf('?') !== -1) {
                 let query = {
                     authorizationCode: this.$route.query.authorization_code,
-                    callbackPage: encodeURIComponent(window.location.origin + '/admin/adCode'),
+                    callbackPage: encodeURIComponent(window.location.origin + '/adCode'),
                     state: this.$route.query.state
                 }
                 adtDoAuth(query).then(response => {

+ 0 - 2
src/views/login.vue

@@ -109,8 +109,6 @@ export default {
         state: '',
         stateKey: ''
       },
-      codeUrl: "",
-      cookiePassword: "",
       loginForm: {},
       getCodeBtText: '获取验证码',
       loginRules: {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.