Files
Smart-Farm/uniapp/uni-app/home/pages/monitor/detail.vue
2025-12-22 17:13:05 +08:00

52 lines
1016 B
Vue

<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>