Commit c5eca039 authored by 罗超's avatar 罗超

更新

parent d0dcf731
<template>
<view class="examList-box">
<view class="examList-import" @click="ImportInformation">
<view class="examList-import" @click="goUrlWebview">
<van-icon name="plus" />
<text @click.stop="goUrlWebview">导入考试信息</text>
<text>导入考试信息</text>
</view>
<block v-if="dataList && dataList.length>0">
<view class="examList activeOne" v-for="(item,index) in dataList" :key="index">
......@@ -99,9 +99,14 @@
let {
proxy
} = getCurrentInstance();
uni.setNavigationBarTitle({
title:'上传考试成绩'
})
let data = reactive({
userData:{},//用户信息
showPhone: false,
platform:'',
showLogin: false, //多次点击
show:false,
uploadParm: {
......@@ -121,6 +126,13 @@
loading: false,
});
wx.getSystemInfo({
success: (res) => {
// window | mac为pc端
// android | ios为手机端
data.platform=res.platform;
}
});
watch(
() => props.dataList,
(newValue, oldValue) => {
......@@ -130,6 +142,7 @@
let methods = {
// 跳web上传
goUrlWebview(){
if(data.platform=='window'||data.platform=='mac'){
data.userData = uni.getStorageSync('userInfo')
let dataContent = {
Uid:data.userData.Id,
......@@ -138,6 +151,9 @@
uni.navigateTo({
url: `/pages/webview/upload?exam=${encodeURIComponent(JSON.stringify(dataContent))}`
});
}else{
methods.ImportInformation()
}
},
examDetails(item){
uni.navigateTo({
......
<template>
<view>
<web-view :webview-styles="webviewStyles" :src="host" @message="Back" update-title="false"></web-view>
<web-view :webview-styles="webviewStyles" :src="host" @load="pageShowHandler" update-title="false"></web-view>
</view>
</template>
......@@ -24,6 +24,7 @@
export default {
setup(props) {
uni.showLoading()
let data = reactive({
host:'',
dataContent:{}
......@@ -34,6 +35,9 @@
delta: 1
})
},
pageShowHandler(e){
uni.hideLoading()
},
getUrl(){
uni.showLoading({
title:'加载中',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment