app_evaluating/pages/evaluation/missionDetail.vue

72 lines
1.7 KiB
Vue
Raw Normal View History

2023-02-07 19:27:48 +08:00
<template>
<view>
<web-view :src="webUrl" :webview-styles="webstyle"></web-view>
</view>
</template>
<script>
import common from '../../common/common.js'
var _self;
var wv;
export default {
data() {
const token = '';
return {
token: '',
webUrl: "",
webstyle: {}
};
},
methods: {
// createView(taskid, rid) {
// console.log(rid);
// var url = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaultresult/' + taskid + '/' + rid
// wv = plus.webview.create(url, "custom-webview", {
// top: uni.getSystemInfoSync().statusBarHeight + 44,
// bottom: '0px',
// additionalHttpHeaders: {
// token: _self.token
// }
// })
// // wv.loadURL(url)
// var currentWebview = this.$mp.page.$getAppWebview()
// currentWebview.append(wv);
// setTimeout(function() {}, 1000);
// }
},
onLoad(ldRes) {
_self = this;
uni.getStorage({
key: 'appToken',
success: res => {
_self.token = res.data;
// console.log(ldRes.taskId + '===' + ldRes.rid);
// // #ifdef APP-PLUS
// _self.createView(ldRes.taskId, ldRes.rid)
// // #endif
// // #ifdef H5
2023-02-07 21:47:50 +08:00
_self.webUrl = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaultresult-release/' +
ldRes.taskId + '/' + ldRes.rid + "?token=" + _self.token;
console.log(_self.webUrl)
2023-02-07 19:27:48 +08:00
// // #endif
}
});
},
onUnload() {},
onShow() {},
components: {}
};
</script>
<style>
.body {
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
align-items: center;
padding-top: 50%;
}
2020-01-09 16:29:09 +08:00
</style>