10.31 修改扫码程序

main
shilei 3 weeks ago
parent e932a67763
commit 87697b7ac9

@ -2,12 +2,13 @@
SHOPRO_VERSION = v1.8.3
# 后端接口 - 正式环境(通过 process.env.NODE_ENV 非 development
SHOPRO_BASE_URL = https://www.zzpower.net
SHOPRO_BASE_URL = https://www.zzpower.net
# SHOPRO_BASE_URL = http://192.168.2.14:48080
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development
# SHOPRO_DEV_BASE_URL = http://192.168.2.12:48080
SHOPRO_DEV_BASE_URL = http://192.168.2.14:48080
# SHOPRO_DEV_BASE_URL = http://2a2b9f7b.r11.cpolar.top
SHOPRO_DEV_BASE_URL = https://www.zzpower.net
# SHOPRO_DEV_BASE_URL = https://www.zzpower.net
# 后端接口前缀(一般不建议调整)
SHOPRO_API_PATH = /app-api

@ -5,8 +5,8 @@ const appname = "换电商用车";
const profiles = {
dev: {
baseURL: "https://www.zzpower.net/",
// baseURL: "http://192.168.2.12:48080/",
// baseURL: "https://www.zzpower.net/",
baseURL: "http://192.168.2.14:48080/",
// baseURL: "http://2a2b9f7b.r11.cpolar.top/",
api_miniapp: "service-miniapp/",
api_baseinfo: "service-baseinfo/",
@ -14,6 +14,7 @@ const profiles = {
},
//服务器生产环境地址
prod: {
// baseURL: "http://192.168.2.14:48080/",
baseURL: "https://www.zzpower.net/",
api_miniapp: "service-miniapp/",
api_baseinfo: "service-baseinfo/",
@ -30,24 +31,6 @@ const profiles = {
style:0,
},
//
qinou: {
baseURL: "https://www.zzpower.net/",
api_miniapp: "service-miniapp/",
api_baseinfo: "service-baseinfo/",
api_pay: "service-pay/",
appIcon: "",
facilitator: '',
address: '',
powerProtocol: '',
iPhone: '17757285870',
email: '',
api_recognition:'service-openapi/',
api_userinfo: "service-userinfo/",
mqtt:'',
style:1,
},
};
// 服务器域名

@ -27,9 +27,12 @@ const request = (options) => {
uni.removeStorageSync("teamId");
uni.removeStorageSync("realNameAuthFlag");
uni.removeStorageSync("version");
uni.navigateBack({
delta: 1
});
// uni.navigateBack({
// delta: 1
// });
uni.reLaunch({
url: '/pagesCenter/login/enter'
})
}
});

@ -0,0 +1,166 @@
<template>
<view class="piaoyi-text-animate3">
<div class="g-container">
<div class="g-number">{{text}}%</div>
<div class="g-contrast">
<div class="g-circle"></div>
<!-- <view class="g-bubbles">
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
<view class="li"></view>
</view> -->
</div>
</div>
</view>
</template>
<script>
export default {
props: {
text: {
type: Number,
default: 0
}
}
}
</script>
<style lang="scss" scoped>
.piaoyi-text-animate3 {
width: 100%;
height: 100%;
display: flex;
// background: #fff;
overflow: hidden;
}
.g-number {
position: absolute;
width: 300px;
top: 27%;
text-align: center;
font-size: 32px;
z-index: 10;
color: #000;
}
.g-container {
position: relative;
width: 300px;
height: 400px;
margin: auto;
}
.g-contrast {
// filter: contrast(10) hue-rotate(0);
width: 300px;
height: 400px;
background-color: #fff;
overflow: hidden;
animation: hueRotate 10s infinite linear;
}
.g-circle {
position: relative;
width: 300px;
height: 300px;
box-sizing: border-box;
filter: blur(8px);
&::after {
content: "";
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%) rotate(0);
width: 200px;
height: 200px;
// background-color: #00ff6f;
background-color: #0abf49;
border-radius: 42% 38% 62% 49% / 45%;
animation: rotate 10s infinite linear;
}
&::before {
content: "";
position: absolute;
width: 176px;
height: 176px;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
background-color: #fff;
z-index: 10;
}
}
.g-bubbles {
position: absolute;
left: 50%;
bottom: 0;
width: 100px;
height: 40px;
transform: translate(-50%, 0);
border-radius: 100px 100px 0 0;
background-color: #00ff6f;
filter: blur(5px);
}
.li {
position: absolute;
border-radius: 50%;
background: #00ff6f;
}
@for $i from 0 through 15 {
.li:nth-child(#{$i}) {
$width: 15 + random(15) + px;
left: 15 + random(70) + px;
top: 50%;
transform: translate(-50%, -50%);
width: $width;
height: $width;
animation: moveToTop #{random(6) + 3}s ease-in-out -#{random(5000)/1000}s infinite;
}
}
@keyframes rotate {
50% {
border-radius: 45% / 42% 38% 58% 49%;
}
100% {
transform: translate(-50%, -50%) rotate(720deg);
}
}
@keyframes moveToTop {
90% {
opacity: 1;
}
100% {
opacity: .1;
transform: translate(-50%, -180px);
}
}
@keyframes hueRotate {
100% {
filter: contrast(15) hue-rotate(360deg);
}
}
</style>

