Procházet zdrojové kódy

Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/Lexus-media

suxinf před 4 roky
rodič
revize
fedaff75ef
3 změnil soubory, kde provedl 37 přidání a 19 odebrání
  1. 5 7
      src/App.vue
  2. 26 9
      src/components/Modal.vue
  3. 6 3
      src/views/data/InforList.vue

+ 5 - 7
src/App.vue

@@ -57,7 +57,7 @@ export default {
       // 正常token
       // dXNlcklkPTEyMyZhY2NvdW50PWRmc2FmYWVyJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTY4NDYxMzkmc2lnbj1mOWUwNzJhZGUwODE4YjhhNzMzN2I0ZTMzMzU2OWJjOA==
       let query = this.$route.query || {};
-      let token = query.token || '';
+      let token = query.token || 'dXNlcklkPTEyMyZhY2NvdW50PWRmc2FmYWVyJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTY4NDYxMzkmc2lnbj1mOWUwNzJhZGUwODE4YjhhNzMzN2I0ZTMzMzU2OWJjOA';
       console.log('token:', token);
       if(!token) {
         localStorage.setItem("userId", '');
@@ -66,21 +66,19 @@ export default {
       this.$http({
         method: 'post',
         url: '/auth/checkSign',
-        data: {
-          token: token
-        }
+        data:token
       }).then((res) => {
         console.log(res);
         if(res.status === 200){
           if(res.data.code === 200) {
             let userInfo = res.data.data;
-            if (userInfo.role == '1' || userInfo.role == '2') {
+            if (userInfo.userRole == '1' || userInfo.userRole == '2') {
               this.isManufacturer = 'distributor';
             } else {
               this.isManufacturer = 'manufacturer';
             }
-            this.userAccount = userInfo.userAccount;
-            localStorage.setItem("userId", userInfo.userAccount);
+            this.userAccount = userInfo.userCode;
+            localStorage.setItem("userId", userInfo.userAgentId);
           }else {
             let message = res.data.message;
             console.log('message', message);

+ 26 - 9
src/components/Modal.vue

@@ -200,9 +200,13 @@ export default {
       let m = date.getMonth() + 1;
       let y = date.getFullYear();
       let d = y + "/" + m;
+
       let config = {
-        url: "/dealerFeedback",
+        //url: "/dealerFeedback",
+       // url: "/updateDealerFeedback",
+        url: "",
         data: {
+          id: '', //主键值
           month: d,
           dealerId: "254",
           dataId: this.ziliaoId,
@@ -213,13 +217,23 @@ export default {
           releasePlate: this.selectedPlatform,
           releaseMedia: this.releaseP,
           draftGenre: this.contentName1,
-          
+
           //内容分类2?
           contentClass: this.contentName2,
           articleTitle: this.mediaTitle,
           articleLink: this.mediaUrl,
         },
       };
+
+      console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", this.LinkData.id);
+      if (this.LinkData.id) {
+        config.url = "/updateDealerFeedback";
+        config.data.id=this.LinkData.id
+        console.log(config.url);
+      }else{
+        config.url = "/dealerFeedback"
+      }
+
       //console.log("edit2:", this.releaseP);
       this.$emit("update", config);
       this.$emit("closeme");
@@ -230,7 +244,10 @@ export default {
         url: "/firmsUploadListByAgent",
         //url: "/firmsLinkUpload",
         method: "post",
-        data: {},
+        data: {
+          download: true,
+          report: false,
+        },
       })
         .then((res) => {
           if (res.data.code === 200) {
@@ -395,13 +412,13 @@ export default {
     testUrl: function () {
       var regex = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
       let flag = regex.test(this.mediaUrl);
-      console.log(flag,regex)
-      if(flag){
-          this.edit()
-      }else{
-        alert("链接输入有误!\n示例:https://www.baidu.com")
+      console.log(flag, regex);
+      if (flag) {
+        this.edit();
+      } else {
+        alert("链接输入有误!\n示例:https://www.baidu.com");
       }
-    }
+    },
   },
   mounted() {
     this.chooseDataName();

+ 6 - 3
src/views/data/InforList.vue

@@ -73,7 +73,8 @@
                 <td>{{ obj.report === "1" ? "已反馈" : "未反馈" }}</td>
 
                 <td v-if="operation" :style="trStyle" class="operationStyle">
-                  <span style="cursor:pointer"
+                  <span
+                    style="cursor: pointer"
                     v-for="(operationObj, i) in operation"
                     :key="i"
                     @click="
@@ -148,7 +149,7 @@ export default {
               url: "/dealerDownload",
               data: {
                 informationId: obj.id,
-                agentId:this.userId
+                agentId: this.userId,
               },
             };
             this.downloadPost(config, obj);
@@ -242,7 +243,9 @@ export default {
       let url =
         this.onlineUrl +
         "/dealerDownload?informationId=" +
-        config.data.informationId+'&agentId='+ config.data.agentId;
+        config.data.informationId +
+        "&agentId=" +
+        config.data.agentId;
       window.open(url);
 
       let data = {