|
@@ -28,13 +28,7 @@ const _sfc_main = common_vendor.defineComponent({
|
|
|
const config = common_vendor.ref({});
|
|
|
const user = common_vendor.ref({});
|
|
|
const show = common_vendor.ref(false);
|
|
|
- const menuList = common_vendor.ref([
|
|
|
- { name: "球队", num: "5", icon: "icon-qi", color: "#1E90FF" },
|
|
|
- { name: "|" },
|
|
|
- { name: "出勤", num: "16%", icon: "icon-kaoqinchuqin", color: "#FF4500" },
|
|
|
- { name: "|" },
|
|
|
- { name: "进球", num: "1", icon: "icon-zuqiu", color: "#FFFFFF" }
|
|
|
- ]);
|
|
|
+ const menuList = common_vendor.ref([]);
|
|
|
const list = common_vendor.ref(["球队", "活动", "赛事"]);
|
|
|
const current = common_vendor.ref(0);
|
|
|
const pattern = common_vendor.ref({
|
|
@@ -65,6 +59,9 @@ const _sfc_main = common_vendor.defineComponent({
|
|
|
common_vendor.onPullDownRefresh(() => {
|
|
|
common_vendor.index.stopPullDownRefresh();
|
|
|
});
|
|
|
+ const searchConfig = async () => {
|
|
|
+ config.value = common_vendor.index.getStorageSync("config");
|
|
|
+ };
|
|
|
const search = async () => {
|
|
|
const res = await $api(`matchUser/find`, "GET", {
|
|
|
openid: openid.value
|
|
@@ -73,6 +70,15 @@ const _sfc_main = common_vendor.defineComponent({
|
|
|
if (res.data) {
|
|
|
user.value = res.data;
|
|
|
common_vendor.index.setStorageSync("user", res.data);
|
|
|
+ const arr = await $api(`matchUser/statistics/${res.data.id}`, "GET", {});
|
|
|
+ if (arr.code === 200) {
|
|
|
+ menuList.value = arr.data;
|
|
|
+ } else {
|
|
|
+ common_vendor.index.showToast({
|
|
|
+ title: arr.msg || "",
|
|
|
+ icon: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
} else
|
|
|
popup.value.open();
|
|
|
} else {
|
|
@@ -82,9 +88,6 @@ const _sfc_main = common_vendor.defineComponent({
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
- const searchConfig = async () => {
|
|
|
- config.value = common_vendor.index.getStorageSync("config");
|
|
|
- };
|
|
|
const change = (e) => {
|
|
|
show.value = e.show;
|
|
|
};
|