Browse Source

新增选择比赛类型过程

master
aBin 4 years ago
parent
commit
209924202f
  1. 6
      pages/Athletes/AthAdd.vue
  2. 4
      pages/Athletes/Athletes.vue
  3. 7
      pages/Basics/Basics.vue
  4. 3
      pages/Choice/Choice.vue
  5. 6
      pages/First/Choose.vue
  6. 2
      pages/First/First.vue

6
pages/Athletes/AthAdd.vue

@ -90,6 +90,7 @@ import { upload } from 'api/upload'
import { saveplayer } from 'api/saveplayer'
import { playerInfo } from 'api/playerInfo'
import { group } from 'api/group'
import { mapState } from 'vuex'
// import { photoBase64 } from 'api/photoBase64'
export default {
async onLoad(option) {
@ -212,6 +213,7 @@ import { group } from 'api/group'
showview: 0
}
},
computed:mapState('project',['companyId']),
methods: {
delimg(index) {
const that = this
@ -403,7 +405,7 @@ import { group } from 'api/group'
try{
const params = {
param: {
competeId: that.$store.state.project.companyId,
competeId: that.companyId,
groupRemark: that.groupRemark,//id
playerName: that.list[0].content,//
gender: that.che,//
@ -511,7 +513,7 @@ import { group } from 'api/group'
const params = {
param: {
playerId: that.playerId,
competeId: that.$store.state.project.companyId,
competeId: that.companyId,
groupRemark: that.groupRemark,//id
playerName: that.list[0].content,//
gender: that.che,//

4
pages/Athletes/Athletes.vue

@ -26,6 +26,7 @@
</template>
<script>
import { mapState } from 'vuex'
import { groupplayer } from 'api/groupplayer'
import { delplayer } from 'api/delplayer'
export default {
@ -38,13 +39,14 @@ import { delplayer } from 'api/delplayer'
cha: 2
}
},
computed:mapState('project',['companyId']),
methods: {
async add() {
const that = this
try{
const params = {
param: {
companyId: that.$store.state.project.companyId
companyId: that.companyId
}
}
const data = await groupplayer(params)

7
pages/Basics/Basics.vue

@ -72,12 +72,12 @@ import { savecompany } from 'api/savecompany'
}],
projectId: 0,
che: false,
companyId: '',
sub: true,
chan: false
// imgList: []
}
},
computed:mapState('project',['companyId']),
methods: {
radioChange() {
const that = this
@ -121,11 +121,6 @@ import { savecompany } from 'api/savecompany'
})
}else {
try{
if (that.$store.state.project.companyId - 0 === 0) {
that.companyId = ''
} else {
that.companyId = that.$store.state.project.companyId
}
const params = {
param: {
companyId: that.companyId,

3
pages/Choice/Choice.vue

@ -69,6 +69,7 @@
cha1: 2
}
},
computed: mapState('project',['companyId']),
methods: {
tabSelect(e) {
this.TabCur = e.currentTarget.dataset.id - 0;
@ -137,7 +138,7 @@
try{
const params = {
param: {
companyId: that.$store.state.project.companyId
companyId: that.companyId
}
}
const data = await querycoach(params)

6
pages/First/Choose.vue

@ -5,13 +5,13 @@
<text class="item-content">{{ item.name }}</text>
<view class="item-infor">
<text style="color:#C0C0C0" v-if="item.competeStatus === 0">已结束</text>
<text style="color:#39B54A" v-else-if="item.competeStatus === 2">
<text style="color:#39B54A" v-else-if="item.competeStatus === 1">
正在报名中
</text>
<text style="color:#F0AD4E" v-else>未开始</text>
</view>
<view class="item-time">
<text :style="{color:item.competeStatus === 2?'#39B54A':'#C0C0C0'}" >
<text :style="{color:item.competeStatus === 1?'#39B54A':'#C0C0C0'}" >
({{$moment(+item.startTime).format('MM-DD HH:mm:ss')}} - {{$moment(+item.endTime).format('MM-DD HH:mm:ss')}})
</text>
</view>
@ -39,7 +39,7 @@
},
jump(item) {
console.log(item.competeStatus)
if(item.competeStatus === 2) {
if(item.competeStatus === 1) {
this.setCompanyId(item.id)
this.setType(item.type)
uni.navigateTo({

2
pages/First/First.vue

@ -75,7 +75,7 @@ import { overview } from 'api/overview'
that.query()
}
},
computed: mapState('home',['type']),
computed: mapState('project',['type']),
methods: {
async query () {
const that = this

Loading…
Cancel
Save