支持设置默认企业

This commit is contained in:
Ghost
2026-03-24 10:07:00 +08:00
parent 79512b2fc6
commit 41f016b1ab
22 changed files with 594 additions and 166 deletions

View File

@@ -8,6 +8,8 @@
* 接收方(落地页 onLoad options直接读 options.uid / options.eid
*/
const { getEffectiveEnterpriseId } = require('./enterpriseContext.js')
function getApp_() {
try { return getApp() } catch (e) { return null }
}
@@ -24,9 +26,7 @@ function buildShareQuery() {
const parts = []
if (uid) parts.push('uid=' + uid)
if (scope === 'enterprise') {
const eid = (app && app.globalData && app.globalData.enterpriseIdFromScene)
|| userInfo.enterpriseId
|| ''
const eid = getEffectiveEnterpriseId() || ''
if (eid) parts.push('eid=' + eid)
}
return parts.join('&')