1、修复了企业版/个人版在第三方入口下的人脸与测评跳转问题。 2、新增 ThirdPartyChannel/OpenPlatformService 及上下文 thirdPartyContext,补充相关迁移。 3、调整 Analyze/Auth/Test 等接口与小程序入口逻辑。 Made-with: Cursor
45 lines
824 B
JavaScript
45 lines
824 B
JavaScript
// pages/test-select/index.js
|
|
const app = getApp()
|
|
|
|
Page({
|
|
data: {
|
|
permFace: true,
|
|
permMbti: true,
|
|
permPdp: true,
|
|
permDisc: true
|
|
},
|
|
|
|
onLoad(options) {
|
|
try {
|
|
require('../../utils/thirdPartyContext.js').ingestThirdPartyOnPageLoad(options || {}, app)
|
|
} catch (e) {}
|
|
this._syncPerms()
|
|
},
|
|
|
|
onShow() {
|
|
this._syncPerms()
|
|
},
|
|
|
|
_syncPerms() {
|
|
const p = app.globalData.enterprisePermissions
|
|
this.setData({
|
|
permFace: !p || p.face !== false,
|
|
permMbti: !p || p.mbti !== false,
|
|
permPdp: !p || p.pdp !== false,
|
|
permDisc: !p || p.disc !== false
|
|
})
|
|
},
|
|
|
|
goMBTI() {
|
|
wx.navigateTo({ url: '/pages/test/mbti' })
|
|
},
|
|
|
|
goPDP() {
|
|
wx.navigateTo({ url: '/pages/test/pdp' })
|
|
},
|
|
|
|
goDISC() {
|
|
wx.navigateTo({ url: '/pages/test/disc' })
|
|
}
|
|
})
|