panhui 5 jaren geleden
bovenliggende
commit
18903da8ed

+ 3 - 0
src/components/Banner.vue

@@ -138,6 +138,9 @@ export default {
         },
         },
         playVideo() {
         playVideo() {
             this.$emit('update:autoplay', false);
             this.$emit('update:autoplay', false);
+        },
+        init() {
+            this.current = 0;
         }
         }
     },
     },
     onPageScroll(e) {
     onPageScroll(e) {

+ 1 - 1
src/components/product/GridBig.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
     <div class="grid" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
     <div class="grid" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
-        <van-image class="grid-img" width="100%" :height="170" :src="img" fit="contain" />
+        <van-image class="grid-img" width="100%" height="340rpx" :src="img" fit="contain" />
         <div class="content">
         <div class="content">
             <div class="text">
             <div class="text">
                 <h3>{{ name }}</h3>
                 <h3>{{ name }}</h3>

+ 1 - 1
src/components/product/GridNormal.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
     <div class="grid" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
     <div class="grid" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
-        <van-image class="grid-img" width="100%" height="170px" :src="img" fit="cover" />
+        <van-image class="grid-img" width="100%" height="340rpx" :src="img" fit="cover" />
         <div class="content">
         <div class="content">
             <van-image v-if="info.logo1" class="grid-logo" :height="42" :src="info.logo1" fit="heightFix" />
             <van-image v-if="info.logo1" class="grid-logo" :height="42" :src="info.logo1" fit="heightFix" />
             <div class="content-bottom">
             <div class="content-bottom">

+ 1 - 1
src/components/product/Row.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
     <div class="product" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
     <div class="product" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
-        <van-image :src="img" :width="62" :height="62" fit="cover" />
+        <van-image :src="img" width="124rpx" height="124rpx" fit="cover" />
         <div class="info">
         <div class="info">
             <h3>{{ getName(info) }}</h3>
             <h3>{{ getName(info) }}</h3>
             <p>{{ info.model }}</p>
             <p>{{ info.model }}</p>

+ 1 - 1
src/components/product/RowMini.vue

@@ -10,7 +10,7 @@
             :size="16"
             :size="16"
             style="margin-right: 12px;"
             style="margin-right: 12px;"
         />
         />
-        <van-image :src="img" :width="62" :height="62" fit="cover" />
+        <van-image :src="img" width="124rpx" height="124rpx" fit="cover" />
         <div class="info">
         <div class="info">
             <h3>{{ getName(info) }}</h3>
             <h3>{{ getName(info) }}</h3>
             <div class="sub">
             <div class="sub">

+ 1 - 1
src/components/vendor/Row.vue

@@ -7,7 +7,7 @@
             :size="16"
             :size="16"
             style="margin-right: 12px;"
             style="margin-right: 12px;"
         />
         />
-        <van-image :width="110" :height="110" :src="logo" fit="cover" />
+        <van-image width="220rpx" height="220rpx" :src="logo" fit="cover" />
         <div class="content">
         <div class="content">
             <h3>{{ getName(info, ['chCompanyName', 'enCompanyName']) }}</h3>
             <h3>{{ getName(info, ['chCompanyName', 'enCompanyName']) }}</h3>
             <div class="info">
             <div class="info">

+ 2 - 1
src/locales/zh.json

@@ -400,5 +400,6 @@
   "shen-mi-yong-hu": "神秘用户",
   "shen-mi-yong-hu": "神秘用户",
   "mei-you-geng-duo-le": "没有更多了~",
   "mei-you-geng-duo-le": "没有更多了~",
   "zhong-ying": "中/英",
   "zhong-ying": "中/英",
-  "qi-ta": "其他"
+  "qi-ta": "其他",
+  "quan-bu-xin-wen": "全部资讯"
 }
 }

+ 5 - 5
src/pagesHome/Edit.vue

@@ -59,7 +59,7 @@
                 ></product-category-select>
                 ></product-category-select>
             </van-cell>
             </van-cell>
             <van-cell
             <van-cell
-                :aria-colcount="$t('jiao-liu-yu-yan')"
+                :title="$t('jiao-liu-yu-yan')"
                 is-link
                 is-link
                 :value="languageOfCommunication || $t('wei-xuan-ze')"
                 :value="languageOfCommunication || $t('wei-xuan-ze')"
                 :value-class="languageOfCommunication ? '' : 'noValue'"
                 :value-class="languageOfCommunication ? '' : 'noValue'"
