Files
gxtyzx-uniapp/dist/dev/mp-weixin/package/cooperate/index.js
T

171 lines
5.1 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const api_booking_course_index = require("../../api/booking/course/index.js");
const api_booking_item_index = require("../../api/booking/item/index.js");
const _sfc_main = {
data() {
return {
list: [],
// 骨架屏
hideTools: true,
// 项目列表
itemList: []
};
},
onLoad() {
this.reload();
},
methods: {
reload() {
const app = this;
Promise.all([app.getCourseList(), app.getItemList()]).then((res) => {
console.log("res: ", res);
app.list = res[0];
app.itemList = res[1];
});
},
getCourseList() {
return new Promise((resolve, reject) => {
api_booking_course_index.pageCourse({}).then((result) => {
resolve(result.list);
}).catch(reject);
});
},
getItemList() {
return new Promise((resolve, reject) => {
api_booking_item_index.listItem({}).then((result) => {
resolve(result);
}).catch(reject);
});
},
onItem(e) {
const { index } = e.detail;
this.openUrl(`/package/match/list?categoryId=` + this.itemList[index].id);
},
openUrl(url) {
common_vendor.index.navigateTo({
url
});
}
}
};
if (!Array) {
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_button2 = common_vendor.resolveComponent("uv-button");
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
(_easycom_uv_cell2 + _easycom_uv_button2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_skeleton2 + _easycom_uv_gap2)();
}
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
const _easycom_uv_button = () => "../../uni_modules/uv-button/components/uv-button/uv-button.js";
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
if (!Math) {
(_easycom_uv_cell + _easycom_uv_button + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_skeleton + _easycom_uv_gap)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.list.length > 0
}, $data.list.length > 0 ? {
b: common_vendor.f($data.list, (item, index, i0) => {
return {
a: "0391ec96-2-" + i0 + "," + ("0391ec96-1-" + i0),
b: "0391ec96-4-" + i0 + "," + ("0391ec96-3-" + i0),
c: "0391ec96-5-" + i0 + "," + ("0391ec96-3-" + i0),
d: "0391ec96-3-" + i0 + "," + ("0391ec96-1-" + i0),
e: "0391ec96-1-" + i0 + "," + ("0391ec96-0-" + i0),
f: index,
g: "0391ec96-0-" + i0
};
}),
c: common_vendor.p({
label: `负责游泳跳水馆、包括游泳馆的日常经营管理工作`,
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
d: common_vendor.p({
type: "info",
icon: "phone",
shape: "circle",
size: "small",
text: "电话咨询"
}),
e: common_vendor.p({
type: "info",
icon: "edit-pen",
shape: "circle",
size: "small",
text: "合作留言"
}),
f: common_vendor.p({
title: "电话咨询",
border: false,
cellStyle: {
padding: "10px 5px"
}
}),
g: common_vendor.p({
customStyle: {
backgroundColor: "#ffffff"
},
border: false
}),
h: common_vendor.p({
title: "游泳健身活动俱乐部",
border: false,
["is-shadow"]: false,
padding: 0
})
} : {
i: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
j: common_vendor.p({
height: "16"
}),
k: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
l: common_vendor.p({
height: "16"
}),
m: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
n: common_vendor.p({
height: "16"
}),
o: common_vendor.p({
rows: "2",
avatar: true,
loading: $data.hideTools,
title: false
}),
p: common_vendor.p({
height: "16"
}),
q: common_vendor.p({
border: false,
["is-shadow"]: false,
padding: "12px 4px"
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0391ec96"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/package/cooperate/index.vue"]]);
wx.createPage(MiniProgramPage);