|
@@ -13,8 +13,9 @@ if (!Math) {
|
|
const _sfc_main = common_vendor.defineComponent({
|
|
const _sfc_main = common_vendor.defineComponent({
|
|
__name: "person",
|
|
__name: "person",
|
|
setup(__props) {
|
|
setup(__props) {
|
|
- var _a;
|
|
+ var _a, _b;
|
|
- (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
|
|
+ const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
|
|
|
|
+ const $config = (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
|
|
const config = common_vendor.ref({ logoUrl: "" });
|
|
const config = common_vendor.ref({ logoUrl: "" });
|
|
const show = common_vendor.ref(false);
|
|
const show = common_vendor.ref(false);
|
|
const id = common_vendor.ref("");
|
|
const id = common_vendor.ref("");
|
|
@@ -31,11 +32,18 @@ const _sfc_main = common_vendor.defineComponent({
|
|
const total = common_vendor.ref(0);
|
|
const total = common_vendor.ref(0);
|
|
const popup = common_vendor.ref(null);
|
|
const popup = common_vendor.ref(null);
|
|
const form = common_vendor.ref({});
|
|
const form = common_vendor.ref({});
|
|
|
|
+ const user = common_vendor.ref({});
|
|
|
|
+ const teamInfo = common_vendor.ref({});
|
|
common_vendor.onLoad(async (options) => {
|
|
common_vendor.onLoad(async (options) => {
|
|
id.value = options && options.id;
|
|
id.value = options && options.id;
|
|
|
|
+ await searchUser();
|
|
await searchConfig();
|
|
await searchConfig();
|
|
await search();
|
|
await search();
|
|
|
|
+ await searchShare();
|
|
});
|
|
});
|
|
|
|
+ const searchUser = async () => {
|
|
|
|
+ user.value = common_vendor.index.getStorageSync("user");
|
|
|
|
+ };
|
|
const searchConfig = async () => {
|
|
const searchConfig = async () => {
|
|
config.value = common_vendor.index.getStorageSync("config");
|
|
config.value = common_vendor.index.getStorageSync("config");
|
|
};
|
|
};
|
|
@@ -44,11 +52,21 @@ const _sfc_main = common_vendor.defineComponent({
|
|
common_vendor.index.setNavigationBarTitle({
|
|
common_vendor.index.setNavigationBarTitle({
|
|
title: `球队阵容(${total.value})`
|
|
title: `球队阵容(${total.value})`
|
|
});
|
|
});
|
|
|
|
+ const res = await $api(`team/${id.value}`, "GET", {});
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ if (res.data)
|
|
|
|
+ teamInfo.value = res.data;
|
|
|
|
+ } else {
|
|
|
|
+ common_vendor.index.showToast({
|
|
|
|
+ title: res.msg || "",
|
|
|
|
+ icon: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const toInfo = async (item) => {
|
|
const toInfo = async (item) => {
|
|
common_vendor.index.navigateTo({
|
|
common_vendor.index.navigateTo({
|
|
- url: `/pagesHome/person/index?id=${item._id || item.id}`
|
|
+ url: `/pagesHome/share/index?id=${id.value}`
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const toSort = async (item) => {
|
|
const toSort = async (item) => {
|
|
@@ -80,6 +98,13 @@ const _sfc_main = common_vendor.defineComponent({
|
|
}
|
|
}
|
|
sortList.value = list2;
|
|
sortList.value = list2;
|
|
};
|
|
};
|
|
|
|
+ const searchShare = () => {
|
|
|
|
+ $config.share = {
|
|
|
|
+ title: `${user.value.name || "暂无名称"}邀请你加入${teamInfo.value.name || "暂无团队"}`,
|
|
|
|
+ path: `/pagesHome/share/index?id=${id.value}`
|
|
|
|
+
|
|
|
|
+ };
|
|
|
|
+ };
|
|
const toCreate = () => {
|
|
const toCreate = () => {
|
|
popup.value.open();
|
|
popup.value.open();
|
|
};
|
|
};
|
|
@@ -119,7 +144,7 @@ const _sfc_main = common_vendor.defineComponent({
|
|
c: common_vendor.p({
|
|
c: common_vendor.p({
|
|
["custom-prefix"]: "iconfont",
|
|
["custom-prefix"]: "iconfont",
|
|
type: "icon-yaoqinghuida",
|
|
type: "icon-yaoqinghuida",
|
|
- size: "25",
|
|
+ size: "20",
|
|
color: "#121212"
|
|
color: "#121212"
|
|
}),
|
|
}),
|
|
d: common_vendor.f(list.value, (item, index, i0) => {
|
|
d: common_vendor.f(list.value, (item, index, i0) => {
|
|
@@ -129,7 +154,7 @@ const _sfc_main = common_vendor.defineComponent({
|
|
c: common_vendor.t(item.name || item.phone),
|
|
c: common_vendor.t(item.name || item.phone),
|
|
d: "fdda92d4-3-" + i0,
|
|
d: "fdda92d4-3-" + i0,
|
|
e: index,
|
|
e: index,
|
|
- f: common_vendor.o(($event) => toInfo(item), index)
|
|
+ f: common_vendor.o(($event) => toInfo(), index)
|
|
};
|
|
};
|
|
}),
|
|
}),
|
|
e: common_vendor.p({
|
|
e: common_vendor.p({
|