会员模块
This commit is contained in:
77
pages/mall/details/index.js
Normal file
77
pages/mall/details/index.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
goodsData : '', //详情
|
||||
sign : '', //签收
|
||||
express : '', //物流
|
||||
orderNo : '' //订单号
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
orderNo: options.orderNo
|
||||
})
|
||||
|
||||
// 订单详情
|
||||
this.goodsInfo(options.orderNo);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
|
||||
// 获取订单详情
|
||||
goodsInfo(orderNo) {
|
||||
wx.$api.user.goodsDet(orderNo).then(res => {
|
||||
this.setData({
|
||||
goodsData : res.data,
|
||||
sign : res.data.can.sign,
|
||||
express : res.data.express
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
// 复制订单号
|
||||
copyUrl(val) {
|
||||
wx.setClipboardData({
|
||||
data: val.currentTarget.dataset.no,
|
||||
success: () => {
|
||||
wx.showToast({
|
||||
title: "复制成功",
|
||||
icon : "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 订单签收
|
||||
signClick() {
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : '是否签收',
|
||||
success : res=> {
|
||||
if (res.confirm) {
|
||||
wx.$api.user.goodsSign(this.data.orderNo).then(res => {
|
||||
wx.showToast({
|
||||
title:'签收成功',
|
||||
icon:'none'
|
||||
})
|
||||
wx.navigateBack()
|
||||
}).catch(err => {})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user