|
@@ -1,43 +1,62 @@
|
|
|
<template>
|
|
|
- <view class="container">
|
|
|
- <img class="top-img" src="https://qiniu.bms16.com/FqDJdcyQZUG7rwTz2zoqkKsxkUrx" />
|
|
|
- <view class="type-top">
|
|
|
- <view>券包类型</view>
|
|
|
- </view>
|
|
|
- <view class="type-box">
|
|
|
- <view class="type-card">
|
|
|
- <!-- 单个套餐 -->
|
|
|
- <view class="card-item">
|
|
|
- <view class="item-left flex-row flex-between">
|
|
|
- <view class="item-top flex-row">
|
|
|
- <img src="https://qiniu.bms16.com/FiJc2aTl5Q2H6IxbLq8nul6ywZi1" />
|
|
|
- <view class="top-center">
|
|
|
- <view>优惠券</view>
|
|
|
- <view>¥<text>18.5</text><del>¥70</del></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="buy-btn">购买立享</view>
|
|
|
+ <view class="container-view">
|
|
|
+ <view class="top-bg" :style="'padding-top:'+statusBarHeight+'px;'">
|
|
|
+ <view class="flex-row" :style="'height:'+navabarHeight+'px;'">
|
|
|
+ <view class="flex-row" @tap="bindReturnView"><img class="return-view" src="https://qiniu.bms16.com/FnHXbzly7aXi8zLghrTU5BZdwH5_" /></view>
|
|
|
+ <text class="top-text">我的套餐</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="package-card flex-row flex-between">
|
|
|
+ <view class="flex-row flex-column" style="align-items: flex-start;">
|
|
|
+ <view class="left-first flex-row">
|
|
|
+ <view>小米 Su7</view>
|
|
|
+ <img class="left-img" src="https://qiniu.bms16.com/Fpf25Lkkrx05pvLw08mksVQKAQWf" />
|
|
|
+ </view>
|
|
|
+ <view class="left-second flex-row">
|
|
|
+ <view style="margin-right: 32rpx;">适用电池:<text>48v20Ah</text></view>
|
|
|
+ <view>押金:<text>$5.0</text></view>
|
|
|
</view>
|
|
|
- <view class="item-bottom flex-row">
|
|
|
- <view>折合0.7元/时</view>
|
|
|
- <view style="margin-left: 16rpx;">立享2.3折优惠</view>
|
|
|
+ <view class="left-third">
|
|
|
+ <view>卡号:<text>2024110202578</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="card-item">
|
|
|
- <view class="item-left flex-row flex-between">
|
|
|
- <view class="item-top flex-row">
|
|
|
- <img src="https://qiniu.bms16.com/FiJc2aTl5Q2H6IxbLq8nul6ywZi1" />
|
|
|
- <view class="top-center">
|
|
|
- <view>优惠券</view>
|
|
|
- <view>¥<text>18.5</text><del>¥70</del></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="buy-btn">购买立享</view>
|
|
|
+ <img class="card-right" src="https://qiniu.bms16.com/FuOJQxzypa-NginyHGdsWlzwnB8z" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="box-view">
|
|
|
+ <!-- <view class="package-card flex-row flex-between">
|
|
|
+ <view class="flex-row flex-column" style="align-items: flex-start;">
|
|
|
+ <view class="left-first flex-row">
|
|
|
+ <view>小米 Su7</view>
|
|
|
+ <img class="left-img" src="https://qiniu.bms16.com/Fpf25Lkkrx05pvLw08mksVQKAQWf" />
|
|
|
</view>
|
|
|
- <view class="item-bottom flex-row">
|
|
|
- <view>折合0.7元/时</view>
|
|
|
- <view style="margin-left: 16rpx;">立享2.3折优惠</view>
|
|
|
+ <view class="left-second flex-row">
|
|
|
+ <view style="margin-right: 32rpx;">适用电池:<text>48v20Ah</text></view>
|
|
|
+ <view>押金:<text>$5.0</text></view>
|
|
|
</view>
|
|
|
+ <view class="left-third">
|
|
|
+ <view>卡号:<text>2024110202578</text></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <img class="card-right" src="https://qiniu.bms16.com/FuOJQxzypa-NginyHGdsWlzwnB8z" />
|
|
|
+ </view> -->
|
|
|
+ <view class="package-view" v-for="item in packageList">
|
|
|
+ <view class="top-view flex-row flex-between">
|
|
|
+ <view class="top-title">{{item.total_duration}}<text> 天 </text>{{item.total_times}}<text> 次 </text></view>
|
|
|
+ <view v-if="item.status==1" class="card-text card-b">生效中</view>
|
|
|
+ <view v-if="item.status==2" class="card-text card-o">待生效</view>
|
|
|
+ </view>
|
|
|
+ <view class="package-item" style="margin-bottom: 32rpx;">
|
|
|
+ <view class="item-title">有效期至</view>
|
|
|
+ <view class="item-info">{{item.ctime}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="package-item" style="margin-bottom: 32rpx;">
|
|
|
+ <view class="item-title">有效时长</view>
|
|
|
+ <view class="item-info">{{item.efficient_day}}<text>/{{item.total_duration}}天</text></view>
|
|
|
+ </view>
|
|
|
+ <view class="package-item">
|
|
|
+ <view class="item-title">免费换电数</view>
|
|
|
+ <view class="item-info">{{item.change_rate}}<text>/{{item.total_times}}次</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -45,18 +64,38 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ var config = require('../../common/config.js');
|
|
|
+ var common = require('../../common/common.js');
|
|
|
+ var http = require('../../common/http.js');
|
|
|
+ var storage = require('../../common/storage.js');
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ statusBarHeight: 0,
|
|
|
+ navabarHeight: 0,
|
|
|
+ packageList: [
|
|
|
+ {ctime: '2024-04-04 16:15',total_duration: 30,efficient_day: 24,change_rate: 6,total_times: 10,status:1},
|
|
|
+ {ctime: '2024-04-04 16:15',total_duration: 30,efficient_day: 24,change_rate: 6,total_times: 10,status:2},
|
|
|
+ ]
|
|
|
};
|
|
|
- }
|
|
|
+ },
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
- ,
|
|
|
onLoad: function(options) {
|
|
|
-
|
|
|
+ const clientRect = uni.getMenuButtonBoundingClientRect()
|
|
|
+ const sysinfo = uni.getSystemInfoSync()
|
|
|
+ let GAP = 8
|
|
|
+ // #ifdef MP-ALIPAY
|
|
|
+ GAP = 0
|
|
|
+ // #endif
|
|
|
+ const navabarHeight = (clientRect.bottom - sysinfo.statusBarHeight) + (clientRect.top - sysinfo.statusBarHeight) + GAP
|
|
|
+ this.navabarHeight = navabarHeight
|
|
|
+ this.statusBarHeight = sysinfo.statusBarHeight
|
|
|
+ this.mapCtx = uni.createMapContext('myMap');
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
@@ -65,14 +104,10 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
- navToPage(e) {
|
|
|
- const url = e.currentTarget.dataset.url;
|
|
|
- if (!url) {
|
|
|
- return;
|
|
|
- }
|
|
|
- uni.navigateTo({
|
|
|
- url: url
|
|
|
- });
|
|
|
+ bindReturnView() {
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1,
|
|
|
+ }) // 返回上一页
|
|
|
},
|
|
|
}
|
|
|
};
|