开始考试按钮显示逻辑问题
This commit is contained in:
parent
1c0b463c24
commit
98d6495b21
|
@ -55,12 +55,17 @@ Page({
|
|||
|
||||
let ksdata = res.data
|
||||
ksdata['testdisable'] = false
|
||||
if (ksdata.notinTime == 1) {
|
||||
if(ksdata.state == 0){
|
||||
ksdata['testdisable'] = true
|
||||
ksdata['msg'] = '考试已关闭!'
|
||||
}
|
||||
else if (ksdata.notinTime == 1) {
|
||||
ksdata['testdisable'] = true
|
||||
ksdata['msg'] = '不在考试期限范围内!'
|
||||
}
|
||||
if (ksdata.testnum == 0) {
|
||||
else if (ksdata.testnum == 0) {
|
||||
ksdata['testdisable'] = false
|
||||
ksdata['msg'] = ''
|
||||
}else{
|
||||
ksdata['testdisable'] = true
|
||||
ksdata['msg'] = '您已考过!'
|
||||
|
|
|
@ -29,5 +29,5 @@
|
|||
<view style="position:fixed;bottom:0;left:0;width:100%;">
|
||||
<view style="color:red;text-align:center">{{msg}}</view>
|
||||
<button class="weui-btn" type="primary" bindtap="start" disabled="{{testdisable}}">开始考试</button>
|
||||
<button class="weui-btn" bindtap="start" wx:if="{{remainnum>0}}">重考({{remainnum}})</button>
|
||||
<button class="weui-btn" bindtap="start" wx:if="{{remainnum>0 && state==1 && notinTime ==0}}">重考({{remainnum}})</button>
|
||||
</view>
|
|
@ -18,16 +18,16 @@
|
|||
"checkSiteMap": true,
|
||||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": false,
|
||||
"useApiHook": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"useIsolateContext": true,
|
||||
"useCompilerModule": true,
|
||||
"useCompilerModule": false,
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
"useMultiFrameRuntime": false,
|
||||
"useApiHook": true,
|
||||
"packNpmManually": false,
|
||||
"packNpmRelationList": []
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue