const bluetoothUtil = require("../../static/etcUtil/index.js"); | const bluetoothUtil = require("../../static/etcUtil/index.js"); | ||||
const state = reactive({ | const state = reactive({ | ||||
fee:"", | |||||
cardId: "", | cardId: "", | ||||
showPopup: false, //显示激活成功提示 | showPopup: false, //显示激活成功提示 | ||||
curDeviceId: "", //当前选中的设备ID | curDeviceId: "", //当前选中的设备ID | ||||
onLoad((option) => { | onLoad((option) => { | ||||
routeType.value = option.routeType ? option.routeType : "1"; | routeType.value = option.routeType ? option.routeType : "1"; | ||||
state.cardId = option.cardId; | state.cardId = option.cardId; | ||||
state.fee = option.fee; | |||||
}); | }); | ||||
/* | /* | ||||
}); | }); | ||||
} else if (routeType.value == "2") { | } else if (routeType.value == "2") { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/pages/recharge/recharge?connectSuccess=1&&cardId=${state.cardId}`, | |||||
url: `/pages/recharge/recharge?connectSuccess=1&&cardId=${state.cardId}&&fee=${state.fee}`, | |||||
}); | }); | ||||
}else if(routeType.value == "3"){ | }else if(routeType.value == "3"){ | ||||
}; | }; | ||||
//调用方式 | //调用方式 | ||||
// request(querySwiper, options).then((res) => { | |||||
// console.log(stringToJson(res.bizContent)); | |||||
// const data = stringToJson(res.bizContent) | |||||
// state.swiperList = data.swipers ?? [] | |||||
// }) | |||||
// .catch((err) => { | |||||
// console.log(err); | |||||
// }); | |||||
request(querySwiper, options).then((res) => { | |||||
console.log(stringToJson(res.bizContent)); | |||||
const data = stringToJson(res.bizContent) | |||||
console.log("轮播图",data) | |||||
state.swiperList = data.swipers ?? [] | |||||
}) | |||||
.catch((err) => { | |||||
console.log(err); | |||||
}); | |||||
}; | }; | ||||
<!-- 订单列表2 --> | <!-- 订单列表2 --> | ||||
<template> | <template> | ||||
<filter> | <filter> | ||||
<empty-view v-if="!data.login" mode="permission" content="请先登录再查看订单" btnTxt="立即登录" | |||||
<empty-view v-if="!data.login" mode="permission" content="请先登录再查看订单" btnTxt="立即登录" | |||||
@btnClick="$util.navTo('/login/login')"> | @btnClick="$util.navTo('/login/login')"> | ||||
</empty-view> | </empty-view> | ||||
<view class="list-wrapper" v-else> | <view class="list-wrapper" v-else> | ||||
<order-tabbar ref="tabbarRef" :tabs="data.tabsList" v-model:curIndex="data.tabIndex" | <order-tabbar ref="tabbarRef" :tabs="data.tabsList" v-model:curIndex="data.tabIndex" | ||||
v-if="data.tabsList.length > 0"></order-tabbar> | |||||
v-if="data.tabsList.length > 0" ></order-tabbar> | |||||
<order-list-item ref="mescrollItem" :index="data.tabIndex" :refresh="data.refresh"> | <order-list-item ref="mescrollItem" :index="data.tabIndex" :refresh="data.refresh"> | ||||
</order-list-item> | </order-list-item> | ||||
import orderListItem from "./components/order-list-item"; | import orderListItem from "./components/order-list-item"; | ||||
import useOrderList from "@/composables/order/useOrderList"; | import useOrderList from "@/composables/order/useOrderList"; | ||||
import filter from '@/components/filter/filter.vue'; | import filter from '@/components/filter/filter.vue'; | ||||
const { | const { | ||||
data, | data, | ||||
tabbarRef | tabbarRef |
state.cardId = option.cardId; | state.cardId = option.cardId; | ||||
state.connectSuccess = option.connectSuccess; | state.connectSuccess = option.connectSuccess; | ||||
state.orderNum = getItem("orderNum"); | state.orderNum = getItem("orderNum"); | ||||
// 金额回填,本来是好的,但是他跳转了,跳转过来就得刷新页面,所以就是默认的5000 | |||||
if(state.fee){ | |||||
state.fee=option.fee | |||||
} | |||||
//跳转过来走圈存流程 | //跳转过来走圈存流程 | ||||
if (state.connectSuccess === "1") { | if (state.connectSuccess === "1") { | ||||
/*读卡*/ | /*读卡*/ | ||||
getCardId(); | getCardId(); | ||||
} | } | ||||
quanCheckAction().then((val: any) => { | quanCheckAction().then((val: any) => { | ||||
console.log("圈层检测val",val) | |||||
//如果 圈层检测正常 | //如果 圈层检测正常 | ||||
if (val.chargeStatus === 1) { | if (val.chargeStatus === 1) { | ||||
console.log(`进行充值检测`); | console.log(`进行充值检测`); | ||||
success: () => { | success: () => { | ||||
//走蓝牙进行修复 | //走蓝牙进行修复 | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`, | |||||
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}&&fee=${state.fee}`, | |||||
}); | }); | ||||
}, | }, | ||||
fail: () => {} | fail: () => {} | ||||
return new Promise(async (resolve, reject) => { | return new Promise(async (resolve, reject) => { | ||||
const res = await request(cardCzPayResultCheck, options); | const res = await request(cardCzPayResultCheck, options); | ||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
console.log("充值检测",data) | |||||
resolve(data); | resolve(data); | ||||
}).catch((error) => { | }).catch((error) => { | ||||
reject(error); | reject(error); | ||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
if (data.tradeState === "SUCCESS") | if (data.tradeState === "SUCCESS") | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`, | |||||
url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}&&fee=${state.fee}`, | |||||
}); | }); | ||||
console.log(data); | console.log(data); |
}); | }); | ||||
}; | }; | ||||
const editAddress = (val) => { | const editAddress = (val) => { | ||||
console.log("val",val) | |||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/subpackage/applyCard/editAddress?content=` + JSON.stringify(val), | url: `/subpackage/applyCard/editAddress?content=` + JSON.stringify(val), | ||||
}); | }); | ||||
}; | }; | ||||
const addressSelected = (val: any) => { | const addressSelected = (val: any) => { | ||||
console.log("val",val) | |||||
state.data = { | state.data = { | ||||
...state.data, | ...state.data, | ||||
...val, | ...val, | ||||
}; | }; | ||||
console.log("state.data.address",state.data.address) | |||||
state.show = false; | state.show = false; | ||||
}; | }; | ||||
const nextAction = () => { | const nextAction = () => { |
<template> | |||||
111 | |||||
</template> | |||||
<script> | |||||
</script> | |||||
<style> | |||||
</style> |
type="map" | type="map" | ||||
:opts="state.opts" | :opts="state.opts" | ||||
:chartData="state.chartData" | :chartData="state.chartData" | ||||
:canvas2d="true" | |||||
canvasId="pVNxVgTQDlKlgMCPbMtJrifnZlluhrNf" | |||||
/> | /> | ||||
</view> | </view> | ||||
<view class="describe"> | <view class="describe"> | ||||
import {stringToJson} from "@/utils/network/encryption.js"; | import {stringToJson} from "@/utils/network/encryption.js"; | ||||
import { onLoad} from "@dcloudio/uni-app"; | import { onLoad} from "@dcloudio/uni-app"; | ||||
import mapChina from "@/datas/mapChina.json"; | import mapChina from "@/datas/mapChina.json"; | ||||
import qiun from "@/subpackage/service/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue"; | |||||
import qiun from "../../service/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue"; | |||||
const state = reactive({ | const state = reactive({ | ||||
chartData: {}, | chartData: {}, | ||||
opts: { | opts: { |