|
@@ -85,6 +85,8 @@ Page({
|
|
|
classId: "",
|
|
|
className: "",
|
|
|
classIndex: 0,
|
|
|
+
|
|
|
+ isSaveDisable: false
|
|
|
},
|
|
|
async onLoad(options: any) {
|
|
|
const { redirectUrl, id } = options;
|
|
@@ -646,12 +648,19 @@ Page({
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ if (this.data.isSaveDisable) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
const pages = getCurrentPages();
|
|
|
const prevPage = pages[pages.length - 2]; // 获取上一个页面实例
|
|
|
wx.showLoading({
|
|
|
mask: true,
|
|
|
title: "",
|
|
|
});
|
|
|
+ this.setData({
|
|
|
+ isSaveDisable: true
|
|
|
+ })
|
|
|
// 编辑
|
|
|
if (params.id) {
|
|
|
await api_userBeneficiaryUpdate({
|
|
@@ -683,8 +692,16 @@ Page({
|
|
|
title: '保存成功',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
- setTimeout(() => { wx.navigateBack() }, 1000)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setData({
|
|
|
+ isSaveDisable: false
|
|
|
+ })
|
|
|
+ wx.navigateBack()
|
|
|
+ }, 1000)
|
|
|
} catch {
|
|
|
+ this.setData({
|
|
|
+ isSaveDisable: false
|
|
|
+ })
|
|
|
wx.hideLoading()
|
|
|
//
|
|
|
}
|