Browse Source

“多功能报名bug修复

master
aBin 5 years ago
parent
commit
0f354da0a6
  1. 1
      App.vue
  2. 11
      manifest.json
  3. 6
      pages.json
  4. 52
      pages/Athletes/AthAdd.vue
  5. 10
      pages/Basics/Basics.vue
  6. 4
      pages/Choice/Choice.vue
  7. 26
      pages/Coach/Coach.vue
  8. 17
      pages/First/First.vue
  9. 22
      pages/Leader/Leader.vue
  10. 4
      pages/Login/Login.vue
  11. 20
      pages/Login/Register.vue
  12. 14
      pages/Login/Retrieve.vue
  13. 35
      pages/Project/MatchDetail/MatchDetail.vue
  14. 39
      pages/Project/MatchDetail/TeamDetail.vue
  15. 8
      pages/Project/MatchDetail/TeamMatch.vue
  16. 2
      pages/Project/NumMatch.vue
  17. 2
      pages/Project/PatternMatch.vue
  18. 2
      pages/Project/Project.vue
  19. 2
      pages/read/Privacy.vue
  20. 4
      store/modules/user/state.js

1
App.vue

@ -12,6 +12,7 @@ export default {
var obj = localStorage.getItem('token')
// console.log(JSON.parse(obj))
this.$store.state.user.token = obj
this.$store.state.user.user.token = obj
}
},
created () {

11
manifest.json

@ -101,9 +101,9 @@
"port" : 30022
},
"router" : {
"base" : "/compete"
"base" : "/compete-province"
},
"domain" : "https://test.tall.wiki",
"domain" : "https://www.tall.wiki",
"async" : {
//js
"loading" : "AsyncLoading", //js使
@ -111,6 +111,11 @@
"delay" : 500, // loading js delay loading
"timeout" : 1000 //js error
},
"title" : "2020年山西省学生跳绳比赛报名系统"
"title" : "2020年山西省学生跳绳比赛报名系统",
"optimization" : {
"treeShaking" : {
"enable" : false
}
}
}
}

6
pages.json

@ -98,7 +98,11 @@
}
,{
"path" : "pages/Project/PatternMatch",
"style" : {}
"style" : {
"navigationBarTitleText": "花样赛项目",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#f8f8f8"
}
}
,{
"path" : "pages/Login/Retrieve",

52
pages/Athletes/AthAdd.vue

@ -38,7 +38,7 @@
</view>
<text class='cuIcon-cameraadd'></text>
<image class="img-box" :src="idCardBack"></image>
<icon v-show="idCardBack !== ''" type="icon" class="cuIcon-roundclosefill close-icon" @click="delimg(1)"></icon>
<icon v-show="idCardBack !== null" type="icon" class="cuIcon-roundclosefill close-icon" @click="delimg(1)"></icon>
</view>
</view>
</view>
@ -193,17 +193,17 @@ import { group } from 'api/group'
content: 'insuranceRecord'
}],
idCardFront: '', //
idCardFrontId: '1326409300276547584', //
idCardBack: '', //
idCardBackId: '1326409300276547584', //
idCardFrontId: '', //
idCardBack: null, //
idCardBackId: '', //
idPhone: '', //
idPhoneId: '1326409300276547584', //
idPhoneId: '', //
studentRecord: '', //
studentRecordId: '1326409300276547584', //
studentRecordId: '', //
healthRecord: '', //
healthRecordId: '1326409300276547584', //
healthRecordId: '', //
insuranceRecord: '', //
insuranceRecordId: '1326409300276547584', //
insuranceRecordId: '', //
che: 0,
isId: 0,
playerId: 0,
@ -232,7 +232,7 @@ import { group } from 'api/group'
content: '确定要删除这张图片么?',
success: (res) => {
if (res.confirm) {
that.idCardBack = ''
that.idCardBack = null
that.idCardBackId = ''
}
},
@ -272,7 +272,7 @@ import { group } from 'api/group'
url: '//www.tall.wiki/gateway/mt/file/upload/photo',
filePath: tempFilePaths,
header:{
"Authorization" : "Bearer " + that.$store.state.user.user.token
"Authorization" : "Bearer " + that.$store.state.user.token
},
name: 'file',
success: (res) => {
@ -428,6 +428,13 @@ import { group } from 'api/group'
// console.log(that.$store.state.project.num)
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -435,6 +442,7 @@ import { group } from 'api/group'
})
}
}
}
},
async change() {
const that = this
@ -463,17 +471,16 @@ import { group } from 'api/group'
duration: 1500
})
} else if (that.idCardFrontId === '') {
if (that.idCardBackId === '') {
uni.showToast({
title: '请上传身份证正面照',
icon: 'none',
duration: 1500
})
} else if (that.idCardBackId === '') {
uni.showToast({
title: '请上传身份证反面照',
icon: 'none',
duration: 1500
})
} else {
that.idCardFrontId = that.idCardBackId
that.idCardBackId = ''
}
} else if (that.idPhoneId === '') {
uni.showToast({
title: '请上传一寸证件照',
@ -529,6 +536,19 @@ import { group } from 'api/group'
// console.log(that.$store.state.project.num)
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
duration: 1500
})
}
}
}
}

