|
|
|
@ -1,12 +1,26 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="section">
|
|
|
|
|
<up-loading-page loading-text="版本切换中...请稍后" color="#666" :loading="version_loading"></up-loading-page>
|
|
|
|
|
<view class="tops_view">
|
|
|
|
|
{{nickname == null || nickname == ''? '未知': nickname }}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title_header">
|
|
|
|
|
<view>
|
|
|
|
|
<view class="position_cicles"
|
|
|
|
|
:style="{'background-image': `url( ${avatar == null || avatar == ''? no_avatar: avatar} )` }">
|
|
|
|
|
</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-item shadow padding-lr-sm">
|
|
|
|
|
<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">
|
|
|
|
|
<uv-icon name="setting" color="#2cc06c" size="20"></uv-icon>
|
|
|
|
|
<view class="titleFont">其他设置</view>
|
|
|
|
|
<!-- <view class="titleFont">其他设置</view> -->
|
|
|
|
|
<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 class="outLoginBtn" v-if="isLogin">
|
|
|
|
|
<u-button @click="logOut" shape='circle'>退出登录</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<uv-notify ref="errornotify" message="当前无操作权限,请审核通过后再试" type="error"></uv-notify>
|
|
|
|
|
<uv-modal ref="startswapmodal" title="提示" content='当前站已验证完成,可以进行换电,请点击确认开始换电'
|
|
|
|
|
@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>
|
|
|
|
|
<up-loading-page loading-text="退出中...请稍后" color="#666" :loading="version_loading"></up-loading-page>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -146,6 +149,7 @@
|
|
|
|
|
globalStore
|
|
|
|
|
} from '../../stores/globalData.js';
|
|
|
|
|
const loginStore = globalStore()
|
|
|
|
|
const version_loading = ref(false)
|
|
|
|
|
// 声明变量
|
|
|
|
|
// const dataCode = ref()
|
|
|
|
|
const isLogin = ref(false) //判断是否登录
|
|
|
|
@ -155,14 +159,10 @@
|
|
|
|
|
const no_avatar = ref(
|
|
|
|
|
'https://zzpower.net//admin-api/infra/file/4/get/6e642a15c0bad98793f342a5ca83317cfcd62ed8b84fa5fd4c5d6f4176bd3a14.png'
|
|
|
|
|
)
|
|
|
|
|
const balance = ref(0.00)
|
|
|
|
|
const realNameAuthFlag = ref(0)
|
|
|
|
|
const columns = reactive([
|
|
|
|
|
[
|
|
|
|
|
'个人版', '车队版'
|
|
|
|
|
]
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
const version_loading = ref(false)
|
|
|
|
|
|
|
|
|
|
const now_version = ref()
|
|
|
|
|
|
|
|
|
|
onLoad(() => {
|
|
|
|
@ -173,16 +173,50 @@
|
|
|
|
|
now_version.value = uni.getStorageSync("version")
|
|
|
|
|
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',
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
// console.log(res,'获取基本信息');
|
|
|
|
|
if (res.data.code == 0) {
|
|
|
|
|
avatar.value = res.data.data.avatar
|
|
|
|
|
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)
|
|
|
|
|
// 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)
|
|
|
|
@ -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 goSetting = () => {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: './setting/setting'
|
|
|
|
|
// url: './setting/setting'
|
|
|
|
|
url: '/pages/userCenter/about/about'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const gologin = () => {
|
|
|
|
@ -244,14 +245,16 @@
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
errornotify.value.show()
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: './personalDetails/personalDetails'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
// errornotify.value.show()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -264,14 +267,16 @@
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
errornotify.value.show()
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '../../pagesCenter/billingPage/billingPage'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
// errornotify.value.show()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const gobillingPage_my = () => {
|
|
|
|
@ -283,14 +288,16 @@
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
errornotify.value.show()
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesCenter/billingPage/billingMean/billingMean'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
// errornotify.value.show()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const vehicleCertification = () => {
|
|
|
|
|
if (!uni.getStorageSync("userInfo")) {
|
|
|
|
@ -300,14 +307,16 @@
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
errornotify.value.show()
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: './carIdentification/carIdentification'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
// errornotify.value.show()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const personnelCertification = () => {
|
|
|
|
@ -333,9 +342,6 @@
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
errornotify.value.show()
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
let url_push = ''
|
|
|
|
|
if (type == 1) {
|
|
|
|
@ -348,8 +354,12 @@
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url_push
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
// errornotify.value.show()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const goAbout = () => {
|
|
|
|
|
if (!uni.getStorageSync("userInfo")) {
|
|
|
|
@ -359,14 +369,16 @@
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
errornotify.value.show()
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: './about/about'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
// errornotify.value.show()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const gomotorCade = () => {
|
|
|
|
@ -377,14 +389,16 @@
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
errornotify.value.show()
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '../../pagesCenter/motorCade/motorCade'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
// errornotify.value.show()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const gomotorCade_mycar = () => {
|
|
|
|
@ -395,14 +409,16 @@
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
errornotify.value.show()
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '../../pagesCenter/motorCadeMy/motorCadeMy'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// else if (realNameAuthFlag.value != 1) {
|
|
|
|
|
// errornotify.value.show()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const goShiftTurnover = () => {
|
|
|
|
|
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 handle_swaping_pay = async () => {
|
|
|
|
|
// let stationNo = res_result.stationNo
|
|
|
|
|
await uni.request({
|
|
|
|
|
url: config.baseUrl +
|
|
|
|
|
`app-api/cloud/swapOrder/sendSwap`,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
header: {
|
|
|
|
|
'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: '充电机启动中...请稍后'
|
|
|
|
|
});
|
|
|
|
|
const logOut = () => {
|
|
|
|
|
uni.hideTabBar()
|
|
|
|
|
version_loading.value = true
|
|
|
|
|
uni.removeStorageSync("userInfo");
|
|
|
|
|
uni.removeStorageSync("token");
|
|
|
|
|
uni.removeStorageSync("refreshToken");
|
|
|
|
|
uni.removeStorageSync("teamId");
|
|
|
|
|
uni.removeStorageSync("realNameAuthFlag");
|
|
|
|
|
uni.removeStorageSync("version");
|
|
|
|
|
loginStore.isLogin = false
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
}, 2000)
|
|
|
|
|
} else {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
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'
|
|
|
|
|
uni.showTabBar()
|
|
|
|
|
version_loading.value = false
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
url: '/pages/index/index'
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
startchargmodal.value.open()
|
|
|
|
|
}, 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 = ''
|
|
|
|
|
if (uni.getStorageSync("version") == '个人版') {
|
|
|
|
|
config_url = `app-api/cloud/personal/startCharge/${check_chargeEqm.value}/${check_gunNo.value}`
|
|
|
|
|
} else {
|
|
|
|
|
config_url = `app-api/cloud/team/startCharge/${check_chargeEqm.value}/${check_gunNo.value}`
|
|
|
|
|
const handle_recharge = () => {
|
|
|
|
|
if (now_version.value == '车队版') {
|
|
|
|
|
uni.setStorageSync("ispersonnel", 1);
|
|
|
|
|
}
|
|
|
|
|
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({
|
|
|
|
|
url: '/pages/order/chargorder/detailInf/detailInf?details=' + JSON.stringify(
|
|
|
|
|
str)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.data.msg,
|
|
|
|
|
duration: 2000,
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '加载失败',
|
|
|
|
|
duration: 2000,
|
|
|
|
|
icon: 'error'
|
|
|
|
|
});
|
|
|
|
|
url: '/pages/index/recharge/recharge'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
@ -601,7 +475,7 @@
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
/* background: linear-gradient(180deg, #E4EFFF 0%, rgba(228, 239, 255, 0) 100%); */
|
|
|
|
|
background: #fff;
|
|
|
|
|
background: #f3f7fa;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -639,12 +513,7 @@
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -653,4 +522,65 @@
|
|
|
|
|
top: 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>
|