yangc 8 éve
szülő
commit
5630d36985

+ 2 - 1
components/help/left.vue

@@ -25,6 +25,7 @@
       return value1 - value2
     }
   }
+  import {deepCopy} from '~utils/baseUtils'
   export default {
     name: 'left',
     data () {
@@ -37,7 +38,7 @@
     },
     computed: {
       helps () {
-        let data = this.$store.state.help.snapsho.data.slice()
+        let data = deepCopy(this.$store.state.help.snapsho.data)
         let list = data.sort(compare('detno'))
         if (list) {
           for (let i = 0; i < list.length; i++) {

+ 3 - 0
nuxt.config.js

@@ -1,7 +1,10 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
+// b2c后台
 const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://10.1.51.124:8080/platform-b2c')
+// 公共询价
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
+// 公共物料
 const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftmall.com/' : 'http://218.17.158.219:24000/')
 
 module.exports = {

+ 1 - 1
pages/help/helpList/_id.vue

@@ -64,7 +64,7 @@
         return this.$store.state.help.title.data
       },
       helpList () {
-        return this.$store.state.help.helplist.data.sort(compare('detno'))
+        return [...this.$store.state.help.helplist.data].sort(compare('detno'))
       }
     }
   }

+ 1 - 1
pages/help/home.vue

@@ -67,7 +67,7 @@
     },
     computed: {
       helpNav () {
-        let list = this.$store.state.help.snapsho.data || []
+        let list = [...this.$store.state.help.snapsho.data]
         if (list.length > 0) {
           list = sortBy(list, 'detno')
           for (let i = 0; i < list.length; i++) {

+ 8 - 1
pages/mobile/user/storeinfo.vue

@@ -259,7 +259,7 @@
           let el = this.$refs.descTextarea
           if (el) {
 //            console.log(el.scrollHeight - el.clientHeight)
-            el.style.height = (el.scrollHeight * 2 - el.clientHeight + 50) / 100 + 'rem'
+            el.style.height = (el.scrollHeight * 2 - el.clientHeight + 150) / 100 + 'rem'
           }
         })
       }
@@ -371,7 +371,14 @@
     .text {
       width: 4.4rem;
       word-break: break-all;
+      line-height: .44rem;
     }
+    /*.pull-left {*/
+      /*float: none !important;*/
+      /*display: inline-block;*/
+      /*word-wrap: break-word;*/
+      /*vertical-align: top;*/
+    /*}*/
     .update {
       padding: 0.06rem 0 0.06rem 0;
     }

+ 13 - 0
utils/baseUtils.js

@@ -198,3 +198,16 @@ export const judgeIsPdf = function (path) {
     return false
   }
 }
+// 实现深拷贝
+export const deepCopy = function (target) {
+  if (typeof target !== 'object') return
+  // 判断目标类型,来创建返回值
+  var newObj = target instanceof Array ? [] : {}
+  for (var item in target) {
+    // 只复制元素自身的属性,不复制原型链上的
+    if (target.hasOwnProperty(item)) {
+      newObj[item] = typeof target[item] === 'object' ? deepCopy(target[item]) : target[item]
+    }
+  }
+  return newObj
+}