10
pages/Basics/Basics.vue

@ -26,7 +26,7 @@ import { savecompany } from 'api/savecompany'
export default {
async onLoad (options) {
const that = this
console.log(options)
// console.log(options)
that.projectId = options.id - 0
that.companyId = options.companyId - 0
try{
@ -148,6 +148,13 @@ import { savecompany } from 'api/savecompany'
that.$store.state.project.num++
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -155,6 +162,7 @@ import { savecompany } from 'api/savecompany'
})
}
}
}
},
jump() {
//

4
pages/Choice/Choice.vue

@ -73,10 +73,10 @@
tabSelect(e) {
this.TabCur = e.currentTarget.dataset.id - 0;
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
console.log(this.TabCur,this.cha,this.cha1)
// console.log(this.TabCur,this.cha,this.cha1)
},
async del(num) {
console.log(num)
// console.log(num)
const that = this
uni.showModal({
title: '提示',

26
pages/Coach/Coach.vue

@ -43,7 +43,7 @@
async onLoad(option) {
const that = this
if(option.id) {
console.log(option)
// console.log(option)
try{
const params = {
param: {
@ -51,7 +51,7 @@
}
}
const data = await coachInfo(params)
console.log(data)
// console.log(data)
that.list[0].content = data.name
that.che = data.gender
that.list[2].content = data.phone
@ -107,7 +107,7 @@
radioChange(e) {
const that = this
that.che = e.detail.value - 0
console.log(that.che)
// console.log(that.che)
},
jump(type) {
const that = this
@ -129,13 +129,13 @@
url: '//www.tall.wiki/gateway/mt/file/upload/photo',
filePath: tempFilePaths,
header:{
"Authorization" : "Bearer " + that.$store.state.user.user.token
"Authorization" : "Bearer " + that.$store.state.user.token
},
name: 'file',
success: (res) => {
// console.log(JSON.stringify());
const jsondata = JSON.parse(res.data)
console.log(jsondata)
// console.log(jsondata)
that[`${type}Url`] = jsondata.data.visitUrl
that[`${type}`] = jsondata.data.id
}
@ -227,6 +227,13 @@
},1000)
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -234,6 +241,7 @@
})
}
}
}
},
async change() {
const that = this
@ -294,6 +302,13 @@
},1000)
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -304,6 +319,7 @@
}
}
}
}
</script>
<style lang="scss" scoped>

17
pages/First/First.vue

@ -80,7 +80,7 @@ import { overview } from 'api/overview'
const data = await competeTime(params)
that.projectId = data.id
that.$store.state.project.data = data
console.log(that.$store.state.project.data)
// console.log(that.$store.state.project.data)
if (data.id) {
const params = {
param : {
@ -91,18 +91,27 @@ import { overview } from 'api/overview'
if (datalist.companyId) {
that.companyId = datalist.companyId
}
console.log(datalist.companyId)
// console.log(datalist.companyId)
that.datalist = datalist
that.$store.state.project.companyId = datalist.companyId
console.log(that.$store.state.project.companyId)
// console.log(that.$store.state.project.companyId)
}
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none'
icon: 'none',
duration: 1500
})
}
}
},
jump (num) {
const that = this

22
pages/Leader/Leader.vue

@ -22,7 +22,7 @@ import { coachInfo } from 'api/coachInfo'
async onLoad(option) {
const that = this
if(option.id) {
console.log(option)
// console.log(option)
try{
const params = {
param: {
@ -30,7 +30,7 @@ import { coachInfo } from 'api/coachInfo'
}
}
const data = await coachInfo(params)
console.log(data)
// console.log(data)
that.list[0].content = data.name
that.che = data.gender
that.list[2].content = data.phone
@ -71,7 +71,7 @@ import { coachInfo } from 'api/coachInfo'
radioChange(e) {
const that = this
that.che = e.detail.value - 0
console.log(that.che)
// console.log(that.che)
},
async submit() {
const that = this
@ -123,6 +123,13 @@ import { coachInfo } from 'api/coachInfo'
},1000)
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -130,6 +137,7 @@ import { coachInfo } from 'api/coachInfo'
})
}
}
}
// console.log('')
},
async change() {
@ -183,6 +191,13 @@ import { coachInfo } from 'api/coachInfo'
},1000)
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -193,6 +208,7 @@ import { coachInfo } from 'api/coachInfo'
}
}
}
}
</script>
<style lang="scss" scoped>

