80 lines
3.2 KiB
JavaScript
80 lines
3.2 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_commUtils = require("../../utils/commUtils.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();
|
||
|
}
|
||
|
const _sfc_main = {
|
||
|
__name: "order-detail",
|
||
|
setup(__props) {
|
||
|
const orderDetail = common_vendor.ref(null);
|
||
|
common_vendor.onLoad((options) => __async(this, null, function* () {
|
||
|
const orderId = options.id;
|
||
|
try {
|
||
|
const response = yield utils_http.httpGet(`/order/info/${orderId}`);
|
||
|
if (response.code === 200) {
|
||
|
orderDetail.value = response.data;
|
||
|
} else {
|
||
|
utils_commUtils.toast("获取订单详情失败 " + response.message);
|
||
|
console.error("获取订单详情失败:", response.message);
|
||
|
}
|
||
|
} catch (error) {
|
||
|
utils_commUtils.toast("请求失败");
|
||
|
console.error("请求失败:", error);
|
||
|
}
|
||
|
}));
|
||
|
return (_ctx, _cache) => {
|
||
|
return common_vendor.e({
|
||
|
a: orderDetail.value
|
||
|
}, orderDetail.value ? common_vendor.e({
|
||
|
b: common_vendor.t(orderDetail.value.serviceInfo.serviceName),
|
||
|
c: common_vendor.t(orderDetail.value.state),
|
||
|
d: common_vendor.t(orderDetail.value.serviceInfo.type),
|
||
|
e: common_vendor.t(orderDetail.value.serviceInfo.address),
|
||
|
f: common_vendor.t(orderDetail.value.reservationTime),
|
||
|
g: common_vendor.t(orderDetail.value.serviceHours),
|
||
|
h: common_vendor.unref(utils_commUtils.imgUrl)(orderDetail.value.pet.profileUrl),
|
||
|
i: common_vendor.t(orderDetail.value.pet.name),
|
||
|
j: common_vendor.t(orderDetail.value.pet.breed),
|
||
|
k: common_vendor.t(orderDetail.value.user.nickname),
|
||
|
l: common_vendor.t(orderDetail.value.user.phone),
|
||
|
m: common_vendor.t(orderDetail.value.address.province),
|
||
|
n: common_vendor.t(orderDetail.value.address.city),
|
||
|
o: common_vendor.t(orderDetail.value.address.district),
|
||
|
p: common_vendor.t(orderDetail.value.address.detailAddress),
|
||
|
q: common_vendor.t(orderDetail.value.paymentMethod),
|
||
|
r: common_vendor.t(orderDetail.value.isPay ? "已支付" : "未支付"),
|
||
|
s: common_vendor.t(orderDetail.value.price),
|
||
|
t: orderDetail.value.qrcode
|
||
|
}, orderDetail.value.qrcode ? {
|
||
|
v: common_vendor.unref(utils_commUtils.imgUrl)(orderDetail.value.qrcode)
|
||
|
} : {}) : {});
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-dc809f37"]]);
|
||
|
wx.createPage(MiniProgramPage);
|
||
|
//# sourceMappingURL=order-detail.js.map
|