diff --git a/gasStation-uni/pagesHome/Address/Address.vue b/gasStation-uni/pagesHome/Address/Address.vue index f111ca8d0..c6c26d178 100644 --- a/gasStation-uni/pagesHome/Address/Address.vue +++ b/gasStation-uni/pagesHome/Address/Address.vue @@ -7,29 +7,33 @@ - - + + - {{item.address || '小王'}} - {{item.name || '先生'}} - {{item.mobile || '15426886361'}} + {{item.name || '--'}} + 先生 + 女士 + {{item.mobile || '--'}} - + + + 编辑 - - + + 删除 - + @@ -61,13 +65,39 @@ }, methods: { + chooseDefault(data,checked) { + if (checked) { + data.ifDefault = 1 + }else{ + data.ifDefault = 2 + } + request({ + url: '/business/userManager/mtUserExpressAddress', + method: 'put', + data:data + }).then((res) => { + if (res.code == 200) { + this.getList() + console.log(res,81); + } + }) + }, getList() { request({ - url: 'business/userManager/mtUserExpressAddress/getList', + url: '/business/userManager/mtUserExpressAddress/getList', method: 'get', }).then((res) => { if (res.code == 200) { this.dataList = res.data + this.dataList.forEach(item => { + item.checked = false + if (item.ifDefault == 1) { + item.checked = true + } + this.$set(item, 'checked', item.checked); // 正确更新响应式属性 + }) + console.log(res,this.dataList,98); + this.$forceUpdate() } }) }, @@ -84,6 +114,18 @@ url: '/pagesHome/editress/editress' }) }, + // 删除 + delInfo(data){ + request({ + url: '/business/userManager/mtUserExpressAddress', + method: 'delete', + params:{id:data.id} + }).then((res) => { + if (res.code == 200) { + this.getList() + } + }) + }, choose(data) { //传值 uni.$on('unChooseAddr', function() { diff --git a/gasStation-uni/pagesHome/editress/editress.vue b/gasStation-uni/pagesHome/editress/editress.vue index 38f708ddd..2b59d0cdc 100644 --- a/gasStation-uni/pagesHome/editress/editress.vue +++ b/gasStation-uni/pagesHome/editress/editress.vue @@ -12,13 +12,13 @@ 性别 - - - 先生 - 女士 + + + + - + 电话 @@ -52,12 +52,12 @@ title: '', value: true, dataForm: { - id: null, name: '', mobile: '', address: '', - ifDefault: '', fullAddress: '', + sex: "", + storeId: uni.getStorageSync("storeId") } } @@ -75,6 +75,7 @@ } }) uni.$emit('unAddressInfo') + console.log(this.dataForm,78); }, components: { @@ -87,13 +88,8 @@ uni.navigateBack() }, goedit() { - if (this.value) { - this.dataForm.ifDefault = 1 - } else { - this.dataForm.ifDefault = 2 - } - let url = 'business/userManager/mtUserExpressAddress' - if (this.dataForm.id != null) { + let url = '/business/userManager/mtUserExpressAddress' + if (this.dataForm.id) { request({ url: url, method: 'put', @@ -123,7 +119,6 @@ }) } - console.log("123123", this.dataForm) } } } diff --git a/gasStation-uni/pagesHome/order/order.vue b/gasStation-uni/pagesHome/order/order.vue index 5841f00a7..e78db4fda 100644 --- a/gasStation-uni/pagesHome/order/order.vue +++ b/gasStation-uni/pagesHome/order/order.vue @@ -13,7 +13,7 @@ --> - + + + + + + @@ -64,7 +69,7 @@ storeId: '', status: 0, page: 1, - pageSize: 10 + pageSize: 1000 }, title: '', tabindex: 0, @@ -190,7 +195,7 @@ this.tabindex = index console.log(index); this.cardsList = [] - this.query.useStatus = index + this.query.status = index this.getGiftRecords() @@ -213,7 +218,6 @@ if (res.code == 200) { this.cardsList = res.data.records } - console.log(res.data, this.cardsList, 226); }) } }