Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5869b7f7
authored
May 18, 2021
by
fanx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
系统字体设置
1 parent
07ccd515
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
161 additions
and
17 deletions
src/assets/css/sprite.less
src/assets/icon/empty.png
src/assets/images/sprite.png
src/views/user/login/loginPhone.vue
src/views/user/login/loginUserName.vue
src/views/user/login/register.vue
src/views/user/person/components/UpdatePhoto.vue
src/views/user/setting/index.vue
src/assets/css/sprite.less
View file @
5869b7f
...
@@ -17,20 +17,21 @@
...
@@ -17,20 +17,21 @@
.icon-change-name { width: 1155px; height: 303px; background-position: 0px -1060px; }
.icon-change-name { width: 1155px; height: 303px; background-position: 0px -1060px; }
.icon-change-representive { width: 1155px; height: 303px; background-position: 0px -1383px; }
.icon-change-representive { width: 1155px; height: 303px; background-position: 0px -1383px; }
.icon-email { width: 36px; height: 36px; background-position: -2711px -1598px; }
.icon-email { width: 36px; height: 36px; background-position: -2711px -1598px; }
.icon-empty { width: 36px; height: 36px; background-position: -2767px -1598px; }
.icon-icon-arrow-right { width: 10px; height: 18px; background-position: -2879px -1598px; }
.icon-icon-arrow-right { width: 10px; height: 18px; background-position: -2879px -1598px; }
.icon-icon-classify { width: 30px; height: 30px; background-position: -1844px -582px; }
.icon-icon-classify { width: 30px; height: 30px; background-position: -1844px -582px; }
.icon-icon-clock { width: 30px; height: 30px; background-position: -1894px -582px; }
.icon-icon-clock { width: 30px; height: 30px; background-position: -1894px -582px; }
.icon-join-member { width: 90px; height: 90px; background-position: -1624px -526px; }
.icon-join-member { width: 90px; height: 90px; background-position: -1624px -526px; }
.icon-logo-2 { width: 118px; height: 112px; background-position: -1376px -526px; }
.icon-logo-2 { width: 118px; height: 112px; background-position: -1376px -526px; }
.icon-logo { width: 224px; height: 224px; background-position: -1175px -737px; }
.icon-logo { width: 224px; height: 224px; background-position: -1175px -737px; }
.icon-password { width: 36px; height: 36px; background-position: -2
767
px -1598px; }
.icon-password { width: 36px; height: 36px; background-position: -2
823
px -1598px; }
.icon-photo-default { width: 124px; height: 124px; background-position: -1232px -526px; }
.icon-photo-default { width: 124px; height: 124px; background-position: -1232px -526px; }
.icon-question-icon { width: 36px; height: 36px; background-position: -
2823px -1598
px; }
.icon-question-icon { width: 36px; height: 36px; background-position: -
1844px -526
px; }
.icon-quit-member { width: 90px; height: 90px; background-position: -1734px -526px; }
.icon-quit-member { width: 90px; height: 90px; background-position: -1734px -526px; }
.icon-shtyxydm { width: 54px; height: 54px; background-position: -2180px -1598px; }
.icon-shtyxydm { width: 54px; height: 54px; background-position: -2180px -1598px; }
.icon-tel { width: 36px; height: 36px; background-position: -1
844
px -526px; }
.icon-tel { width: 36px; height: 36px; background-position: -1
900
px -526px; }
.icon-time-update { width: 45px; height: 45px; background-position: -2254px -1598px; }
.icon-time-update { width: 45px; height: 45px; background-position: -2254px -1598px; }
.icon-user-question { width: 32px; height: 36px; background-position: -
2012px -526
px; }
.icon-user-question { width: 32px; height: 36px; background-position: -
1232px -670
px; }
.icon-user { width: 36px; height: 36px; background-position: -19
00
px -526px; }
.icon-user { width: 36px; height: 36px; background-position: -19
56
px -526px; }
.icon-verification { width: 36px; height: 36px; background-position: -
1956
px -526px; }
.icon-verification { width: 36px; height: 36px; background-position: -
2012
px -526px; }
.icon-wechat { width: 80px; height: 78px; background-position: -2080px -1598px; }
.icon-wechat { width: 80px; height: 78px; background-position: -2080px -1598px; }
\ No newline at end of file
\ No newline at end of file
src/assets/icon/empty.png
0 → 100644
View file @
5869b7f
1.42 KB
src/assets/images/sprite.png
View file @
5869b7f
1.47 MB
|
W:
|
H:
1.47 MB
|
W:
|
H:
2-up
Swipe
Onion skin
src/views/user/login/loginPhone.vue
View file @
5869b7f
...
@@ -81,7 +81,10 @@ export default {
...
@@ -81,7 +81,10 @@ export default {
// 跳转注册页面
// 跳转注册页面
jumpRigster
()
{
jumpRigster
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/user/register'
path
:
'/user/register'
,
query
:{
source
:
'phone'
}
})
})
},
},
}
}
...
...
src/views/user/login/loginUserName.vue
View file @
5869b7f
...
@@ -83,7 +83,10 @@ export default {
...
@@ -83,7 +83,10 @@ export default {
// 跳转注册页面
// 跳转注册页面
jumpRigster
()
{
jumpRigster
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/user/register'
path
:
'/user/register'
,
query
:{
source
:
'username'
}
})
})
},
},
// 打开/关闭 忘记密码框
// 打开/关闭 忘记密码框
...
...
src/views/user/login/register.vue
View file @
5869b7f
...
@@ -4,18 +4,119 @@
...
@@ -4,18 +4,119 @@
<div
class=
"login_box"
>
<div
class=
"login_box"
>
<NafmHeader
navClass=
"nafmii-head-bg1"
/>
<NafmHeader
navClass=
"nafmii-head-bg1"
/>
</div>
</div>
<div
class=
"login_content"
>
<div
class=
"login_form_box"
>
<div
class=
"login_form"
>
<van-field
v-model
.
trim=
"phone"
clearable
type=
"tel"
maxlength=
"11"
:left-icon=
"phoneIcon"
placeholder=
"请输入手机号"
/>
<van-field
v-model
.
trim=
"verification"
clearable
label=
""
type=
"tel"
maxlength=
"6"
:left-icon=
"VerificationIcon"
placeholder=
"请输入验证码"
>
<template
#
button
>
<SendVerificationCode
:phone=
"phone"
:data=
"objParams"
/>
</
template
>
</van-field>
<van-field
v-model
.
trim=
"password"
clearable
type=
"password"
maxlength=
"16"
:left-icon=
"passwordIcon"
placeholder=
"请输入6-16位密码"
/>
<van-field
v-model
.
trim=
"aginPassword"
clearable
type=
"password"
maxlength=
"16"
:left-icon=
"emptyIcon"
placeholder=
"再次输入6-16位密码"
/>
<div
class=
"login_btn"
:class=
"{loginActive:isBothValue}"
@
click=
"handleRegister"
>
注 册
</div>
<div
class=
"go_login_btn "
@
click=
"jumpLoginPage"
>
有账号去登录
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
SendVerificationCode
from
'@/components/SendVerificationCode'
import
utils
from
"@/utils/"
;
export
default
{
export
default
{
name
:
'Register'
,
name
:
'Register'
,
components
:
{},
components
:
{
SendVerificationCode
},
data
()
{
data
()
{
return
{}
return
{
phone
:
null
,
verification
:
""
,
password
:
""
,
aginPassword
:
""
,
objParams
:
{
type
:
'phone'
},
type
:
'phone'
,
phoneIcon
:
require
(
'@/assets/icon/user.png'
),
VerificationIcon
:
require
(
'@/assets/icon/verification.png'
),
passwordIcon
:
require
(
'@/assets/icon/password.png'
),
emptyIcon
:
require
(
'@/assets/icon/empty.png'
),
}
},
computed
:
{
isBothValue
()
{
if
(
this
.
phone
&&
this
.
verification
&&
this
.
password
&&
this
.
aginPassword
)
{
return
true
}
else
{
return
false
}
},
},
},
mounted
(){
mounted
()
{
// this.
// this.
},
},
methods
:
{}
methods
:
{
// 注册操作
handleRegister
()
{
if
(
!
this
.
phone
)
{
Toast
(
'请输入手机号'
)
return
}
if
(
!
utils
.
phoneRegCheck
(
this
.
phone
))
{
Toast
(
"请输入正确的手机号码!"
);
return
}
if
(
!
this
.
verification
)
{
Toast
(
'请输入验证码'
)
return
}
if
(
!
this
.
password
)
{
Toast
(
'请输入密码'
)
return
}
if
(
!
this
.
aginPassword
)
{
Toast
(
'请再次输入密码'
)
return
}
if
(
this
.
password
!=
this
.
aginPassword
)
{
Toast
(
'两次密码输入不一致,请重新输入'
)
return
}
// todo 请求接口
console
.
log
(
1
)
},
// 跳转到登录页面
jumpLoginPage
()
{
const
{
source
}
=
this
.
$route
.
query
if
(
source
==
'phone'
||
source
==
'username'
)
{
this
.
$router
.
back
()
}
else
{
this
.
$router
.
push
({
path
:
'/user/login/phone'
})
}
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
@import
"./less/login.less"
;
.register_container
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.go_login_btn
{
margin-top
:
10px
;
display
:
flex
;
justify-content
:
center
;
color
:
#106ABC
;
font-size
:
13px
;
}
}
</
script
>
\ No newline at end of file
\ No newline at end of file
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/user/person/components/UpdatePhoto.vue
View file @
5869b7f
<
template
>
<
template
>
<div
class=
"updatePhoto_container"
>
<div
class=
"updatePhoto_container"
>
<NafmHeader
:title=
"$t('title.photo')"
:showBack=
"true"
navClass=
"nafmii-head-bg3
"
@
onBack=
"$emit('close')"
>
<NafmHeader
title=
" "
:showBack=
"true"
bgColor=
"#000
"
@
onBack=
"$emit('close')"
>
<template
slot=
"right"
>
<template
slot=
"right"
>
<span
class=
"finish"
@
click=
"handleSave"
>
{{
$t
(
'button.save'
)
}}
</span>
<span
class=
"finish"
@
click=
"handleSave"
>
{{
$t
(
'button.save'
)
}}
</span>
</
template
>
</
template
>
</NafmHeader>
</NafmHeader>
<img
:src=
"image"
ref=
"image"
>
<img
:src=
"image"
ref=
"image"
class=
"image"
>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
// 图片上传 格式Content-Type: multipart/form-data,则一定要提交FormatData对象
// 图片上传 格式Content-Type: multipart/form-data,则一定要提交FormatData对象
const
fd
=
new
FormData
()
const
fd
=
new
FormData
()
// fd.append('photo', this.file)
// fd.append('photo', this.file)
const
file
=
await
this
.
getCroppedCanvas
()
const
file
=
await
this
.
getCroppedCanvas
()
fd
.
append
(
'photo'
,
file
)
fd
.
append
(
'photo'
,
file
)
// api 调用 todo
// api 调用 todo
...
@@ -68,8 +68,13 @@ export default {
...
@@ -68,8 +68,13 @@ export default {
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.updatePhoto_container
{
.updatePhoto_container
{
height
:
100vh
;
height
:
100vh
;
background
:
#000
;
}
}
/
deep
/
.cropper-view-box
{
/
deep
/
.cropper-view-box
{
border-radius
:
50%
;
border-radius
:
50%
;
}
}
.image
{
display
:
block
;
max-width
:
100%
;
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/user/setting/index.vue
View file @
5869b7f
<
template
>
<
template
>
<div
class=
"setting_container"
>
<div
class=
"setting_container"
>
<NafmHeader
navClass=
"nafmii-head-bg3"
:title=
"$t('title.setting')"
/>
<NafmHeader
navClass=
"nafmii-head-bg3"
:title=
"$t('title.setting')"
/>
<div
class=
"setting_list"
>
<div
class=
"setting_list"
>
<!--
<!--
<van-cell
:title=
"$t('setting.newMsgTip')"
center
value-class=
"right_content"
>
<van-cell
:title=
"$t('setting.newMsgTip')"
center
value-class=
"right_content"
>
...
@@ -32,6 +32,12 @@
...
@@ -32,6 +32,12 @@
</template>
</template>
</van-cell>
</van-cell>
-->
-->
<van-cell
title=
"系统字体设置"
center
is-link
@
click=
"showSysFont=true"
value-class=
"right_content"
>
<
template
#
default
>
<span>
{{
sysFontText
}}
</span>
</
template
>
</van-cell>
</div>
</div>
<div
class=
"agreement_list"
>
<div
class=
"agreement_list"
>
<van-cell
:title=
"$t('setting.privacyPolicy')"
center
is-link
@
click=
"jumpPrivacyPage"
value-class=
"right_content"
/>
<van-cell
:title=
"$t('setting.privacyPolicy')"
center
is-link
@
click=
"jumpPrivacyPage"
value-class=
"right_content"
/>
...
@@ -41,10 +47,14 @@
...
@@ -41,10 +47,14 @@
<van-button
type=
"primary"
plain
color=
"#a4a4a4"
class=
"logout_btn"
@
click=
"handleLogout"
>
{{$t('button.logout')}}
</van-button>
<van-button
type=
"primary"
plain
color=
"#a4a4a4"
class=
"logout_btn"
@
click=
"handleLogout"
>
{{$t('button.logout')}}
</van-button>
<van-action-sheet
v-model=
"showZhEn"
:actions=
"actions"
:cancel-text=
"$t('button.cancel')"
close-on-click-action
@
cancel=
"controllZhEn(false)"
@
select=
"changeLang"
/>
<van-action-sheet
v-model=
"showZhEn"
:actions=
"actions"
:cancel-text=
"$t('button.cancel')"
close-on-click-action
@
cancel=
"controllZhEn(false)"
@
select=
"changeLang"
/>
<van-popup
v-model=
"showSysFont"
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"columns"
@
confirm=
"onConfirm"
@
cancel=
"showSysFont = false"
/>
</van-popup>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
setLocalStorage
,
getLocalStorage
,
removeLocalStorage
}
from
'@/utils/LocalStorage'
import
{
setLocalStorage
,
getLocalStorage
,
removeLocalStorage
}
from
'@/utils/LocalStorage'
import
{
NativeApi
}
from
'@/api/NativeApis'
;
export
default
{
export
default
{
name
:
'Setting'
,
name
:
'Setting'
,
data
()
{
data
()
{
...
@@ -53,6 +63,9 @@ export default {
...
@@ -53,6 +63,9 @@ export default {
showZhEn
:
false
,
// 弹出中英文设置
showZhEn
:
false
,
// 弹出中英文设置
fingerprintChecked
:
false
,
// 指纹ID解锁状态
fingerprintChecked
:
false
,
// 指纹ID解锁状态
faceIdChecked
:
false
,
// 面容ID解锁状态
faceIdChecked
:
false
,
// 面容ID解锁状态
showSysFont
:
false
,
sysFontText
:
'标准'
,
columns
:
[
'较小'
,
'标准'
,
'较大'
,
'超大'
],
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -145,6 +158,24 @@ export default {
...
@@ -145,6 +158,24 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/user/center'
path
:
'/user/center'
})
})
},
// 切换字体大小
onConfirm
(
value
)
{
this
.
sysFontText
=
value
let
size
;
if
(
value
==
'较小'
)
{
size
=
95
}
else
if
(
value
==
'较大'
)
{
size
=
110
}
else
if
(
value
==
'超大'
)
{
size
=
120
}
else
{
size
=
100
}
NativeApi
.
nativeTextZoom
({
value
:
size
})
this
.
showSysFont
=
false
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment