更新确认地址信息
This commit is contained in:
@@ -4,16 +4,19 @@ Page({
|
||||
addressList: [],
|
||||
info: '',
|
||||
remark: '',
|
||||
crowdfund_id: ''
|
||||
crowdfund_id: '',
|
||||
addressDel: {},
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
wx.$api.companyModule.crowdfundsCreat(e.crowdfund_item_id).then(res => {
|
||||
console.log(res);
|
||||
if (res.address.length > 0) {
|
||||
this.setData({
|
||||
address_id: res.address[0].address_id,
|
||||
addressList: res.address,
|
||||
addressDel: res.address[0]
|
||||
})
|
||||
console.log(res);
|
||||
console.log(this.data.addressDel)
|
||||
}
|
||||
this.setData({
|
||||
crowdfund_item_id: e.crowdfund_item_id,
|
||||
@@ -25,6 +28,9 @@ Page({
|
||||
wx.navigateBack({})
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
console.log(this.data.addressDel)
|
||||
},
|
||||
input(e) {
|
||||
this.setData({
|
||||
remark: e.detail.value
|
||||
@@ -35,7 +41,7 @@ Page({
|
||||
title: '创建中...',
|
||||
mask: 'true'
|
||||
})
|
||||
wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.address_id, this.data.remark).then(res => {
|
||||
wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.addressDel.address_id, this.data.remark).then(res => {
|
||||
var data = {};
|
||||
if (res.trade_no) {
|
||||
wx.login({
|
||||
@@ -76,6 +82,12 @@ Page({
|
||||
}).catch(res => {
|
||||
wx.navigateBack({})
|
||||
})
|
||||
},
|
||||
// 跳转到地址列表和新增地址页面
|
||||
goAddress(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/mall/mall_address/mall_address?type=selectAddress',
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
@@ -1,10 +1,17 @@
|
||||
<!-- 地址信息 -->
|
||||
<view class="besure_address">
|
||||
<view class="besure_address" wx:if='{{addressDel}}' catchtap="goAddress">
|
||||
<view style="flex:1;">
|
||||
<view class="userinfo">张冬雪 14745798066 <span class="type"> 学校 </span> <span class="moren"> 默认 </span></view>
|
||||
<view class="des">黑龙江省哈尔滨市南岗区汉水路451号省科学院研究所7楼</view>
|
||||
<view class="userinfo">{{addressDel.name}} {{addressDel.mobile}} <span class="type" wx:if='{{false}}'> 学校 </span>
|
||||
<span class="moren"> 默认 </span></view>
|
||||
<view class="des">{{addressDel.address}}</view>
|
||||
</view>
|
||||
<image class="icon_right" src="/static/images/icon_right.png" mode="widthFix" style="width:12rpx;"></image>
|
||||
<image class="arrows-right" src="/static/mall_icon/address_back.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view wx:else class="besure_address jc_start" catchtap="goAddress">
|
||||
添加收货地址
|
||||
<image class="icon_right " src="/static/images/icon_right.png" mode="widthFix" style="width:13rpx;"></image>
|
||||
<image class="arrows-right" src="/static/mall_icon/address_back.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<!-- 商品信息 -->
|
||||
<view class="besure_goods">
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.besure_bottom .left{
|
||||
.besure_bottom .left {
|
||||
width: 160rpx;
|
||||
}
|
||||
|
||||
.besure_now_act .left span {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
@@ -58,7 +59,8 @@
|
||||
border-top: solid 1rpx #f7f7f7;
|
||||
}
|
||||
|
||||
.besure_bottom input , .besure_bottom>span {
|
||||
.besure_bottom input,
|
||||
.besure_bottom>span {
|
||||
flex: 1;
|
||||
/* margin-left: 30rpx; */
|
||||
padding-top: 4rpx;
|
||||
@@ -138,6 +140,7 @@
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.besure_address .userinfo {
|
||||
@@ -179,4 +182,47 @@
|
||||
.besure_address .des {
|
||||
font-size: 24rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.arrows-right {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.order-add-address {
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order-add-address navigator {
|
||||
display: inline-block;
|
||||
background: #e92344;
|
||||
color: white;
|
||||
line-height: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.arrows-add {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.arrows-add-img {
|
||||
width: 30rpx;
|
||||
vertical-align: middle;
|
||||
margin: -8rpx 6rpx 0 0;
|
||||
}
|
||||
|
||||
.arrows-add {
|
||||
width: 100%;
|
||||
background-color: red;
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
.jc_start {
|
||||
justify-content: start;
|
||||
}
|
||||
Reference in New Issue
Block a user