bike/page_vip/vip_his.vue

173 lines
3.3 KiB
Vue
Raw Normal View History

2024-09-05 18:00:43 +08:00
<template>
<view class="page">
<u-navbar title="购买记录" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='45'></u-navbar>
<view class="cont">
<view class="vip_card">
<view class="top">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uac2wTu5kmOGPkonvNcl" mode=""></image>
月卡会员
</view>
<view class="bot">
<view class="left">
<image src=" https://lxnapi.ccttiot.com/bike/img/static/uvGHCob7uexyCsuMCt2c" mode=""></image>
</view>
<view class="right">
<view class="tit">
购买时长1个月
</view>
<view class="data">
有效期2024-07-29 2024-08-29
</view>
<view class="data">
支付时间2024-07-29 13:59
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: '#fff'
},
sn: '',
istrue: false,
CouponLists:[]
}
},
onShow() {
this.getinfo()
},
methods: {
getinfo() {
// uni.showLoading({
// title:'加载中'
// })
this.$u.get("/getAppInfo").then((res) => {
if (res.code == 200) {
this.$store.commit('SET_USERID', res.user.userId);
this.userinfo = res.user
this.getcard()
} else {
}
});
},
formatDate(dateString) {
if (!dateString) return '';
const date = new Date(dateString);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始需要加1
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
},
getcard(){
let data={
userId:this.userinfo.userId
}
this.$u.get("/appVerify/getCouponListByUserId?",data ).then((res) => {
if (res.code == 200) {
this.CouponLists = res.data
} else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
}
});
}
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.page {
width: 750rpx;
.cont {
display: flex;
justify-content: center;
flex-wrap: wrap;
.tit1 {
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
.tit2 {
margin-top: 10rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
}
.vip_card{
// margin: 0 auto;
width: 680rpx;
padding: 16rpx 24rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
border-radius: 20rpx 20rpx 20rpx 20rpx;
.top{
display: flex;
flex-wrap: nowrap;
align-items: center;
font-weight: 900;
font-size: 40rpx;
color: #3B3838;
image{
margin-right: 24rpx;
width: 58rpx;
height: 58rpx;
}
}
.bot{
margin-top: 20rpx;
display: flex;
flex-wrap: nowrap;
.left{
margin-right: 24rpx;
image{
width: 194rpx;
height: 194rpx;
}
}
.right{
.tit{
width: 100%;
font-weight: 600;
font-size: 32rpx;
color: #2F3240;
}
.data{
margin-top: 16rpx;
width: 100%;
font-weight: 400;
font-size: 28rpx;
color: #808080;
}
}
}
}
}
}
</style>