Files
chazhi/src/pages/webview/webview.vue
wangxiaowei 434fc0f041 调试接口
2025-12-25 00:05:32 +08:00

36 lines
934 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page -->
<route lang="jsonc" type="page">{
"layout": "tabbar",
"style": {
// 'custom' 表示开启自定义导航栏,默认 'default'
"navigationStyle": "custom"
}
}</route>
<template>
<view class="">
<web-view :src="src"></web-view>
</view>
</template>
<script lang="ts" setup>
const src = ref<string>('')
onLoad((args) => {
switch (args.type) {
case 'service':
// 服务协议
src.value = 'https://76458.com/yhxy.html'
break
case 'privacy':
// 隐私政策
src.value = 'https://76458.com/yszc.html'
break
default:
break
}
// if (options.type) {
// src.value = decodeURIComponent(options.url as string)
// }
})
</script>