Skip to content

Commit

Permalink
fix: avatar upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Pleasurecruise committed Nov 14, 2024
1 parent fb2bffa commit be0166d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
7 changes: 6 additions & 1 deletion uniapp/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion uniapp/src/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "Nottingham Wall"
"navigationBarTitleText": "CPU Wall"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion uniapp/src/pages/index/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<view>
<CustomSwiper :imgList="imgList" :indicator-dots="true" :autoplay="true" :interval="4000" :duration="500"/>
<uni-notice-bar show-icon scrollable text="Nottingham Wall 当前还处于开发阶段!" />
<uni-notice-bar show-icon scrollable text="CPU Wall 当前还处于开发阶段!" />
<TopicComponent :records="records" :loadMoreStatus="loadMoreStatus"/>
<FabComponent />
</view>
Expand Down
7 changes: 4 additions & 3 deletions uniapp/src/pages/person/editInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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',
Expand All @@ -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
},
Expand Down
2 changes: 1 addition & 1 deletion uniapp/src/pages/person/getPhone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<view>
<text class="title">Hello!</text>
<br/>
<text class="subtitle">欢迎使用Nottingham Wall</text>
<text class="subtitle">欢迎使用CPU Wall</text>
</view>
</view>
<view class="content">
Expand Down
2 changes: 1 addition & 1 deletion uniapp/src/pages/transition/agreement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<text class="title">隐私权政策提示</text>
<view class="text-container">
<text>
请您在使用Nottingham Wall服务前点击
请您在使用CPU Wall服务前点击
<text url="https://blog.yiming1234.cn">《服务使用协议》</text>
<text url="https://blog.yiming1234.cn">《隐私与个人信息保护政策》</text>与
并仔细阅读。如您同意以上全部内容,请点击同意并开始使用我们的服务。如果您不同意,您只能浏览部分内容。
Expand Down

0 comments on commit be0166d

Please sign in to comment.