Ver Fonte

修改活动列表

zs há 1 ano atrás
pai
commit
e25a2bc2b9

+ 66 - 33
pages/home/components/activity.vue

@@ -16,31 +16,37 @@
 						<view class="other_2">
 							<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
 								<view class="list_1">
-									<view class="date">{{item.date||'暂无日期'}}</view>
+									<view class="date">
+										{{moment(item.startTime).format('MM-DD')||'暂无日期'}}
+										{{getDayOfWeek(item.startTime)}}
+									</view>
 									<view class="status"
-										:class="[item.status=='0'?'status0':item.status=='1'?'status1':'status2']">
-										{{item.status_name||'暂无状态'}}
+										:class="[item.status=='0'?'status0':item.status=='1'?'status1':item.status=='2'?'status2':'status3']">
+										{{getStatus(item.status)}}
 									</view>
 								</view>
 								<view class="list_2">
-									<view class="name">{{item.name||'暂无活动名称'}}</view>
+									<view class="name" v-if="item.type=='0'">{{item?.matchInfo?.title||'友谊赛'}}</view>
+									<view class="name" v-else>{{item?.leagueInfo?.title||'联赛'}}</view>
 									<view class="score">
 										<view class="red">
-											<view class="red_name">{{item.red_name||'暂无红方名称'}}</view>
+											<view class="red_name">{{item?.redInfo?.name||'暂无红方名称'}}</view>
 											<view class="red_image">
 												<image class="image" mode="aspectFill"
-													:src="item.red_logo||config.logoUrl"></image>
+													:src="item?.redInfo?.logo||config.logoUrl">
+												</image>
 											</view>
-											<view class="red_score">{{item.red_score||0}}</view>
+											<view class="red_score">{{item.redScore||0}}</view>
 										</view>
 										<view class="center">:</view>
 										<view class="blue">
-											<view class="blue_score">{{item.blue_score||0}}</view>
+											<view class="blue_score">{{item.blueScore||0}}</view>
 											<view class="blue_image">
 												<image class="image" mode="aspectFill"
-													:src="item.blue_logo||config.logoUrl"></image>
+													:src="item?.blueInfo?.logo||config.logoUrl">
+												</image>
 											</view>
-											<view class="blue_name">{{item.blue_name||'暂无蓝方名称'}}</view>
+											<view class="blue_name">{{item?.blueInfo?.name||'暂无蓝方名称'}}</view>
 										</view>
 									</view>
 								</view>
@@ -57,6 +63,7 @@
 </template>
 
 <script setup lang="ts">
+	import moment from 'moment';
 	import { ref, toRefs, getCurrentInstance } from 'vue';
 	//该依赖已内置不需要单独安装
 	import { onShow } from "@dcloudio/uni-app";
@@ -78,13 +85,14 @@
 	// 用户信息
 	const user = ref({});
 	// 查询
-	const searchInfo = ref({ });
+	const searchInfo = ref({});
 	// 列表
 	const list = ref<PropsItem[]>([{ id: 1, name: '测试球队' }, { id: 1, name: '肝帝集团队' }]);
 	// 分页
 	const pageNum = ref(1);
 	const pageSize = ref(10);
 	const total = ref(0);
+	const statusList = ref([]);
 	// 数据是否触底
 	const scrollTop = ref(0);
 	const is_bottom = ref(false);
@@ -99,41 +107,61 @@
 	// 用户信息
 	const searchUser = async () => {
 		user.value = uni.getStorageSync('user');
+		let res;
+		// 比赛状态
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_game_status', status: '0' });
+		if (res.code === 200 && res.total > 0) statusList.value = res.rows
 	};
 	// 查询列表
 	const search = async () => {
-		// const info = {
-		// 	pageNum: pageNum.value,
-		// 	pageSize: pageSize.value,
-		// 	userId: user.value.id
-		// }
-		// const res = await $api('activity/list', 'GET', {
-		// 	...info,
-		// 	...searchInfo.value
-		// });
-		// if (res.code === 200) {
-		// 	list.value = res.rows
-		// 	total.value = res.total
-		// } else {
-		// 	uni.showToast({
-		// 		title: res.msg || '',
-		// 		icon: 'error',
-		// 	});
-		// }
+		const info = {
+			pageNum: pageNum.value,
+			pageSize: pageSize.value,
+			userId: user.value.id
+		}
+		const res = await $api('game/list', 'GET', {
+			...info,
+			...searchInfo.value
+		});
+		if (res.code === 200) {
+			list.value = res.rows
+			total.value = res.total
+		} else {
+			uni.showToast({
+				title: res.msg || '',
+				icon: 'error',
+			});
+		}
 	};
 	//查询
 	const toInput = (e : any) => {
 		if (searchInfo.value.name) searchInfo.value.name = e.detail.value
-		searchInfo.value = { }
+		searchInfo.value = {}
 		clearPage();
 		search();
 	};
 	// 活动详情
 	const toInfo = (item : any) => {
 		uni.navigateTo({
-			url: `/pagesHome/activity/info?id=${item._id || item.id}&name=${item.name}`,
+			url: `/pagesHome/activity/info?id=${item._id || item.id}&name=${item.name || ''}`,
 		})
 	};
+	// 日期换算星期几
+	const getDayOfWeek = (dateString) => {
+		if (dateString) {
+			const date = new Date(dateString);
+			const dayOfWeek = date.getDay();
+			const weekdays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
+			return weekdays[dayOfWeek];
+		} else return '暂无日期';
+	};
+	// 换算状态
+	const getStatus = (value) => {
+		if (value) {
+			const data = statusList.value.find(i => i.dictValue == value)
+			if (data) return data.dictLabel
+		} else return '暂无状态';
+	};
 	// 分页
 	const toPage = () => {
 		if (total.value > list.value.length) {
@@ -218,14 +246,14 @@
 							}
 
 							.status {
-								font-size: var(--font12Size);
+								font-size: 10px;
 								margin: 0 1vw;
 								padding: 1px 5px;
 							}
 
 							.status0 {
 								color: var(--mainColor);
-								background-color: var(--fF0Color);
+								background-color: var(--f35BColor);
 							}
 
 							.status1 {
@@ -234,6 +262,11 @@
 							}
 
 							.status2 {
+								color: var(--mainColor);
+								background-color: var(--fF0Color);
+							}
+
+							.status3 {
 								color: var(--f99Color);
 								background-color: var(--f9Color);
 							}

+ 84 - 26
pagesHome/activity/index.vue

@@ -16,31 +16,37 @@
 						<view class="other_2">
 							<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
 								<view class="list_1">
-									<view class="date">{{item.date||'暂无日期'}}</view>
+									<view class="date">
+										{{moment(item.startTime).format('MM-DD')||'暂无日期'}}
+										{{getDayOfWeek(item.startTime)}}
+									</view>
 									<view class="status"
-										:class="[item.status=='0'?'status0':item.status=='1'?'status1':'status2']">
-										{{item.status_name||'暂无状态'}}
+										:class="[item.status=='0'?'status0':item.status=='1'?'status1':item.status=='2'?'status2':'status3']">
+										{{getStatus(item.status)}}
 									</view>
 								</view>
 								<view class="list_2">
-									<view class="name">{{item.name||'暂无活动名称'}}</view>
+									<view class="name" v-if="item.type=='0'">{{item?.matchInfo?.title||'友谊赛'}}</view>
+									<view class="name" v-else>{{item?.leagueInfo?.title||'联赛'}}</view>
 									<view class="score">
 										<view class="red">
-											<view class="red_name">{{item.red_name||'暂无红方名称'}}</view>
+											<view class="red_name">{{item?.redInfo?.name||'暂无红方名称'}}</view>
 											<view class="red_image">
 												<image class="image" mode="aspectFill"
-													:src="item.red_logo||config.logoUrl"></image>
+													:src="item?.redInfo?.logo||config.logoUrl">
+												</image>
 											</view>
-											<view class="red_score">{{item.red_score||0}}</view>
+											<view class="red_score">{{item.redScore||0}}</view>
 										</view>
 										<view class="center">:</view>
 										<view class="blue">
-											<view class="blue_score">{{item.blue_score||0}}</view>
+											<view class="blue_score">{{item.blueScore||0}}</view>
 											<view class="blue_image">
 												<image class="image" mode="aspectFill"
-													:src="item.blue_logo||config.logoUrl"></image>
+													:src="item?.blueInfo?.logo||config.logoUrl">
+												</image>
 											</view>
-											<view class="blue_name">{{item.blue_name||'暂无蓝方名称'}}</view>
+											<view class="blue_name">{{item?.blueInfo?.name||'暂无蓝方名称'}}</view>
 										</view>
 									</view>
 								</view>
@@ -57,9 +63,12 @@
 </template>
 
 <script setup lang="ts">
-	import { ref } from 'vue';
+	import moment from 'moment';
+	import { ref, getCurrentInstance } from 'vue';
 	//该依赖已内置不需要单独安装
 	import { onShow } from "@dcloudio/uni-app";
+	// 请求接口
+	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
 	interface PropsItem {
 		id ?: number,
 		name ?: string,
@@ -73,6 +82,8 @@
 		status ?: string,
 		status_name ?: string,
 	};
+	// 用户信息
+	const user = ref({});
 	// 基本信息
 	const config = ref({ bottomTitle: '', logoUrl: '' });
 	// 查询
@@ -80,25 +91,51 @@
 	// 列表
 	const list = ref<PropsItem[]>([{ id: 1, name: '测试球队' }, { id: 1, name: '肝帝集团队' }]);
 	// 分页
-	const skip = ref(0);
-	const limit = ref(6);
-	const page = ref(0);
+	const pageNum = ref(1);
+	const pageSize = ref(10);
 	const total = ref(0);
+	const statusList = ref([]);
 	// 数据是否触底
 	const scrollTop = ref(0);
 	const is_bottom = ref(false);
 
-	onShow(() => {
-		searchConfig();
-		search();
+	onShow(async () => {
+		await searchUser();
+		await searchConfig();
+		await search();
 	})
+	// 用户信息
+	const searchUser = async () => {
+		user.value = uni.getStorageSync('user');
+		let res;
+		// 比赛状态
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_game_status', status: '0' });
+		if (res.code === 200 && res.total > 0) statusList.value = res.rows
+	};
 	// config信息
 	const searchConfig = async () => {
 		config.value = uni.getStorageSync('config');
 	};
 	// 查询列表
 	const search = async () => {
-		console.log('查询');
+		const info = {
+			pageNum: pageNum.value,
+			pageSize: pageSize.value,
+			userId: user.value.id
+		}
+		const res = await $api('game/list', 'GET', {
+			...info,
+			...searchInfo.value
+		});
+		if (res.code === 200) {
+			list.value = res.rows
+			total.value = res.total
+		} else {
+			uni.showToast({
+				title: res.msg || '',
+				icon: 'error',
+			});
+		}
 	};
 	//查询
 	const toInput = (e : any) => {
@@ -110,9 +147,25 @@
 	// 活动详情
 	const toInfo = (item : any) => {
 		uni.navigateTo({
-			url: `/pagesHome/activity/info?id=${item._id || item.id}&name=${item.name}`,
+			url: `/pagesHome/activity/info?id=${item._id || item.id}&name=${item.name || ''}`,
 		})
 	};
+	// 日期换算星期几
+	const getDayOfWeek = (dateString) => {
+		if (dateString) {
+			const date = new Date(dateString);
+			const dayOfWeek = date.getDay();
+			const weekdays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
+			return weekdays[dayOfWeek];
+		} else return '暂无日期';
+	};
+	// 换算状态
+	const getStatus = (value) => {
+		if (value) {
+			const data = statusList.value.find(i => i.dictValue == value)
+			if (data) return data.dictLabel
+		} else return '暂无状态';
+	};
 	// 分页
 	const toPage = () => {
 		if (total.value > list.value.length) {
@@ -120,8 +173,8 @@
 				title: '加载中',
 				mask: true
 			})
-			page.value = page.value + 1
-			skip.value = page.value * limit.value;
+			pageNum.value = pageNum.value + 1
+			pageSize.value = pageNum.value * 10;
 			search();
 			uni.hideLoading();
 		} else is_bottom.value = true
@@ -135,8 +188,8 @@
 	// 清空数据
 	const clearPage = () => {
 		list.value = []
-		skip.value = 0
-		limit.value = 6
+		pageNum.value = 1
+		pageSize.value = 10
 	};
 </script>
 <style lang="scss" scoped>
@@ -204,15 +257,20 @@
 
 							.status0 {
 								color: var(--mainColor);
-								background-color: var(--fF0Color);
+								background-color: var(--f35BColor);
 							}
-
+							
 							.status1 {
 								color: var(--mainColor);
 								background-color: var(--fFFColor);
 							}
-
+							
 							.status2 {
+								color: var(--mainColor);
+								background-color: var(--fF0Color);
+							}
+							
+							.status3 {
 								color: var(--f99Color);
 								background-color: var(--f9Color);
 							}

+ 9 - 2
pagesHome/team/info.vue

@@ -139,6 +139,8 @@
 	// 列表
 	const list = ref<PropsItem[]>([{ id: 1, name: '测试球队' }, { id: 1, name: '肝帝集团队' }]);
 	// 分页
+	const pageNum = ref(1);
+	const pageSize = ref(10);
 	const total = ref(0);
 	// 详情
 	const info = ref({});
@@ -146,6 +148,8 @@
 	const id = ref('');
 	// 基本信息
 	const config = ref({ logoUrl: '' });
+	// 用户信息
+	const user = ref({});
 	// 字典表
 	const statusList = ref([]);
 	onLoad(async (options) => {
@@ -158,6 +162,7 @@
 	// config信息
 	const searchConfig = async () => {
 		config.value = uni.getStorageSync('config');
+		user.value = uni.getStorageSync('user')
 	};
 	// 查询其他信息
 	const searchOther = async () => {
@@ -184,7 +189,9 @@
 	const searchGame = async () => {
 		if (id.value) {
 			const res = await $api('game/list', 'GET', {
-				// teamId: id.value
+				pageNum: pageNum.value,
+				pageSize: pageSize.value,
+				userId: user.value.id
 			});
 			if (res.code === 200) {
 				list.value = res.rows
@@ -440,7 +447,7 @@
 							}
 
 							.status {
-								font-size: var(--font12Size);
+								font-size: 10px;
 								margin: 0 1vw;
 								padding: 1px 5px;
 							}

+ 63 - 16
unpackage/dist/dev/mp-weixin/pages/home/components/activity.js

@@ -9,13 +9,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   setup(__props) {
     var _a;
     const props = __props;
-    (_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 user = common_vendor.ref({});
     const searchInfo = common_vendor.ref({});
     const list = common_vendor.ref([{ id: 1, name: "测试球队" }, { id: 1, name: "肝帝集团队" }]);
     const pageNum = common_vendor.ref(1);
     const pageSize = common_vendor.ref(10);
     const total = common_vendor.ref(0);
+    const statusList = common_vendor.ref([]);
     const scrollTop = common_vendor.ref(0);
     const is_bottom = common_vendor.ref(false);
     const { config } = common_vendor.toRefs(props);
@@ -25,8 +26,30 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     });
     const searchUser = async () => {
       user.value = common_vendor.index.getStorageSync("user");
+      let res;
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_game_status", status: "0" });
+      if (res.code === 200 && res.total > 0)
+        statusList.value = res.rows;
     };
     const search = async () => {
+      const info = {
+        pageNum: pageNum.value,
+        pageSize: pageSize.value,
+        userId: user.value.id
+      };
+      const res = await $api("game/list", "GET", {
+        ...info,
+        ...searchInfo.value
+      });
+      if (res.code === 200) {
+        list.value = res.rows;
+        total.value = res.total;
+      } else {
+        common_vendor.index.showToast({
+          title: res.msg || "",
+          icon: "error"
+        });
+      }
     };
     const toInput = (e) => {
       if (searchInfo.value.name)
@@ -37,9 +60,26 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     const toInfo = (item) => {
       common_vendor.index.navigateTo({
-        url: `/pagesHome/activity/info?id=${item._id || item.id}&name=${item.name}`
+        url: `/pagesHome/activity/info?id=${item._id || item.id}&name=${item.name || ""}`
       });
     };
+    const getDayOfWeek = (dateString) => {
+      if (dateString) {
+        const date = new Date(dateString);
+        const dayOfWeek = date.getDay();
+        const weekdays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
+        return weekdays[dayOfWeek];
+      } else
+        return "暂无日期";
+    };
+    const getStatus = (value) => {
+      if (value) {
+        const data = statusList.value.find((i) => i.dictValue == value);
+        if (data)
+          return data.dictLabel;
+      } else
+        return "暂无状态";
+    };
     const toPage = () => {
       if (total.value > list.value.length) {
         common_vendor.index.showLoading({
@@ -75,20 +115,27 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           };
         }),
         d: common_vendor.f(list.value, (item, index, i0) => {
-          return {
-            a: common_vendor.t(item.date || "暂无日期"),
-            b: common_vendor.t(item.status_name || "暂无状态"),
-            c: common_vendor.n(item.status == "0" ? "status0" : item.status == "1" ? "status1" : "status2"),
-            d: common_vendor.t(item.name || "暂无活动名称"),
-            e: common_vendor.t(item.red_name || "暂无红方名称"),
-            f: item.red_logo || common_vendor.unref(config).logoUrl,
-            g: common_vendor.t(item.red_score || 0),
-            h: common_vendor.t(item.blue_score || 0),
-            i: item.blue_logo || common_vendor.unref(config).logoUrl,
-            j: common_vendor.t(item.blue_name || "暂无蓝方名称"),
-            k: index,
-            l: common_vendor.o(($event) => toInfo(item), index)
-          };
+          var _a2, _b, _c, _d, _e, _f;
+          return common_vendor.e({
+            a: common_vendor.t(common_vendor.unref(common_vendor.hooks)(item.startTime).format("MM-DD") || "暂无日期"),
+            b: common_vendor.t(getDayOfWeek(item.startTime)),
+            c: common_vendor.t(getStatus(item.status)),
+            d: common_vendor.n(item.status == "0" ? "status0" : item.status == "1" ? "status1" : item.status == "2" ? "status2" : "status3"),
+            e: item.type == "0"
+          }, item.type == "0" ? {
+            f: common_vendor.t(((_a2 = item == null ? void 0 : item.matchInfo) == null ? void 0 : _a2.title) || "友谊赛")
+          } : {
+            g: common_vendor.t(((_b = item == null ? void 0 : item.leagueInfo) == null ? void 0 : _b.title) || "联赛")
+          }, {
+            h: common_vendor.t(((_c = item == null ? void 0 : item.redInfo) == null ? void 0 : _c.name) || "暂无红方名称"),
+            i: ((_d = item == null ? void 0 : item.redInfo) == null ? void 0 : _d.logo) || common_vendor.unref(config).logoUrl,
+            j: common_vendor.t(item.redScore || 0),
+            k: common_vendor.t(item.blueScore || 0),
+            l: ((_e = item == null ? void 0 : item.blueInfo) == null ? void 0 : _e.logo) || common_vendor.unref(config).logoUrl,
+            m: common_vendor.t(((_f = item == null ? void 0 : item.blueInfo) == null ? void 0 : _f.name) || "暂无蓝方名称"),
+            n: index,
+            o: common_vendor.o(($event) => toInfo(item), index)
+          });
         }),
         e: is_bottom.value
       }, is_bottom.value ? {

Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/components/activity.wxml


+ 6 - 2
unpackage/dist/dev/mp-weixin/pages/home/components/activity.wxss

@@ -50,19 +50,23 @@
   font-weight: bold;
 }
 .main .second .other .other_2 .list .list_1 .status.data-v-8f22acf3 {
-  font-size: var(--font12Size);
+  font-size: 10px;
   margin: 0 1vw;
   padding: 1px 5px;
 }
 .main .second .other .other_2 .list .list_1 .status0.data-v-8f22acf3 {
   color: var(--mainColor);
-  background-color: var(--fF0Color);
+  background-color: var(--f35BColor);
 }
 .main .second .other .other_2 .list .list_1 .status1.data-v-8f22acf3 {
   color: var(--mainColor);
   background-color: var(--fFFColor);
 }
 .main .second .other .other_2 .list .list_1 .status2.data-v-8f22acf3 {
+  color: var(--mainColor);
+  background-color: var(--fF0Color);
+}
+.main .second .other .other_2 .list .list_1 .status3.data-v-8f22acf3 {
   color: var(--f99Color);
   background-color: var(--f9Color);
 }

+ 78 - 26
unpackage/dist/dev/mp-weixin/pagesHome/activity/index.js

@@ -3,24 +3,52 @@ const common_vendor = require("../../common/vendor.js");
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "index",
   setup(__props) {
+    var _a;
+    const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
+    const user = common_vendor.ref({});
     const config = common_vendor.ref({ bottomTitle: "", logoUrl: "" });
     const searchInfo = common_vendor.ref({ name: "" });
     const list = common_vendor.ref([{ id: 1, name: "测试球队" }, { id: 1, name: "肝帝集团队" }]);
-    const skip = common_vendor.ref(0);
-    const limit = common_vendor.ref(6);
-    const page = common_vendor.ref(0);
+    const pageNum = common_vendor.ref(1);
+    const pageSize = common_vendor.ref(10);
     const total = common_vendor.ref(0);
+    const statusList = common_vendor.ref([]);
     const scrollTop = common_vendor.ref(0);
     const is_bottom = common_vendor.ref(false);
-    common_vendor.onShow(() => {
-      searchConfig();
-      search();
+    common_vendor.onShow(async () => {
+      await searchUser();
+      await searchConfig();
+      await search();
     });
+    const searchUser = async () => {
+      user.value = common_vendor.index.getStorageSync("user");
+      let res;
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_game_status", status: "0" });
+      if (res.code === 200 && res.total > 0)
+        statusList.value = res.rows;
+    };
     const searchConfig = async () => {
       config.value = common_vendor.index.getStorageSync("config");
     };
     const search = async () => {
-      console.log("查询");
+      const info = {
+        pageNum: pageNum.value,
+        pageSize: pageSize.value,
+        userId: user.value.id
+      };
+      const res = await $api("game/list", "GET", {
+        ...info,
+        ...searchInfo.value
+      });
+      if (res.code === 200) {
+        list.value = res.rows;
+        total.value = res.total;
+      } else {
+        common_vendor.index.showToast({
+          title: res.msg || "",
+          icon: "error"
+        });
+      }
     };
     const toInput = (e) => {
       if (searchInfo.value.name)
@@ -31,17 +59,34 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     const toInfo = (item) => {
       common_vendor.index.navigateTo({
-        url: `/pagesHome/activity/info?id=${item._id || item.id}&name=${item.name}`
+        url: `/pagesHome/activity/info?id=${item._id || item.id}&name=${item.name || ""}`
       });
     };
+    const getDayOfWeek = (dateString) => {
+      if (dateString) {
+        const date = new Date(dateString);
+        const dayOfWeek = date.getDay();
+        const weekdays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
+        return weekdays[dayOfWeek];
+      } else
+        return "暂无日期";
+    };
+    const getStatus = (value) => {
+      if (value) {
+        const data = statusList.value.find((i) => i.dictValue == value);
+        if (data)
+          return data.dictLabel;
+      } else
+        return "暂无状态";
+    };
     const toPage = () => {
       if (total.value > list.value.length) {
         common_vendor.index.showLoading({
           title: "加载中",
           mask: true
         });
-        page.value = page.value + 1;
-        skip.value = page.value * limit.value;
+        pageNum.value = pageNum.value + 1;
+        pageSize.value = pageNum.value * 10;
         search();
         common_vendor.index.hideLoading();
       } else
@@ -56,8 +101,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     const clearPage = () => {
       list.value = [];
-      skip.value = 0;
-      limit.value = 6;
+      pageNum.value = 1;
+      pageSize.value = 10;
     };
     return (_ctx, _cache) => {
       return common_vendor.e({
@@ -69,20 +114,27 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           };
         }),
         d: common_vendor.f(list.value, (item, index, i0) => {
-          return {
-            a: common_vendor.t(item.date || "暂无日期"),
-            b: common_vendor.t(item.status_name || "暂无状态"),
-            c: common_vendor.n(item.status == "0" ? "status0" : item.status == "1" ? "status1" : "status2"),
-            d: common_vendor.t(item.name || "暂无活动名称"),
-            e: common_vendor.t(item.red_name || "暂无红方名称"),
-            f: item.red_logo || config.value.logoUrl,
-            g: common_vendor.t(item.red_score || 0),
-            h: common_vendor.t(item.blue_score || 0),
-            i: item.blue_logo || config.value.logoUrl,
-            j: common_vendor.t(item.blue_name || "暂无蓝方名称"),
-            k: index,
-            l: common_vendor.o(($event) => toInfo(item), index)
-          };
+          var _a2, _b, _c, _d, _e, _f;
+          return common_vendor.e({
+            a: common_vendor.t(common_vendor.unref(common_vendor.hooks)(item.startTime).format("MM-DD") || "暂无日期"),
+            b: common_vendor.t(getDayOfWeek(item.startTime)),
+            c: common_vendor.t(getStatus(item.status)),
+            d: common_vendor.n(item.status == "0" ? "status0" : item.status == "1" ? "status1" : item.status == "2" ? "status2" : "status3"),
+            e: item.type == "0"
+          }, item.type == "0" ? {
+            f: common_vendor.t(((_a2 = item == null ? void 0 : item.matchInfo) == null ? void 0 : _a2.title) || "友谊赛")
+          } : {
+            g: common_vendor.t(((_b = item == null ? void 0 : item.leagueInfo) == null ? void 0 : _b.title) || "联赛")
+          }, {
+            h: common_vendor.t(((_c = item == null ? void 0 : item.redInfo) == null ? void 0 : _c.name) || "暂无红方名称"),
+            i: ((_d = item == null ? void 0 : item.redInfo) == null ? void 0 : _d.logo) || config.value.logoUrl,
+            j: common_vendor.t(item.redScore || 0),
+            k: common_vendor.t(item.blueScore || 0),
+            l: ((_e = item == null ? void 0 : item.blueInfo) == null ? void 0 : _e.logo) || config.value.logoUrl,
+            m: common_vendor.t(((_f = item == null ? void 0 : item.blueInfo) == null ? void 0 : _f.name) || "暂无蓝方名称"),
+            n: index,
+            o: common_vendor.o(($event) => toInfo(item), index)
+          });
         }),
         e: is_bottom.value
       }, is_bottom.value ? {

Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/activity/index.wxml


+ 5 - 1
unpackage/dist/dev/mp-weixin/pagesHome/activity/index.wxss

@@ -56,13 +56,17 @@
 }
 .main .second .other .other_2 .list .list_1 .status0.data-v-2863df91 {
   color: var(--mainColor);
-  background-color: var(--fF0Color);
+  background-color: var(--f35BColor);
 }
 .main .second .other .other_2 .list .list_1 .status1.data-v-2863df91 {
   color: var(--mainColor);
   background-color: var(--fFFColor);
 }
 .main .second .other .other_2 .list .list_1 .status2.data-v-2863df91 {
+  color: var(--mainColor);
+  background-color: var(--fF0Color);
+}
+.main .second .other .other_2 .list .list_1 .status3.data-v-2863df91 {
   color: var(--f99Color);
   background-color: var(--f9Color);
 }

+ 7 - 1
unpackage/dist/dev/mp-weixin/pagesHome/team/info.js

@@ -15,10 +15,13 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     var _a;
     const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     const list = common_vendor.ref([{ id: 1, name: "测试球队" }, { id: 1, name: "肝帝集团队" }]);
+    const pageNum = common_vendor.ref(1);
+    const pageSize = common_vendor.ref(10);
     const total = common_vendor.ref(0);
     const info = common_vendor.ref({});
     const id = common_vendor.ref("");
     const config = common_vendor.ref({ logoUrl: "" });
+    const user = common_vendor.ref({});
     const statusList = common_vendor.ref([]);
     common_vendor.onLoad(async (options) => {
       id.value = options && options.id;
@@ -29,6 +32,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     });
     const searchConfig = async () => {
       config.value = common_vendor.index.getStorageSync("config");
+      user.value = common_vendor.index.getStorageSync("user");
     };
     const searchOther = async () => {
       let res;
@@ -53,7 +57,9 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const searchGame = async () => {
       if (id.value) {
         const res = await $api("game/list", "GET", {
-          // teamId: id.value
+          pageNum: pageNum.value,
+          pageSize: pageSize.value,
+          userId: user.value.id
         });
         if (res.code === 200) {
           list.value = res.rows;

+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/team/info.wxss

@@ -162,7 +162,7 @@
   font-weight: bold;
 }
 .content .position .four .four_2 .list .list_1 .status.data-v-b14ffc51 {
-  font-size: var(--font12Size);
+  font-size: 10px;
   margin: 0 1vw;
   padding: 1px 5px;
 }