|
@@ -3,14 +3,14 @@
|
|
<view class="cabinet-bottom">
|
|
<view class="cabinet-bottom">
|
|
<view @tap="navToGuild" class="guide-view flex-row">
|
|
<view @tap="navToGuild" class="guide-view flex-row">
|
|
<img class="battery-img" src="https://qiniu.bms16.com/FkJlBRAxbGzR85wOO8WB_bAUTp-i" alt="">
|
|
<img class="battery-img" src="https://qiniu.bms16.com/FkJlBRAxbGzR85wOO8WB_bAUTp-i" alt="">
|
|
- <view class="guide-text">电池换电指南</view>
|
|
|
|
|
|
+ <view class="guide-text">{{$t('电池换电指南')}}</view>
|
|
<img class="arrow-img" src="https://qiniu.bms16.com/FtC9Hb8y1QEOidsI2UySz85iUQHy" alt="">
|
|
<img class="arrow-img" src="https://qiniu.bms16.com/FtC9Hb8y1QEOidsI2UySz85iUQHy" alt="">
|
|
</view>
|
|
</view>
|
|
<view class="scan-btn-view">
|
|
<view class="scan-btn-view">
|
|
<view v-if="num>0" class="free-num-view">
|
|
<view v-if="num>0" class="free-num-view">
|
|
- 免费换电<text class="free-num"> {{num}} </text>次
|
|
|
|
|
|
+ {{$t('免费换电')}}<text class="free-num"> {{num}} </text>次
|
|
</view>
|
|
</view>
|
|
- <view @tap="sacnBtn" class="scan-btn"><text>扫码换电</text></view>
|
|
|
|
|
|
+ <view @tap="sacnBtn" class="scan-btn"><text>{{$t('扫码换电')}}</text></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -22,7 +22,7 @@
|
|
<img class="close-icon" src="https://qiniu.bms16.com/FtoTEHOJiUf_gjPCJGGHMsAtHI5M" alt="">
|
|
<img class="close-icon" src="https://qiniu.bms16.com/FtoTEHOJiUf_gjPCJGGHMsAtHI5M" alt="">
|
|
</view>
|
|
</view>
|
|
<view class="pay-moneu-view">
|
|
<view class="pay-moneu-view">
|
|
- <view class="pay-money-text">付款金额/¥</view>
|
|
|
|
|
|
+ <view class="pay-money-text">{{$t('付款金额')}}/¥</view>
|
|
<view class="pay-money">{{free_price}}</view>
|
|
<view class="pay-money">{{free_price}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -31,20 +31,20 @@
|
|
<view class="fee-rules-title flex-row">
|
|
<view class="fee-rules-title flex-row">
|
|
<img class="fee-rules-icon" src="https://qiniu.bms16.com/FjJ70vT8ydLEGfeABSFYWFe-zosV"
|
|
<img class="fee-rules-icon" src="https://qiniu.bms16.com/FjJ70vT8ydLEGfeABSFYWFe-zosV"
|
|
alt="">
|
|
alt="">
|
|
- <text style="margin-left:16rpx;">换电收费规则</text>
|
|
|
|
|
|
+ <text style="margin-left:16rpx;">{{$t('换电收费规则')}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="fee-rules-money-view">
|
|
<view class="fee-rules-money-view">
|
|
<text class="fee-rules-money">¥{{free_price}}</text>
|
|
<text class="fee-rules-money">¥{{free_price}}</text>
|
|
<text>/1次</text>
|
|
<text>/1次</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="open-result-tip">您的免费换电次数已用完,后续换电需要支付</view>
|
|
|
|
|
|
+ <view class="open-result-tip">{{$t('您的免费换电次数已用完,后续换电需要支付')}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="pay-type-view">
|
|
<view class="pay-type-view">
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
<view class="pay-view flex-row">
|
|
<view class="pay-view flex-row">
|
|
<img class="pay-icon" src="https://qiniu.bms16.com/FkmtlfJrmGfAh9n1138KC1WloQkZ" alt="">
|
|
<img class="pay-icon" src="https://qiniu.bms16.com/FkmtlfJrmGfAh9n1138KC1WloQkZ" alt="">
|
|
- <view class="pay-view-text">微信支付</view>
|
|
|
|
|
|
+ <view class="pay-view-text">{{$t('微信支付')}}</view>
|
|
<img @tap="changePayType" :data-type="0" class="wx-pay-icon"
|
|
<img @tap="changePayType" :data-type="0" class="wx-pay-icon"
|
|
:src="payType==0?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/FkmDjxBNZhFGFU5inza2usdtDlX8'"
|
|
:src="payType==0?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/FkmDjxBNZhFGFU5inza2usdtDlX8'"
|
|
alt="">
|
|
alt="">
|
|
@@ -53,7 +53,7 @@
|
|
<!-- #ifdef MP-ALIPAY-->
|
|
<!-- #ifdef MP-ALIPAY-->
|
|
<view class="pay-view flex-row">
|
|
<view class="pay-view flex-row">
|
|
<img class="pay-icon" src="https://qiniu.bms16.com/Fk4YmG_RbdH0LNo1s8qHKDtpCTXl" alt="">
|
|
<img class="pay-icon" src="https://qiniu.bms16.com/Fk4YmG_RbdH0LNo1s8qHKDtpCTXl" alt="">
|
|
- <view class="pay-view-text">支付宝支付</view>
|
|
|
|
|
|
+ <view class="pay-view-text">{{$t('支付宝支付')}}</view>
|
|
<img @tap="changePayType" :data-type="2" class="wx-pay-icon"
|
|
<img @tap="changePayType" :data-type="2" class="wx-pay-icon"
|
|
:src="payType==2?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/FkmDjxBNZhFGFU5inza2usdtDlX8'"
|
|
:src="payType==2?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/FkmDjxBNZhFGFU5inza2usdtDlX8'"
|
|
alt="">
|
|
alt="">
|
|
@@ -61,14 +61,14 @@
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
<view class="pay-view flex-row">
|
|
<view class="pay-view flex-row">
|
|
<img class="pay-icon" src=" https://qiniu.bms16.com/FiGNLQ5lqhEK5im_mUVgRrE8PJMB" alt="">
|
|
<img class="pay-icon" src=" https://qiniu.bms16.com/FiGNLQ5lqhEK5im_mUVgRrE8PJMB" alt="">
|
|
- <view class="pay-view-text">钱包余额支付(¥{{wallet_money}})</view>
|
|
|
|
|
|
+ <view class="pay-view-text">{{$t('钱包余额支付')}}(¥{{wallet_money}})</view>
|
|
<img @tap="changePayType" :data-type="9" class="wx-pay-icon"
|
|
<img @tap="changePayType" :data-type="9" class="wx-pay-icon"
|
|
:src="payType==9?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/FkmDjxBNZhFGFU5inza2usdtDlX8'"
|
|
:src="payType==9?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/FkmDjxBNZhFGFU5inza2usdtDlX8'"
|
|
alt="">
|
|
alt="">
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="over-btn-view">
|
|
<view class="over-btn-view">
|
|
- <view class="over-btn flex-row" @tap="toPayOrFreeExchange">立即支付</view>
|
|
|
|
|
|
+ <view class="over-btn flex-row" @tap="toPayOrFreeExchange">{{$t('立即支付')}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -79,10 +79,10 @@
|
|
src="https://qiniu.bms16.com/FtoTEHOJiUf_gjPCJGGHMsAtHI5M" alt=""></view>
|
|
src="https://qiniu.bms16.com/FtoTEHOJiUf_gjPCJGGHMsAtHI5M" alt=""></view>
|
|
<view class="bluetooth-view flex-row"><img class="bluetooth-icon"
|
|
<view class="bluetooth-view flex-row"><img class="bluetooth-icon"
|
|
src="https://qiniu.bms16.com/FjWK8ZBtxCmspiOtHJWrNEoPRA0M" alt=""></view>
|
|
src="https://qiniu.bms16.com/FjWK8ZBtxCmspiOtHJWrNEoPRA0M" alt=""></view>
|
|
- <view class="need-bluetooth-text">本次换电需要连接蓝牙</view>
|
|
|
|
- <view class="need-bluetooth-tip">请开启手机蓝牙,点击 (蓝牙换电) 按钮</view>
|
|
|
|
|
|
+ <view class="need-bluetooth-text">{{$t('本次换电需要连接蓝牙')}}</view>
|
|
|
|
+ <view class="need-bluetooth-tip">{{$t('请开启手机蓝牙,点击 (蓝牙换电) 按钮')}}</view>
|
|
<view class="bluetooth-connect-view">
|
|
<view class="bluetooth-connect-view">
|
|
- <view class="bluetooth-connect-btn" @tap="tapOpenBluetooth">蓝牙换电</view>
|
|
|
|
|
|
+ <view class="bluetooth-connect-btn" @tap="tapOpenBluetooth">{{$t('蓝牙换电')}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -186,9 +186,9 @@
|
|
if(me.carInfo.battery_sn&&me.carInfo.remain){
|
|
if(me.carInfo.battery_sn&&me.carInfo.remain){
|
|
me.loadNowCabinetDetail(cabinet_dev_id)
|
|
me.loadNowCabinetDetail(cabinet_dev_id)
|
|
}else if(!me.carInfo.battery_sn){
|
|
}else if(!me.carInfo.battery_sn){
|
|
- common.simpleToast('车辆未绑定电池')
|
|
|
|
|
|
+ common.simpleToast(me.$t('车辆未绑定电池'))
|
|
}else if(!me.carInfo.remain){
|
|
}else if(!me.carInfo.remain){
|
|
- common.simpleToast('车辆已到期,请及时前往续费')
|
|
|
|
|
|
+ common.simpleToast(me.$t('车辆已到期,请及时前往续费'))
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -348,7 +348,7 @@
|
|
var order_sn = this.payResp.data.data.order_sn;
|
|
var order_sn = this.payResp.data.data.order_sn;
|
|
user.wxPay(order_sn, payParams, function (isSuccess) {
|
|
user.wxPay(order_sn, payParams, function (isSuccess) {
|
|
if (isSuccess) {
|
|
if (isSuccess) {
|
|
- common.simpleToast('支付成功')
|
|
|
|
|
|
+ common.simpleToast(me.$t('支付成功'))
|
|
//跳转换电流程页面
|
|
//跳转换电流程页面
|
|
me.orderInfo = {
|
|
me.orderInfo = {
|
|
order_sn: me.payResp.data.data.order_sn,
|
|
order_sn: me.payResp.data.data.order_sn,
|
|
@@ -369,7 +369,7 @@
|
|
tradeNO: me.payResp.data.data.trade_no,
|
|
tradeNO: me.payResp.data.data.trade_no,
|
|
success: function(res) {
|
|
success: function(res) {
|
|
if (res.resultCode == 9000) {
|
|
if (res.resultCode == 9000) {
|
|
- common.simpleToast('支付成功')
|
|
|
|
|
|
+ common.simpleToast(me.$t('支付成功'))
|
|
me.orderInfo = {
|
|
me.orderInfo = {
|
|
order_sn: me.payResp.data.data.order_sn,
|
|
order_sn: me.payResp.data.data.order_sn,
|
|
empty_door_id: me.payResp.data.data.empty_door_id,
|
|
empty_door_id: me.payResp.data.data.empty_door_id,
|
|
@@ -403,7 +403,7 @@
|
|
if (data.state === DF_CAB_INFO_DONE) {
|
|
if (data.state === DF_CAB_INFO_DONE) {
|
|
me.reportCabintInfo(me.cabinetInfo.dev_id, data.commandList);
|
|
me.reportCabintInfo(me.cabinetInfo.dev_id, data.commandList);
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
- common.simpleToast('蓝牙连接成功')
|
|
|
|
|
|
+ common.simpleToast(me.$t('蓝牙连接成功'))
|
|
me.setData({
|
|
me.setData({
|
|
isOpenBluetooth: false,
|
|
isOpenBluetooth: false,
|
|
isBluetooth:true
|
|
isBluetooth:true
|
|
@@ -430,7 +430,7 @@
|
|
isBluetooth:false
|
|
isBluetooth:false
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- common.simpleToast('蓝牙连接成功',2000)
|
|
|
|
|
|
+ common.simpleToast(me.$t('蓝牙连接成功'),2000)
|
|
// 蓝牙已连接
|
|
// 蓝牙已连接
|
|
me.setData({
|
|
me.setData({
|
|
isOpenBluetooth: false,
|
|
isOpenBluetooth: false,
|
|
@@ -457,9 +457,9 @@
|
|
isOpenBluetooth: false
|
|
isOpenBluetooth: false
|
|
});
|
|
});
|
|
uni.showModal({
|
|
uni.showModal({
|
|
- title: '提示',
|
|
|
|
- confirmText: '重新连接',
|
|
|
|
- content: '连接失败,请尝试重新连接',
|
|
|
|
|
|
+ title: me.$t('提示'),
|
|
|
|
+ confirmText: me.$t('重新连接'),
|
|
|
|
+ content: me.$t('连接失败,请尝试重新连接'),
|
|
success: function(res) {
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
me.loadBluetooth();
|
|
me.loadBluetooth();
|
|
@@ -478,21 +478,21 @@
|
|
var showContent = ""
|
|
var showContent = ""
|
|
if (res && ("errCode" in res)) {
|
|
if (res && ("errCode" in res)) {
|
|
if (res.errCode == 9000001) {
|
|
if (res.errCode == 9000001) {
|
|
- var showContent= "观察周围是否有其他骑手连接,请等待对方完成 或 微信是否开启了蓝牙权限!!"
|
|
|
|
|
|
+ var showContent= me.$t('观察周围是否有其他骑手连接,请等待对方完成') + me.$t('或') + me.$t('微信是否开启了蓝牙权限')!!
|
|
}else{
|
|
}else{
|
|
- var showContent= "连接失败,请尝试重新连接"
|
|
|
|
|
|
+ var showContent= me.$t('连接失败,请尝试重新连接')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- var showContent= "连接失败,请尝试重新连接"
|
|
|
|
|
|
+ var showContent= me.$t('连接失败,请尝试重新连接')
|
|
}
|
|
}
|
|
me.setData({
|
|
me.setData({
|
|
isOpenBluetooth: false,
|
|
isOpenBluetooth: false,
|
|
isBluetooth:false
|
|
isBluetooth:false
|
|
});
|
|
});
|
|
uni.showModal({
|
|
uni.showModal({
|
|
- title: '提示',
|
|
|
|
- confirmText: '重新连接',
|
|
|
|
|
|
+ title: me.$t('提示'),
|
|
|
|
+ confirmText: me.$t('重新连接'),
|
|
content: showContent,
|
|
content: showContent,
|
|
success: function(res) {
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
@@ -510,9 +510,9 @@
|
|
isOpenBluetooth: false
|
|
isOpenBluetooth: false
|
|
});
|
|
});
|
|
uni.showModal({
|
|
uni.showModal({
|
|
- title: '提示',
|
|
|
|
- confirmText: '我知道了',
|
|
|
|
- content: '蓝牙未打开或请在右上角设置授权小程序使用蓝牙',
|
|
|
|
|
|
+ title: me.$t('提示'),
|
|
|
|
+ confirmText: me.$t('我知道了'),
|
|
|
|
+ content: me.$t('蓝牙未打开或请在右上角设置授权小程序使用蓝牙'),
|
|
success: function(res) {
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
me.loadBluetooth();
|
|
me.loadBluetooth();
|
|
@@ -531,10 +531,10 @@
|
|
//蓝牙连接未成功
|
|
//蓝牙连接未成功
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
uni.showModal({
|
|
uni.showModal({
|
|
- confirmText: '我知道了',
|
|
|
|
- content: '当前机柜未找到符合的蓝牙类型',
|
|
|
|
|
|
+ confirmText: me.$t('我知道了'),
|
|
|
|
+ content: me.$t('当前机柜未找到符合的蓝牙类型'),
|
|
showCancel: false,
|
|
showCancel: false,
|
|
- title: '提示',
|
|
|
|
|
|
+ title: me.$t('提示'),
|
|
complete: (res) => {
|
|
complete: (res) => {
|
|
// uni.navigateBack({
|
|
// uni.navigateBack({
|
|
// delta: 1
|
|
// delta: 1
|
|
@@ -612,7 +612,7 @@
|
|
changePayType(e){
|
|
changePayType(e){
|
|
const type = e.currentTarget.dataset.type
|
|
const type = e.currentTarget.dataset.type
|
|
if(this.wallet_money<this.free_price){
|
|
if(this.wallet_money<this.free_price){
|
|
- common.simpleToast('钱包余额不足')
|
|
|
|
|
|
+ common.simpleToast(this.$t('钱包余额不足'))
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.setData({
|
|
this.setData({
|