Browse Source

修改已知问题

306132416@qq.com 4 years ago
parent
commit
c5e5bfb535

+ 4 - 4
src/App.vue

@@ -135,7 +135,7 @@ export default {
     localTest(){
       // 本地调试打开
       this.loadingFlag = false;
-      this.isManufacturer = "manufacturer"; //  distributor
+      this.isManufacturer = "distributor"; //  distributor
       if (this.isManufacturer === "manufacturer") {
         if (this.$route.path === "/loading")
           this.$router.replace({ path: "/uploadInfor" });
@@ -159,9 +159,9 @@ export default {
     this.localTest();// 本地调试打开
   }, */
   created() {
-     this.loadingFlag = true;
-     this.getData(); // 线上打开
-     //this.localTest();// 本地调试打开
+     // this.loadingFlag = true;
+     // this.getData(); // 线上打开
+     this.localTest();// 本地调试打开
   },
 };
 </script>

+ 2 - 2
src/config/env.js

@@ -1,6 +1,6 @@
 module.exports = {
-    env_url : process.env.ZHIMA_VUE_ENV === "development" ? 'http://8.136.230.133:8080' : 'http://8.140.188.129:8080',
-    php_url : process.env.ZHIMA_VUE_ENV === "development" ? 'http://8.136.230.133' : 'http://8.140.188.129',
+    env_url : process.env.NODE_ENV === "development" ? 'http://8.136.230.133:8080' : 'http://8.140.188.129:8080',
+    php_url : process.env.NODE_ENV === "development" ? 'http://8.136.230.133' : 'http://8.140.188.129',
     home_url : 'https://118.190.206.51/lexus-ms/home',
     login_out_url : 'https://www.lexusdlrmkt.com/admin/logout'
 }

+ 2 - 2
src/main.js

@@ -14,7 +14,7 @@ import 'element-tiptap/lib/index.css';
 // use ElementUI's plugin
 Vue.use(ElementUI);
 // use this package's plugin
-Vue.use(ElementTiptapPlugin, { /* plugin options */ });
+Vue.use(ElementTiptapPlugin, { lang:'zh' });
 // Now you register `'el-tiptap'` component globally.
 
 Vue.config.productionTip = false
@@ -22,4 +22,4 @@ Vue.prototype.$http = axiosApi
 new Vue({
     router,
     render: h => h(App)
-}).$mount('#app')
+}).$mount('#app')

+ 11 - 8
src/views/notification/detail/itemDetail.vue

@@ -3,15 +3,15 @@
     <div class="titleBox">
         <!-- <div class="titleStyle">【{{contentData.title}}】{{contentData.addtime}}</div> -->
         <div class="titleStyle">{{contentData.title}}</div>
-        <span @click="backToPre()">返回上一级</span>
+        <div class="backStyle" @click="backToPre()">返回上一级</div>
     </div>
     <div style=" border: 1px solid  #ccc"></div>
     <div class="content">
         <!--{{contentData.content || '-'}}-->
         <p v-html="contentData.content"></p>
     </div>
-      <div class="files">
-          <p style="width: 65px">附件:</p>
+      <div class="files" v-if="showFileLength">
+          <p style="width: 65px" >附件:</p>
           <div class="filesName">
               <p v-for="(item, index) in contentData.files"
               :key="index"
@@ -32,6 +32,7 @@ export default {
     return {
         contentData:{},
         unifiedUrl:'/lexus_php/api/',
+        showFileLength:''
     };
   },
   computed: {},
@@ -55,15 +56,17 @@ export default {
              },
          })
          .then((res) => {
-             console.log(res)
              if (res.data.code === 200) {
-                console.log(res)
                 this.contentData = {
                     addtime:res.data.addtime,
                     content:res.data.content,
                     title:res.data.title,
                     files:res.data.files
-                }
+                };
+                 this.showFileLength = this.contentData.files.length
+                console.log(this.showFileLength)
+             }else {
+                 alert('发生错误,请稍后再试')
              }
          })
          .catch((err) => {
@@ -87,9 +90,9 @@ export default {
     align-items: center;
     justify-content: space-between;
 }
-.titleBox span{
+.backStyle {
+    margin-right: 10px;
     color: #0000ff;
-    text-align: right;
     cursor: pointer;
 }
 .notice_jingXiaoshang_detail {

+ 1 - 1
src/views/notification/editPage/editPage.vue

@@ -39,7 +39,7 @@
             v-model="contentParam.content"
             :extensions="extensions"
             :charCounterCount="false"
-            placeholder="Write something ..."
+            placeholder="请编辑文本内容 ..."
           >
             <!--charCounterCount 是否显示字数统计 -->
           </el-tiptap>

+ 7 - 4
src/views/notification/jingXiaoshang.vue

@@ -25,7 +25,7 @@
             <div ><span>·</span>[重要通知]</div>
           </div>
           <div>{{ obj.title || "-" }}</div>
-          <div v-html="obj.content"></div>
+          <!--<div v-html="obj.content"></div>-->
           <div>{{ (obj.update_time || obj.addtime || '').slice(0, -8) }}</div>
         </div>
       </div>
@@ -81,12 +81,14 @@ export default {
         });
     },
   },
+  watch: {
+    // 如果路由发生变化,再次执行该方法
+    "$route": "getDataList"
+  },
   created() {},
   mounted() {
-  },
-  activated() {
     this.getDataList()
-  }
+  },
 };
 </script>
 
@@ -117,6 +119,7 @@ export default {
   display: flex;
   justify-content: center;
   align-items: center;
+  padding-bottom: 3px;
 }
 .topTab {
   height: 30px;