详情 修改地址 退款

This commit is contained in:
shidongli 2023-11-08 13:55:17 +08:00
parent 7fc9dd2b0e
commit 1887182b95
4 changed files with 37 additions and 10 deletions

View File

@ -86,6 +86,7 @@
</view> </view>
<view class="address" v-if='userid'> <view class="address" v-if='userid'>
{{updata.receiveAddress}} {{updata.receiveAddress}}
<!-- {{updata.receiveAddress}} -->
</view> </view>
</span> </span>
<view class="namephone" v-else> <view class="namephone" v-else>
@ -719,20 +720,37 @@
// //
goodsList() { goodsList() {
goodPatientInfo(this.updata.patientId).then(res => { goodPatientInfo(this.updata.patientId).then(res => {
console.log(res)
// res.data.forEach(e => { // res.data.forEach(e => {
// e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e // e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
// .receiveAddress // .receiveAddress
// }) // })
if (res.data.length > 0) { if (res.data.length > 0) {
var list = res.data.filter(e => e.defaultAddressFlag == 1) var list = res.data.filter(e => e.defaultAddressFlag == 1)
console.log(list)
if (list.length >= 1) { if (list.length >= 1) {
this.updata.receiver = list[0].receiveName this.updata.receiver = list[0].receiveName
var areaName
if(res.data[0].areaName){
areaName=res.data[0].areaName
}else{
areaName=""
}
this.updata.receiveAddress = list[0].areaName + list[0].receiveAddress this.updata.receiveAddress = list[0].areaName + list[0].receiveAddress
this.updata.phone = list[0].receivePhone this.updata.phone = list[0].receivePhone
this.userid = list[0].id this.userid = list[0].id
} else { } else {
this.updata.receiver = res.data[0].receiveName this.updata.receiver = res.data[0].receiveName
this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress var areaName
if(res.data[0].areaName){
areaName=res.data[0].areaName
}else{
areaName=""
}
this.updata.receiveAddress =areaName + res.data[0].receiveAddress
this.updata.phone = res.data[0].receivePhone this.updata.phone = res.data[0].receivePhone
this.userid = res.data[0].id this.userid = res.data[0].id
} }

View File

@ -240,6 +240,7 @@
.app { .app {
padding: 0; padding: 0;
::v-deep .u-navbar-placeholder { ::v-deep .u-navbar-placeholder {
background-color: #F7F5F5; background-color: #F7F5F5;
z-index: 999; z-index: 999;
@ -304,6 +305,7 @@
.top { .top {
position: relative; position: relative;
width: 100%; width: 100%;
.fenlei { .fenlei {
width: 20%; width: 20%;
display: inline-block; display: inline-block;

View File

@ -7,7 +7,8 @@
{{item.receivePhone}} {{item.receivePhone}}
</view> </view>
<view class="item detail" @tap='goorder(item)'> <view class="item detail" @tap='goorder(item)'>
{{item.areaName}}{{item.receiveAddress}} <span v-if="item.areaName">{{item.areaName}}</span>
<span v-if="item.receiveAddress">{{item.receiveAddress}}</span>
</view> </view>
<view class="item detail" style="border: none;font-size: 32rpx;margin-top: 40rpx;"> <view class="item detail" style="border: none;font-size: 32rpx;margin-top: 40rpx;">
<view class="" style='width: 50%;display: inline-block;'> <view class="" style='width: 50%;display: inline-block;'>

View File

@ -121,10 +121,16 @@
}, },
}, },
onLoad(options) { onLoad(options) {
// console.log(options,'777') if(options.order){
this.baseurl = baseurl this.order = JSON.parse(options.order)
this.order.id = this.order.goodsOrderId
}else if(options.list){
this.order = JSON.parse(options.list) this.order = JSON.parse(options.list)
this.order.id = this.order.goodsOrderId this.order.id = this.order.goodsOrderId
}
// console.log(this.order,'777')
this.baseurl = baseurl
} }
} }
</script> </script>