Browse Source

球队列表

zs 1 year ago
parent
commit
edef626887

+ 1 - 0
App.vue

@@ -127,6 +127,7 @@
 		--fffColor: #ffffff;
 		--fffColor: #ffffff;
 		--f3CColor: #007AFF;
 		--f3CColor: #007AFF;
 		--fF0Color: #FF0000;
 		--fF0Color: #FF0000;
+		--fFFColor: #FFA500;
 		--f08Color: #008000;
 		--f08Color: #008000;
 		--f35BColor: #35BD7B;
 		--f35BColor: #35BD7B;
 		--f191Color: #191970;
 		--f191Color: #191970;

+ 6 - 4
common/api.js

@@ -1,7 +1,7 @@
 import config from '../config.js';
 import config from '../config.js';
 const getDomain = (uri, method, type) => {
 const getDomain = (uri, method, type) => {
 	let serverUrl = config.serverUrl;
 	let serverUrl = config.serverUrl;
-	if (type && type == 'file') return serverUrl + `/common/upload`;
+	if (type && type == 'file') return serverUrl + uri;
 	else return serverUrl + '/system/' + uri;
 	else return serverUrl + '/system/' + uri;
 };
 };
 
 
@@ -54,12 +54,14 @@ export const requestFile = (uri, method, data, type) => {
 			url: baseUrl,
 			url: baseUrl,
 			filePath: data,
 			filePath: data,
 			name: method || 'file',
 			name: method || 'file',
-			formData: {},
+			header: {
+				Authorization: "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjU1MjI1MzAyLTZlNmYtNDg3ZS1hYTgzLTM5Yzc3M2RmOGVmYyJ9.h3PrqqCYCXZ9E1r9o80maaGJSLz84ghf2zMhoiuCLti-WviFZOuCNA5eMiPPDRXrOF4ES4j7h2LRqp6rIfWL2w",
+			},
 			success: (res) => {
 			success: (res) => {
 				let data = JSON.parse(res.data);
 				let data = JSON.parse(res.data);
-				if (data.errcode != '0') {
+				if (data.code != 200) {
 					return uni.showToast({
 					return uni.showToast({
-						title: data.errmsg,
+						title: data.msg,
 						icon: 'error',
 						icon: 'error',
 					});
 					});
 				}
 				}

+ 186 - 9
pages/home/components/activity.vue

@@ -1,7 +1,33 @@
 <template>
 <template>
-	<view class="content">
-		<view class="one">
-			活动
+	<view class="main">
+		<view class="first">
+			<input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索活动名称">
+		</view>
+		<view class="second">
+			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+				<view class="list-scroll-view">
+					<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
+						<view class="list_1">
+							<view class="left">
+								<image class="image" mode="aspectFill" :src="item.logo||config.logoUrl"></image>
+							</view>
+							<view class="right">
+								<view class="name">
+									{{item.name||'暂无名称'}}
+									<text class="label"
+										:class="[item.user_type=='0'?'label_1':'label_2']">{{item.label||'成员'}}</text>
+								</view>
+								<view class="other">
+									{{item.activity||'暂无活动'}}
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="is_bottom" v-if="is_bottom">
+						<text>{{config.bottomTitle||'到底了!'}}</text>
+					</view>
+				</view>
+			</scroll-view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -10,28 +36,179 @@
 	import { ref } from 'vue';
 	import { ref } from 'vue';
 	//该依赖已内置不需要单独安装
 	//该依赖已内置不需要单独安装
 	import { onShow } from "@dcloudio/uni-app";
 	import { onShow } from "@dcloudio/uni-app";
+	interface PropsItem {
+		name ?: string,
+		activity ?: string,
+		logo ?: string,
+		label ?: string,
+		user_type ?: string,
+	};
 	// 基本信息
 	// 基本信息
-	const config = ref({});
+	const config = ref({ bottomTitle: '', logoUrl: '' });
+	// 查询
+	const searchInfo = ref({ name: '' });
+	// 列表
+	const list = ref<PropsItem[]>([{ name: '测试球队' }, { name: '肝帝集团队' }]);
+	// 分页
+	const skip = ref(0);
+	const limit = ref(6);
+	const page = ref(0);
+	const total = ref(0);
+	// 数据是否触底
+	const scrollTop = ref(0);
+	const is_bottom = ref(false);
+
 	onShow(() => {
 	onShow(() => {
 		searchConfig();
 		searchConfig();
+		search();
 	})
 	})
 	// config信息
 	// config信息
 	const searchConfig = async () => {
 	const searchConfig = async () => {
 		config.value = uni.getStorageSync('config');
 		config.value = uni.getStorageSync('config');
 	};
 	};
+	// 查询列表
+	const search = async () => {
+		console.log('查询');
+	};
+	//查询
+	const toInput = (e : any) => {
+		if (searchInfo.value.name) searchInfo.value.name = e.detail.value
+		searchInfo.value = { name: '' }
+		clearPage();
+		search();
+	};
+	// 球队详情
+	const toInfo = (item : any) => {
+		console.log(item);
+	};
+	// 分页
+	const toPage = () => {
+		if (total.value > list.value.length) {
+			uni.showLoading({
+				title: '加载中',
+				mask: true
+			})
+			page.value = page.value + 1
+			skip.value = page.value * limit.value;
+			search();
+			uni.hideLoading();
+		} else is_bottom.value = true
+	};
+	const toScroll = (e : any) => {
+		let up = scrollTop.value;
+		scrollTop.value = e.detail.scrollTop
+		let num = Math.sign(up - e.detail.scrollTop);
+		if (num == 1) is_bottom.value = false
+	};
+	// 清空数据
+	const clearPage = () => {
+		list.value = []
+		skip.value = 0
+		limit.value = 6
+		page.value = 0
+	};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-	.content {
+	.main {
 		display: flex;
 		display: flex;
 		flex-direction: column;
 		flex-direction: column;
+		width: 100vw;
+		height: 66vh;
 
 
-		.one {
+		.first {
+			display: flex;
+			justify-content: center;
+			align-items: center;
 			padding: 2vw;
 			padding: 2vw;
+			border-bottom: 1px solid var(--f5Color);
+
+			input {
+				width: 100%;
+				padding: 2vw;
+				background-color: var(--f1Color);
+				font-size: var(--font14Size);
+				border-radius: 5px;
+			}
+		}
+
+		.second {
+			position: relative;
+			flex-grow: 1;
+
+			.list {
+				border-bottom: 1px solid var(--f5Color);
+				padding: 3vw;
+
+				.list_1 {
+					display: flex;
+					align-items: center;
 
 
-			.rich-img {
-				width: 100% !important;
-				display: block;
+					.left {
+						width: 15vw;
+
+						.image {
+							width: 15vw;
+							height: 15vw;
+							border-radius: 20vw;
+						}
+					}
+
+					.right {
+						width: 75vw;
+						margin: 0 0 0 2vw;
+
+						.name {
+							font-size: var(--font16Size);
+
+							.label {
+								padding: 3px 6px;
+								font-size: 10px;
+								color: var(--mainColor);
+								border-radius: 2px;
+							}
+
+							.label_1 {
+								background-color: var(--fF0Color);
+							}
+
+							.label_2 {
+								background-color: var(--fFFColor);
+							}
+						}
+
+						.other {
+							margin: 1vw 0 0 0;
+							font-size: var(--font14Size);
+							color: var(--f85Color);
+						}
+					}
+				}
 			}
 			}
 		}
 		}
 	}
 	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		width: 100%;
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: var(--f85Color);
+			font-size: var(--font14Size);
+		}
+	}
 </style>
 </style>

+ 173 - 9
pages/home/components/game.vue

@@ -1,7 +1,34 @@
 <template>
 <template>
-	<view class="content">
-		<view class="one">
-			赛事
+	<view class="main">
+		<view class="first">
+			<input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索赛事名称">
+		</view>
+		<view class="second">
+			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+				<view class="list-scroll-view">
+					<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
+						<view class="list_1">
+							<view class="left">
+								<image class="image" mode="aspectFill" :src="item.logo||config.logoUrl"></image>
+							</view>
+							<view class="right">
+								<view class="name">
+									{{item.name||'暂无名称'}}
+								</view>
+								<view class="other">
+									{{item.address||'暂无地点'}}
+								</view>
+								<view class="other">
+									{{item.address||'暂无赛制'}}
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="is_bottom" v-if="is_bottom">
+						<text>{{config.bottomTitle||'到底了!'}}</text>
+					</view>
+				</view>
+			</scroll-view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -10,28 +37,165 @@
 	import { ref } from 'vue';
 	import { ref } from 'vue';
 	//该依赖已内置不需要单独安装
 	//该依赖已内置不需要单独安装
 	import { onShow } from "@dcloudio/uni-app";
 	import { onShow } from "@dcloudio/uni-app";
+	interface PropsItem {
+		name ?: string,
+		address ?: string,
+		type ?: string,
+		logo ?: string,
+		date ?: string,
+		user_type ?: string,
+	};
 	// 基本信息
 	// 基本信息
-	const config = ref({});
+	const config = ref({ bottomTitle: '', logoUrl: '' });
+	// 查询
+	const searchInfo = ref({ name: '' });
+	// 列表
+	const list = ref<PropsItem[]>([{ name: '肝帝33联赛' }]);
+	// 分页
+	const skip = ref(0);
+	const limit = ref(6);
+	const page = ref(0);
+	const total = ref(0);
+	// 数据是否触底
+	const scrollTop = ref(0);
+	const is_bottom = ref(false);
+
 	onShow(() => {
 	onShow(() => {
 		searchConfig();
 		searchConfig();
+		search();
 	})
 	})
 	// config信息
 	// config信息
 	const searchConfig = async () => {
 	const searchConfig = async () => {
 		config.value = uni.getStorageSync('config');
 		config.value = uni.getStorageSync('config');
 	};
 	};
+	// 查询列表
+	const search = async () => {
+		console.log('查询');
+	};
+	//查询
+	const toInput = (e : any) => {
+		if (searchInfo.value.name) searchInfo.value.name = e.detail.value
+		searchInfo.value = { name: '' }
+		clearPage();
+		search();
+	};
+	// 球队详情
+	const toInfo = (item : any) => {
+		console.log(item);
+	};
+	// 分页
+	const toPage = () => {
+		if (total.value > list.value.length) {
+			uni.showLoading({
+				title: '加载中',
+				mask: true
+			})
+			page.value = page.value + 1
+			skip.value = page.value * limit.value;
+			search();
+			uni.hideLoading();
+		} else is_bottom.value = true
+	};
+	const toScroll = (e : any) => {
+		let up = scrollTop.value;
+		scrollTop.value = e.detail.scrollTop
+		let num = Math.sign(up - e.detail.scrollTop);
+		if (num == 1) is_bottom.value = false
+	};
+	// 清空数据
+	const clearPage = () => {
+		list.value = []
+		skip.value = 0
+		limit.value = 6
+		page.value = 0
+	};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-	.content {
+	.main {
 		display: flex;
 		display: flex;
 		flex-direction: column;
 		flex-direction: column;
+		width: 100vw;
+		height: 66vh;
 
 
-		.one {
+		.first {
+			display: flex;
+			justify-content: center;
+			align-items: center;
 			padding: 2vw;
 			padding: 2vw;
+			border-bottom: 1px solid var(--f5Color);
 
 
-			.rich-img {
-				width: 100% !important;
-				display: block;
+			input {
+				width: 100%;
+				padding: 2vw;
+				background-color: var(--f1Color);
+				font-size: var(--font14Size);
+				border-radius: 5px;
 			}
 			}
 		}
 		}
+
+		.second {
+			position: relative;
+			flex-grow: 1;
+
+			.list {
+				border-bottom: 1px solid var(--f5Color);
+				padding: 3vw;
+
+				.list_1 {
+					display: flex;
+					align-items: center;
+
+					.left {
+						width: 15vw;
+
+						.image {
+							width: 15vw;
+							height: 15vw;
+							border-radius: 20vw;
+						}
+					}
+
+					.right {
+						width: 75vw;
+						margin: 0 0 0 2vw;
+
+						.name {
+							font-size: var(--font16Size);
+						}
+
+						.other {
+							margin: 1vw 0 0 0;
+							font-size: var(--font14Size);
+							color: var(--f85Color);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		width: 100%;
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: var(--f85Color);
+			font-size: var(--font14Size);
+		}
 	}
 	}
 </style>
 </style>

+ 186 - 9
pages/home/components/team.vue

@@ -1,7 +1,33 @@
 <template>
 <template>
-	<view class="content">
-		<view class="one">
-			球队
+	<view class="main">
+		<view class="first">
+			<input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索球队名称">
+		</view>
+		<view class="second">
+			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+				<view class="list-scroll-view">
+					<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
+						<view class="list_1">
+							<view class="left">
+								<image class="image" mode="aspectFill" :src="item.logo||config.logoUrl"></image>
+							</view>
+							<view class="right">
+								<view class="name">
+									{{item.name||'暂无名称'}}
+									<text class="label"
+										:class="[item.user_type=='0'?'label_1':'label_2']">{{item.label||'成员'}}</text>
+								</view>
+								<view class="other">
+									{{item.activity||'暂无活动'}}
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="is_bottom" v-if="is_bottom">
+						<text>{{config.bottomTitle||'到底了!'}}</text>
+					</view>
+				</view>
+			</scroll-view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -10,28 +36,179 @@
 	import { ref } from 'vue';
 	import { ref } from 'vue';
 	//该依赖已内置不需要单独安装
 	//该依赖已内置不需要单独安装
 	import { onShow } from "@dcloudio/uni-app";
 	import { onShow } from "@dcloudio/uni-app";
+	interface PropsItem {
+		name ?: string,
+		activity ?: string,
+		logo ?: string,
+		label ?: string,
+		user_type ?: string,
+	};
 	// 基本信息
 	// 基本信息
-	const config = ref({});
+	const config = ref({ bottomTitle: '', logoUrl: '' });
+	// 查询
+	const searchInfo = ref({ name: '' });
+	// 列表
+	const list = ref<PropsItem[]>([{ name: '测试球队' }, { name: '肝帝集团队' }]);
+	// 分页
+	const skip = ref(0);
+	const limit = ref(6);
+	const page = ref(0);
+	const total = ref(0);
+	// 数据是否触底
+	const scrollTop = ref(0);
+	const is_bottom = ref(false);
+
 	onShow(() => {
 	onShow(() => {
 		searchConfig();
 		searchConfig();
+		search();
 	})
 	})
 	// config信息
 	// config信息
 	const searchConfig = async () => {
 	const searchConfig = async () => {
 		config.value = uni.getStorageSync('config');
 		config.value = uni.getStorageSync('config');
 	};
 	};
+	// 查询列表
+	const search = async () => {
+		console.log('查询');
+	};
+	//查询
+	const toInput = (e : any) => {
+		if (searchInfo.value.name) searchInfo.value.name = e.detail.value
+		searchInfo.value = { name: '' }
+		clearPage();
+		search();
+	};
+	// 球队详情
+	const toInfo = (item : any) => {
+		console.log(item);
+	};
+	// 分页
+	const toPage = () => {
+		if (total.value > list.value.length) {
+			uni.showLoading({
+				title: '加载中',
+				mask: true
+			})
+			page.value = page.value + 1
+			skip.value = page.value * limit.value;
+			search();
+			uni.hideLoading();
+		} else is_bottom.value = true
+	};
+	const toScroll = (e : any) => {
+		let up = scrollTop.value;
+		scrollTop.value = e.detail.scrollTop
+		let num = Math.sign(up - e.detail.scrollTop);
+		if (num == 1) is_bottom.value = false
+	};
+	// 清空数据
+	const clearPage = () => {
+		list.value = []
+		skip.value = 0
+		limit.value = 6
+		page.value = 0
+	};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-	.content {
+	.main {
 		display: flex;
 		display: flex;
 		flex-direction: column;
 		flex-direction: column;
+		width: 100vw;
+		height: 66vh;
 
 
-		.one {
+		.first {
+			display: flex;
+			justify-content: center;
+			align-items: center;
 			padding: 2vw;
 			padding: 2vw;
+			border-bottom: 1px solid var(--f5Color);
+
+			input {
+				width: 100%;
+				padding: 2vw;
+				background-color: var(--f1Color);
+				font-size: var(--font14Size);
+				border-radius: 5px;
+			}
+		}
+
+		.second {
+			position: relative;
+			flex-grow: 1;
+
+			.list {
+				border-bottom: 1px solid var(--f5Color);
+				padding: 3vw;
+
+				.list_1 {
+					display: flex;
+					align-items: center;
 
 
-			.rich-img {
-				width: 100% !important;
-				display: block;
+					.left {
+						width: 15vw;
+
+						.image {
+							width: 15vw;
+							height: 15vw;
+							border-radius: 20vw;
+						}
+					}
+
+					.right {
+						width: 75vw;
+						margin: 0 0 0 2vw;
+
+						.name {
+							font-size: var(--font16Size);
+
+							.label {
+								padding: 3px 6px;
+								font-size: 10px;
+								color: var(--mainColor);
+								border-radius: 2px;
+							}
+
+							.label_1 {
+								background-color: var(--fF0Color);
+							}
+
+							.label_2 {
+								background-color: var(--fFFColor);
+							}
+						}
+
+						.other {
+							margin: 1vw 0 0 0;
+							font-size: var(--font14Size);
+							color: var(--f85Color);
+						}
+					}
+				}
 			}
 			}
 		}
 		}
 	}
 	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		width: 100%;
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: var(--f85Color);
+			font-size: var(--font14Size);
+		}
+	}
 </style>
 </style>

+ 0 - 6
pages/home/index.vue

@@ -204,12 +204,6 @@
 			}
 			}
 		}
 		}
 
 
-		.two {
-			.two_1 {
-				padding: 2vw;
-			}
-		}
-
 		.popup {
 		.popup {
 			height: 25vw;
 			height: 25vw;
 			padding: 2vw 2vw 0 2vw;
 			padding: 2vw 2vw 0 2vw;

+ 25 - 1
pagesMy/basic/index.vue

@@ -5,7 +5,8 @@
 				<view class="value icon">
 				<view class="value icon">
 					<view class="title">头像</view>
 					<view class="title">头像</view>
 					<view class="label">
 					<view class="label">
-						<image class="image" mode="aspectFill" :src="form.icon||config.logoUrl"></image>
+						<image class="image" mode="aspectFill" :src="form.icon||config.logoUrl"
+							@tap="Preview(form.icon||config.logoUrl)"></image>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="remark">
 				<view class="remark">
@@ -93,6 +94,8 @@
 	import { onLoad } from "@dcloudio/uni-app";
 	import { onLoad } from "@dcloudio/uni-app";
 	// 请求接口
 	// 请求接口
 	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
 	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
+	const $config = getCurrentInstance()?.appContext.config.globalProperties.$config;
+	const $apifile = getCurrentInstance()?.appContext.config.globalProperties.$apifile;
 	// openid
 	// openid
 	const openid = computed(() => {
 	const openid = computed(() => {
 		return uni.getStorageSync('openid');
 		return uni.getStorageSync('openid');
@@ -168,6 +171,27 @@
 		const data = placeList.value[e.detail.value]
 		const data = placeList.value[e.detail.value]
 		if (data) form.value.place = data.dictLabel
 		if (data) form.value.place = data.dictLabel
 	};
 	};
+	// 上传图片
+	const Preview = (file) => {
+		uni.chooseImage({
+			count: 1,
+			sizeType: ['original', 'compressed'],
+			sourceType: ['album', 'camera'],
+			success: async function (res) {
+				let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
+				const arr = await $apifile(`/common/upload`, 'file', tempFile[0],
+					'file');
+				if (arr.code == 200) {
+					form.value.icon = arr.url
+				} else {
+					uni.showToast({
+						title: arr.msg,
+						icon: 'none'
+					});
+				}
+			}
+		});
+	};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 	.content {
 	.content {

+ 1 - 0
unpackage/dist/dev/mp-weixin/app.wxss

@@ -2433,6 +2433,7 @@ page {
   --fffColor: #ffffff;
   --fffColor: #ffffff;
   --f3CColor: #007AFF;
   --f3CColor: #007AFF;
   --fF0Color: #FF0000;
   --fF0Color: #FF0000;
+  --fFFColor: #FFA500;
   --f08Color: #008000;
   --f08Color: #008000;
   --f35BColor: #35BD7B;
   --f35BColor: #35BD7B;
   --f191Color: #191970;
   --f191Color: #191970;

+ 6 - 4
unpackage/dist/dev/mp-weixin/common/api.js

@@ -4,7 +4,7 @@ const config = require("../config.js");
 const getDomain = (uri, method, type) => {
 const getDomain = (uri, method, type) => {
   let serverUrl = config.config.serverUrl;
   let serverUrl = config.config.serverUrl;
   if (type && type == "file")
   if (type && type == "file")
-    return serverUrl + `/common/upload`;
+    return serverUrl + uri;
   else
   else
     return serverUrl + "/system/" + uri;
     return serverUrl + "/system/" + uri;
 };
 };
@@ -57,12 +57,14 @@ const requestFile = (uri, method, data, type) => {
       url: baseUrl,
       url: baseUrl,
       filePath: data,
       filePath: data,
       name: method || "file",
       name: method || "file",
-      formData: {},
+      header: {
+        Authorization: "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjU1MjI1MzAyLTZlNmYtNDg3ZS1hYTgzLTM5Yzc3M2RmOGVmYyJ9.h3PrqqCYCXZ9E1r9o80maaGJSLz84ghf2zMhoiuCLti-WviFZOuCNA5eMiPPDRXrOF4ES4j7h2LRqp6rIfWL2w"
+      },
       success: (res) => {
       success: (res) => {
         let data2 = JSON.parse(res.data);
         let data2 = JSON.parse(res.data);
-        if (data2.errcode != "0") {
+        if (data2.code != 200) {
           return common_vendor.index.showToast({
           return common_vendor.index.showToast({
-            title: data2.errmsg,
+            title: data2.msg,
             icon: "error"
             icon: "error"
           });
           });
         }
         }

+ 70 - 2
unpackage/dist/dev/mp-weixin/pages/home/components/activity.js

@@ -3,15 +3,83 @@ const common_vendor = require("../../../common/vendor.js");
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "activity",
   __name: "activity",
   setup(__props) {
   setup(__props) {
-    const config = common_vendor.ref({});
+    const config = common_vendor.ref({ bottomTitle: "", logoUrl: "" });
+    const searchInfo = common_vendor.ref({ name: "" });
+    const list = common_vendor.ref([{ name: "测试球队" }, { name: "肝帝集团队" }]);
+    const skip = common_vendor.ref(0);
+    const limit = common_vendor.ref(6);
+    const page = common_vendor.ref(0);
+    const total = common_vendor.ref(0);
+    const scrollTop = common_vendor.ref(0);
+    const is_bottom = common_vendor.ref(false);
     common_vendor.onShow(() => {
     common_vendor.onShow(() => {
       searchConfig();
       searchConfig();
+      search();
     });
     });
     const searchConfig = async () => {
     const searchConfig = async () => {
       config.value = common_vendor.index.getStorageSync("config");
       config.value = common_vendor.index.getStorageSync("config");
     };
     };
+    const search = async () => {
+      console.log("查询");
+    };
+    const toInput = (e) => {
+      if (searchInfo.value.name)
+        searchInfo.value.name = e.detail.value;
+      searchInfo.value = { name: "" };
+      clearPage();
+      search();
+    };
+    const toInfo = (item) => {
+      console.log(item);
+    };
+    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;
+        search();
+        common_vendor.index.hideLoading();
+      } else
+        is_bottom.value = true;
+    };
+    const toScroll = (e) => {
+      let up = scrollTop.value;
+      scrollTop.value = e.detail.scrollTop;
+      let num = Math.sign(up - e.detail.scrollTop);
+      if (num == 1)
+        is_bottom.value = false;
+    };
+    const clearPage = () => {
+      list.value = [];
+      skip.value = 0;
+      limit.value = 6;
+      page.value = 0;
+    };
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
-      return {};
+      return common_vendor.e({
+        a: common_vendor.o([($event) => searchInfo.value.name = $event.detail.value, toInput]),
+        b: searchInfo.value.name,
+        c: common_vendor.f(list.value, (item, index, i0) => {
+          return {
+            a: item.logo || config.value.logoUrl,
+            b: common_vendor.t(item.name || "暂无名称"),
+            c: common_vendor.t(item.label || "成员"),
+            d: common_vendor.n(item.user_type == "0" ? "label_1" : "label_2"),
+            e: common_vendor.t(item.activity || "暂无活动"),
+            f: index,
+            g: common_vendor.o(($event) => toInfo(item), index)
+          };
+        }),
+        d: is_bottom.value
+      }, is_bottom.value ? {
+        e: common_vendor.t(config.value.bottomTitle || "到底了!")
+      } : {}, {
+        f: common_vendor.o(toPage),
+        g: common_vendor.o(toScroll)
+      });
     };
     };
   }
   }
 });
 });

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/components/activity.wxml


+ 79 - 5
unpackage/dist/dev/mp-weixin/pages/home/components/activity.wxss

@@ -1,13 +1,87 @@
 /* 水平间距 */
 /* 水平间距 */
 /* 水平间距 */
 /* 水平间距 */
-.content.data-v-8f22acf3 {
+.main.data-v-8f22acf3 {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
+  width: 100vw;
+  height: 66vh;
 }
 }
-.content .one.data-v-8f22acf3 {
+.main .first.data-v-8f22acf3 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f5Color);
+}
+.main .first input.data-v-8f22acf3 {
+  width: 100%;
   padding: 2vw;
   padding: 2vw;
+  background-color: var(--f1Color);
+  font-size: var(--font14Size);
+  border-radius: 5px;
+}
+.main .second.data-v-8f22acf3 {
+  position: relative;
+  flex-grow: 1;
+}
+.main .second .list.data-v-8f22acf3 {
+  border-bottom: 1px solid var(--f5Color);
+  padding: 3vw;
+}
+.main .second .list .list_1.data-v-8f22acf3 {
+  display: flex;
+  align-items: center;
+}
+.main .second .list .list_1 .left.data-v-8f22acf3 {
+  width: 15vw;
+}
+.main .second .list .list_1 .left .image.data-v-8f22acf3 {
+  width: 15vw;
+  height: 15vw;
+  border-radius: 20vw;
+}
+.main .second .list .list_1 .right.data-v-8f22acf3 {
+  width: 75vw;
+  margin: 0 0 0 2vw;
+}
+.main .second .list .list_1 .right .name.data-v-8f22acf3 {
+  font-size: var(--font16Size);
+}
+.main .second .list .list_1 .right .name .label.data-v-8f22acf3 {
+  padding: 3px 6px;
+  font-size: 10px;
+  color: var(--mainColor);
+  border-radius: 2px;
+}
+.main .second .list .list_1 .right .name .label_1.data-v-8f22acf3 {
+  background-color: var(--fF0Color);
+}
+.main .second .list .list_1 .right .name .label_2.data-v-8f22acf3 {
+  background-color: var(--fFFColor);
+}
+.main .second .list .list_1 .right .other.data-v-8f22acf3 {
+  margin: 1vw 0 0 0;
+  font-size: var(--font14Size);
+  color: var(--f85Color);
+}
+.scroll-view.data-v-8f22acf3 {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view.data-v-8f22acf3 {
+  display: flex;
+  flex-direction: column;
+}
+.is_bottom.data-v-8f22acf3 {
+  width: 100%;
+  text-align: center;
 }
 }
-.content .one .rich-img.data-v-8f22acf3 {
-  width: 100% !important;
-  display: block;
+.is_bottom text.data-v-8f22acf3 {
+  padding: 2vw 0;
+  display: inline-block;
+  color: var(--f85Color);
+  font-size: var(--font14Size);
 }
 }

+ 69 - 2
unpackage/dist/dev/mp-weixin/pages/home/components/game.js

@@ -3,15 +3,82 @@ const common_vendor = require("../../../common/vendor.js");
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "game",
   __name: "game",
   setup(__props) {
   setup(__props) {
-    const config = common_vendor.ref({});
+    const config = common_vendor.ref({ bottomTitle: "", logoUrl: "" });
+    const searchInfo = common_vendor.ref({ name: "" });
+    const list = common_vendor.ref([{ name: "肝帝33联赛" }]);
+    const skip = common_vendor.ref(0);
+    const limit = common_vendor.ref(6);
+    const page = common_vendor.ref(0);
+    const total = common_vendor.ref(0);
+    const scrollTop = common_vendor.ref(0);
+    const is_bottom = common_vendor.ref(false);
     common_vendor.onShow(() => {
     common_vendor.onShow(() => {
       searchConfig();
       searchConfig();
+      search();
     });
     });
     const searchConfig = async () => {
     const searchConfig = async () => {
       config.value = common_vendor.index.getStorageSync("config");
       config.value = common_vendor.index.getStorageSync("config");
     };
     };
+    const search = async () => {
+      console.log("查询");
+    };
+    const toInput = (e) => {
+      if (searchInfo.value.name)
+        searchInfo.value.name = e.detail.value;
+      searchInfo.value = { name: "" };
+      clearPage();
+      search();
+    };
+    const toInfo = (item) => {
+      console.log(item);
+    };
+    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;
+        search();
+        common_vendor.index.hideLoading();
+      } else
+        is_bottom.value = true;
+    };
+    const toScroll = (e) => {
+      let up = scrollTop.value;
+      scrollTop.value = e.detail.scrollTop;
+      let num = Math.sign(up - e.detail.scrollTop);
+      if (num == 1)
+        is_bottom.value = false;
+    };
+    const clearPage = () => {
+      list.value = [];
+      skip.value = 0;
+      limit.value = 6;
+      page.value = 0;
+    };
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
-      return {};
+      return common_vendor.e({
+        a: common_vendor.o([($event) => searchInfo.value.name = $event.detail.value, toInput]),
+        b: searchInfo.value.name,
+        c: common_vendor.f(list.value, (item, index, i0) => {
+          return {
+            a: item.logo || config.value.logoUrl,
+            b: common_vendor.t(item.name || "暂无名称"),
+            c: common_vendor.t(item.address || "暂无地点"),
+            d: common_vendor.t(item.address || "暂无赛制"),
+            e: index,
+            f: common_vendor.o(($event) => toInfo(item), index)
+          };
+        }),
+        d: is_bottom.value
+      }, is_bottom.value ? {
+        e: common_vendor.t(config.value.bottomTitle || "到底了!")
+      } : {}, {
+        f: common_vendor.o(toPage),
+        g: common_vendor.o(toScroll)
+      });
     };
     };
   }
   }
 });
 });

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/components/game.wxml


+ 67 - 5
unpackage/dist/dev/mp-weixin/pages/home/components/game.wxss

@@ -1,13 +1,75 @@
 /* 水平间距 */
 /* 水平间距 */
 /* 水平间距 */
 /* 水平间距 */
-.content.data-v-a6b1fabb {
+.main.data-v-a6b1fabb {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
+  width: 100vw;
+  height: 66vh;
 }
 }
-.content .one.data-v-a6b1fabb {
+.main .first.data-v-a6b1fabb {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f5Color);
+}
+.main .first input.data-v-a6b1fabb {
+  width: 100%;
   padding: 2vw;
   padding: 2vw;
+  background-color: var(--f1Color);
+  font-size: var(--font14Size);
+  border-radius: 5px;
+}
+.main .second.data-v-a6b1fabb {
+  position: relative;
+  flex-grow: 1;
+}
+.main .second .list.data-v-a6b1fabb {
+  border-bottom: 1px solid var(--f5Color);
+  padding: 3vw;
+}
+.main .second .list .list_1.data-v-a6b1fabb {
+  display: flex;
+  align-items: center;
+}
+.main .second .list .list_1 .left.data-v-a6b1fabb {
+  width: 15vw;
+}
+.main .second .list .list_1 .left .image.data-v-a6b1fabb {
+  width: 15vw;
+  height: 15vw;
+  border-radius: 20vw;
+}
+.main .second .list .list_1 .right.data-v-a6b1fabb {
+  width: 75vw;
+  margin: 0 0 0 2vw;
+}
+.main .second .list .list_1 .right .name.data-v-a6b1fabb {
+  font-size: var(--font16Size);
+}
+.main .second .list .list_1 .right .other.data-v-a6b1fabb {
+  margin: 1vw 0 0 0;
+  font-size: var(--font14Size);
+  color: var(--f85Color);
+}
+.scroll-view.data-v-a6b1fabb {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view.data-v-a6b1fabb {
+  display: flex;
+  flex-direction: column;
+}
+.is_bottom.data-v-a6b1fabb {
+  width: 100%;
+  text-align: center;
 }
 }
-.content .one .rich-img.data-v-a6b1fabb {
-  width: 100% !important;
-  display: block;
+.is_bottom text.data-v-a6b1fabb {
+  padding: 2vw 0;
+  display: inline-block;
+  color: var(--f85Color);
+  font-size: var(--font14Size);
 }
 }

+ 70 - 2
unpackage/dist/dev/mp-weixin/pages/home/components/team.js

@@ -3,15 +3,83 @@ const common_vendor = require("../../../common/vendor.js");
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "team",
   __name: "team",
   setup(__props) {
   setup(__props) {
-    const config = common_vendor.ref({});
+    const config = common_vendor.ref({ bottomTitle: "", logoUrl: "" });
+    const searchInfo = common_vendor.ref({ name: "" });
+    const list = common_vendor.ref([{ name: "测试球队" }, { name: "肝帝集团队" }]);
+    const skip = common_vendor.ref(0);
+    const limit = common_vendor.ref(6);
+    const page = common_vendor.ref(0);
+    const total = common_vendor.ref(0);
+    const scrollTop = common_vendor.ref(0);
+    const is_bottom = common_vendor.ref(false);
     common_vendor.onShow(() => {
     common_vendor.onShow(() => {
       searchConfig();
       searchConfig();
+      search();
     });
     });
     const searchConfig = async () => {
     const searchConfig = async () => {
       config.value = common_vendor.index.getStorageSync("config");
       config.value = common_vendor.index.getStorageSync("config");
     };
     };
+    const search = async () => {
+      console.log("查询");
+    };
+    const toInput = (e) => {
+      if (searchInfo.value.name)
+        searchInfo.value.name = e.detail.value;
+      searchInfo.value = { name: "" };
+      clearPage();
+      search();
+    };
+    const toInfo = (item) => {
+      console.log(item);
+    };
+    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;
+        search();
+        common_vendor.index.hideLoading();
+      } else
+        is_bottom.value = true;
+    };
+    const toScroll = (e) => {
+      let up = scrollTop.value;
+      scrollTop.value = e.detail.scrollTop;
+      let num = Math.sign(up - e.detail.scrollTop);
+      if (num == 1)
+        is_bottom.value = false;
+    };
+    const clearPage = () => {
+      list.value = [];
+      skip.value = 0;
+      limit.value = 6;
+      page.value = 0;
+    };
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
-      return {};
+      return common_vendor.e({
+        a: common_vendor.o([($event) => searchInfo.value.name = $event.detail.value, toInput]),
+        b: searchInfo.value.name,
+        c: common_vendor.f(list.value, (item, index, i0) => {
+          return {
+            a: item.logo || config.value.logoUrl,
+            b: common_vendor.t(item.name || "暂无名称"),
+            c: common_vendor.t(item.label || "成员"),
+            d: common_vendor.n(item.user_type == "0" ? "label_1" : "label_2"),
+            e: common_vendor.t(item.activity || "暂无活动"),
+            f: index,
+            g: common_vendor.o(($event) => toInfo(item), index)
+          };
+        }),
+        d: is_bottom.value
+      }, is_bottom.value ? {
+        e: common_vendor.t(config.value.bottomTitle || "到底了!")
+      } : {}, {
+        f: common_vendor.o(toPage),
+        g: common_vendor.o(toScroll)
+      });
     };
     };
   }
   }
 });
 });

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/components/team.wxml


