Commit c8cb8124 authored by youjie's avatar youjie

no message

parent 5c25a3c0
......@@ -280,6 +280,7 @@
onMounted,
} from "vue";
import { GetBankTypeList,GetAppQuestionStatic,GetAppBankStatic } from "../../api/exam";
import { VersionUpdate } from '../../utils/index.js'
export default {
props: {},
setup(props, ctx) {
......@@ -296,6 +297,7 @@
JoinArr:[] //测评数据
});
let methods = {
VersionUpdate,
//获取等级
async getLevels(){
let res = await GetBankTypeList({});
......@@ -379,6 +381,7 @@
};
let that = methods;
onMounted(() => {
that.VersionUpdate()
});
return {
...toRefs(data),
......
......@@ -166,7 +166,7 @@
getSweepCode
} from '../../api/index.js'
import {
getImageColor
getImageColor,VersionUpdate
} from '../../utils/index.js'
import indexassembly from './components/indexassembly.vue'
import navbar from '../../components/navbar.vue'
......@@ -205,6 +205,7 @@
});
let methods = {
VersionUpdate,
goTongji() {
//console.log("SurveyObj",data.SurveyObj);
this.jumpPage('/pages/study/questionNaire?ActivitySurveyId='+data.SurveyObj.ActivitySurveyId+"&ActivitySurveyGuestId="+data.SurveyObj.ActivitySurveyGuestId);
......@@ -382,9 +383,9 @@
}
};
let that = methods;
onMounted(() => {
that.VersionUpdate()
});
return {
...toRefs(data),
......
......@@ -175,6 +175,7 @@
inject,
} from "vue";
import bottom from "../../components/bottom";
import { VersionUpdate } from '../../utils/index.js'
export default {
components: {
bottom,
......@@ -191,6 +192,7 @@
});
const methods = {
VersionUpdate,
jumpPage(url) {
uni.navigateTo({
......@@ -225,6 +227,9 @@
},
};
let that = methods;
onMounted(() => {
that.VersionUpdate()
});
return {
...toRefs(data),
...methods
......
......@@ -515,6 +515,7 @@
import indexNo from './components/indexNo.vue'
import carousel from './components/vear-carousel/vear-carousel.vue'
import bottom from '../../components/bottom.vue'
import { VersionUpdate } from '../../utils/index.js'
import {
ref,
reactive,
......@@ -555,6 +556,7 @@
checkIndex: 0
})
let methods = {
VersionUpdate,
enlarge(id) {
// 全屏
data.videoContext = uni.createVideoContext(id);
......@@ -747,6 +749,7 @@
}
}
onMounted(() => {
that.VersionUpdate()
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
})
let that = methods;
......
......@@ -76,6 +76,7 @@
<script>
import Item from "./timeTable-item.vue";
import {
ref,
reactive,
......@@ -96,6 +97,7 @@
import {
getStundentPlanStatistical
} from "../../api/index";
import { VersionUpdate } from '../../utils/index.js'
export default {
name: "",
props: {},
......@@ -226,6 +228,7 @@
timer: null, //防抖
});
let methods = {
VersionUpdate,
// 获取当天数据
async getData() {
if(data.msg.ClassId<=0) return
......@@ -415,6 +418,7 @@
}
};
onMounted(() => {
that.VersionUpdate()
getcalendar(new Date().getFullYear(), new Date().getMonth() + 1);
let today = calendar.value.find((e) => {
return e.isToday === 1;
......
//定义更新方法
export let VersionUpdate = () =>{
// 判断应用的 getUpdateManager 是否在当前版本可用
if (uni.canIUse('getUpdateManager')) {
const updateManager = uni.getUpdateManager()
// 向小程序后台请求完新版本信息
updateManager.onCheckForUpdate(function(res) {
console.log(res.hasUpdate);
if (res.hasUpdate) {
//小程序有新版本,静默下载新版本,新版本下载完成
updateManager.onUpdateReady(function() {
//模态弹窗(确认、取消)
uni.showModal({
title: '更新提示',
content: '小程序已发布新版本,是否重启?',
success: function(res) {
//用户点击确定
if (res.confirm) {
//当新版本下载完成,调用该方法会强制当前小程序应用上新版本并重启
updateManager.applyUpdate()
} //用户点击取消
else if (res.cancel) {
//强制用户更新,弹出第二次弹窗
uni.showModal({
title: '提示',
content: '小程序已发布新版本,是否重启',
showCancel: false, //隐藏取消按钮
success: function(res) {
//第二次提示后,强制更新
if (res.confirm) {
// 当新版本下载完成,调用该方法会强制当前小程序应用上新版本并重启
updateManager.applyUpdate()
}
}
})
}
}
})
})
// 当新版本下载失败
updateManager.onUpdateFailed(function() {
uni.showModal({
title: '提示',
content: '请您删除当前小程序,重新打开小程序',
})
})
}
})
} else {
// 提示用户在最新版本的客户端上体验
uni.showModal({
title: '温馨提示',
content: '当前微信版本过低,可能无法使用该功能,请升级到最新版本后重试。'
})
}
}
//脱敏
export let desensitization = (str, beginLen, endLen) => {
let len = str.length;
......
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