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

4
pages/Athletes/Athletes.vue

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

7
pages/Basics/Basics.vue

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

3
pages/Choice/Choice.vue

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

6
pages/First/Choose.vue

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

2
pages/First/First.vue

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

Loading…
Cancel
Save