You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.2 KiB
JavaScript
63 lines
2.2 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const api_index = require("../../api/index.js");
|
|
const _sfc_main = {
|
|
__name: "index",
|
|
setup(__props) {
|
|
const services = ["营销策划", "会议服务", "庆典服务", "礼仪服务"];
|
|
const gotoAbout = () => {
|
|
common_vendor.index.navigateTo({ url: "/pages/about" });
|
|
};
|
|
const lianxi = () => {
|
|
common_vendor.index.navigateTo({ url: "/pages/contact" });
|
|
};
|
|
const gotoYuYue = () => {
|
|
common_vendor.index.navigateTo({ url: "/pages/yuyue_form" });
|
|
};
|
|
const gotoShangWuZiXun = () => {
|
|
common_vendor.index.navigateTo({ url: "/pages/ShangWuZiXun" });
|
|
};
|
|
const handleLogin = async () => {
|
|
try {
|
|
const res = await common_vendor.wx$1.login();
|
|
if (res.code) {
|
|
api_index.Login({ code: res.code }).then((res2) => {
|
|
if (res2.status) {
|
|
common_vendor.index.setStorageSync("openid", res2.data.openid);
|
|
if (res2.data.member !== null && res2.data.member !== void 0 && res2.data.url !== null && res2.data.url !== void 0) {
|
|
let url = res2.data.url + "&openid=" + res2.data.openid;
|
|
common_vendor.index.__f__("log", "at pages/index/index.vue:74", url);
|
|
common_vendor.index.navigateTo({ url: "/pages/h5?url=" + url });
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
}
|
|
} catch (error) {
|
|
}
|
|
};
|
|
common_vendor.onLoad(() => {
|
|
handleLogin();
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_assets._imports_0,
|
|
b: common_vendor.o(gotoAbout),
|
|
c: common_vendor.f(services, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item),
|
|
b: index
|
|
};
|
|
}),
|
|
d: common_vendor.o(gotoShangWuZiXun),
|
|
e: common_vendor.o(gotoYuYue),
|
|
f: common_vendor.o(lianxi)
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
|