Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
544e4096
Commit
544e4096
authored
Mar 04, 2025
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善用户信息
parent
8e007732
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
18 deletions
+167
-18
index.vue
components/auth/index.vue
+3
-2
pages.json
pages.json
+7
-0
user-center.vue
pages/user-center/user-center.vue
+23
-13
user-profile.vue
pages/user-center/user-profile.vue
+131
-0
api.js
plugin/api.js
+3
-3
No files found.
components/auth/index.vue
View file @
544e4096
...
@@ -222,8 +222,8 @@
...
@@ -222,8 +222,8 @@
customerInfoChildrenId
:
u
.
directCustomerId
,
customerInfoChildrenId
:
u
.
directCustomerId
,
realNameAuthentication
:
0
,
realNameAuthentication
:
0
,
account
:
""
,
account
:
""
,
name
:
N
ame
,
name
:
u
.
n
ame
,
customerName
:
u
.
n
ame
,
customerName
:
N
ame
,
photo
:
u
.
photo
,
photo
:
u
.
photo
,
secretKey
:
""
,
secretKey
:
""
,
token
:
u
.
token
,
token
:
u
.
token
,
...
@@ -233,6 +233,7 @@
...
@@ -233,6 +233,7 @@
EmLoginMobile
:
u
.
moblie
,
EmLoginMobile
:
u
.
moblie
,
contactNumber
:
u
.
moblie
,
contactNumber
:
u
.
moblie
,
salesBaseInfo
:
u
.
salesBaseInfo
,
salesBaseInfo
:
u
.
salesBaseInfo
,
pid
:
u
.
pid
,
count
:
0
,
count
:
0
,
customerType
:
1
,
//直客,2-同行
customerType
:
1
,
//直客,2-同行
directCustomerId
:
u
.
directCustomerId
//直客Id
directCustomerId
:
u
.
directCustomerId
//直客Id
...
...
pages.json
View file @
544e4096
...
@@ -101,6 +101,13 @@
...
@@ -101,6 +101,13 @@
"titlePenetrate"
:
"YES"
"titlePenetrate"
:
"YES"
}
}
}
}
},
{
"path"
:
"user-profile"
,
"style"
:
{
"navigationBarTitleText"
:
"用户资料"
}
}
}
]
]
},
},
...
...
pages/user-center/user-center.vue
View file @
544e4096
...
@@ -31,20 +31,23 @@
...
@@ -31,20 +31,23 @@
: 0,
: 0,
}"
}"
v-if="meueData.user_center.top_style == 1">
v-if="meueData.user_center.top_style == 1">
<u-avatar
:src=
"user_info.avatar"
size=
"140"
shape=
"circle"
></u-avatar>
<u-avatar
:src=
"
b2b_user_info.photo?b2b_user_info.photo:
user_info.avatar"
size=
"140"
shape=
"circle"
></u-avatar>
<view
style=
" display: flex;flex-direction: column; justify-content: center; height: 100rpx; margin-left: 20rpx; "
>
<view
style=
" display: flex;flex-direction: column; justify-content: center; height: 100rpx; margin-left: 20rpx; "
>
<Text
class=
"nickname"
style=
" color: #fff; font-size: 36rpx;font-weight: 800; max-width: 400rpx; overflow: hidden; display: inline-block; white-space: nowrap;text-overflow: ellipsis; font-family:'microsoft yahei ui light'"
<view
class=
"row items-center"
@
click=
"navigatorToProfile"
>
@
click=
"login(user_info)"
>
<Text
class=
"nickname"
style=
" color: #fff; font-size: 36rpx;font-weight: 800; max-width: 400rpx; overflow: hidden; display: inline-block; white-space: nowrap;text-overflow: ellipsis; font-family:'microsoft yahei ui light'"
<template
v-if=
"b2b_user_info&&b2b_user_info.name"
>
@
click=
"login(user_info)"
>
{{
b2b_user_info
.
name
}}
<template
v-if=
"b2b_user_info&&b2b_user_info.name"
>
</
template
>
{{
b2b_user_info
.
name
}}
<
template
v-else-if=
"mall_UserInfo&&mall_UserInfo.Name"
>
</
template
>
{{
mall_UserInfo
.
Name
}}
<
template
v-else-if=
"mall_UserInfo&&mall_UserInfo.Name"
>
</
template
>
{{
mall_UserInfo
.
Name
}}
<
template
v-else
>
</
template
>
立即登录
<
template
v-else
>
</
template
>
立即登录
</Text>
</
template
>
</Text>
<u-icon
name=
"pen_"
size=
"24"
class=
"q-ml-sm"
custom-prefix=
"tffont"
color=
"#121212"
></u-icon>
</view>
<view
style=
"font-size:12px; margin-top:3px;"
>
<view
style=
"font-size:12px; margin-top:3px;"
>
<
template
v-if=
"b2b_user_info&&b2b_user_info.customerName&&b2b_user_info.customerName!=''"
>
<
template
v-if=
"b2b_user_info&&b2b_user_info.customerName&&b2b_user_info.customerName!=''"
>
{{
b2b_user_info
.
customerName
}}
{{
b2b_user_info
.
customerName
}}
...
@@ -227,6 +230,7 @@
...
@@ -227,6 +230,7 @@
</template>
</template>
<
script
>
<
script
>
import
tabbars
from
"@/components/tabbar/index"
;
import
tabbars
from
"@/components/tabbar/index"
;
import
auth
from
"../../components/auth/index.vue"
;
import
auth
from
"../../components/auth/index.vue"
;
import
blinddate
from
"./components/blinddate-user.vue"
;
import
blinddate
from
"./components/blinddate-user.vue"
;
...
@@ -351,6 +355,11 @@
...
@@ -351,6 +355,11 @@
0
;
0
;
},
},
methods
:
{
methods
:
{
navigatorToProfile
(){
uni
.
navigateTo
({
url
:
'/pages/user-center/user-profile'
})
},
//退出登录
//退出登录
signOutHandler
()
{
signOutHandler
()
{
uni
.
removeStorageSync
(
'b2b_user'
)
uni
.
removeStorageSync
(
'b2b_user'
)
...
@@ -610,6 +619,7 @@
...
@@ -610,6 +619,7 @@
</
script
>
</
script
>
<
style
>
<
style
>
@import
url('../../asset/css/flex.css')
;
.body
{
.body
{
background
:
#f3f4f6
;
background
:
#f3f4f6
;
height
:
100vh
;
height
:
100vh
;
...
...
pages/user-center/user-profile.vue
0 → 100644
View file @
544e4096
<
template
>
<view
class=
"user-profile column items-center"
>
<view
style=
"margin-top: 20vh;"
class=
"user-head"
:style=
"
{'background-image':`url(${user.photo})`}">
<button
class=
"editor-box"
open-type=
"chooseAvatar"
@
chooseavatar=
"avatarChangeHandle"
>
<u-icon
name=
"pen_"
size=
"20"
custom-prefix=
"tffont"
color=
"#121212"
></u-icon>
</button>
</view>
<view
class=
"row items-center"
style=
"width: 100%;border-top: 1px solid #f1f2f4;border-bottom: 1px solid #f1f2f4;margin-top: 60rpx;"
>
<u-field
class=
"col"
:labelWidth=
"180"
:padding=
"10"
type=
"nickname"
:maxlength=
'12'
@
input=
"changeNicknameHandle"
v-model=
"user.name"
label=
"昵称"
placeholder=
"请输入你的昵称信息"
></u-field>
<u-button
v-if=
"saveVisible"
size=
"mini"
class=
"q-mr-md"
type=
"success"
@
click=
"saveNicknameHandle"
>
保存
</u-button>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
user
:{},
saveVisible
:
false
}
},
onLoad
()
{
if
(
uni
.
getStorageSync
(
'b2b_user'
)){
this
.
user
=
uni
.
getStorageSync
(
'b2b_user'
)
}
else
{
uni
.
redirectTo
({
url
:
'/pages/index/index'
})
}
},
methods
:
{
avatarChangeHandle
(
e
){
const
{
avatarUrl
}
=
e
.
detail
;
if
(
!
avatarUrl
)
return
uni
.
showLoading
({
title
:
'正在上传头像...'
})
const
mallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
const
url
=
'https://mallapi.oytour.com'
+
'/api/File/UploadTencent?MallBaseId='
+
mallBaseId
uni
.
uploadFile
({
url
,
filePath
:
avatarUrl
,
// 用户选择的头像文件路径
name
:
'file'
,
formData
:
{
user
:
'tesdt'
},
success
:
(
uploadFileRes
)
=>
{
const
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
this
.
user
.
photo
=
data
.
data
uni
.
hideLoading
()
this
.
saveUserProfileHandle
()
},
fail
:
function
(
res
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'上传失败!'
,
icon
:
'none'
})
}
});
},
changeNicknameHandle
(){
const
{
name
}
=
uni
.
getStorageSync
(
'b2b_user'
)
if
(
this
.
user
.
name
==
''
)
this
.
user
.
name
=
name
this
.
saveVisible
=
this
.
user
.
name
!=
name
},
saveNicknameHandle
(){
if
(
this
.
user
.
name
!=
''
&&
this
.
saveVisible
)
this
.
saveUserProfileHandle
()
},
saveUserProfileHandle
(){
const
{
name
,
photo
}
=
this
.
user
const
parameters
=
{
Name
:
name
,
Photo
:
photo
}
uni
.
showLoading
({
title
:
'正在保存用户资料'
})
this
.
apipost
(
"HPSLUpdateUserInfo_post"
,
parameters
,
r
=>
{
uni
.
hideLoading
()
if
(
r
.
resultCode
==
1
){
uni
.
setStorageSync
(
'b2b_user'
,
this
.
user
)
return
;
}
uni
.
showToast
({
icon
:
'none'
,
title
:
'用户资料更新失败'
})
},
e
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
'none'
,
title
:
'用户资料更新失败'
})
})
}
}
}
</
script
>
<
style
>
@import
url('../../asset/css/flex.css')
;
.user-profile
{
height
:
100vh
;
}
.user-profile
.user-head
{
width
:
160
rpx
;
height
:
160
rpx
;
border-radius
:
20
rpx
;
position
:
relative
;
background-image
:
url('')
;
background-size
:
cover
;
}
.user-profile
.user-head
.editor-box
{
width
:
40
rpx
;
height
:
40
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
position
:
absolute
;
right
:
-20
rpx
;
top
:
-20
rpx
;
background-color
:
#FFF
;
border-radius
:
40
rpx
;
box-shadow
:
0
0
20
rpx
#00000033
;
border
:
none
;
outline
:
none
;
padding
:
0
;
}
</
style
>
plugin/api.js
View file @
544e4096
...
@@ -23,10 +23,10 @@ export default {
...
@@ -23,10 +23,10 @@ export default {
install
(
Vue
,
options
)
{
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue
.
prototype
.
host2
=
"http://192.168.5.
56
:8033"
Vue
.
prototype
.
host2
=
"http://192.168.5.
214
:8033"
//Vue.prototype.host3 = "http://192.168.5.46:8501
"
Vue
.
prototype
.
host3
=
"http://192.168.5.214
"
//Vue.prototype.host2 = "https://erpmallapi.oytour.com"
//Vue.prototype.host2 = "https://erpmallapi.oytour.com"
Vue
.
prototype
.
host3
=
"https://reborn.oytour.com"
//
Vue.prototype.host3 = "https://reborn.oytour.com"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
//网络请求
...
...
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