This commit is contained in:
dt_2916866708
2024-02-29 09:05:38 +08:00
commit 83d0c894b2
478 changed files with 73907 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
.play_container {
width: 100vw;
height: 100vh;
background-color: #f1f8fd;
padding: 0 31rpx;
box-sizing: border-box;
.play_footer {
.play_footer_botton {
width: 100%;
height: 106rpx;
background: #121836;
border-radius: 15rpx 15rpx 15rpx 15rpx;
opacity: 1;
color: #ffffff;
font-size: 34rpx;
font-weight: 600;
}
padding-bottom: env(safe-area-inset-bottom);
}
.play_cards {
margin-top: 98rpx;
.play_card {
width: 100%;
background: #ffffff;
box-shadow: 0rpx 3rpx 10rpx 0rpx rgba(221, 221, 221, 0.502);
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
padding: 50rpx 40rpx;
box-sizing: border-box;
margin-bottom: 20rpx ;
.play_card_top {
image {
width: 38rpx;
height: 38rpx;
margin-right: 25rpx;
}
.play_card_top_name {
font-size: 28rpx;
color: #333333;
}
.play_card_top_balance {
font-size: 22rpx;
color: #476ffa;
}
}
}
}
.play_header {
width: 100%;
margin-top: 140rpx;
text-align: center;
.play_header_tiem {
font-size: 24rpx;
color: #999999;
text-align: center;
}
.play_header_price {
font-size: 58rpx;
color: #fe0505;
font-weight: 600;
text-align: center;
}
}
}

View File

@@ -0,0 +1,117 @@
<template>
<view v-if="playData" class="play_container flex column">
<view class="play_header">
<view class="play_header_price">
{{tool.getnum((Number(playData.payMoneyPreAvailable) + Number(playData.payMoneyPreFreeze) ),2)}} </view>
<!-- <view class="play_header_tiem flex jc">
支付时间剩余
<uni-countdown @timeup='timeup' :show-day="false" :font-size="12" :minute="10" :second="0" />
</view> -->
</view>
<view class="play_cards oneflex">
<view v-for="(item,index) in pageData" :key="index" class="play_card">
<view class="play_card_top flex ac">
<image src="../../../../static/account.png"></image>
<view class="oneflex">
<view class="play_card_top_name">
{{item.name}} <text v-if="item.shareCompanyQuota==1">( 共享 )</text>
</view>
<view class="play_card_top_balance">当前余额:{{ tool.getnum(item.balance,2)}}</view>
</view>
<checkbox-group @change="checkChange">
<checkbox style="transform:scale(0.7)"
:checked="selectCompanyIds.includes(`${item.companyId}&${item.accountCardCode}`)"
:value=" `${item.companyId}&${item.accountCardCode}` " />
</checkbox-group>
</view>
</view>
</view>
<view class="play_footer">
<view @click="goResult" class="play_footer_botton flex ac jc">确定支付</view>
</view>
</view>
</template>
<script>
import station from '@/api/station.js'
import play from '@/api/play.js'
export default {
data() {
return {
checkPage: {
companyId: {
tacitly: '',
WrongText: '请选择电卡'
},
accountId: {
tacitly: '',
WrongText: '请选择电卡'
},
},
selectCompanyIds: [],
pageData: [],
playData: null
}
},
onLoad(e) {
if (e.data) {
this.playData = JSON.parse(decodeURIComponent(e.data));
console.log(this.playData)
this.checkChange({detail:{value:[]}})
}
this.getAccountList()
},
methods: {
checkChange(e) {
this.selectCompanyIds = e.detail.value;
if (this.selectCompanyIds.length) {
let stringJion = this.selectCompanyIds.join('');
this.playData['companyId'] = stringJion.split('&')[0];
this.playData['accountId'] = stringJion.split('&')[1]
} else {
this.playData['companyId'] = '';
this.playData['accountId'] = ''
}
},
timeup() {
uni.showToast({
title: '支付已失效',
icon: 'none'
})
},
getAccountList() {
station.getAccountList().then(res => {
this.pageData = res.data
})
},
goResult() {
let check = this.tool.checkFn(this.playData, [], this.checkPage);
if (check.result) {
play.createOrder(this.playData).then(res => {
if(res.code==20000&&res.data.id){
uni.navigateTo({
url:`/ChargingStation/pages/placeOrder/result/index?price=${this.tool.getnum(( Number(this.playData.payMoneyPreAvailable) + Number(this.playData.payMoneyPreFreeze) ),2)}&id=${res.data.id}`
})
}
})
} else {
uni.showToast({
title: check.WrongText,
icon: 'none'
})
}
// station.createOrder().then(res => {
// })
// uni.navigateTo({
// url:'/ChargingStation/pages/placeOrder/result/index'
// })
}
}
}
</script>
<style lang="scss" scoped>
@import 'index.scss';
</style>