Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
193da193
Commit
193da193
authored
Mar 21, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除协议
parent
c31500e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
133 deletions
+1
-133
src/components/privacyPopup/index.vue
+0
-119
src/pages/login/index.vue
+1
-14
No files found.
src/components/privacyPopup/index.vue
deleted
100644 → 0
View file @
c31500e9
<
template
>
<van-popup
:show=
"isShow"
round
>
<div
class=
"privacy-container"
>
<div
class=
"privacy-container__header"
>
<div
class=
"title"
>
隐私保护指引
</div>
<div
class=
"content"
>
在使用当前小程序服务之前,请仔细阅读
<span
@
click=
"handleDetail"
>
{{
privacyContractName
}}
</span>
。如您同意
{{
privacyContractName
}}
,请点击“同意”开始使用。如您拒绝,将无法完整使用所有服务。
</div>
</div>
<div
class=
"privacy-container__bottom van-hairline--top"
>
<button
class=
"refuse"
@
click=
"handleExpose('onRefuse')"
>
拒绝
</button>
<button
class=
"agree"
open-type=
"agreePrivacyAuthorization"
@
agreeprivacyauthorization=
"handleExpose('onAgree')"
>
同意
</button>
</div>
</div>
</van-popup>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
isShow
:
false
,
privacyContractName
:
""
,
// 协议名称
}
},
onLoad
()
{
this
.
init
();
},
methods
:
{
init
()
{
if
(
wx
.
getPrivacySetting
)
{
wx
.
getPrivacySetting
({
success
:
res
=>
{
if
(
res
.
needAuthorization
)
{
// 需要用户授权
this
.
isShow
=
res
.
needAuthorization
;
this
.
privacyContractName
=
res
.
privacyContractName
;
}
}
})
}
},
// 跳转隐私协议详情
handleDetail
()
{
wx
.
openPrivacyContract
({
fail
:
()
=>
wx
.
showToast
({
title
:
'遇到错误'
,
icon
:
'error'
}),
});
},
// 暴露事件
handleExpose
(
type
)
{
this
.
isShow
=
false
;
this
.
$emit
(
type
);
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.privacy-container
{
min-width
:
80vw
;
background-color
:
#fff
;
&__header
{
padding
:
30px
;
font-size
:
17px
;
color
:
#333
;
.title
{
font-weight
:
500
;
text-align
:
center
;
}
.content
{
line-height
:
1.5
;
margin-top
:
20px
;
color
:
#7f7f7f
;
text-align
:
justify
;
//
体验增强
span
{
color
:
#1989fa
;
}
}
}
&
__bottom
{
display
:
flex
;
align-items
:
center
;
div,
button
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
border-radius
:
8px
;
flex
:
1
;
margin
:
0
15px
20px
;
}
button
::after
{
border
:
none
;
}
.refuse
{
background
:
#f4f4f5
;
color
:
#909399
;
}
.agree
{
background
:
#07c160
;
color
:
#fff
;
}
}
}
</
style
>
\ No newline at end of file
src/pages/login/index.vue
View file @
193da193
...
@@ -82,8 +82,6 @@
...
@@ -82,8 +82,6 @@
<!-- 选择企业 -->
<!-- 选择企业 -->
<SelectEnterpriseAccount
ref=
"SelectEnterpriseAccount"
@
confirm=
"getEnterpriseAccount"
></SelectEnterpriseAccount>
<SelectEnterpriseAccount
ref=
"SelectEnterpriseAccount"
@
confirm=
"getEnterpriseAccount"
></SelectEnterpriseAccount>
<ProtocolDialog
v-model=
"isShowProtocol"
:index=
"currentIndex"
:isShowReadTime=
"isShowReadTime"
:protocolList=
"[userAgreement, privacyPolicy].filter(Boolean)"
@
onAgree=
"handleAgree"
/>
<ProtocolDialog
v-model=
"isShowProtocol"
:index=
"currentIndex"
:isShowReadTime=
"isShowReadTime"
:protocolList=
"[userAgreement, privacyPolicy].filter(Boolean)"
@
onAgree=
"handleAgree"
/>
<!-- 隐私弹窗 -->
<PrivacyPopup
@
onAgree=
"handleAgree"
@
onRefuse=
"back"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -104,7 +102,6 @@ import text from '@/components/content/text'
...
@@ -104,7 +102,6 @@ import text from '@/components/content/text'
import
richText
from
"../../components/basicTool/rich-text"
;
import
richText
from
"../../components/basicTool/rich-text"
;
import
interval
from
'@/components/basicTool/interval/index.vue'
import
interval
from
'@/components/basicTool/interval/index.vue'
import
partition
from
'@/components/basicTool/partition/index.vue'
import
partition
from
'@/components/basicTool/partition/index.vue'
import
PrivacyPopup
from
'@/components/privacyPopup'
import
SelectEnterpriseAccount
from
"@/components/common/SelectEnterpriseAccount"
import
SelectEnterpriseAccount
from
"@/components/common/SelectEnterpriseAccount"
const
app
=
getApp
();
const
app
=
getApp
();
const
{
log
}
=
app
;
const
{
log
}
=
app
;
...
@@ -119,8 +116,7 @@ export default {
...
@@ -119,8 +116,7 @@ export default {
loginBox
,
loginBox
,
loginUserAgreement
,
loginUserAgreement
,
SelectEnterpriseAccount
,
SelectEnterpriseAccount
,
ProtocolDialog
,
ProtocolDialog
PrivacyPopup
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -268,9 +264,6 @@ export default {
...
@@ -268,9 +264,6 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
back
()
{
wx
.
navigateBack
()
},
conF
(
val
)
{
conF
(
val
)
{
this
.
checked
=
val
;
this
.
checked
=
val
;
},
},
...
@@ -1004,12 +997,6 @@ export default {
...
@@ -1004,12 +997,6 @@ export default {
this
.
isShowReadTime
=
!
this
.
checked
;
this
.
isShowReadTime
=
!
this
.
checked
;
this
.
isShowProtocol
=
true
;
this
.
isShowProtocol
=
true
;
},
},
handleAgree
()
{
this
.
checked
=
true
;
if
(
this
.
$refs
.
agreement
)
{
this
.
$refs
.
agreement
[
0
].
checked
=
true
;
}
}
}
}
};
};
</
script
>
</
script
>
...
...
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