Commit acab072c by zhangxw

AI趣练区分场景显示入口

1 parent 7d6a0a4a
...@@ -14,13 +14,6 @@ Page({ ...@@ -14,13 +14,6 @@ Page({
tips: '数字化保险 · 数字化轻改 · 数字化二手车', tips: '数字化保险 · 数字化轻改 · 数字化二手车',
url: '/packageStudy/pages/sceneMarket/index/index', url: '/packageStudy/pages/sceneMarket/index/index',
trackingCode: 'regional-assistant-scene-market' trackingCode: 'regional-assistant-scene-market'
}, {
icon: 'AI-funpractice',
label: 'AI趣练',
tips: '基于AI模拟对练,助你成为营销大师',
url: '/packageStudy/pages/aiCheck/start/start',
trackingCode: 'regional-assistant-ai-funpractice',
customClass: 'custom-item'
}] }]
}, },
...@@ -28,7 +21,20 @@ Page({ ...@@ -28,7 +21,20 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let userInfo = wx.$util.getUserInfo()
let { itemList } = this.data
console.log(itemList)
if (userInfo?.sceneType == 0 && itemList.every(item => item.label != 'AI趣练')) {
itemList.push({
icon: 'AI-funpractice',
label: 'AI趣练',
tips: '基于AI模拟对练,助你成为营销大师',
url: '/packageStudy/pages/aiCheck/start/start',
trackingCode: 'regional-assistant-ai-funpractice',
customClass: 'custom-item'
})
}
this.setData({itemList})
}, },
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!