Browse Source

修改分享邀请用户加入球队

zs 1 year ago
parent
commit
df94714bda

+ 0 - 98
common/dateTimePicker.js

@@ -1,98 +0,0 @@
-function withData(param) {
-	return param < 10 ? '0' + param : '' + param;
-}
-
-function getLoopArray(start, end) {
-	var start = start || 0;
-	var end = end || 1;
-	var array = [];
-	for (var i = start; i <= end; i++) {
-		array.push(withData(i));
-	}
-	return array;
-}
-
-function getMonthDay(year, month) {
-	var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0),
-		array = null;
-
-	switch (month) {
-		case '01':
-		case '03':
-		case '05':
-		case '07':
-		case '08':
-		case '10':
-		case '12':
-			array = getLoopArray(1, 31)
-			break;
-		case '04':
-		case '06':
-		case '09':
-		case '11':
-			array = getLoopArray(1, 30)
-			break;
-		case '02':
-			array = flag ? getLoopArray(1, 29) : getLoopArray(1, 28)
-			break;
-		default:
-			array = '月份格式不正确,请重新输入!'
-	}
-	return array;
-}
-
-function getNewDateArry() {
-	// 当前时间的处理 年月日时分秒
-	var newDate = new Date();
-	var year = withData(newDate.getFullYear()),
-		mont = withData(newDate.getMonth() + 1),
-		date = withData(newDate.getDate()),
-		hour = withData(newDate.getHours()),
-		minu = withData(newDate.getMinutes());
-	seco = withData(newDate.getSeconds());
-	return [year, mont, date, hour, minu, seco];
-}
-
-function dateTimePicker(startYear, endYear, date) {
-
-	// 返回默认显示的数组和联动数组的声明
-	var dateTime = [],
-		dateTimeArray = [
-			[],
-			[],
-			[],
-			[],
-			[],
-			[]
-		];
-	var start = startYear || 1978;
-	var end = endYear || 2100;
-
-	//处理传过来的字符串转化为数组
-	let dataArr = date.split(" ")[0].split('/')
-	let time = date.split(" ")[1].split(':')
-
-	// 默认开始显示数据 如果把自定义值传过来的话就使用自定义时间 否则用当前时间  ...dataArr数组解构
-	var defaultDate = date ? [...dataArr, ...time] : getNewDateArry();
-	// 处理联动列表数据
-	/*年月日 时分秒*/
-	dateTimeArray[0] = getLoopArray(start, end);
-	dateTimeArray[1] = getLoopArray(1, 12);
-	dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
-	dateTimeArray[3] = getLoopArray(0, 23);
-	dateTimeArray[4] = getLoopArray(0, 59);
-	dateTimeArray[5] = getLoopArray(0, 59);
-	//遍历dateTimeArray数组
-	dateTimeArray.forEach((current, index) => {
-		//匹配defaultDate[index]值在current数组中的位置
-		dateTime.push(current.indexOf(defaultDate[index]))
-	});
-	return {
-		dateTimeArray: dateTimeArray,
-		dateTime: dateTime
-	}
-}
-module.exports = {
-	dateTimePicker: dateTimePicker,
-	getMonthDay: getMonthDay
-}

+ 56 - 0
common/share.js

@@ -0,0 +1,56 @@
+import config from '../config.js';
+export default {
+	data() {
+		return {
+			share: {}
+		}
+	},
+	onShareAppMessage(res) { //发送给朋友
+		//禁止二次转发--
+		uni.showShareMenu({
+			withShareTicket: true
+		});
+		wx.updateShareMenu({
+			isPrivateMessage: true,
+			withShareTicket: true,
+			success(res) {
+				console.log('updateShareMenu: ', res);
+			},
+			fail() {}
+		});
+		return {
+			title: config.share.title,
+			path: config.share.path,
+			imageUrl: config.share.imageUrl,
+			success(res) {
+				uni.showToast({
+					title: '分享成功'
+				})
+			},
+			fail(res) {
+				uni.showToast({
+					title: '分享失败',
+					icon: 'none'
+				})
+			}
+		}
+	},
+	onShareTimeline(res) { //分享到朋友圈
+		return {
+			title: config.share.title,
+			path: config.share.path,
+			imageUrl: config.share.imageUrl,
+			success(res) {
+				uni.showToast({
+					title: '分享成功'
+				})
+			},
+			fail(res) {
+				uni.showToast({
+					title: '分享失败',
+					icon: 'none'
+				})
+			}
+		}
+	},
+}

+ 4 - 2
main.js

