feat: 新增确认送达弹框组件、添加安卓打包测试证书、骑手配送流程接口对接
This commit is contained in:
@@ -62,12 +62,16 @@ export function closeMenuTools() {
|
||||
export function getSmsCode(event, mobile) {
|
||||
const modalStore = $store('modal');
|
||||
const lastSendTimer = modalStore.lastTimer[event];
|
||||
// 如果场景未初始化,先初始化为0(表示可以发送)
|
||||
if (typeof lastSendTimer === 'undefined') {
|
||||
$helper.toast('短信发送事件错误');
|
||||
return;
|
||||
modalStore.$patch((state) => {
|
||||
if (typeof state.lastTimer[event] === 'undefined') {
|
||||
state.lastTimer[event] = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const duration = dayjs().unix() - lastSendTimer;
|
||||
const duration = dayjs().unix() - (modalStore.lastTimer[event] || 0);
|
||||
const canSend = duration >= 60;
|
||||
if (!canSend) {
|
||||
$helper.toast('请稍后再试');
|
||||
@@ -82,6 +86,9 @@ export function getSmsCode(event, mobile) {
|
||||
// 发送验证码 + 更新上次发送验证码时间
|
||||
let scene = -1;
|
||||
switch (event) {
|
||||
case 'registerDelivery':
|
||||
scene = 5;
|
||||
break;
|
||||
case 'resetPassword':
|
||||
scene = 4;
|
||||
break;
|
||||
@@ -109,9 +116,9 @@ export function getSmsTimer(event, mobile = '') {
|
||||
const modalStore = $store('modal');
|
||||
const lastSendTimer = modalStore.lastTimer[event];
|
||||
|
||||
// 如果场景未初始化,返回"获取验证码"
|
||||
if (typeof lastSendTimer === 'undefined') {
|
||||
$helper.toast('短信发送事件错误');
|
||||
return;
|
||||
return '获取验证码';
|
||||
}
|
||||
|
||||
const duration = ref(dayjs().unix() - lastSendTimer - 60);
|
||||
|
||||
Reference in New Issue
Block a user