@@ -112,14 +112,14 @@ export default {
         ...mapState(['userInfo']),
         ...mapState(['userInfo']),
         sex() {
         sex() {
             if (this.myInfo.userSex && sexModels.has(this.myInfo.userSex)) {
             if (this.myInfo.userSex && sexModels.has(this.myInfo.userSex)) {
-                return sexModels.get(this.myInfo.userSex).label;
+                return this.$t(sexModels.get(this.myInfo.userSex).label);
             } else {
             } else {
                 return '';
                 return '';
             }
             }
         },
         },
         languageOfCommunication() {
         languageOfCommunication() {
             if (this.myInfo.languageOfCommunication && languageModels.has(this.myInfo.languageOfCommunication)) {
             if (this.myInfo.languageOfCommunication && languageModels.has(this.myInfo.languageOfCommunication)) {
-                return languageModels.get(this.myInfo.languageOfCommunication);
+                return this.$t(languageModels.get(this.myInfo.languageOfCommunication));
             } else {
             } else {
                 return '';
                 return '';
             }
             }
@@ -153,7 +153,7 @@ export default {
         },
         },
         chooseSex() {
         chooseSex() {
             const _list = [...sexModels.values()].map(item => {
             const _list = [...sexModels.values()].map(item => {
-                return item.label;
+                return this.$t(item.label);
             });
             });
             wx.showActionSheet({
             wx.showActionSheet({
                 itemList: _list,
                 itemList: _list,
@@ -167,7 +167,7 @@ export default {
         },
         },
         chooseLanguage() {
         chooseLanguage() {
             const _list = [...languageModels.values()].map(item => {
             const _list = [...languageModels.values()].map(item => {
-                return item;
+                return this.$t(item);
             });
             });
             wx.showActionSheet({
             wx.showActionSheet({
                 itemList: _list,
                 itemList: _list,

+ 1 - 1
src/pagesNews/Detail.vue

@@ -16,7 +16,7 @@
             :title="isActivity ? $t('huo-dong-xiang-qing') : $t('xin-wen-xiang-qing')"
             :title="isActivity ? $t('huo-dong-xiang-qing') : $t('xin-wen-xiang-qing')"
             :barTop="260"
             :barTop="260"
         ></custom-bar>
         ></custom-bar>
-        <banner :banners="banners" fixed :height="267" :radius="0"></banner>
+        <banner :banners="banners" :height="267" :radius="0"></banner>
 
 
         <div class="main" id="main">
         <div class="main" id="main">
             <!-- <h2>{{ info.title }}</h2> -->
             <!-- <h2>{{ info.title }}</h2> -->

+ 16 - 11
src/pagesNews/News.vue

@@ -11,7 +11,7 @@
 <template>
 <template>
     <div>
     <div>
         <custom-bar :pre="0" :title="title" :barTop="140"></custom-bar>
         <custom-bar :pre="0" :title="title" :barTop="140"></custom-bar>
-        <banner :banners="banners" fixed :height="140" :radius="0"></banner>
+        <banner ref="banner" :banners="banners" :height="140" :radius="0"></banner>
         <scroll-view class="scroll-height"></scroll-view>
         <scroll-view class="scroll-height"></scroll-view>
         <div class="main" id="main">
         <div class="main" id="main">
             <van-sticky :offset-top="barHeight" :z-index="100" :container="main">
             <van-sticky :offset-top="barHeight" :z-index="100" :container="main">
@@ -23,6 +23,7 @@
                         :line-width="24"
                         :line-width="24"
                         :line-height="2"
                         :line-height="2"
                     >
                     >
+                        <van-tab :title="$t('quan-bu-xin-wen')"></van-tab>
                         <van-tab :title="item.name" v-for="item in informations" :key="item.key"></van-tab>
                         <van-tab :title="item.name" v-for="item in informations" :key="item.key"></van-tab>
                     </van-tabs>
                     </van-tabs>
                 </div>
                 </div>
@@ -92,35 +93,39 @@ export default {
         },
         },
         listQuery() {
         listQuery() {
             return {
             return {
-                query: { type: [...this.informations][this.hotActive].key, status: 'PASS' },
-                sort: 'createdAt,desc'
+                query: { type: this.hotActive ? [...this.informations][this.hotActive - 1].key : '', status: 'PASS' },
+                sort: 'top,asc;auditTime,desc;sort,desc'
             };
             };
         },
         },
         pageType() {
         pageType() {
-            return [...this.informations][this.hotActive].type;
+            return this.hotActive ? [...this.informations][this.hotActive - 1].type : 'default';
         },
         },
         title() {
         title() {
-            return this.$t([...this.informations][this.hotActive].name);
+            return this.hotActive ? this.$t([...this.informations][this.hotActive - 1].name) : '新闻资讯';
         }
         }
     },
     },
     onLoad(options) {
     onLoad(options) {
         this.$nextTick(() => {
         this.$nextTick(() => {
-            let index = 0;
+            let index = -1;
             if (options.type) {
             if (options.type) {
                 index = [...this.informations].findIndex(item => {
                 index = [...this.informations].findIndex(item => {
                     return item.key === options.type;
                     return item.key === options.type;
                 });
                 });
-                if (index === -1) {
-                    index = 0;
-                }
             }
             }
-            this.changeTab(index, true);
+            this.changeTab(index + 1, true);
         });
         });
     },
     },
     methods: {
     methods: {
         changeTab(index, first = false) {
         changeTab(index, first = false) {
             this.hotActive = index;
             this.hotActive = index;
-            getBanner([...this.informations][index].key).then(res => {
+            getBanner(
+                index
+                    ? [...this.informations][index - 1].key
+                    : [...InformationType].map(item => {
+                          return item[0];
+                      })
+            ).then(res => {
+                this.$refs.banner.init();
                 this.banners = res;
                 this.banners = res;
             });
             });