@@ -23,13 +23,15 @@ import {
 } from '@/common/api.js';
 // 配置文件
 import config from '@/config.js';
-import App from './App.vue'
+import App from './App.vue'
+import  share from '@/common/share.js'
 export function createApp() {
   const app = createSSRApp(App)
   app.config.globalProperties.$api = requestBase;
   app.config.globalProperties.$app = requestApp;
   app.config.globalProperties.$apifile = requestFile;
-  app.config.globalProperties.$config = config;
+  app.config.globalProperties.$config = config;
+  app.mixin(share);
   return {
     app
   }

+ 6 - 0
pages.json

@@ -134,6 +134,12 @@
 					"style": {
 						"navigationBarTitleText": "添加对手"
 					}
+				},
+				{
+					"path": "share/index",
+					"style": {
+						"navigationBarTitleText": "邀请好友入队"
+					}
 				}
 			]
 		},

+ 194 - 0
pagesHome/share/index.vue

@@ -0,0 +1,194 @@
+<template>
+	<view class="content">
+		<view class="one">
+			<view class="one_1">
+				<image class="image" mode="aspectFill" :src="teamInfo.logo||'/static/qiudui.png'">
+				</image>
+				<text>邀您加入球队</text>
+			</view>
+			<view class="one_2">
+				<image class="image" mode="aspectFill" :src="teamInfo.logo||'/static/qiudui.png'">
+				</image>
+				<view class="name">{{teamInfo.name||'暂无名称'}}</view>
+			</view>
+			<view class="one_3">
+				加入我的球队,打造百年荣耀
+			</view>
+			<view class="one_4">
+				<view class="list" v-for="(item, index) in teamList" :key="index">
+					<view class="num">{{item.num}}</view>
+					<view class="name">{{item.name||"暂无"}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="two">用足球比赛管理球队,队长更轻松</view>
+		<view class="thr">
+			<view class="list" v-for="(item, index) in list" :key="index">
+				<view class="title">. {{item.title}}</view>
+			</view>
+		</view>
+		<view class="four" @tap="toAdd">
+			<text>立即入队</text>
+		</view>
+	</view>
+</template>
+
+<script setup lang="ts">
+	import { getCurrentInstance, ref } from 'vue';
+	//该依赖已内置不需要单独安装
+	import { onLoad } from "@dcloudio/uni-app";
+	// 请求接口
+	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
+	// 基本信息
+	const config = ref({ logoUrl: '' });
+	// 详情信息id
+	const id = ref('');
+	// 球队信息
+	const teamInfo = ref({});
+	// 介绍
+	const list = ref([{ title: '球队活动通知 无缝对接微信群助手' }, { title: '球队数据记录 考勤/胜负/进球,记录运动回忆' }, { title: '队费明细管理 缴费收费实时提醒' }, { title: '团队共享相册 高清视频相册共享管理' }]);
+	const teamList = ref([{ name: '入驻', num: '3年' }, { name: '|' }, { name: '活动', num: '21次' }, { name: '|' }, { name: '队员', num: '6人' }]);
+	onLoad(async (options) => {
+		id.value = options && options.id
+		await searchConfig();
+		await search();
+	})
+	// config信息
+	const searchConfig = async () => {
+		config.value = uni.getStorageSync('config');
+	};
+	// 查询
+	const search = async () => {
+		if (id.value) {
+			const res = await $api(`team/${id.value}`, 'GET', {});
+			if (res.code === 200) {
+				if (res.data) teamInfo.value = res.data
+			} else {
+				uni.showToast({
+					title: res.msg || '',
+					icon: 'error',
+				});
+			}
+		}
+	};
+	// 立即加入
+	const toAdd = async () => {
+		console.log('立即加入');
+	};
+</script>
+<style lang="scss" scoped>
+	.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		width: 100vw;
+		height: 100vh;
+		background-color: #0bb78f;
+
+		.one {
+			width: 80vw;
+			height: 60vw;
+			margin: 4vw 0;
+			padding: 4vw 2vw;
+			border-radius: 2px;
+			background-color: var(--mainColor);
+
+			.one_1 {
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				font-size: var(--font14Size);
+				color: var(--f85Color);
+				margin: 2vw;
+
+				.image {
+					width: 10vw;
+					height: 10vw;
+					border-radius: 10vw;
+				}
+
+				text {
+					padding: 0 2vw;
+				}
+			}
+
+			.one_2 {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				margin: 2vw 0;
+				font-size: var(--font14Size);
+
+				.image {
+					width: 15vw;
+					height: 15vw;
+					border-radius: 2px;
+				}
+
+				.name {
+					margin: 2vw 0 0 0;
+				}
+			}
+
+			.one_3 {
+				text-align: center;
+				font-weight: bold;
+				font-size: var(--font18Size);
+				font-family: "Times New Roman", Times, serif;
+				margin: 2vw 0;
+			}
+
+			.one_4 {
+				display: flex;
+				justify-content: space-around;
+				margin: 2vw 0;
+
+				.list {
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+
+					.num {
+						font-weight: bold;
+						font-size: var(--font18Size);
+						color: #0bb78f;
+					}
+
+					.name {
+						font-size: var(--font12Size);
+						color: var(--f85Color);
+					}
+				}
+			}
+		}
+
+		.two {
+			font-weight: bold;
+			font-size: var(--font18Size);
+		}
+
+		.thr {
+			margin: 2vw 0;
+			font-style: italic;
+			font-size: var(--font14Size);
+
+			.list {
+				padding: 2vw;
+				color: var(--mainColor);
+			}
+		}
+
+		.four {
+			margin: 2vw 0 0 0;
+			font-style: italic;
+			color: #0bb78f;
+
+			text {
+				border-radius: 2px;
+				padding: 2vw 32vw;
+				background-color: var(--mainColor);
+			}
+		}
+	}
+</style>

