Przeglądaj źródła

改换php接口&&问题修改

suxinf 4 lat temu
rodzic
commit
6ebf6ef856

+ 1 - 1
src/components/Modal.vue

@@ -11,7 +11,7 @@
         </div>
         <div class="bodyRow timeWidth">
           <span>发布时间</span
-          ><input type="date" placeholder="选择时间" :min="localDay" v-model="ziliaoTime" />
+          ><input type="date" placeholder="选择时间" :max="localDay" v-model="ziliaoTime" />
         </div>
         <div class="bodyRow">
           <!--  <div class="contentCol1">

+ 1 - 5
src/views/account/AccountIndex.vue

@@ -135,7 +135,6 @@ export default {
     },
     search: function () {
       //通过经销商或DLR CODE查询
-      console.log(this.inputValue);
       this.currentPage = 1;
       let req = {
         queryParams: this.inputValue,
@@ -151,7 +150,6 @@ export default {
       // 排除“请选择”
       if (platIndex > 0) {
         this.platformId = this.platesList[platIndex - 1]["id"];
-        console.log(this.platesList[platIndex - 1]["dictName"]);
       } else {
         this.platformId = "";
       }
@@ -167,11 +165,9 @@ export default {
       this.getDealerListRequest(req);
     },
     editData: function (i, isAttesta, accountCode) {
-      console.log("完成编辑", i, isAttesta, accountCode);
       let req = {
         id: this.tableData[i]["id"],
         authentication: isAttesta === "是" ? true : false,
-        // fansCount: fansNum,
         accountCode,
       };
       this.updateMediaAccountInfo(req).then(() => {
@@ -197,7 +193,7 @@ export default {
       })
         .then((res) => {
           if (res.data.code === 200) {
-            console.log(res);
+            console.log(res, 2222);
             this.tableData = res.data.data;
             this.sum = res.data.count;
           } else {

+ 92 - 34
src/views/data/UploadLink/sonUploadLink.vue

@@ -26,7 +26,9 @@
           >
             <td v-if="flag">{{ index + 1 }}</td>
 
-            <td>{{ (obj.publishDate || '').replace(RegExp('-', 'g'), '/') }}</td>
+            <td>
+              {{ (obj.publishDate || "").replace(RegExp("-", "g"), "/") }}
+            </td>
             <!-- 发布日期 -->
             <td>{{ obj.informationName }}</td>
             <!-- 资料名称 -->
@@ -61,7 +63,7 @@
               {{ obj.id ? "已反馈" : "未反馈" }}
             </td>
             <!-- 反馈状态  未定-->
-            <td>{{ (obj.endDate || '').replace(RegExp('-', 'g'), '/') }}</td>
+            <td>{{ (obj.endDate || "").replace(RegExp("-", "g"), "/") }}</td>
             <!-- 反馈截止日期 -->
             <td>{{ obj.mediaTitle }}</td>
             <!-- 稿件标题 -->
@@ -70,7 +72,14 @@
             </td>
             <!-- 链接 -->
 
-            <td class="operationStyle" style="cursor: pointer" v-if="+((obj.endDate || '').replace(RegExp('-', 'g'), '')) - nowDate >= 0">
+            <td
+              class="operationStyle"
+              style="cursor: pointer"
+              v-if="
+                +(obj.endDate || '').replace(RegExp('-', 'g'), '') - nowDate >=
+                0
+              "
+            >
               <span @click="toggleModal(index)">编辑</span>
               <!-- :class="showItemOperation" -->
               <span @click="toggleModal2(index)">删除</span>
@@ -93,7 +102,7 @@
       v-if="showModalAdd"
       v-on:closeme="closemeAdd"
       @update="editTitle"
-      :fileName='sfileName'
+      :fileName="sfileName"
     ></Modal>
 
     <!-- 弹窗: 确定删除? -->
@@ -121,8 +130,8 @@
 import Modal from "../../../components/Modal";
 import TablePage from "../../../components/TablePage";
 import deleteModal from "../../data/components/UploadLinkModalDelete";
-import { env_url } from "../../../config/env";
-
+import { env_url, php_url } from "../../../config/env";
+import axiosTest from "axios";
 export default {
   props: {},
   components: {
@@ -177,11 +186,12 @@ export default {
       file: "",
       dictList: [],
       onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试
-      accountId: '',
+      accountId: "",
       informationName: this.$route.query.informationName || "",
       ziliaoId: this.$route.query.id || "",
 
-      nowDate: '',//反馈截止时间
+      nowDate: "", //反馈截止时间
+      php_url: php_url,
     };
   },
   computed: {
@@ -200,7 +210,7 @@ export default {
     },
   },
   methods: {
-    getNowDate: function() {
+    getNowDate: function () {
       let data = new Date();
       let year = data.getFullYear();
       let month = data.getMonth() + 1;
@@ -244,9 +254,12 @@ export default {
       })
         .then((res) => {
           console.log(res);
-          //更新数据
-          //this.choosePlatform();
-          this.newGetDataList();
+          if (res.data && res.data.code === 200) {
+            //更新数据
+            this.newGetDataList();
+          } else {
+            alert(res.data && res.data.message);
+          }
         })
         .catch((err) => {
           console.log(err);
@@ -285,26 +298,50 @@ export default {
       console.log(this.currentPage);
     },
     //获取资料列表
+    // getDataList: function () {
+    //   // let date = new Date();
+    //   // let m = date.getMonth() + 1;
+    //   // let y = date.getFullYear();
+    //   // let d = y + "/" + m;
+    //   this.$http({
+    //     url: "/firmsLinkUpload",
+    //     method: "post",
+    //     data: {
+    //       accountId: this.accountId,
+    //       informationId: this.$route.query.informationId,
+    //       page: this.currentPage,
+    //       rows: this.pageSize,
+    //     },
+    //   })
+    //     .then((res) => {
+    //       console.log(res);
+    //       if (res.data.code === 200) {
+    //         let data = res.data.data;
+    //         console.log(data, 2222);
+    //         this.sum = res.data.count;
+    //         for (let i = 0, j = 0; j < data.length; i++, j++) {
+    //           this.$set(this.tableData, i, data[j]);
+    //         }
+    //       }
+    //     })
+    //     .catch((err) => {
+    //       console.log(err);
+    //     });
+    // },
     getDataList: function () {
-      // let date = new Date();
-      // let m = date.getMonth() + 1;
-      // let y = date.getFullYear();
-      // let d = y + "/" + m;
-      this.$http({
-        url: "/firmsLinkUpload",
+      axiosTest({
         method: "post",
+        url: this.php_url + "/lexus_php/api/myreport.php",
         data: {
-          accountId: this.accountId,
+          agentId: this.accountId,
           informationId: this.$route.query.informationId,
-          page: this.currentPage,
-          rows: this.pageSize,
+          Page: this.currentPage,
+          Rows: this.pageSize,
         },
       })
         .then((res) => {
-          console.log(res);
           if (res.data.code === 200) {
             let data = res.data.data;
-            console.log(data, 2222);
             this.sum = res.data.count;
             for (let i = 0, j = 0; j < data.length; i++, j++) {
               this.$set(this.tableData, i, data[j]);
@@ -316,22 +353,20 @@ export default {
         });
     },
     newGetDataList: function () {
-      this.$http({
-        url: "/firmsLinkUpload",
+      axiosTest({
         method: "post",
+        url: this.php_url + "/lexus_php/api/myreport.php",
         data: {
-          accountId: this.accountId,
+          agentId: this.accountId,
           informationId: this.$route.query.informationId,
-          page: this.currentPage,
-          rows: this.pageSize
+          Page: this.currentPage,
+          Rows: this.pageSize,
         },
       })
         .then((res) => {
-          console.log(res);
           if (res.data.code === 200) {
             this.tableData = [];
             let data = res.data.data;
-            console.log(data, 333333333333333);
             this.sum = res.data.count;
             for (let i = 0, j = 0; j < data.length; i++, j++) {
               this.$set(this.tableData, i, data[j]);
@@ -342,10 +377,35 @@ export default {
           console.log(err);
         });
     },
+    // newGetDataList: function () {
+    //   this.$http({
+    //     url: "/firmsLinkUpload",
+    //     method: "post",
+    //     data: {
+    //       agentId: this.accountId,
+    //       informationId: this.$route.query.informationId,
+    //       Page: this.currentPage,
+    //       Rows: this.pageSize,
+    //     },
+    //   })
+    //     .then((res) => {
+    //       console.log(res);
+    //       if (res.data.code === 200) {
+    //         this.tableData = [];
+    //         let data = res.data.data;
+    //         this.sum = res.data.count;
+    //         for (let i = 0, j = 0; j < data.length; i++, j++) {
+    //           this.$set(this.tableData, i, data[j]);
+    //         }
+    //       }
+    //     })
+    //     .catch((err) => {
+    //       console.log(err);
+    //     });
+    // },
     //新增反馈
     addInfo: function () {
       this.showModalAdd = !this.showModalAdd;
-      //this.modalData = this.tableData[i];
     },
   },
   mounted() {
@@ -360,9 +420,7 @@ export default {
     }
     this.getNowDate();
   },
-  created() {
-    
-  },
+  created() {},
 };
 </script>
 

+ 1 - 1
src/views/data/components/UploadLinkEditModal.vue

@@ -11,7 +11,7 @@
         </div>
         <div class="bodyRow timeWidth">
           <span>发布时间</span
-          ><input type="date" placeholder="选择时间"  :min="localDay" v-model="ziliaoTime" />
+          ><input type="date" placeholder="选择时间"  :max="localDay" v-model="ziliaoTime" />
         </div>
         <div class="bodyRow">
           <div class="contentCol1">