diyici
This commit is contained in:
95
Order/pages/charging/index.scss
Normal file
95
Order/pages/charging/index.scss
Normal file
@@ -0,0 +1,95 @@
|
||||
.charging_body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f1f8fd;
|
||||
box-sizing: border-box;
|
||||
padding-top: 50rpx;
|
||||
.charging_container {
|
||||
position: relative;
|
||||
padding: 0 56rpx;
|
||||
padding-top: 50rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #ffffff;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border-radius: 70rpx 70rpx 0 0;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
.reload{
|
||||
position: absolute;
|
||||
right: 26rpx;
|
||||
top:16rpx;
|
||||
|
||||
}
|
||||
.charging_footer {
|
||||
margin-top: 68rpx;
|
||||
.charging_footer_button {
|
||||
width: 100%;
|
||||
padding: 30rpx 0;
|
||||
border-radius: 15rpx 15rpx 15rpx 15rpx;
|
||||
background: #121836;
|
||||
color: #ffffff;
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.charging_cars {
|
||||
flex-wrap: wrap;
|
||||
margin-top: 68rpx;
|
||||
.charging_cars_item {
|
||||
width: 290rpx;
|
||||
height: 175rpx;
|
||||
background: rgba(181, 195, 240, 0.08);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
.charging_cars_item_footer {
|
||||
color: #121836;
|
||||
font-size: 26rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.charging_cars_item_top {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
position: relative;
|
||||
image {
|
||||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
position: absolute;
|
||||
right: -57rpx;
|
||||
top: -57rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.charging_information {
|
||||
margin-top: 68rpx;
|
||||
.charging_information_item {
|
||||
.charging_information_item_value {
|
||||
font-size: 30rpx;
|
||||
color: #121836;
|
||||
}
|
||||
.charging_information_item_label {
|
||||
color: #666666;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
.segmentation {
|
||||
width: 3rpx;
|
||||
height: 88rpx;
|
||||
background: linear-gradient(360deg, #c9d5f7 8%, #7494f7 49%, #c2d0fa 100%);
|
||||
}
|
||||
}
|
||||
.charging_title:first-child{
|
||||
margin-top: 0;
|
||||
}
|
||||
.charging_title {
|
||||
color: #000000;
|
||||
font-size: 26rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
.charging_dashboard {
|
||||
margin-top: 68rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
177
Order/pages/charging/index.vue
Normal file
177
Order/pages/charging/index.vue
Normal file
@@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<view style="width: 100vw;height: 100vh;overflow: hidden;">
|
||||
<view v-if="pageData" class="charging_body">
|
||||
<view class="charging_container">
|
||||
<view @click="reload" class="reload">
|
||||
<uni-icons type="reload" size="25" color="#bbbbbb"></uni-icons>
|
||||
</view>
|
||||
<view style="margin-top: 0;" class="charging_title flex">
|
||||
<text style="color: #bbbbbb;">订单编号:</text>
|
||||
<text class="oneflex flex jw">
|
||||
<text> {{pageData.id}} </text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="charging_title flex">
|
||||
<text style="color: #bbbbbb;">电桩编号:</text>
|
||||
<text class="oneflex flex jw">
|
||||
<text> {{pageData.connectorId}} </text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="charging_dashboard">
|
||||
<qiun-data-charts type="arcbar" :opts="opts" :chartData="chartData" />
|
||||
</view>
|
||||
<view class="charging_information flex">
|
||||
<view class="oneflex flex jc ac column charging_information_item">
|
||||
<view class="charging_information_item_label">预支付总金额</view>
|
||||
<view class="charging_information_item_value">{{ tool.getnum(pageData.payMoneyPre,3) }}元</view>
|
||||
</view>
|
||||
<view class="segmentation"></view>
|
||||
<view class="oneflex flex jc ac column charging_information_item">
|
||||
<view class="charging_information_item_label">预支付可用金额</view>
|
||||
<view class="charging_information_item_value">{{tool.getnum(pageData.payMoneyPreAvailable,3)}}元</view>
|
||||
</view>
|
||||
<view class="segmentation"></view>
|
||||
<view class="oneflex flex jc ac column charging_information_item">
|
||||
<view class="charging_information_item_label">预支付阀值</view>
|
||||
<view class="charging_information_item_value">{{ tool.getnum(pageData.payMoneyPreFreeze,3) }}元</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="charging_cars flex jw">
|
||||
<view class="charging_cars_item">
|
||||
<view class="charging_cars_item_top">
|
||||
累计充电时长
|
||||
<image src="../../../static/sj.png"></image>
|
||||
</view>
|
||||
<view class="charging_cars_item_footer">{{ calcTime(pageData.endTime,pageData.startTime)}}</view>
|
||||
</view>
|
||||
<view class="charging_cars_item">
|
||||
<view class="charging_cars_item_top">
|
||||
累计充电量
|
||||
<image src="../../../static/je1.png"></image>
|
||||
</view>
|
||||
<view class="charging_cars_item_footer">{{ tool.getnum(pageData.totalPower) }}度</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="charging_footer">
|
||||
<view style="width: 100%;text-align: center; color: #00000073;font-size: 24rpx;margin-bottom: 20rpx;">
|
||||
采样更新时间:{{pageData.endTime}}
|
||||
</view>
|
||||
<view @click="stop" class="charging_footer_button flex ac jc">
|
||||
{{pageData.orderStatus==2? '结束充电' : '结束中'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<skeleton v-else></skeleton>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import skeleton from './skeleton.vue'
|
||||
import order from '@/api/order.js'
|
||||
import qiunDataCharts from "../../components/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue"
|
||||
import chargingAnimation from "../../components/chargingAnimation/chargingAnimation.vue"
|
||||
export default {
|
||||
components: {
|
||||
qiunDataCharts,
|
||||
chargingAnimation,
|
||||
skeleton
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timer:null,
|
||||
time:'',
|
||||
pageData:null,
|
||||
chartData: {
|
||||
series: [{
|
||||
name: "充电状态",
|
||||
color: "rgba(92, 130, 250, 1)",
|
||||
data: 0
|
||||
|
||||
}]
|
||||
},
|
||||
//您可以通过修改 config-ucharts.js 文件中下标为 ['arcbar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
|
||||
opts: {
|
||||
padding: undefined,
|
||||
title: {
|
||||
name: "0%",
|
||||
fontSize: 35,
|
||||
color: "#476FFA"
|
||||
},
|
||||
subtitle: {
|
||||
name: "充电中",
|
||||
fontSize: 15,
|
||||
color: "#476FFA"
|
||||
},
|
||||
extra: {
|
||||
arcbar: {
|
||||
type: "circle",
|
||||
width: 20,
|
||||
backgroundColor: "#E9E9E9",
|
||||
customColor: ['#1890FF'],
|
||||
startAngle: 1.5,
|
||||
endAngle: 0.25,
|
||||
gap: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
onUnload() {
|
||||
uni.$emit('orderUpdate');
|
||||
//
|
||||
let routes = getCurrentPages();
|
||||
if(routes[routes.length-2]['route']=='ChargingStation/pages/placeOrder/result/index'){
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
//
|
||||
clearInterval(this.timer)
|
||||
|
||||
},
|
||||
onReady() {},
|
||||
onLoad(e) {
|
||||
if(e.id){
|
||||
this.getDetails(e.id);
|
||||
this.timer = setInterval(()=>{
|
||||
this.reload()
|
||||
},30000)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reload(){
|
||||
this.getDetails(this.pageData.id)
|
||||
},
|
||||
calcTime(formerly,now){
|
||||
var startTime = new Date(now); // 开始时间
|
||||
var endTime = new Date(formerly); // 结束时间
|
||||
var diff = endTime.getTime() - startTime.getTime(); // 获取差值时间(以毫秒为单位)
|
||||
var seconds = Math.floor(diff / 1000); // 换算出相差的秒数
|
||||
var minutes = Math.floor(seconds / 60); // 换算出相差的分钟数
|
||||
var hours = Math.floor(minutes / 60); // 换算出相差的小时数
|
||||
var days = Math.floor(hours / 24); // 换算出相差的天数
|
||||
return hours % 24 + " 小时 " + minutes % 60 + " 分钟 "
|
||||
|
||||
},
|
||||
getDetails(id){
|
||||
order.xchargeOrderInfo(id).then(res=>{
|
||||
this.pageData = res.data;
|
||||
this.chartData.series[0]['data'] = res.data.soc? Number(res.data.soc) / 100 : 0;
|
||||
this.opts.title.name = res.data.soc? `${Number(res.data.soc)}%` : '0%';
|
||||
this.opts.subtitle.name = res.data.orderStatus==2? `充电中` : '正在停止';
|
||||
})
|
||||
},
|
||||
stop(){
|
||||
if(this.pageData.orderStatus!==2) return ;
|
||||
order.stopOrder({id:this.pageData.id}).then(res=>{
|
||||
if(res.code==20000){
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import 'index.scss';
|
||||
</style>
|
||||
190
Order/pages/charging/skeleton.vue
Normal file
190
Order/pages/charging/skeleton.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<!--
|
||||
此文件为开发者工具生成,生成时间: 2023/6/5下午1:33:46
|
||||
使用方法:
|
||||
在 C:\Users\lenovo\Documents\HBuilderProjects\Nebula-Flash-Charge_MP-WEIXIN\unpackage\dist\dev\mp-weixin\Order\pages\charging\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\charging\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="charging_body data-v-515489ae">
|
||||
<view class="charging_container data-v-515489ae">
|
||||
<view class="reload data-v-515489ae" >
|
||||
<view class="data-v-515489ae">
|
||||
<text class="uni-icons icons--uni-icons uniui-reload icons--uniui-reload sk-pseudo sk-pseudo-circle" style="color:#bbbbbb;font-size:25px;"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="charging_title flex data-v-515489ae">
|
||||
<text class="data-v-515489ae sk-transparent sk-text-14-2857-179 sk-text" style="color:#bbbbbb;">电桩编号:</text>
|
||||
<text class="oneflex flex jw data-v-515489ae"><text class="data-v-515489ae sk-transparent sk-text-14-2857-660 sk-text">1665521131920920662</text></text>
|
||||
</view>
|
||||
<view class="charging_dashboard data-v-515489ae">
|
||||
<view class="data-v-515489ae">
|
||||
<view class="chartsview charts--chartsview data-v-62b3267f charts--data-v-62b3267f" id="006cf5da--ChartBoxIddFBtIEYNpOFOFGfDScrnJJusVIuhBquc">
|
||||
<view class="data-v-62b3267f charts--data-v-62b3267f">
|
||||
<view canvas-id="dFBtIEYNpOFOFGfDScrnJJusVIuhBquc" class="data-v-62b3267f charts--data-v-62b3267f sk-transparent sk-text-14-2857-552 sk-text sk-image" id="006cf5da--dFBtIEYNpOFOFGfDScrnJJusVIuhBquc"
|
||||
style="width:319px;height:250px;background:rgba(0,0,0,0);">绘图区域</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="charging_information flex data-v-515489ae">
|
||||
<view class="oneflex flex jc ac column charging_information_item data-v-515489ae">
|
||||
<view class="charging_information_item_label data-v-515489ae sk-transparent sk-text-14-2857-501 sk-text">预支付总金额</view>
|
||||
<view class="charging_information_item_value data-v-515489ae sk-transparent sk-text-14-2857-440 sk-text">35.00元</view>
|
||||
</view>
|
||||
<view class="segmentation data-v-515489ae sk-image"></view>
|
||||
<view class="oneflex flex jc ac column charging_information_item data-v-515489ae">
|
||||
<view class="charging_information_item_label data-v-515489ae sk-transparent sk-text-14-2857-92 sk-text">预支付可用金额</view>
|
||||
<view class="charging_information_item_value data-v-515489ae sk-transparent sk-text-14-2857-54 sk-text">30.00元</view>
|
||||
</view>
|
||||
<view class="segmentation data-v-515489ae sk-image"></view>
|
||||
<view class="oneflex flex jc ac column charging_information_item data-v-515489ae">
|
||||
<view class="charging_information_item_label data-v-515489ae sk-transparent sk-text-14-2857-707 sk-text">预支付阀值</view>
|
||||
<view class="charging_information_item_value data-v-515489ae sk-transparent sk-text-14-2857-845 sk-text">5.00元</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="charging_cars flex jw data-v-515489ae">
|
||||
<view class="charging_cars_item data-v-515489ae">
|
||||
<view class="charging_cars_item_top data-v-515489ae sk-transparent">累计充电时长
|
||||
<image class="data-v-515489ae sk-image"></image>
|
||||
</view>
|
||||
<view class="charging_cars_item_footer data-v-515489ae sk-transparent sk-text-14-2857-733 sk-text">-10 小时 -20 分钟 </view>
|
||||
</view>
|
||||
<view class="charging_cars_item data-v-515489ae">
|
||||
<view class="charging_cars_item_top data-v-515489ae sk-transparent">累计充电量
|
||||
<image class="data-v-515489ae sk-image"></image>
|
||||
</view>
|
||||
<view class="charging_cars_item_footer data-v-515489ae sk-transparent sk-text-14-2857-444 sk-text">0.00度</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="charging_footer data-v-515489ae">
|
||||
<view class="data-v-515489ae sk-transparent sk-text-14-2857-938 sk-text" style="width: 100%; text-align: center; color: rgba(0, 0, 0, 0.45); font-size: 12px; margin-bottom: 10px; background-position-x: 50%;">采样更新时间:null</view>
|
||||
<view class="charging_footer_button flex ac jc data-v-515489ae sk-transparent sk-text-14-2857-689 sk-text" >结束充电</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<style>
|
||||
/*
|
||||
此文件为开发者工具生成,生成时间: 2023/6/5下午1:33:46
|
||||
|
||||
在 C:\Users\lenovo\Documents\HBuilderProjects\Nebula-Flash-Charge_MP-WEIXIN\unpackage\dist\dev\mp-weixin\Order\pages\charging\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-179 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 36.4000rpx;
|
||||
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-660 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 36.4000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-552 {
|
||||
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-501 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 36.4000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-440 {
|
||||
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-92 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 36.4000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-54 {
|
||||
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-707 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 36.4000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-845 {
|
||||
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-733 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 36.4000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-444 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 36.4000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-text-14-2857-938 {
|
||||
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-689 {
|
||||
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
|
||||
background-size: 100% 47.6000rpx;
|
||||
position: relative !important;
|
||||
}
|
||||
.sk-image {
|
||||
background: #EFEFEF !important;
|
||||
}
|
||||
.sk-pseudo::before, .sk-pseudo::after {
|
||||
background: #EFEFEF !important;
|
||||
background-image: none !important;
|
||||
color: transparent !important;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
.sk-pseudo-rect::before, .sk-pseudo-rect::after {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.sk-pseudo-circle::before, .sk-pseudo-circle::after {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
.sk-container {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
</style>
|
||||
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