4
pages/Login/Login.vue

@ -102,14 +102,14 @@ import { login } from 'api/login'
}
const data = await login(params)
localStorage.setItem("token", data.token);
console.log(data)
// console.log(data)
that.cacheData(data)
uni.navigateTo({
url:`../First/First`
})
} catch(e){
//TODO handle the exception
console.log(e)
// console.log(e)
uni.showToast({
title:e,
icon: "none",

20
pages/Login/Register.vue

@ -484,7 +484,7 @@ import { phone } from 'api/phone'
source: 1
}
const data = await register(params)
console.log(data)
// console.log(data)
if (!data || !data.token) {
uni.showToast({
title: '注册失败',
@ -505,11 +505,19 @@ import { phone } from 'api/phone'
}
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
duration: 1500
})
}
that.safe = 0
}
}
@ -553,7 +561,7 @@ import { phone } from 'api/phone'
}
}
const data = await getcode(params)
console.log(data)
// console.log(data)
if (data.expiredInSeconds) {
that.imgbox = false
uni.showToast({
@ -578,6 +586,13 @@ import { phone } from 'api/phone'
}
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -585,6 +600,7 @@ import { phone } from 'api/phone'
})
}
}
}
},
watch:{
async username(val){

14
pages/Login/Retrieve.vue

@ -78,7 +78,7 @@ import { getcode } from 'api/getcode'
}
const data = await getbase(params)
console.log(data)
// console.log(data)
that.imgsrc = data.imageBase64
that.codeId = data.verificationCodeId
that.imgbox = true
@ -93,7 +93,7 @@ import { getcode } from 'api/getcode'
code: that.code
}
const data = await password(params)
console.log(data)
// console.log(data)
if (!data || !data.token) {
uni.showToast({
title: '修改成功',
@ -103,12 +103,20 @@ import { getcode } from 'api/getcode'
}
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
duration: 1500
})
}
}
},
async submit() {
const that = this
@ -121,7 +129,7 @@ import { getcode } from 'api/getcode'
}
}
const data = await getcode(params)
console.log(data)
// console.log(data)
if (data.expiredInSeconds) {
that.imgbox = false
uni.showToast({

35
pages/Project/MatchDetail/MatchDetail.vue

@ -36,7 +36,8 @@ import { join } from 'api/join'
objdata: {},
submit: 2,
changeList: [],
originalList: []
originalList: [],
joinNum:0
}
},
methods: {
@ -57,12 +58,21 @@ import { join } from 'api/join'
} else {
that.submit = 2
}
for (var i=0; i<data.length; i++) {
for (var j=0; j<data[i].playerList.length; i++) {
if (data[i].playerList[j].joinProject - 0 === 1) {
that.joinNum ++
}
}
}
}catch(e){
//TODO handle the exception
}
},
change (a,b) {
const that = this
that.joinNum = 0
// console.log(that.list[a].playerList[b]) //
var obj = {}
if (that.originalList.length === 0) {
@ -121,6 +131,13 @@ import { join } from 'api/join'
}
}
for (var i=0; i<that.list.length; i++) {
for (var j=0; j<that.list[i].playerList.length; i++) {
if (that.list[i].playerList[j].joinProject - 0 === 1) {
that.joinNum ++
}
}
}
console.log(that.changeList)
},
changeSub() {
@ -139,11 +156,19 @@ import { join } from 'api/join'
}
}
const data = await join(params)
if (that.joinNum - 0 === 0) {
uni.showToast({
title: '取消成功',
icon: 'success',
duration: 1500
})
} else {
uni.showToast({
title: '报名成功',
icon: 'success',
duration: 1500
})
}
that.changeList = []
that.originalList = []
that.query()
@ -152,6 +177,13 @@ import { join } from 'api/join'
}catch(e){
//TODO handle the exception
that.submit = 1
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -161,6 +193,7 @@ import { join } from 'api/join'
}
}
}
}
</script>
<style lang="scss" scoped>

39
pages/Project/MatchDetail/TeamDetail.vue

@ -18,7 +18,7 @@
<view v-show="!list2[0]" class="img-B">
<img src="static/item.png" class="img-box" />
<view>
暂无运动员信息
暂无报名信息
</view>
</view>
</view>
@ -38,10 +38,13 @@
const that = this
that.obj = JSON.parse(option.obj)
that.showms = that.obj.joinRule
if (option.groupRemark - 0) {
if (option.groupRemark) {
// console.log('1')
that.value = option.groupRemark - 0 - 1
that.value1 = option.gender - 0
that.query()
} else {
// console.log('2')
that.query()
}
// console.log(that.obj,option)
@ -166,6 +169,13 @@
// console.log(that.$store.state)
}catch(e){
//TODO handle the exception
if (e === 'error') {
uni.showToast({
title: '提交失败',
icon: 'none',
duration: 1500
})
} else {
uni.showToast({
title: e,
icon: 'none',
@ -173,6 +183,7 @@
})
}
}
}
// }
},
choice(index) {
@ -192,8 +203,18 @@
},
async query() {
const that = this
// console.log('xxx')
try{
const params = {
var params = {}
if (that.obj.joinRule) {
params = {
param: {
companyId: that.$store.state.project.companyId,
projectId: that.obj.id
}
}
} else {
params = {
param: {
companyId: that.$store.state.project.companyId,
gender: that.value1,
@ -201,12 +222,18 @@
projectId: that.obj.id
}
}
that.list2 = []
}
const data = await rulePlayer(params)
that.list2 = []
if (that.obj.joinRule - 0 === 0 && that.value1 - 0 !== 2) {
that.list2 = data[0].playerList
} else {
console.log(data)
} else if (that.obj.joinRule - 0 === 0 && that.value1 - 0 === 2) {
// console.log(data)
for (var i=0;i<data.length;i++) {
that.list2 = that.list2.concat(data[i].playerList)
}
// console.log(that.list2)
} else if (that.obj.joinRule - 0 === 1) {
for (var i=0;i<data.length;i++) {
that.list2 = that.list2.concat(data[i].playerList)
}

8
pages/Project/MatchDetail/TeamMatch.vue

@ -20,7 +20,7 @@
<view class="img-B" v-else>
<img src="static/item.png" class="img-box" />
<view>
暂无运动员信息
暂无报名信息
</view>
</view>
@ -35,7 +35,7 @@
onLoad(option) {
const that = this
var OBJ = JSON.parse(option.obj)
console.log(option.TypeNum,OBJ)
// console.log(option.TypeNum,OBJ)
that.obj = OBJ
that.query()
},
@ -53,7 +53,7 @@
content: '确定要删除整组么?',
success: async (res) => {
if (res.confirm) {
console.log(index)
// console.log(index)
const params = {
param: {
teamId: index
@ -94,7 +94,7 @@
}
const data = await teamProject(params)
that.list = data
console.log(that.list)
// console.log(that.list)
}
},
watch:{

2
pages/Project/NumMatch.vue

@ -20,7 +20,7 @@ import { secondproject } from 'api/secondproject'
}
const data = await secondproject(params)
that.list = data
console.log(data)
// console.log(data)
}catch(e){
//TODO handle the exception
}

2
pages/Project/PatternMatch.vue

@ -20,7 +20,7 @@ import { secondproject } from 'api/secondproject'
}
const data = await secondproject(params)
that.list = data
console.log(data)
// console.log(data)
}catch(e){
//TODO handle the exception
}

2
pages/Project/Project.vue

@ -25,7 +25,7 @@ import { firstproject } from 'api/firstproject'
}
const data = await firstproject(params)
that.list = data
console.log(data)
// console.log(data)
}catch(e){
//TODO handle the exception
}

2
pages/read/Privacy.vue

@ -9,7 +9,7 @@
onLoad(option) {
const that = this
that.type = option.type
that.token = that.$store.state.user.user.token
that.token = that.$store.state.user.token
that.src = `http://test.tall.wiki/compete/index/index.html?type=` + option.type + `&token=` + that.token
},
data() {

4
store/modules/user/state.js

@ -1,6 +1,8 @@
const state = {
token: '',
user: null,
user: {
token:''
},
fingerprint: 0
};

Loading…
Cancel
Save