panhui 4 лет назад
Родитель
Сommit
1c803ee1e1

+ 1 - 0
src/components/Member.vue

@@ -16,6 +16,7 @@ import dayjs from 'dayjs';
 var relativeTime = require('dayjs/plugin/relativeTime');
 dayjs.extend(relativeTime);
 dayjs.locale('zh-cn');
+
 export default {
     name: 'member',
     props: {

+ 5 - 1
src/components/Order.vue

@@ -13,7 +13,11 @@
         </div>
         <div class="order-info-content">
             <van-cell-group :border="false">
-                <van-cell :border="false" :title="$t('chan-pin-pin-pai')" :value="info.brand" />
+                <van-cell
+                    :border="false"
+                    :title="$t('chan-pin-pin-pai')"
+                    :value="getName(info, ['brand', 'enBrand'])"
+                />
                 <van-cell :border="false" :title="$t('chan-pin-lei-bie')" :value="productCategory" />
                 <van-cell :border="false" :title="$t('ying-yong-ling-yu')" :value="applicationField" />
                 <van-cell :border="false" :title="$t('chan-pin-miao-shu')" :value="info.introduction" />

+ 1 - 1
src/locales/en.json

@@ -358,7 +358,7 @@
   "yun-xu": "Allow",
   "zi-xun-dan": "Message card",
   "ni-hao-wo-dui-gui-fang-de-chan-pin-fei-chang-gan-xing-qu-xi-wang-ke-yi-xiang-xi-liao-liao": "Hello, I am interested in your product, hope to get more details from you.",
-  "ni-hao-wo-dui-gui-fang-fa-song-le-yi-tiao-qi-ye-ren-ling-qing-qiu": "Hello, I'v sent a message regarding our company/product.",
+  "ni-hao-wo-dui-gui-fang-fa-song-le-yi-tiao-qi-ye-ren-ling-qing-qiu": "Hello, I've sent a message regarding our company/product.",
   "mei-you-geng-duo-le": "There's no more items.",
   "zhong-ying": "CN/EN",
   "qi-ta": "Other",

+ 5 - 1
src/mixins/vendorInfo.js

@@ -16,7 +16,11 @@ export default {
                 : '';
 
             if (this.info.customCategory) {
-                str += (str ? '_/' : '') + this.info.customCategory.split(',').join('_/');
+                str +=
+                    (str ? '_/' : '') +
+                    this.getName(this.info, ['customCategory', 'enCustomCategory'])
+                        .split(',')
+                        .join('_/');
             }
 
             return str;

+ 1 - 1
src/native/mineNode/index.wxss

@@ -188,7 +188,7 @@
 .octoParse-figure {
   overflow: hidden;
 }
-.WxTextView{
+.octoParse-p{
     font-size: 16px;
     color: #000;
     line-height: 22px;

+ 23 - 18
src/pages/Chat.vue

@@ -10,22 +10,24 @@
         <member :info="adminInfo" type="admin" />
         <van-divider />
 
-        <block v-for="item in showList" :key="item.otherUserId">
-            <movable-area class="move-area">
-                <movable-view
-                    direction="horizontal"
-                    @touchstart="touchStartEvent($event, item.otherUserId)"
-                    @change="touchMoveEvent($event, item.otherUserId)"
-                    @touchend="touchEndEvent($event, item.otherUserId)"
-                    :x="moveInfo[item.otherUserId]"
-                    :animation="startMove"
-                    class="move-view"
-                    inertia
-                >
-                    <member :info="item"></member>
-                    <div class="del" @click="del(item.otherUserId)">{{ $t('shan-chu') }}</div>
-                </movable-view>
-            </movable-area>
+        <block v-if="isShow">
+            <block v-for="item in showList" :key="item.otherUserId">
+                <movable-area class="move-area">
+                    <movable-view
+                        direction="horizontal"
+                        @touchstart="touchStartEvent($event, item.otherUserId)"
+                        @change="touchMoveEvent($event, item.otherUserId)"
+                        @touchend="touchEndEvent($event, item.otherUserId)"
+                        :x="moveInfo[item.otherUserId]"
+                        :animation="startMove"
+                        class="move-view"
+                        inertia
+                    >
+                        <member :info="item"></member>
+                        <div class="del" @click="del(item.otherUserId)">{{ $t('shan-chu') }}</div>
+                    </movable-view>
+                </movable-area>
+            </block>
         </block>
         <van-dialog id="van-dialog" />
     </div>
@@ -43,7 +45,8 @@ export default {
             touchMap: new Map(),
             moveInfo: {},
             moveX: 60,
-            startMove: false
+            startMove: false,
+            isShow: false
         };
     },
     computed: {
@@ -107,9 +110,11 @@ export default {
                 ...info
             };
 
+            this.isShow = true;
+
             setTimeout(() => {
                 this.startMove = true;
-            }, 100);
+            }, 1000);
         },
         loginMethods() {
             this.$store.dispatch('getUnreadNumber');

+ 2 - 0
src/pagesNews/Detail.vue

@@ -138,6 +138,8 @@ export default {
             };
             // this.getImgList(res.content);
             this.detail = octoparse.htmlParse(res.content, options);
+
+            console.log(res.content);
         });
     },
     onShow() {

+ 1 - 1
src/pagesProduct/ContrastDetail.vue

@@ -38,7 +38,7 @@
                     {{ $t('chan-pin-pin-pai') }}
                 </div>
                 <div class="td pro" v-for="(item, index) in showContrastList" :key="index">
-                    {{ item.brand }}
+                    {{ getName(item, ['brand', 'enBrand']) }}
                 </div>
             </div>
             <div class="tr">

+ 5 - 1
src/pagesProduct/Detail.vue

@@ -55,7 +55,11 @@
                     <van-divider />
 
                     <van-cell-group :border="false">
-                        <van-cell :title="$t('chan-pin-pin-pai')" :border="false" :value="productInfo.brand" />
+                        <van-cell
+                            :title="$t('chan-pin-pin-pai')"
+                            :border="false"
+                            :value="getName(productInfo, ['brand', 'enBrand'])"
+                        />
                         <van-cell
                             :title="$t('ying-wen-pin-ming')"
                             :border="false"

+ 2 - 2
src/pagesVendor/About.vue

@@ -137,7 +137,7 @@ export default {
         }
     },
     mounted() {
-        this.$http.post('/decoration/hotProduct?vendorId=' + this.$mp.options.id).then(res => {
+        this.$http.post('/decoration/hotProduct?vendorId=' + this.info.id).then(res => {
             this.productList = res
                 ? res.filter(item => {
                       return item.deviceStatus == 'NOW_ON_SHELF';
@@ -150,7 +150,7 @@ export default {
                 '/decoration/all',
                 {
                     query: {
-                        vendorInfoId: this.$mp.options.id
+                        vendorInfoId: this.info.id
                     }
                 },
                 {

+ 1 - 1
src/pagesVendor/Detail.vue

@@ -61,7 +61,7 @@
 
             <div id="main" class="main">
                 <about
-                    v-if="active === 0"
+                    v-if="active === 0 && vendorInfo.id"
                     :info="vendorInfo"
                     :showConnect="showConnect"
                     @changeActive="changeActive"

+ 3 - 3
src/pagesVendor/Product.vue

@@ -80,7 +80,7 @@ export default {
         }
     },
     computed: {
-        ...mapState(['barTop', 'barHeight']),
+        ...mapState(['barTop', 'barHeight', 'screenWidth']),
         listQuery() {
             return {
                 productSort: this.sort,
@@ -102,7 +102,7 @@ export default {
         this.searchTop = this.barHeight + 44;
         this.$http
             .get('/customCategory/my', {
-                vendorId: this.$mp.options.id
+                vendorId: this.vendorInfo.id
             })
             .then(res => {
                 this.menus = res;
@@ -217,7 +217,7 @@ export default {
 }
 .product-row-list {
     overflow: hidden;
-    width: 100%;
+    width: 508rpx;
 }
 
 .isEn {

+ 5 - 0
src/store/index.js

@@ -26,6 +26,7 @@ export default new Vuex.Store({
         barInfo: {},
         rpx: 2,
         nodeEnv: false,
+        screenWidth: 0,
         chatForm:
             '{"phone":"13365135976","sex":"male","nickname":"蒋耀忠","position":"总经理","chCompanyName":"NE洛阳新能轴承制造有限公司","email":"11@qq.com.cn","products":[{"chName":"MS22-8多轴数控机床","enName":"MultiLine MS22-8","id":6296,"mainPicture":"https://imt.oss-cn-hangzhou.aliyuncs.com/image/2020-11-26-18-08-34MaKXCzxH.png"}]}'
     },
@@ -92,6 +93,9 @@ export default new Vuex.Store({
         },
         updateNodeEnv(state, nodeEnv) {
             state.nodeEnv = nodeEnv;
+        },
+        updateWidth(state, width) {
+            state.screenWidth = width;
         }
     },
     actions: {
@@ -168,6 +172,7 @@ export default new Vuex.Store({
             context.commit('updateNodeEnv', process.env.NODE_ENV === 'development');
             wx.getSystemInfo({
                 success: res => {
+                    context.commit('updateWidth', res.windowWidth);
                     context.commit('updateRpx', Math.ceil((res.windowWidth / 750) * 100) / 100);
                 }
             });