no message
This commit is contained in:
171
unpackage/dist/dev/mp-alipay/pages/home/detail.acss
vendored
Normal file
171
unpackage/dist/dev/mp-alipay/pages/home/detail.acss
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
.orderdetail.data-v-431a10b7 {
|
||||
padding-bottom: 150rpx;
|
||||
}
|
||||
.orderdetail_header.data-v-431a10b7 {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
.orderdetail_info.data-v-431a10b7 {
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 25rpx;
|
||||
box-shadow: 0rpx -6rpx 8rpx 2rpx rgba(66, 115, 229, 0.05);
|
||||
}
|
||||
.orderdetail_info_title.data-v-431a10b7 {
|
||||
font-size: 32rpx;
|
||||
color: #232323;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.orderdetail_info_fy.data-v-431a10b7 {
|
||||
background: linear-gradient(to right, rgba(72, 121, 230, 0.4), rgba(72, 121, 230, 0));
|
||||
border-radius: 15rpx;
|
||||
padding: 40rpx 20rpx 40rpx 40rpx;
|
||||
color: #fff;
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
}
|
||||
.orderdetail_info_fy_left.data-v-431a10b7 {
|
||||
font-size: 32rpx;
|
||||
font-weight: 800;
|
||||
font-style: italic;
|
||||
color: #4879e6;
|
||||
}
|
||||
.orderdetail_info_fy_right.data-v-431a10b7 {
|
||||
font-size: 36rpx;
|
||||
font-weight: 800;
|
||||
color: #4879e6;
|
||||
margin-left: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
}
|
||||
.orderdetail_info_zd.data-v-431a10b7 {
|
||||
border-radius: 15rpx;
|
||||
padding: 40rpx 20rpx 40rpx 130rpx;
|
||||
background-color: #4879e6;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.orderdetail_info_zd_zdbg.data-v-431a10b7 {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 100%);
|
||||
}
|
||||
.orderdetail_info_view.data-v-431a10b7 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.orderdetail_info_view_left.data-v-431a10b7 {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.orderdetail_info_view_right.data-v-431a10b7 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.orderdetail_info_view_right image.data-v-431a10b7 {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.orderdetail_info_xian.data-v-431a10b7 {
|
||||
width: 100%;
|
||||
border: 2rpx solid #707070;
|
||||
margin-bottom: 30rpx;
|
||||
opacity: 0.06;
|
||||
}
|
||||
.orderdetail_btn.data-v-431a10b7 {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.orderdetail_btn view.data-v-431a10b7 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
width: 330rpx;
|
||||
height: 92rpx;
|
||||
border-radius: 46rpx 46rpx 46rpx 46rpx;
|
||||
}
|
||||
.orderdetail_btn_left.data-v-431a10b7 {
|
||||
background-color: #e5eaf4;
|
||||
color: #4879e6;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.orderdetail_btn_left text.data-v-431a10b7 {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.orderdetail_btn_right.data-v-431a10b7 {
|
||||
background: #4879e6;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.orderdetail .gun.data-v-431a10b7 {
|
||||
height: 600rpx;
|
||||
}
|
||||
.orderdetail .gun_list.data-v-431a10b7 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.orderdetail .gun_list_left.data-v-431a10b7 {
|
||||
flex: 1;
|
||||
}
|
||||
.orderdetail .gun_list_left_view.data-v-431a10b7 {
|
||||
font-size: 24rpx;
|
||||
color: #b0b2b6;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
}
|
||||
.orderdetail .gun_list_left_view1.data-v-431a10b7 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.orderdetail.data-v-431a10b7 .u-popup__content__close--top-right {
|
||||
top: 10rpx;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/pages/home/detail.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/pages/home/detail.axml
vendored
Normal file
File diff suppressed because one or more lines are too long
279
unpackage/dist/dev/mp-alipay/pages/home/detail.js
vendored
Normal file
279
unpackage/dist/dev/mp-alipay/pages/home/detail.js
vendored
Normal file
@@ -0,0 +1,279 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
const utils_fun = require("../../utils/fun.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
|
||||
const _easycom_orderList2 = common_vendor.resolveComponent("orderList");
|
||||
const _easycom_up_tag2 = common_vendor.resolveComponent("up-tag");
|
||||
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup");
|
||||
(_easycom_up_icon2 + _easycom_up_swiper2 + _easycom_orderList2 + _easycom_up_tag2 + _easycom_up_button2 + _easycom_z_paging2 + _easycom_up_popup2)();
|
||||
}
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
|
||||
const _easycom_orderList = () => "../../components/orderList/orderList.js";
|
||||
const _easycom_up_tag = () => "../../uni_modules/uview-plus/components/u-tag/u-tag.js";
|
||||
const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
const _easycom_up_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_icon + _easycom_up_swiper + _easycom_orderList + _easycom_up_tag + _easycom_up_button + _easycom_z_paging + _easycom_up_popup)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "detail",
|
||||
setup(__props) {
|
||||
const { nav, navTo } = hooks_useNav.useNav();
|
||||
const headerBg = common_vendor.ref(false);
|
||||
const statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
||||
let info = common_vendor.reactive({});
|
||||
let show = common_vendor.ref(false);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const paging = common_vendor.ref(null);
|
||||
let showJf = common_vendor.ref(false);
|
||||
const fullCost = common_vendor.computed(() => {
|
||||
var _a;
|
||||
let data = (_a = info == null ? void 0 : info.priceList) == null ? void 0 : _a.find((val) => val.isCurrent == 1);
|
||||
return data || {};
|
||||
});
|
||||
common_vendor.onLoad((options) => {
|
||||
getInfo(options.id, options.distance);
|
||||
});
|
||||
common_vendor.onPageScroll((e) => {
|
||||
if (e.scrollTop > common_vendor.index.getSystemInfoSync().statusBarHeight + 44) {
|
||||
headerBg.value = true;
|
||||
} else {
|
||||
headerBg.value = false;
|
||||
}
|
||||
});
|
||||
const getInfo = async (e, distance) => {
|
||||
let _res = await api_api.infoAroundApi({ id: e });
|
||||
_res.distance = distance;
|
||||
Object.assign(info, _res);
|
||||
};
|
||||
common_vendor.ref(["https://cdn.uviewui.com/uview/swiper/swiper3.png", "https://cdn.uviewui.com/uview/swiper/swiper2.png", "https://cdn.uviewui.com/uview/swiper/swiper1.png"]);
|
||||
let toRecharge = () => {
|
||||
common_vendor.index.scanCode({
|
||||
success: function(res) {
|
||||
let query = utils_fun.urlQuery(res.result);
|
||||
if (!query.num) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请扫描正确的设备码",
|
||||
icon: "none"
|
||||
});
|
||||
} else {
|
||||
navTo(`/pages/home/star?id=${query.num}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const back = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
const queryList = async () => {
|
||||
api_api.listByStationId({ stationId: info.id }).then((res) => {
|
||||
paging.value.complete(res);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
const showZd = () => {
|
||||
show.value = true;
|
||||
paging.value.reload();
|
||||
};
|
||||
const startCd = async (e) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "./star?id=" + e.deviceGunNo
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: statusBarHeight,
|
||||
b: common_vendor.o(back),
|
||||
c: common_vendor.p({
|
||||
name: "arrow-left",
|
||||
bold: true,
|
||||
color: "#000"
|
||||
}),
|
||||
d: common_vendor.o(back),
|
||||
e: headerBg.value ? 1 : 0,
|
||||
f: common_vendor.o(() => {
|
||||
}),
|
||||
g: headerBg.value ? "#FFF" : "",
|
||||
h: common_vendor.p({
|
||||
list: common_vendor.unref(info).pictures,
|
||||
height: "530rpx"
|
||||
}),
|
||||
i: common_vendor.p({
|
||||
info: {
|
||||
...common_vendor.unref(info),
|
||||
priceAmount: fullCost.value.totalAmount
|
||||
},
|
||||
type: "info"
|
||||
}),
|
||||
j: common_vendor.p({
|
||||
color: "#333",
|
||||
size: "28rpx",
|
||||
name: "arrow-right"
|
||||
}),
|
||||
k: common_vendor.o(($event) => common_vendor.isRef(showJf) ? showJf.value = true : showJf = true),
|
||||
l: common_vendor.p({
|
||||
size: "mini",
|
||||
text: `当前计费时间段:${fullCost.value.startTime}-${fullCost.value.endTime}`,
|
||||
plain: true,
|
||||
plainFill: true
|
||||
}),
|
||||
m: common_vendor.t(fullCost.value.totalAmount),
|
||||
n: common_assets._imports_0$4,
|
||||
o: common_vendor.t(common_vendor.unref(info).gunCount - common_vendor.unref(info).gunUseCount),
|
||||
p: common_vendor.t(common_vendor.unref(info).gunCount),
|
||||
q: common_vendor.p({
|
||||
color: "#fff",
|
||||
size: "28rpx",
|
||||
name: "arrow-right"
|
||||
}),
|
||||
r: common_vendor.o(showZd),
|
||||
s: common_vendor.t(common_vendor.unref(info).merchantName),
|
||||
t: common_assets._imports_1$2,
|
||||
v: common_vendor.o(($event) => common_vendor.unref(utils_fun.lookImg)([common_vendor.unref(info).licenseImage])),
|
||||
w: common_vendor.t(common_vendor.unref(info).busineHours),
|
||||
x: common_vendor.o(($event) => common_vendor.unref(utils_fun.lookImg)([common_vendor.unref(info).licenseImage])),
|
||||
y: common_vendor.t(common_vendor.unref(info).invoice),
|
||||
z: common_vendor.t(common_vendor.unref(info).remarks || ""),
|
||||
A: common_vendor.t(common_vendor.unref(info).stationTel),
|
||||
B: common_vendor.o(($event) => common_vendor.unref(utils_fun.call)(common_vendor.unref(info).stationTel)),
|
||||
C: common_vendor.t(fullCost.value.totalAmount),
|
||||
D: common_vendor.o((...args) => common_vendor.unref(toRecharge) && common_vendor.unref(toRecharge)(...args)),
|
||||
E: common_assets._imports_0$4,
|
||||
F: common_vendor.t(common_vendor.unref(info).gunCount - common_vendor.unref(info).gunUseCount),
|
||||
G: common_vendor.t(common_vendor.unref(info).gunCount),
|
||||
H: common_vendor.o(($event) => common_vendor.isRef(show) ? show.value = true : show = true),
|
||||
I: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.realtimeStatus == 1
|
||||
}, item.realtimeStatus == 1 ? {
|
||||
b: "431a10b7-8-" + i0 + ",431a10b7-7",
|
||||
c: common_vendor.p({
|
||||
size: "mini",
|
||||
type: "error",
|
||||
text: "故障",
|
||||
plain: true,
|
||||
plainFill: true
|
||||
})
|
||||
} : item.realtimeStatus == 2 ? {
|
||||
e: "431a10b7-9-" + i0 + ",431a10b7-7",
|
||||
f: common_vendor.p({
|
||||
size: "mini",
|
||||
type: "success",
|
||||
text: "空闲",
|
||||
plain: true,
|
||||
plainFill: true
|
||||
})
|
||||
} : item.realtimeStatus == 3 ? {
|
||||
h: "431a10b7-10-" + i0 + ",431a10b7-7",
|
||||
i: common_vendor.p({
|
||||
size: "mini",
|
||||
type: "warning",
|
||||
text: "充电中",
|
||||
plain: true,
|
||||
plainFill: true
|
||||
})
|
||||
} : {
|
||||
j: "431a10b7-11-" + i0 + ",431a10b7-7",
|
||||
k: common_vendor.p({
|
||||
size: "mini",
|
||||
type: "error",
|
||||
text: "离线",
|
||||
plain: true,
|
||||
plainFill: true
|
||||
})
|
||||
}, {
|
||||
d: item.realtimeStatus == 2,
|
||||
g: item.realtimeStatus == 3,
|
||||
l: item.insertStatus == 1
|
||||
}, item.insertStatus == 1 ? {
|
||||
m: "431a10b7-12-" + i0 + ",431a10b7-7",
|
||||
n: common_vendor.p({
|
||||
size: "mini",
|
||||
text: "已插枪",
|
||||
plain: true,
|
||||
plainFill: true
|
||||
})
|
||||
} : {}, {
|
||||
o: common_vendor.t(item.gunName),
|
||||
p: common_vendor.t(item.deviceNo),
|
||||
q: common_vendor.t(item.maxPower),
|
||||
r: common_vendor.t(item.maxVoltage),
|
||||
s: item.realtimeStatus == 2
|
||||
}, item.realtimeStatus == 2 ? {
|
||||
t: common_vendor.o(($event) => startCd(item)),
|
||||
v: "431a10b7-13-" + i0 + ",431a10b7-7",
|
||||
w: common_vendor.p({
|
||||
shape: "circle",
|
||||
type: "success",
|
||||
plain: true,
|
||||
text: "启动充电"
|
||||
})
|
||||
} : {}, {
|
||||
x: item.realtimeStatus == 1 || item.realtimeStatus == 0
|
||||
}, item.realtimeStatus == 1 || item.realtimeStatus == 0 ? {
|
||||
y: "431a10b7-14-" + i0 + ",431a10b7-7",
|
||||
z: common_vendor.p({
|
||||
shape: "circle",
|
||||
type: "error",
|
||||
plain: true,
|
||||
text: "报故障",
|
||||
openType: "contact"
|
||||
})
|
||||
} : {}, {
|
||||
A: index
|
||||
});
|
||||
}),
|
||||
J: () => ({
|
||||
r: paging,
|
||||
k: "paging"
|
||||
}),
|
||||
K: common_vendor.o(queryList),
|
||||
L: common_vendor.o(($event) => dataList.value = $event),
|
||||
M: common_vendor.p({
|
||||
fixed: false,
|
||||
height: "600rpx;",
|
||||
auto: false,
|
||||
["show-refresher-when-reload"]: true,
|
||||
modelValue: dataList.value
|
||||
}),
|
||||
N: common_vendor.o(($event) => common_vendor.isRef(show) ? show.value = false : show = false),
|
||||
O: common_vendor.p({
|
||||
show: common_vendor.unref(show),
|
||||
closeable: true,
|
||||
round: "10"
|
||||
}),
|
||||
P: common_vendor.f(common_vendor.unref(info).priceList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.isCurrent == 1
|
||||
}, item.isCurrent == 1 ? {} : {}, {
|
||||
b: common_vendor.t(item.startTime),
|
||||
c: common_vendor.t(item.endTime),
|
||||
d: common_vendor.t(item.electricityRate),
|
||||
e: common_vendor.t(item.serviceFeeRate),
|
||||
f: common_vendor.t(item.totalAmount),
|
||||
g: index
|
||||
});
|
||||
}),
|
||||
Q: common_vendor.o(($event) => common_vendor.isRef(showJf) ? showJf.value = false : showJf = false),
|
||||
R: common_vendor.p({
|
||||
show: common_vendor.unref(showJf),
|
||||
closeable: true,
|
||||
round: "10"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-431a10b7"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
my.createPage(MiniProgramPage);
|
||||
14
unpackage/dist/dev/mp-alipay/pages/home/detail.json
vendored
Normal file
14
unpackage/dist/dev/mp-alipay/pages/home/detail.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"defaultTitle": "电站详情",
|
||||
"transparentTitle": "always",
|
||||
"titlePenetrate": "YES",
|
||||
"usingComponents": {
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
|
||||
"order-list": "../../components/orderList/orderList",
|
||||
"up-tag": "../../uni_modules/uview-plus/components/u-tag/u-tag",
|
||||
"up-button": "../../uni_modules/uview-plus/components/u-button/u-button",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging",
|
||||
"up-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
80
unpackage/dist/dev/mp-alipay/pages/home/home.acss
vendored
Normal file
80
unpackage/dist/dev/mp-alipay/pages/home/home.acss
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
page {
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
|
||||
}
|
||||
|
||||
.search_header.data-v-07e72d3c {
|
||||
position: relative;
|
||||
}
|
||||
.search_header_blur.data-v-07e72d3c {
|
||||
width: 100%;
|
||||
height: 185rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #dbe6ff;
|
||||
opacity: 0.8;
|
||||
filter: blur(50px);
|
||||
z-index: 0;
|
||||
}
|
||||
.search_header_grid.data-v-07e72d3c {
|
||||
margin: 35rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.search_header_grid_view.data-v-07e72d3c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 126rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.search_header_grid_view image.data-v-07e72d3c {
|
||||
width: 99rpx;
|
||||
height: 99rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.order_list.data-v-07e72d3c {
|
||||
width: 750rpx;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
|
||||
box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(88, 140, 255, 0.1);
|
||||
border-radius: 44rpx 44rpx 0rpx 0rpx;
|
||||
}
|
||||
.order_list_header.data-v-07e72d3c {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #232323;
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 360rpx;
|
||||
left: 0;
|
||||
}
|
||||
.order_list_header_view.data-v-07e72d3c {
|
||||
position: relative;
|
||||
margin-right: 50rpx;
|
||||
}
|
||||
.order_list_header_view view.data-v-07e72d3c {
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
.order_list_header_view_dian.data-v-07e72d3c {
|
||||
position: absolute !important;
|
||||
bottom: 0rpx;
|
||||
right: 20rpx;
|
||||
width: 66rpx;
|
||||
height: 20rpx;
|
||||
background-color: #4879e6;
|
||||
border-radius: 10rpx;
|
||||
z-index: 1 !important;
|
||||
}
|
||||
button.data-v-07e72d3c::after {
|
||||
all: unset;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/pages/home/home.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/pages/home/home.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="data-v-07e72d3c"><view class="search_header p30 data-v-07e72d3c"><view class="data-v-07e72d3c" style="width:100%"><view class="search_header_blur data-v-07e72d3c"></view><search class="data-v-07e72d3c" onSearch="{{a}}" u-i="07e72d3c-0" onVI="__l"/></view><view class="data-v-07e72d3c" style="margin:30rpx 0 0"><up-swiper class="data-v-07e72d3c" u-i="07e72d3c-1" onVI="__l" u-p="{{b}}"></up-swiper></view><view class="search_header_grid data-v-07e72d3c" style="position:sticky;top:0;left:0"><view class="search_header_grid_view data-v-07e72d3c" onTap="{{d}}"><image class="data-v-07e72d3c" src="{{c}}"></image><view class="data-v-07e72d3c">我的订单</view></view><view class="search_header_grid_view data-v-07e72d3c" onTap="{{f}}"><image class="data-v-07e72d3c" src="{{e}}"></image><view class="data-v-07e72d3c">卡卷中心</view></view><view class="search_header_grid_view data-v-07e72d3c" onTap="{{h}}"><image class="data-v-07e72d3c" src="{{g}}"></image><view class="data-v-07e72d3c">我要开票</view></view><button class="data-v-07e72d3c" style="all:unset" open-type="contact"><view class="search_header_grid_view data-v-07e72d3c"><image class="data-v-07e72d3c" src="{{i}}"></image><view class="data-v-07e72d3c">在线客服</view></view></button></view></view><z-paging class="data-v-07e72d3c" u-s="{{['d']}}" ref="__r" u-r="{{o}}" onQuery="{{p}}" u-i="07e72d3c-2" onVI="__l" onUpdateModelValue="{{q}}" u-p="{{r}}"><view class="order_list data-v-07e72d3c" style="position:sticky;top:0;left:0"><view class="order_list_header p30 data-v-07e72d3c"><view class="order_list_header_view data-v-07e72d3c" onTap="{{k}}"><view class="data-v-07e72d3c">距我最近</view><view a:if="{{j}}" class="order_list_header_view_dian data-v-07e72d3c"></view></view><view class="order_list_header_view data-v-07e72d3c" onTap="{{m}}"><view class="data-v-07e72d3c">空闲最多</view><view a:if="{{l}}" class="order_list_header_view_dian data-v-07e72d3c"></view></view></view></view><view a:for="{{n}}" a:for-item="item" a:key="c" class="data-v-07e72d3c" style="padding:0 30rpx;margin:30rpx 0"><order-list class="data-v-07e72d3c" u-i="{{item.a}}" onVI="__l" u-p="{{item.b}}"></order-list></view></z-paging><view class="data-v-07e72d3c" style="height:180rpx"></view><tabbar class="data-v-07e72d3c" u-i="07e72d3c-4" onVI="__l" u-p="{{s}}"></tabbar></view>
|
||||
160
unpackage/dist/dev/mp-alipay/pages/home/home.js
vendored
Normal file
160
unpackage/dist/dev/mp-alipay/pages/home/home.js
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
if (!Array) {
|
||||
const _easycom_search2 = common_vendor.resolveComponent("search");
|
||||
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
|
||||
const _easycom_orderList2 = common_vendor.resolveComponent("orderList");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
const _easycom_tabbar2 = common_vendor.resolveComponent("tabbar");
|
||||
(_easycom_search2 + _easycom_up_swiper2 + _easycom_orderList2 + _easycom_z_paging2 + _easycom_tabbar2)();
|
||||
}
|
||||
const _easycom_search = () => "../../components/search/search.js";
|
||||
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
|
||||
const _easycom_orderList = () => "../../components/orderList/orderList.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
const _easycom_tabbar = () => "../../components/tabbar/tabbar.js";
|
||||
if (!Math) {
|
||||
(_easycom_search + _easycom_up_swiper + _easycom_orderList + _easycom_z_paging + _easycom_tabbar)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "home",
|
||||
setup(__props) {
|
||||
const { nav, navTo } = hooks_useNav.useNav();
|
||||
const dataList = common_vendor.ref([]);
|
||||
const paging = common_vendor.ref(null);
|
||||
const query = common_vendor.reactive({
|
||||
lon: "",
|
||||
lat: "",
|
||||
orderByType: 1,
|
||||
//1-最近;2-空闲较多
|
||||
keyWord: ""
|
||||
});
|
||||
const list1 = common_vendor.ref([]);
|
||||
common_vendor.onLoad(async () => {
|
||||
let _res = await api_api.bannerList();
|
||||
list1.value = _res;
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.hideTabBar();
|
||||
});
|
||||
const queryList = async () => {
|
||||
common_vendor.index.showLoading({
|
||||
title: "加载中..."
|
||||
});
|
||||
try {
|
||||
if (!query.lon && !query.lat) {
|
||||
const { longitude: lon, latitude: lat } = await common_vendor.index.getLocation();
|
||||
query.lon = lon;
|
||||
query.lat = lat;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
console.log(query);
|
||||
api_api.aroundAreaApi(query).then((res) => {
|
||||
console.log(res, "list");
|
||||
paging.value.complete(res);
|
||||
common_vendor.index.hideLoading();
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
common_vendor.index.hideLoading();
|
||||
});
|
||||
};
|
||||
let tabChange = (e) => {
|
||||
query.orderByType = e;
|
||||
paging.value.reload();
|
||||
};
|
||||
let isPagingRefNotFound = () => {
|
||||
return !paging.value;
|
||||
};
|
||||
common_vendor.onPullDownRefresh(() => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.reload().catch(() => {
|
||||
});
|
||||
});
|
||||
common_vendor.onPageScroll((e) => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.updatePageScrollTop(e.scrollTop);
|
||||
e.scrollTop < 10 && paging.value.doChatRecordLoadMore();
|
||||
});
|
||||
common_vendor.onReachBottom(() => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.pageReachBottom();
|
||||
});
|
||||
const toOrder = () => {
|
||||
common_vendor.index.switchTab({
|
||||
url: "/pages/order/order"
|
||||
});
|
||||
};
|
||||
let searchChange = (e) => {
|
||||
query.keyWord = e;
|
||||
paging.value.reload();
|
||||
};
|
||||
let showMode = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "提示",
|
||||
content: "暂未开放",
|
||||
showCancel: false,
|
||||
confirmText: "确认",
|
||||
success: () => {
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o(common_vendor.unref(searchChange)),
|
||||
b: common_vendor.p({
|
||||
list: list1.value,
|
||||
height: "150rpx",
|
||||
keyName: "imageUrl",
|
||||
indicator: true
|
||||
}),
|
||||
c: common_assets._imports_0,
|
||||
d: common_vendor.o(toOrder),
|
||||
e: common_assets._imports_1,
|
||||
f: common_vendor.o((...args) => common_vendor.unref(showMode) && common_vendor.unref(showMode)(...args)),
|
||||
g: common_assets._imports_2,
|
||||
h: common_vendor.o(($event) => common_vendor.unref(navTo)("/pageMake/invoice/invoice")),
|
||||
i: common_assets._imports_3,
|
||||
j: query.orderByType == 1
|
||||
}, query.orderByType == 1 ? {} : {}, {
|
||||
k: common_vendor.o(($event) => common_vendor.unref(tabChange)(1)),
|
||||
l: query.orderByType == 2
|
||||
}, query.orderByType == 2 ? {} : {}, {
|
||||
m: common_vendor.o(($event) => common_vendor.unref(tabChange)(2)),
|
||||
n: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
return {
|
||||
a: "07e72d3c-3-" + i0 + ",07e72d3c-2",
|
||||
b: common_vendor.p({
|
||||
toNav: true,
|
||||
info: item
|
||||
}),
|
||||
c: index
|
||||
};
|
||||
}),
|
||||
o: () => ({
|
||||
r: paging,
|
||||
k: "paging"
|
||||
}),
|
||||
p: common_vendor.o(queryList),
|
||||
q: common_vendor.o(($event) => dataList.value = $event),
|
||||
r: common_vendor.p({
|
||||
["use-page-scroll"]: true,
|
||||
modelValue: dataList.value
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
path: "/pages/home/home"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-07e72d3c"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
my.createPage(MiniProgramPage);
|
||||
13
unpackage/dist/dev/mp-alipay/pages/home/home.json
vendored
Normal file
13
unpackage/dist/dev/mp-alipay/pages/home/home.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"defaultTitle": "",
|
||||
"pullRefresh": false,
|
||||
"transparentTitle": "always",
|
||||
"titlePenetrate": "YES",
|
||||
"usingComponents": {
|
||||
"search": "../../components/search/search",
|
||||
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
|
||||
"order-list": "../../components/orderList/orderList",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging",
|
||||
"tabbar": "../../components/tabbar/tabbar"
|
||||
}
|
||||
}
|
||||
110
unpackage/dist/dev/mp-alipay/pages/home/star.acss
vendored
Normal file
110
unpackage/dist/dev/mp-alipay/pages/home/star.acss
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
.star_pile {
|
||||
width: 100%;
|
||||
box-shadow: 0rpx -6rpx 8rpx 2rpx rgba(66, 115, 229, 0.05);
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.orderdetail_info {
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 25rpx;
|
||||
box-shadow: 0rpx -6rpx 8rpx 2rpx rgba(66, 115, 229, 0.05);
|
||||
}
|
||||
.orderdetail_info_title {
|
||||
font-size: 32rpx;
|
||||
color: #232323;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.orderdetail_info_fy {
|
||||
background: linear-gradient(to right, rgba(72, 121, 230, 0.4), rgba(72, 121, 230, 0));
|
||||
border-radius: 15rpx;
|
||||
padding: 40rpx 20rpx 40rpx 40rpx;
|
||||
color: #fff;
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
}
|
||||
.orderdetail_info_fy_left {
|
||||
font-size: 32rpx;
|
||||
font-weight: 800;
|
||||
font-style: italic;
|
||||
color: #4879e6;
|
||||
}
|
||||
.orderdetail_info_fy_right {
|
||||
font-size: 36rpx;
|
||||
font-weight: 800;
|
||||
color: #4879e6;
|
||||
margin-left: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
}
|
||||
.orderdetail_info_yf {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.orderdetail_info_yf_left view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
}
|
||||
.orderdetail_info_yf_left_tit {
|
||||
font-size: 28rpx;
|
||||
color: rgba(51, 51, 51, 0.8);
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.orderdetail_info_yf_left_mon {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.orderdetail_info_yf_right {
|
||||
padding: 15rpx 30rpx;
|
||||
color: #1779ff;
|
||||
border: 1rpx solid #1779ff;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
.orderdetail_btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.orderdetail_btn_left {
|
||||
color: #333;
|
||||
font-size: 38rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.orderdetail_btn_left text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.orderdetail_btn_right {
|
||||
background: #1779ff;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.wallet_list {
|
||||
border-radius: 15rpx;
|
||||
background-color: #4879e6;
|
||||
padding: 20rpx 50rpx 20rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/pages/home/star.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/pages/home/star.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="p30"><view class="orderdetail_info" style="margin-bottom:30rpx"><view class="orderdetail_info_title"><view>{{a}}</view></view><view style="font-size:26rpx;margin-bottom:15rpx;display:flex;align-items:center"><view style="opacity:0.7">枪号:{{b}}</view><image style="width:40rpx;height:40rpx;margin-left:15rpx" src="{{c}}" onTap="{{d}}" mode="widthFix"></image></view><view style="font-size:26rpx;margin-bottom:15rpx;opacity:0.7">停车收费说明:{{e}}</view><view style="font-size:26rpx;opacity:0.7">占用收费说明:{{f}}</view></view><view class="orderdetail_info" style="margin-bottom:30rpx"><view class="orderdetail_info_title"><view>费用信息</view></view><view style="max-width:420rpx"><up-tag u-i="2dd6a3c8-0" onVI="__l" u-p="{{g}}"></up-tag></view><view class="orderdetail_info_fy"><view class="orderdetail_info_fy_left">电站价格</view><view class="orderdetail_info_fy_right">{{h}} <text style="font-weight:500;font-size:24rpx;color:#333;margin-left:15rpx">元/度</text></view></view></view><view class="orderdetail_info" style="margin-bottom:30rpx"><view class="orderdetail_info_title"><view style="display:flex;align-items:center"><view>充电信息</view><view style="margin-left:15rpx"><up-tag a:if="{{i}}" u-i="2dd6a3c8-1" onVI="__l" u-p="{{j}}"></up-tag></view></view></view><view class="flex-acsb" style="font-size:30rpx;margin-bottom:30rpx" onTap="{{l}}"><view>支付方式</view><view>{{k}}</view></view><view a:if="{{m}}" class="orderdetail_info_yf"><view class="orderdetail_info_yf_left"><view class="orderdetail_info_yf_left_tit"><view style="margin-right:30rpx">预付费</view><up-tag u-i="2dd6a3c8-2" onVI="__l" u-p="{{n}}"></up-tag></view><view class="orderdetail_info_yf_left_mon">预付金额:{{o}} 元</view></view><view class="orderdetail_info_yf_right" onTap="{{p}}">预付金额</view></view><view a:if="{{q}}"><view class="flex-acsb" style="font-size:30rpx;margin-bottom:20rpx"><view>当前可用电卡</view></view><view a:for="{{r}}" a:for-item="item" a:key="h" onTap="{{item.g}}" style="margin-bottom:30rpx;position:relative" class="mt30 wallet_list"><view a:if="{{item.a}}" style="position:absolute;top:0;left:0;background-color:#e45656;border-radius:0 0 20rpx 0"><up-icon u-i="{{item.b}}" onVI="__l" u-p="{{item.c}}"></up-icon></view><view style="color:#fff"><view style="font-weight:bold;font-size:30rpx;margin-bottom:18rpx">{{item.d}}</view><view style="font-size:28rpx;color:#eee">卡号:{{item.e}}</view></view><view style="display:flex;flex-direction:column;align-items:center;color:#fff;font-weight:bold;font-size:26rpx"><view style="font-size:36rpx;margin-bottom:10rpx">{{item.f}}</view><view style="font-weight:500">余额</view></view></view></view></view><view class="orderdetail_btn p30" style="background-color:#fff"><view class="orderdetail_btn_left">{{s}} <text>元/度 免费停车</text></view><view><up-button a:if="{{t}}" u-i="2dd6a3c8-4" onVI="__l" u-p="{{v}}"></up-button><up-button a:if="{{w}}" onClick="{{x}}" u-i="2dd6a3c8-5" onVI="__l" u-p="{{y}}"></up-button><up-button a:if="{{z}}" onClick="{{A}}" u-i="2dd6a3c8-6" onVI="__l" u-p="{{B}}"></up-button></view></view><uni-popup u-s="{{['d']}}" ref="__r" u-r="{{F}}" u-i="2dd6a3c8-7" onVI="__l" u-p="{{G}}"><uni-popup-dialog ref="__r" u-r="{{C}}" onConfirm="{{D}}" u-i="2dd6a3c8-8,2dd6a3c8-7" onVI="__l" u-p="{{E}}"></uni-popup-dialog></uni-popup></view>
|
||||
300
unpackage/dist/dev/mp-alipay/pages/home/star.js
vendored
Normal file
300
unpackage/dist/dev/mp-alipay/pages/home/star.js
vendored
Normal file
@@ -0,0 +1,300 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
const store_index = require("../../store/index.js");
|
||||
const utils_fun = require("../../utils/fun.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_tag2 = common_vendor.resolveComponent("up-tag");
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
|
||||
const _easycom_uni_popup_dialog2 = common_vendor.resolveComponent("uni-popup-dialog");
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
(_easycom_up_tag2 + _easycom_up_icon2 + _easycom_up_button2 + _easycom_uni_popup_dialog2 + _easycom_uni_popup2)();
|
||||
}
|
||||
const _easycom_up_tag = () => "../../uni_modules/uview-plus/components/u-tag/u-tag.js";
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
|
||||
const _easycom_uni_popup_dialog = () => "../../uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.js";
|
||||
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_tag + _easycom_up_icon + _easycom_up_button + _easycom_uni_popup_dialog + _easycom_uni_popup)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "star",
|
||||
setup(__props) {
|
||||
const inputDialog = common_vendor.ref(null);
|
||||
let info = common_vendor.reactive({});
|
||||
let currentPrice = common_vendor.ref({});
|
||||
let id = common_vendor.ref("");
|
||||
let userCard = common_vendor.ref([]);
|
||||
let userCardId = common_vendor.ref(null);
|
||||
let payType = common_vendor.ref(null);
|
||||
let dataForm = common_vendor.reactive({
|
||||
money: 30
|
||||
});
|
||||
common_vendor.onLoad((options) => {
|
||||
if (options.q) {
|
||||
let search = decodeURIComponent(options.q);
|
||||
search = search.split("?")[1];
|
||||
const pairs = search ? search.split("&") : [];
|
||||
const query = {};
|
||||
for (let i = 0; i < pairs.length; ++i) {
|
||||
const [key, value] = pairs[i].split("=");
|
||||
query[key] = query[key] || decodeURIComponent(value);
|
||||
}
|
||||
if (query.num) {
|
||||
id.value = query.num;
|
||||
infoDate(query.num);
|
||||
}
|
||||
}
|
||||
if (options.id) {
|
||||
id.value = options.id;
|
||||
infoDate(options.id);
|
||||
}
|
||||
});
|
||||
let getUserCard = async (e) => {
|
||||
let _res = await api_api.userCardUsableList({ stationId: e });
|
||||
userCard.value = _res;
|
||||
if (_res.length == 0) {
|
||||
payType.value = 1;
|
||||
}
|
||||
};
|
||||
let infoDate = async (e) => {
|
||||
let _res = await api_api.gunInfo({ deviceNo: e });
|
||||
info = _res;
|
||||
getUserCard(_res.stationId);
|
||||
currentPrice.value = _res.currentPrice;
|
||||
console.log(_res.deviceNo, "_res.deviceNo");
|
||||
console.log(_res.gunNo, "_res.gunNo");
|
||||
store_index.store.commit("setInsertStatus", _res.insertStatus);
|
||||
common_vendor.index.sendSocketMessage({
|
||||
data: JSON.stringify({
|
||||
command: "sub",
|
||||
deviceNo: _res.deviceNo,
|
||||
gunNo: _res.gunNo
|
||||
}),
|
||||
success: (res) => {
|
||||
console.log("发送成功");
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
console.log("发送失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
let dialogInputConfirm = (e) => {
|
||||
dataForm.money = e;
|
||||
};
|
||||
let openDialog = () => {
|
||||
console.log(12345);
|
||||
inputDialog.value.open();
|
||||
};
|
||||
let toRechargeCard = async () => {
|
||||
common_vendor.index.showLoading({
|
||||
title: "启动充电中...",
|
||||
mask: true
|
||||
});
|
||||
let _res = await api_api.startChargingByCard({
|
||||
deviceNo: info.deviceNo,
|
||||
gunNo: info.gunNo,
|
||||
amount: dataForm.money,
|
||||
userCardId: userCardId.value
|
||||
});
|
||||
store_index.store.commit("setTransactionNo", _res.transactionNo);
|
||||
store_index.store.commit("setSokStatus", 0);
|
||||
timeMap(_res);
|
||||
};
|
||||
let toRecharge = async () => {
|
||||
common_vendor.index.showLoading({
|
||||
title: "启动充电中...",
|
||||
mask: true
|
||||
});
|
||||
let _res = await api_api.startChargingByWallet({
|
||||
deviceNo: info.deviceNo,
|
||||
gunNo: info.gunNo,
|
||||
amount: dataForm.money
|
||||
});
|
||||
store_index.store.commit("setTransactionNo", _res.transactionNo);
|
||||
store_index.store.commit("setSokStatus", 0);
|
||||
timeMap(_res);
|
||||
};
|
||||
const timeMap = (_res) => {
|
||||
var time = setInterval(async () => {
|
||||
if (store_index.store.state.sokStatus != 1) {
|
||||
let _data = await api_api.ordersInfo({
|
||||
transactionNo: _res.transactionNo
|
||||
});
|
||||
store_index.store.commit("setDataObj", _data);
|
||||
if (_data.status == 3) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pageOrder/recharge/recharge?transactionNo=${_res.transactionNo}&type=order`
|
||||
});
|
||||
clearTimeout(time);
|
||||
store_index.store.commit("setSokStatus", 0);
|
||||
}
|
||||
if (_data.status == -1) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showModal({
|
||||
title: "提示",
|
||||
content: "启动失败,请重试",
|
||||
showCancel: false,
|
||||
confirmText: "确认",
|
||||
success: () => {
|
||||
}
|
||||
});
|
||||
clearTimeout(time);
|
||||
store_index.store.commit("setSokStatus", 0);
|
||||
}
|
||||
if (_data.status == -2) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showModal({
|
||||
title: "提示",
|
||||
content: "启动超时,请重试",
|
||||
showCancel: false,
|
||||
confirmText: "确认",
|
||||
success: () => {
|
||||
}
|
||||
});
|
||||
clearTimeout(time);
|
||||
store_index.store.commit("setSokStatus", 0);
|
||||
}
|
||||
}
|
||||
}, 5e3);
|
||||
};
|
||||
const payTo = () => {
|
||||
let itemList = ["余额付款"];
|
||||
if (userCard.value.length != 0) {
|
||||
itemList.push("电卡支付");
|
||||
}
|
||||
common_vendor.index.showActionSheet({
|
||||
itemList,
|
||||
success: function(res) {
|
||||
payType.value = res.tapIndex + 1;
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(common_vendor.unref(info).stationName),
|
||||
b: common_vendor.t(common_vendor.unref(info).gunName),
|
||||
c: common_assets._imports_0$6,
|
||||
d: common_vendor.o(($event) => common_vendor.unref(utils_fun.copy)(common_vendor.unref(info).gunName)),
|
||||
e: common_vendor.t(common_vendor.unref(info).occupyCostInfo),
|
||||
f: common_vendor.t(common_vendor.unref(info).parkCostInfo),
|
||||
g: common_vendor.p({
|
||||
size: "mini",
|
||||
text: `当前计费时间段:${common_vendor.unref(currentPrice).startTime}-${common_vendor.unref(currentPrice).endTime}`,
|
||||
plain: true,
|
||||
plainFill: true
|
||||
}),
|
||||
h: common_vendor.t(common_vendor.unref(currentPrice).totalAmount),
|
||||
i: common_vendor.unref(store_index.store).state.insertStatus == 1
|
||||
}, common_vendor.unref(store_index.store).state.insertStatus == 1 ? {
|
||||
j: common_vendor.p({
|
||||
size: "mini",
|
||||
text: "已插枪",
|
||||
plain: true,
|
||||
plainFill: true
|
||||
})
|
||||
} : {}, {
|
||||
k: common_vendor.t(common_vendor.unref(payType) == 1 ? "余额付款" : common_vendor.unref(payType) == 2 ? "电卡支付" : "请选择"),
|
||||
l: common_vendor.o(payTo),
|
||||
m: common_vendor.unref(payType) == 1
|
||||
}, common_vendor.unref(payType) == 1 ? {
|
||||
n: common_vendor.p({
|
||||
size: "mini",
|
||||
text: `余额原路退款`,
|
||||
plain: true,
|
||||
plainFill: true
|
||||
}),
|
||||
o: common_vendor.t(common_vendor.unref(dataForm).money),
|
||||
p: common_vendor.o((...args) => common_vendor.unref(openDialog) && common_vendor.unref(openDialog)(...args))
|
||||
} : {}, {
|
||||
q: common_vendor.unref(payType) == 2
|
||||
}, common_vendor.unref(payType) == 2 ? {
|
||||
r: common_vendor.f(common_vendor.unref(userCard), (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.unref(userCardId) == item.id
|
||||
}, common_vendor.unref(userCardId) == item.id ? {
|
||||
b: "2dd6a3c8-3-" + i0,
|
||||
c: common_vendor.p({
|
||||
name: "checkbox-mark",
|
||||
color: "#fff"
|
||||
})
|
||||
} : {}, {
|
||||
d: common_vendor.t(item.name),
|
||||
e: common_vendor.t(item.cardNo),
|
||||
f: common_vendor.t(item.balance),
|
||||
g: common_vendor.o(($event) => common_vendor.isRef(userCardId) ? userCardId.value = item.id : userCardId = item.id),
|
||||
h: index
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
s: common_vendor.t(common_vendor.unref(currentPrice).totalAmount),
|
||||
t: !common_vendor.unref(payType)
|
||||
}, !common_vendor.unref(payType) ? {
|
||||
v: common_vendor.p({
|
||||
customStyle: {
|
||||
height: "80rpx",
|
||||
width: "230rpx"
|
||||
},
|
||||
disabled: true,
|
||||
color: "#4879e6",
|
||||
text: "请选择支付方式",
|
||||
shape: "circle"
|
||||
})
|
||||
} : {}, {
|
||||
w: common_vendor.unref(payType) == 1
|
||||
}, common_vendor.unref(payType) == 1 ? {
|
||||
x: common_vendor.o(common_vendor.unref(toRecharge)),
|
||||
y: common_vendor.p({
|
||||
customStyle: {
|
||||
height: "80rpx",
|
||||
width: "280rpx"
|
||||
},
|
||||
color: "#4879e6",
|
||||
shape: "circle",
|
||||
text: "余额支付,启动充电"
|
||||
})
|
||||
} : {}, {
|
||||
z: common_vendor.unref(payType) == 2
|
||||
}, common_vendor.unref(payType) == 2 ? {
|
||||
A: common_vendor.o(common_vendor.unref(toRechargeCard)),
|
||||
B: common_vendor.p({
|
||||
customStyle: {
|
||||
height: "80rpx",
|
||||
width: "280rpx"
|
||||
},
|
||||
disabled: !common_vendor.unref(userCardId),
|
||||
color: "#4879e6",
|
||||
text: common_vendor.unref(userCardId) ? "电卡支付,启动充电" : "请选择电卡",
|
||||
shape: "circle"
|
||||
})
|
||||
} : {}, {
|
||||
C: () => ({
|
||||
r: inputClose
|
||||
}),
|
||||
D: common_vendor.o(common_vendor.unref(dialogInputConfirm)),
|
||||
E: common_vendor.p({
|
||||
mode: "input",
|
||||
title: "请输入预付金额",
|
||||
value: common_vendor.unref(dataForm).money,
|
||||
placeholder: "请输入内容"
|
||||
}),
|
||||
F: () => ({
|
||||
r: inputDialog,
|
||||
k: "inputDialog"
|
||||
}),
|
||||
G: common_vendor.p({
|
||||
type: "dialog"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
my.createPage(_sfc_main);
|
||||
10
unpackage/dist/dev/mp-alipay/pages/home/star.json
vendored
Normal file
10
unpackage/dist/dev/mp-alipay/pages/home/star.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultTitle": "开始充电",
|
||||
"usingComponents": {
|
||||
"up-tag": "../../uni_modules/uview-plus/components/u-tag/u-tag",
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"up-button": "../../uni_modules/uview-plus/components/u-button/u-button",
|
||||
"uni-popup-dialog": "../../uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog",
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user