94 lines
3.0 KiB
JavaScript
94 lines
3.0 KiB
JavaScript
"use strict";
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
const common_vendor = require("../../../common/vendor.js");
|
|
const utils_http = require("../../../utils/http.js");
|
|
if (!Array) {
|
|
const _component_layout_default_uni = common_vendor.resolveComponent("layout-default-uni");
|
|
_component_layout_default_uni();
|
|
}
|
|
if (!Math) {
|
|
OrderItem();
|
|
}
|
|
const OrderItem = () => "./components/OrderItem.js";
|
|
const _sfc_main = {
|
|
__name: "take",
|
|
setup(__props) {
|
|
const orders = common_vendor.ref([]);
|
|
const refresh = () => __async(this, null, function* () {
|
|
yield fetchOrders();
|
|
});
|
|
const fetchOrders = () => __async(this, null, function* () {
|
|
try {
|
|
const response = yield utils_http.httpPost("/order/ptOrdersInfo");
|
|
if (response.code === 200) {
|
|
orders.value = response.records;
|
|
} else {
|
|
console.error("订单数据获取失败", response.message);
|
|
}
|
|
} catch (error) {
|
|
console.error("订单数据获取失败", error);
|
|
}
|
|
});
|
|
common_vendor.onLoad(() => {
|
|
fetchOrders();
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return common_vendor.e({
|
|
a: common_vendor.f(orders.value, (order, k0, i0) => {
|
|
return {
|
|
a: order.id,
|
|
b: common_vendor.o(refresh, order.id),
|
|
c: "70423df4-1-" + i0 + ",70423df4-0",
|
|
d: common_vendor.p({
|
|
id: order.id,
|
|
userId: order.userId,
|
|
reservationTime: order.reservationTime,
|
|
serviceHours: order.serviceHours,
|
|
personalServiceId: order.personalServiceId,
|
|
personalServiceUserId: order.personalServiceUserId,
|
|
price: order.price,
|
|
isPay: order.isPay,
|
|
feedback: order.feedback,
|
|
star: order.star,
|
|
state: order.state,
|
|
paymentMethod: order.paymentMethod,
|
|
qrcode: order.qrcode,
|
|
createTime: order.createTime,
|
|
updateTime: order.updateTime,
|
|
address: order.address,
|
|
pet: order.pet,
|
|
user: order.user,
|
|
psUser: order.psUser,
|
|
serviceInfo: order.serviceInfo,
|
|
isTake: true
|
|
}),
|
|
e: order.id
|
|
};
|
|
}),
|
|
b: orders.value.length === 0
|
|
}, orders.value.length === 0 ? {} : {});
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-70423df4"]]);
|
|
wx.createPage(MiniProgramPage);
|