diff --git a/App.vue b/App.vue
index cd4f1ec..d2b8335 100644
--- a/App.vue
+++ b/App.vue
@@ -2,8 +2,17 @@
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
- async onLaunch(options) {
-
+ async onLaunch() {
+ if (localStorage.getItem('user')) {
+ var obj = localStorage.getItem('user')
+ // console.log(JSON.parse(obj))
+ this.cacheData(obj)
+ }
+ if (localStorage.getItem('token')) {
+ var obj = localStorage.getItem('token')
+ // console.log(JSON.parse(obj))
+ this.$store.state.user.token = obj
+ }
},
created () {
//在页面加载时读取sessionStorage里的状态信息
@@ -14,6 +23,17 @@ export default {
window.addEventListener("beforeunload",()=>{
sessionStorage.setItem("store",JSON.stringify(this.$store.state))
})
+ },
+ methods:{
+ ...mapMutations('user', ['setToken', 'setUser','setBindMsg']),
+ // 缓存user data
+ cacheData(data) {
+ const { token } = data;
+ this.setToken(token);
+ this.setUser(data);
+ // console.log(this.$store.state.user.token)
+ // console.log(this.$store.state.user.user.wxInfo)
+ }
}
};
diff --git a/api/delTeam.js b/api/delTeam.js
new file mode 100644
index 0000000..0c0f69a
--- /dev/null
+++ b/api/delTeam.js
@@ -0,0 +1,5 @@
+const proxyUrl = '/mt';
+import { http } from 'plugins/request/index';
+
+// 删除已经报名的队伍
+export const delTeam = params => http.post(`${proxyUrl}/province/del/team`, params);
diff --git a/api/rulePlayer.js b/api/rulePlayer.js
new file mode 100644
index 0000000..b866ed1
--- /dev/null
+++ b/api/rulePlayer.js
@@ -0,0 +1,5 @@
+const proxyUrl = '/mt';
+import { http } from 'plugins/request/index';
+
+// 团体报名查询可以参加和已经参加的选手
+export const rulePlayer = params => http.post(`${proxyUrl}/province/rule/player`, params);
\ No newline at end of file
diff --git a/api/teamProject.js b/api/teamProject.js
new file mode 100644
index 0000000..e4b32ef
--- /dev/null
+++ b/api/teamProject.js
@@ -0,0 +1,5 @@
+const proxyUrl = '/mt';
+import { http } from 'plugins/request/index';
+
+// 查找团体比赛已报名的选手信息
+export const teamProject = params => http.post(`${proxyUrl}/province/teamProject/player`, params);
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index 3421e34..d9c580e 100644
--- a/manifest.json
+++ b/manifest.json
@@ -98,12 +98,12 @@
}
},
"https" : false,
- "port" : ""
+ "port" : 30022
},
"router" : {
- "base" : ""
+ "base" : "/compete"
},
- "domain" : "https//:www.tall.wiki",
+ "domain" : "https://test.tall.wiki",
"async" : {
//页面js异步加载配置
"loading" : "AsyncLoading", //页面js加载时使用的组件(需注册为全局组件)
diff --git a/pages.json b/pages.json
index b46c194..07c76cf 100644
--- a/pages.json
+++ b/pages.json
@@ -27,7 +27,7 @@
,{
"path" : "pages/Choice/Choice",
"style" : {
- "navigationBarTitleText": "教练及领队信息",
+ "navigationBarTitleText": "领队及教练信息",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#f8f8f8"
}
@@ -74,11 +74,7 @@
}
,{
"path" : "pages/Project/MatchDetail/MatchDetail",
- "style" : {
- "navigationBarTitleText": "队员添加",
- "navigationBarTextStyle": "black",
- "navigationBarBackgroundColor": "#f8f8f8"
- }
+ "style" : {}
}
,{
"path" : "pages/Login/Register",
diff --git a/pages/Athletes/AthAdd.vue b/pages/Athletes/AthAdd.vue
index ae68ee9..5b27585 100644
--- a/pages/Athletes/AthAdd.vue
+++ b/pages/Athletes/AthAdd.vue
@@ -193,17 +193,17 @@ import { group } from 'api/group'
content: 'insuranceRecord'
}],
idCardFront: '', //身份证正面照片 或户口本照片 (文件类型)
- idCardFrontId: '', //身份证正面照片 或户口本照片 (文件类型)
+ idCardFrontId: '1326409300276547584', //身份证正面照片 或户口本照片 (文件类型)
idCardBack: '', //身份证反面照片(文件类型)
- idCardBackId: '', //身份证反面照片(文件类型)
+ idCardBackId: '1326409300276547584', //身份证反面照片(文件类型)
idPhone: '', //一寸证件照(文件类型)
- idPhoneId: '', //一寸证件照(文件类型)
+ idPhoneId: '1326409300276547584', //一寸证件照(文件类型)
studentRecord: '', //学籍证明(文件类型)
- studentRecordId: '', //学籍证明(文件类型)
+ studentRecordId: '1326409300276547584', //学籍证明(文件类型)
healthRecord: '', //体检证明(文件类型)
- healthRecordId: '', //体检证明(文件类型)
+ healthRecordId: '1326409300276547584', //体检证明(文件类型)
insuranceRecord: '', //保险证明(文件类型)
- insuranceRecordId: '', //保险证明(文件类型)
+ insuranceRecordId: '1326409300276547584', //保险证明(文件类型)
che: 0,
isId: 0,
playerId: 0,
diff --git a/pages/Choice/Choice.vue b/pages/Choice/Choice.vue
index b59aa14..7556953 100644
--- a/pages/Choice/Choice.vue
+++ b/pages/Choice/Choice.vue
@@ -174,7 +174,7 @@
watch:{
'$store.state.project.num'(val) {
const that = this
- that.query()()
+ that.query()
}
}
}
diff --git a/pages/First/First.vue b/pages/First/First.vue
index e8532bc..3762a5c 100644
--- a/pages/First/First.vue
+++ b/pages/First/First.vue
@@ -30,7 +30,7 @@
import { competeTime } from 'api/competeTime'
import { overview } from 'api/overview'
export default {
- onLoad () {
+ created () {
this.query()
},
data() {
diff --git a/pages/Login/Login.vue b/pages/Login/Login.vue
index 993e1ac..2d7dcc9 100644
--- a/pages/Login/Login.vue
+++ b/pages/Login/Login.vue
@@ -34,6 +34,14 @@
import { mapState, mapMutations, mapActions } from 'vuex';
import { login } from 'api/login'
export default {
+ onLoad() {
+ const that = this
+ if (that.$store.state.user.token) {
+ uni.navigateTo({
+ url:`../First/First`
+ })
+ }
+ },
data() {
return {
userphone:'',
@@ -93,6 +101,7 @@ import { login } from 'api/login'
type: 3
}
const data = await login(params)
+ localStorage.setItem("token", data.token);
console.log(data)
that.cacheData(data)
uni.navigateTo({
diff --git a/pages/Project/MatchDetail/MatchDetail.vue b/pages/Project/MatchDetail/MatchDetail.vue
index b5efe2c..d2ca140 100644
--- a/pages/Project/MatchDetail/MatchDetail.vue
+++ b/pages/Project/MatchDetail/MatchDetail.vue
@@ -1,5 +1,9 @@
+
+ {{ objdata.name }}
+
+
添加报名
@@ -160,6 +164,22 @@ import { join } from 'api/join'
diff --git a/pages/Project/MatchDetail/TeamMatch.vue b/pages/Project/MatchDetail/TeamMatch.vue
index b160fd0..f58679f 100644
--- a/pages/Project/MatchDetail/TeamMatch.vue
+++ b/pages/Project/MatchDetail/TeamMatch.vue
@@ -4,19 +4,18 @@
{{ obj.name }}
-
-
-
- {{ item.name }}
-
-
-
-
- {{ a }}
-
+
+
+ {{ item.groupName }}
+ 不限组别
+
+
+
+
+ {{ a.playerName }}
-
+
@@ -24,53 +23,58 @@
暂无运动员信息
+
添加