Commit 5f2cd1f3 by 郑艺斌

添加加载中

parent 249a005f
Showing with 16 additions and 0 deletions
...@@ -23,6 +23,7 @@ Page({ ...@@ -23,6 +23,7 @@ Page({
}, },
id: '', id: '',
tagText: '', tagText: '',
isBtn:false,
}, },
/** /**
...@@ -182,6 +183,12 @@ Page({ ...@@ -182,6 +183,12 @@ Page({
}); });
}, },
submit() { submit() {
if(this.data.isBtn){
return
}
wx.showLoading({
title: '加载中',
})
const that = this const that = this
let arr = [] let arr = []
let pattern1 = /^\s+/g; let pattern1 = /^\s+/g;
...@@ -241,6 +248,9 @@ Page({ ...@@ -241,6 +248,9 @@ Page({
"accessToken": wx.getStorageSync('accessToken') "accessToken": wx.getStorageSync('accessToken')
}, // 设置请求的 header }, // 设置请求的 header
success: function (res) { success: function (res) {
that.setData({
isBtn:false
})
if (res.data.statusCode === 200) { if (res.data.statusCode === 200) {
that.addTag() that.addTag()
wx.showToast({ wx.showToast({
...@@ -251,6 +261,12 @@ Page({ ...@@ -251,6 +261,12 @@ Page({
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1
}) })
}else{
wx.showToast({
title: '提交失败!',
icon: 'error',
duration: 2000
})
} }
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment