oil-station/gasStation-uni/pagesHome/RechargeRecords/RechargeRecords.vue

281 lines
4.6 KiB
Vue
Raw Normal View History

2024-08-16 18:26:19 +08:00
<template>
<view class="content">
<view class="container">
2024-09-24 11:25:23 +08:00
2024-08-16 18:26:19 +08:00
<!-- 顶部区域 -->
2024-09-24 08:43:29 +08:00
<view class="ail">
2024-09-24 11:25:23 +08:00
<view class="box-order" v-for="(item,index) in list" :key="index">
2024-08-16 18:26:19 +08:00
<view class="or-box-top">
2024-09-26 13:45:57 +08:00
<view class="chengg">{{item.activeName || "暂无"}}</view>
2024-08-16 18:26:19 +08:00
</view>
2024-09-24 11:25:23 +08:00
2024-08-16 18:26:19 +08:00
<view class="but-box">
2024-09-24 11:25:23 +08:00
<view class="bais">面值{{item.cardAmount || 0}}</view>
<view class="xbai">卡号{{item.number || "暂无"}}</view>
2024-08-16 18:26:19 +08:00
</view>
<view class="but-box">
2024-09-26 13:45:57 +08:00
<view class="xbai">有效期{{item.effectiveTimeStart || '暂无'}} - {{item.effectiveTimeEnd || ''}}
</view>
<view class="xbai">密码{{item.cardPassword || "暂无"}}</view>
2024-08-16 18:26:19 +08:00
</view>
2024-09-26 13:45:57 +08:00
<view class="potions_" v-if="item.useStatus==1">
2024-09-24 11:25:23 +08:00
<image src="../../static/imgs/ydh.png" style="width: 45px; height: 45px; "></image>
</view>
2024-08-16 18:26:19 +08:00
</view>
</view>
<u-empty v-if="list.length == 0 " mode="coupon" text="内容为空"
icon="http://cdn.uviewui.com/uview/empty/coupon.png">
</u-empty>
<u-loadmore :status="status" v-if="show == true" />
2024-09-24 11:25:23 +08:00
2024-09-26 13:45:57 +08:00
<view class="but-sub" @click="goExchange()">礼品卡兑换</view>
2024-08-16 18:26:19 +08:00
</view>
</view>
</template>
<script>
import config from '@/config'
import request from '../../utils/request'
export default {
data() {
return {
title: '',
tindex: 0,
status: 'loading',
totalDetail: '',
show: false,
2024-09-26 13:45:57 +08:00
list: [],
2024-08-16 18:26:19 +08:00
query: {
2024-09-26 13:45:57 +08:00
userId: '',
2024-08-16 18:26:19 +08:00
storeId: '',
pageNo: 1,
2024-09-26 13:45:57 +08:00
pageSize: 1000
2024-08-16 18:26:19 +08:00
},
tapList: [{
text: "全部"
},
{
text: "储值卡"
},
{
text: "升数卡"
},
]
}
},
components: {
},
onShow() {
2024-09-26 13:45:57 +08:00
this.query.userId = uni.getStorageSync("userId")
this.query.storeId = uni.getStorageSync("storeId")
2024-08-16 18:26:19 +08:00
this.getGiftRecords()
},
onReachBottom() {
this.show = true
if (this.list.length >= this.totalDetail) {
2024-09-26 13:45:57 +08:00
2024-08-16 18:26:19 +08:00
} else {
this.query.pageNo++
}
},
methods: {
2024-09-26 13:45:57 +08:00
goExchange() {
uni.navigateTo({
url: '/pagesHome/giftExchange/index'
})
},
2024-08-16 18:26:19 +08:00
goback() {
uni.navigateBack()
},
getGiftRecords() {
request({
url: '/business/marketingActivity/cardGift/selectAllRecords',
method: 'get',
}).then(res => {
2024-09-26 13:45:57 +08:00
console.log(res, 111)
2024-08-16 18:26:19 +08:00
if (res.code == 200) {
this.list = res.data.records
2024-09-26 13:45:57 +08:00
this.totalDetail = res.data.total
2024-08-16 18:26:19 +08:00
}
})
},
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
height: 100vh;
}
.container {
width: 100%;
height: 100%;
box-sizing: border-box;
2024-09-24 08:43:29 +08:00
padding-top: 10px;
2024-08-16 18:26:19 +08:00
}
.my-header {
width: 100%;
height: 88px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
.tap-top {
width: 100%;
height: 50px;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
}
.tap-box {
width: 33%;
text-align: center;
color: #666666;
}
.gang {
width: 35px;
height: 4px;
// background: #0000ff;
margin: 0 auto;
margin-top: 10px;
}
.act {
font-weight: bold;
color: #000;
}
.lan {
background: #0000ff;
}
.box-order {
width: 95%;
2024-09-24 11:25:23 +08:00
height: 122px;
2024-08-16 18:26:19 +08:00
background: #ffffff;
box-sizing: border-box;
padding: 10px;
margin: 10px auto;
2024-09-24 11:25:23 +08:00
background: url('../../static/imgs/lpk.png') no-repeat;
background-size: 100% 100%;
position: relative;
2024-08-16 18:26:19 +08:00
}
.or-box-top {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 5px 0px;
2024-09-24 11:25:23 +08:00
2024-08-16 18:26:19 +08:00
}
.chengg {
2024-09-24 11:25:23 +08:00
color: #fff;
2024-08-16 18:26:19 +08:00
}
.but-box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.reds {
color: red;
}
.huis {
color: #666666;
}
.end-box {
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.anniu {
width: 70px;
height: 25px;
background-color: #1678ff;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
border-radius: 15px;
}
2024-09-24 11:25:23 +08:00
2024-09-24 08:52:56 +08:00
.but-sub {
width: 305px;
height: 40px;
line-height: 40px;
margin: 0 auto;
background-color: #FF9655;
color: white;
border-radius: 50px;
text-align: center;
position: absolute;
bottom: 40px;
left: 11%;
}
2024-09-24 11:25:23 +08:00
.bais {
font-size: 16px;
color: #fff;
font-weight: bold;
margin: 10px 0px;
}
.xbai {
color: #fff;
font-size: 12px;
}
.potions_ {
position: absolute;
right: 0px;
top: 0px;
}
</style>