MrShi
2025-02-25 9dfc54bf6e0fdb3c746815707487c6ae50e98905
bicycle/pages/setMenu/setMenu.vue
@@ -1,16 +1,20 @@
<template>
   <view class="tc">
      <view class="index_box_vip_row" v-for="(item, index) in 3" :key="index" @click="jump">
      <view class="index_box_vip_row" v-for="(item, index) in list" :key="index" @click="jump(item.id)">
         <view class="vip1">
            <text>电单车年卡</text>
            <text>365</text>
            <view class="vip1_left">
               {{item.name || ''}}
            </view>
            <view class="vip1_right">
               {{item.price || ''}}
            </view>
         </view>
         <view class="vip2">
            <text>365天畅骑,享受骑车乐趣</text>
            <u>¥699</u>
            <text>{{item.descs || ''}}</text>
            <u>¥{{item.linePrice || ''}}</u>
         </view>
         <view class="vip3">
            <view class="vip3_info">低至1元/天</view>
            <view class="vip3_info">低至{{item.dayPrice}}元/天</view>
            <view class="vip3_button">购买</view>
         </view>
      </view>
@@ -21,14 +25,39 @@
   export default {
      data() {
         return {
            list: [],
            page: 1
         };
      },
      onLoad() {
         this.getList()
      },
      onReachBottom() {
         this.getList()
      },
      methods: {
         jump() {
         jump(id) {
            uni.navigateTo({
               url: '/pages/packageDetails/packageDetails'
               url: `/pages/packageDetails/packageDetails?id=${id}`
            });
         },
         purchase(id) {
            uni.navigateTo({
               url: `/pages/paymentPage/paymentPage?id=${id}`
            });
         },
         async getList() {
            let res = await this.$u.api.discountPage({
               capacity: 10,
               page: this.page,
               model: {
                  bikeOrElec: 2
               }
            })
            if (res.code === 200) {
               this.page += 1
               this.list.push(...res.data.records)
            }
         }
      }
   }
@@ -63,22 +92,29 @@
            display: flex;
            align-items: center;
            justify-content: space-between;
            text {
               &:nth-child(1) {
                  font-weight: 500;
                  font-size: 32rpx;
                  color: #303030;
               }
               &:nth-child(2) {
            .vip1_left {
               flex: 1;
               font-weight: 500;
               font-size: 32rpx;
               color: #303030;
               white-space: nowrap;
               overflow: hidden;
               text-overflow: ellipsis;
               text-align: left;
            }
            .vip1_right {
               flex-shrink: 0;
               font-weight: 400;
               font-size: 40rpx;
               color: #FF5A31;
               white-space: nowrap;
               overflow: hidden;
               text-overflow: ellipsis;
               &:before {
                  content: '¥';
                  font-weight: 400;
                  font-size: 40rpx;
                  font-size: 26rpx;
                  color: #FF5A31;
                  &:before {
                     content: '¥';
                     font-weight: 400;
                     font-size: 26rpx;
                     color: #FF5A31;
                  }
               }
            }
         }
@@ -90,14 +126,21 @@
            margin-top: 10rpx;
            margin-bottom: 16rpx;
            text {
               flex: 1;
               white-space: nowrap;
               overflow: hidden;
               text-overflow: ellipsis;
               font-weight: 400;
               font-size: 26rpx;
               color: #777777;
               text-align: left;
            }
            u {
               flex-shrink: 0;
               font-weight: 400;
               font-size: 24rpx;
               color: #999999;
               text-decoration: line-through;
            }
         }
         .vip3 {