|
@@ -97,12 +97,13 @@ Page({
|
|
// title: `goods_id: ${this.data.goods_id}, card_no: ${this.data.card_no}`,
|
|
// title: `goods_id: ${this.data.goods_id}, card_no: ${this.data.card_no}`,
|
|
// duration: 2000
|
|
// duration: 2000
|
|
// })
|
|
// })
|
|
- const { goods_id, card_no } = this.data
|
|
|
|
|
|
+ const { goods_id, card_no, card_type } = this.data
|
|
if(!card_no){
|
|
if(!card_no){
|
|
app.showToast('卡号不能为空')
|
|
app.showToast('卡号不能为空')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
buyVGoods(goods_id,1,{ card_no,card_type }, (res) => {
|
|
buyVGoods(goods_id,1,{ card_no,card_type }, (res) => {
|
|
|
|
+ console.table({card_no,card_type})
|
|
// console.log('res',res) 成功回调
|
|
// console.log('res',res) 成功回调
|
|
}, (err) => {
|
|
}, (err) => {
|
|
// 失败回调
|
|
// 失败回调
|
|
@@ -122,10 +123,10 @@ Page({
|
|
onShow: function () {
|
|
onShow: function () {
|
|
if(!this.data.firstLoad) {
|
|
if(!this.data.firstLoad) {
|
|
const record = app.globalData.record || {}
|
|
const record = app.globalData.record || {}
|
|
- const { card_no = '' } = record
|
|
|
|
|
|
+ const { card_no = '', card_type = '' } = record
|
|
app.setFromSource(this.data.fromSource)
|
|
app.setFromSource(this.data.fromSource)
|
|
if (record) {
|
|
if (record) {
|
|
- this.setData({ card_no })
|
|
|
|
|
|
+ this.setData({ card_no, card_type })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|