Commit da91ba3f by 高淑倩

add: 激活规则_type=3

parent b3ddc610
...@@ -13,17 +13,21 @@ wxService.page({ ...@@ -13,17 +13,21 @@ wxService.page({
type:'' type:''
}, },
onLoad:function(options){ onLoad(options) {
if (options.type == 1){ const { type } = options
if (type == 1){
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '积分规则', title: '积分规则'
})
}else if (type == 3){
wx.setNavigationBarTitle({
title: '激活规则'
}) })
} }
this.setData({ this.setData({
type: options.type type: type
}) })
this.getRule(options.type) this.getRule(type)
}, },
/** /**
...@@ -36,9 +40,8 @@ wxService.page({ ...@@ -36,9 +40,8 @@ wxService.page({
//获取规则 //获取规则
getRule(TYPE){ getRule(TYPE){
wxService.get(`/merchant/brandRuleDescSet/get?type=${TYPE}&brandId=${app.globalData.brandId}`).then(res => { wxService.get(`/merchant/brandRuleDescSet/get?type=${TYPE}&brandId=${app.globalData.brandId}`).then(res => {
console.log(res)
this.setData({ 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