formal_basic
shilei 2 weeks ago
parent 76f94b262c
commit a99f060fd9

@ -13,8 +13,8 @@
phone: null phone: null
}, },
onLaunch: function() { onLaunch: function() {
console.log('App Launch') // console.log('App Launch')
uni.hideTabBar() // uni.hideTabBar()
// handle_loop() // handle_loop()
}, },
onShow: function() { onShow: function() {

@ -158,7 +158,7 @@
type: 'gcj02', type: 'gcj02',
geocode: true, geocode: true,
success: (res) => { success: (res) => {
console.log(res, 'res'); // console.log(res, 'res');
address.value = res address.value = res
uni.setStorageSync('location', res) uni.setStorageSync('location', res)
longitude.value = res.longitude longitude.value = res.longitude
@ -359,11 +359,12 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (uni.getStorageSync("realNameAuthFlag") != 1) { }
// errornotify.value.show() // else if (uni.getStorageSync("realNameAuthFlag") != 1) {
emit('handle_errornotify') // emit('handle_errornotify')
return // return
} else { // }
else {
if (searchNo.value) { if (searchNo.value) {
let station = searchNo.value let station = searchNo.value
uni.navigateTo({ uni.navigateTo({

@ -32,8 +32,9 @@
"path": "pages/userCenter/userCenter", "path": "pages/userCenter/userCenter",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#2cc06c", "navigationStyle": "custom"
"navigationBarTextStyle": "white" // "navigationBarBackgroundColor": "#2cc06c"
// "navigationBarTextStyle": "white"
} }
}, },
{ {
@ -88,7 +89,7 @@
{ {
"path": "pages/userCenter/about/about", "path": "pages/userCenter/about/about",
"style": { "style": {
"navigationBarTitleText": "关于我们", "navigationBarTitleText": "联系我们",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -302,7 +303,7 @@
"selectedIconPath": "static/tabbar/home_hl.png" "selectedIconPath": "static/tabbar/home_hl.png"
}, },
{ {
"pagePath": "pages/userCenter/about/about", "pagePath": "pages/userCenter/userCenter",
"text": "个人中心", "text": "个人中心",
"iconPath": "static/tabbar/me.png", "iconPath": "static/tabbar/me.png",
"selectedIconPath": "static/tabbar/me_hl.png" "selectedIconPath": "static/tabbar/me_hl.png"

@ -142,8 +142,6 @@
uni.setStorageSync("version", "车队版") uni.setStorageSync("version", "车队版")
check_version.value = "车队版" check_version.value = "车队版"
} }
// realNameAuthFlag.value = uni.getStorageSync("realNameAuthFlag")
// console.log(uni.getStorageSync("version"), 'uni.getStorageSync')
if (globalData.isLogin) { if (globalData.isLogin) {
handle_user_info() handle_user_info()
} }
@ -201,11 +199,11 @@
} }
const handle_loop = () => { const handle_loop = () => {
if (realNameAuthFlag.value != 1) { // if (realNameAuthFlag.value != 1) {
clearInterval(timer.value) // clearInterval(timer.value)
timer.value = null // timer.value = null
return // return
} // }
timer.value = setInterval(() => { timer.value = setInterval(() => {
let config_url = '' let config_url = ''
if (uni.getStorageSync("version") == '个人版') { if (uni.getStorageSync("version") == '个人版') {
@ -280,15 +278,15 @@
if (res.data.code == 0) { if (res.data.code == 0) {
// console.log(res, 'realNameAuthFlag'); // console.log(res, 'realNameAuthFlag');
uni.setStorageSync("teamId", res.data.data.teamId); uni.setStorageSync("teamId", res.data.data.teamId);
uni.setStorageSync("realNameAuthFlag", res.data.data.realNameAuthFlag) // uni.setStorageSync("realNameAuthFlag", res.data.data.realNameAuthFlag)
realNameAuthFlag.value = res.data.data.realNameAuthFlag // realNameAuthFlag.value = res.data.data.realNameAuthFlag
// console.log(realNameAuthFlag.value, 'realNameAuthFlag.value') // console.log(realNameAuthFlag.value, 'realNameAuthFlag.value')
avatar.value = res.data.data.avatar avatar.value = res.data.data.avatar
if (realNameAuthFlag.value == 1) { // if (realNameAuthFlag.value == 1) {
clearInterval(timer.value) clearInterval(timer.value)
timer.value = null timer.value = null
handle_loop() handle_loop()
} // }
} }
}) })
} }
@ -336,15 +334,15 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (uni.getStorageSync("realNameAuthFlag") != 1) {
// errornotify.value.show()
handle_errornotify()
// return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order/swaporder/order' url: '/pages/order/swaporder/order'
}) })
} }
// else if (uni.getStorageSync("realNameAuthFlag") != 1) {
// handle_errornotify()
// }
} }
const goRecharge = () => { const goRecharge = () => {
@ -355,15 +353,14 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (uni.getStorageSync("realNameAuthFlag") != 1) {
// errornotify.value.show()
handle_errornotify()
// return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order/chargorder/order' url: '/pages/order/chargorder/order'
}) })
} }
// else if (uni.getStorageSync("realNameAuthFlag") != 1) {
// handle_errornotify()
// }
} }
const subscribe = () => { const subscribe = () => {
if (!uni.getStorageSync("userInfo")) { if (!uni.getStorageSync("userInfo")) {
@ -373,15 +370,15 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (uni.getStorageSync("realNameAuthFlag") != 1) {
// errornotify.value.show()
handle_errornotify()
// return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order/appointorder/order' url: '/pages/order/appointorder/order'
}) })
} }
// else if (uni.getStorageSync("realNameAuthFlag") != 1) {
// handle_errornotify()
// }
} }
const swap_pay_stationNo = ref('') const swap_pay_stationNo = ref('')
const handle_scan = () => { const handle_scan = () => {
@ -394,10 +391,6 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (uni.getStorageSync("realNameAuthFlag") != 1) {
// errornotify.value.show()
handle_errornotify()
// return
} else { } else {
uni.scanCode({ uni.scanCode({
scanType: ['qrCode'], scanType: ['qrCode'],
@ -426,6 +419,9 @@
} }
}) })
} }
// else if (uni.getStorageSync("realNameAuthFlag") != 1) {
// handle_errornotify()
// }
} }
const handle_charging_pay = async (res_result) => { const handle_charging_pay = async (res_result) => {
@ -601,11 +597,6 @@
// url: '/pages/order/chargorder/order' // url: '/pages/order/chargorder/order'
// }) // })
} else { } else {
// uni.showToast({
// title: res.data.msg,
// duration: 2000,
// icon: 'error'
// });
uni.showModal({ uni.showModal({
content: res.data.msg, content: res.data.msg,
success: () => {} success: () => {}

@ -29,15 +29,15 @@
<view class="content_item" style="margin-top: 50rpx;"> <view class="content_item" style="margin-top: 50rpx;">
<view class=""> <view class="">
<text>充电电流(A)</text> <text>充电电流(A)</text>
<text>{{(detail.list.currentElectrical).toFixed(2) || 0}}</text> <text>{{detail.list.currentElectrical == null? 0: (detail.list.currentElectrical).toFixed(2)}}</text>
</view> </view>
<view class=""> <view class="">
<text>充电电压(V)</text> <text>充电电压(V)</text>
<text>{{detail.list.currentVoltage || 0}}</text> <text>{{detail.list.currentVoltage == null? 0: (detail.list.currentVoltage).toFixed(2)}}</text>
</view> </view>
</view> </view>
<view class="content_item" style="margin-top: 30rpx;">
<view class="content_item" style="margin-top: 30rpx;">
<view class=""> <view class="">
<text>剩余时长()</text> <text>剩余时长()</text>
<text>{{detail.list.remainingChargingTime || 0 }}</text> <text>{{detail.list.remainingChargingTime || 0 }}</text>
@ -47,6 +47,16 @@
<text>{{detail.list.chargingTime || 0}}</text> <text>{{detail.list.chargingTime || 0}}</text>
</view> </view>
</view> </view>
<view class="content_item" style="margin-top: 30rpx;">
<view class="">
<text>充电电量(kwh)</text>
<text>{{detail.list.chargingCapacity == null? 0: (detail.list.chargingCapacity).toFixed(2) }}</text>
</view>
<view class="">
<text>总金额()</text>
<text>{{detail.list.totalFee / 100 || 0}}</text>
</view>
</view>
<view class="more_position" style="margin-top: 20rpx;" @click="handle_more_info"> <view class="more_position" style="margin-top: 20rpx;" @click="handle_more_info">
更多详细信息 更多详细信息
@ -175,6 +185,7 @@
chargeTotalFee: null, chargeTotalFee: null,
currentElectrical: null, currentElectrical: null,
currentVoltage: null, currentVoltage: null,
chargingCapacity: null
} }
}) })
const timer = ref(null) const timer = ref(null)

