ReedawFoodApp/pages/target/target.vue

54 lines
941 B
Vue

<template>
<view class="content ">
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {}
},
onTabItemTap(item) {
// 监听 Tab 点击,立即跳转外部小程序
uni.navigateToMiniProgram({
appId: "wxdd371c9267b7299b",
path: "/pages/index/index",
success(res) {
console.log('跳转成功');
if (res.cancel) {
uni.showToast({
title: "您已取消操作",
icon: 'none',
duration: 3000
})
setTimeout(function() {
uni.switchTab({
url: "/pages/index/index"
})
}, 500)
}
},
fail() {
uni.showToast({
title: "您已取消操作",
icon: 'none',
duration: 3000
})
setTimeout(function() {
uni.switchTab({
url: "/pages/index/index"
})
}, 500)
}
});
},
methods: {}
}
</script>
<style scoped lang="scss">
</style>