Commit 665b414d authored by wildfirecode13's avatar wildfirecode13

1

parent 7ccecb6d
......@@ -51,13 +51,14 @@ Component({
},
async handleTapReceiveBtn(e) {
if (flag) return;
my.showLoading();
// my.showLoading();
flag = 1;
const { item } = e.target.dataset;
const { taskType,sellerId } = item;
const { success, data, message } = await API.receiveTaskRewards({ taskType,sellerId }).catch(res => {
commonToast(res && res.message);
}) || {};
// my.hideLoading();
if (success && data) {
commonToast('领取成功~');
}
......
......@@ -79,11 +79,11 @@ Page({
myPrizeList: []
})
}) || {};
if (success && data) {
if (success && data && data.list) {
this.setData({
myPrizeList: data
myPrizeList: data.list
})
this.getEndTime(data)
this.getEndTime(data.list)
}
if (type != 'noLoading') {
my.hideLoading();
......
......@@ -28,7 +28,7 @@ Page({
async handleClick(e) {
if (flag) return;
my.showLoading();
// my.showLoading();
flag = 1;
const { item } = e.target.dataset;
const { _id, code, type } = item;
......@@ -38,7 +38,7 @@ Page({
commonToast(res && res.message);
}) || {};
my.__updateUserInfo__();
my.hideLoading();
// my.hideLoading();
if (success && data) {
this.setData({ exchangedModalVisible: 1, exchangedModalData: item })
......
......@@ -4,7 +4,7 @@
* @param {number} duration 显示时长
* @param {function} successCb 成功回调
*/
export const commonToast = (content, duration = 3000, successCb) => {
export const commonToast = (content, duration = 1500, successCb) => {
my.showToast({
content: content || '换个姿势再试一次~',
duration,
......
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 to comment