描述:优惠卷

This commit is contained in:
SelfRidicule 2024-03-05 15:29:46 +08:00
parent 1fefce9a97
commit a1f0a7ebf0
2 changed files with 10 additions and 6 deletions

View File

@ -25,8 +25,10 @@ Page({
*/
onLoad(options) {
let _this = this;
console.log('onLoad options', typeof options.couponId);
_this.setData({
...options,
type: options.type,
couponId: parseInt(options.couponId),
userDetail: wx.getStorageSync('user')
})
// 获取优惠卷
@ -61,7 +63,7 @@ Page({
let notUseList = res.data.filter(item => item.isDisable)
dataList = useList.concat(notUseList)
_this.setData({
dataList
dataList,
})
})
},
@ -82,7 +84,7 @@ Page({
let pages = getCurrentPages(); //获取page
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
prevPage.setData({
couponId: _this.couponId
couponId: _this.data.couponId
})
wx.navigateBack();
},

View File

@ -28,6 +28,7 @@ Page({
bannerList: [],
room: {},
userData: {},
couponId : '',
},
/**
@ -67,8 +68,9 @@ Page({
// 跳转-优惠卷
jumpMeetingCoupon() {
let _this = this;
wx.navigateTo({
url: "/pages/meeting/meetingRoom/meetingCoupon/meetingCoupon?type=1",
url: "/pages/meeting/meetingRoom/meetingCoupon/meetingCoupon?type=1&couponId=" + _this.data.couponId,
})
},
@ -105,8 +107,8 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow() {
onShow(options) {
console.log('onShow' , options);
},
/**