很多页面

This commit is contained in:
haomingming
2025-09-03 17:13:10 +08:00
parent 92bfc36d51
commit 84f59b20f6
26 changed files with 29536 additions and 616 deletions
+25 -5
View File
@@ -61,8 +61,9 @@
<script setup>
import { ref, onUnmounted,computed } from 'vue';
import phoneImg from "@/static/phone.png"
import smsImg from "@/static/sms.png"
import phoneImg from "@/static/phone.png"
import smsImg from "@/static/sms.png"
import api from "@/api/api.js"
const mobile = ref('');
const code = ref('');
const sending = ref(false);
@@ -94,8 +95,17 @@ const sendCode = () => {
return;
}
if (sending.value) return;
api.smsSend({
mobile: mobile.value,
type: 6
}).then(res => {
if (res.code === 200) {
uni.showToast({ title: '验证码已发送', icon: 'success' });
} else {
uni.showToast({ title: res.msg || '验证码发送失败', icon: 'none' });
}
});
// TODO: 调用发送验证码接口
uni.showToast({ title: '验证码已发送', icon: 'success' });
startTimer();
};
@@ -108,8 +118,18 @@ const onConfirm = () => {
uni.showToast({ title: '请输入正确的验证码', icon: 'none' });
return;
}
// TODO: 提交更换手机号
uni.showToast({ title: '已提交', icon: 'success' });
//String oldMobile,newMobile, sms = params.get("sms");
api.changeMobile({
newMobile: mobile.value,
sms: code.value,
oldMobile: uni.getStorageSync('userInfo').mobile
}).then(res => {
if (res.code === 200) {
uni.showToast({ title: '更换手机号成功', icon: 'success' });
} else {
uni.showToast({ title: res.msg || '更换手机号失败', icon: 'none' });
}
});
};
onUnmounted(() => {