2025-03-13 22:14:06 +08:00

51 lines
1.1 KiB
Vue

<template></template>
<script>
export default {
data() {
return {
loginType: "",
};
},
onShow() {
let type = uni.getStorageSync("loginType");
console.log("type", type);
this.loginType = type;
let _this = this;
uni.showModal({
title: "即将打开“驿佳”小程序",
success: function (res) {
console.log("res", res);
if (res.confirm) {
if (_this.loginType === "android") {
_this.handleAppTomin(
"wxc4d4ae493d7e1e68",
"8085e1869fe52aa4715bb1a031446ace",
"",
"即将打开“驿佳”小程序"
);
} else if (_this.loginType === "min") {
uni.navigateToMiniProgram({
appId: "wxc4d4ae493d7e1e68",
envVersion: "release",
fail(err) {
uni.switchTab({
url: "/pages/home/index",
});
},
});
}
} else {
uni.switchTab({
url: "/pages/home/index",
});
}
},
});
},
};
</script>
<style scoped lang="less">
</style>