开始考试按钮显示逻辑问题

This commit is contained in:
caoqianming 2020-12-10 08:56:34 +08:00
parent 1c0b463c24
commit 98d6495b21
3 changed files with 65 additions and 60 deletions

View File

@ -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'] = '您已考过!'

View File

@ -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>

View File

@ -1,59 +1,59 @@
{
"description": "项目配置文件。",
"setting": {
"urlCheck": false,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": []
},
"compileType": "miniprogram",
"libVersion": "2.9.4",
"appid": "wx5c39b569f01c27db",
"projectname": "aqyj",
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
"description": "项目配置文件。",
"setting": {
"urlCheck": false,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": true,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"packNpmManually": false,
"packNpmRelationList": []
},
"compileType": "miniprogram",
"libVersion": "2.9.4",
"appid": "wx5c39b569f01c27db",
"projectname": "aqyj",
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}