+ 3 - 1
pagesHome/team/index.vue

@@ -61,6 +61,7 @@
 </template>
 
 <script setup lang="ts">
+	import moment from 'moment';
 	import { getCurrentInstance, computed, ref } from 'vue';
 	//该依赖已内置不需要单独安装
 	import { onShow, onLoad } from "@dcloudio/uni-app";
@@ -93,7 +94,7 @@
 	const searchOther = async () => {
 		let res;
 		// 类型
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type' , status: '0'});
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type', status: '0' });
 		if (res.code === 200 && res.total > 0) typeList.value = res.rows
 	};
 	// 类型选择
@@ -144,6 +145,7 @@
 			let data = e.detail.value;
 			data.logo = form.value.logo;
 			data.city = form.value.city;
+			data.create_time = moment().format('YYYY-MM-DD HH:mm:ss');
 			data = delEmptyQueryNodes(data);
 			data.userId = user.value.id;
 			const arr = await $api(`team`, 'POST', data);

+ 35 - 4
pagesHome/team/person.vue

@@ -14,8 +14,10 @@
 		</view>
 		<view class="two">
 			<view class="two_1">
-				<uni-icons custom-prefix="iconfont" type="icon-yaoqinghuida" size="25" color="#121212"></uni-icons>
-				<text>邀请好友加入球队</text>
+				<button size="mini" open-type="share" style="margin: 0;">
+					<uni-icons custom-prefix="iconfont" type="icon-yaoqinghuida" size="20" color="#121212"></uni-icons>
+					<text>邀请好友加入球队</text>
+				</button>
 			</view>
 			<view class="two_2">
 				<view class="list" v-for="(item, index) in list" :key="index" @tap="toInfo(item)">
@@ -77,6 +79,7 @@
 	import { onLoad } from "@dcloudio/uni-app";
 	// 请求接口
 	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
+	const $config = getCurrentInstance()?.appContext.config.globalProperties.$config;
 	interface PropsItem {
 		id ?: number,
 		name ?: string,
@@ -108,12 +111,21 @@
 	const popup = ref(null);
 	// 临时成员
 	const form = ref({});
-
+	// 用户信息
+	const user = ref({});
+	// 球队信息
+	const teamInfo = ref({});
 	onLoad(async (options) => {
 		id.value = options && options.id
+		await searchUser();
 		await searchConfig();
 		await search();
+		await searchShare();
 	})
+	// 用户信息
+	const searchUser = async () => {
+		user.value = uni.getStorageSync('user');
+	};
 	// config信息
 	const searchConfig = async () => {
 		config.value = uni.getStorageSync('config');
@@ -124,12 +136,24 @@
 			uni.setNavigationBarTitle({
 				title: `球队阵容(${total.value})`
 			});
+			const res = await $api(`team/${id.value}`, 'GET', {});
+			if (res.code === 200) {
+				if (res.data) teamInfo.value = res.data
+			} else {
+				uni.showToast({
+					title: res.msg || '',
+					icon: 'error',
+				});
+			}
 		}
 	};
 	// 用户详细信息
 	const toInfo = async (item : any) => {
+		// uni.navigateTo({
+		// 	url: `/pagesHome/person/index?id=${item._id || item.id}`,
+		// })
 		uni.navigateTo({
-			url: `/pagesHome/person/index?id=${item._id || item.id}`,
+			url: `/pagesHome/share/index?id=${id.value}`,
 		})
 	};
 	// 去排序
@@ -162,6 +186,13 @@
 		}
 		sortList.value = list
 	};
+	// 邀请分享配置
+	const searchShare = () => {
+		$config.share = {
+			title: `${user.value.name || '暂无名称'}邀请你加入${teamInfo.value.name || '暂无团队'}`,
+			path: `/pagesHome/share/index?id=${id.value}` //后面是路径上要传递的参数
+		}
+	}
 	// 创建临时成员
 	const toCreate = () => {
 		popup.value.open();

+ 3 - 0
unpackage/dist/dev/mp-weixin/app.js

@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
 const common_vendor = require("./common/vendor.js");
 const common_api = require("./common/api.js");
 const config = require("./config.js");
+const common_share = require("./common/share.js");
 if (!Math) {
   "./pages/index/index.js";
   "./pages/home/index.js";
@@ -22,6 +23,7 @@ if (!Math) {
   "./pagesHome/person/index.js";
   "./pagesHome/create/index.js";
   "./pagesHome/create/person.js";
+  "./pagesHome/share/index.js";
   "./pagesMy/basic/index.js";
 }
 const _sfc_main = {
@@ -70,6 +72,7 @@ function createApp() {
   app.config.globalProperties.$app = common_api.requestApp;
   app.config.globalProperties.$apifile = common_api.requestFile;
   app.config.globalProperties.$config = config.config;
+  app.mixin(common_share.share);
   return {
     app
   };

+ 2 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -22,7 +22,8 @@
         "activity/info",
         "person/index",
         "create/index",
-        "create/person"
+        "create/person",
+        "share/index"
       ]
     },
     {

+ 59 - 0
unpackage/dist/dev/mp-weixin/common/share.js

@@ -0,0 +1,59 @@
+"use strict";
+const common_vendor = require("./vendor.js");
+const config = require("../config.js");
+const share = {
+  data() {
+    return {
+      share: {}
+    };
+  },
+  onShareAppMessage(res) {
+    common_vendor.index.showShareMenu({
+      withShareTicket: true
+    });
+    common_vendor.wx$1.updateShareMenu({
+      isPrivateMessage: true,
+      withShareTicket: true,
+      success(res2) {
+        console.log("updateShareMenu: ", res2);
+      },
+      fail() {
+      }
+    });
+    return {
+      title: config.config.share.title,
+      path: config.config.share.path,
+      imageUrl: config.config.share.imageUrl,
+      success(res2) {
+        common_vendor.index.showToast({
+          title: "分享成功"
+        });
+      },
+      fail(res2) {
+        common_vendor.index.showToast({
+          title: "分享失败",
+          icon: "none"
+        });
+      }
+    };
+  },
+  onShareTimeline(res) {
+    return {
+      title: config.config.share.title,
+      path: config.config.share.path,
+      imageUrl: config.config.share.imageUrl,
+      success(res2) {
+        common_vendor.index.showToast({
+          title: "分享成功"
+        });
+      },
+      fail(res2) {
+        common_vendor.index.showToast({
+          title: "分享失败",
+          icon: "none"
+        });
+      }
+    };
+  }
+};
+exports.share = share;

+ 6 - 0
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -11177,6 +11177,12 @@ const subPackages = [
         style: {
           navigationBarTitleText: "添加对手"
         }
+      },
+      {
+        path: "share/index",
+        style: {
+          navigationBarTitleText: "邀请好友入队"
+        }
       }
     ]
   },

+ 62 - 0
unpackage/dist/dev/mp-weixin/pagesHome/share/index.js

@@ -0,0 +1,62 @@
+"use strict";
+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 config = common_vendor.ref({ logoUrl: "" });
+    const id = common_vendor.ref("");
+    const teamInfo = common_vendor.ref({});
+    const list = common_vendor.ref([{ title: "球队活动通知 无缝对接微信群助手" }, { title: "球队数据记录 考勤/胜负/进球,记录运动回忆" }, { title: "队费明细管理 缴费收费实时提醒" }, { title: "团队共享相册 高清视频相册共享管理" }]);
+    const teamList = common_vendor.ref([{ name: "入驻", num: "3年" }, { name: "|" }, { name: "活动", num: "21次" }, { name: "|" }, { name: "队员", num: "6人" }]);
+    common_vendor.onLoad(async (options) => {
+      id.value = options && options.id;
+      await searchConfig();
+      await search();
+    });
+    const searchConfig = async () => {
+      config.value = common_vendor.index.getStorageSync("config");
+    };
+    const search = async () => {
+      if (id.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 toAdd = async () => {
+      console.log("立即加入");
+    };
+    return (_ctx, _cache) => {
+      return {
+        a: teamInfo.value.logo || "/static/qiudui.png",
+        b: teamInfo.value.logo || "/static/qiudui.png",
+        c: common_vendor.t(teamInfo.value.name || "暂无名称"),
+        d: common_vendor.f(teamList.value, (item, index, i0) => {
+          return {
+            a: common_vendor.t(item.num),
+            b: common_vendor.t(item.name || "暂无"),
+            c: index
+          };
+        }),
+        e: common_vendor.f(list.value, (item, index, i0) => {
+          return {
+            a: common_vendor.t(item.title),
+            b: index
+          };
+        }),
+        f: common_vendor.o(toAdd)
+      };
+    };
+  }
+});
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-167827a6"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/share/index.vue"]]);
+wx.createPage(MiniProgramPage);

+ 4 - 0
unpackage/dist/dev/mp-weixin/pagesHome/share/index.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "邀请好友入队",
+  "usingComponents": {}
+}

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


+ 99 - 0
unpackage/dist/dev/mp-weixin/pagesHome/share/index.wxss

@@ -0,0 +1,99 @@
+/* 水平间距 */
+/* 水平间距 */
+.content.data-v-167827a6 {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  width: 100vw;
+  height: 100vh;
+  background-color: #0bb78f;
+}
+.content .one.data-v-167827a6 {
+  width: 80vw;
+  height: 60vw;
+  margin: 4vw 0;
+  padding: 4vw 2vw;
+  border-radius: 2px;
+  background-color: var(--mainColor);
+}
+.content .one .one_1.data-v-167827a6 {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  font-size: var(--font14Size);
+  color: var(--f85Color);
+  margin: 2vw;
+}
+.content .one .one_1 .image.data-v-167827a6 {
+  width: 10vw;
+  height: 10vw;
+  border-radius: 10vw;
+}
+.content .one .one_1 text.data-v-167827a6 {
+  padding: 0 2vw;
+}
+.content .one .one_2.data-v-167827a6 {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin: 2vw 0;
+  font-size: var(--font14Size);
+}
+.content .one .one_2 .image.data-v-167827a6 {
+  width: 15vw;
+  height: 15vw;
+  border-radius: 2px;
+}
+.content .one .one_2 .name.data-v-167827a6 {
+  margin: 2vw 0 0 0;
+}
+.content .one .one_3.data-v-167827a6 {
+  text-align: center;
+  font-weight: bold;
+  font-size: var(--font18Size);
+  font-family: "Times New Roman" , Times, serif;
+  margin: 2vw 0;
+}
+.content .one .one_4.data-v-167827a6 {
+  display: flex;
+  justify-content: space-around;
+  margin: 2vw 0;
+}
+.content .one .one_4 .list.data-v-167827a6 {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+.content .one .one_4 .list .num.data-v-167827a6 {
+  font-weight: bold;
+  font-size: var(--font18Size);
+  color: #0bb78f;
+}
+.content .one .one_4 .list .name.data-v-167827a6 {
+  font-size: var(--font12Size);
+  color: var(--f85Color);
+}
+.content .two.data-v-167827a6 {
+  font-weight: bold;
+  font-size: var(--font18Size);
+}
+.content .thr.data-v-167827a6 {
+  margin: 2vw 0;
+  font-style: italic;
+  font-size: var(--font14Size);
+}
+.content .thr .list.data-v-167827a6 {
+  padding: 2vw;
+  color: var(--mainColor);
+}
+.content .four.data-v-167827a6 {
+  margin: 2vw 0 0 0;
+  font-style: italic;
+  color: #0bb78f;
+}
+.content .four text.data-v-167827a6 {
+  border-radius: 2px;
+  padding: 2vw 32vw;
+  background-color: var(--mainColor);
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/team/index.js

@@ -77,6 +77,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         let data = e.detail.value;
         data.logo = form.value.logo;
         data.city = form.value.city;
+        data.create_time = common_vendor.hooks().format("YYYY-MM-DD HH:mm:ss");
         data = delEmptyQueryNodes(data);
         data.userId = user.value.id;
         const arr = await $api(`team`, "POST", data);

+ 30 - 5
unpackage/dist/dev/mp-weixin/pagesHome/team/person.js

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

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