初始化代码
This commit is contained in:
51
uniapp/uni-app/home/pages/monitor/detail.vue
Normal file
51
uniapp/uni-app/home/pages/monitor/detail.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<view class="home-monitor-detail" v-if="url">
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
} from "vuex"
|
||||
import siteInfo from '../../../siteinfo.js';
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
options: {},
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
computed: mapState({
|
||||
primaryColor: state => state.config.configInfo.primaryColor,
|
||||
subColor: state => state.config.configInfo.subColor,
|
||||
configInfo: state => state.config.configInfo,
|
||||
userInfo: state => state.user.userInfo,
|
||||
}),
|
||||
onLoad(options) {
|
||||
this.$util.showLoading()
|
||||
this.options = options
|
||||
this.initIndex()
|
||||
},
|
||||
methods: {
|
||||
initIndex() {
|
||||
let {
|
||||
id
|
||||
} = this.options
|
||||
let {
|
||||
siteroot,
|
||||
uniacid
|
||||
} = siteInfo
|
||||
let href = siteroot.split('/index.php')[0]
|
||||
this.url = `${href}/demo/index.html?${id}&${uniacid}`
|
||||
// this.url = `${href}/monitor/index.html?${id}&${uniacid}`
|
||||
this.$util.hideAll()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
Reference in New Issue
Block a user