Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-customer-new-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-customer-new-master
Commits
09acb621
Commit
09acb621
authored
Dec 31, 2024
by
Smile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app会员升级提示
parent
cb3f2109
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
0 deletions
+83
-0
index.vue
src/pages/index/index.vue
+83
-0
No files found.
src/pages/index/index.vue
View file @
09acb621
...
...
@@ -145,6 +145,22 @@
</view>
</view>
</uni-popup>
<uni-popup
ref=
"updatePopup"
type=
"center"
:mask-click=
"false"
>
<view
class=
"ad-conten"
>
<image
@
click=
"closeAd"
class=
"ad-bg"
src=
"../../static/img/index_close.png"
></image>
<view
class=
"ad-title"
>
{{ this.levelTitle }}
</view>
<view
class=
"ad-info"
>
<rich-text
:nodes=
"this.levelLeviteInfo"
></rich-text>
</view>
<view
class=
"ad-btns"
>
<view
class=
"ad-btn"
@
click=
"closeUpdate"
>
<view>
{{ $lang.lang.index.know }}
</view>
</view>
</view>
</view>
</uni-popup>
<uni-popup
ref=
"choiceTransport"
type=
"center"
:mask-click=
"false"
>
<view
class=
"ad-conten type-1"
>
<image
@
click=
"closeTransport"
class=
"ad-bg1"
src=
"../../static/img/colse1.png"
></image>
...
...
@@ -193,6 +209,7 @@
<
script
>
import
md5
from
'
js-md5
'
import
{
parseTime
}
from
"
@/utils
"
;
export
default
{
data
()
{
...
...
@@ -228,6 +245,10 @@ export default {
statusData
:
[],
name
:
{},
adData
:
{},
updateAdData
:
{},
membershipLevels
:[],
levelLeviteInfo
:
''
,
levelTitle
:
''
,
noticeData
:
[],
msgHave
:
false
,
version
:
'
1.0.2
'
,
...
...
@@ -244,6 +265,9 @@ export default {
searchKey
:
''
//搜索关键词
}
},
created
()
{
this
.
getMembershipLevels
()
},
onLoad
(
options
)
{
this
.
getIdcard
()
this
.
getStatusData
()
...
...
@@ -263,6 +287,14 @@ export default {
}
},
methods
:
{
//获取等级列表
getMembershipLevels
()
{
this
.
$request
.
getConfig
(
'
membership_levels
'
).
then
(
res
=>
{
if
(
res
.
code
==
0
&&
res
.
data
&&
res
.
data
.
list
.
length
>
0
){
this
.
membershipLevels
=
res
.
data
.
list
}
})
},
toupdate
()
{
let
that
=
this
if
(
that
.
showdownLine
)
return
...
...
@@ -356,6 +388,7 @@ export default {
getUserInfo
()
{
let
that
=
this
that
.
$request
.
get
(
'
/app-api/member/user/get
'
).
then
((
res
)
=>
{
let
userInfo
=
res
.
data
console
.
log
(
res
.
data
)
if
(
res
.
code
==
0
&&
res
.
data
)
{
if
(
res
.
data
.
isSimplePassword
)
{
...
...
@@ -371,6 +404,7 @@ export default {
})
}
else
if
(
!
that
.
preLoginPage
)
{
that
.
openAd
()
that
.
getUpdateOpenAd
(
userInfo
)
// #ifdef APP-PLUS
if
(
that
.
appVersion
)
{
that
.
openVe
()
...
...
@@ -381,6 +415,7 @@ export default {
})
}
else
if
(
!
that
.
preLoginPage
)
{
that
.
openAd
()
this
.
getUpdateOpenAd
(
userInfo
)
// #ifdef APP-PLUS
if
(
that
.
appVersion
)
{
that
.
openVe
()
...
...
@@ -395,6 +430,51 @@ export default {
}
})
},
getUpdateOpenAd
:
function
(
data
)
{
//获取存储的会员等级信息
const
levelRule
=
uni
.
getStorageSync
(
'
levelRule
'
);
const
user
=
data
;
const
params
=
{
memberId
:
data
.
id
,
pageNo
:
1
,
pageSize
:
10
}
let
levelRule1
=
''
;
const
that
=
this
;
this
.
$request
.
post
(
'
/admin-api/member/level-details/page
'
,
params
).
then
((
res
)
=>
{
levelRule1
=
res
.
data
.
list
[
0
];
if
(
levelRule1
!=
null
){
//升级展示 获取升级提示
this
.
$request
.
get
(
'
/app-api/system/need-know/getByKey
'
,{
key
:
'
levelUpdate
'
}).
then
(
res
=>
{
if
(
res
.
code
==
0
&&
res
.
data
){
levelRule1
.
username
=
user
.
nickname
;
const
level
=
that
.
membershipLevels
.
find
(
level
=>
level
.
value
===
levelRule1
.
level
.
toString
()
);
if
(
level
)
{
levelRule1
.
levelName
=
level
[
this
.
$lang
.
label
];
}
levelRule1
.
validityPeriod
=
parseTime
(
levelRule1
.
validityPeriod
,
'
{y}-{m}-{d}
'
)
this
.
levelTitle
=
res
.
data
[
this
.
$lang
.
title
]
this
.
levelLeviteInfo
=
this
.
replaceContent
(
res
.
data
[
this
.
$lang
.
content
],
levelRule1
);
if
(
!
levelRule
){
//提示升级
this
.
$refs
.
updatePopup
.
open
()
}
else
if
((
levelRule1
.
level
>
levelRule
.
level
)
||
(
levelRule1
.
level
==
levelRule
.
level
&&
levelRule1
.
sort
>
levelRule
.
sort
)){
//提示升级
}
}
})
uni
.
setStorageSync
(
'
levelRule
'
,
levelRule1
);
}
})
},
replaceContent
(
content
,
levelRule
){
return
content
.
replace
(
/{
(\w
+
)
}/g
,
function
(
match
,
key
)
{
return
levelRule
[
key
]
!==
undefined
?
levelRule
[
key
]
:
match
;
});
},
getOrder
()
{
this
.
$request
.
get
(
'
/app-api/member/user/angle-mark
'
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
&&
res
.
data
)
{
...
...
@@ -433,6 +513,9 @@ export default {
this
.
preLoginPage
=
false
this
.
$refs
.
adpopup
.
close
()
},
closeUpdate
()
{
this
.
$refs
.
updatePopup
.
close
()
},
closeTransport
()
{
this
.
$refs
.
choiceTransport
.
close
()
},
...
...
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