+ 79 - 5
unpackage/dist/dev/mp-weixin/pages/home/components/team.wxss

@@ -1,13 +1,87 @@
 /* 水平间距 */
 /* 水平间距 */
 /* 水平间距 */
 /* 水平间距 */
-.content.data-v-47929ca4 {
+.main.data-v-47929ca4 {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
+  width: 100vw;
+  height: 66vh;
 }
 }
-.content .one.data-v-47929ca4 {
+.main .first.data-v-47929ca4 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f5Color);
+}
+.main .first input.data-v-47929ca4 {
+  width: 100%;
   padding: 2vw;
   padding: 2vw;
+  background-color: var(--f1Color);
+  font-size: var(--font14Size);
+  border-radius: 5px;
+}
+.main .second.data-v-47929ca4 {
+  position: relative;
+  flex-grow: 1;
+}
+.main .second .list.data-v-47929ca4 {
+  border-bottom: 1px solid var(--f5Color);
+  padding: 3vw;
+}
+.main .second .list .list_1.data-v-47929ca4 {
+  display: flex;
+  align-items: center;
+}
+.main .second .list .list_1 .left.data-v-47929ca4 {
+  width: 15vw;
+}
+.main .second .list .list_1 .left .image.data-v-47929ca4 {
+  width: 15vw;
+  height: 15vw;
+  border-radius: 20vw;
+}
+.main .second .list .list_1 .right.data-v-47929ca4 {
+  width: 75vw;
+  margin: 0 0 0 2vw;
+}
+.main .second .list .list_1 .right .name.data-v-47929ca4 {
+  font-size: var(--font16Size);
+}
+.main .second .list .list_1 .right .name .label.data-v-47929ca4 {
+  padding: 3px 6px;
+  font-size: 10px;
+  color: var(--mainColor);
+  border-radius: 2px;
+}
+.main .second .list .list_1 .right .name .label_1.data-v-47929ca4 {
+  background-color: var(--fF0Color);
+}
+.main .second .list .list_1 .right .name .label_2.data-v-47929ca4 {
+  background-color: var(--fFFColor);
+}
+.main .second .list .list_1 .right .other.data-v-47929ca4 {
+  margin: 1vw 0 0 0;
+  font-size: var(--font14Size);
+  color: var(--f85Color);
+}
+.scroll-view.data-v-47929ca4 {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view.data-v-47929ca4 {
+  display: flex;
+  flex-direction: column;
+}
+.is_bottom.data-v-47929ca4 {
+  width: 100%;
+  text-align: center;
 }
 }
-.content .one .rich-img.data-v-47929ca4 {
-  width: 100% !important;
-  display: block;
+.is_bottom text.data-v-47929ca4 {
+  padding: 2vw 0;
+  display: inline-block;
+  color: var(--f85Color);
+  font-size: var(--font14Size);
 }
 }

+ 0 - 3
unpackage/dist/dev/mp-weixin/pages/home/index.wxss

@@ -39,9 +39,6 @@
   padding: 0 1vw;
   padding: 0 1vw;
   color: var(--f85Color);
   color: var(--f85Color);
 }
 }
-.content .two .two_1.data-v-4978fed5 {
-  padding: 2vw;
-}
 .content .popup.data-v-4978fed5 {
 .content .popup.data-v-4978fed5 {
   height: 25vw;
   height: 25vw;
   padding: 2vw 2vw 0 2vw;
   padding: 2vw 2vw 0 2vw;

+ 49 - 22
unpackage/dist/dev/mp-weixin/pagesMy/basic/index.js

@@ -7,8 +7,10 @@ const cityPicker = () => "../../components/cityPicker.js";
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "index",
   __name: "index",
   setup(__props) {
   setup(__props) {
-    var _a;
+    var _a, _b, _c;
     const $api = (_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;
+    (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
+    const $apifile = (_c = common_vendor.getCurrentInstance()) == null ? void 0 : _c.appContext.config.globalProperties.$apifile;
     const openid = common_vendor.computed(() => {
     const openid = common_vendor.computed(() => {
       return common_vendor.index.getStorageSync("openid");
       return common_vendor.index.getStorageSync("openid");
     });
     });
@@ -76,33 +78,58 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       if (data)
       if (data)
         form.value.place = data.dictLabel;
         form.value.place = data.dictLabel;
     };
     };
+    const Preview = (file) => {
+      common_vendor.index.chooseImage({
+        count: 1,
+        sizeType: ["original", "compressed"],
+        sourceType: ["album", "camera"],
+        success: async function(res) {
+          let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
+          const arr = await $apifile(
+            `/common/upload`,
+            "file",
+            tempFile[0],
+            "file"
+          );
+          if (arr.code == 200) {
+            form.value.icon = arr.url;
+          } else {
+            common_vendor.index.showToast({
+              title: arr.msg,
+              icon: "none"
+            });
+          }
+        }
+      });
+    };
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
       return {
       return {
         a: form.value.icon || config.value.logoUrl,
         a: form.value.icon || config.value.logoUrl,
-        b: form.value.name,
-        c: form.value.nickname,
-        d: common_vendor.t(form.value.sex || "请选择性别"),
-        e: common_vendor.o(sexChange),
-        f: _ctx.index,
-        g: sexList.value,
-        h: form.value.phone,
-        i: common_vendor.o(onSelected),
-        j: common_vendor.p({
+        b: common_vendor.o(($event) => Preview(form.value.icon || config.value.logoUrl)),
+        c: form.value.name,
+        d: form.value.nickname,
+        e: common_vendor.t(form.value.sex || "请选择性别"),
+        f: common_vendor.o(sexChange),
+        g: _ctx.index,
+        h: sexList.value,
+        i: form.value.phone,
+        j: common_vendor.o(onSelected),
+        k: common_vendor.p({
           showSheetView: showSheetView.value,
           showSheetView: showSheetView.value,
           defaultIndexs: [0, 0, 0]
           defaultIndexs: [0, 0, 0]
         }),
         }),
-        k: form.value.height,
-        l: form.value.weight,
-        m: common_vendor.t(form.value.type || "请选择主要项目"),
-        n: common_vendor.o(typeChange),
-        o: _ctx.index,
-        p: typeList.value,
-        q: form.value.ballYears,
-        r: common_vendor.t(form.value.place || "请选择队内位置"),
-        s: common_vendor.o(placeChange),
-        t: _ctx.index,
-        v: placeList.value,
-        w: common_vendor.o(
+        l: form.value.height,
+        m: form.value.weight,
+        n: common_vendor.t(form.value.type || "请选择主要项目"),
+        o: common_vendor.o(typeChange),
+        p: _ctx.index,
+        q: typeList.value,
+        r: form.value.ballYears,
+        s: common_vendor.t(form.value.place || "请选择队内位置"),
+        t: common_vendor.o(placeChange),
+        v: _ctx.index,
+        w: placeList.value,
+        x: common_vendor.o(
           //@ts-ignore
           //@ts-ignore
           (...args) => _ctx.formSubmit && _ctx.formSubmit(...args)
           (...args) => _ctx.formSubmit && _ctx.formSubmit(...args)
         )
         )

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesMy/basic/index.wxml