Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟
cust-app
Commits
aa9dfc91
Commit
aa9dfc91
authored
Jan 15, 2025
by
liwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
e795e619
73d78161
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
53 deletions
+45
-53
editAbout.vue
pagesme/me/editAbout.vue
+9
-1
updateBasicInformation.vue
pagesme/me/updateBasicInformation.vue
+19
-44
updateInformation.vue
pagesme/me/updateInformation.vue
+17
-8
No files found.
pagesme/me/editAbout.vue
View file @
aa9dfc91
...
...
@@ -40,6 +40,10 @@
uni
.
setNavigationBarTitle
({
title
:
"心仪的Ta"
})
}
else
if
(
option
.
type
==
4
)
{
uni
.
setNavigationBarTitle
({
title
:
"未来规划"
})
}
that
.
value
=
uni
.
getStorageSync
(
"editText"
)
...
...
@@ -58,7 +62,6 @@
async
saveAbout
()
{
var
that
=
this
;
if
(
that
.
type
==
1
)
{
var
data
=
{
openId
:
uni
.
getStorageSync
(
'userInfo'
).
wxOpenid
,
memIntroduce
:
that
.
value
...
...
@@ -73,6 +76,11 @@
openId
:
uni
.
getStorageSync
(
'userInfo'
).
wxOpenid
,
memHalfDesire
:
that
.
value
};
}
else
if
(
that
.
type
==
4
)
{
var
data
=
{
openId
:
uni
.
getStorageSync
(
'userInfo'
).
wxOpenid
,
memFuturePlan
:
that
.
value
};
}
uni
.
showLoading
({
title
:
'保存中...'
...
...
pagesme/me/updateBasicInformation.vue
View file @
aa9dfc91
...
...
@@ -221,34 +221,6 @@
name=
"arrow-right"
></u-icon>
</u-form-item>
<u-form-item
label=
"自我介绍"
prop=
"memIntroduce"
borderBottom
>
<u--textarea
v-model=
"userInfo.memIntroduce"
placeholder=
"请输入自我介绍"
></u--textarea>
</u-form-item>
<u-form-item
label=
"兴趣爱好"
prop=
"memHobby"
borderBottom
>
<u--textarea
v-model=
"userInfo.memHobby"
placeholder=
"请输入兴趣爱好"
></u--textarea>
</u-form-item>
<u-form-item
label=
"未来规划"
prop=
"memFuturePlan"
borderBottom
>
<u--textarea
v-model=
"userInfo.memFuturePlan"
placeholder=
"请输入未来规划"
></u--textarea>
</u-form-item>
<u-form-item
label=
"期待"
prop=
"memHalfDesire"
borderBottom
>
<u--textarea
v-model=
"userInfo.memHalfDesire"
placeholder=
"请输入期待"
></u--textarea>
</u-form-item>
<u-form-item
label=
"婚姻状况"
prop=
"form.memMarriageText"
...
...
@@ -364,6 +336,7 @@
@
confirm=
"confirmMarriage"
></u-picker>
</view>
<ELM
ref=
"elm"
:msg=
"tipMsg"
:isConfirm=
"isConfirm"
@
confirm=
"confirm"
></ELM>
</view>
</
template
>
...
...
@@ -372,8 +345,10 @@ import UFormItem from "../../uni_modules/uview-ui/components/u-form-item/u-form-
import
{
getCity
,
getOptions
,
getResidence
,
getValue
}
from
"../../common/options"
;
import
{
updateUser
,
userDetail
}
from
"../../api/user"
;
import
{
calculateAge
,
parseDate
}
from
"../../common"
;
import
ELM
from
'@/components/elm-toast/index.vue'
;
export
default
{
components
:
{
UFormItem
},
components
:
{
UFormItem
,
ELM
},
data
()
{
return
{
index
:
0
,
...
...
@@ -440,6 +415,8 @@ export default {
memMbti
:
''
,
//人格
},
form
:{},
tipMsg
:
''
,
isConfirm
:
false
,
birthday
:
Number
(
new
Date
()),
rules
:
{
// 'form.memNationText': [
...
...
@@ -689,25 +666,23 @@ export default {
this
.
$refs
.
uForm
.
validate
().
then
(
res
=>
{
this
.
userInfo
.
openId
=
uni
.
getStorageSync
(
'userInfo'
).
wxOpenid
updateUser
(
this
.
userInfo
).
then
(
response
=>
{
if
(
response
.
data
.
code
===
200
){
uni
.
showToast
({
title
:
'修改成功'
,
icon
:
'success'
,
})
setTimeout
(()
=>
{
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
},
1000
)
})
}
else
{
uni
.
showToast
({
title
:
'修改失败'
,
icon
:
'error'
,
})
if
(
response
.
data
.
code
==
200
)
{
this
.
isConfirm
=
true
;
this
.
tipMsg
=
"修改成功"
;
this
.
$refs
.
elm
.
showDialog
();
}
else
{
this
.
tipMsg
=
res
.
data
.
msg
;
this
.
$refs
.
elm
.
showDialog
();
}
})
})
},
confirm
()
{
this
.
isConfirm
=
false
;
uni
.
navigateBack
({
delta
:
1
})
},
reset
()
{
this
.
getUserInfo
()
},
...
...
pagesme/me/updateInformation.vue
View file @
aa9dfc91
<
template
>
<view>
<view
style=
"padding-bottom: 100rpx"
>
<!-- 头像部分-->
<view
class=
"w-100 pt30 pb60"
>
<view
class=
"pr40 pl72 pt40 rowa"
v-if=
"userInfo.avatarUrl == null"
>
...
...
@@ -106,12 +106,6 @@
<view
class=
"name"
>
{{
userInfo
.
memNickName
?
userInfo
.
memNickName
:
''
}}
</view>
<image
:src=
"baseUrl+'/user/famale.png'"
mode=
"aspectFill"
v-if=
"userInfo.memSex == '0'"
></image>
<image
:src=
"baseUrl+'/user/male.png'"
mode=
"aspectFill"
v-else
></image>
<view
class=
"hint"
>
<image
:src=
"baseUrl+'/user/auth.png'"
mode=
"aspectFill"
></image>
<view
class=
"t"
>
{{
userInfo
.
memRealAuthen
}}
</view>
</view>
</view>
<view
class=
"box-bq"
>
<view>
...
...
@@ -225,6 +219,21 @@
<view>
{{
userInfo
.
memHalfDesire
}}
</view>
</view>
</view>
<!-- 未来规划-->
<view
class=
"w690 p30 bcfff br20 mt30 ml30 p30"
>
<view
class=
"rowjbic"
>
<view
class=
"rowic"
>
<image
class=
"w30 h30"
:src=
"baseUrl+'/user/futurePlan.png'"
mode=
"aspectFill"
></image>
<view
style=
"color: #434343;"
class=
"fs28 fwb ml10"
>
未来规划
</view>
</view>
<view
class=
"w120 h52 lh52 tc br100 fs28"
@
click=
"gotoEditText(4,userInfo.memFuturePlan)"
style=
"color: #434343; background-color: #F5F6FA;"
>
编辑
</view>
</view>
<view
class=
" mt25 fs28"
style=
"color: #434343; "
>
<view>
{{
userInfo
.
memFuturePlan
}}
</view>
</view>
</view>
<view
class=
"h40"
></view>
...
...
@@ -307,6 +316,7 @@ import {updateUser, userDetail} from "../../api/user";
if
(
Index
==
9
)
{
this
.
singleIndex
=
9
;
}
else
{
console
.
log
(
'index'
,
Index
)
this
.
singleIndex
=
Index
;
}
this
.
singleNoShow
=
true
;
...
...
@@ -409,7 +419,6 @@ import {updateUser, userDetail} from "../../api/user";
gotoEditText
(
type
,
value
)
{
var
that
=
this
;
if
(
type
)
{
console
.
log
(
value
);
uni
.
setStorageSync
(
"editText"
,
value
)
uni
.
navigateTo
({
url
:
"/pagesme/me/editAbout?type="
+
type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment