1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

后台管理添加体温上报

This commit is contained in:
2023-04-14 00:53:02 +08:00
parent bad6ecb111
commit fb10c7e666
22 changed files with 472 additions and 58 deletions

View File

@@ -23,6 +23,9 @@ Page({
// 是否填报过
isFilled: true,
filledMsg: "",
// 是否正在提交中,用于隐藏提交按钮,避免出现多次提交
isSubmitting: false,
},
/**
@@ -240,6 +243,9 @@ Page({
title: '加载中'
})
var that = this;
that.setData({
isSubmitting: true,
})
wx.request({
url: `${app.globalData.baseUrl}/access/report/submit`,
method: "POST",
@@ -286,6 +292,9 @@ Page({
console.log("end fail")
},
complete: function () {
that.setData({
isSubmitting: false,
})
console.log("begin complete")
if (typeof (callback) === "function")
callback();

View File

@@ -48,7 +48,7 @@
<view style="text-align: center;">
<button class="controlBtn" size="mini" type="none" bindtap="myreport">历史填报</button>
<button class="controlBtn" size="mini" type="primary" bindtap="report">提交</button>
<button class="controlBtn" size="mini" type="primary" bindtap="report" disabled="{{isSubmitting}}">提交</button>
</view>
</view>
<view wx:else style="text-align: center;">