shish 2 лет назад
Родитель
Сommit
0d54150d5b
2 измененных файлов с 20 добавлено и 10 удалено
  1. 4 0
      ghsApp/src/pagesClient/member/detail.vue
  2. 16 10
      ghsApp/src/pagesClient/member/modify.vue

+ 4 - 0
ghsApp/src/pagesClient/member/detail.vue

@@ -46,6 +46,7 @@
                 <view>
                   <text v-if="!$util.isEmpty(userInfo.city)" style="margin-right:15upx;">{{userInfo.city}}</text>
                   {{userInfo.dist}}{{userInfo.address}}{{userInfo.floor}}
+                  <i class="iconfont iconbianji" style="font-size:23upx;margin-left:20upx;"></i>
                 </view>
             </view>
             <view>
@@ -231,6 +232,9 @@ export default {
       uni.setNavigationBarTitle({title:'修改地址'})
     }
   },
+  onShow(){
+    this.getUserDetail()
+  },
   methods: {
     changeWlFn() {
       let wlName = this.userInfo.wlName||''

+ 16 - 10
ghsApp/src/pagesClient/member/modify.vue

@@ -68,6 +68,9 @@ export default {
 		}
 	},
 	onLoad() {
+		if(this.option.name){
+			uni.setNavigationBarTitle({ title: this.option.name })
+		}
 	},
 	onShow() {
 
@@ -102,16 +105,19 @@ export default {
 			this.region.long = 0
 		},
 		confirmFn() {
-			let hostFn = this.option.id ? update : add
-			if (this.option.id) {
-				this.form.id = this.option.id
-			}
-			this.form = {...this.form,...this.region}
-			uni.showLoading({mask:true})
-			modifyAddress(this.form).then(res=>{
-				if(res.code == 1){
-					uni.hideLoading()
-				}
+			let that = this
+			that.$util.confirmModal({content:'确认修改?'},() => {
+				this.form.id = this.option.id ? this.option.id : 0
+				this.form = {...this.form,...this.region}
+				uni.showLoading({mask:true})
+				modifyAddress(this.form).then(res=>{
+					if(res.code == 1){
+						that.$msg('修改成功')
+						setTimeout(() => {
+							uni.navigateBack({})
+						}, 1200)
+					}
+				})
 			})
 		},
 		// 表单验证