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; 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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);
} }
} }
// //