+ nn
diff --git a/front/src/views/fore/profile.vue b/front/src/views/fore/profile.vue
index c83f694..9394962 100644
--- a/front/src/views/fore/profile.vue
+++ b/front/src/views/fore/profile.vue
@@ -22,6 +22,10 @@
+
+
+ 绑定手机号
+
@@ -30,11 +34,6 @@
-
-
-
-
-
@@ -43,13 +42,13 @@
-
-
+
+
@@ -110,8 +109,7 @@ const profileInfo = ref({
address: '北京市朝阳区某某街道',
});
-
-// 读取 localStorage 中保存的地址数据
+// 读取 localStorage 中保存 的地址数据
const loadAddresses = () => {
const savedData = localStorage.getItem('addresses');
return savedData ? JSON.parse(savedData) : [];
@@ -211,12 +209,21 @@ const copyAddress = (address) => {
ElMessage.success('地址已复制到剪贴板');
};
-
const logout = () => {
router.push({ name: 'login' });
-}
+};
+
+const bindPhone = () => {
+ if (!profileInfo.value.phone) {
+ ElMessage.error('手机号不能为空');
+ return;
+ }
+ // 这里可以添加手机号绑定的逻辑,比如发送请求到后端
+ ElMessage.success('手机号绑定成功!');
+};
+
+
\ No newline at end of file