oil-station/gasStation-uni/pagesHome/PointsRedemption/index.vue

172 lines
3.1 KiB
Vue
Raw Normal View History

2024-09-18 17:24:51 +08:00
<template>
<view class="centenr">
<view class="Candywrapper">
<view class="top-box" @click="goIntegral">
2024-09-19 11:18:34 +08:00
2024-09-18 17:24:51 +08:00
<view class="">积分余额</view>
2024-09-21 15:55:14 +08:00
<view class="d-s">{{cardBalance.points || 0}}<u-icon name="arrow-right"></u-icon> </view>
2024-09-18 17:24:51 +08:00
</view>
<view class="f-box" v-for="(item,index) in 3" :key="index" @click="goDetails()">
<view class="f-top">中建锦绣二期站可用</view>
<view class="f-bs">
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<view class="r-box">
<view class="">
<view class="m_">虚拟</view>
<view class="p_">300ml瓶装</view>
<view class="q_">兑换券</view>
</view>
<view class="">
<view class="an_">100积分</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-18 17:24:51 +08:00
<view class="hui_">券已领70%</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
2024-09-21 15:55:14 +08:00
import request from '../../utils/request'
2024-09-18 17:24:51 +08:00
export default {
data() {
return {
2024-09-21 15:55:14 +08:00
query: {
chainStoreId: '',
couponType: '',
useStatus: 0,
pageNo: 1,
pageSize: 10
},
cardBalance: {},
2024-09-18 17:24:51 +08:00
}
},
2024-09-21 15:55:14 +08:00
onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance()
},
2024-09-18 17:24:51 +08:00
methods: {
2024-09-21 15:55:14 +08:00
// 获取余额信息
getUserBalance() {
request({
url: '/business/userManager/user/getUserBalanceApplet',
method: 'get',
params: this.query
}).then(res => {
if (res.code == 200) {
this.cardBalance = res.data
}
})
},
2024-09-18 17:24:51 +08:00
goIntegral() {
uni.navigateTo({
url: '/pagesMy/integral/integral'
})
},
goDetails() {
uni.navigateTo({
url: '/pagesHome/PointsRedemption/details'
})
}
}
}
</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-18 17:24:51 +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-21 15:55:14 +08:00
</style>