优化代码

This commit is contained in:
wuxw 2024-10-16 12:08:11 +08:00
parent bb0febe1c4
commit 0dfc214c73

View File

@ -72,12 +72,11 @@ export function sendSmsCode(_link, _that) {
uni.hideLoading(); uni.hideLoading();
let _json = res.data; let _json = res.data;
if (_json.code == 0) { if (_json.code == 0) {
wx.showToast({ uni.showToast({
title:_json.data, title:_json.data,
icon: 'none', icon: 'none',
duration: 2000 duration: 5000
}); });
wx.hideLoading();
timer(_that); timer(_that);
resolve(); resolve();
return; return;
@ -85,7 +84,7 @@ export function sendSmsCode(_link, _that) {
wx.showToast({ wx.showToast({
title: _json.msg, title: _json.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 5000
}); });
reject(); reject();
}, },