no message
This commit is contained in:
280
unpackage/dist/dev/mp-weixin/pages/home/detail.js
vendored
Normal file
280
unpackage/dist/dev/mp-weixin/pages/home/detail.js
vendored
Normal file
@@ -0,0 +1,280 @@
|
||||
"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$3,
|
||||
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), index),
|
||||
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: common_vendor.sr(paging, "431a10b7-7,431a10b7-6", {
|
||||
"k": "paging"
|
||||
}),
|
||||
K: common_vendor.o(queryList),
|
||||
L: common_vendor.o(($event) => dataList.value = $event),
|
||||
M: common_vendor.p({
|
||||
fixed: false,
|
||||
["loading-more-enabled"]: 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;
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/detail.js.map
|
||||
13
unpackage/dist/dev/mp-weixin/pages/home/detail.json
vendored
Normal file
13
unpackage/dist/dev/mp-weixin/pages/home/detail.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"navigationBarTitleText": "电站详情",
|
||||
"navigationStyle": "custom",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/home/detail.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/home/detail.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
171
unpackage/dist/dev/mp-weixin/pages/home/detail.wxss
vendored
Normal file
171
unpackage/dist/dev/mp-weixin/pages/home/detail.wxss
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;
|
||||
}
|
||||
165
unpackage/dist/dev/mp-weixin/pages/home/home.js
vendored
Normal file
165
unpackage/dist/dev/mp-weixin/pages/home/home.js
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
"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_cc_myTabbar2 = common_vendor.resolveComponent("cc-myTabbar");
|
||||
(_easycom_search2 + _easycom_up_swiper2 + _easycom_orderList2 + _easycom_z_paging2 + _easycom_cc_myTabbar2)();
|
||||
}
|
||||
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_cc_myTabbar = () => "../../uni_modules/cc-myTabbar/components/cc-myTabbar/cc-myTabbar.js";
|
||||
if (!Math) {
|
||||
(_easycom_search + _easycom_up_swiper + _easycom_orderList + _easycom_z_paging + _easycom_cc_myTabbar)();
|
||||
}
|
||||
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();
|
||||
});
|
||||
let toKft = (e) => {
|
||||
common_vendor.index.makePhoneCall({
|
||||
phoneNumber: "4008005326"
|
||||
//仅为示例
|
||||
});
|
||||
};
|
||||
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) {
|
||||
common_vendor.index.__f__("log", "at pages/home/home.vue:116", err);
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/home/home.vue:118", query);
|
||||
api_api.aroundAreaApi(query).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/home/home.vue:121", 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 {
|
||||
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: common_vendor.o((...args) => common_vendor.unref(toKft) && common_vendor.unref(toKft)(...args)),
|
||||
k: common_vendor.n(query.orderByType == 1 ? "order_list_active" : ""),
|
||||
l: common_vendor.o(($event) => common_vendor.unref(tabChange)(1)),
|
||||
m: common_vendor.n(query.orderByType == 2 ? "order_list_active" : ""),
|
||||
n: common_vendor.o(($event) => common_vendor.unref(tabChange)(2)),
|
||||
o: 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
|
||||
};
|
||||
}),
|
||||
p: common_vendor.sr(paging, "07e72d3c-2", {
|
||||
"k": "paging"
|
||||
}),
|
||||
q: common_vendor.o(queryList),
|
||||
r: common_vendor.o(($event) => dataList.value = $event),
|
||||
s: common_vendor.p({
|
||||
["use-page-scroll"]: true,
|
||||
modelValue: dataList.value
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
tabBarShow: 0
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-07e72d3c"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/home.js.map
|
||||
12
unpackage/dist/dev/mp-weixin/pages/home/home.json
vendored
Normal file
12
unpackage/dist/dev/mp-weixin/pages/home/home.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"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",
|
||||
"cc-my-tabbar": "../../uni_modules/cc-myTabbar/components/cc-myTabbar/cc-myTabbar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/home/home.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/home/home.wxml
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" bindsearch="{{a}}" u-i="07e72d3c-0" bind:__l="__l"/></view><view class="data-v-07e72d3c" style="margin:30rpx 0 0"><up-swiper wx:if="{{b}}" class="data-v-07e72d3c" u-i="07e72d3c-1" bind:__l="__l" u-p="{{b}}"></up-swiper></view><view class="search_header_grid data-v-07e72d3c" style="position:sticky;top:0;left:0;background-color:#ffffff;padding:15rpx"><view class="search_header_grid_view data-v-07e72d3c" bindtap="{{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" bindtap="{{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" bindtap="{{h}}"><image class="data-v-07e72d3c" src="{{g}}"></image><view class="data-v-07e72d3c">我要开票</view></view><button class="data-v-07e72d3c" style="all:unset" bindtap="{{j}}"><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 wx:if="{{s}}" class="r data-v-07e72d3c" u-s="{{['d']}}" u-r="paging" bindquery="{{q}}" u-i="07e72d3c-2" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"><view class="data-v-07e72d3c" style="height:35rpx"></view><view class="order_list data-v-07e72d3c"><view class="{{[k, 'order_list_view', 'data-v-07e72d3c']}}" bindtap="{{l}}">距我最近</view><view class="{{[m, 'order_list_view', 'data-v-07e72d3c']}}" bindtap="{{n}}">空闲最多</view></view><view wx:for="{{o}}" wx:for-item="item" wx:key="c" class="data-v-07e72d3c" style="margin-bottom:30rpx;padding:0 30rpx"><order-list wx:if="{{item.b}}" class="data-v-07e72d3c" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></order-list></view></z-paging><view class="data-v-07e72d3c" style="height:180rpx"></view><cc-my-tabbar wx:if="{{t}}" class="data-v-07e72d3c" u-i="07e72d3c-4" bind:__l="__l" u-p="{{t}}"></cc-my-tabbar></view>
|
||||
64
unpackage/dist/dev/mp-weixin/pages/home/home.wxss
vendored
Normal file
64
unpackage/dist/dev/mp-weixin/pages/home/home.wxss
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
|
||||
page {
|
||||
/* background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%); */
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.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: -1;
|
||||
}
|
||||
.search_header_grid.data-v-07e72d3c {
|
||||
margin-top: 25rpx;
|
||||
border-radius: 15rpx;
|
||||
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 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 15rpx;
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 30rpx;
|
||||
background-color: #fff;
|
||||
width: 690rpx;
|
||||
margin: 0 30rpx 30rpx;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
.order_list_view.data-v-07e72d3c {
|
||||
padding: 15rpx 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 15rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.order_list_active.data-v-07e72d3c {
|
||||
background-color: #4879e6;
|
||||
color: #fff;
|
||||
}
|
||||
button.data-v-07e72d3c::after {
|
||||
all: unset;
|
||||
}
|
||||
386
unpackage/dist/dev/mp-weixin/pages/home/star.js
vendored
Normal file
386
unpackage/dist/dev/mp-weixin/pages/home/star.js
vendored
Normal file
@@ -0,0 +1,386 @@
|
||||
"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");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_tag2 = common_vendor.resolveComponent("up-tag");
|
||||
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
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_button2 + _easycom_up_icon2 + _easycom_uni_popup_dialog2 + _easycom_uni_popup2)();
|
||||
}
|
||||
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_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.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_button + _easycom_up_icon + _easycom_uni_popup_dialog + _easycom_uni_popup)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "star",
|
||||
setup(__props) {
|
||||
const { navTo } = hooks_useNav.useNav();
|
||||
const inputDialog = common_vendor.ref(null);
|
||||
let info = common_vendor.reactive({});
|
||||
let infoUser = common_vendor.reactive({});
|
||||
let inputBorder = common_vendor.ref(false);
|
||||
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(1);
|
||||
let dataForm = common_vendor.reactive({
|
||||
money: 30
|
||||
});
|
||||
let payList = common_vendor.reactive([
|
||||
{
|
||||
id: 1,
|
||||
name: "余额支付"
|
||||
}
|
||||
]);
|
||||
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);
|
||||
}
|
||||
});
|
||||
common_vendor.onShow(async () => {
|
||||
if (common_vendor.index.getStorageSync("token") && id.value) {
|
||||
infoDate(id.value);
|
||||
let _res = await api_api.userInfo();
|
||||
infoUser.value = _res;
|
||||
}
|
||||
});
|
||||
let getUserCard = async (e) => {
|
||||
let _res = await api_api.userCardUsableList({ stationId: e });
|
||||
userCard.value = _res;
|
||||
if (_res.length == 0) {
|
||||
payType.value = 1;
|
||||
} else {
|
||||
payType.value = 2;
|
||||
userCardId.value = _res[0].id;
|
||||
if (!payList.find((val) => val.name == "电卡支付")) {
|
||||
payList.push({
|
||||
id: 2,
|
||||
name: "电卡支付"
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
let inputClik = () => {
|
||||
inputBorder.value = true;
|
||||
dataForm.money = dataForm.money == 30 || dataForm.money == 50 || dataForm.money == 100 ? "" : dataForm.money;
|
||||
};
|
||||
let infoDate = async (e) => {
|
||||
let _res = await api_api.gunInfo({ deviceNo: e });
|
||||
info = _res;
|
||||
getUserCard(_res.stationId);
|
||||
currentPrice.value = _res.currentPrice;
|
||||
common_vendor.index.__f__("log", "at pages/home/star.vue:275", _res.deviceNo, "_res.deviceNo");
|
||||
common_vendor.index.__f__("log", "at pages/home/star.vue:276", _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) => {
|
||||
common_vendor.index.__f__("log", "at pages/home/star.vue:286", "发送成功");
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("log", "at pages/home/star.vue:289", err);
|
||||
common_vendor.index.__f__("log", "at pages/home/star.vue:290", "发送失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
let dialogInputConfirm = (e) => {
|
||||
dataForm.money = e;
|
||||
};
|
||||
let toRechargeCard = async () => {
|
||||
common_vendor.index.showLoading({
|
||||
title: "启动充电中...",
|
||||
mask: true
|
||||
});
|
||||
await api_api.startChargingByCard({
|
||||
deviceNo: info.deviceNo,
|
||||
gunNo: info.gunNo,
|
||||
amount: dataForm.money,
|
||||
userCardId: userCardId.value
|
||||
});
|
||||
};
|
||||
let toRechargeYuFu = async () => {
|
||||
common_vendor.index.showLoading({
|
||||
title: "启动充电中...",
|
||||
mask: true
|
||||
});
|
||||
let _res = await api_api.startChargingByAdaPay({
|
||||
deviceNo: info.deviceNo,
|
||||
gunNo: info.gunNo,
|
||||
amount: dataForm.money
|
||||
});
|
||||
let data = _res.payInfo;
|
||||
common_vendor.index.requestPayment({
|
||||
provider: "wxpay",
|
||||
timeStamp: data.timeStamp,
|
||||
nonceStr: data.nonceStr,
|
||||
package: data.package,
|
||||
signType: data.signType,
|
||||
paySign: data.paySign,
|
||||
success: function(r) {
|
||||
store_index.store.commit("setTransactionNo", _res.transactionNo);
|
||||
store_index.store.commit("setSokStatus", 0);
|
||||
timeMap(_res);
|
||||
},
|
||||
fail: function(err) {
|
||||
common_vendor.index.showToast({
|
||||
title: "已取消支付",
|
||||
icon: "none"
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/home/star.vue:345", "fail:" + JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
};
|
||||
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);
|
||||
};
|
||||
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.o(($event) => common_vendor.unref(navTo)("/pages/money/recharge")),
|
||||
l: common_vendor.p({
|
||||
type: "primary",
|
||||
size: "small",
|
||||
plain: true,
|
||||
text: "余额充值"
|
||||
}),
|
||||
m: common_vendor.f(common_vendor.unref(payList), (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: `/static/icon/lie${item.id}.png`,
|
||||
b: common_vendor.t(item.name),
|
||||
c: item.id == 1
|
||||
}, item.id == 1 ? {
|
||||
d: common_vendor.t(common_vendor.unref(infoUser).balance || 0)
|
||||
} : {}, {
|
||||
e: index,
|
||||
f: item.id == common_vendor.unref(payType) ? "1rpx solid #4879e6" : "",
|
||||
g: common_vendor.o(($event) => common_vendor.isRef(payType) ? payType.value = item.id : payType = item.id, index)
|
||||
});
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
size: "mini",
|
||||
text: `余额原路退款`,
|
||||
plain: true,
|
||||
plainFill: true
|
||||
}),
|
||||
o: common_vendor.o(($event) => {
|
||||
common_vendor.unref(dataForm).money = 30;
|
||||
common_vendor.isRef(inputBorder) ? inputBorder.value = false : inputBorder = false;
|
||||
}),
|
||||
p: `1rpx solid ${common_vendor.unref(dataForm).money == 30 && !common_vendor.unref(inputBorder) ? "#4879e6" : "#c5c5c5"}`,
|
||||
q: common_vendor.o(($event) => {
|
||||
common_vendor.unref(dataForm).money = 50;
|
||||
common_vendor.isRef(inputBorder) ? inputBorder.value = false : inputBorder = false;
|
||||
}),
|
||||
r: `1rpx solid ${common_vendor.unref(dataForm).money == 50 && !common_vendor.unref(inputBorder) ? "#4879e6" : "#c5c5c5"}`,
|
||||
s: common_vendor.o(($event) => {
|
||||
common_vendor.unref(dataForm).money = 100;
|
||||
common_vendor.isRef(inputBorder) ? inputBorder.value = false : inputBorder = false;
|
||||
}),
|
||||
t: `1rpx solid ${common_vendor.unref(dataForm).money == 100 && !common_vendor.unref(inputBorder) ? "#4879e6" : "#c5c5c5"}`,
|
||||
v: common_vendor.unref(inputBorder)
|
||||
}, common_vendor.unref(inputBorder) ? {
|
||||
w: common_vendor.unref(dataForm).money,
|
||||
x: common_vendor.o(($event) => common_vendor.unref(dataForm).money = $event.detail.value)
|
||||
} : {}, {
|
||||
y: common_vendor.o((...args) => common_vendor.unref(inputClik) && common_vendor.unref(inputClik)(...args)),
|
||||
z: `1rpx solid ${common_vendor.unref(inputBorder) ? "#4879e6" : "#c5c5c5"}`,
|
||||
A: common_vendor.unref(payType) == 2
|
||||
}, common_vendor.unref(payType) == 2 ? {
|
||||
B: 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-4-" + 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, index),
|
||||
h: index
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
C: common_vendor.t(common_vendor.unref(currentPrice).totalAmount),
|
||||
D: !common_vendor.unref(payType)
|
||||
}, !common_vendor.unref(payType) ? {
|
||||
E: common_vendor.p({
|
||||
customStyle: {
|
||||
height: "80rpx",
|
||||
width: "230rpx"
|
||||
},
|
||||
disabled: true,
|
||||
color: "#4879e6",
|
||||
text: "请选择支付方式",
|
||||
shape: "circle"
|
||||
})
|
||||
} : {}, {
|
||||
F: common_vendor.unref(payType) == 1
|
||||
}, common_vendor.unref(payType) == 1 ? {
|
||||
G: common_vendor.o(common_vendor.unref(toRecharge)),
|
||||
H: common_vendor.p({
|
||||
customStyle: {
|
||||
height: "80rpx",
|
||||
width: "280rpx"
|
||||
},
|
||||
color: "#4879e6",
|
||||
shape: "circle",
|
||||
text: "启动充电"
|
||||
})
|
||||
} : {}, {
|
||||
I: common_vendor.unref(payType) == 3
|
||||
}, common_vendor.unref(payType) == 3 ? {
|
||||
J: common_vendor.o(common_vendor.unref(toRechargeYuFu)),
|
||||
K: common_vendor.p({
|
||||
customStyle: {
|
||||
height: "80rpx",
|
||||
width: "280rpx"
|
||||
},
|
||||
color: "#4879e6",
|
||||
shape: "circle",
|
||||
text: `预付${common_vendor.unref(dataForm).money}元,启动充电`
|
||||
})
|
||||
} : {}, {
|
||||
L: common_vendor.unref(payType) == 2
|
||||
}, common_vendor.unref(payType) == 2 ? {
|
||||
M: common_vendor.o(common_vendor.unref(toRechargeCard)),
|
||||
N: common_vendor.p({
|
||||
customStyle: {
|
||||
height: "80rpx",
|
||||
width: "280rpx"
|
||||
},
|
||||
disabled: !common_vendor.unref(userCardId),
|
||||
color: "#4879e6",
|
||||
text: common_vendor.unref(userCardId) ? "启动充电" : "请选择电卡",
|
||||
shape: "circle"
|
||||
})
|
||||
} : {}, {
|
||||
O: common_vendor.sr("inputClose", "2dd6a3c8-10,2dd6a3c8-9"),
|
||||
P: common_vendor.o(common_vendor.unref(dialogInputConfirm)),
|
||||
Q: common_vendor.p({
|
||||
mode: "input",
|
||||
title: "请输入预付金额",
|
||||
value: common_vendor.unref(dataForm).money,
|
||||
placeholder: "请输入内容"
|
||||
}),
|
||||
R: common_vendor.sr(inputDialog, "2dd6a3c8-9", {
|
||||
"k": "inputDialog"
|
||||
}),
|
||||
S: common_vendor.p({
|
||||
type: "dialog"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
wx.createPage(_sfc_main);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/star.js.map
|
||||
10
unpackage/dist/dev/mp-weixin/pages/home/star.json
vendored
Normal file
10
unpackage/dist/dev/mp-weixin/pages/home/star.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "开始充电",
|
||||
"usingComponents": {
|
||||
"up-tag": "../../uni_modules/uview-plus/components/u-tag/u-tag",
|
||||
"up-button": "../../uni_modules/uview-plus/components/u-button/u-button",
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/home/star.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/home/star.wxml
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}}" bindtap="{{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 wx:if="{{g}}" u-i="2dd6a3c8-0" bind:__l="__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 wx:if="{{i}}" u-i="2dd6a3c8-1" bind:__l="__l" u-p="{{j}}"></up-tag></view></view><view style="display:flex;align-items:center"><up-button wx:if="{{l}}" bindclick="{{k}}" u-i="2dd6a3c8-2" bind:__l="__l" u-p="{{l}}"></up-button></view></view><view style="font-size:30rpx;margin-bottom:30rpx"><view><view wx:for="{{m}}" wx:for-item="item" wx:key="e" class="flex-acsb" style="{{'padding:15rpx 30rpx;border-radius:10rpx' + ';' + ('border:' + item.f)}}" bindtap="{{item.g}}"><view style="display:flex;align-items:center"><image src="{{item.a}}" style="width:50rpx;height:50rpx;margin-right:25rpx"></image> {{item.b}}</view><view wx:if="{{item.c}}" style="font-size:28rpx;opacity:0.7">可用余额:{{item.d}}</view></view></view></view></view><view class="orderdetail_info" style="margin-bottom:30rpx"><view 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 wx:if="{{n}}" u-i="2dd6a3c8-3" bind:__l="__l" u-p="{{n}}"></up-tag></view><view class="orderdetail_info_yf_left_mon"><view bindtap="{{o}}" style="{{'border:' + p}}"> 30 </view><view bindtap="{{q}}" style="{{'border:' + r}}"> 50 </view><view bindtap="{{s}}" style="{{'border:' + t}}"> 100 </view><view bindtap="{{y}}" style="{{'border:' + z}}"><input wx:if="{{v}}" adjust-position focus type="number" placeholder="自定义" value="{{w}}" bindinput="{{x}}"/><text wx:else>自定义</text></view></view></view></view></view><view wx:if="{{A}}" class="orderdetail_info" style="margin-bottom:30rpx"><view><view class="flex-acsb" style="font-size:30rpx;margin-bottom:20rpx"><view>当前可用电卡</view></view><view wx:for="{{B}}" wx:for-item="item" wx:key="h" bindtap="{{item.g}}" style="margin-bottom:30rpx;position:relative" class="mt30 wallet_list"><view wx:if="{{item.a}}" style="position:absolute;top:0;left:0;background-color:#e45656;border-radius:0 0 20rpx 0"><up-icon wx:if="{{item.c}}" u-i="{{item.b}}" bind:__l="__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 style="height:500rpx"></view><view class="orderdetail_btn p30" style="background-color:#fff"><view class="orderdetail_btn_left">{{C}} <text>元/度 免费停车</text></view><view><up-button wx:if="{{D}}" u-i="2dd6a3c8-5" bind:__l="__l" u-p="{{E}}"></up-button><up-button wx:if="{{F}}" bindclick="{{G}}" u-i="2dd6a3c8-6" bind:__l="__l" u-p="{{H}}"></up-button><up-button wx:if="{{I}}" bindclick="{{J}}" u-i="2dd6a3c8-7" bind:__l="__l" u-p="{{K}}"></up-button><up-button wx:if="{{L}}" bindclick="{{M}}" u-i="2dd6a3c8-8" bind:__l="__l" u-p="{{N}}"></up-button></view></view><uni-popup wx:if="{{S}}" class="r" u-s="{{['d']}}" u-r="inputDialog" u-i="2dd6a3c8-9" bind:__l="__l" u-p="{{S}}"><uni-popup-dialog wx:if="{{Q}}" class="r" u-r="inputClose" bindconfirm="{{P}}" u-i="2dd6a3c8-10,2dd6a3c8-9" bind:__l="__l" u-p="{{Q}}"></uni-popup-dialog></uni-popup></view>
|
||||
124
unpackage/dist/dev/mp-weixin/pages/home/star.wxss
vendored
Normal file
124
unpackage/dist/dev/mp-weixin/pages/home/star.wxss
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
.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 {
|
||||
flex: 1;
|
||||
}
|
||||
.orderdetail_info_yf_left_tit {
|
||||
font-size: 28rpx;
|
||||
color: rgba(51, 51, 51, 0.8);
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
}
|
||||
.orderdetail_info_yf_left_mon {
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.orderdetail_info_yf_left_mon view {
|
||||
padding: 15rpx 35rpx;
|
||||
border: 1rpx solid #c5c5c5;
|
||||
margin-right: 15rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.orderdetail_info_yf_left_mon input {
|
||||
width: 100rpx;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
Reference in New Issue
Block a user