59 lines
1.1 KiB
Vue
59 lines
1.1 KiB
Vue
<template>
|
|
<view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import common from '../../common/common.js'
|
|
var _self;
|
|
var wv;
|
|
export default {
|
|
data() {
|
|
const token = '';
|
|
return {
|
|
token: ''
|
|
};
|
|
},
|
|
methods: {
|
|
createView(taskid) {
|
|
var url = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefault/' + taskid
|
|
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;
|
|
_self.createView(ldRes.taskId)
|
|
}
|
|
});
|
|
},
|
|
onUnload() {},
|
|
onShow() {},
|
|
components: {}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
.body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
text-align: center;
|
|
align-items: center;
|
|
padding-top: 50%;
|
|
}
|
|
</style>
|