xbx #118

Merged
theluyuan merged 10 commits from xbx into master 2020-11-06 23:45:06 +08:00
5 changed files with 10 additions and 9 deletions
Showing only changes of commit 013cae84af - Show all commits

View File

@ -673,8 +673,9 @@ interface SendSms{
msg: string;
}
export async function sendsms(phone: string, type: number): Promise<boolean>{
const res = await post<SendSms>("SendSms", {phone, type});
export async function sendsms(code: string ,phone: string): Promise<boolean>{
const type = code == '86' ? 0 : 1;
const res = await post<SendSms>("SendSms", {phone: code + phone, type});
console.log(res);
if(res.code == 0){
message.success(res.msg);

View File

@ -188,7 +188,7 @@ export default defineComponent({
}
lock = true;
console.log(myquhao.value,"quhao")
sendsms(myquhao.value + phone.value, 0);
sendsms(myquhao.value, phone.value);
const timestep = setInterval(() => {
console.log(11112);

View File

@ -138,7 +138,7 @@ export default defineComponent({
return;
}
lock = true;
sendsms(uinfo.value.quhao + uinfo.value.phone, 0);
sendsms(uinfo.value.quhao, uinfo.value.phone);
const timestep = setInterval(() => {
console.log(11112);
time.value = time.value - 1;

View File

@ -285,7 +285,7 @@ export default defineComponent({
return;
}
lock = true;
sendsms(phone.value.quhao + phone.value.phone, 0);
sendsms(phone.value.quhao, phone.value.phone);
const timestep = setInterval(() => {
console.log(phone);
time.value = time.value - 1;

View File

@ -348,7 +348,7 @@
<div
@click="
sendVerificationCode(
userinfo.code + userinfo.mobile
userinfo.code , userinfo.mobile
)
"
class="confirm-btn"
@ -411,7 +411,7 @@
/>
<div
@click="
sendVerificationCode(myquhao + mynewtel)
sendVerificationCode(myquhao , mynewtel)
"
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) {
computedVerificationCode();
console.log(tel, "send");
sendsms(tel, 0);
sendsms(code, tel);
}
}
//