添加:商户添加持有积分查看列表
This commit is contained in:
parent
f5e463edc6
commit
4470d7c777
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
|
@ -476,10 +476,15 @@ export function discountsUpdate(id, data) {
|
||||||
return request.post(`discounts/update/${id}`, data)
|
return request.post(`discounts/update/${id}`, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 创建套餐 -- 获取商品规格
|
|
||||||
*/
|
|
||||||
export function getIntegralGiveRecord(data) {
|
export function getIntegralGiveRecord(data) {
|
||||||
return request.get(`integral/give_list`, data)
|
return request.get(`integral/give_list`, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 持有积分 - 列表
|
||||||
|
export function holdIntegralList(data) {
|
||||||
|
return request.get(`integral/hold_list`, data)
|
||||||
|
}
|
||||||
|
// 持有积分 - 统计
|
||||||
|
export function holdIntegralTitleApi() {
|
||||||
|
return request.get(`integral/hold_list_title`)
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -310,6 +310,15 @@ const marketingRouter =
|
||||||
noCache: true
|
noCache: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/marketing/integral/give/index')
|
component: () => import('@/views/marketing/integral/give/index')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'hold',
|
||||||
|
name: `integralHold`,
|
||||||
|
meta: {
|
||||||
|
title: '持有积分',
|
||||||
|
noCache: true
|
||||||
|
},
|
||||||
|
component: () => import('@/views/marketing/integral/hold/index')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,175 @@
|
||||||
|
<template>
|
||||||
|
<div class="divBox">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<!--顶部搜索栏-->
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<div class="container">
|
||||||
|
<el-form inline size="small" label-width="80px">
|
||||||
|
<el-form-item label="搜索:">
|
||||||
|
<el-input v-model="tableFrom.uid" @keyup.enter.native="getList(1)" placeholder="请输入用户ID" class="selWidth" clearable>
|
||||||
|
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="getList(1)" />
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item class="width100">
|
||||||
|
<!--<el-button size="small" type="primary" @click="exports">导出</el-button>-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<cards-data :card-lists="cardLists" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--列表内容-->
|
||||||
|
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini">
|
||||||
|
<el-table-column prop="integral_id" label="ID" min-width="50" align="center"/>
|
||||||
|
<el-table-column label="用户信息" prop="nickname" min-width="150" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="user-content">
|
||||||
|
<div class="user-avatar" v-if="scope.row.avatar && scope.row.avatar != 1">
|
||||||
|
<img :src="scope.row.avatar" />
|
||||||
|
</div>
|
||||||
|
<div class="user-info">
|
||||||
|
<div class="nickname">{{ scope.row.nickname }}</div>
|
||||||
|
<div class="user-id">ID:{{ scope.row.uid }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="持有积分" prop="number" min-width="120" align="center"/>
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
:page-sizes="[20, 40, 60, 80]"
|
||||||
|
:page-size="tableFrom.limit"
|
||||||
|
:current-page="tableFrom.page"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="tableData.total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="pageChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {holdIntegralList, holdIntegralTitleApi} from '@/api/marketing'
|
||||||
|
import cardsData from '@/components/cards/index'
|
||||||
|
export default {
|
||||||
|
name: "holdIntegralList",
|
||||||
|
components: { cardsData },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
listLoading: true,
|
||||||
|
tableData: {
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
tableFrom: {
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
uid: '',
|
||||||
|
mer_id: ''
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
cardLists: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
mounted() {
|
||||||
|
this.getIntegralTitle();
|
||||||
|
this.getList('');
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取统计数据
|
||||||
|
getIntegralTitle() {
|
||||||
|
holdIntegralTitleApi(this.tableFrom).then((res) => {
|
||||||
|
this.cardLists = res.data
|
||||||
|
}).catch((res) => {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取列表
|
||||||
|
getList(num) {
|
||||||
|
this.listLoading = true;
|
||||||
|
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||||
|
holdIntegralList(this.tableFrom)
|
||||||
|
.then((res) => {
|
||||||
|
this.tableData.data = res.data.list;
|
||||||
|
this.tableData.total = res.data.count;
|
||||||
|
this.listLoading = false;
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.listLoading = false;
|
||||||
|
this.$message.error(res.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
pageChange(page) {
|
||||||
|
this.tableFrom.page = page;
|
||||||
|
this.getList('');
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.tableFrom.limit = val;
|
||||||
|
this.getList('');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.selWidth {
|
||||||
|
width: 350px !important;
|
||||||
|
}
|
||||||
|
.seachTiele {
|
||||||
|
line-height: 35px;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
margin-bottom: 16px;
|
||||||
|
color: #17233d;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.scollhide::-webkit-scrollbar {
|
||||||
|
display: none; /* Chrome Safari */
|
||||||
|
}
|
||||||
|
.user-content{
|
||||||
|
--user-content-height-: 80px;
|
||||||
|
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
width: 100%;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
.user-avatar{
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
width: var(--user-content-height-);
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
img{
|
||||||
|
height: 80%!important;
|
||||||
|
width: 80%!important;
|
||||||
|
border-radius: 50% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-info{
|
||||||
|
height: var(--user-content-height-);
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
.nickname{
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: calc(var(--user-content-height- * 65%));
|
||||||
|
}
|
||||||
|
.user-id{
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: calc(var(--user-content-height- * 35%));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue