Files
douhuo-h5/pages/webWechat/index.vue
2023-05-15 13:18:38 +08:00

41 lines
1.0 KiB
Vue

<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
import { Openid } from '@/apis/interfaces/index'
export default {
data() {
return {
url: '' // 外部链接地址
}
},
onLoad(options) {
// 获取微信code
Openid({
code: options.code
}).then(res => {
this.$store.commit('setOpenid', res.openid)
this.$Router.replace({name: 'Index'})
// 预约单页面
// if(options.type == 'make') {
// this.$Router.replace({name: 'sheetPay', params: {id: options.id}})
// return
// }
// 咨询单与补差价页面
// this.$Router.replace({name: 'sheetPayment', params: {id: options.id, style: options.style, price: options.price}})
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
}
</script>
<style>
</style>