This commit is contained in:
liushiwei
2023-10-11 11:29:40 +08:00
parent 3fa8425d18
commit 64edc19257
4 changed files with 105 additions and 3 deletions

BIN
src/assets/coin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -73,6 +73,12 @@ const router = new VueRouter({
component: () => import('../view/Message.vue')
},
{
path: 'coinFlow',
name: 'coinFlow',
component: () => import('../view/CoinFlow.vue')
},
{
path: 'saleData',
name: 'saleData',

87
src/view/CoinFlow.vue Normal file
View File

@@ -0,0 +1,87 @@
<template>
<ai-list class="Learning">
<ai-title
slot="title"
title="金币流水"
isShowBottomBorder>
</ai-title>
<template slot="content">
<ai-search-bar>
<template #left>
<div class="search-item">
<label style="width:80px">分类</label>
<ai-select :selectList="$dict.getDict('coin_change_type')" :clearable="true" v-model="search.category" @change="search.current =1, getList()"></ai-select>
</div>
<div class="search-item">
<label style="width:80px">类型</label>
<ai-select :selectList="$dict.getDict('coin_type')" :clearable="true" v-model="search.type" @change="search.current =1, getList()"></ai-select>
</div>
</template>
<template #right>
<el-button type="primary" @click="search.current =1, getList()">查询</el-button>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
:current.sync="search.current"
:size.sync="search.size"
style="margin-top: 8px;"
@getList="getList">
<el-table-column slot="coin" label="金币" align="left">
<template slot-scope="scope">
<div v-if="scope.row.category == '0'" style="color: green">{{ scope.row.coin }}</div>
<div v-else style="color: red">{{ -scope.row.coin }}</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</template>
<script>
export default {
data () {
return {
colConfigs: [
{ prop: 'category', label: '分类', align: 'left',format: v => this.$dict.getLabel('coin_change_type', v), },
{ prop: 'type', label: '类型', align: 'left',format: v => this.$dict.getLabel('coin_type', v), },
{ slot: 'coin', label: '金币', align: 'left' },
{ prop: 'createTime', label: '时间', align: 'center' },
],
tableData: [],
total: 0,
search: {
current: 1,
size: 10,
category: '',
type: ''
}
}
},
created () {
this.$dict.load('coin_change_type', 'coin_type');
this.getList()
},
methods: {
getList () {
this.$http.post('/api/coinFlow/myPage', null, {
params: {
...this.search
}
}).then(res => {
if (res.code === 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -6,6 +6,12 @@
<span>v{{ version }}</span>
</div>
<div class="admin-right">
<el-tooltip class="item" effect="dark" content="金币信息" placement="top">
<div class="left" @click="toActive">
<div :style="{marginLeft: '0px'}">{{ $store.state.userInfo.coin }}</div>
<span style="margin-right: 10px;"><img src="../assets/coin.png" width="30"/></span>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="用户激活" placement="top">
<div class="left" @click="toActive">
<span>会员信息:</span>
@@ -21,6 +27,7 @@
<!-- <el-dropdown-item command="phone">修改手机</el-dropdown-item> -->
<el-dropdown-item command="pwd">修改密码</el-dropdown-item>
<el-dropdown-item command="message">消息推送</el-dropdown-item>
<el-dropdown-item command="coin">金币流水</el-dropdown-item>
<el-dropdown-item command="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -116,7 +123,7 @@ import AiPayment from "@/components/AiPayment.vue";
code: ''
},
version: '',
vipType: ["体验会员","月会员","半年会员","年会员","年会员多店通用"]
vipType: ["体验会员","月会员","半年会员","年会员","多店通用年会员"]
}
},
computed: {
@@ -125,9 +132,9 @@ import AiPayment from "@/components/AiPayment.vue";
return '未激活';
} else if (this.$store.state.userInfo.flag == 1) {
if (this.$store.state.userInfo.type != 4) {
return `(${this.$store.state.userInfo.mallName})` + this.vipType[this.$store.state.userInfo.type] + '/有效期至' + this.$store.state.userInfo.expireTime;
return `(${this.$store.state.userInfo.mallName})` + this.vipType[this.$store.state.userInfo.type];
} else {
return this.vipType[this.$store.state.userInfo.type] + '/有效期至' + this.$store.state.userInfo.expireTime
return this.vipType[this.$store.state.userInfo.type]
}
} else {
@@ -160,6 +167,8 @@ import AiPayment from "@/components/AiPayment.vue";
this.$router.push('changePwd')
} else if (e === 'message') {
this.$router.push('message')
} else if (e === 'coin') {
this.$router.push('coinFlow')
}
},
handleClose() {