|
@@ -316,35 +316,44 @@
|
|
|
// })
|
|
|
// } else
|
|
|
console.log(uni.getStorageSync("token"), 'uni.getStorageSync("token")')
|
|
|
- if (uni.getStorageSync("token")) {
|
|
|
- let resd = uni.getStorageSync("examFlg") == 1 && uni.getStorageSync("examData").id == uni
|
|
|
- .getStorageSync("oldExamId") && uni.getStorageSync("user").loginName == uni.getStorageSync(
|
|
|
- "oldLoginName") && uni.getStorageSync("paper")
|
|
|
- if (this.isPaper || resd) {
|
|
|
- uni.showModal({
|
|
|
- title: '提醒',
|
|
|
- content: '还有未答完的试卷!',
|
|
|
- showCancel: false,
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/test/test?paper=true'
|
|
|
- });
|
|
|
- // alert('用户点击确认');
|
|
|
- } else if (res.cancel) {
|
|
|
- // alert('用户点击取消');
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- let res = uni.getStorageSync("user");
|
|
|
- let parmar = await this.getExam(uni.getStorageSync("examData").id, res.loginName, res
|
|
|
- .password);
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/test/test'
|
|
|
- });
|
|
|
+ if (uni.getStorageSync("user")) {
|
|
|
+ let res = uni.getStorageSync("user");
|
|
|
+ let exam=uni.getStorageSync("examData")
|
|
|
+ //考试类型不一样需要登录
|
|
|
+ if(exam.examType!=uni.getStorageSync("oldExamType"))
|
|
|
+ {
|
|
|
+ this.$refs.popup.open();
|
|
|
+ }else{
|
|
|
+ this.phoneLogin({...res,examId:exam.id});
|
|
|
}
|
|
|
+ // let resd = uni.getStorageSync("examFlg") == 1 && uni.getStorageSync("examData").id == uni
|
|
|
+ // .getStorageSync("oldExamId") && uni.getStorageSync("user").loginName == uni.getStorageSync(
|
|
|
+ // "oldLoginName") && uni.getStorageSync("paper")
|
|
|
+ // if (this.isPaper || resd) {
|
|
|
+ // uni.showModal({
|
|
|
+ // title: '提醒',
|
|
|
+ // content: '还有未答完的试卷!',
|
|
|
+ // showCancel: false,
|
|
|
+ // success: function(res) {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/test/test?paper=true'
|
|
|
+ // });
|
|
|
+ // // alert('用户点击确认');
|
|
|
+ // } else if (res.cancel) {
|
|
|
+ // // alert('用户点击取消');
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // let res = uni.getStorageSync("user");
|
|
|
+ // let parmar = await this.getExam(uni.getStorageSync("examData").id, res.loginName, res
|
|
|
+ // .password);
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/test/test'
|
|
|
+ // });
|
|
|
+ // }
|
|
|
} else {
|
|
|
this.$refs.popup.open();
|
|
|
}
|