增加:惠民积分信息中心及惠民积分信息变更记录
This commit is contained in:
parent
1f28e1e94c
commit
704c68ffe0
|
|
@ -1,4 +1,5 @@
|
|||
import request from "@/utils/request.js";
|
||||
import {getStatisticsInfo} from "./admin";
|
||||
// 在线买单 - 获取门店列表
|
||||
export function searchMer(data) {
|
||||
return request.get("onlinePayment/searchMerList",data);
|
||||
|
|
@ -64,3 +65,16 @@ export function quotaTransfer(data) {
|
|||
export function merBindShop(merId) {
|
||||
return request.get(`exchange/mer_bind_shop/${merId}`);
|
||||
}
|
||||
// 惠民积分 - 统计
|
||||
export function quotaIntegralStatistics() {
|
||||
return request.get(`exchange/quota_integral_statistics`);
|
||||
}
|
||||
// 惠民积分 - 各商户持有信息列表
|
||||
export function quotaIntegralHoldList(data) {
|
||||
return request.get(`exchange/quota_integral_hold_list`,data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -581,6 +581,12 @@
|
|||
"navigationBarTitleText": "额度变更记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "online_payment/record/center",
|
||||
"style": {
|
||||
"navigationBarTitleText": "额度中心"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "online_payment/record/quota_transfer",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@
|
|||
</view>
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/integral')">
|
||||
<text class="num">{{userInfo.exchange_integral || 0}}</text>
|
||||
<!--<view class="txt">酒水卡积分</view>-->
|
||||
<view class="txt">消费积分</view>
|
||||
</view>
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/quota?quota_type=3')">
|
||||
|
|
@ -93,6 +92,10 @@
|
|||
<text class="num">{{ integral_surplus || 0}}</text>
|
||||
<view class="txt">餐费积分</view>
|
||||
</view>
|
||||
<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/center')">
|
||||
<text class="num">{{userInfo.quota_integral || 0}}</text>
|
||||
<view class="txt">惠民积分</view>
|
||||
</view>
|
||||
|
||||
<!--<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/quota?quota_type=4')">-->
|
||||
<!-- <text class="num">{{userInfo.oil_available || 0}}</text>-->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,290 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="main-content">
|
||||
<!--顶部内容-->
|
||||
<view class="top" :style="{ 'background-image': `url(${top_icon})`}">
|
||||
<view class="top-half">
|
||||
<view class="num">{{ statistics.total_quota || '0.00' }}</view>
|
||||
<view class="title">全部积分</view>
|
||||
</view>
|
||||
<view class="bottom-half">
|
||||
<view class="bottom-box">
|
||||
<view class="num">{{ statistics.surplus_quota || '0.00' }}</view>
|
||||
<view class="label">剩余积分</view>
|
||||
</view>
|
||||
<view class="bottom-box">
|
||||
<view class="num">{{ statistics.freeze_quota || '0.00' }}</view>
|
||||
<view class="label">冻结中积分</view>
|
||||
</view>
|
||||
<view class="bottom-box">
|
||||
<view class="num">{{ statistics.available_quota || '0.00' }}</view>
|
||||
<view class="label">可用积分</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--列表内容-->
|
||||
<view class="list-content" v-if="Object.values(list).length > 0">
|
||||
<!--标题-->
|
||||
<view class="title">商户列表</view>
|
||||
<!--列表-->
|
||||
<view class="list-box" v-for="(item,index) in list" :key="index">
|
||||
<image class="mer-image" :src="item.mer.mer_avatar || default_mer_logo" mode="widthFix"></image>
|
||||
<view class="mer-info">
|
||||
<view class="mer_name">{{ item.mer.mer_name || '' }}</view>
|
||||
<view class="integral">可用积分:{{ Number(item.surplus_quota - item.freeze_quota).toFixed(2) }}</view>
|
||||
</view>
|
||||
<view class="see-btn" v-if="item.total_quota > 0" @click="goToPage(item)">积分详情</view>
|
||||
</view>
|
||||
</view>
|
||||
<emptyPage v-else title="暂无信息~"></emptyPage>
|
||||
</view>
|
||||
<!-- 授权登录 -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from "vuex";
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import authorize from '@/components/Authorize';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app.js';
|
||||
import {quotaIntegralHoldList, quotaIntegralStatistics} from "@/api/exchange";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
emptyPage
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 登录相关
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false,//是否隐藏授权
|
||||
top_icon: '',
|
||||
default_mer_logo: '',
|
||||
// 列表
|
||||
total: 0,
|
||||
list: [],
|
||||
page: 1,
|
||||
statistics: {},
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
onReady() {
|
||||
this.top_icon = `${HTTP_REQUEST_URL}/static/images/icon/top_half_icon.png`;
|
||||
this.default_mer_logo = `${HTTP_REQUEST_URL}/static/images/icon/default_mer_logo.png`;
|
||||
},
|
||||
onLoad(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '惠民积分中心'
|
||||
})
|
||||
// 判断:是否登录
|
||||
if (!this.isLogin) {
|
||||
// 未登录 授权登录
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}else{
|
||||
// 已登录 获取信息
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
// 滚动到底部
|
||||
onReachBottom() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 授权回调
|
||||
onLoadFun() {
|
||||
if(this.isLogin){
|
||||
this.isShowAuth = false;
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
// 授权关闭
|
||||
authClose(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
// 授权成功 初始化
|
||||
init () {
|
||||
this.getStatistics();
|
||||
this.getList();
|
||||
},
|
||||
// 信息获取
|
||||
getList() {
|
||||
let _this = this;
|
||||
let params = {
|
||||
page: _this.page,
|
||||
quota_type: 5
|
||||
};
|
||||
quotaIntegralHoldList(params).then(res => {
|
||||
let list = res.data.list || {};
|
||||
_this.total = res.data.count || 0;
|
||||
if (Object.values(list).length > 0) {
|
||||
_this.list = _this.$util.SplitArray(list, _this.list);
|
||||
_this.$set(_this, 'list', _this.list);
|
||||
_this.page++;
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$util.Tips({title: err});
|
||||
});
|
||||
},
|
||||
// 统计信息获取
|
||||
getStatistics() {
|
||||
let _this = this;
|
||||
quotaIntegralStatistics().then(res => {
|
||||
_this.statistics = res.data || {};
|
||||
}).catch(err => {
|
||||
this.$util.Tips({title: err});
|
||||
});
|
||||
},
|
||||
// 点击查看详情
|
||||
goToPage(item){
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/online_payment/record/quota?quota_type=5&mer_id=' + item.mer_id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.main-content {
|
||||
width: 100vw;
|
||||
min-height: 100vh!important;
|
||||
background: #f6f6f6;// #f6f6f6
|
||||
|
||||
.top{
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
background-size: 100% auto;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
.top-half{
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
height: 220rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
.num{
|
||||
color: #ffffff;
|
||||
font-size: 50rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.title{
|
||||
color: #ffffff;
|
||||
font-size: 30rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
.bottom-half{
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0rpx 5rpx 10rpx 0rpx #f0f0f0;
|
||||
.bottom-box{
|
||||
width: calc(100% / 3);
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.num{
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
.label{
|
||||
font-size: 26rpx;
|
||||
color: #383838;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-content{
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.title{
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.list-box{
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
width: 100%;
|
||||
box-shadow: 0rpx 0rpx 10rpx 0rpx #f0f0f0;
|
||||
margin-bottom: 30rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
.mer-image{
|
||||
width: 90rpx!important;
|
||||
height: 90rpx!important;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.mer-info{
|
||||
width: calc(100% - 90rpx - 140rpx);
|
||||
padding: 0 20rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
.mer_name{
|
||||
width: 100%;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.integral{
|
||||
font-size: 26rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
color: #555555;
|
||||
}
|
||||
}
|
||||
.see-btn{
|
||||
border-radius: 100rpx;
|
||||
font-size: 26rpx;
|
||||
background-color: #d20001;
|
||||
color: #f1f1f1;
|
||||
height: 45rpx;
|
||||
line-height: 45rpx;
|
||||
width: 140rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -53,6 +53,7 @@ export default{
|
|||
page: 1,
|
||||
limit: 20,
|
||||
quota_type: 1,
|
||||
mer_id: 0,
|
||||
},
|
||||
total_page: 0,
|
||||
allow_page: false,
|
||||
|
|
@ -60,11 +61,18 @@ export default{
|
|||
},
|
||||
onLoad(options){
|
||||
this.searchData.quota_type = options.quota_type || 1;
|
||||
this.searchData.mer_id = options.mer_id || 0;
|
||||
// 额度类型:1=酒卡额度(瓶装酒),2=菜卡额度,3=封坛酒额度,4=加油卡额度,5=惠民积分
|
||||
let title = '瓶装酒';
|
||||
switch (Number(this.searchData.quota_type)) {
|
||||
case 2:title = '特色菜卡';break;
|
||||
case 3:title = '封坛酒';break;
|
||||
case 4:title = '加油卡';break;
|
||||
case 5:title = '惠民';break;
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.searchData.quota_type == 2 ? '菜卡额度变更记录' : '酒卡额度变更记录'
|
||||
title: title + '积分变更记录'
|
||||
})
|
||||
// this.getStatistics();
|
||||
// this.getList();
|
||||
},
|
||||
onShow() {
|
||||
this.getStatistics();
|
||||
|
|
@ -74,7 +82,7 @@ export default{
|
|||
// 统计获取
|
||||
getStatistics(){
|
||||
let _this = this;
|
||||
recordQuota({ quota_type: _this.searchData.quota_type }).then(res => {
|
||||
recordQuota({ quota_type: _this.searchData.quota_type, mer_id: _this.searchData.mer_id }).then(res => {
|
||||
this.statistics_list = res.data || {};
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -372,8 +372,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>-->
|
||||
|
||||
|
||||
<template v-if="order_type == 36">
|
||||
<view class='item acea-row row-between-wrapper integral-switch-content' v-if="orderTotalWineIntegral > 0 || orderTotalWineDiffMoney > 0">
|
||||
<view>酒水卡积分抵扣:</view>
|
||||
|
|
@ -398,10 +396,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
<view class='item acea-row row-between-wrapper' v-if="orderTotalRandomReduction > 0">
|
||||
<view>随机立减:</view>
|
||||
<view class='money'>-¥{{orderTotalRandomReduction}}</view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue