Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
longhui_app
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
杨硕
longhui_app
Commits
1b5a9170
Commit
1b5a9170
authored
Jun 26, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分规则
parent
2e3d155c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
120 additions
and
1 deletion
+120
-1
integralrule.js
api/my/myintegral/integralrule.js
+20
-0
IntegralRule.vue
my/myintegral/IntegralRule.vue
+85
-0
index.vue
my/myintegral/index.vue
+9
-1
pages.json
pages.json
+6
-0
No files found.
api/my/myintegral/integralrule.js
0 → 100644
View file @
1b5a9170
import
request
from
"../../../utils/request"
;
// 获取金额和积分的列表
export
function
queryIntegralList
(
params
)
{
return
request
({
url
:
'/system/integral/queryintergras'
,
method
:
'get'
,
params
})
}
// 查询会员等级信息
export
function
queryMemberBenefits
(
query
)
{
return
request
({
url
:
'/system/memberfits/selectActivityInfoByPagination'
,
method
:
'get'
,
params
:
query
})
}
my/myintegral/IntegralRule.vue
0 → 100644
View file @
1b5a9170
<
template
>
<view
class=
"IntegralRule-module"
>
<view
class=
"title"
>
一、积分获取规则
</view>
<view
class=
"oneContent"
v-for=
"(item,index) in integrallist"
:key=
"index"
>
<span
class=
"oneSpan"
>
每当您消费金额到达
{{
item
.
amount
}}
元时将会获取
{{
item
.
integral
}}
积分。
</span>
</view>
<view
class=
"twotitle"
>
二、会员折扣规则
</view>
<view
class=
"twoContent"
v-for=
"(item,index) in memberList"
:key=
"index"
>
<span
class=
"twoSpan"
>
每当您积分累计到达
{{
item
.
integral
}}
时将达成
{{
item
.
name
}}
将会享受
{{
item
.
discount
}}
%的折扣
</span>
</view>
</view>
</
template
>
<
script
>
import
{
queryIntegralList
,
queryMemberBenefits
}
from
"../../api/my/myintegral/integralrule"
;
export
default
{
data
(){
return
{
// 积分获取列表
integrallist
:[],
// 会员折扣列表
memberList
:
[],
}
},
onShow
()
{
this
.
getintegrallist
()
this
.
getmemberList
()
},
methods
:{
getintegrallist
()
{
queryIntegralList
().
then
(
res
=>
{
console
.
log
(
'积分获取列表'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
integrallist
=
res
.
data
}
})
},
getmemberList
(){
queryMemberBenefits
().
then
(
res
=>
{
console
.
log
(
'会员等级列表'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
memberList
=
res
.
data
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.IntegralRule-module
{
background
:
#fff
;
min-height
:
100vh
;
padding
:
0
34rpx
;
.title
{
font-size
:
40rpx
;
font-family
:
Source
Han
Sans
CN-Medium
,
Source
Han
Sans
CN
;
font-weight
:
500
;
color
:
#333333
;
margin-bottom
:
21rpx
;
}
.twotitle
{
font-size
:
40rpx
;
font-family
:
Source
Han
Sans
CN-Medium
,
Source
Han
Sans
CN
;
font-weight
:
500
;
color
:
#333333
;
margin-bottom
:
21rpx
;
margin-top
:
21rpx
;
}
.oneContent
{
font-family
:
Source
Han
Sans
CN-Medium
,
Source
Han
Sans
CN
;
font-weight
:
500
;
color
:
#333333
;
text-align
:
center
;
margin-top
:
12rpx
;
}
.twoContent
{
font-family
:
Source
Han
Sans
CN-Medium
,
Source
Han
Sans
CN
;
font-weight
:
500
;
color
:
#333333
;
margin-top
:
12rpx
;
}
}
</
style
>
\ No newline at end of file
my/myintegral/index.vue
View file @
1b5a9170
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view
class=
"myintegral"
>
<view
class=
"myintegral"
>
<view
class=
"myintegral-top"
>
<view
class=
"myintegral-top"
>
<view
class=
"integral-num"
>
{{
allintegral
}}
</view>
<view
class=
"integral-num"
>
{{
allintegral
}}
</view>
<view
class=
"integral-rule"
>
<view
class=
"integral-rule"
@
click=
"showRule"
>
<view
class=
"integral-rule-title"
>
积分规则
</view>
<view
class=
"integral-rule-title"
>
积分规则
</view>
<u-icon
name=
"arrow-right"
color=
"#666666"
size=
"24"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#666666"
size=
"24"
></u-icon>
</view>
</view>
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
show
:
false
,
baseURL
:
'http://192.144.239.97:20043/file/'
,
baseURL
:
'http://192.144.239.97:20043/file/'
,
integral
:[],
integral
:[],
pageNum
:
1
,
pageNum
:
1
,
...
@@ -37,6 +38,13 @@
...
@@ -37,6 +38,13 @@
this
.
getMyIntegral
()
this
.
getMyIntegral
()
},
},
methods
:{
methods
:{
// 显示积分规则
showRule
(){
// 跳转积分规则页面
uni
.
navigateTo
({
url
:
'/my/myintegral/IntegralRule'
})
},
// 查询我的积分
// 查询我的积分
getMyIntegral
(){
getMyIntegral
(){
const
query
=
{
const
query
=
{
...
...
pages.json
View file @
1b5a9170
...
@@ -112,6 +112,12 @@
...
@@ -112,6 +112,12 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"核销"
"navigationBarTitleText"
:
"核销"
}
}
},
{
"path"
:
"myintegral/IntegralRule"
,
"style"
:
{
"navigationBarTitleText"
:
"积分规则"
}
}
}
]
]
},
},
...
...
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