From 7d9176b8facd97c3f5ee696a496a7cc7737425bb Mon Sep 17 00:00:00 2001
From: tx <2622874537@qq.com>
Date: Fri, 6 Sep 2024 17:58:07 +0800
Subject: [PATCH] =?UTF-8?q?vip=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/css/iconfont.css | 14 ++++--
page_vip/card_his.vue | 13 ++---
page_vip/checkCard.vue | 106 ++++++++++++++++++++++++++++++++++------
page_vip/vip_his.vue | 16 +++---
pages/index/index.vue | 100 +++++++++++++++++++++++++++++++++++--
pages/my.vue | 12 ++---
6 files changed, 219 insertions(+), 42 deletions(-)
diff --git a/common/css/iconfont.css b/common/css/iconfont.css
index 9d72533..62910cf 100644
--- a/common/css/iconfont.css
+++ b/common/css/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4503426 */
- src: url('//at.alicdn.com/t/c/font_4503426_h95wjcstqhw.woff2?t=1720592381205') format('woff2'),
- url('//at.alicdn.com/t/c/font_4503426_h95wjcstqhw.woff?t=1720592381205') format('woff'),
- url('//at.alicdn.com/t/c/font_4503426_h95wjcstqhw.ttf?t=1720592381205') format('truetype');
+ src: url('//at.alicdn.com/t/c/font_4503426_no8o2248czg.woff2?t=1725609027382') format('woff2'),
+ url('//at.alicdn.com/t/c/font_4503426_no8o2248czg.woff?t=1725609027382') format('woff'),
+ url('//at.alicdn.com/t/c/font_4503426_no8o2248czg.ttf?t=1725609027382') format('truetype');
}
.iconfont {
@@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-xiangshang:before {
+ content: "\e6b1";
+}
+
+.icon-xiangxia:before {
+ content: "\e6b2";
+}
+
.icon-xiangzuo:before {
content: "\eb15";
}
diff --git a/page_vip/card_his.vue b/page_vip/card_his.vue
index 0341694..9871a4f 100644
--- a/page_vip/card_his.vue
+++ b/page_vip/card_his.vue
@@ -4,17 +4,17 @@
height='45'>
-
+
- 电单车15天5次卡
+ {{item.couponName}}
- 3.9 元
+ {{item.retailPrice}} 元
- 2024-07-28 17:39:50
+ {{formatDate(item.createTime)}}
@@ -63,9 +63,10 @@
},
getcard(){
let data={
- userId:this.userinfo.userId
+ userId:this.userinfo.userId,
+ typeList:'3,4'
}
- this.$u.get("/appVerify/getCouponListByUserId?",data ).then((res) => {
+ this.$u.get("/appVerify/couponBuyRecord?",data ).then((res) => {
if (res.code == 200) {
this.CouponLists = res.data
diff --git a/page_vip/checkCard.vue b/page_vip/checkCard.vue
index 1039846..b8ab490 100644
--- a/page_vip/checkCard.vue
+++ b/page_vip/checkCard.vue
@@ -8,37 +8,37 @@
不使用骑行卡
-
-
+
+
可用骑行卡
-
+
- 电单车15天5次卡 | 剩余5次
+ {{item.couponName}} | 剩余{{item.limitNum}}次
- 有效期至2024-08-04
+ 有效期至{{formatDate(item.expirationTime) }}
-
+
-
+
- 有效期至2024-08-28
+ 有效期至{{formatDate(item.expirationTime)}}
-
-
+
+
-
+
确定
@@ -53,12 +53,88 @@
backgroundColor: '#fff'
},
sn: '',
- istrue: false
+ istrue: false,
+ orderId:'',
+ chooseIdx:-1,
+ CouponLists:[],
+ chooseInfo:{}
}
},
-
+ onShow() {
+ this.getinfo()
+ },
+ onLoad(e) {
+ this.orderId=e.orderId
+ console.log(e,);
+ },
methods: {
-
+ choose(item,index){
+ this.chooseIdx=index
+ this.chooseInfo=item
+ },
+ sub(){
+ if(this.chooseIdx==999){
+ uni.navigateBack({
+ delta: 1 // delta值为1时表示返回的页面层数
+ });
+ }else{
+ this.$u.post("/appVerify/useCoupon?orderNo="+this.orderId+'&logId='+this.chooseInfo.logId).then((res) => {
+
+ if (res.code == 200) {
+ uni.navigateBack({
+ delta: 1 // delta值为1时表示返回的页面层数
+ });
+
+ } else {
+
+ }
+ });
+ }
+
+
+ },
+ 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
+ // });
+ }
+ });
+ }
}
}
diff --git a/page_vip/vip_his.vue b/page_vip/vip_his.vue
index ef1d639..4635643 100644
--- a/page_vip/vip_his.vue
+++ b/page_vip/vip_his.vue
@@ -4,10 +4,10 @@
height='45'>
-
+
- 月卡会员
+ {{item.couponName}}
@@ -15,13 +15,13 @@
- 购买时长:1个月
+ 购买时长:{{item.validityValue}}个月
- 有效期:2024-07-29 至 2024-08-29
+ 有效期: {{formatDate(item.createTime)}}至 {{formatDate(item.expirationTime)}}
- 支付时间:2024-07-29 13:59
+ 支付时间: {{formatDate(item.createTime)}}
@@ -72,9 +72,10 @@
},
getcard(){
let data={
- userId:this.userinfo.userId
+ userId:this.userinfo.userId,
+ typeList:'1'
}
- this.$u.get("/appVerify/getCouponListByUserId?",data ).then((res) => {
+ this.$u.get("/appVerify/couponBuyRecord?",data ).then((res) => {
if (res.code == 200) {
this.CouponLists = res.data
@@ -118,6 +119,7 @@
color: #FFFFFF;
}
.vip_card{
+ margin-top: 20rpx;
// margin: 0 auto;
width: 680rpx;
padding: 16rpx 24rpx;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index ff896a0..4a55e68 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -112,6 +112,7 @@
+
@@ -354,9 +355,42 @@
使用时间:{{timeString}}
+
+
+ 合计费用
+
+
+ 4.00元
+
+
+
+
+ 骑行费
+
+
+ 4.00元
+
+
+
+
+ 预约费
+
+
+ 4.00元
+
+
+
+
+ 骑行卡
+
+
+ 去使用>
+
+
{{orderinfo.totalFee}}元
+
查看骑行费明细 >
@@ -366,6 +400,8 @@
去支付
+
+
@@ -1377,6 +1413,11 @@
},
},
methods: {
+ tocard(){
+ uni.navigateTo({
+ url:'/page_vip/checkCard?orderId='+this.orderinfo.orderNo
+ })
+ },
getArea() {
// this.showmap = false
// 发送请求获取数据
@@ -6559,6 +6600,7 @@
.page4 {
.bot_btn {
+ padding-bottom: 30rpx;
padding-top: 20rpx;
// margin-top: 20rpx;
// padding: 26rpx 34rpx 48rpx 34rpx;
@@ -6567,12 +6609,62 @@
// flex-wrap: wrap;
// justify-content: center;
// bottom: 0;
- // width: 750rpx;
- height: 400rpx;
+ width: 750rpx;
+ // height: 400rpx;
background: #FFFFFF;
// box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
border-radius: 30rpx;
-
+ .price_li{
+ margin-top: 24rpx;
+ width: 100%;
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 60rpx;
+ .price_left{
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ font-weight: 500;
+ font-size: 28rpx;
+ color: #3D3D3D;
+ .iconfont{
+ margin-left: 6rpx;
+ font-size: 20rpx;
+ font-weight: 600;
+ color: #3D3D3D;
+ }
+ }
+ .price_right{
+ font-weight: 500;
+ font-size: 28rpx;
+ color: #3D3D3D;
+ }
+ }
+ .price_li1{
+ margin-top: 22rpx;
+ width: 100%;
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 60rpx;
+ .price_left1{
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ font-weight: 500;
+ font-size: 28rpx;
+ color: #8D8A8A;
+
+ }
+ .price_right1{
+ font-weight: 500;
+ font-size: 28rpx;
+ color: #8D8A8A;
+ }
+ }
.time {
// height: 88rpx;
@@ -6589,7 +6681,7 @@
margin-top: 22rpx;
width: 100%;
text-align: center;
- font-weight: 500;
+ font-weight: 600;
font-size: 72rpx;
color: #3D3D3D;
diff --git a/pages/my.vue b/pages/my.vue
index 8b4f26e..98b4ecf 100644
--- a/pages/my.vue
+++ b/pages/my.vue
@@ -230,19 +230,19 @@
-
+
月卡会员
仅需¥{{CarkTypeList[0].retailPrice }},可享30天免费骑行权益
-
+
月卡会员
月卡会员{{ daysUntilExpiration }}天后到期
立即续费
-
+
@@ -576,7 +576,7 @@
this.getCarkType()
this.$store.commit('SET_USERID', res.user.userId);
this.info = res.user
- // this.calculateDaysUntilExpiration()
+ this.calculateDaysUntilExpiration()
if (info.role != 1) {
this.getareaList()
}
@@ -739,9 +739,7 @@
.txt1 {
top: 20rpx;
- left: 17
-
- 1rpx;
+ left: 171rpx;
position: absolute;
font-weight: 500;
font-size: 39rpx;