jiangchengfeiyi-xiaochengxu/unpackage/dist/dev/mp-weixin/pages/booking/CostumeDetails/CostumeDetails.js
2025-01-02 11:18:59 +08:00

50 lines
1.6 KiB
JavaScript

"use strict";
const common_vendor = require("../../../common/vendor.js");
const api_request = require("../../../api/request.js");
const _sfc_main = {
__name: "CostumeDetails",
setup(__props) {
const id = common_vendor.ref([{}]);
const details = common_vendor.ref([{}]);
common_vendor.onLoad((options) => {
id.value = JSON.parse(options.info);
console.log(id.value, 1111111111);
});
common_vendor.onMounted(() => {
getDetails();
});
const getDetails = async () => {
const res = await common_vendor.index.request({
url: api_request.baseUrl + "/clothesInfo/list/detail",
method: "POST",
header: {
cookie: common_vendor.wx$1.getAccountInfoSync("cookie")
},
data: {
id: id.value
}
});
if (res.data.code === 1) {
details.value = res.data.data;
} else {
uin.showtoast({
icon: "error",
title: "获取失败"
});
}
};
return (_ctx, _cache) => {
return {
a: common_vendor.t(details.value.name),
b: details.value.image,
c: details.value.effectImg,
d: common_vendor.t(details.value.intro),
e: common_vendor.t(details.value.price),
f: common_vendor.t(details.value.clothesType)
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/微信小程序/课设整合/匠承非遗小程序端/jiangchengfeiyi-xiaochengxu/pages/booking/CostumeDetails/CostumeDetails.vue"]]);
wx.createPage(MiniProgramPage);