2024-09-19 11:18:34 +08:00
|
|
|
<template>
|
|
|
|
<view class="centenr">
|
|
|
|
<view class="Candywrapper">
|
|
|
|
|
2024-09-27 10:20:09 +08:00
|
|
|
<view class="f-box" v-for="(item,index) in list" :key="index" @click="goDetails(item.id)">
|
2024-09-26 17:58:06 +08:00
|
|
|
<view class="f-top">{{item.storeName}}可用</view>
|
2024-09-19 11:18:34 +08:00
|
|
|
<view class="f-bs">
|
2024-09-27 10:20:09 +08:00
|
|
|
<image :src="item.backgroundImage" v-if="item.backgroundImage" style="width: 60px; height: 60px; "></image>
|
|
|
|
<image src="../../static/logo.png" v-else style="width: 60px; height: 60px; "></image>
|
2024-09-19 11:18:34 +08:00
|
|
|
<view class="r-box">
|
|
|
|
<view class="">
|
2024-09-26 17:58:06 +08:00
|
|
|
<view class="m_">{{item.name}}</view>
|
|
|
|
<view class="p_">{{item.useCondition}}</view>
|
|
|
|
<view class="q_">{{item.typeName}}</view>
|
2024-09-19 11:18:34 +08:00
|
|
|
</view>
|
|
|
|
<view class="">
|
|
|
|
<view class="an_">领取</view>
|
|
|
|
<u-line-progress :percentage="50" :showText="false" height="6"
|
2024-09-20 17:38:29 +08:00
|
|
|
activeColor="#FA6400"></u-line-progress>
|
2024-09-26 17:58:06 +08:00
|
|
|
<view class="hui_">券已领{{item.scale}}</view>
|
2024-09-19 11:18:34 +08:00
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-09-26 13:45:57 +08:00
|
|
|
import request from '../../utils/request';
|
2024-09-19 11:18:34 +08:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2024-09-26 13:45:57 +08:00
|
|
|
list: [],
|
|
|
|
total: 0,
|
|
|
|
queryParams: {
|
|
|
|
storeId: '',
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 30
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onPullDownRefresh() {
|
|
|
|
//下拉刷新
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
},
|
|
|
|
onReachBottom() {
|
|
|
|
// 触底加载
|
|
|
|
if (this.list.length >= this.totalPage) {} else {
|
|
|
|
this.queryParams.pageNo++
|
|
|
|
this.getList()
|
2024-09-19 11:18:34 +08:00
|
|
|
}
|
|
|
|
},
|
2024-09-26 13:45:57 +08:00
|
|
|
onShow() {
|
|
|
|
this.queryParams.storeId = uni.getStorageSync("storeId")
|
|
|
|
this.getList()
|
|
|
|
},
|
2024-09-19 11:18:34 +08:00
|
|
|
methods: {
|
2024-09-26 13:45:57 +08:00
|
|
|
getList() {
|
|
|
|
request({
|
2024-09-26 17:58:06 +08:00
|
|
|
url: '/cardCoupon/queryByPageAndStoreId',
|
2024-09-26 13:45:57 +08:00
|
|
|
method: 'get',
|
|
|
|
params: this.queryParams
|
|
|
|
}).then(res => {
|
|
|
|
console.log(res,66);
|
|
|
|
if (res.code == 200) {
|
|
|
|
this.list = res.data.records
|
|
|
|
this.total = res.data.total
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2024-09-19 11:18:34 +08:00
|
|
|
goIntegral() {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pagesMy/integral/integral'
|
|
|
|
})
|
|
|
|
},
|
2024-09-27 10:20:09 +08:00
|
|
|
goDetails(id) {
|
2024-09-19 11:18:34 +08:00
|
|
|
uni.navigateTo({
|
2024-09-27 10:20:09 +08:00
|
|
|
url: '/pagesHome/certificate/details?certificateId='+id
|
2024-09-19 11:18:34 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.centenr {
|
|
|
|
width: 100%;
|
|
|
|
height: 100vh;
|
|
|
|
background: #F9F9F9;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Candywrapper {
|
|
|
|
background: #F9F9F9;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.top-box {
|
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 10px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-s {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.f-box {
|
|
|
|
width: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 10px;
|
|
|
|
background: #fff;
|
|
|
|
margin: 10px auto;
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.f-top {
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 5px 0px;
|
|
|
|
border-bottom: 1px dashed #eee;
|
|
|
|
margin-bottom: 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.f-bs {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.r-box {
|
|
|
|
width: 80%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.m_ {
|
|
|
|
font-size: 16px;
|
|
|
|
color: #333333;
|
|
|
|
font-weight: bold;
|
|
|
|
margin-bottom: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p_ {
|
|
|
|
font-size: 12px;
|
|
|
|
color: #666666;
|
|
|
|
}
|
|
|
|
|
|
|
|
.q_ {
|
|
|
|
font-size: 12px;
|
|
|
|
color: #E02020;
|
|
|
|
}
|
|
|
|
|
|
|
|
.an_ {
|
|
|
|
width: 80px;
|
|
|
|
height: 25px;
|
2024-09-20 17:38:29 +08:00
|
|
|
background: #FA6400;
|
2024-09-19 11:18:34 +08:00
|
|
|
border-radius: 4px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
color: #fff;
|
|
|
|
margin-bottom: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.hui_ {
|
|
|
|
font-size: 10px;
|
|
|
|
color: #666666;
|
|
|
|
}
|
2024-09-26 13:45:57 +08:00
|
|
|
</style>
|