Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
1bb1f71c
Commit
1bb1f71c
authored
Sep 01, 2023
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 适配华为
parent
a692d7e0
Pipeline
#6712
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
7 deletions
+28
-7
index.vue
components/pop-normal/index.vue
+13
-5
index.vue
pages/index/index.vue
+15
-2
No files found.
components/pop-normal/index.vue
View file @
1bb1f71c
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</view>
</view>
<slot
v-else
/>
<slot
v-else
/>
</view>
</view>
<view
v-if=
"
isShare
"
class=
"bottom-tip"
>
<view
v-if=
"
tipTop
"
class=
"bottom-tip"
>
<view
class=
"tip-view"
>
{{
bottomTip
}}
</view>
<view
class=
"tip-view"
>
{{
bottomTip
}}
</view>
</view>
</view>
<view
class=
"buttons-view"
>
<view
class=
"buttons-view"
>
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
</view>
</view>
</view>
</view>
<view
<view
v-if=
"bottomTip && !
isShare
"
v-if=
"bottomTip && !
tipTop
"
:class=
"['bottom-tip',
{ select: select }]"
:class=
"['bottom-tip',
{ select: select }]"
:hover-class="isSelect ? 'u-hover-class' : ''"
:hover-class="isSelect ? 'u-hover-class' : ''"
@click="$u.throttle(handleSelect, 500)"
@click="$u.throttle(handleSelect, 500)"
...
@@ -117,7 +117,7 @@ export default {
...
@@ -117,7 +117,7 @@ export default {
type
:
String
,
type
:
String
,
default
:
''
,
default
:
''
,
},
},
// normal 普通; error 红色确认;select 底部有个勾选;share 分享领三天会员;renew 续费提示
// normal 普通; error 红色确认;select 底部有个勾选;share 分享领三天会员;renew 续费提示
,huawei 华为必须免费体验
type
:
{
type
:
{
type
:
String
,
type
:
String
,
default
:
'normal'
,
default
:
'normal'
,
...
@@ -167,6 +167,12 @@ export default {
...
@@ -167,6 +167,12 @@ export default {
isRenew
()
{
isRenew
()
{
return
this
.
type
==
'renew'
return
this
.
type
==
'renew'
},
},
isHuaWei
()
{
return
this
.
type
==
'huawei'
},
tipTop
()
{
return
this
.
isShare
||
this
.
isHuaWei
},
customCancel
()
{
customCancel
()
{
return
{
return
{
color
:
'transparent'
,
color
:
'transparent'
,
...
@@ -195,7 +201,7 @@ export default {
...
@@ -195,7 +201,7 @@ export default {
this
.
loading
=
this
.
loadingShow
this
.
loading
=
this
.
loadingShow
this
.
changeVisibleValue
(
false
)
this
.
changeVisibleValue
(
false
)
this
.
$emit
(
'confirm'
,
this
.
select
)
this
.
$emit
(
'confirm'
,
this
.
select
)
if
(
this
.
isShare
||
this
.
isRenew
)
{
if
(
this
.
isShare
||
this
.
isRenew
||
this
.
isHuaWei
)
{
// 去开通会员
// 去开通会员
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/mine/pay/pay'
,
url
:
'pages/mine/pay/pay'
,
...
@@ -211,7 +217,9 @@ export default {
...
@@ -211,7 +217,9 @@ export default {
if
(
this
.
isShare
)
{
if
(
this
.
isShare
)
{
// 分享领会员
// 分享领会员
this
.
$emit
(
'share'
)
this
.
$emit
(
'share'
,
true
)
}
else
if
(
this
.
isHuaWei
){
this
.
$emit
(
'share'
,
false
)
// 华为直接领取,不用分享
}
else
{
}
else
{
this
.
$emit
(
'cancel'
)
this
.
$emit
(
'cancel'
)
}
}
...
...
pages/index/index.vue
View file @
1bb1f71c
...
@@ -99,6 +99,7 @@
...
@@ -99,6 +99,7 @@
<PopNormal
<PopNormal
:visible
.
sync=
"visible"
:visible
.
sync=
"visible"
:type=
"currentPop.type"
:type=
"currentPop.type"
:content=
"currentPop.content"
:confirmText=
"currentPop.confirmText"
:confirmText=
"currentPop.confirmText"
:cancelText=
"currentPop.cancelText"
:cancelText=
"currentPop.cancelText"
@
share=
"handleClickShare"
@
share=
"handleClickShare"
...
@@ -196,6 +197,14 @@ export default {
...
@@ -196,6 +197,14 @@ export default {
},
},
popInfos
()
{
popInfos
()
{
return
[
return
[
this
.
isHuaWei
?
{
type
:
'huawei'
,
content
:
'您还不是会员,每位用户可享受三天免费会员体验'
,
cancelText
:
'去体验'
,
confirmText
:
'直接购买'
,
bottomTip
:
'※ 体验会员,仅非会员用户领取,每个ID限领1次'
}:
{
{
type
:
'share'
,
type
:
'share'
,
confirmText
:
'开通会员'
,
confirmText
:
'开通会员'
,
...
@@ -265,6 +274,9 @@ export default {
...
@@ -265,6 +274,9 @@ export default {
dateString
()
{
dateString
()
{
var
string
=
this
.
date
.
replace
(
/-/g
,
'/'
);
var
string
=
this
.
date
.
replace
(
/-/g
,
'/'
);
return
this
.
$u
.
timeFormat
(
new
Date
(
string
).
getTime
(),
'yyyy年mm月'
);
return
this
.
$u
.
timeFormat
(
new
Date
(
string
).
getTime
(),
'yyyy年mm月'
);
},
isHuaWei
()
{
return
this
.
platform
===
"4"
&&
this
.
systemInfo
&&
this
.
systemInfo
.
deviceBrand
===
"huawei"
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -545,7 +557,7 @@ export default {
...
@@ -545,7 +557,7 @@ export default {
});
});
}
}
},
},
handleClickShare
()
{
handleClickShare
(
share
=
true
)
{
var
block
=
()
=>
{
var
block
=
()
=>
{
if
(
this
.
userInfo
.
vip
.
code
==
'NO'
)
{
if
(
this
.
userInfo
.
vip
.
code
==
'NO'
)
{
this
.
isVipShare
=
true
;
this
.
isVipShare
=
true
;
...
@@ -563,6 +575,7 @@ export default {
...
@@ -563,6 +575,7 @@ export default {
};
};
block
();
block
();
// #ifdef APP-PLUS
// #ifdef APP-PLUS
if
(
!
share
)
return
uni
.
share
({
uni
.
share
({
provider
:
'weixin'
,
provider
:
'weixin'
,
scene
:
'WXSceneSession'
,
scene
:
'WXSceneSession'
,
...
...
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