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