xbx #118
@ -673,8 +673,9 @@ interface SendSms{
|
|||||||
msg: string;
|
msg: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function sendsms(phone: string, type: number): Promise<boolean>{
|
export async function sendsms(code: string ,phone: string): Promise<boolean>{
|
||||||
const res = await post<SendSms>("SendSms", {phone, type});
|
const type = code == '86' ? 0 : 1;
|
||||||
|
const res = await post<SendSms>("SendSms", {phone: code + phone, type});
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
message.success(res.msg);
|
message.success(res.msg);
|
||||||
|
@ -188,7 +188,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
lock = true;
|
lock = true;
|
||||||
console.log(myquhao.value,"quhao")
|
console.log(myquhao.value,"quhao")
|
||||||
sendsms(myquhao.value + phone.value, 0);
|
sendsms(myquhao.value, phone.value);
|
||||||
const timestep = setInterval(() => {
|
const timestep = setInterval(() => {
|
||||||
console.log(11112);
|
console.log(11112);
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lock = true;
|
lock = true;
|
||||||
sendsms(uinfo.value.quhao + uinfo.value.phone, 0);
|
sendsms(uinfo.value.quhao, uinfo.value.phone);
|
||||||
const timestep = setInterval(() => {
|
const timestep = setInterval(() => {
|
||||||
console.log(11112);
|
console.log(11112);
|
||||||
time.value = time.value - 1;
|
time.value = time.value - 1;
|
||||||
|
@ -285,7 +285,7 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lock = true;
|
lock = true;
|
||||||
sendsms(phone.value.quhao + phone.value.phone, 0);
|
sendsms(phone.value.quhao, phone.value.phone);
|
||||||
const timestep = setInterval(() => {
|
const timestep = setInterval(() => {
|
||||||
console.log(phone);
|
console.log(phone);
|
||||||
time.value = time.value - 1;
|
time.value = time.value - 1;
|
||||||
|
@ -348,7 +348,7 @@
|
|||||||
<div
|
<div
|
||||||
@click="
|
@click="
|
||||||
sendVerificationCode(
|
sendVerificationCode(
|
||||||
userinfo.code + userinfo.mobile
|
userinfo.code , userinfo.mobile
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
class="confirm-btn"
|
class="confirm-btn"
|
||||||
@ -411,7 +411,7 @@
|
|||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
@click="
|
@click="
|
||||||
sendVerificationCode(myquhao + mynewtel)
|
sendVerificationCode(myquhao , mynewtel)
|
||||||
"
|
"
|
||||||
class="confirm-btn"
|
class="confirm-btn"
|
||||||
>
|
>
|
||||||
@ -678,11 +678,11 @@ export default defineComponent({
|
|||||||
/**
|
/**
|
||||||
* 发送验证码
|
* 发送验证码
|
||||||
*/
|
*/
|
||||||
function sendVerificationCode(tel: string): void {
|
function sendVerificationCode(code: string ,tel: string): void {
|
||||||
if (remainTime.value === 0) {
|
if (remainTime.value === 0) {
|
||||||
computedVerificationCode();
|
computedVerificationCode();
|
||||||
console.log(tel, "send");
|
console.log(tel, "send");
|
||||||
sendsms(tel, 0);
|
sendsms(code, tel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 绑定手机号是否是第二步
|
// 绑定手机号是否是第二步
|
||||||
|
Loading…
Reference in New Issue
Block a user