You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.1 KiB
JavaScript
71 lines
1.1 KiB
JavaScript
// pages/coupon/couponInfo.js
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function(options) {
|
|
wx.hideShareMenu();
|
|
var coupon = JSON.parse(options.content);
|
|
console.log(options.content);
|
|
this.setData({
|
|
coupon: coupon,
|
|
title: coupon.title,
|
|
startDate: coupon.startDate,
|
|
endDate: coupon.endDate
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady: function() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function() {
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
* 立即使用
|
|
*/
|
|
cy_once_use: function() {
|
|
var content = JSON.stringify(this.data.coupon);
|
|
var url = 'couponDetail?content=' + content;
|
|
wx.navigateTo({
|
|
url: url,
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 适用门店
|
|
*/
|
|
cy_use_store: function() {
|
|
var url = "../store/list";
|
|
wx.navigateTo({
|
|
url: url,
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 使用须知
|
|
*/
|
|
cy_use_info: function() {
|
|
var url = "couponDes?des=" + this.data.coupon.couponDesc;
|
|
wx.navigateTo({
|
|
url: url,
|
|
})
|
|
},
|
|
}) |