diyici
This commit is contained in:
97
Order/pages/index/index.scss
Normal file
97
Order/pages/index/index.scss
Normal file
@@ -0,0 +1,97 @@
|
||||
.Order_body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background-color: #f1f8fd;
|
||||
.Order_content {
|
||||
margin-top: 14rpx;
|
||||
background-color: #ffffff;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
.Order_content_footer {
|
||||
padding: 0 38rpx;
|
||||
.Order_content_footer_button {
|
||||
width: 100%;
|
||||
height: 106rpx;
|
||||
background: #121836;
|
||||
border-radius: 15rpx 15rpx 15rpx 15rpx;
|
||||
opacity: 1;
|
||||
font-size: 34rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.Order_content_information {
|
||||
padding: 34rpx 38rpx;
|
||||
.red_text{
|
||||
color: #EA0000FF;
|
||||
}
|
||||
.value_text{
|
||||
color: #999999FF;
|
||||
}
|
||||
.bluetext{
|
||||
color: #476FFAFF;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.price_time_interval {
|
||||
margin-bottom: 30rpx;
|
||||
.time_interval {
|
||||
margin-top: 20rpx;
|
||||
flex-wrap: wrap;
|
||||
.time_interval_bottom_price{
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #999999FF;
|
||||
}
|
||||
.time_interval_price {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.price_time_interval_label {
|
||||
font-size: 30rpx;
|
||||
color: #ea0000ff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.Order_content_information_item {
|
||||
margin-bottom: 30rpx;
|
||||
.Order_content_information_item_label {
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
}
|
||||
.Order_content_information_item_value {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
.Order_content_header {
|
||||
border-bottom: solid 1px #f1f2f7;
|
||||
padding: 34rpx 38rpx;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.Order_header {
|
||||
width: 100%;
|
||||
// height: 212rpx;
|
||||
padding: 61rpx 38rpx;
|
||||
background-color: #ffffff;
|
||||
margin-top: 50rpx;
|
||||
border-radius: 70rpx 70rpx 0rpx 0rpx;
|
||||
box-sizing: border-box;
|
||||
.Order_header_tip {
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.Order_header_type {
|
||||
color: #36658d;
|
||||
font-size: 38rpx;
|
||||
font-weight: 600;
|
||||
margin-bottom: 38rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
123
Order/pages/index/index.vue
Normal file
123
Order/pages/index/index.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<view style="width: 100vw;height: 100vh;">
|
||||
<view v-if="pageData" class="Order_body flex column">
|
||||
<view class="Order_header">
|
||||
<view class="Order_header_type">{{ pageData.orderStatus | orderStatus}}</view>
|
||||
<view class="Order_header_tip">
|
||||
{{pageData.orderStatus|orderStatusText}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="Order_content oneflex flex column ">
|
||||
<view class="Order_content_header">{{pageData.stationName}}</view>
|
||||
<view class="Order_content_information oneflex">
|
||||
<view class="Order_content_information_item flex">
|
||||
<view class="Order_content_information_item_label">订单编号:</view>
|
||||
<view class="Order_content_information_item_value oneflex value_text">{{pageData.id}}</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex">
|
||||
<view class="Order_content_information_item_label">充电接口编号:</view>
|
||||
<view class="Order_content_information_item_value oneflex value_text">{{pageData.connectorId}}</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex">
|
||||
<view class="Order_content_information_item_label">累计充电量:</view>
|
||||
<view class="Order_content_information_item_value oneflex value_text">{{ tool.getnum(pageData.totalPower) }}度</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex">
|
||||
<view class="Order_content_information_item_label">预支付总金额:</view>
|
||||
<view class="Order_content_information_item_value oneflex value_text">{{ tool.getnum(pageData.payMoneyPre,3) }}元</view>
|
||||
</view>
|
||||
<view class="price_time_interval">
|
||||
<view class="price_time_interval_label">价格</view>
|
||||
<view class="time_interval flex">
|
||||
<view v-for="(item,index) in pageData.xchargeOrderDetailList" style="width: 100%;margin-bottom: 15rpx;" class="">
|
||||
<view class="flex ac">
|
||||
<text style="color: #333333;">{{item.detailStartTime.split(' ')[1] }}-{{item.detailEndTime.split(' ')[1]}}</text>
|
||||
<text
|
||||
class="time_interval_price oneflex">{{ tool.getnum( ( ((Number(item.serviceFee2customer)*1000) + (Number(item.electricityFee2customer) * 1000)) / 1000 ) ,3 )}} /度
|
||||
<text class="bluetext">
|
||||
{{tool.getnum(item.detailPower)}}度 | {{
|
||||
tool.getnum(( ((Number(item.serviceMoney2customer)*1000) + (Number(item.electricityMoney2customer *1000) )) / 1000 ),3)
|
||||
}}元
|
||||
</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="time_interval_bottom_price">电价 {{ tool.getnum(item.electricityFee2customer,3) }}元 /度|服务费 {{ tool.getnum(item.serviceFee2customer,3) }} 元/度</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex">
|
||||
<view class="Order_content_information_item_label">退款金额:</view>
|
||||
<view class="Order_content_information_item_value oneflex bluetext">{{ tool.getnum(pageData.refundMoneyAcc,3) }}元</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex">
|
||||
<view class="Order_content_information_item_label">实付总金额:</view>
|
||||
<view class="Order_content_information_item_value oneflex red_text">{{ tool.getnum(pageData.payMoneyAcc,3) }}元</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<skeleton v-else></skeleton>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import order from '@/api/order.js'
|
||||
import skeleton from './skeleton.vue'
|
||||
export default {
|
||||
components:{
|
||||
skeleton
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageData: null
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.id) {
|
||||
this.getDetails(e.id)
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
orderStatusText(e) {
|
||||
switch (Number(e)) {
|
||||
case 1:
|
||||
return '启动中'
|
||||
case 2:
|
||||
return '正在充电'
|
||||
case 3:
|
||||
return '正在停止充电'
|
||||
case 4:
|
||||
return '您已完成充电'
|
||||
default:
|
||||
return '数据错误'
|
||||
}
|
||||
},
|
||||
orderStatus(e) {
|
||||
switch (Number(e)) {
|
||||
case 1:
|
||||
return '启动中'
|
||||
case 2:
|
||||
return '充电中'
|
||||
case 3:
|
||||
return '停止中'
|
||||
case 4:
|
||||
return '已结束'
|
||||
default:
|
||||
return '数据错误'
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getDetails(id) {
|
||||
order.xchargeOrderInfo(id).then(res => {
|
||||
this.pageData = res.data;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import 'index.scss';
|
||||
</style>
|
||||
195
Order/pages/index/skeleton.vue
Normal file
195
Order/pages/index/skeleton.vue
Normal file
@@ -0,0 +1,195 @@
|
||||
<!--
|
||||
此文件为开发者工具生成,生成时间: 2023/6/5上午10:55:34
|
||||
使用方法:
|
||||
在 C:\Users\lenovo\Documents\HBuilderProjects\Nebula-Flash-Charge_MP-WEIXIN\unpackage\dist\dev\mp-weixin\Order\pages\index\index.wxml 引入模板
|
||||
|
||||
```
|
||||
<import src="index.skeleton.wxml"/>
|
||||
<template is="skeleton" wx:if="{{loading}}" />
|
||||
```
|
||||
|
||||
在 C:\Users\lenovo\Documents\HBuilderProjects\Nebula-Flash-Charge_MP-WEIXIN\unpackage\dist\dev\mp-weixin\Order\pages\index\index.wxss 中引入样式
|
||||
```
|
||||
@import "./index.skeleton.wxss";
|
||||
```
|
||||
|
||||
更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
|
||||
-->
|
||||
<template name="skeleton">
|
||||
<view class="sk-container">
|
||||
<view class="Order_body flex column data-v-2ede234b">
|
||||
<view class="Order_header data-v-2ede234b">
|
||||
<view class="Order_header_type data-v-2ede234b sk-transparent sk-text-14-2857-234 sk-text">已结束</view>
|
||||
<view class="Order_header_tip data-v-2ede234b sk-transparent sk-text-14-2857-434 sk-text">您已完成充电</view>
|
||||
</view>
|
||||
<view class="Order_content oneflex flex column data-v-2ede234b">
|
||||
<view class="Order_content_header data-v-2ede234b sk-transparent sk-text-14-2857-177 sk-text">漂亮小石</view>
|
||||
<view class="Order_content_information oneflex data-v-2ede234b">
|
||||
<view class="Order_content_information_item flex data-v-2ede234b">
|
||||
<view class="Order_content_information_item_label data-v-2ede234b sk-transparent sk-text-14-2857-849 sk-text">订单编号:</view>
|
||||
<view class="Order_content_information_item_value oneflex value_text data-v-2ede234b sk-transparent sk-text-14-2857-693 sk-text" style="background-position-x: 100%;">1664460091849580544</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex data-v-2ede234b">
|
||||
<view class="Order_content_information_item_label data-v-2ede234b sk-transparent sk-text-14-2857-523 sk-text">充电接口编号:</view>
|
||||
<view class="Order_content_information_item_value oneflex value_text data-v-2ede234b sk-transparent sk-text-14-2857-713 sk-text" style="background-position-x: 100%;">1665521131920920662</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex data-v-2ede234b">
|
||||
<view class="Order_content_information_item_label data-v-2ede234b sk-transparent sk-text-14-2857-675 sk-text">累计充电量:</view>
|
||||
<view class="Order_content_information_item_value oneflex value_text data-v-2ede234b sk-transparent sk-text-14-2857-164 sk-text" style="background-position-x: 100%;">1.60度</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex data-v-2ede234b">
|
||||
<view class="Order_content_information_item_label data-v-2ede234b sk-transparent sk-text-14-2857-105 sk-text">预支付总金额:</view>
|
||||
<view class="Order_content_information_item_value oneflex value_text data-v-2ede234b sk-transparent sk-text-14-2857-166 sk-text" style="background-position-x: 100%;">20.00元</view>
|
||||
</view>
|
||||
<view class="price_time_interval data-v-2ede234b">
|
||||
<view class="price_time_interval_label data-v-2ede234b sk-transparent sk-text-14-2857-642 sk-text">价格</view>
|
||||
<view class="time_interval flex data-v-2ede234b">
|
||||
<view class="data-v-2ede234b" style="width:100%;margin-bottom:7px;">
|
||||
<view class="flex ac data-v-2ede234b">
|
||||
<text class="data-v-2ede234b sk-transparent sk-text-14-2857-454 sk-text" style="color:#333333;">10:33:00-10:44:00</text>
|
||||
<text class="time_interval_price oneflex data-v-2ede234b sk-transparent">9.50 /度<text class="bluetext data-v-2ede234b sk-transparent sk-text-14-2857-313 sk-text" style="background-position-x: 100%;">1.60度 | 15.20元</text></text>
|
||||
</view>
|
||||
<view class="time_interval_bottom_price data-v-2ede234b sk-transparent sk-text-14-2857-695 sk-text" style="background-position-x: 100%;">电价 6.00元 /度|服务费 3.50 元/度</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex data-v-2ede234b">
|
||||
<view class="Order_content_information_item_label data-v-2ede234b sk-transparent sk-text-14-2857-22 sk-text">退款金额:</view>
|
||||
<view class="Order_content_information_item_value oneflex bluetext data-v-2ede234b sk-transparent sk-text-14-2857-107 sk-text" style="background-position-x: 100%;">4.80元</view>
|
||||
</view>
|
||||
<view class="Order_content_information_item flex data-v-2ede234b">
|
||||
<view class="Order_content_information_item_label data-v-2ede234b sk-transparent sk-text-14-2857-632 sk-text">实付总金额:</view>
|
||||
<view class="Order_content_information_item_value oneflex red_text data-v-2ede234b sk-transparent sk-text-14-2857-781 sk-text" style="background-position-x: 100%;">15.20元</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<style>
|
||||
/*
|
||||
此文件为开发者工具生成,生成时间: 2023/6/5上午10:55:34
|
||||
|
||||
在 C:\Users\lenovo\Documents\HBuilderProjects\Nebula-Flash-Charge_MP-WEIXIN\unpackage\dist\dev\mp-weixin\Order\pages\index\index.wxss 中引入样式
|
||||
```
|
||||
@import "./index.skeleton.wxss";
|
||||
```
|
||||
|
||||
更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
|
||||
*/
|
||||
.sk-transparent {
|
||||
color: transparent !important;
|
||||
}
|
||||
.sk-text-14-2857-234 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 53.2000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text {
|
||||
background-origin: content-box !important;
|
||||
background-clip: content-box !important;
|
||||
background-color: transparent !important;
|
||||
color: transparent !important;
|
||||
background-repeat: repeat-y !important;
|
||||
}
|
||||
.sk-text-14-2857-434 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-177 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-849 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-693 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 44.8000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-523 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-713 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 44.8000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-675 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-164 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 44.8000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-105 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-166 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 44.8000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-642 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-454 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 44.8000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-313 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-695 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 33.6000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-22 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-107 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-632 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 42.0000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-781 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 44.8000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-container {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user