Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
78b14be0
Commit
78b14be0
authored
Feb 22, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 用户协议和隐私政策
parent
0ec66805
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1998 additions
and
5 deletions
+1998
-5
pages.json
src/pages.json
+20
-0
index.vue
src/pages/login/index.vue
+60
-5
privacy-policy.vue
src/pages/login/privacy-policy.vue
+864
-0
user-agreement.vue
src/pages/login/user-agreement.vue
+1054
-0
No files found.
src/pages.json
View file @
78b14be0
...
@@ -44,6 +44,26 @@
...
@@ -44,6 +44,26 @@
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
{
"path"
:
"user-agreement"
,
"name"
:
"user-agreement"
,
"style"
:
{
"navigationBarTitleText"
:
"用户协议"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
"path"
:
"privacy-policy"
,
"name"
:
"privacy-policy"
,
"style"
:
{
"navigationBarTitleText"
:
"隐私政策"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
}
}
]
]
},
},
...
...
src/pages/login/index.vue
View file @
78b14be0
...
@@ -37,6 +37,12 @@
...
@@ -37,6 +37,12 @@
绑定手机
绑定手机
</button>
</button>
</view>
</view>
<view
class=
"agreen u-flex"
>
<view
class=
"check-view"
@
click=
"handleClickAgreen"
>
<view
:class=
"['check-icon',
{'checked': agreen}]">
<u-icon
v-if=
"agreen"
name=
"checkmark-circle"
size=
"30"
color=
"#3878FF"
></u-icon></view>
<view>
我已阅读并同意
<text
@
click
.
stop=
"handleClick('user-agreement')"
hover-class=
"u-hover-class"
class=
"rule"
>
《用户服务协议》
</text>
和
<text
@
click
.
stop=
"handleClick('privacy-policy')"
hover-class=
"u-hover-class"
class=
"rule"
>
《隐私政策》
</text></view>
</view>
</view>
</view>
</view>
<view>
<view>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
...
@@ -52,6 +58,7 @@ export default {
...
@@ -52,6 +58,7 @@ export default {
host
:
''
,
//配置为自己的额服务器即可
host
:
''
,
//配置为自己的额服务器即可
returnUrl
:
''
,
//跳回页面
returnUrl
:
''
,
//跳回页面
needAuth
:
true
,
needAuth
:
true
,
agreen
:
false
}
}
},
},
computed
:
{
computed
:
{
...
@@ -74,6 +81,10 @@ export default {
...
@@ -74,6 +81,10 @@ export default {
},
},
// 微信登录
// 微信登录
wxLogin
()
{
wxLogin
()
{
if
(
!
this
.
agreen
)
{
this
.
$u
.
toast
(
'请阅读并同意《用户服务协议》和《隐私政策》'
);
return
;
}
// 获取code 小程序专有,用户登录凭证。
// 获取code 小程序专有,用户登录凭证。
uni
.
getUserProfile
({
uni
.
getUserProfile
({
desc
:
'获取用户基本资料'
,
desc
:
'获取用户基本资料'
,
...
@@ -149,6 +160,10 @@ export default {
...
@@ -149,6 +160,10 @@ export default {
},
},
// 绑定手机
// 绑定手机
getphonenumber
(
e
)
{
getphonenumber
(
e
)
{
if
(
!
this
.
agreen
)
{
this
.
$u
.
toast
(
'请阅读并同意《用户服务协议》和《隐私政策》'
);
return
;
}
if
(
e
&&
e
.
detail
)
{
if
(
e
&&
e
.
detail
)
{
if
(
e
.
detail
.
errMsg
.
indexOf
(
'user deny'
)
>
-
1
)
{
if
(
e
.
detail
.
errMsg
.
indexOf
(
'user deny'
)
>
-
1
)
{
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -236,11 +251,19 @@ export default {
...
@@ -236,11 +251,19 @@ export default {
console
.
log
(
err
)
console
.
log
(
err
)
})
})
},
},
handleClickAgreen
()
{
this
.
agreen
=
!
this
.
agreen
},
handleClick
(
path
)
{
this
.
$u
.
route
({
url
:
'/pages/login/'
+
path
,
})
}
},
},
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
lang=
"scss"
>
::-webkit-scrollbar
{
::-webkit-scrollbar
{
width
:
0
;
width
:
0
;
height
:
0
;
height
:
0
;
...
@@ -266,11 +289,11 @@ export default {
...
@@ -266,11 +289,11 @@ export default {
/* justify-content: center; */
/* justify-content: center; */
}
}
.text-area
{
.text-area
{
display
:
flex
;
//
display: flex;
justify-content
:
center
;
//
justify-content: center;
position
:
relative
;
//
position: relative;
position
:
fixed
;
position
:
fixed
;
bottom
:
1
0
0
rpx
;
bottom
:
1
6
0rpx
;
}
}
.bottom
{
.bottom
{
width
:
600rpx
;
width
:
600rpx
;
...
@@ -307,4 +330,36 @@ export default {
...
@@ -307,4 +330,36 @@ export default {
.view-image
{
.view-image
{
padding-top
:
200rpx
;
padding-top
:
200rpx
;
}
}
.agreen
{
position
:
fixed
;
bottom
:
44rpx
;
color
:
#8D8D8D
;
font-size
:
24rpx
;
text-align
:
center
;
margin-bottom
:
36rpx
;
justify-content
:
center
;
margin-top
:
24rpx
;
.check-view
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
16rpx
20rpx
;
.check-icon
{
width
:
28rpx
;
height
:
28rpx
;
border
:
2rpx
solid
#cccccc
;
border-radius
:
50%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
margin-right
:
16rpx
;
&
.checked
{
border-width
:
0
;
}
}
.rule
{
color
:
#3878FF
;
}
}
}
</
style
>
</
style
>
src/pages/login/privacy-policy.vue
0 → 100644
View file @
78b14be0
This diff is collapsed.
Click to expand it.
src/pages/login/user-agreement.vue
0 → 100644
View file @
78b14be0
This diff is collapsed.
Click to expand it.
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