teams.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="size32 c3">
  3. <view class="select-head">
  4. <u-navbar :leftText="parent.title" bgColor="transparent" leftIconColor="#fff" :titleStyle="{color:'#fff'}" :fixed="false" leftIconSize="48" :autoBack="true"></u-navbar>
  5. </view>
  6. <view class="mg-tp24 mg-bt24 text-center size28 c9">
  7. <!-- Full squad for this tour -->
  8. {{ $t('match.lab32') }}
  9. </view>
  10. <view class="" v-for="(item,index) in tournament_list" :key="index">
  11. <view class="bgE5 title flex">
  12. <text class="Bold">{{item.name}}</text>
  13. <text>{{item.count}}</text>
  14. </view>
  15. <view class="stats-main mg-tp12">
  16. <view class="stats-main-content">
  17. <u-row v-for="(item1,index1) in item.players" :key="index1" justify="space-between" @click="$toUrl('./detail?id=' + item1.player_id)">
  18. <view class="flex-start">
  19. <image :src="item1.players_logo || '/static/image/common/[email protected]'" mode="aspectFit" class="avatar"></image>
  20. <view>
  21. <text class="size32 c3 Bold">{{item1.players_name}}</text>
  22. <view class="mg-tp5 size c3 font28">
  23. {{item.name == 'batters'?item1.batting_style:item.name == 'bowlers'?item1.bowling_style:item1.batting_style+','+item1.bowling_style}}
  24. </view>
  25. </view>
  26. </view>
  27. </u-row>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. parent:{
  38. title:'',
  39. },
  40. tournament_list:{}
  41. };
  42. },
  43. onLoad(option) {
  44. this.parent = option;
  45. this.get_tournament_team_list()
  46. },
  47. methods:{
  48. /* 获取团队列表 */
  49. get_tournament_team_list() {
  50. uni.$u.http.post('/api/Cricket/get_tournament_team_list',{competitor_id:this.parent.id}).then(res=>{
  51. console.log('----------------');
  52. for (let var1 in res) {
  53. res[var1].name = var1
  54. }
  55. // console.log(res);
  56. this.tournament_list = res
  57. }).catch(res=>{})
  58. },
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. .title{
  64. padding: 24rpx 28rpx;
  65. font-size: 28rpx;
  66. }
  67. .select-head {
  68. position: sticky;
  69. top: 0;
  70. z-index: 99;
  71. background-color: $color1;
  72. .select-tab {
  73. padding: 0 28rpx;
  74. margin-top: 20rpx;
  75. }
  76. }
  77. .stats-main{
  78. .stats-main-content{
  79. background: #FFFFFF;
  80. .u-row{
  81. border-bottom: 1rpx solid #E5E5E5;
  82. padding: 24rpx 28rpx;
  83. .avatar{
  84. width: 90rpx;
  85. height: 90rpx;
  86. border-radius: 50%;
  87. margin-right: 16rpx;
  88. }
  89. .arrow-right{
  90. width: 48rpx;
  91. height: 48rpx;
  92. }
  93. }
  94. }
  95. }
  96. </style>