Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pingpp.createPayment(data.invokeResponse, function(result, err) {
if (result === 'success') {
Dialog.alert({
title: '系统提示',
message: '支付成功',
beforeClose: function (action, done) {
// 关闭弹窗
done();
// 跳转到我的优惠劵
that.$router.push(decodeURI(that.returnUrl));
}
});
} else {
// console.log(err.msg);
// console.log(err.extra);
Dialog.alert({
title: '系统提示',
message: '支付失败:' + err.msg,
});
}, error => {
console.log('err' + error)// for debug
Dialog.alert({
title: '警告',
message: '登录连接超时'
});
return Promise.reject(error)
})
}, error => {
console.log('err' + error)// for debug
Dialog.alert({
title: '警告',
message: '登录连接超时'
});
return Promise.reject(error)
})
onFeedBack () {
Dialog.alert({
confirmButtonText: '记得点个小星❤️哦~',
title: '💘感谢您的关注💘',
message: 'GitHub上搜索 \nGeek-James/ddBuy \n🦉欢迎提出优化建议🙉'
}).then(() => {
// on close
});
}
}
async sendVerifyCode () {
this.countDown = 60;
this.timeIntervalID = setInterval(() => {
this.countDown--;
// 4.1 如果减到0 则清除定时器
if (this.countDown == 0) {
clearInterval(this.timeIntervalID);
}
}, 1000)
// 4.2 获取短信验证码
let result = await getPhoneCaptcha(this.login_phone);
if (result.success_code == 200) {
this.smsCaptchaResult = result.data.code;
// 4.3 获取验证码成功
Dialog.alert({
title: this.$t('login.tipTile'),
message: this.$t('login.message') + result.data.code
}).then(() => {
});
}
},
// 5.登录
confirmButtonText: '重新登陆',
beforeClose: function (action, done) {
done();
if (action === 'confirm') {
// debugger;
// this.$router.push({ path: '/login' })
// TODO 跳转到登陆页.不是很优雅
location.replace('/#login');
location.reload();
}
}
});
} else if (code === 1002001012) { // 访问令牌已过期
return refreshToken(response);
} else {
Dialog.alert({
title: '系统提示',
message: res.message,
});
}
return Promise.reject('error')
} else {
// if (typeof response.data.Tag == 'string') {
// return JSON.parse(response.data.Tag);
// } else {
// return response.data.Tag;
// }
// debugger;
return res.data;
}
},
error => {
response.then(data => {
Dialog.alert({
title: '系统提示',
message: '领取成功',
beforeClose: function (action, done) {
// 关闭弹窗
done();
// 跳转到我的优惠劵
that.$router.push('/user/coupon');
}
});
});
}
error => {
Dialog.alert({
title: '警告',
message: error.message
});
return Promise.reject(error);
}
);
private confirmDeleteNote() {
Dialog.alert({
title: '删除确认',
message: '是否删除该任务?'
}).then(() => {
this.handleDeleteNote(this.notebookId, this.id!);
});
}
registerNormal(this.registerForm).then(() => {
Dialog.alert({
title: '恭喜',
message: '您已注册成功!'
}).then(() => {
that.$router.push({ path: '/member' })
})
})
} else {