zs 2 年之前
父节点
当前提交
038d0107a6
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      pagesMy/address/index.vue

+ 6 - 6
pagesMy/address/index.vue

@@ -6,7 +6,7 @@
 					<view class="list-scroll-view">
 						<radio-group @change="addressChange" v-if="type=='shopping'">
 							<label class="radio" v-for="(item, index) in list" :key="index">
-								<radio :value="item._id" :checked="item._id === address" />
+								<radio :value="item._id" :checked="item._id === address_id" />
 								<view class="radio_1">
 									<view class="name">
 										<text>{{item.name}}</text>
@@ -87,7 +87,7 @@
 			return {
 				// 购物选地址
 				type: '',
-				address: '',
+				address_id: '',
 				// 系统设置
 				config: {},
 				user: {},
@@ -104,7 +104,7 @@
 		onLoad: async function(e) {
 			const that = this;
 			that.$set(that, `type`, e && e.type || '');
-			that.$set(that, `address`, e && e.id || '');
+			that.$set(that, `address_id`, e && e.id || '');
 			that.searchConfig();
 			that.watchLogin();
 		},
@@ -161,7 +161,7 @@
 					if (that.id) {
 						for (let i = 0; i < list.length; i++) {
 							if (list[i]._id === that.id) {
-								that.address = that.id;
+								that.address_id = that.id;
 								break;
 							}
 						}
@@ -198,7 +198,7 @@
 				const that = this;
 				for (let i = 0; i < that.list.length; i++) {
 					if (that.list[i]._id === e.detail.value) {
-						that.address = e.detail.value;
+						that.address_id = e.detail.value;
 						break;
 					}
 				}
@@ -298,7 +298,7 @@
 						if (res.confirm) {
 							const arr = await that.$api(`/address/${e._id}`, 'DELETE');
 							if (arr.errcode == '0') {
-								if (that.address === e._id) uni.$emit("id", '')
+								if (that.address_id === e._id) uni.$emit("id", '')
 								uni.showToast({
 									title: '删除信息成功',
 									icon: 'none'