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

体温上报功能完成;小程序更新npm依赖版本

This commit is contained in:
2022-12-28 20:30:18 +08:00
parent 432ba2b812
commit 7d7a9313d5
13 changed files with 1109 additions and 876 deletions

View File

@@ -173,7 +173,60 @@ export default {
})
Taro.hideLoading()
},
report() {
console.log("点击提交", "this.formData", this.formData)
Taro.showLoading({ title: '加载中' })
var that = this;
Taro.request({
url: `${this.baseUrl}/access/report/submit`,
method: "POST",
header: {
"Content-Type": "application/x-www-form-urlencoded" //用于post
},
data: {
...this.formData,
},
success: function (d) {
that.debugMode && console.log("begin success")
Taro.hideLoading()
let result = d.data;
if (result.success) {
console.log("result.data", result.data);
Taro.showToast({
title: "填报成功",
icon: 'success',
duration: 2000
})
} else {
Taro.showToast({
title: result.msg,
icon: 'error',
duration: 2000
})
}
that.isShow = ''
that.debugMode && console.log("end success")
},
fail: function () {
that.debugMode && console.log("begin fail")
Taro.hideLoading()
Taro.showToast({
title: "请求失败",
icon: 'error',
duration: 2000
})
that.debugMode && console.log("end fail")
},
complete: function () {
that.debugMode && console.log("begin complete")
if (typeof (callback) === "function")
callback();
Taro.hideNavigationBarLoading();
that.debugMode && console.log("end complete")
}
})
}
}
}
</script>