256 lines
4.3 KiB
Vue
256 lines
4.3 KiB
Vue
<template>
|
|
<view class="content">
|
|
<view class="container">
|
|
<view class="my-header">
|
|
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
|
<view class="my-text">兑换记录</view>
|
|
<view class="my-icons"></view>
|
|
</view>
|
|
<!-- 顶部区域 -->
|
|
|
|
<view class="ail" v-if="list.length != 0 ">
|
|
<view class="box-order" v-for="(item,index) in list" :key="index">
|
|
<view class="or-box-top">
|
|
|
|
<view class="chengg" style="font-weight: bold;">礼品卡</view>
|
|
</view>
|
|
|
|
<view class="but-box">
|
|
<view class="huis">兑换卡号</view>
|
|
<view class="">{{item.number || "暂无"}}</view>
|
|
</view>
|
|
<view class="but-box">
|
|
<view class="huis">兑换金额</view>
|
|
<view class="reds">¥{{item.cardAmount || "暂无"}}元</view>
|
|
</view>
|
|
<view class="but-box">
|
|
<view class="huis">订单时间</view>
|
|
<view class="">{{item.updateTime || "暂无"}}</view>
|
|
|
|
</view>
|
|
|
|
</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" />
|
|
</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,
|
|
|
|
list: [],
|
|
query: {
|
|
mtUserId: '',
|
|
storeId: '',
|
|
recordName: '',
|
|
pageNo: 1,
|
|
pageSize: 10
|
|
},
|
|
tapList: [{
|
|
text: "全部"
|
|
},
|
|
{
|
|
text: "储值卡"
|
|
},
|
|
{
|
|
text: "升数卡"
|
|
},
|
|
]
|
|
|
|
|
|
|
|
}
|
|
},
|
|
|
|
components: {
|
|
|
|
},
|
|
onShow() {
|
|
this.getGiftRecords()
|
|
},
|
|
onReachBottom() {
|
|
this.show = true
|
|
if (this.list.length >= this.totalDetail) {
|
|
uni.showToast({
|
|
title: '没有下一页数据',
|
|
icon: 'none'
|
|
})
|
|
this.status = "nomore"
|
|
} else {
|
|
this.query.pageNo++
|
|
this.getAllOrderList()
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
goback() {
|
|
uni.navigateBack()
|
|
},
|
|
|
|
getGiftRecords() {
|
|
request({
|
|
url: '/business/marketingActivity/cardGift/selectAllRecords',
|
|
method: 'get',
|
|
}).then(res => {
|
|
console.log(res)
|
|
if (res.code == 200) {
|
|
this.list = res.data.records
|
|
}
|
|
})
|
|
},
|
|
/*getGiftRecords() {
|
|
request({
|
|
url: '/business/marketingActivity/cardGift/selectAllRecords',
|
|
method: 'get',
|
|
}).then(res => {
|
|
console.log(res)
|
|
if (res.code == 200) {
|
|
this.list = res.data.records
|
|
}
|
|
})
|
|
},*/
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.content {
|
|
background: #f4f5f6;
|
|
height: 100vh;
|
|
}
|
|
|
|
.container {
|
|
width: 100%;
|
|
height: 100%;
|
|
box-sizing: border-box;
|
|
padding-top: 88px;
|
|
}
|
|
|
|
.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%;
|
|
border-radius: 8px;
|
|
background: #ffffff;
|
|
box-sizing: border-box;
|
|
padding: 10px;
|
|
margin: 10px auto;
|
|
}
|
|
|
|
.or-box-top {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
box-sizing: border-box;
|
|
padding: 5px 0px;
|
|
border-bottom: 1px solid #e5e5e5;
|
|
|
|
}
|
|
|
|
.chengg {
|
|
color: #1678ff;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
</style>
|