Explorar el Código

周三 上线 middle

jiayufei hace 4 años
padre
commit
dc22aa38a4

+ 27 - 6
src/views/modules/copy-library/copy-library.vue

@@ -155,9 +155,9 @@
                         <div class="only-title-mater">
                             <a-upload
                                 name="file"
-                                action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
                                 :file-list="fileList"
-                                @change="handleChange"
+                                :customRequest="customRequest"
+                                :remove="handleRemoveUpload"
                             >
                                 <a-button><a-icon type="upload"/>文件上传</a-button>
                             </a-upload>
@@ -336,7 +336,11 @@ import moment from 'moment';
 import {getAction, postFileAction, postAction} from '@/api/manage';
 import {mapGetters} from 'vuex';
 import {urlAcount} from './copy-library-server.js';
-
+let COS = require('cos-js-sdk-v5');
+let cos = new COS({
+    SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
+    SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9'
+});
 export default {
     name: 'copy-library',
     components: {
@@ -737,14 +741,31 @@ export default {
                 console.log(error, 'eeee');
             });
         },
-        handleChange(info) {
+        customRequest(info) {
             const isZip = info.file.name.indexOf('xlsx') !== -1 || info.file.name.indexOf('xls') !== -1;
             if (!isZip) {
                 this.$message.error('上传模板只能是 xls、xlsx格式!');
                 return;
             }
-            this.fileList = info.fileList;
+            this.fileList = [];
+            this.$nextTick(() => {
+                this.fileList.push(info.file);
+            });
+        },
+        handleRemoveUpload(data) {
+            let index = this.fileList.indexOf(data);
+            let newUploadFile = this.fileList;
+            newUploadFile.splice(index, 1);
+            this.fileList = newUploadFile;
         },
+        // handleChange(info) {
+        //     const isZip = info.file.name.indexOf('xlsx') !== -1 || info.file.name.indexOf('xls') !== -1;
+        //     if (!isZip) {
+        //         this.$message.error('上传模板只能是 xls、xlsx格式!');
+        //         return;
+        //     }
+        //     this.fileList = info.fileList;
+        // },
         handleSearchMaster() {
             this.hendleMaterialInfo();
         },
@@ -1019,7 +1040,7 @@ export default {
             }
             let paramsData = new FormData();
             paramsData.append('accountId', this.advertisingAccount);
-            paramsData.append('excelFile', this.fileList[0].originFileObj);
+            paramsData.append('excelFile', this.fileList[0]);
             postFileAction(urlAcount + '/bytedance-api/advertiser/bytedanceGeneralCopywriter/loadExcel', paramsData, {
                 headers: {
                     'Content-Type': 'multipart/form-data'

+ 1 - 1
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -2506,7 +2506,7 @@ export default {
                     postAction('/ctop/bytedanceVideoSlogenInfo/edit', {
                         id: data.id,
                         slogan: changeSlogan.filter(item => item.id === data.id)[0].title,
-                        creativeWordIds: changeSlogan.filter(item => item.id === data.id)[0].creative_word_ids.join(',')
+                        creativeWordIds: JSON.stringify(changeSlogan.filter(item => item.id === data.id)[0].creative_word_ids)
                     }).then(res => {
                         if (res.success) {
                             this.$message.success('修改成功');

+ 2 - 2
src/views/modules/headline-view/headline-view-server.js

@@ -5,6 +5,6 @@
 
 // export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
-export const urlAcount = 'http://192.168.1.43:8080'; // 子安
-// export const urlAcount = 'http://139.186.165.84:8080'; // 测试
+// export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+export const urlAcount = 'http://139.186.165.84:8080'; // 测试
 // export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 2 - 2
src/views/modules/headline-view/headline-view.vue

@@ -67,7 +67,7 @@
                         <div class="item" v-for="item in throwColumns" :key="item.dataIndex">
                             <div class="todyCost">
                                 <span v-if="item.type === 'double'">{{ Number(item.today) | decimalsHandle }}</span>
-                                <span v-if="item.type === 'string'">{{ Number(item.today) | decimalsHandle }}</span>
+                                <span v-if="item.type === 'string'">{{ Number(item.today).toFixed(0) | decimalsHandle }}</span>
                                 <span v-if="item.type === 'int'">{{ item.today !== 0 ? item.today + '%' : 0 }}</span>
                                 <span v-if="item.type === 'average'">{{ Number(item.today) | decimalsHandle }}</span>
                                 <span v-if="item.type !== 'spend'" class="sign">
@@ -78,7 +78,7 @@
                             <div class="yesterdayCost">
                                 <span v-if="item.type !== 'spend'">/ 昨日: </span>
                                 <span v-if="item.type === 'double'">{{ Number(item.yesterday) | decimalsHandle }}</span>
-                                <span v-if="item.type === 'string'">{{ Number(item.yesterday) | decimalsHandle }}</span>
+                                <span v-if="item.type === 'string'">{{ Number(item.yesterday).toFixed(0) | decimalsHandle }}</span>
                                 <span v-if="item.type === 'int'">{{ item.yesterday !== 0 ? item.yesterday + '%' : 0 }}</span>
                                 <span v-if="item.type === 'average'">{{ Number(item.yesterday) | decimalsHandle }}</span>
                             </div>