index.js
4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const common_hotel = require("../../common/hotel.js");
require("../../common/request.js");
require("../../config.js");
require("../../common/login.js");
require("../../common/api.js");
if (!Array) {
const _easycom_uni_collapse_item2 = common_vendor.resolveComponent("uni-collapse-item");
const _easycom_uni_collapse2 = common_vendor.resolveComponent("uni-collapse");
(_easycom_uni_collapse_item2 + _easycom_uni_collapse2)();
}
const _easycom_uni_collapse_item = () => "../../uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js";
const _easycom_uni_collapse = () => "../../uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js";
if (!Math) {
(_easycom_uni_collapse_item + _easycom_uni_collapse)();
}
const _sfc_main = {
__name: "index",
setup(__props) {
getApp();
const data = common_vendor.reactive({
nowOpen: "",
money: 0,
list: []
});
const {
list,
nowOpen,
money
} = common_vendor.toRefs(data);
let activeId = null;
let ccitem = {};
common_vendor.onLoad((option) => {
activeId = option.activeId;
getList();
common_vendor.index.showLoading({
title: "加载中"
});
});
function getList() {
common_hotel.getActivityCarList({
activityId: activeId
}).then((res) => {
var _a;
list.value = res.rows;
nowOpen.value = (_a = list.value[0]) == null ? void 0 : _a.id;
ccitem = list.value[0];
console.log(nowOpen.value);
for (var item of list.value) {
for (var car of item.carVoList) {
car.inNum = 0;
car.outNum = 0;
}
}
common_vendor.index.hideLoading();
});
}
function changeCollapse(e) {
console.log(e);
if (e !== nowOpen.value)
;
for (var cc of list.value) {
if (cc.id == e) {
ccitem = cc;
}
}
}
function goNext(car) {
const obj = encodeURIComponent(JSON.stringify(ccitem));
const detail = encodeURIComponent(JSON.stringify(car));
let path = `/pages_hotel/car/order?detail=${detail}&carList=${obj}`;
common_vendor.index.navigateTo({
url: path
});
}
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.f(common_vendor.unref(list), (item, index, i0) => {
return {
a: common_vendor.t(index + 1),
b: common_vendor.t(item.checkIn),
c: common_vendor.t(item.checkOut),
d: common_vendor.f(item.carVoList, (r, k1, i1) => {
var _a;
return {
a: (_a = r.photos) == null ? void 0 : _a.split(",")[0],
b: common_vendor.t(r.carType),
c: common_vendor.t(r.inPrice > r.checkOut ? r.checkOut : r.inPrice),
d: common_vendor.t(r.carSeat),
e: common_vendor.t(r.operStart),
f: common_vendor.t(r.operEnd),
g: common_vendor.t(r.carColor),
h: r.checkOut == 1,
i: r.checkIn == 1,
j: common_vendor.o(($event) => goNext(r), r.id),
k: r.id
};
}),
e: index,
f: item.carVoList.length > 0,
g: "c7add784-1-" + i0 + ",c7add784-0",
h: common_vendor.p({
open: "true",
name: item.id
})
};
}),
b: common_assets._imports_0$5,
c: common_vendor.o(changeCollapse),
d: common_vendor.o(($event) => common_vendor.isRef(nowOpen) ? nowOpen.value = $event : null),
e: common_vendor.p({
accordion: true,
modelValue: common_vendor.unref(nowOpen)
}),
f: common_vendor.unref(list).length == 0
}, common_vendor.unref(list).length == 0 ? {} : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c7add784"], ["__file", "/Users/yangyang/project/j-mini/Venue/pages_hotel/car/index.vue"]]);
_sfc_main.__runtimeHooks = 6;
wx.createPage(MiniProgramPage);