info.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <view class="content">
  3. <view class="one">
  4. <view class="left" @tap="toEdit(info)">
  5. <view class="left_1">
  6. <image class="image" mode="aspectFill" :src="info.logo||'/static/qiudui.png'">
  7. </image>
  8. </view>
  9. <view class="right_1">
  10. <view class="name">{{info.name||'暂无名称'}}</view>
  11. <view class="ranking">{{info.ranking||'暂无排名'}}</view>
  12. </view>
  13. </view>
  14. <view class="right">
  15. <button type="warn" size="mini" @tap="toSave">
  16. <uni-icons type="plusempty" size="12" color="#ffffff"></uni-icons>
  17. <text>创建</text>
  18. </button>
  19. </view>
  20. </view>
  21. <view class="two">
  22. <view class="two_1">
  23. 创建活动,还可以微信、短信通知队员报名
  24. </view>
  25. <view class="two_2">
  26. <button type="warn" size="mini" @tap="toSave">创建</button>
  27. </view>
  28. <view class="two_3">
  29. <uni-icons type="list" size="18"></uni-icons>
  30. <text>查看全部活动</text>
  31. </view>
  32. </view>
  33. <view class="thr">
  34. <view class="thr_1">
  35. <view class="list" v-for="(item, index) in menuList" :key="index" @tap="toInfo(item)">
  36. <uni-icons custom-prefix="iconfont" :type="item.icon" size="25" :color="item.color"></uni-icons>
  37. <view class="name">{{item.name}}</view>
  38. </view>
  39. </view>
  40. <view class="thr_2">
  41. <view class="fraction">
  42. <view class="top">{{info.score||0}}</view>
  43. <view class="bottom">总比赛</view>
  44. </view>
  45. <view class="circle">
  46. <circle :pro="16/100" :border_back_color="'#f1f1f1'" :border_color="'#FF0000'" content="16">
  47. </circle>
  48. <text>胜</text>
  49. </view>
  50. <view class="circle">
  51. <circle :pro="5/100" :border_back_color="'#f1f1f1'" :border_color="'#35BD7B'" content="5"></circle>
  52. <text>平</text>
  53. </view>
  54. <view class="circle">
  55. <circle :pro="17/100" :border_back_color="'#f1f1f1'" :border_color="'#FFA500'" content="17">
  56. </circle>
  57. <text>负</text>
  58. </view>
  59. <uni-icons type="forward" size="25" color="#858585"></uni-icons>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script setup lang="ts">
  65. import { getCurrentInstance, ref } from 'vue';
  66. import circle from './components/circle.vue';
  67. //该依赖已内置不需要单独安装
  68. import { onLoad } from "@dcloudio/uni-app";
  69. // 请求接口
  70. const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
  71. // 详情
  72. const info = ref({ id: 1, name: '测试球队', score: '39' });
  73. // 详情信息id
  74. const id = ref('');
  75. onLoad(async (options) => {
  76. id.value = options && options.id
  77. await search();
  78. })
  79. // 查询
  80. const search = async () => {
  81. if (id.value) { }
  82. };
  83. // 标签列表
  84. const menuList = ref([
  85. { name: '队员', icon: 'icon-a-14-chengyuanguanli', color: '#333333' },
  86. { name: '相册', icon: 'icon-xiangce', color: '#333333' },
  87. { name: '账本', icon: 'icon-zhangben', color: '#333333' },
  88. { name: '战术板', icon: 'icon-cricket-pitch', color: '#333333' },
  89. ]);
  90. // 修改
  91. const toEdit = (item : any) => {
  92. uni.navigateTo({
  93. url: `/pagesHome/team/index?id=${item._id || item.id}`,
  94. })
  95. };
  96. // 创建
  97. const toSave = () => { };
  98. </script>
  99. <style lang="scss" scoped>
  100. .content {
  101. display: flex;
  102. flex-direction: column;
  103. width: 100vw;
  104. height: 100vh;
  105. background-color: var(--footColor);
  106. .one {
  107. display: flex;
  108. justify-content: space-between;
  109. height: 40vw;
  110. padding: 8vw 3vw 0 3vw;
  111. background-color: var(--f12Color);
  112. .left {
  113. display: flex;
  114. .left_1 {
  115. padding: 0 2vw;
  116. .image {
  117. width: 18vw;
  118. height: 18vw;
  119. border-radius: 1vw;
  120. background-color: var(--mainColor);
  121. }
  122. }
  123. .right_1 {
  124. color: var(--mainColor);
  125. .name {
  126. font-size: var(--font18Size);
  127. font-weight: bold;
  128. }
  129. .ranking {
  130. margin: 4vw 0 0 0;
  131. font-size: var(--font16Size);
  132. }
  133. }
  134. }
  135. .right {
  136. margin: 4vw 0 0 0;
  137. text {
  138. font-size: var(--font14Size);
  139. }
  140. }
  141. }
  142. .two {
  143. position: absolute;
  144. top: 35vw;
  145. width: 94vw;
  146. margin: 0 3vw;
  147. padding: 5vw 0 0 0;
  148. border-radius: 1vw;
  149. text-align: center;
  150. background-color: var(--mainColor);
  151. .two_1 {
  152. font-size: var(--font16Size);
  153. color: var(--f99Color);
  154. padding: 2vw 0;
  155. }
  156. .two_2 {
  157. padding: 4vw 0;
  158. button {
  159. padding: 0 10vw;
  160. font-size: var(--font16Size);
  161. }
  162. }
  163. .two_3 {
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. padding: 5vw 0;
  168. font-size: var(--font14Size);
  169. border-top: 1px solid var(--footColor);
  170. text {
  171. padding: 0 2vw;
  172. }
  173. }
  174. }
  175. .thr {
  176. position: absolute;
  177. top: 88vw;
  178. width: 94vw;
  179. margin: 0 3vw;
  180. padding: 2vw 0;
  181. border-radius: 1vw;
  182. background-color: var(--mainColor);
  183. .thr_1 {
  184. display: flex;
  185. justify-content: space-around;
  186. padding: 1vw 0 4vw 0;
  187. border-bottom: 1px solid var(--footColor);
  188. .list {
  189. display: flex;
  190. flex-direction: column;
  191. align-items: center;
  192. .name {
  193. margin: 1vw 0 0 0;
  194. color: var(--f33Color);
  195. font-size: var(--font14Size);
  196. }
  197. }
  198. }
  199. .thr_2 {
  200. display: flex;
  201. justify-content: space-between;
  202. align-items: center;
  203. padding: 4vw 2vw;
  204. .fraction {
  205. display: flex;
  206. flex-direction: column;
  207. align-items: center;
  208. .top {
  209. font-size: var(--font20Size);
  210. font-weight: bold;
  211. }
  212. .bottom {
  213. color: var(--f99Color);
  214. font-size: var(--font14Size);
  215. }
  216. }
  217. .circle {
  218. display: flex;
  219. align-items: center;
  220. color: var(--f99Color);
  221. font-size: var(--font14Size);
  222. text {
  223. padding: 0 1vw;
  224. }
  225. }
  226. }
  227. }
  228. }
  229. </style>