|
@@ -81,16 +81,23 @@
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
- this.$refs.uToast.show({
|
|
|
|
- title: res.msg || '签到成功!',
|
|
|
|
- type: 'success',
|
|
|
|
- duration: 3000
|
|
|
|
|
|
+ // this.$refs.uToast.show({
|
|
|
|
+ // title: res.msg || '签到成功!',
|
|
|
|
+ // type: 'success',
|
|
|
|
+ // duration: 3000
|
|
|
|
+ // });
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: `${res.msg || '签到成功'}, 是否返回首页?`,
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: function(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ uni.switchTab({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
});
|
|
});
|
|
- setTimeout(() => {
|
|
|
|
- uni.switchTab({
|
|
|
|
- url: '/pages/index/index'
|
|
|
|
- })
|
|
|
|
- }, 3000)
|
|
|
|
} else {
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
title: '签到失败!' + res.msg,
|
|
title: '签到失败!' + res.msg,
|