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