From 273fad55703ecc1d9bd365e3b51c27361340aea5 Mon Sep 17 00:00:00 2001 From: fanfan Date: Fri, 26 Apr 2024 10:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=9C=B0=E5=9D=80=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 2 +- core/config/defaultConfig.js | 2 +- ext.json | 4 ++-- manifest.json | 2 +- pages/goods/detail.vue | 16 +++++++++------- pages/index/index.vue | 2 +- project.config.json | 2 +- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/config.js b/config.js index cef42d9..d0154b4 100644 --- a/config.js +++ b/config.js @@ -15,7 +15,7 @@ export default { * 可在超管后台-商城列表中查看10025 */ - storeId: wx.getExtConfigSync().store_id? wx.getExtConfigSync().store_id : 10045, + storeId: wx.getExtConfigSync().store_id? wx.getExtConfigSync().store_id : 10048, // storeId: 10037, diff --git a/core/config/defaultConfig.js b/core/config/defaultConfig.js index 79be98c..b299380 100644 --- a/core/config/defaultConfig.js +++ b/core/config/defaultConfig.js @@ -15,7 +15,7 @@ export default { * 商城ID (必填) * 可在超管后台-商城列表中查看 */ - storeId: wx.getExtConfigSync? wx.getExtConfigSync().store_id : 10045, + storeId: wx.getExtConfigSync? wx.getExtConfigSync().store_id : 10048, // storeId: 10037, /** diff --git a/ext.json b/ext.json index 0f69a99..d1f4139 100644 --- a/ext.json +++ b/ext.json @@ -1,7 +1,7 @@ { "extEnable": true, - "extAppid": "wxe843b6d7a4bd3389", + "extAppid": "wxa3127ed5c3542a28", "ext": { - "store_id": 10045 + "store_id": 10048 } } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 85406bd..e486afc 100644 --- a/manifest.json +++ b/manifest.json @@ -92,7 +92,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wxe843b6d7a4bd3389", + "appid" : "wxa3127ed5c3542a28", "libVersion" : "latest", "setting" : { // 是否检查安全域名和 TLS 版本 diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue index 5c3f613..37397d6 100644 --- a/pages/goods/detail.vue +++ b/pages/goods/detail.vue @@ -101,7 +101,7 @@ - {{addressResult.city}}:{{stockValue}} + {{addressInfo.region?addressInfo.region.city:addressResult.city}}:{{stockValue}} @@ -139,7 +139,7 @@ - {{addressInfo.region?addressInfo.region.province +'-'+addressInfo.region.city+'-'+addressInfo.region.region:'全国'}} + {{addressInfo.region?(addressInfo.region.province +'-'+addressInfo.region.city+'-'+addressInfo.region.region):(addressResult?addressResult.province +'-'+addressResult.city+'-'+addressResult.district:'全国')}} @@ -572,9 +572,9 @@ goods_id: this.goodsId, num: this.selectNum }], - province: this.addressResult ? this.addressResult.province : '江苏省', - city: this.addressResult ? this.addressResult.city : '南京市', - district: this.addressResult ? this.addressResult.district : '玄武区' + province: this.addressInfo.region?this.addressInfo.region.province:(this.addressResult ? this.addressResult.province : '江苏省'), + city: this.addressInfo.region?this.addressInfo.region.city:(this.addressResult ? this.addressResult.city : '南京市'), + district: this.addressInfo.region?this.addressInfo.region.region:(this.addressResult ? this.addressResult.district : '玄武区') } let { status, @@ -815,7 +815,6 @@ }, //获取收货地址 getDefaultAddress() { - console.log('5855555') const that = this return new Promise((resolve, reject) => { address.defaultId().then(res => { @@ -823,9 +822,12 @@ for (var i = 0; i < that.addressList.length; i++) { if (res.data.defaultId == that.addressList[i].address_id) { that.addressInfo = that.addressList[i]; - console.log(that.addressInfo, '获取地址') + console.log('kkkkkkkkk') } } + if(that.addressInfo){ + that.getGoodsStockInfor() + } } }) .catch() diff --git a/pages/index/index.vue b/pages/index/index.vue index da749e2..161e061 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1010,7 +1010,7 @@ async getStore() { newFunApi.storeData().then(res => { if (res.status == 200) { - this.logoImage = res.data.storeInfo.logoImage.preview_url + this.logoImage = res.data.storeInfo.logoImage?res.data.storeInfo.logoImage.preview_url:"" } }) .finally(() => {}) diff --git a/project.config.json b/project.config.json index 06a195e..ae32f42 100644 --- a/project.config.json +++ b/project.config.json @@ -1,5 +1,5 @@ { - "appid": "wxe843b6d7a4bd3389", + "appid": "wxa3127ed5c3542a28", "compileType": "miniprogram", "libVersion": "3.3.3", "packOptions": {