<template>
|
<view class="content">
|
<web-view :src="url"></web-view>
|
</view>
|
</template>
|
<script>
|
import { ref, reactive, toRefs, onMounted, getCurrentInstance, nextTick } from "vue";
|
import { useBasicInfoStore } from "../../store/basicInfo"
|
import configInfo from '../../config';
|
|
export default {
|
components: {},
|
setup() {
|
const userStore = useBasicInfoStore()
|
const { proxy } = getCurrentInstance();
|
const state = reactive({
|
url: ""
|
})
|
|
onMounted(() => {
|
Init();
|
});
|
|
const Init = () => {
|
uni.setNavigationBarTitle({
|
title: userStore.testTitle + "(" + userStore.questionType + ")"
|
});
|
|
state.url = configInfo.questionhost +
|
"token=" + userStore.userinfo.token +
|
"&paperid=" + userStore.paperId +
|
"&type=" + userStore.questionType
|
|
console.log(state.url,9999)
|
}
|
|
|
|
|
return { ...toRefs(state), userStore, }
|
}
|
}
|
|
|
|
</script>
|
|
<style scoped lang="scss">
|
.center {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
//justify-content: center;
|
}
|
|
.content {
|
@extend .center;
|
background-color: #f5f5f5;
|
height: 100vh;
|
width: 100%;
|
}
|
</style>
|