@ -5,32 +5,36 @@
</view> </view>
<view class="cu-card "> <view class="cu-card ">
<view class="cu-item shadow padding-lr-sm"> <view class="cu-item shadow padding-lr-sm">
<view class="flex solids-bottom padding-tb-sm justify-between"> <!-- <view class="flex solids-bottom padding-tb-sm justify-between">
<view class="flex"> <view class="flex">
<text class=" text-gray cuIcon-people iconTop"></text> <text class=" text-gray cuIcon-people iconTop"></text>
<view class="padding-left-xs">联系人---</view> <view class="padding-left-xs">联系人---</view>
</view> </view>
</view> </view> -->
<view class="flex solids-bottom padding-tb-sm justify-between"> <view class="flex solids-bottom padding-tb-sm justify-between">
<view class="flex"> <view class="flex">
<text class=" text-gray cuIcon-mobile iconTop"></text> <text class=" text-gray cuIcon-mobile iconTop"></text>
<view class="padding-left-xs">客服电话xxxx xxxx</view> <view class="padding-left-xs">客服电话
<text style="color: #576b95; font-weight: 600">137 7433 4540</text>
</view>
</view> </view>
<view class="flex"> <view class="flex">
</view> </view>
</view> </view>
<view class="flex solids-bottom padding-tb-sm justify-between"> <view class="flex padding-tb-sm justify-between">
<view class="flex"> <view class="flex">
<text class=" text-gray cuIcon-phone iconTop"></text> <text class=" text-gray cuIcon-phone iconTop"></text>
<view class="padding-left-xs">公司电话xxxx xxxx</view> <view class="padding-left-xs">公司邮箱
<text style="color: #576b95; font-weight: 600">service@marcellauto.com</text>
</view> </view>
</view> </view>
<view class="flex padding-tb-sm justify-between"> </view>
<!-- <view class="flex padding-tb-sm justify-between">
<view class="flex"> <view class="flex">
<text class=" text-gray cuIcon-location iconTop"></text> <text class=" text-gray cuIcon-location iconTop"></text>
<view class="padding-left-xs">公司地址xxxx科技有限公司</view> <view class="padding-left-xs">公司地址xxxx科技有限公司</view>
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
@ -51,8 +55,8 @@
width: 100%; width: 100%;
height: 400rpx; height: 400rpx;
} }
.iconTop{
.iconTop {
margin-top: 5rpx; margin-top: 5rpx;
} }
</style> </style>

