Commit 958a9aac authored by lg's avatar lg

chore: appId为wxab14ac8f684ad962的都为半屏拉起

parent f02b7703
......@@ -66,7 +66,7 @@
}
},
"requiredBackgroundModes" : [ "share" ],
"embeddedAppIdList": ["wx4205ec55b793245e"]
"embeddedAppIdList": ["wx4205ec55b793245e", "wxab14ac8f684ad962"]
},
"mp-alipay" : {
"usingComponents" : true
......
// 导入全局store
import { useGlobalStore } from "../stores/global";
import {useGlobalStore} from "../stores/global";
// 跳转类型枚举
export const JumpType = {
......@@ -8,6 +8,11 @@ export const JumpType = {
H5: 3, // https 网络连接跳转
};
const OPEN_EMBEDDED_APPS = [
"wx4205ec55b793245e", // 星妈优选
"wxab14ac8f684ad962",
]
/**
* 通用跳转方法
* @param {Object} options
......@@ -15,7 +20,7 @@ export const JumpType = {
* @param {string} options.url 跳转地址(页面路径/小程序路径/https链接)
* @param {Object} [options.extra] 额外参数(如 appId、extraData 等)
*/
export function jump({ type, url, extra = {} }) {
export function jump({type, url, extra = {}}) {
switch (type) {
case JumpType.INNER:
try {
......@@ -68,7 +73,7 @@ export function jump({ type, url, extra = {} }) {
console.log("jumpParams:", jumpParams);
if (extra.embedded || jumpParams.appId === 'wx4205ec55b793245e') { // 星妈优选的小程序都为半屏拉起
if (extra.embedded || OPEN_EMBEDDED_APPS.includes(jumpParams.appId)) {
console.log('半屏拉起', jumpParams)
uni.openEmbeddedMiniProgram(jumpParams);
} else {
......
......@@ -528,8 +528,11 @@ const onProgressBarError = (e) => {
function testGoto195() {
return
jump({
type: JumpType.INNER,
url: '/pages/activity/1015/home'
type: JumpType.MINI,
url: '/pages/my/my',
extra: {
appId: 'wxab14ac8f684ad962',
}
})
}
......
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