后台管理添加体温上报
This commit is contained in:
@@ -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();
|
||||
|
@@ -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;">
|
||||
|
Reference in New Issue
Block a user