From be0166d68475ed47a5cdcae4681ab004a7264ea0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=87=AA=E7=94=B1=E7=9A=84=E4=B8=96=E7=95=8C=E4=BA=BA?=
<3196812536@qq.com>
Date: Fri, 15 Nov 2024 00:15:04 +0800
Subject: [PATCH] fix: avatar upload
---
uniapp/.idea/workspace.xml | 7 ++++++-
uniapp/src/pages.json | 2 +-
uniapp/src/pages/index/index.vue | 2 +-
uniapp/src/pages/person/editInfo.vue | 7 ++++---
uniapp/src/pages/person/getPhone.vue | 2 +-
uniapp/src/pages/transition/agreement.vue | 2 +-
6 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/uniapp/.idea/workspace.xml b/uniapp/.idea/workspace.xml
index 6aa480d2..b89ff7c6 100644
--- a/uniapp/.idea/workspace.xml
+++ b/uniapp/.idea/workspace.xml
@@ -4,7 +4,10 @@
-
+
+
+
+
@@ -187,6 +190,8 @@
+
+
diff --git a/uniapp/src/pages.json b/uniapp/src/pages.json
index 6f1c2c83..d7855b9b 100644
--- a/uniapp/src/pages.json
+++ b/uniapp/src/pages.json
@@ -9,7 +9,7 @@
{
"path": "pages/index/index",
"style": {
- "navigationBarTitleText": "Nottingham Wall"
+ "navigationBarTitleText": "CPU Wall"
}
},
{
diff --git a/uniapp/src/pages/index/index.vue b/uniapp/src/pages/index/index.vue
index 7c8be8a3..b8342647 100644
--- a/uniapp/src/pages/index/index.vue
+++ b/uniapp/src/pages/index/index.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/uniapp/src/pages/person/editInfo.vue b/uniapp/src/pages/person/editInfo.vue
index 05df9519..f545f33b 100644
--- a/uniapp/src/pages/person/editInfo.vue
+++ b/uniapp/src/pages/person/editInfo.vue
@@ -129,6 +129,7 @@ export default {
success: (res) => {
try {
const responseData = JSON.parse(res.data);
+ console.log('上传成功:', responseData);
if (responseData.code === 1) {
this.updateUserInfo(responseData);
} else {
@@ -162,8 +163,8 @@ export default {
/**
* 更新用户信息
*/
- updateUserInfo() {
- console.log('更新用户信息:', this.nickName, this.avatarUrl, this.sexValueMap[this.selectedSex], this.studentid),
+ updateUserInfo(responseData) {
+ console.log('更新用户信息:', this.nickName, responseData.data[0], this.sexValueMap[this.selectedSex], this.studentid),
uni.request({
url: baseUrl + '/student/update/info',
method: 'PUT',
@@ -173,7 +174,7 @@ export default {
},
data: {
username: this.nickName,
- avatar: this.avatarUrl,
+ avatar: responseData.data[0],
sex: this.sexValueMap[this.selectedSex],
studentid: this.studentid
},
diff --git a/uniapp/src/pages/person/getPhone.vue b/uniapp/src/pages/person/getPhone.vue
index 6018a4c0..92244541 100644
--- a/uniapp/src/pages/person/getPhone.vue
+++ b/uniapp/src/pages/person/getPhone.vue
@@ -5,7 +5,7 @@
Hello!
- 欢迎使用Nottingham Wall
+ 欢迎使用CPU Wall
diff --git a/uniapp/src/pages/transition/agreement.vue b/uniapp/src/pages/transition/agreement.vue
index a6ea27a8..03198b47 100644
--- a/uniapp/src/pages/transition/agreement.vue
+++ b/uniapp/src/pages/transition/agreement.vue
@@ -4,7 +4,7 @@
隐私权政策提示
- 请您在使用Nottingham Wall服务前点击
+ 请您在使用CPU Wall服务前点击
《服务使用协议》
《隐私与个人信息保护政策》与
并仔细阅读。如您同意以上全部内容,请点击同意并开始使用我们的服务。如果您不同意,您只能浏览部分内容。