Commit da91ba3f by 高淑倩

add: 激活规则_type=3

parent b3ddc610
......@@ -13,17 +13,21 @@ wxService.page({
type:''
},
onLoad:function(options){
if (options.type == 1){
onLoad(options) {
const { type } = options
if (type == 1){
wx.setNavigationBarTitle({
title: '积分规则',
title: '积分规则'
})
}else if (type == 3){
wx.setNavigationBarTitle({
title: '激活规则'
})
}
this.setData({
type: options.type
type: type
})
this.getRule(options.type)
this.getRule(type)
},
/**
......@@ -36,9 +40,8 @@ wxService.page({
//获取规则
getRule(TYPE){
wxService.get(`/merchant/brandRuleDescSet/get?type=${TYPE}&brandId=${app.globalData.brandId}`).then(res => {
console.log(res)
this.setData({
ruleImg: res.data.data.content
ruleImg: res.data && res.data.data && res.data.data.content || ''
})
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment