新增分享,找回密码,实名认证,签约
This commit is contained in:
@@ -15,7 +15,8 @@ Page({
|
||||
address : '', // 地址
|
||||
addressId : '', // 地址id
|
||||
goodskData : '', // 数据
|
||||
amount : '', // 总金额
|
||||
amount : '', // 商品总金额
|
||||
total : '', // 支付金额
|
||||
freight : '', // 运费
|
||||
weight : '', // 重量
|
||||
},
|
||||
@@ -46,12 +47,12 @@ Page({
|
||||
qty: qty,
|
||||
address_id: this.data.addressId
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.setData({
|
||||
address : res.data.address,
|
||||
addressId : res.data.address.address_id,
|
||||
goodskData: res.data.detail,
|
||||
amount : res.data.amount,
|
||||
total : res.data.total,
|
||||
freight : res.data.freight,
|
||||
weight : res.data.weight
|
||||
})
|
||||
@@ -62,21 +63,20 @@ Page({
|
||||
* 商品确认下单
|
||||
*/
|
||||
buyTap() {
|
||||
wx.showLoading({
|
||||
title: '下单中...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.mall.placeTrue({
|
||||
goods_sku_id:this.data.skuId,
|
||||
qty: this.data.goodsQty,
|
||||
address_id: this.data.addressId
|
||||
goods_sku_id : this.data.skuId,
|
||||
qty : this.data.goodsQty,
|
||||
address_id : this.data.addressId
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
wx.redirectTo({
|
||||
url: '/pages/pay/index?params=' + encodeURIComponent(JSON.stringify(res.data))
|
||||
})
|
||||
}).catch(err =>{
|
||||
this.setData({
|
||||
disabled: false
|
||||
})
|
||||
}).catch(() =>{}).finally(() => {
|
||||
wx.hideLoading()
|
||||
})
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user