From 7b1a281e5baa3c63352e59fc295843f1b94a5091 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Thu, 4 Jun 2026 14:28:37 +0800 Subject: [PATCH] 1 --- pages/index/index.vue | 8 ++- pages/login/login.vue | 6 +- pages/myCenter/shopDetail.vue | 115 +++++++++++++++++++-------------- pages/shop/shopReturnOrder.vue | 4 +- 4 files changed, 76 insertions(+), 57 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 04eb581..ea15d27 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -225,7 +225,6 @@ }, onShow() { this.indexInit() - this.getData() }, onLoad() { @@ -238,6 +237,7 @@ that.width = info.screenWidth * 2; } }); + this.getData() this.getBusinessStatus() if(!uni.getStorageSync('area')){ this.checkArea() @@ -264,7 +264,8 @@ }, false, 'GET', 'application/x-www-form-urlencoded').then((res) => { if (res.code == 200) { this.shop = res.result - this.shop.shopIcon = uni.getStorageSync('shopIcon') + this.shop.shopIcon = JSON.parse(uni.getStorageSync('area')).shop.shopIcon + this.shop.shopName = JSON.parse(uni.getStorageSync('area')).shop.shopName this.businessStatus = res.result.status } else { uni.showToast({ @@ -276,7 +277,10 @@ }).catch((res) => {}) }, onClickArea(item){ + console.log('好的好的',item) uni.setStorageSync('area',JSON.stringify(item)) + this.getBusinessStatus() + this.getData() // this.searchForm.regionId = item.id // this.getDelivery(); // this.getShopArea(); diff --git a/pages/login/login.vue b/pages/login/login.vue index 053df54..1f7cc4f 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -36,9 +36,9 @@ - + @@ -75,7 +75,7 @@ wayValue:0, captchaImg:'', top: 0, - loginType: true, + loginType: false, codetimes: '获取验证码', timer: null, canshowcode: false, diff --git a/pages/myCenter/shopDetail.vue b/pages/myCenter/shopDetail.vue index 154b0bf..024e257 100644 --- a/pages/myCenter/shopDetail.vue +++ b/pages/myCenter/shopDetail.vue @@ -6,7 +6,8 @@ 门头图 - + @@ -25,7 +26,8 @@ 副标题 - + @@ -73,7 +75,8 @@ 支付宝账号 - + @@ -81,7 +84,8 @@ 支付宝实名 - + @@ -97,30 +101,31 @@ export default { data() { return { - shop:{}, - shopImages:[], - huanjing:'' + shop: {}, + shopImages: [], + huanjing: '' } }, onLoad() { - this.shop = JSON.parse(uni.getStorageSync('shop')); + this.shop = JSON.parse(uni.getStorageSync('area')).shop; + console.log('好的好的',this.shop) this.shopImages = this.shop.shopImages.split('@@') this.huanjing = JSON.parse(this.shopImages[3])[0] for (let key in this.shop) { - if (this.shop[key] === null) { - delete this.shop[key]; - } + if (this.shop[key] === null) { + delete this.shop[key]; + } } }, methods: { - navigatorTo(e){ + navigatorTo(e) { let url = "" - if(e=='addgoods'){ + if (e == 'addgoods') { url = '/package1/myCenter/addGoods' - }else if(e=='merchant'){ + } else if (e == 'merchant') { url = '/package1/myCenter/myMerchant' - }else if(e == 'xiugaixinxi'){ + } else if (e == 'xiugaixinxi') { url = '/pages/myCenter/shopDetail' } uni.navigateTo({ @@ -130,7 +135,7 @@ pictureAdd(type) { let that = this uni.chooseMedia({ - count: type == 'qita'?9:1, + count: type == 'qita' ? 9 : 1, mediaType: ['image'], sourceType: ['album', 'camera'], success(res) { @@ -139,13 +144,13 @@ mask: true }) for (let i = 0; i < res.tempFiles.length; i++) { - that.upLoadFile(res.tempFiles[i].tempFilePath,type) + that.upLoadFile(res.tempFiles[i].tempFilePath, type) } - + } }) }, - async upLoadFile(path,type) { + async upLoadFile(path, type) { let that = this; let hiver_token = uni.getStorageSync("hiver_token") await uni.uploadFile({ @@ -160,7 +165,7 @@ success: (uploadFileRes) => { let pathData = JSON.parse(uploadFileRes.data) that.shop.shopIcon = pathData.result - + that.$forceUpdate() }, fail: (err) => { @@ -175,84 +180,94 @@ uni.hideLoading(); }, 1000) }, - submit(){ + submit() { console.log(this.shop) console.log(typeof(this.shop)) - this.NB.sendRequest('/app/shop/edit', this.shop, false, 'PUT', 'application/x-www-form-urlencoded').then(res => { - - if (res.code == 200) { - uni.showModal({ - title: '提示', - content: '更新信息成功', - showCancel:false, - success: function (res) { - uni.setStorageSync('shop',this.shop) - if (res.confirm) { - uni.navigateBack() + this.NB.sendRequest('/app/shop/edit', this.shop, false, 'PUT', 'application/x-www-form-urlencoded').then( + res => { + + if (res.code == 200) { + uni.showModal({ + title: '提示', + content: '更新信息成功', + showCancel: false, + success: function(res) { + uni.setStorageSync('shop', this.shop) + if (res.confirm) { + uni.navigateBack() + } } - } - }); - } else { - uni.showToast(res.message) - } - }) + }); + } else { + uni.showToast(res.message) + } + }) } } }