Browse Source

Merge branch 'master' of http://git.izouma.com/panhui/card-wechat

xuqiang-97 5 years ago
parent
commit
1378bb0f85
4 changed files with 22 additions and 4 deletions
  1. 11 2
      src/pages/confirmorder.vue
  2. 11 2
      src/pages/receiving.vue
  3. BIN
      src/static/.DS_Store
  4. BIN
      src/static/imgs/.DS_Store

+ 11 - 2
src/pages/confirmorder.vue

@@ -37,7 +37,7 @@
         <div v-for="(item, index) in Boxes" :key="index.id">
         <div v-for="(item, index) in Boxes" :key="index.id">
             <div class="box-con">
             <div class="box-con">
                 <div class="box-con-Cards">
                 <div class="box-con-Cards">
-                    <img :src="cardCaseInfo.images[0]" alt="" />
+                    <img :src="img" alt="" />
                     <div class="box-con-right">
                     <div class="box-con-right">
                         <p class="box-con-tit">{{ cardCaseInfo.name }}</p>
                         <p class="box-con-tit">{{ cardCaseInfo.name }}</p>
                         <div class="box-con-today">
                         <div class="box-con-today">
@@ -107,6 +107,15 @@ export default {
             message: ''
             message: ''
         };
         };
     },
     },
+    computed: {
+        img() {
+            if (this.cardCaseInfo.images) {
+                return this.cardCaseInfo.images[0];
+            } else {
+                return '';
+            }
+        }
+    },
     methods: {
     methods: {
         address() {
         address() {
             this.navigateTo('/pages/chooseAddress?type=order');
             this.navigateTo('/pages/chooseAddress?type=order');
@@ -174,7 +183,7 @@ export default {
                     }
                     }
                 })
                 })
                 .then(res => {
                 .then(res => {
-                    wx.hideLoading();
+                    this.hideLoading();
                     if (!res.empty) {
                     if (!res.empty) {
                         this.userAddressId = res.content[0].id;
                         this.userAddressId = res.content[0].id;
                         this.addressList = res.content[0];
                         this.addressList = res.content[0];

+ 11 - 2
src/pages/receiving.vue

@@ -145,8 +145,17 @@ export default {
         },
         },
         refWx() {
         refWx() {
             wx.chooseAddress({
             wx.chooseAddress({
-                success(res) {
-                    console.log(JSON.stringify(res));
+                success: res => {
+                    console.log(res);
+                    this.form = {
+                        enabled: false,
+                        name: res.userName,
+                        phone: res.telNumber,
+                        city: res.cityName,
+                        detail: res.detailInfo,
+                        province: res.provinceName,
+                        district: res.countyName
+                    };
                 },
                 },
                 fail: function(err) {
                 fail: function(err) {
                     console.log(JSON.stringify(err));
                     console.log(JSON.stringify(err));

BIN
src/static/.DS_Store


BIN
src/static/imgs/.DS_Store