index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <view class="container">
  3. <view class="contentBox">
  4. <view class="btoomBg"></view>
  5. <view class="topBg">
  6. <view class="tpRight"><view class="textBox">活动规则</view></view>
  7. <view class="tpTitle">评选活动</view>
  8. <view class="endTextBox flex">
  9. <view class="leftLine"><view class="roundness"></view></view>
  10. <view class="textLine">距离投票结束还有</view>
  11. <view class="rightLine"><view class="roundness"></view></view>
  12. </view>
  13. <view class="down">
  14. <u-count-down
  15. separator="zh"
  16. font-size="32"
  17. separator-color="#666666"
  18. separator-size="32"
  19. bg-color="#D7272B"
  20. color="#FFFFFF"
  21. :show-border="false"
  22. :timestamp="timestamp"
  23. ></u-count-down>
  24. </view>
  25. <view class="tjContent flex">
  26. <view class="tjItem">
  27. <view class="topText">
  28. {{ item.pepole }}
  29. <text class="iconTip">人</text>
  30. </view>
  31. <view class="bottomText">参与者</view>
  32. </view>
  33. <view class="tjItem">
  34. <view class="topText">
  35. {{ item.votes }}
  36. <text class="iconTip">票</text>
  37. </view>
  38. <view class="bottomText">投票数</view>
  39. </view>
  40. <view class="tjItem">
  41. <view class="topText">
  42. {{ item.count }}
  43. <text class="iconTip">次</text>
  44. </view>
  45. <view class="bottomText">浏览量</view>
  46. </view>
  47. </view>
  48. <view class="input flex"><u-input type="select" v-model="input.value" confirm-type='search' @confirm='searchProduct' placeholder="请输入选手姓名和编号" :height="input.height" :type="input.type"/><u-icon color="#999999" class="iconT" @click="searchProduct" name="search">
  49. </u-icon></view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import { ptDetail } from '@/api/tp.js';
  56. export default {
  57. data() {
  58. return {
  59. timestamp: 600000,
  60. // 拼团信息
  61. item: {
  62. pepole: 20,
  63. votes: 20,
  64. count: 20
  65. },
  66. // 搜索框
  67. input: {
  68. value: '',
  69. type: 'text',
  70. height:60
  71. }
  72. };
  73. },
  74. onLoad() {
  75. this.ptDetail();
  76. },
  77. methods: {
  78. ptDetail() {
  79. ptDetail()
  80. .then(e => {
  81. console.log(e);
  82. })
  83. .catch(e => {
  84. console.log();
  85. });
  86. },
  87. searchProduct(e){
  88. console.log(e);
  89. }
  90. }
  91. };
  92. </script>
  93. <style lang="scss">
  94. page {
  95. height: 100%;
  96. background-color: #ff9ba7;
  97. }
  98. .contentBox {
  99. position: relative;
  100. width: 0px;
  101. min-width: 100%;
  102. padding-top: 32rpx;
  103. .btoomBg {
  104. background-color: #ffffff;
  105. margin-left: 42rpx;
  106. margin-right: 30rpx;
  107. min-height: 50vh;
  108. }
  109. .topBg {
  110. position: absolute;
  111. top: 0;
  112. width: 678rpx;
  113. min-height: 50vh;
  114. margin-left: 30rpx;
  115. margin-right: 42rpx;
  116. background: #ffffff;
  117. box-shadow: 3px 5rpx 3rpx 0rpx rgba(4, 0, 0, 0.15);
  118. padding-top: 23rpx;
  119. line-height: 1;
  120. .down {
  121. text-align: center;
  122. }
  123. .tjContent {
  124. margin-top: 70rpx;
  125. justify-content: space-around;
  126. text-align: center;
  127. .tjItem {
  128. .topText {
  129. font-size: 50rpx;
  130. font-weight: bold;
  131. color: #3a3a3a;
  132. .iconTip {
  133. font-size: 20rpx;
  134. }
  135. }
  136. .bottomText {
  137. margin-top: 10rpx;
  138. font-size: 24rpx;
  139. font-family: PingFang SC;
  140. font-weight: 500;
  141. color: #333333;
  142. }
  143. }
  144. }
  145. .tpTitle {
  146. text-align: center;
  147. font-size: 48rpx;
  148. font-weight: bold;
  149. color: #ffc103;
  150. margin-top: 25rpx;
  151. margin-bottom: 45rpx;
  152. }
  153. .tpRight {
  154. display: flex;
  155. justify-content: flex-end;
  156. .textBox {
  157. background: #d7272b;
  158. border-radius: 99rpx 0px 0px 99rpx;
  159. padding: 10rpx;
  160. padding-left: 20rpx;
  161. font-size: 25rpx;
  162. font-weight: 500;
  163. color: #ffffff;
  164. }
  165. }
  166. .endTextBox {
  167. padding: 0 84rpx;
  168. margin-bottom: 32rpx;
  169. .leftLine,
  170. .rightLine {
  171. border-bottom: 1rpx solid #d7272b;
  172. flex-grow: 1;
  173. position: relative;
  174. .roundness {
  175. position: absolute;
  176. top: -5rpx;
  177. height: 10rpx;
  178. width: 10rpx;
  179. background-color: #d7272b;
  180. border-radius: 99rpx;
  181. }
  182. }
  183. .leftLine {
  184. .roundness {
  185. right: 0;
  186. }
  187. }
  188. .rightLine {
  189. .roundness {
  190. left: 0;
  191. }
  192. }
  193. .textLine {
  194. padding: 0 20rpx;
  195. }
  196. }
  197. .input{
  198. padding:0 30rpx ;
  199. margin: 50rpx 30rpx ;
  200. background: #EBEBEB;
  201. border-radius: 30rpx;
  202. }
  203. }
  204. }
  205. /deep/ .u-countdown-item {
  206. padding: 10rpx;
  207. border-radius: 8rpx;
  208. overflow: hidden;
  209. }
  210. </style>