fix: 缓存并显示新手机号
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m23s

This commit is contained in:
luo
2026-09-28 16:30:29 +08:00
parent dc53295e2c
commit 77b0e25011
2 changed files with 9 additions and 3 deletions

View File

@@ -39,6 +39,10 @@
<script setup>
import { reactive, ref, onMounted } from 'vue';
import { authApi } from '@/api/index.js';
import { useUserStore } from '@/store/index.js';
import { setPhoneBindStatus } from '@/utils/phone-bind.js';
const userStore = useUserStore();
const form = reactive({
oldPhone: '',
@@ -133,6 +137,8 @@
try {
await authApi.changePhone(form.oldPhone, form.oldCode, form.newPhone, form.newCode);
setPhoneBindStatus(userStore.state.identifier, form.newPhone);
form.oldPhone = form.newPhone;
uni.showToast({ title: '更换成功', icon: 'success' });
setTimeout(() => {
uni.navigateBack();
@@ -160,4 +166,4 @@
}
}
}
</style>
</style>