Commit c5eca039 authored by 罗超's avatar 罗超

更新

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