@ -97,13 +97,10 @@
uni.removeStorageSync("teamId"); uni.removeStorageSync("teamId");
uni.removeStorageSync("realNameAuthFlag"); uni.removeStorageSync("realNameAuthFlag");
uni.removeStorageSync("version"); uni.removeStorageSync("version");
// outUser.encryptedData = null
// outUser.iv = null
outLogin.isLogin = false outLogin.isLogin = false
uni.navigateBack({ uni.navigateBack({
delta: 2 delta: 2
}); });
// console.log('out');
} }
const subscribeChange = () => { const subscribeChange = () => {
// console.log('change', e); // console.log('change', e);

@ -1,12 +1,26 @@
<template> <template>
<view class="section"> <view class="section">
<up-loading-page loading-text="..." color="#666" :loading="version_loading"></up-loading-page> <view class="title_header">
<view class="tops_view"> <view>
{{nickname == null || nickname == ''? '未知': nickname }}
</view>
<view class="position_cicles" <view class="position_cicles"
:style="{'background-image': `url( ${avatar == null || avatar == ''? no_avatar: avatar} )` }"> :style="{'background-image': `url( ${avatar == null || avatar == ''? no_avatar: avatar} )` }">
</view> </view>
<view style="color: #fff;">
{{nickname == null || nickname == ''? '未登录': nickname }}
</view>
</view>
<view class="position_recharge">
<view>
<view>账户余额</view>
<view>
<text style="font-weight: 600;">{{balance}}</text>
<text style="margin-left: 8rpx"></text>
</view>
</view>
<view class="btn_recharge" v-if="isLogin" @click="handle_recharge"></view>
</view>
</view>
<!-- -->
<view class="cu-card " style="margin-top: 100rpx;"> <view class="cu-card " style="margin-top: 100rpx;">
<view class="cu-item shadow padding-lr-sm"> <view class="cu-item shadow padding-lr-sm">
<view class="flex padding-tb-sm justify-between" @click="accountBalance(1)" <view class="flex padding-tb-sm justify-between" @click="accountBalance(1)"
@ -102,31 +116,20 @@
<view class="flex padding-tb-sm justify-between" @click="goSetting"> <view class="flex padding-tb-sm justify-between" @click="goSetting">
<view class="flex"> <view class="flex">
<uv-icon name="setting" color="#2cc06c" size="20"></uv-icon> <uv-icon name="setting" color="#2cc06c" size="20"></uv-icon>
<view class="titleFont">其他设置</view> <!-- <view class="titleFont">其他设置</view> -->
<view class="titleFont">联系我们</view>
</view> </view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view> <view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</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>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view> -->
</view> </view>
<!-- -->
<view class="outLoginBtn" v-if="isLogin">
<u-button @click="logOut" shape='circle'>退出登录</u-button>
</view> </view>
<uv-notify ref="errornotify" message="当前无操作权限,请审核通过后再试" type="error"></uv-notify> <uv-notify ref="errornotify" message="当前无操作权限,请审核通过后再试" type="error"></uv-notify>
<uv-modal ref="startswapmodal" title="提示" content='当前站已验证完成,可以进行换电,请点击确认开始换电' <up-loading-page loading-text="退..." color="#666" :loading="version_loading"></up-loading-page>
@confirm="handle_swaping_pay"></uv-modal>
<uv-modal ref="startchargmodal" title="提示" content='当前枪已验证完成,可以进行充电,请点击开始充电'>
<template v-slot:confirmButton>
<view class="" style="margin:0 20px 20px 20px;">
<button type="primary" @click="startconfirm" style="font-size: 24rpx;">开始充电</button>
</view>
</template>
</uv-modal>
<uv-picker ref="changepicker" :columns="columns" @confirm="confirm_picker"></uv-picker>
</view> </view>
</template> </template>
@ -146,6 +149,7 @@
globalStore globalStore
} from '../../stores/globalData.js'; } from '../../stores/globalData.js';
const loginStore = globalStore() const loginStore = globalStore()
const version_loading = ref(false)
// //
// const dataCode = ref() // const dataCode = ref()
const isLogin = ref(false) // const isLogin = ref(false) //
@ -155,14 +159,10 @@
const no_avatar = ref( const no_avatar = ref(
'https://zzpower.net//admin-api/infra/file/4/get/6e642a15c0bad98793f342a5ca83317cfcd62ed8b84fa5fd4c5d6f4176bd3a14.png' 'https://zzpower.net//admin-api/infra/file/4/get/6e642a15c0bad98793f342a5ca83317cfcd62ed8b84fa5fd4c5d6f4176bd3a14.png'
) )
const balance = ref(0.00)
const realNameAuthFlag = ref(0) const realNameAuthFlag = ref(0)
const columns = reactive([
[
'个人版', '车队版'
]
])
const version_loading = ref(false)
const now_version = ref() const now_version = ref()
onLoad(() => { onLoad(() => {
@ -173,16 +173,50 @@
now_version.value = uni.getStorageSync("version") now_version.value = uni.getStorageSync("version")
if (isLogin.value == true) { if (isLogin.value == true) {
// //
uni.$request({ handle_user_info()
if (now_version.value == '车队版') {
handle_wallet_team()
} else {
handle_wallet_personnel()
}
}
})
const handle_wallet_team = async () => {
let data = {
bindType: 2
}
let config_url = 'app-api/pay/wallet/get'
await uni.$request({
url: config.baseUrl + config_url,
data
}).then(res => {
balance.value = res.data.data.balance / 100
})
}
const handle_wallet_personnel = async () => {
let data = {
bindType: 1
}
await uni.$request({
url: config.baseUrl + "app-api/pay/wallet/get",
data
}).then(res => {
balance.value = res.data.data.balance / 100
})
}
const handle_user_info = async () => {
await uni.$request({
url: config.baseUrl + 'app-api/member/user/get', url: config.baseUrl + 'app-api/member/user/get',
}).then((res) => { }).then((res) => {
// console.log(res,'');
if (res.data.code == 0) { if (res.data.code == 0) {
avatar.value = res.data.data.avatar avatar.value = res.data.data.avatar
nickname.value = res.data.data.nickname nickname.value = res.data.data.nickname
phone.value = res.data.data.mobile phone.value = res.data.data.mobile
realNameAuthFlag.value = res.data.data.realNameAuthFlag // realNameAuthFlag.value = res.data.data.realNameAuthFlag
uni.setStorageSync("realNameAuthFlag", res.data.data.realNameAuthFlag) // uni.setStorageSync("realNameAuthFlag", res.data.data.realNameAuthFlag)
uni.setStorageSync("teamId", res.data.data.teamId) uni.setStorageSync("teamId", res.data.data.teamId)
uni.setStorageSync("mobile", res.data.data.mobile) uni.setStorageSync("mobile", res.data.data.mobile)
uni.setStorageSync("captainOrNot", res.data.data.captainOrNot) uni.setStorageSync("captainOrNot", res.data.data.captainOrNot)
@ -190,45 +224,12 @@
} }
}) })
} }
})
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) const errornotify = ref(null)
// //
const goSetting = () => { const goSetting = () => {
uni.navigateTo({ uni.navigateTo({
url: './setting/setting' // url: './setting/setting'
url: '/pages/userCenter/about/about'
}) })
} }
const gologin = () => { const gologin = () => {
@ -244,14 +245,16 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (realNameAuthFlag.value != 1) {
errornotify.value.show()
return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: './personalDetails/personalDetails' url: './personalDetails/personalDetails'
}) })
} }
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
} }
@ -264,14 +267,16 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (realNameAuthFlag.value != 1) {
errornotify.value.show()
return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '../../pagesCenter/billingPage/billingPage' url: '../../pagesCenter/billingPage/billingPage'
}) })
} }
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
} }
const gobillingPage_my = () => { const gobillingPage_my = () => {
@ -283,14 +288,16 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (realNameAuthFlag.value != 1) {
errornotify.value.show()
return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pagesCenter/billingPage/billingMean/billingMean' url: '/pagesCenter/billingPage/billingMean/billingMean'
}) })
} }
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
} }
const vehicleCertification = () => { const vehicleCertification = () => {
if (!uni.getStorageSync("userInfo")) { if (!uni.getStorageSync("userInfo")) {
@ -300,14 +307,16 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (realNameAuthFlag.value != 1) {
errornotify.value.show()
return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: './carIdentification/carIdentification' url: './carIdentification/carIdentification'
}) })
} }
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
} }
const personnelCertification = () => { const personnelCertification = () => {
@ -333,9 +342,6 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (realNameAuthFlag.value != 1) {
errornotify.value.show()
return
} else { } else {
let url_push = '' let url_push = ''
if (type == 1) { if (type == 1) {
@ -348,8 +354,12 @@
uni.navigateTo({ uni.navigateTo({
url: url_push url: url_push
}) })
} }
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
} }
const goAbout = () => { const goAbout = () => {
if (!uni.getStorageSync("userInfo")) { if (!uni.getStorageSync("userInfo")) {
@ -359,14 +369,16 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (realNameAuthFlag.value != 1) {
errornotify.value.show()
return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: './about/about' url: './about/about'
}) })
} }
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
} }
const gomotorCade = () => { const gomotorCade = () => {
@ -377,14 +389,16 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (realNameAuthFlag.value != 1) {
errornotify.value.show()
return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '../../pagesCenter/motorCade/motorCade' url: '../../pagesCenter/motorCade/motorCade'
}) })
} }
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
} }
const gomotorCade_mycar = () => { const gomotorCade_mycar = () => {
@ -395,14 +409,16 @@
icon: 'error' icon: 'error'
}); });
return; return;
} else if (realNameAuthFlag.value != 1) {
errornotify.value.show()
return
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '../../pagesCenter/motorCadeMy/motorCadeMy' url: '../../pagesCenter/motorCadeMy/motorCadeMy'
}) })
} }
// else if (realNameAuthFlag.value != 1) {
// errornotify.value.show()
// return
// }
} }
const goShiftTurnover = () => { const goShiftTurnover = () => {
if (!uni.getStorageSync("userInfo")) { if (!uni.getStorageSync("userInfo")) {
@ -418,175 +434,33 @@
}) })
} }
} }
const swap_pay_stationNo = ref('')
const startchargmodal = ref(null)
const startswapmodal = ref(null)
const handle_scan = () => {
uni.scanCode({
scanType: ['qrCode'],
success: async function(res) {
let res_result = JSON.parse(res.result)
if (res_result.hasOwnProperty('stationNo')) {
uni.showToast({
title: '验证成功',
duration: 1000,
icon: 'success'
})
swap_pay_stationNo.value = res_result.stationNo
setTimeout(() => {
startswapmodal.value.open()
}, 2000)
} else {
handle_charging_pay(res_result)
}
} const logOut = () => {
}) uni.hideTabBar()
} version_loading.value = true
const handle_swaping_pay = async () => { uni.removeStorageSync("userInfo");
// let stationNo = res_result.stationNo uni.removeStorageSync("token");
await uni.request({ uni.removeStorageSync("refreshToken");
url: config.baseUrl + uni.removeStorageSync("teamId");
`app-api/cloud/swapOrder/sendSwap`, uni.removeStorageSync("realNameAuthFlag");
method: 'POST', uni.removeStorageSync("version");
header: { loginStore.isLogin = false
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer ' + uni.getStorageSync('token'),
'tenant-id': 1
},
data: {
stationNo: swap_pay_stationNo.value
}
}).then(response => {
// console.log(response, '');
if (response.data.code == 0) {
uni.showLoading({
title: '充电机启动中...请稍后'
});
setTimeout(() => { setTimeout(() => {
uni.hideLoading() uni.showTabBar()
}, 2000) version_loading.value = false
} else { uni.reLaunch({
uni.showModal({ url: '/pages/index/index'
title: '错误',
showCancel: false,
content: response.data.msg,
success: function(res) {}
});
}
}).catch((err) => {
uni.showToast({
title: '错误,验证失败',
duration: 2000,
icon: 'error'
});
})
}
const check_chargeEqm = ref('')
const check_gunNo = ref('')
const handle_charging_pay = async (res_result) => {
check_chargeEqm.value = res_result.chargeEqm
check_gunNo.value = res_result.gunNo
await uni.$request({
url: config.baseUrl +
`app-api/cloud/outCharge/confirmGunCanCharging/${res_result.chargeEqm}/${res_result.gunNo}`,
method: 'GET'
}).then(response => {
if (response.data.code == 0) {
uni.showToast({
title: '验证成功',
duration: 1000,
icon: 'success'
}) })
setTimeout(() => {
startchargmodal.value.open()
}, 2000) }, 2000)
} else {
uni.showModal({
title: '错误',
showCancel: false,
content: response.data.msg,
success: function(res) {}
});
}
}).catch((err) => {
uni.showToast({
title: '错误,验证失败',
duration: 2000,
icon: 'error'
});
})
} }
const startconfirm = async () => {
startchargmodal.value.close()
let config_url = '' const handle_recharge = () => {
if (uni.getStorageSync("version") == '个人版') { if (now_version.value == '车队版') {
config_url = `app-api/cloud/personal/startCharge/${check_chargeEqm.value}/${check_gunNo.value}` uni.setStorageSync("ispersonnel", 1);
} else {
config_url = `app-api/cloud/team/startCharge/${check_chargeEqm.value}/${check_gunNo.value}`
} }
await uni.$request({
url: config.baseUrl + config_url
}).then(res => {
if (res.data.code == 0) {
uni.showLoading({
title: '充电机启动中...请稍后'
});
setTimeout(() => {
uni.hideLoading()
}, 2000)
chargorder.value = res.data.data
setTimeout(() => {
handle_chargorder()
}, 6000)
} else {
uni.showToast({
title: res.data.msg,
duration: 2000,
icon: 'error'
});
}
// console.log(res, 'res');
}).catch((err) => {
})
}
const handle_chargorder = async () => {
let config_url = ''
if (uni.getStorageSync("version") == '个人版') {
config_url = `app-api/cloud/personal/queryRealTimeOrder/${chargorder.value}`
} else {
config_url = `app-api/cloud/team/queryRealTimeOrder/${chargorder.value}`
}
clearInterval(timer.value)
timer.value = null
await uni.$request({
url: config.baseUrl + config_url
}).then(res => {
// console.log(res, '');
if (res.data.code == 0) {
let str = res.data.data
uni.navigateTo({ uni.navigateTo({
url: '/pages/order/chargorder/detailInf/detailInf?details=' + JSON.stringify( url: '/pages/index/recharge/recharge'
str)
})
} else {
uni.showToast({
title: res.data.msg,
duration: 2000,
icon: 'error'
});
}
}).catch((err) => {
uni.showToast({
title: '加载失败',
duration: 2000,
icon: 'error'
});
}) })
} }
</script> </script>
@ -601,7 +475,7 @@
width: 100%; width: 100%;
height: 100vh; 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; background: #f3f7fa;
position: relative; position: relative;
} }
@ -639,12 +513,7 @@
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
border-radius: 50%; border-radius: 50%;
/* background-image: url("https://picsum.photos/50/50"); */
background-size: 100% 100%; background-size: 100% 100%;
position: absolute;
top: 140rpx;
left: 50%;
transform: translateX(-50%);
box-shadow: 1px 1px 1px #ccc; box-shadow: 1px 1px 1px #ccc;
} }
@ -653,4 +522,65 @@
top: 20rpx; top: 20rpx;
right: 20rpx; right: 20rpx;
} }
.title_header {
display: flex;
align-items: start;
/* justify-content: space-between; */
width: 100%;
height: 440rpx;
border-bottom-left-radius: 60rpx;
border-bottom-right-radius: 60rpx;
/* background: #2cc06c; */
background-image: url('https://zzpower.net//admin-api/infra/file/4/get/99bd21413e53b2474f01e40a76d41b103a72db8aab106b2af6ffa59e3016ff80.jpg');
/* background-image: url('https://zzpower.net//admin-api/infra/file/4/get/9e7cdfed4eb3775bf248cd0ac7496cedea7a2af21a9ab384d3819dc5944dd0a1.jpg'); */
/* background-image: url('https://zzpower.net//admin-api/infra/file/4/get/dc0d69995b79fb13fe1baf61d6e2570fcabdd3e47cce7ae302d6d8e51f260834.jpg'); */
background-repeat: no-repeat;
background-position: center;
background-size: 100% 100%;
padding: 200rpx 30rpx 0 30rpx;
box-sizing: border-box;
position: relative;
>view:first-child {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.position_recharge {
width: calc(100% - 60rpx);
height: 130rpx;
background: #fff;
position: absolute;
bottom: -60rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx;
box-sizing: border-box;
>view:first-child {
color: #000;
}
.btn_recharge {
padding: 10rpx 20rpx;
background: linear-gradient(to right, #72ef3f, #41ce2d);
color: #fff;
border-radius: 10rpx;
font-size: 14px;
}
}
}
.outLoginBtn {
width: calc(100% - 60rpx);
position: absolute;
bottom: 50rpx;
left: 50%;
transform: translateX(-50%);
}
</style> </style>

@ -96,10 +96,6 @@
bindType: 2 bindType: 2
} }
let config_url = '' let config_url = ''
// if (uni.getStorageSync("captainOrNot")) {
// config_url = 'app-api/pay/wallet/getTeam'
// } else {
// }
config_url = 'app-api/pay/wallet/get' config_url = 'app-api/pay/wallet/get'
uni.$request({ uni.$request({
url: config.baseUrl + config_url, url: config.baseUrl + config_url,

@ -173,7 +173,8 @@
content: '确定要支付吗?', content: '确定要支付吗?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
sheep.$platform.pay(state.payment, state.orderType, state.orderInfo.id); // sheep.$platform.pay(state.payment, state.orderType, state.orderInfo.id);
return new Pay(state.payment, state.orderType, state.orderInfo.id);
} }
}, },
}); });
@ -254,6 +255,7 @@
// //
async function setOrder(id) { async function setOrder(id) {
console.log(id, 'id')
// //
const { const {
data, data,

@ -8,7 +8,7 @@ if (process.env.NODE_ENV === 'development') {
} }
version = import.meta.env.SHOPRO_VERSION; version = import.meta.env.SHOPRO_VERSION;
// console.log(`[芋道商城 ${version}] http://doc.iocoder.cn`); // console.log(`[芋道商城 ${version}] http://doc.iocoder.cn`);
console.log(baseUrl,'baseUrl')
export const apiPath = import.meta.env.SHOPRO_API_PATH; export const apiPath = import.meta.env.SHOPRO_API_PATH;
export const staticUrl = import.meta.env.SHOPRO_STATIC_URL; export const staticUrl = import.meta.env.SHOPRO_STATIC_URL;
export const tenantId = import.meta.env.SHOPRO_TENANT_ID; export const tenantId = import.meta.env.SHOPRO_TENANT_ID;

@ -75,7 +75,7 @@ http.interceptors.request.use(
showAuthModal(); showAuthModal();
return Promise.reject(); return Promise.reject();
} }
console.log(config,'config')
// 自定义处理【loading 加载中】:如果需要显示 loading则显示 loading // 自定义处理【loading 加载中】:如果需要显示 loading则显示 loading
if (config.custom.showLoading) { if (config.custom.showLoading) {
LoadingInstance.count++; LoadingInstance.count++;

Loading…
Cancel
Save