panhui 4 anos atrás
pai
commit
24a6c58ba0

BIN
.DS_Store


+ 5 - 0
src/components/filter/Country.vue

@@ -163,7 +163,12 @@ export default {
                 console.log(this.chooseInfo);
                 console.log(this.chooseInfo);
                 const _value = value || this.chooseId;
                 const _value = value || this.chooseId;
                 console.log(this.chooseInfo.value === _value);
                 console.log(this.chooseInfo.value === _value);
+                console.log(this.value);
+                console.log(value);
+                console.log(_value);
                 if (this.value === _value) {
                 if (this.value === _value) {
+                    console.log('清除选择');
+                    this.$emit('update:country', '');
                     this.$emit('input', '');
                     this.$emit('input', '');
                 } else if (value) {
                 } else if (value) {
                     const countries = [...(this.headerInfo.children || [])]
                     const countries = [...(this.headerInfo.children || [])]

+ 1 - 1
src/locales/zh.json

@@ -453,4 +453,4 @@
   "jin-jing-bei-an-dan-hao": "进境备案单号",
   "jin-jing-bei-an-dan-hao": "进境备案单号",
   "chan-pin-xu-qiu-qing-dan": "产品交易登记",
   "chan-pin-xu-qiu-qing-dan": "产品交易登记",
   "qing-shu-ru-18-wei-jin-jing-bei-an-dan-hao": "进境备案单号格式错误"
   "qing-shu-ru-18-wei-jin-jing-bei-an-dan-hao": "进境备案单号格式错误"
-}
+}

+ 21 - 23
src/pages/My.vue

@@ -28,14 +28,9 @@
             </div>
             </div>
 
 
             <div class="btn-content">
             <div class="btn-content">
-                <van-button
-                    v-if="!userInfo"
-                    open-type="getUserInfo"
-                    :color="$colors.warn"
-                    :radius="4"
-                    @getuserinfo="login"
-                    >{{ $t('wei-xin-kuai-jie-deng-lu') }}</van-button
-                >
+                <van-button v-if="!userInfo" :color="$colors.warn" :radius="4" @click="login">{{
+                    $t('wei-xin-kuai-jie-deng-lu')
+                }}</van-button>
                 <van-button
                 <van-button
                     v-else
                     v-else
                     size="small"
                     size="small"
@@ -180,21 +175,24 @@ export default {
             this.$i18n.set(language);
             this.$i18n.set(language);
             this.checkTabBar();
             this.checkTabBar();
         },
         },
-        login(e) {
-            if (e.detail.iv) {
-                this.wxInfo = e.detail.userInfo;
-                this.$http
-                    .post('/user/getMaUserInfo', {
-                        sessionKey: this.$store.state.sessionKey,
-                        rawData: e.detail.rawData,
-                        signature: e.detail.signature,
-                        encryptedData: e.detail.encryptedData,
-                        iv: e.detail.iv
-                    })
-                    .then(() => {
-                        this.showPhone = true;
-                    });
-            }
+        login() {
+            wx.getUserProfile({
+                desc: '获取信息绑定账号',
+                success: res => {
+                    this.wxInfo = res.userInfo;
+                    this.$http
+                        .post('/user/getMaUserInfo', {
+                            sessionKey: this.$store.state.sessionKey,
+                            rawData: res.rawData,
+                            signature: res.signature,
+                            encryptedData: res.encryptedData,
+                            iv: res.iv
+                        })
+                        .then(() => {
+                            this.showPhone = true;
+                        });
+                }
+            });
         }
         }
     },
     },
     onShareAppMessage(from, target) {
     onShareAppMessage(from, target) {

+ 19 - 17
src/pagesHome/Authorized.vue

@@ -14,7 +14,7 @@
 
 
         <div class="btn-content">
         <div class="btn-content">
             <div>
             <div>
-                <van-button :color="$colors.warn" block :radius="4" open-type="getUserInfo" @getuserinfo="login">{{
+                <van-button :color="$colors.warn" block :radius="4" @click="login">{{
                     $t('wei-xin-kuai-jie-deng-lu')
                     $t('wei-xin-kuai-jie-deng-lu')
                 }}</van-button>
                 }}</van-button>
             </div>
             </div>
@@ -40,22 +40,24 @@ export default {
         AuthPhone
         AuthPhone
     },
     },
     methods: {
     methods: {
-        login(e) {
-            console.log(e);
-            if (e.detail.iv) {
-                this.wxInfo = e.detail.userInfo;
-                this.$http
-                    .post('/user/getMaUserInfo', {
-                        sessionKey: this.$store.state.sessionKey,
-                        rawData: e.detail.rawData,
-                        signature: e.detail.signature,
-                        encryptedData: e.detail.encryptedData,
-                        iv: e.detail.iv
-                    })
-                    .then(() => {
-                        this.showAuth = true;
-                    });
-            }
+        login() {
+            wx.getUserProfile({
+                desc: '获取信息绑定账号',
+                success: res => {
+                    this.wxInfo = res.userInfo;
+                    this.$http
+                        .post('/user/getMaUserInfo', {
+                            sessionKey: this.$store.state.sessionKey,
+                            rawData: res.rawData,
+                            signature: res.signature,
+                            encryptedData: res.encryptedData,
+                            iv: res.iv
+                        })
+                        .then(() => {
+                            this.showAuth = true;
+                        });
+                }
+            });
         }
         }
     }
     }
 };
 };

+ 2 - 1
src/pagesVendor/News.vue

@@ -57,7 +57,8 @@ export default {
                 query: {
                 query: {
                     vendorInfoId: this.vendorInfo.id,
                     vendorInfoId: this.vendorInfo.id,
                     status: 'PASS'
                     status: 'PASS'
-                }
+                },
+                sort: 'id,desc'
             };
             };
         }
         }
     },
     },