修改收货地址不能再添加默认收货地址问题

msb_beta
ch 3 years ago
parent 37899319b8
commit 0d8830d8a3

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>马士兵严选</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.e8312dde.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.180a8da6.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 14:12:18
* @LastEditors: ch
* @LastEditTime: 2022-04-22 19:04:06
* @LastEditTime: 2022-04-22 21:32:46
* @Description: file content
-->
<template>
@ -25,9 +25,10 @@
</template>
</UiCell>
</view>
{{address.isDefault}}
<UiCell class="form--item form--item__last" title="设为默认地址" >
<template slot="right-icon">
<u-switch space="2" v-model="address.isDefault" activeColor="#FF875B" inactiveColor="#F3F3F3" />
<u-switch v-model="isDefault" activeColor="#FF875B" inactiveColor="#F3F3F3" />
</template>
</UiCell>
<UiButton class="saveBtn" type="solid" size="max" @click="save"></UiButton>
@ -46,11 +47,14 @@ export default {
data (){
return {
address : {},
isDefault : false,
city : []
}
},
onShow(){
this.address.isDefault = this.$Route.query.first === 'true' ? true : false
if(this.$Route.query.first === 'true'){
this.isDefault = true;
}
},
methods: {
async save(){
@ -79,6 +83,7 @@ export default {
const province = this.city[0].name;
const {error} = await ApiPostAddress({
...this.address,
isDefault : this.isDefault,
province,provinceCode,areaCode,area,city,cityCode
});
if(error){

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 13:54:15
* @LastEditors: ch
* @LastEditTime: 2022-04-22 21:08:34
* @LastEditTime: 2022-04-22 21:23:54
* @Description: file content
-->
<template>
@ -99,6 +99,7 @@ export default {
<style lang="scss" scoped>
page{
background: $color-grey1;
padding-bottom: 200rpx;
}
.address{
background: $color-grey0;

Loading…
Cancel
Save