|
|
|
|
|
|
|
|
<template>
|
|
|
<template>
|
|
|
<view class="selectCar-box">
|
|
|
<view class="selectCar-box">
|
|
|
<view v-if="state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.list" :key="i">
|
|
|
|
|
|
|
|
|
<view v-if="state.list&&state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.list"
|
|
|
|
|
|
:key="i">
|
|
|
<view class="iten-left">
|
|
|
<view class="iten-left">
|
|
|
<image :src="`${$imgUrl}che.png`" mode=""></image>
|
|
|
<image :src="`${$imgUrl}che.png`" mode=""></image>
|
|
|
<text>{{item.vehiclePlate}}</text>
|
|
|
<text>{{item.vehiclePlate}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="choose-item" >
|
|
|
|
|
|
|
|
|
<view class="choose-item">
|
|
|
<view class="active" v-if="flag==i">
|
|
|
<view class="active" v-if="flag==i">
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else class="flex">
|
|
|
|
|
|
暂无车辆订单信息
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view v-else>
|
|
|
|
|
|
<empty title='暂无找到相关车辆信息' />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
<script lang="ts" setup>
|
|
|
|
|
|
import empty from "@/components/empty/empty.vue";
|
|
|
import {
|
|
|
import {
|
|
|
reactive,
|
|
|
reactive,
|
|
|
ref
|
|
|
ref
|
|
|
|
|
|
|
|
|
} from "@/utils/utils"
|
|
|
} from "@/utils/utils"
|
|
|
import {
|
|
|
import {
|
|
|
onLoad,
|
|
|
onLoad,
|
|
|
onShow
|
|
|
|
|
|
} from "@dcloudio/uni-app";
|
|
|
} from "@dcloudio/uni-app";
|
|
|
import {
|
|
|
import {
|
|
|
orderList
|
|
|
orderList
|
|
|
|
|
|
|
|
|
import {
|
|
|
import {
|
|
|
request
|
|
|
request
|
|
|
} from "@/utils/network/request.js";
|
|
|
} from "@/utils/network/request.js";
|
|
|
import {
|
|
|
|
|
|
msg
|
|
|
|
|
|
} from "@/utils/utils";
|
|
|
|
|
|
import {
|
|
|
import {
|
|
|
getItem,
|
|
|
getItem,
|
|
|
StorageKeys,
|
|
|
StorageKeys,
|
|
|
setItem
|
|
|
|
|
|
} from "@/utils/storage";
|
|
|
} from "@/utils/storage";
|
|
|
import {
|
|
|
import {
|
|
|
stringToJson
|
|
|
stringToJson
|
|
|
} from "@/utils/network/encryption";
|
|
|
} from "@/utils/network/encryption";
|
|
|
|
|
|
|
|
|
const state = reactive({
|
|
|
const state = reactive({
|
|
|
list: []
|
|
|
|
|
|
|
|
|
list: [] //车辆list
|
|
|
});
|
|
|
});
|
|
|
|
|
|
const flag = ref('0') //默认选择0
|
|
|
|
|
|
|
|
|
onLoad(() => {
|
|
|
onLoad(() => {
|
|
|
quanCheckActionTrue().then((item: any) => {
|
|
|
quanCheckActionTrue().then((item: any) => {
|
|
|
state.list = item.data
|
|
|
state.list = item.data
|
|
|
console.log(item)
|
|
|
|
|
|
})
|
|
|
})
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
const quanCheckActionTrue = () => {
|
|
|
const quanCheckActionTrue = () => {
|
|
|
var data = {
|
|
|
var data = {
|
|
|
opId: getItem(StorageKeys.OpenId),
|
|
|
opId: getItem(StorageKeys.OpenId),
|
|
|
source: 'WECHAT',
|
|
|
|
|
|
tabIndex: '0',
|
|
|
|
|
|
orderStep: '11',
|
|
|
|
|
|
isValueCard: '2'
|
|
|
|
|
|
|
|
|
source: 'WECHAT', //渠道为小程序
|
|
|
|
|
|
tabIndex: '0', //0全部
|
|
|
|
|
|
orderStep: '11', //11 为已完成”
|
|
|
};
|
|
|
};
|
|
|
const options = {
|
|
|
const options = {
|
|
|
type: 2,
|
|
|
type: 2,
|
|
|
|
|
|
|
|
|
method: "POST",
|
|
|
method: "POST",
|
|
|
showLoading: true,
|
|
|
showLoading: true,
|
|
|
};
|
|
|
};
|
|
|
|
|
|
|
|
|
return new Promise(async (resolve, reject) => {
|
|
|
return new Promise(async (resolve, reject) => {
|
|
|
const res = await request(orderList, options);
|
|
|
const res = await request(orderList, options);
|
|
|
const data = stringToJson(res.bizContent);
|
|
|
const data = stringToJson(res.bizContent);
|
|
|
|
|
|
|
|
|
reject(error);
|
|
|
reject(error);
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
const list = reactive([{
|
|
|
|
|
|
name: "A12345"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "B12345"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "C12345"
|
|
|
|
|
|
},
|
|
|
|
|
|
])
|
|
|
|
|
|
const flag = ref('0')
|
|
|
|
|
|
|
|
|
|
|
|
const choose = (i, item) => { |
|
|
|
|
|
console.log(item.cardId)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const choose = (i, item) => {
|
|
|
|
|
|
flag.value = i
|
|
|
navTo(`/pages/recharge/recharge?cardId=${item.cardId}`)
|
|
|
navTo(`/pages/recharge/recharge?cardId=${item.cardId}`)
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
</script>
|
|
|
|
|
|
|
|
|
background-color: #EEF7F7;
|
|
|
background-color: #EEF7F7;
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
</style>
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
.flex{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.flex {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
.selectCar-box {
|
|
|
.selectCar-box {
|
|
|
// width: 100%;
|
|
|
// width: 100%;
|
|
|
height: 100%;
|
|
|
height: 100%;
|