@ -47,6 +47,41 @@
</view>
</view>
<uv-notify ref="errornotify" message="当前无操作权限,请审核通过后再试" type="error"></uv-notify>
<uv-popup ref="bottom_popup" round="30" :overlay="false">
<view style="position: relative;">
<view class="line_tops" @click="handle_close_popup"></view>
<view class="position_right_tops">
<uv-icon name="arrow-up-fill" size="21" color="#fff"></uv-icon>
<view class="" style="font-size: 12px;">
导航
</view>
</view>
<view style="padding: 0 20rpx;">
<view class="cu-item shadow">
<view class="flex padding-tb-sm">
<view class="flex">
<view class="titleState">营业中</view>
</view>
<view class="name">{{searchStationName}}</view>
</view>
<view class="flex padding-tb-sm justify-between">
<view class="flex">
<view class="lg text-gray cuIcon-location"></view>
<view class="titleFont text-df text-gray">{{searchAreaName}}</view>
</view>
<view class="searchDistance text-df">
{{searchDistance == null? '--': searchDistance.toFixed(2) }}km
</view>
</view>
<view class="flex padding-tb-xs justify-center">
<view class="flex">
<view class="goDetail" @click="goDetail"></view>
</view>
</view>
</view>
</view>
</view>
</uv-popup>
</view>
</template>
@ -74,7 +109,7 @@
})
const popup_mean = ref(null)
const bottom_popup = ref(false)
const bdlongitude = ref()
const bdlatitude = ref()
const stationName = ref()
@ -87,7 +122,7 @@
const searchStationName = ref()
const searchAreaName = ref()
const searchDistance = ref()
const searchDistance = ref(null)
const showPoints = reactive({
pointList: []
@ -131,6 +166,10 @@
}
const handle_close_popup = () => {
bottom_popup.value.close()
}
const handle_maps_now = async () => {
let data = {
latitude: latitude.value,
@ -318,8 +357,8 @@
searchDistance.value = showInf[0].distance
searchNo.value = showInf[0].stationNo
searchID.value = showInf[0].id
// popup_mean.value.open('bottom')
showToast.value = !showToast.value
bottom_popup.value.open('bottom')
// showToast.value = !showToast.value
}
const handle_open = (showInf) => {
@ -410,4 +449,27 @@
.scrollView {
height: calc(100vh - 100rpx);
}
.line_tops {
width: 20%;
height: 10rpx;
margin: 20rpx auto;
background: #e5e5e5;
border-radius: 5rpx;
}
.position_right_tops {
width: 100rpx;
height: 100rpx;
background: #2bbd69;
border-radius: 50%;
position: absolute;
right: 20rpx;
top: 10rpx;
color: #fff;
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
}
</style>

@ -1,21 +1,18 @@
{
"id": "zw-tabbar",
"displayName": "zw-tabbar自定义tabbar",
"version": "1.1",
"description": "由于原生Tabbar不支持中间凸起显示大图标和灵活的自定义所以弄了个通用组件方便使用。",
"id": "piaoyi-text-animate3",
"name": "动画特效-华为充电动画",
"displayName": "动画特效-华为充电动画",
"version": "1.0.0",
"description": "动画特效-华为充电动画,全端兼容,动图是压缩过的所以看起来模糊,实际效果是正常的",
"keywords": [
"tabbar",
"底部选项卡",
"底部菜单"
"动画特效",
"华为充电动画",
"全端兼容"
],
"dcloudext": {
"category": [
"前端组件",
"通用组件"
]
},
"name": "zw-tabbar自定义tabbar",
"scripts": {
"dev:mp-weixin": "pnpm run dev -- --miniprogram mp-weixin"
}
}

@ -31,8 +31,9 @@
{
"path": "pages/userCenter/userCenter",
"style": {
"navigationBarTitleText": "个人中心",
"navigationBarBackgroundColor": "#E4EFFF"
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#2cc06c",
"navigationBarTextStyle": "white"
}
},
{
@ -129,6 +130,14 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/order/chargorder/detailInf/detail",
"style": {
"navigationBarTitleText": "充电单详情",
"enablePullDownRefresh": false
}
},
{
@ -282,14 +291,15 @@
"backgroundColor": "#ffffff",
"color": "#999999",
"selectedColor": "#2a82e4",
"list": [{
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home_hl.png"
},
{
"pagePath": "pages/userCenter/userCenter",
"pagePath": "pages/userCenter/about/about",
"text": "个人中心",
"iconPath": "static/tabbar/me.png",
"selectedIconPath": "static/tabbar/me_hl.png"

@ -0,0 +1,392 @@
.mainBg {
width: 100vw;
position: fixed;
top: 0;
height: 100vh;
background: linear-gradient(180deg, #4C91FF 0%, #3698FD 11.35%, #73CBFD 21.65%, #94EBFF 37.35%, #EAF4F8 97.71%);
z-index: -1;
}
.change_version {
display: flex;
align-items: center;
color: #000;
}
.tab_headers {
line-height: 80rpx;
width: 100%;
text-align: center;
color: #fff;
font-size: 14px;
font-weight: 600;
}
.topNav {
position: absolute;
top: 180rpx;
left: 50%;
transform: translateX(-50%);
z-index: 999;
background: #fff;
width: 90%;
display: flex;
align-items: center;
border-radius: 15rpx;
}
.notice_position {
// width: 100%;
position: absolute;
top: 280rpx;
left: 50%;
transform: translateX(-50%);
z-index: 999;
width: 90%;
}
.posi_imgs {
position: absolute;
// background: #fff;
// padding: 5rpx;
right: 30rpx;
bottom: -10rpx;
z-index: 999;
}
.cu-bar {
color: #fff;
.search-form {
// width: 300rpx;
background-color: #E2E2E2;
margin: unset;
}
.searchPoint {
// width: 500rpx;
height: 36rpx;
}
}
.tabList {
.stateStyle {
padding: 8rpx 16rpx;
color: #808A96;
background-color: #E2E2E2;
margin-left: 16rpx;
font-size: 28rpx;
}
}
.titleName {
color: #333333;
font-weight: 400;
font-size: 36rpx;
// letter-spacing: 1px;
}
.addressInf {
width: 442rpx;
color: #666666;
font-size: 28rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
// margin:16rpx 0 0rpx 0;
}
.listInf {
width: 490rpx;
flex-direction: column;
justify-content: space-between;
height: 178rpx;
}
.mapBtn {
height: 178rpx;
align-items: flex-end;
// background-color: greenyellow;
}
.goMap {
width: 24rpx;
height: 24rpx;
background: url('/static/home/goMap.svg') no-repeat;
background-size: 100% 100%;
}
.moreLocal {
margin-left: 10rpx;
}
.regionName {
letter-spacing: 3rpx;
}
.stateImg {
width: 164rpx;
height: 164rpx;
background-color: #eee;
border-radius: 8rpx;
.titleImg {
border-radius: 8rpx;
}
}
.searchImg {
width: 72rpx;
height: 72rpx;
background: url('../../static/home/search.svg') no-repeat;
background-size: 100% 100%;
}
.chargeImg {
width: 72rpx;
height: 72rpx;
background: url('../../static/home/pay.svg') no-repeat;
background-size: 100% 100%;
}
.subscribeImg {
width: 72rpx;
height: 72rpx;
background: url('../../static/home/subscribe.svg') no-repeat;
background-size: 100% 100%;
position: relative;
.cu-tag {
background-color: #F2634F;
font-size: 24rpx;
font-weight: 400;
}
.cu-tag.badge {
border: 1px solid #fff;
right: -17rpx;
height: 34rpx;
}
}
.wrap {
width: 100%;
}
.stateFlex {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 16rpx;
}
.cu-card>.cu-item {
margin: 0 32rpx 16rpx 32rpx;
}
.stateImg .cu-tag.badge {
width: 100rpx;
height: 40rpx;
top: 0rpx;
left: 0rpx;
right: 90rpx;
padding: 8rpx 0rpx;
background-image: linear-gradient(to right bottom, #A5C7FF, #2690FB);
border-radius: 4px;
font-size: 24rpx;
text-align: center;
}
.bg-blue {
background-image: linear-gradient(to right bottom, #A5C7FF, #2690FB);
}
.stateImg .cu-tag .bgPlane {
padding: 0rpx 8rpx;
background: rgba(255, 255, 255, 0);
}
.column {
display: flex;
flex-direction: column;
}
.card-nav {
padding: 32rpx;
.navStyle {
border-radius: 16rpx;
}
}
.swiperCard {
margin: 16rpx 32rpx 0rpx 32rpx;
position: relative;
}
.cu-bar .search-form {
background-color: #fff;
}
.cu-card .cu-item,
.radius {
border-radius: 16rpx;
}
.none-box {
width: 100vw;
display: flex;
justify-content: center;
.image-none {
width: 320rpx;
height: 452rpx;
}
}
.battery-num {
width: 20rpx;
height: 32rpx;
}
.bat-use {
font-size: 32rpx;
font-weight: 400;
letter-spacing: 1px;
color: #333333;
margin-left: 16rpx;
line-height: 28rpx;
}
.bat-total {
font-size: 28rpx;
font-weight: 400;
letter-spacing: 1px;
color: #333333;
line-height: 26rpx;
}
.card-box {
padding: 32rpx;
box-shadow: -2px 2px 8px 0px #7AA7D026;
}
.planeIcon {
width: 32rpx;
height: 32rpx;
margin-right: 12rpx;
}
.planeNum {
font-size: 28rpx;
line-height: 28rpx;
font-weight: 400;
color: #4C91FF;
}
.panel {
padding: 32rpx;
}
.notification {
margin-top: 16rpx;
::v-deep .u-notice-bar {
border-radius: 16rpx;
}
::v-deep .u-icon text {
color: #808080 !important;
}
}
.section {
// height: 100%;
}
.map_content {
position: relative;
.marker_map {
height: 100vh;
}
}
.circle {
width: 80rpx;
height: 80rpx;
border-radius: 40rpx;
// background-image: url("https://picsum.photos/40/40");
background-size: 100% 100%;
margin: 10rpx 20rpx;
}
.scan_views {
width: 100%;
position: absolute;
bottom: 100rpx;
left: 0;
display: flex;
justify-content: center;
align-items: center;
.left_cicle,
.right_cicle {
width: 70rpx;
height: 70rpx;
border-radius: 50%;
background-color: #fff;
margin: 0 30rpx;
}
.scan_btns {
color: #fff;
font-size: 14px;
width: 240rpx;
line-height: 80rpx;
border-radius: 40rpx;
text-align: center;
background: linear-gradient(to right, #38d07a, #24b35f);
}
}
.public_flex {
display: flex;
align-items: center;
justify-content: center;
}
.position_right_order {
position: absolute;
top: 360rpx;
right: 5%;
width: 80rpx;
// height: 400rpx;
padding: 20rpx 0;
background: #fff;
border-radius: 10rpx;
z-index: 999;
display: flex;
flex-direction: column;
font-size: 12px;
justify-content: space-evenly;
align-items: center;
>view {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 15rpx 0;
}
}

@ -1,70 +1,62 @@
<template>
<view class="content">
<up-loading-page loading-text="..." color="#666" :loading="version_loading"></up-loading-page>
<!-- 头部 :style="{'padding-top':padTop+'px'}" -->
<view class="tab_headers" :style="{'margin-top':padTop+'px'}">
马尔塞云平台( {{ check_version }} )
<view class="cu-bar topNav">
<view class="circle" @click="handle_push_personnel" :style="{ 'background-image': `url( ${avatar} )` }"
v-if="globalData.isLogin">
</view>
<view class="cu-bar search topNav">
<view style="font-size: 14px;" class="change_version" @click="subscribeChange">
切换版本
<uv-icon name="arrow-down" style="color: #fff"></uv-icon>
<view class="circle" :style="{ 'background-image': `url( ${no_avatar} )` }"
v-else>
</view>
<view class="search-form round" style="flex: 1">
<text class="cuIcon-search"></text>
<input class="searchPoint" type="text" v-model="search_stationName" placeholder="搜索站"
<view class="search-form round">
<text class="cuIcon-search" style="font-size: 14px;"></text>
<input class="searchPoint" type="text" v-model="search_stationName" placeholder="搜索地点,找充电站"
@confirm="getStationName" confirm-type="search" />
</view>
</view>
<!-- 轮播图部分 -->
<view class="swiperCard" v-if="swiperData.swiperList.length!=0">
<view class="notice_position" v-if="ischarging_order">
<uv-notice-bar :text="notice_text" mode="link" @click="handle_chargorder"></uv-notice-bar>
<!-- <uv-notice-bar text="notice_text" mode="link" @click="handle_chargorder"></uv-notice-bar> -->
</view>
<view class="navStyle">
<u-swiper class="swiper" :radius="8" :height="150" :list="swiperData.swiperList"
:display-multiple-items="0" autoplay :circular="true" indicator indicatorMode="line"
imgMode="scaleToFill" bgColor="rgba(255,255,255,0)"></u-swiper>
</view>
</view>
<view class="section">
<!-- -->
<view class="card-nav">
<view class="bg-white navStyle shadow-warp">
<view class="flex">
<view class="flex-sub panel bg-white radius text-center align-center column" @click="searchPeo"
v-if="check_version == '车队版'">
<view class='searchImg'> </view>
<text>换电单</text>
</view>
<view class="flex-sub panel bg-white radius text-center align-center column"
@click="goRecharge">
<view class='chargeImg'> </view>
<text>充电单</text>
</view>
<view class="flex-sub panel bg-white radius text-center align-center column" @click="subscribe"
v-if="check_version == '车队版' ">
<view class='subscribeImg'>
<view class="cu-tag badge" v-if="recordNum!=0">{{recordNum}}</view>
<view class="position_right_order">
<view class="" @click="searchPeo" v-if="check_version == '车队版' ">
<uv-icon name="coupon" size="20" color="#000"></uv-icon>
换电
</view>
<text>预约单</text>
<view class="" @click="goRecharge">
<uv-icon name="pushpin-fill" size="20" color="#000"></uv-icon>
充电
</view>
<view class="" @click="subscribe" v-if="check_version == '车队版' ">
<uv-icon name="empty-data" size="20" color="#000"></uv-icon>
预约
</view>
</view>
</view>
<view class="section">
<view class="map_content">
<view class="marker_map">
<search-destination ref="searchdestination" style="width: 100%; height: 100%;"></search-destination>
</view>
<!-- <view class="posi_imgs">
<image src="../../static/home/scan.png" style="width: 100rpx; height: 100rpx;" mode=""
@click="handle_scan"></image>
</view>
</view>
<view class="scan_views">
<!-- <view class="left_cicle .public_flex">
<uv-icon name="map" size="25"></uv-icon>
</view> -->
<view class="scan_btns" @click="handle_scan" v-if="globalData.isLogin">
扫码充电/换电
</view>
<view class="scan_btns" @click="handle_go_login" v-else>
请登录
</view>
<!-- <view class="right_cicle .public_flex">
<uv-icon name="reload" size="25"></uv-icon>
</view> -->
</view>
<uv-notify ref="errornotify" :safeAreaInsetTop="true" message="当前无操作权限,请审核通过后再试" type="error"></uv-notify>
<uv-modal ref="startchargmodal" title="提示" content='当前枪已验证完成,可以进行充电,请点击开始充电'>
<template v-slot:confirmButton>
@ -75,12 +67,8 @@
</uv-modal>
<uv-modal ref="startswapmodal" title="提示" content='当前站已验证完成,可以进行换电,请点击确认开始换电'
@confirm="handle_swaping_pay"></uv-modal>
</view>
<view class="mainBg"></view>
<cc-myTabbar :tabBarShow="0" @handle_scan="handle_scan"></cc-myTabbar>
<uv-picker ref="changepicker" :columns="columns" @confirm="confirm_picker"></uv-picker>
</template>
<script setup>
@ -98,95 +86,43 @@
import {
onLoad,
onShow,
onReachBottom
onReachBottom,
onUnload,
onHide
} from "@dcloudio/uni-app";
const search_stationName = ref('')
const swiperData = reactive({
swiperList: [
'https://www.zzpower.net/admin-api/infra/file/4/get/2ce503a12031cad8b576bb804b1bcb8066bb7b2a54a660ccde8396c8032b8939.jpeg',
'https://www.zzpower.net/admin-api/infra/file/4/get/65739ab905c8b085036e0b7da5570646bbffaea6c9fab666ed2ff85b6792da05.jpeg'
],
})
const padTop = ref() //padding
const homeData = reactive({
stationList: [{
distance: 0,
cover: 0,
operationStatus: 0,
stationName: 0,
stationLocation: 0,
batteryVo: {
swapBatTotal: 0,
batTotal: 0
},
longitude: 0,
latitude: 0
}],
stationBeing: [],
})
const noneShow = ref(false)
// swiperData.swiperList = [
// 'https://www.zzpower.net/admin-api/infra/file/4/get/2ce503a12031cad8b576bb804b1bcb8066bb7b2a54a660ccde8396c8032b8939.jpeg',
// 'https://www.zzpower.net/admin-api/infra/file/4/get/65739ab905c8b085036e0b7da5570646bbffaea6c9fab666ed2ff85b6792da05.jpeg',
// ]
//
const status = ref('loadmore')
const loadingText = ref('努力加载中')
const loadmoreText = ref('上拉加载更多')
const nomoreText = ref('实在没有了')
const page = ref(1) //
let totalPages = ref()
let longiNum = ref()
let latiNum = ref()
var qqmapsdk
const cityRes = ref()
const radios = reactive([{
checked: true
},
{
checked: false
},
{
checked: false
}
]);
let recordNum = ref(0)
const notification = ref('')
const goShift = ref(false)
const realNameAuthFlag = ref()
const errornotify = ref(null)
const columns = reactive([
[
'个人版', '车队版'
]
])
const notice_text = ref('当前有正在充电的订单,请点击前往查看')
const ischarging_order = ref(false)
onLoad(async () => {
uni.getSystemInfo({
success: (e) => {
let statusBar = e.statusBarHeight
let customBar = e.statusBarHeight
padTop.value = statusBar
}
})
onLoad(async () => {})
onUnload(() => {
})
onShow(() => {
check_version.value = uni.getStorageSync("version") || "个人版"
realNameAuthFlag.value = uni.getStorageSync("realNameAuthFlag")
if (globalData.isLogin) {
if (realNameAuthFlag.value == 1) {
// handle_setting()
onHide(() => {
// if (timer.value) {
console.log('清空了')
clearInterval(timer.value)
timer.value = null
handle_loop()
// }
})
onShow(() => {
check_version.value = uni.getStorageSync("version") || "个人版"
if (uni.getStorageSync("version") == "") {
uni.setStorageSync("version", "个人版")
}
// realNameAuthFlag.value = uni.getStorageSync("realNameAuthFlag")
// console.log(globalData.isLogin, 'globalData.isLogin')
if (globalData.isLogin) {
handle_user_info()
}
})
const timer = ref(null)
@ -201,8 +137,8 @@
uni.$request({
url: config.baseUrl + config_url,
}).then((res) => {
// console.log(res, '');
if (res.data.code == 0 && res.data.data != null) {
// console.log(res, '');
if (res.data.data.orderStatus == 1) {
ischarging_order.value = true
notice_text.value = '当前有正在充电的订单,请点击前往查看'
@ -215,8 +151,15 @@
ischarging_order.value = false
}
}
})
}, 10000)
}
const handle_go_login = () => {
uni.navigateTo({
url: '/pagesCenter/login/enter'
})
}, 20000)
}
const handle_setting = async () => {
@ -243,10 +186,13 @@
} else {
uni.setStorageSync("token", res.data.data.accessToken); //"Token"
uni.setStorageSync("refreshToken", res.data.data.refreshToken); //"Token"
handle_user_info()
}
})
}
const avatar = ref(null)
const no_avatar = ref(
'https://zzpower.net//admin-api/infra/file/4/get/6e642a15c0bad98793f342a5ca83317cfcd62ed8b84fa5fd4c5d6f4176bd3a14.png'
)
const handle_user_info = async () => {
// console.log('')
await uni.$request({
@ -256,6 +202,13 @@
// console.log(res, 'realNameAuthFlag');
uni.setStorageSync("teamId", res.data.data.teamId);
uni.setStorageSync("realNameAuthFlag", res.data.data.realNameAuthFlag)
realNameAuthFlag.value = res.data.data.realNameAuthFlag
avatar.value = res.data.data.avatar
if (realNameAuthFlag.value == 1) {
clearInterval(timer.value)
timer.value = null
handle_loop()
}
}
})
}
@ -526,9 +479,9 @@
uni.showLoading({
title: '充电机启动中...请稍后'
});
setTimeout(() => {
uni.hideLoading()
}, 2000)
// setTimeout(() => {
// uni.hideLoading()
// }, 2000)
chargorder.value = res.data.data
setTimeout(() => {
handle_chargorder()
@ -565,11 +518,22 @@
// console.log(res, '');
if (res.data.code == 0) {
let str = res.data.data
if (str.orderStatus == 1) {
uni.navigateTo({
url: '/pages/order/chargorder/detailInf/detailInf?details=' + JSON
.stringify(
str)
})
} else if (str.orderStatus == 4) {
uni.navigateTo({
url: '/pages/order/chargorder/detailInf/detailInf?details=' + JSON.stringify(
url: '/pages/order/chargorder/detailInf/detail?details=' + JSON
.stringify(
str)
})
}
uni.hideLoading()
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg,
duration: 2000,
@ -580,356 +544,16 @@
})
}
const changepicker = ref(null)
const subscribeChange = () => {
changepicker.value.open()
}
const check_version = ref()
const version_loading = ref(false)
const confirm_picker = (e) => {
let teamId = uni.getStorageSync("teamId")
let str = uni.getStorageSync("version")
if (teamId) {
if (e.value[0] != str) {
version_loading.value = true
uni.setStorageSync('version', e.value[0])
setTimeout(() => {
version_loading.value = false
check_version.value = e.value[0]
}, 2000)
ischarging_order.value = false
} else {
return
}
} else {
uni.showModal({
title: '提示',
showCancel: false,
content: "未绑定车队的用户,不允许切换版本,请绑定后重试...",
success: function(res) {
}
const handle_push_personnel = () => {
uni.navigateTo({
url: '/pages/userCenter/userCenter'
});
}
}
</script>
<style lang="scss" scoped>
.mainBg {
width: 100vw;
position: fixed;
top: 0;
height: 100vh;
background: linear-gradient(180deg, #4C91FF 0%, #3698FD 11.35%, #73CBFD 21.65%, #94EBFF 37.35%, #EAF4F8 97.71%);
z-index: -1;
}
.change_version {
display: flex;
align-items: center;
}
.tab_headers {
line-height: 80rpx;
width: 100%;
text-align: center;
color: #fff;
font-size: 14px;
font-weight: 600;
}
.topNav {
position: relative;
}
.posi_imgs {
position: absolute;
// background: #fff;
// padding: 5rpx;
right: 30rpx;
bottom: -10rpx;
z-index: 999;
}
.cu-bar {
padding-bottom: 16rpx;
margin: 0 30rpx;
color: #fff;
justify-content: space-between;
align-items: center;
.search-form {
width: 334rpx;
background-color: #E2E2E2;
flex: 0;
}
.searchPoint {
width: 500rpx;
height: 36rpx;
}
}
.tabList {
.stateStyle {
padding: 8rpx 16rpx;
color: #808A96;
background-color: #E2E2E2;
margin-left: 16rpx;
font-size: 28rpx;
}
}
.titleName {
color: #333333;
font-weight: 400;
font-size: 36rpx;
// letter-spacing: 1px;
}
.addressInf {
width: 442rpx;
color: #666666;
font-size: 28rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
// margin:16rpx 0 0rpx 0;
}
.listInf {
width: 490rpx;
flex-direction: column;
justify-content: space-between;
height: 178rpx;
}
.mapBtn {
height: 178rpx;
align-items: flex-end;
// background-color: greenyellow;
}
.goMap {
width: 24rpx;
height: 24rpx;
background: url('/static/home/goMap.svg') no-repeat;
background-size: 100% 100%;
}
.moreLocal {
margin-left: 10rpx;
}
.regionName {
letter-spacing: 3rpx;
}
.stateImg {
width: 164rpx;
height: 164rpx;
background-color: #eee;
border-radius: 8rpx;
.titleImg {
border-radius: 8rpx;
}
}
.searchImg {
width: 72rpx;
height: 72rpx;
background: url('../../static/home/search.svg') no-repeat;
background-size: 100% 100%;
}
.chargeImg {
width: 72rpx;
height: 72rpx;
background: url('../../static/home/pay.svg') no-repeat;
background-size: 100% 100%;
}
.subscribeImg {
width: 72rpx;
height: 72rpx;
background: url('../../static/home/subscribe.svg') no-repeat;
background-size: 100% 100%;
position: relative;
.cu-tag {
background-color: #F2634F;
font-size: 24rpx;
font-weight: 400;
}
.cu-tag.badge {
border: 1px solid #fff;
right: -17rpx;
height: 34rpx;
}
}
.wrap {
width: 100%;
}
.stateFlex {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 16rpx;
}
.cu-card>.cu-item {
margin: 0 32rpx 16rpx 32rpx;
}
.stateImg .cu-tag.badge {
width: 100rpx;
height: 40rpx;
top: 0rpx;
left: 0rpx;
right: 90rpx;
padding: 8rpx 0rpx;
background-image: linear-gradient(to right bottom, #A5C7FF, #2690FB);
border-radius: 4px;
font-size: 24rpx;
text-align: center;
}
.bg-blue {
background-image: linear-gradient(to right bottom, #A5C7FF, #2690FB);
}
.stateImg .cu-tag .bgPlane {
padding: 0rpx 8rpx;
background: rgba(255, 255, 255, 0);
}
.column {
display: flex;
flex-direction: column;
}
.card-nav {
padding: 32rpx;
.navStyle {
border-radius: 16rpx;
}
}
.swiperCard {
margin: 16rpx 32rpx 0rpx 32rpx;
position: relative;
.notice_position {
width: 100%;
position: absolute;
top: 0;
z-index: 99;
}
}
.cu-bar .search-form {
background-color: #fff;
}
.cu-card .cu-item,
.radius {
border-radius: 16rpx;
}
.none-box {
width: 100vw;
display: flex;
justify-content: center;
.image-none {
width: 320rpx;
height: 452rpx;
}
}
.battery-num {
width: 20rpx;
height: 32rpx;
}
.bat-use {
font-size: 32rpx;
font-weight: 400;
letter-spacing: 1px;
color: #333333;
margin-left: 16rpx;
line-height: 28rpx;
}
.bat-total {
font-size: 28rpx;
font-weight: 400;
letter-spacing: 1px;
color: #333333;
line-height: 26rpx;
}
.card-box {
padding: 32rpx;
box-shadow: -2px 2px 8px 0px #7AA7D026;
}
.planeIcon {
width: 32rpx;
height: 32rpx;
margin-right: 12rpx;
}
.planeNum {
font-size: 28rpx;
line-height: 28rpx;
font-weight: 400;
color: #4C91FF;
}
.panel {
padding: 32rpx;
}
.notification {
margin-top: 16rpx;
::v-deep .u-notice-bar {
border-radius: 16rpx;
}
::v-deep .u-icon text {
color: #808080 !important;
}
}
.map_content {
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
.marker_map {
height: 660rpx;
border-radius: 16rpx;
overflow: hidden;
}
}
@import "./index.scss";
</style>

@ -5,14 +5,14 @@
<view class=" cu-card article ">
<view class="cu-item shadow">
<view class="money text-df " v-for="(item,index) in payList" :key="index"
@click="forPay(item.value,index)" :style="{backgroundImage : li == index ? 'linear-gradient(to right bottom, #A5C7FF, #4C91FF)' : 'white',
@click="forPay(item.value,index)" :style="{backgroundImage : li == index ? 'linear-gradient(to right bottom, #34cb75, #27b764)' : 'white',
color : li == index ? '#fff' : '#808080'}">
{{item.value == '自定义'?'': '¥'}}{{item.value}}
</view>
</view>
</view>
<view class="confirmRecharge">
<u-button @click="affirm" shape='circle' type="primary" throttleTime="5000">确认充值</u-button>
<button @click="affirm" class="bottom_submit">确认充值</button>
</view>
<!-- 充值弹窗 -->
<u-modal :show="show" :title="title" :showCancelButton="true" @confirm="confirm" @cancel="cancel"
@ -176,6 +176,7 @@
method: 'POST',
data: param,
}).then(res => {
console.log(res,'创建订单')
if (res.data.code == 0) {
handle_pay_money(res.data.data)
}
@ -275,7 +276,7 @@
}
.textBlue {
color: #4C91FF;
color: #27b764;
}
.style {
@ -283,4 +284,11 @@
font-size: 15px;
text-align: center;
}
.bottom_submit {
background: linear-gradient(to right bottom, #34cb75, #27b764);
border-radius: 40rpx;
font-size: 14px;
color: #fff;
}
</style>

@ -0,0 +1,263 @@
<template>
<view class="content">
<view class="cu-card article" style="position: relative;">
<view class="cu-item shadow">
<view class="padding-sm justify-between">
<view class="refunded_0" v-if="detail.list.orderStatus == 0">
初始化
</view>
<view class="refunded_1" v-if="detail.list.orderStatus == 1">
充电中
</view>
<view class="refunded_3" v-if="detail.list.orderStatus == 2">
启动充电失败
</view>
<view class="refunded_2" v-if="detail.list.orderStatus == 3">
结束充电
</view>
<view class="refunded_1" v-if="detail.list.orderStatus == 4">
待支付
</view>
<view class="refunded_2" v-if="detail.list.orderStatus == 5">
(已完成)支付完成
</view>
<view class="refunded_3" v-if="detail.list.orderStatus == 6">
支付失败
</view>
<view class="refunded_4" v-if="detail.list.orderStatus == 7">
已退款
</view>
<view class="refunded_5" v-if="detail.list.orderStatus == 8">
已挂起
</view>
<view class="refunded_6" v-if="detail.list.orderStatus == 9">
已关闭
</view>
</view>
</view>
</view>
<view class="cu-card article">
<view class="cu-item shadow">
<view class="flex justify-between flex-wrap padding-sm">
<view class="name">{{detail.list.stationName==null?'--':detail.list.stationName}}</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">场站编码 </view>
<view class="staNum">{{detail.list.stationNo==null?'--':detail.list.stationNo}}</view>
</view>
<view class="flex justify-between flex-wrap list-view">
<view class="staName">充电订单号 </view>
<view class="staNum">{{detail.list.chargeOrder==null?'--':detail.list.chargeOrder}}</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">车牌号 </view>
<view class="staNum">{{detail.list.vehicleNo==null?'--':detail.list.vehicleNo}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">车辆vin</view>
<view class="staNum">{{detail.list.vin==null?'--':detail.list.vin}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">总电量 </view>
<view class="staNum">{{detail.list.totalElectricity==null?'0':detail.list.totalElectricity}}kW·h
</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">平台服务费</view>
<view class="staNum">{{detail.list.cloudTotalFee==null?'0':detail.list.cloudTotalFee / 100}}</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">电池服务费</view>
<view class="staNum">{{detail.list.batTotalFee==null?'0':detail.list.batTotalFee / 100}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电服务总费用</view>
<view class="staNum">{{detail.list.chargeTotalFee==null?'0':detail.list.chargeTotalFee / 100}}
</view>
</view>
<view class="flex padding-sm justify-between flex-wrap">
<view class="titleName">费用合计</view>
<view class="money text-price">{{detail.list.totalFee==null?'0':detail.list.totalFee / 100}}</view>
</view>
</view>
</view>
<view class="btn_pay" v-if="detail.list.orderStatus == 4">
<button style="font-size: 14px;" type="primary" @click="handle_pay"></button>
</view>
</view>
</template>
<script setup>
import config from '@/common/config/config.js';
import sheep from '@/sheep';
import {
reactive,
ref,
} from "vue";
import {
onLoad,
onShow,
onUnload
} from "@dcloudio/uni-app";
import {
useCounterStore
} from '@/stores/counter.js';
const detail = reactive({
list: []
})
const timer = ref(null)
const isorderStatus = ref(false)
onLoad((options) => {
var station = JSON.parse(options.details);
detail.list = station
})
onShow(() => {})
onUnload(() => {
})
const charging_data = ref({})
const istipsonly = ref(0)
const handle_pay = async () => {
await uni.request({ //token
url: config.baseUrl + "app-api/cloud/outCharge/createPayOrder/" + detail.list.id,
method: 'GET',
header: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer ' + uni.getStorageSync('token'),
'tenant-id': 1
}
}).then(res => {
console.log(res, '支付信息')
if (res.data.code == 0) {
handle_pay_money(res.data.data)
} else {
uni.showModal({
title: '提示',
content: res.data.msg,
showCancel: false,
success: function(res) {
}
});
}
})
}
const handle_pay_money = async (e) => {
sheep.$router.go('/pagesCenter/pay/index', {
id: e.payOrderId,
orderType: 'recharge',
});
}
</script>
<style lang="scss" scoped>
.content {
height: 100vh;
background: #F7F8FA;
position: relative;
}
.cu-card.article>.cu-item {
padding-bottom: 0rpx;
}
.payState {
color: #4C91FF;
font-size: 39rpx;
}
.non-payment {
color: #FF7B0E;
font-size: 39rpx;
}
.refunded_0 {
color: #06efef;
font-size: 39rpx;
}
.refunded_1 {
color: #00aaff;
font-size: 39rpx;
}
.refunded_2 {
color: #00aa00;
font-size: 39rpx;
}
.refunded_3 {
color: #aa0000;
font-size: 39rpx;
}
.refunded_4 {
color: #ffff00;
font-size: 39rpx;
}
.refunded_5 {
color: #55557f;
font-size: 39rpx;
}
.refunded_6 {
color: #aaaa7f;
font-size: 39rpx;
}
.name {
color: #333;
font-size: 39rpx;
font-weight: 400;
}
.titleName {
color: #808080;
font-size: 28rpx;
font-weight: 400;
}
.staName {
color: #808080;
font-size: 28rpx;
font-weight: 400;
}
.staNum {
color: #333333;
font-size: 28rpx;
font-weight: 400;
}
.money {
color: #4C91FF;
font-size: 32rpx;
font-weight: 600;
}
.list-view {
padding: 0rpx 20rpx 20rpx 20rpx;
}
.btn_pay {
// width: 100%;
position: absolute;
bottom: 20rpx;
right: 0;
padding: 0 30rpx;
}
.posi_loading {
position: absolute;
right: 50rpx;
top: 50%;
transform: translateY(-50%);
}
</style>

@ -1,49 +1,45 @@
<template>
<view class="content">
<view class="cu-card article" style="position: relative;">
<view class="cu-item shadow">
<view class="padding-sm justify-between">
<!-- <view
:class="{'refunded' : charging_data.orderStatus== 1 ,'non-payment' : charging_data.orderStatus== 0,'payState': charging_data.orderStatus== 2}">
{{['初始化','充电中','启动充电失败','结束充电','待支付','(已完成)支付完成','支付失败','已退款','已挂起','已关闭'][charging_data.orderStatus==null?'':charging_data.orderStatus]}}
</view> -->
<view class="refunded_0" v-if="charging_data.orderStatus == 0">
初始化
</view>
<view class="refunded_1" v-if="charging_data.orderStatus == 1">
充电中
</view>
<view class="refunded_3" v-if="charging_data.orderStatus == 2">
启动充电失败
<view class="" style="height: 500rpx; margin-top: 100rpx;">
<piaoyi-text-animate3
:text="detail.list.currentSoc == '' || detail.list.currentSoc == null ? 0: detail.list.currentSoc "></piaoyi-text-animate3>
</view>
<view class="refunded_2" v-if="charging_data.orderStatus == 3">
结束充电
<view class="content_item">
<view class="">
<text>剩余时长()</text>
<text>{{detail.list.remainingChargingTime || 0 }}</text>
</view>
<view class="refunded_1" v-if="charging_data.orderStatus == 4">
待支付
<view class="">
<text>已充时长()</text>
<text>{{detail.list.chargingTime || 0}}</text>
</view>
<view class="refunded_2" v-if="charging_data.orderStatus == 5">
(已完成)支付完成
</view>
<view class="refunded_3" v-if="charging_data.orderStatus == 6">
支付失败
<view class="content_item" style="margin-top: 30rpx;">
<view class="">
<text>已充电量()</text>
<text>{{detail.list.chargingCapacity || 0}}</text>
</view>
<view class="refunded_4" v-if="charging_data.orderStatus == 7">
已退款
<view class="">
<text>充电费用()</text>
<text>{{detail.list.totalFee / 100 || 0}}</text>
</view>
<view class="refunded_5" v-if="charging_data.orderStatus == 8">
已挂起
</view>
<view class="refunded_6" v-if="charging_data.orderStatus == 9">
已关闭
</view>
<!-- <view class="posi_loading">
<uv-loading-icon color="skyblue"></uv-loading-icon>
</view> -->
<!-- -->
<view class="more_position" style="margin-top: 20rpx;" @click="handle_more_info">
更多详细信息
</view>
<!-- -->
<view class="btn_pay" v-if="detail.list.orderStatus == 1">
<button style="font-size: 14px;" @click="finish_charg"></button>
</view>
<view class="btn_pay" v-if="detail.list.orderStatus == 4">
<button style="font-size: 14px; background: #ff7131;" type="primary" @click="handle_pay"></button>
</view>
<view class="cu-card article" v-if="isorderStatus == false">
<!-- -->
<uv-popup ref="more_popup" round="30" :overlay="true" :safeAreaInsetBottom="false">
<view style="width: 100%;">
<view class="cu-card article">
<view class="cu-item shadow">
<view class="flex justify-between flex-wrap padding-sm">
<view class="name">{{detail.list.stationName==null?'--':detail.list.stationName}}</view>
@ -67,98 +63,37 @@
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">总电量 </view>
<view class="staNum">{{detail.list.totalElectricity==null?'0':detail.list.totalElectricity}}kW·h
<view class="staNum">
{{detail.list.totalElectricity==null?'0':detail.list.totalElectricity}}kW·h
</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">平台服务费</view>
<view class="staNum">{{detail.list.cloudTotalFee==null?'0':detail.list.cloudTotalFee / 100}}</view>
<view class="staNum">
{{detail.list.cloudTotalFee==null?'0':detail.list.cloudTotalFee / 100}}
</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">电池服务费</view>
<view class="staNum">{{detail.list.batTotalFee==null?'0':detail.list.batTotalFee / 100}}</view>
<view class="staNum">{{detail.list.batTotalFee==null?'0':detail.list.batTotalFee / 100}}
</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电服务总费用</view>
<view class="staNum">{{detail.list.chargeTotalFee==null?'0':detail.list.chargeTotalFee / 100}}
</view>
<view class="staNum">
{{detail.list.chargeTotalFee==null?'0':detail.list.chargeTotalFee / 100}}
</view>
<!-- <view class="flex padding-lr-sm justify-between list-view">
<view class="staName">尖时段充电电量(直流)</view>
<view class="staNum">{{ detail.list.theTipElectric==null?'0':detail.list.theTipElectric }}kW·h
</view>
</view> -->
<!-- <view class="flex padding-lr-sm justify-between list-view">
<view class="staName">峰时段充电电量(直流)</view>
<view class="staNum">{{ detail.list.peakElectric==null?'0':detail.list.peakElectric }}kW·h</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">平时段充电电量(直流)</view>
<view class="staNum">{{ detail.list.flatElectric ==null?'0':detail.list.flatElectric}}kW·h</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">谷时段充电电量(直流)</view>
<view class="staNum">{{ detail.list.theValleyElectric==null?'0':detail.list.theValleyElectric }}kW·h
</view>
</view> -->
<view class="flex padding-sm justify-between flex-wrap">
<view class="titleName">费用合计</view>
<view class="money text-price">{{detail.list.totalFee==null?'0':detail.list.totalFee / 100}}</view>
</view>
</view>
</view>
<view class="cu-card article" v-if="isorderStatus">
<view class="cu-item shadow">
<view class="flex justify-between flex-wrap padding-sm">
<view class="name">{{detail.list.stationName==null?'--':detail.list.stationName}}</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">订单号 </view>
<view class="staNum">{{charging_data.chargeOrder==null?'--':charging_data.chargeOrder}}</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">枪号 </view>
<view class="staNum">{{ charging_data.chargerGunNo==null?'--':charging_data.chargerGunNo}}</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">当前soc </view>
<view class="staNum">{{ charging_data.currentSoc==null?'--':charging_data.currentSoc}}</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">当前电压 </view>
<view class="staNum">{{ charging_data.currentVoltage==null?'--':charging_data.currentVoltage}}
</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">当前电流 </view>
<view class="staNum">{{ charging_data.currentElectrical==null?'--':charging_data.currentElectrical}}
</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">剩余充电时间 </view>
<view class="staNum">
{{ charging_data.remainingChargingTime==null?'--':charging_data.remainingChargingTime}} (min)
</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">充电时长 </view>
<view class="staNum">{{ charging_data.chargingTime==null?'--':charging_data.chargingTime}} (min)
</view>
<view class="money text-price">
{{detail.list.totalFee==null?'0':detail.list.totalFee / 100}}
</view>
</view>
</view>
<view class="btn_pay" v-if="charging_data.orderStatus == 1">
<button style="font-size: 14px;" type="primary" @click="finish_charg"></button>
</view>
<view class="btn_pay" v-if="charging_data.orderStatus == 4">
<button style="font-size: 14px;" type="primary" @click="handle_pay"></button>
</view>
</uv-popup>
</view>
</template>
@ -180,19 +115,35 @@
} from '@/stores/counter.js';
const isDetail = useCounterStore()
const now_ingtext = ref()
const detail = reactive({
list: []
list: {
chargingTime: null,
chargingCapacity: null,
remainingChargingTime: null,
totalFee: null,
vehicleNo: null,
stationName: null,
stationNo: null,
chargeOrder: null,
vin: null,
totalElectricity: null,
cloudTotalFee: null,
batTotalFee: null,
chargeTotalFee: null
}
})
const timer = ref(null)
const isorderStatus = ref(false)
const more_popup = ref(false)
onLoad((options) => {
var station = JSON.parse(options.details);
detail.list = station
// console.log(detail.list, '');
if (station.orderStatus == 1) {
isorderStatus.value = true
}
// if (station.orderStatus == 1) {
// isorderStatus.value = true
// }
queryRealTimeOrder()
timer.value = setInterval(() => {
queryRealTimeOrder()
}, 5000)
@ -221,7 +172,8 @@
method: 'GET'
}).then(res => {
// console.log(res, '==========>');
charging_data.value = res.data.data
detail.list = res.data.data
if (res.data.data.orderStatus == 1) {
isorderStatus.value = true
} else if (res.data.data.orderStatus == 3) {
@ -245,6 +197,11 @@
})
}
const handle_more_info = () => {
console.log('1');
more_popup.value.open('bottom')
}
const finish_charg = async () => {
let config_url = ''
if (uni.getStorageSync("version") == '个人版') {
@ -253,7 +210,7 @@
config_url = 'app-api/cloud/team/endCharge/'
}
await uni.$request({
url: config.baseUrl + config_url + charging_data.value.id,
url: config.baseUrl + config_url + detail.list.id,
method: 'GET'
}).then(res => {
// console.log(res, '==========>');
@ -288,7 +245,7 @@
const handle_pay = async () => {
await uni.request({ //token
url: config.baseUrl + "app-api/cloud/outCharge/createPayOrder/" + charging_data.value.id,
url: config.baseUrl + "app-api/cloud/outCharge/createPayOrder/" + detail.list.id,
method: 'GET',
header: {
'Content-Type': 'application/x-www-form-urlencoded',
@ -313,8 +270,10 @@
<style lang="scss" scoped>
.content {
height: 100vh;
background: #F7F8FA;
background: #fff;
position: relative;
padding: 20rpx;
box-sizing: border-box;
}
.cu-card.article>.cu-item {
@ -403,9 +362,18 @@
.btn_pay {
// width: 100%;
position: absolute;
bottom: 20rpx;
right: 0;
padding: 0 30rpx;
bottom: 200rpx;
left: 50%;
transform: translateX(-50%);
// padding: 0 30rpx;
width: 50%;
>button {
border-radius: 40rpx;
background: #33c973;
font-size: 14px;
color: #fff;
}
}
.posi_loading {
@ -414,4 +382,39 @@
top: 50%;
transform: translateY(-50%);
}
.content_item {
display: flex;
align-items: center;
justify-content: space-evenly;
>view {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
>text:first-child {
color: #868686;
font-size: 14px;
}
>text:last-child {
margin-top: 10rpx;
color: #000;
font-size: 18px;
font-weight: 600;
}
}
}
.more_position {
position: absolute;
top: 30rpx;
right: 30rpx;
font-size: 12px;
font-weight: bold;
color: #29cd5f;
text-decoration: underline;
}
</style>

@ -20,10 +20,7 @@
<view class="flex solid-bottom padding-sm justify-between flex-wrap">
<view class="orderNumber">{{item.stationName}}</view>
<view class="">
<!-- <view
:class="{'refunded' : item.orderStatus== 1 ,'non-payment' : item.orderStatus== 0,'payState': item.orderStatus== 2}">
{{['初始化','充电中','启动充电失败','结束充电','待支付','(已完成)支付完成','支付失败','已退款','已挂起','已关闭'][item.orderStatus === '' ? '--' : item.orderStatus] }}
</view> -->
<view class="refunded refunded_0" v-if="item.orderStatus == 0">
初始化
</view>
@ -242,9 +239,16 @@
return m;
}
const goDetail = (e) => {
if (e.orderStatus == 1) {
uni.navigateTo({
url: './detailInf/detailInf?details=' + JSON.stringify(e)
})
} else {
uni.navigateTo({
url: './detailInf/detail?details=' + JSON.stringify(e)
})
}
}
</script>
<style lang="scss" scoped>

@ -101,7 +101,7 @@
// outUser.iv = null
outLogin.isLogin = false
uni.navigateBack({
delta: 1
delta: 2
});
// console.log('out');
}

@ -1,92 +1,49 @@
<template>
<view class="section">
<!-- 登录成功展示 -->
<view class="flex padding justify-between" v-if="isLogin==true">
<view class=" padding-sm radius">
<view class="flex align-center">
<view class="radius avatar" @click="personalDetails">
<!-- <view class="cu-avatar round "> -->
<!-- avatar -->
<u-avatar :src="avatar" :size="60" mode="aspectFit"></u-avatar>
<!-- <u-avatar src="/static/user/headPortrait.svg"></u-avatar> -->
<!-- <image v-if="avatar!=null" :src="avatar" mode="aspectFit"></image> -->
<!-- <image v-else src="/static/user/headPortrait.svg" mode="aspectFit"></image> -->
<!-- </view> -->
<up-loading-page loading-text="..." color="#666" :loading="version_loading"></up-loading-page>
<view class="tops_view">
{{nickname == null || nickname == ''? '未知': nickname }}
</view>
<view class="padding-sm radius" @click="personalDetails">
{{userName}}
<view class="padding-top-xs text-sm text-gray">
{{phone?phone:''}}
<view class="position_cicles" :style="{'background-image': `url( ${avatar} )` }">
</view>
</view>
<uv-tags text="未审核用户" size="mini" type="error" v-if="realNameAuthFlag == 0"></uv-tags>
<uv-tags text="已审核" size="mini" type="success" v-if="realNameAuthFlag == 1"></uv-tags>
<uv-tags text="审核中..." size="mini" type="warning" v-if="realNameAuthFlag == 2"></uv-tags>
</view>
</view>
<view class="padding-sm radius">
<image class="png margin-top-sm" src="/static/user/Vector.svg" mode="aspectFit" @click="goSetting">
</image>
</view>
</view>
<!-- 未登录展示 -->
<view class="flex padding justify-between" v-if="isLogin==false">
<view class=" padding-sm radius">
<view class="flex align-center">
<view class="radius">
<view class="cu-avatar lg round ">
<image
src="https://www.zzpower.net/admin-api/infra/file/4/get/3acc373550998087bad0b6ae5a3651f362ec98d312ff82cc9482234fbe1c5cd0.svg"
mode="aspectFit"></image>
</view>
</view>
<view class="padding-sm radius">
<button class="cu-btn round line-gray margin-left-sm" @click="gologin"></button>
</view>
</view>
</view>
</view>
<view class="cu-card ">
<view class="cu-card " style="margin-top: 100rpx;">
<view class="cu-item shadow padding-lr-sm">
<view class="flex solids-bottom padding-tb-sm justify-between" @click="accountBalance(1)"
<view class="flex padding-tb-sm justify-between" @click="accountBalance(1)"
v-if="now_version == '个人版'">
<view class="flex">
<image class="titleImg" src="../../static/user/balance.svg" mode="scaleToFill"></image>
<uv-icon name="level" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">个人账户</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
<view class="flex solids-bottom padding-tb-sm justify-between" @click="accountBalance(2)"
<view class="flex padding-tb-sm justify-between" @click="accountBalance(2)"
v-if="now_version == '车队版' ">
<view class="flex">
<image class="titleImg" src="../../static/user/balance.svg" mode="scaleToFill"></image>
<uv-icon name="level" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">个人账户</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
<view class="flex solids-bottom padding-tb-sm justify-between" @click="accountBalance(3)"
<view class="flex padding-tb-sm justify-between" @click="accountBalance(3)"
v-if="now_version == '车队版' ">
<view class="flex">
<image class="titleImg" src="../../static/user/balance.svg" mode="scaleToFill"></image>
<uv-icon name="level" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">车队账户</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
<view class="flex solids-bottom padding-tb-sm justify-between" @click="personalDetails">
<view class="flex padding-tb-sm justify-between" @click="personalDetails">
<view class="flex">
<image class="titleImg" src="../../static/user/chargingDeclaration.svg" mode="scaleToFill">
</image>
<uv-icon name="home" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">个人信息</view>
</view>
<view class="flex">
<text class="lg text-gray cuIcon-right padding-top-xs"></text>
</view>
</view>
<view class="flex solids-bottom padding-tb-sm justify-between" @click="gobillingPage">
<view class="flex padding-tb-sm justify-between" @click="gobillingPage">
<view class="flex">
<image class="titleImg" src="../../static/user/myOrder.svg" mode="scaleToFill">
</image>
<uv-icon name="shopping-cart" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">套餐购买</view>
</view>
<view class="flex">
@ -95,46 +52,40 @@
</view>
<view class="flex padding-tb-sm justify-between" @click="gobillingPage_my">
<view class="flex">
<image class="titleImg" src="../../static/user/myOrder.svg" mode="scaleToFill">
</image>
<uv-icon name="folder" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">我的套餐</view>
</view>
<view class="flex">
<text class="lg text-gray cuIcon-right padding-top-xs"></text>
</view>
</view>
</view>
</view>
<view class="cu-card ">
<view class="cu-item shadow padding-lr-sm">
<view class="flex solids-bottom padding-tb-sm justify-between" @click="vehicleCertification"
<view class="flex padding-tb-sm justify-between" @click="vehicleCertification"
v-if="now_version == '个人版' ">
<view class="flex">
<image class="titleImg" src="../../static/user/motor.svg" mode="scaleToFill"></image>
<uv-icon name="car-fill" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">车辆认证</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
<view class="flex solids-bottom padding-tb-sm justify-between" @click="personnelCertification">
<view class="flex padding-tb-sm justify-between" @click="personnelCertification">
<view class="flex">
<image class="titleImg" src="../../static/user/shiftTurnover.svg" mode="scaleToFill"></image>
<uv-icon name="file-text" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">个人身份认证</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
<!-- solids-bottom -->
<view :class="{'flex':true, 'padding-tb-sm':true, 'justify-between':true,'solids-bottom': true}"
@click="gomotorCade" v-if="now_version == '个人版' ">
<view :class="{'flex':true, 'padding-tb-sm':true, 'justify-between':true}" @click="gomotorCade"
v-if="now_version == '个人版' ">
<view class="flex">
<image class="titleImg" src="../../static/user/driverhandover.svg" mode="scaleToFill"></image>
<uv-icon name="car" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">车队绑定</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
<view :class="{'flex':true, 'padding-tb-sm':true, 'justify-between':true,'solids-bottom': true}"
@click="gomotorCade_mycar">
<view :class="{'flex':true, 'padding-tb-sm':true, 'justify-between':true}" @click="gomotorCade_mycar">
<view class="flex">
<image class="titleImg" src="../../static/user/driverhandover.svg" mode="scaleToFill"></image>
<uv-icon name="photo" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">{{ now_version == '车队版'? '车队车辆': '我的车辆' }}</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
@ -142,16 +93,29 @@
<!-- -->
<view class="flex padding-tb-sm justify-between" @click="goShiftTurnover">
<view class="flex">
<image class="titleImg" src="../../static/user/shiftTurnover.svg" mode="scaleToFill"></image>
<uv-icon name="attach" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">修改密码</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
<view class="flex padding-tb-sm justify-between" @click="goSetting">
<view class="flex">
<uv-icon name="setting" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">其他设置</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
<view class="flex padding-tb-sm justify-between" @click="subscribeChange">
<view class="flex">
<uv-icon name="grid-fill" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">切换版本({{now_version}})</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
</view>
</view>
<uv-notify ref="errornotify" message="当前无操作权限,请审核通过后再试" type="error"></uv-notify>
<!-- tabbar -->
<cc-myTabbar :tabBarShow="2" @handle_scan="handle_scan"></cc-myTabbar>
<uv-modal ref="startswapmodal" title="提示" content='当前站已验证完成,可以进行换电,请点击确认开始换电'
@confirm="handle_swaping_pay"></uv-modal>
<uv-modal ref="startchargmodal" title="提示" content='当前枪已验证完成,可以进行充电,请点击开始充电'>
@ -161,6 +125,7 @@
</view>
</template>
</uv-modal>
<uv-picker ref="changepicker" :columns="columns" @confirm="confirm_picker"></uv-picker>
</view>
</template>
@ -183,36 +148,23 @@
//
// const dataCode = ref()
const isLogin = ref(false) //
const userName = ref('默认用户')
const nickname = ref(null)
const phone = ref()
const avatar = ref()
const realNameAuthFlag = ref(0)
const tabBarList = ref([{
"isTabBar": true,
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home_hl.png"
},
{
"text": "扫一扫",
"iconPath": "static/home/scan.png",
"selectedIconPath": "static/tabbar/home_hl.png"
},
{
"isTabBar": true,
"pagePath": "pages/userCenter/userCenter",
"text": "个人中心",
"iconPath": "static/tabbar/me.png",
"selectedIconPath": "static/tabbar/me_hl.png"
}
const columns = reactive([
[
'个人版', '车队版'
]
])
const version_loading = ref(false)
const now_version = ref()
onLoad(() => {
})
onShow(() => {
// console.log(loginStore,'loginStore');
isLogin.value = loginStore.isLogin
now_version.value = uni.getStorageSync("version")
if (isLogin.value == true) {
@ -223,23 +175,50 @@
// console.log(res,'');
if (res.data.code == 0) {
avatar.value = res.data.data.avatar
userName.value = res.data.data.userName
nickname.value = res.data.data.nickname
phone.value = res.data.data.mobile
realNameAuthFlag.value = res.data.data.realNameAuthFlag
uni.setStorageSync("realNameAuthFlag", res.data.data.realNameAuthFlag)
uni.setStorageSync("teamId", res.data.data.teamId)
uni.setStorageSync("mobile", res.data.data.mobile)
uni.setStorageSync("captainOrNot", res.data.data.captainOrNot)
// console.log(uni.getStorageSync("version"), '----');
if (uni.getStorageSync("version") == "") {
uni.setStorageSync("version", "个人版")
}
}
})
}
})
const clickTab = () => {
const changepicker = ref(null)
const subscribeChange = () => {
changepicker.value.open()
}
const confirm_picker = (e) => {
let teamId = uni.getStorageSync("teamId")
let str = uni.getStorageSync("version")
if (teamId) {
if (e.value[0] != str) {
version_loading.value = true
uni.setStorageSync('version', e.value[0])
setTimeout(() => {
version_loading.value = false
now_version.value = e.value[0]
}, 2000)
// ischarging_order.value = false
} else {
return
}
} else {
uni.showModal({
title: '提示',
showCancel: false,
content: "未绑定车队的用户,不允许切换版本,请绑定后重试...",
success: function(res) {
}
});
}
}
const errornotify = ref(null)
//
@ -336,10 +315,6 @@
});
return;
}
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
else {
uni.navigateTo({
url: './personneldentification/personneldentification'
@ -564,9 +539,6 @@
setTimeout(() => {
handle_chargorder()
}, 6000)
// uni.navigateTo({
// url: '/pages/order/chargorder/order'
// })
} else {
uni.showToast({
title: res.data.msg,
@ -625,7 +597,9 @@
.section {
width: 100%;
height: 100vh;
background: linear-gradient(180deg, #E4EFFF 0%, rgba(228, 239, 255, 0) 100%);
/* background: linear-gradient(180deg, #E4EFFF 0%, rgba(228, 239, 255, 0) 100%); */
background: #fff;
position: relative;
}
.titleImg {
@ -636,11 +610,43 @@
.titleFont {
font-size: 28rpx;
color: #000;
margin-top: 8rpx;
margin-left: 10rpx;
/* margin-top: 8rpx; */
margin-left: 20rpx;
}
.cu-card>.cu-item {
margin: 0 30rpx 30rpx 30rpx;
}
.tops_view {
width: 100%;
height: 200rpx;
border-bottom-left-radius: 60rpx;
border-bottom-right-radius: 60rpx;
background: #2cc06c;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
color: #fff;
font-weight: bold;
}
.position_cicles {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
/* background-image: url("https://picsum.photos/50/50"); */
background-size: 100% 100%;
position: absolute;
top: 140rpx;
left: 50%;
transform: translateX(-50%);
box-shadow: 1px 1px 1px #ccc;
}
.setting_position {
position: absolute;
top: 20rpx;
right: 20rpx;
}
</style>

@ -12,7 +12,8 @@
<!-- right -->
<view class="padding-top-xl">
<view class="padding-top-sm">
<button class="cu-btn round line-white" @click="goRecharge"></button>
<button class="cu-btn round" @click="goRecharge"
style="background: #fff; color: #2ebc6a;">充值</button>
</view>
</view>
</view>
@ -23,7 +24,7 @@
<uv-subsection :list="tab_list" :current="tab_current" @change="tab_change"></uv-subsection>
</view>
<!-- <view class="action padding-lr-sm padding-bottom-sm"><text class="cuIcon-titles textBlue"></text>充值明细</view> -->
<view>
<view class="content_pay">
<view class="cu-card " v-for="(item,index) in payData" :key="index" v-if="payData.length!=0">
<view class="cu-item shadow">
<view class="flex padding-sm justify-between">
@ -40,7 +41,8 @@
</view>
<!-- right -->
<view>
<view class="text-price payMoney">{{item.payPrice / 100}}</view>
<view class="text-price payMoney">
{{tab_current == 0? (item.payPrice / 100): (item.price / 100) }}</view>
<view class="allMoney">
<text>实际到账余额</text>
{{item.totalPrice?item.totalPrice / 100: 0}}
@ -91,6 +93,11 @@
})
const tab_change = (e) => {
tab_current.value = e
if (e == 1) {
getPayList_consumption()
} else if (e == 0) {
getPayList(0)
}
}
const handle_bindType = async (type) => {
let data = {
@ -128,6 +135,25 @@
})
}
const getPayList_consumption = async (type) => {
let param = {
pageNo: pageNo.value,
pageSize: 10
}
await uni.$request({
url: config.baseUrl +
`app-api/pay/wallet-transaction/page?bindType=1&pageNo=${param.pageNo}&pageSize=${param.pageSize}`
}).then(res => {
// console.log(res, '');
totalPages.value = res.data.data.total
if (type == 1) {
payData.value.concat(res.data.data.list)
} else {
payData.value = res.data.data.list
}
})
}
const getPayconsumption = async () => {
let param = {
pageNo: pageNo.value,
@ -152,6 +178,8 @@
.content {
width: 100%;
background: #F7F8FA;
display: flex;
flex-direction: column;
}
.textBlue {
@ -159,7 +187,7 @@
}
.bgColor {
background-image: linear-gradient(to right bottom, #A5C7FF, #4C91FF);
background-image: linear-gradient(to right bottom, #42cc7d, #23b360);
}
.account {
@ -245,6 +273,7 @@
.cu-card>.cu-item {
margin: 0 30rpx 30rpx 30rpx;
border-radius: 40rpx;
}
.noneImg {
@ -257,9 +286,17 @@
align-items: center;
justify-content: center;
}
.tab_cls {
padding: 0 30rpx;
}
.content_pay {
margin-top: 15rpx;
flex: 1;
overflow: hidden;
overflow-y: scroll;
}
</style>
<style lang="scss">
page {

@ -1,6 +1,6 @@
<template>
<view class="main-page">
<cc-couponList colors="#e54d42" :couponList="couponList" @itemClick="jumpNext"></cc-couponList>
<cc-couponList colors="#ff7131" :couponList="couponList" @itemClick="jumpNext"></cc-couponList>
</view>
<view v-if="couponList.length == 0">
<up-empty mode="coupon">
@ -102,13 +102,15 @@
//
const getOrder = async (type) => {
let types = ''
if (uni.getStorageSync("version") == '个人版') {
types = '?type=1'
}
// if (uni.getStorageSync("version") == '') {
// types = '?type=1'
// }
console.log(config.baseUrl, '接口地址');
console.log(types, '接口参数');
await uni.$request({
url: config.baseUrl + 'app-api/cloud/set-meal/page' + types
}).then(res => {
// console.log(res, '==========>');
console.log(res, '接口返回信息');
let str_array = []
for (let item of res.data.data.list) {
let str = {

@ -109,8 +109,8 @@
})
const tips = ref('获取验证码')
const form_login = ref({
mobile: '',
password: '',
mobile: '17625813248',
password: '123456',
code: ''
})
const edit_model = ref({
@ -213,9 +213,10 @@
})
}, 2000)
} else {
// switchTab
setTimeout(function() {
uni.switchTab({
url: '/pages/userCenter/userCenter'
url: '/pages/index/index'
});
}, 2000)
}

@ -159,6 +159,7 @@
data,
code
} = await PayOrderApi.getOrder(id);
console.log(data,'设置支付订单信息')
if (code !== 0 || !data) {
state.payStatus = -2;
return;
@ -176,6 +177,7 @@
data,
code
} = await PayChannelApi.getEnableChannelCodeList(state.orderInfo.appId)
console.log(data,'获得支付方式')
if (code !== 0) {
return
}

@ -373,7 +373,7 @@ export function getPayMethods(channels) {
}
];
const platform = sheep.$platform.name
console.log(platform,'platform')
// 1. 处理【微信支付】
const wechatMethod = payMethods[0];
if ((platform === 'WechatOfficialAccount' && channels.includes('wx_pub')) ||

Loading…
Cancel
Save