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.

47 lines
1.1 KiB
JavaScript

// pages/couponCenter/activeRule.js
const card = require("../../utils/card.js")
Page({
/**
* 页面的初始数据
*/
data: {
},
onLoad: function (options) {
var that = this;
card.memberShareRule(function (success) {
var result = success.data;
if (result.status == 1) {
that.setData({
description: result.data.description,
startDate: result.data.startDate,
endDate: result.data.endDate,
totalAwardCount: result.data.totalAwardCount,
})
//积分
if (result.data.awardType == 0) {
that.setData({
content: "送 " + result.data.pointValue + " 积分"
})
}
//优惠券
else if (result.data.awardType == 1) {
that.setData({
content: "送卡包 " + result.data.couponPacketName + " 一张"
})
}
} else {
util.showWaring("暂无活动规则");
}
}, function fail(err) {
console.log(err);
wx.showToast({
title: "网络连接不稳定, 请重试",
icon: "none"
})
})
}
})