detail.vue
982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<template>
<view class="configuation-detail-page">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<web-view :src="visualBoardUrl"></web-view>
</view>
</template>
<script>
import config from '../../../../config/baseUrl.js'
export default {
data(){
return {
visualBoardUrl:'',
}
},
async onLoad(e){
// 隐藏原生的tabbar
uni.hideTabBar();
const url = await this.createShareUrl({id:e.id})
this.visualBoardUrl = url
},
onShow(){
this.$nextTick(()=>{
uni.setNavigationBarTitle({
title:this.$t('menu.boardDetail')
})
})
},
methods:{
getUrl(id,userId){
return `/appPage/${id}/${userId}`
},
async createShareUrl(record){
const userInfo = uni.getStorageSync('userInfo')
const { id } = record;
return `${config.baseVisualUrl}${this.getUrl(id,userInfo.userId)}`;
}
}
}
</script>
<style lang="scss" scoped>
@import '../../static/configuration.scss';
</style>