yurong/pages/h5/bridge.vue

45 lines
679 B
Vue

<template>
<view class="page">
<view class="bridge-tip">正在返回小程序页面...</view>
</view>
</template>
<script>
export default {
data() {
return {
from: ''
}
},
onLoad(options) {
if (options && options.from) {
this.from = decodeURIComponent(options.from)
}
const target = this.from || '/pages/tabbar/index'
uni.switchTab({
url: target,
fail: () => {
uni.reLaunch({
url: target
})
}
})
},
methods: {}
}
</script>
<style>
.page {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.bridge-tip {
font-size: 28rpx;
color: #666;
}
</style>