diff --git a/pages/CommodityDetails/CommodityDetails.vue b/pages/CommodityDetails/CommodityDetails.vue index b90eb61..87896a1 100644 --- a/pages/CommodityDetails/CommodityDetails.vue +++ b/pages/CommodityDetails/CommodityDetails.vue @@ -295,16 +295,16 @@ this.updata.goodsName = this.goodsDetailslist.goodsName this.updata.nurseStationId = this.goodsDetailslist.nurseStationId if (this.goodDetailsLists.length == 1) { - this.goodDetailsLists.isActive = true - this.updata.img = this.goodDetailsLists.attributePitureUrl - this.updata.goodsAttributeName = this.goodDetailsLists.attributeDetailsName - this.updata.goodsPrice = this.goodDetailsLists.goodsPrice + this.goodDetailsLists[0].isActive = true + this.updata.img = this.goodDetailsLists[0].attributePitureUrl + this.updata.goodsAttributeName = this.goodDetailsLists[0].attributeDetailsName + this.updata.goodsPrice = this.goodDetailsLists[0].goodsPrice this.updata.goodsPrice = this.updata.goodsPrice.toFixed(2) - this.updata.attributeDetailsId = this.goodDetailsLists.attributeDetailsId - this.updata.goodsStock = this.goodDetailsLists.goodsStock - this.updata.goodsAttributeId = this.goodDetailsLists.goodsAttributeId - this.updata.goodsAttributeDetailsId = this.goodDetailsLists.attributeDetailsId - } else { + this.updata.attributeDetailsId = this.goodDetailsLists[0].attributeDetailsId + this.updata.goodsStock = this.goodDetailsLists[0].goodsStock + this.updata.goodsAttributeId = this.goodDetailsLists[0].goodsAttributeId + this.updata.goodsAttributeDetailsId = this.goodDetailsLists[0].attributeDetailsId + } else { var list = {} this.goodsDetailslist.goodAttributeDetailsLists.forEach(e => { if (e.goodsAttributeId == this.goodsAttributeId) { diff --git a/pages/modify/modify.vue b/pages/modify/modify.vue index 162004c..7e44337 100644 --- a/pages/modify/modify.vue +++ b/pages/modify/modify.vue @@ -190,10 +190,7 @@ showPicker() { this.$refs.cityPicker.show(); }, - //上传图片+提交信息 - informationinfo() { - //上传图片 - var that = this + data() { var that = this if (that.radio == 1) { that.$refs.uToast.show({ @@ -201,7 +198,7 @@ type: 'error' }) } else { - if (this.image) { + if (that.image) { uni.uploadFile({ url: baseurl + '/nurseApplet/uploadFile/uploadHeadPictureUrl', filePath: that.appPersonallist.headPictureUrl, @@ -266,6 +263,22 @@ } } }, + informationinfo() { + //上传图片 + var that = this + if (this.addresslength) { + if (this.addresslength.length > 2) { + that.data(); + } else { + that.$refs.uToast.show({ + title: '地址不完整,请选择到区级', + type: 'error' + }) + } + } else { + that.data(); + } + }, //上传头像 uploadImag() { var that = this; diff --git a/pages/modifyAddress/modifyAddress.vue b/pages/modifyAddress/modifyAddress.vue index 1405ed0..f1ec46e 100644 --- a/pages/modifyAddress/modifyAddress.vue +++ b/pages/modifyAddress/modifyAddress.vue @@ -192,48 +192,54 @@ } catch (e) {} }, // 保存按钮 - submit() { + data() { let that = this - if (this.addresslength.length > 2) { - if (that.isedit == true) { - addnursingStation(that.infolist).then(res => { - if (res.code == 200) { - that.$refs.uToast.show({ - title: '新增成功', - type: 'success' - }) - that.cencel(); - setTimeout(e => { - that.goodsList() - }, 1000) - } - }) + if (that.isedit == true) { + addnursingStation(that.infolist).then(res => { + if (res.code == 200) { + that.$refs.uToast.show({ + title: '新增成功', + type: 'success' + }) + that.cencel(); + setTimeout(e => { + that.goodsList() + }, 1000) + } + }) + } else { + updatenursingStation(that.infolist).then(res => { + if (res.code == 200) { + that.$refs.uToast.show({ + title: '修改成功', + type: 'success' + }) + that.cencel(); + setTimeout(e => { + that.goodsList() + }, 1000) + } else { + that.$refs.uToast.show({ + title: res.msg, + type: 'error' + }) + } + }) + } + }, + submit() { + if (this.addresslength) { + if (this.addresslength.length > 2) { + this.data(); } else { - updatenursingStation(that.infolist).then(res => { - if (res.code == 200) { - that.$refs.uToast.show({ - title: '修改成功', - type: 'success' - }) - that.cencel(); - setTimeout(e => { - that.goodsList() - }, 1000) - } else { - that.$refs.uToast.show({ - title: res.msg, - type: 'error' - }) - } + this.$refs.uToast.show({ + title: '地址不完整,请选择到区级', + type: 'error' }) } } else { - that.$refs.uToast.show({ - title: '地址不完整,请选择到区级', - type: 'error' - }) + this.data() } - }, // 修改按钮 updataxg(item) { diff --git a/pages/user/user.vue b/pages/user/user.vue index 136e8fc..d46cbe9 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -45,7 +45,7 @@ {{appPersonallist.provinceName}}-{{appPersonallist.cityName}}-{{appPersonallist.regionName}}-{{appPersonallist.streetName}} - + 区域: @@ -53,11 +53,6 @@ {{appPersonallist.provinceName}}-{{appPersonallist.cityName}}-{{appPersonallist.regionName}} - - - 区域: - - 地址: