Commit 1b5a9170 authored by 高宇's avatar 高宇

积分规则

parent 2e3d155c
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
})
}
<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
......@@ -2,7 +2,7 @@
<view class="myintegral">
<view class="myintegral-top">
<view class="integral-num">{{allintegral}}</view>
<view class="integral-rule">
<view class="integral-rule" @click="showRule">
<view class="integral-rule-title">积分规则</view>
<u-icon name="arrow-right" color="#666666" size="24"></u-icon>
</view>
......@@ -25,6 +25,7 @@
export default{
data(){
return{
show: false,
baseURL: 'http://192.144.239.97:20043/file/',
integral:[],
pageNum: 1,
......@@ -37,6 +38,13 @@
this.getMyIntegral()
},
methods:{
// 显示积分规则
showRule(){
// 跳转积分规则页面
uni.navigateTo({
url: '/my/myintegral/IntegralRule'
})
},
// 查询我的积分
getMyIntegral(){
const query={
......
......@@ -112,6 +112,12 @@
"style": {
"navigationBarTitleText": "核销"
}
},
{
"path": "myintegral/IntegralRule",
"style": {
"navigationBarTitleText": "积分规则"
}
}
]
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment