更新确认地址信息

This commit is contained in:
zdx
2020-12-28 14:00:13 +08:00
parent 637e63b224
commit 734d3a9377
14 changed files with 169 additions and 74 deletions

View File

@@ -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',
})
}
})