wx-starlock/pages/webview/webview.vue
范鹏 89812184e3 1. 修复webview显示bug
2. 修改昵称限制长度为50并完整显示
3. 修改管理员删除锁失败的提示
2024-09-03 16:19:35 +08:00

42 lines
826 B
Vue

<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
import env from '@/config/env'
export default {
data() {
return {
url: '',
env: null
}
},
onLoad: function (options) {
this.env = env[getApp().globalData.getEnvConfig()]
const officialAccounts = {
default: {
url: '/app/introduce',
name: '介绍'
},
userAgreement: {
url: '/app/userAgreement',
name: '用户协议'
},
privacy: {
url: '/app/privacy',
name: '隐私政策'
}
}
const item = officialAccounts[options?.type] || officialAccounts['default']
this.url = this.env.webviewBaseUrl + item['url']
console.log(this.url)
uni.setNavigationBarTitle({
title: item['name']
})
}
}
</script>