index.wxml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <wxs src="../../../../utils//totalprices.wxs" module="total" />
  2. <nav type="back" background-color="#4F9AF7" frontColor="#000000" title="参与活动" />
  3. <view class="box">
  4. <view class="banner">
  5. <swiper class="swiper" indicator-dots="true" autoplay="true" circular="ture">
  6. <swiper-item wx:for="{{activity.cover}}" wx:key="index">
  7. <image data-img="{{item}}" bindtap="imagePreview" src="{{item}}" style="width: 100vw;height: 100%;" mode="aspectFill" />
  8. </swiper-item>
  9. </swiper>
  10. <view class="linear"></view>
  11. </view>
  12. <view class="detail">
  13. <view class="name">
  14. <view class="title" bindtap="getThumbs">
  15. {{activity.title}}
  16. </view>
  17. <view class="desc">
  18. {{activity.desc}}
  19. </view>
  20. </view>
  21. <block wx:if="{{userInfo}}">
  22. <van-tabs active="{{ active }}" bind:change="changeTab" color="#4F9AF7">
  23. <van-tab title="活动详情"></van-tab>
  24. <van-tab title="排行榜"></van-tab>
  25. </van-tabs>
  26. <block wx:if="{{active==0}}">
  27. <view class="date">
  28. <view></view>
  29. <view class="tip" style="color: {{(tips.isCanSign||tips.isCanRevise)?'#7F56B2':'gray'}};">
  30. {{tips.title}}
  31. </view>
  32. </view>
  33. <block wx:for="{{optionKeyList}}" wx:key="index">
  34. <view class="item">
  35. <view class="title">
  36. {{item}}
  37. </view>
  38. <view class="common">{{activity.limitOptions[item]}}</view>
  39. </view>
  40. </block>
  41. <view class="item" wx:if="{{booking}}">
  42. <view class="title">
  43. 预约时间
  44. </view>
  45. <view>
  46. <view class="common" style="font-weight: bold;color: red;">{{registerList[registerList.length-1].bookObj.from}} - {{registerList[registerList.length-1].bookObj.to}}</view>
  47. </view>
  48. </view>
  49. <view class="item" wx:if="{{booking}}">
  50. <view class="title">
  51. 预约服务位置
  52. </view>
  53. <view class="common" style="font-weight: bold;color: red;">{{registerList[registerList.length-1].shop.storeName||'未知'}}</view>
  54. </view>
  55. <block wx:if="{{activity.signFromTo.from&&activity.signFromTo.to}}">
  56. <view class="item">
  57. <view class="title">
  58. 报名时间
  59. </view>
  60. <view class="common">{{activity.signFromTo.from}} - {{activity.signFromTo.to}}</view>
  61. </view>
  62. </block>
  63. <block wx:if="{{activity.merber>0}}">
  64. <view class="item">
  65. <view class="title">
  66. 报名人数
  67. </view>
  68. <view class="common">{{count}}人 /{{activity.merber}}</view>
  69. </view>
  70. </block>
  71. <block wx:if="{{activity.start&&activity.end}}">
  72. <view class="item">
  73. <view class="title">
  74. 活动时间
  75. </view>
  76. <view class="common">{{activity.start}} - {{activity.end}}</view>
  77. </view>
  78. </block>
  79. <block wx:if="{{activity.isEnabled}}">
  80. <view class="item">
  81. <view class="title">
  82. 活动状态
  83. </view>
  84. <view class="common">{{activity.isEnabled?'已开启':'未开启'}}</view>
  85. </view>
  86. </block>
  87. <block wx:if="{{activity.mobile}}">
  88. <view class="item">
  89. <view class="title">
  90. 联系电话
  91. </view>
  92. <view class="common">{{activity.mobile}}</view>
  93. </view>
  94. </block>
  95. <block wx:if="{{registerList.length>0}}">
  96. <view class="item">
  97. <view class="title">
  98. 报名记录
  99. </view>
  100. <block wx:if="{{registerList.length==1}}">
  101. <view class="common">
  102. <block wx:for="{{registerList}}" wx:key="index">
  103. <view data-index="{{index}}" bind:tap="lookLog" class="arLog">
  104. <text>{{item.shopStore.storeName}} {{item.booking}}</text>
  105. <van-icon name="{{tips.isEdit?'edit':'medal' }}" size="40rpx" />
  106. </view>
  107. </block>
  108. </view>
  109. </block>
  110. </view>
  111. <view class="item" wx:if="{{registerList.length>1}}">
  112. <view class="title">
  113. <text decode="{{true}}">&emsp;&emsp;&emsp;&emsp;</text>
  114. </view>
  115. <view class="common">
  116. <block wx:for="{{registerList}}" wx:key="index">
  117. <view data-index="{{index}}" bind:tap="lookLog" class="arLog">
  118. <text>{{item.shopStore.storeName}} {{item.booking}}</text>
  119. <van-icon name="{{tips.isEdit?'edit':'medal-o' }}" size="40rpx" />
  120. </view>
  121. </block>
  122. </view>
  123. </view>
  124. </block>
  125. <button bindtap="application" wx:if="{{activity.shopStore.length>0&&tips.isCanSign}}" class="btn">
  126. <text wx:if="{{activity.price}}" style="color: red;font-weight: bold;margin-right: 10rpx;font-size: 28rpx;margin: 10rpx 0;">¥{{activity.price}}</text>
  127. 前 往 报 名
  128. </button>
  129. </block>
  130. <block wx:if="{{active==1}}">
  131. <block wx:for="{{meRank}}" wx:key="index">
  132. <view class="meItem">
  133. <view class="h3">我的成绩</view>
  134. <view class="avatar">
  135. <image src="{{item.avatar}}" mode="" />
  136. </view>
  137. <view class="name">{{item.booking||''}}</view>
  138. <view class="name"><text style="font-weight: bold;">{{item.ad_steps||0}}</text> 步</view>
  139. <view class="rang"><text style="font-weight: bold;">{{item.ad_sportDate||0}}</text> 秒</view>
  140. </view>
  141. </block>
  142. <view class="rankbox">
  143. <view class="ran-top" style="display: flex;justify-content: space-between;">
  144. <view style="display: flex;">
  145. <view class="top-til">排行榜</view>
  146. <view class="top-box" style="margin-left: 20rpx;" bindtap="changeup">
  147. {{rank=='ASC'?'逆序':'正序'}}
  148. <image src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241226/8lu1od115228414.png"></image>
  149. </view>
  150. </view>
  151. <!-- <van-radio-group style="font-size: 30rpx;" value="{{ checkRank }}" bind:change="onChangeRank" direction="horizontal">
  152. <van-radio name="steps" icon-size="30rpx">步数</van-radio>
  153. <van-radio name="sportDate" icon-size="30rpx">用时</van-radio>
  154. </van-radio-group> -->
  155. </view>
  156. <block wx:for="{{rankList}}" wx:key="index">
  157. <view class="cardbox">
  158. <view class="image1" wx:if="{{index==0}}">1</view>
  159. <view class="image2" wx:if="{{index==1}}">2</view>
  160. <view class="image3" wx:if="{{index==2}}">3</view>
  161. <view class="paiming" wx:if="{{index>=3}}">{{index+1}}</view>
  162. <image class="avarter" src="{{item.avatar}}"></image>
  163. <view class="name" style="width: 150rpx;">
  164. {{item.nickname}}
  165. <view class="name2">{{item.booking||''}}</view>
  166. </view>
  167. <view class="num">{{item.ad_steps||0}}步</view>
  168. <view class="num">{{item.ad_sportDate||0}}秒</view>
  169. </view>
  170. </block>
  171. <block wx:if="{{rankList.length<=0}}">
  172. <van-empty description="榜单静悄悄,运动一下吧~">
  173. </van-empty>
  174. </block>
  175. </view>
  176. </block>
  177. </block>
  178. <block wx:else>
  179. <button bind:tap="login">登录后可报名</button>
  180. </block>
  181. </view>
  182. </view>
  183. <van-popup style="height: 70vh;" show="{{ showpopup }}" bind:click-overlay='onClose' round position="bottom" bind:close="onClose">
  184. <view class="popup">
  185. <view class="topTitle topBox">报名信息</view>
  186. <view class="topBox">报名信息</view>
  187. <van-cell-group>
  188. <van-field model:value="{{ name }}" required clearable label="姓名" placeholder="请输入姓名" />
  189. </van-cell-group>
  190. <view class="registerStartDate">
  191. <view class="title">
  192. <text>*</text>
  193. 姓别
  194. </view>
  195. <view class="date">
  196. <van-radio-group direction='horizontal' model:value="{{ sex }}" bind:change="onChangeSex">
  197. <van-radio icon-size="35rpx" name="男">男</van-radio>
  198. <van-radio icon-size="35rpx" name="女">女</van-radio>
  199. </van-radio-group>
  200. </view>
  201. </view>
  202. <van-cell-group>
  203. <van-field model:value="{{ idcard }}" type="number" required clearable label="身份证号" />
  204. <van-field model:value="{{ birthdate }}" required clearable label="出生日期" />
  205. <van-field model:value="{{ address }}" required clearable label="现居住地" />
  206. <van-field model:value="{{ mobile }}" type="number" required clearable label="联系电话" placeholder="请输入联系电话" />
  207. <van-field model:value="{{ classType }}" required clearable label="血型" />
  208. <van-field model:value="{{ teacher }}" required clearable label="紧急联系人" />
  209. <van-field model:value="{{ tel }}" type="number" required clearable label="联系人电话" placeholder="紧急联系人电话" />
  210. </van-cell-group>
  211. <view class="registerStartDate">
  212. <view class="title">
  213. <text>*</text>
  214. 服装尺码
  215. </view>
  216. </view>
  217. <view class="registerStartDate">
  218. <view class="title"></view>
  219. <view class="date">
  220. <van-radio-group model:value="{{ centerDesc }}" bind:change="onChangecenterDesc">
  221. <van-radio icon-size="35rpx" name="S码(90斤以下)">S码(90斤以下) </van-radio>
  222. <van-radio icon-size="35rpx" name="M码(90斤-105斤)">M码(90斤-105斤)</van-radio>
  223. <van-radio icon-size="35rpx" name="L码(105斤-120斤)">L码(105斤-120斤)</van-radio>
  224. <van-radio icon-size="35rpx" name="XL码(120斤-135斤)">XL码(120斤-135斤)</van-radio>
  225. <van-radio icon-size="35rpx" name="2XL码(135斤-150斤)">2XL码(135斤-150斤)</van-radio>
  226. <van-radio icon-size="35rpx" name="3XL码(150斤-165斤)">3XL码(150斤-165斤)</van-radio>
  227. <van-radio icon-size="35rpx" name="4XL码(165斤-190斤)">4XL码(165斤-190斤)</van-radio>
  228. <van-radio icon-size="35rpx" name="5XL码(190斤-220斤)">5XL码(190斤-220斤)</van-radio>
  229. </van-radio-group>
  230. </view>
  231. </view>
  232. <view class="registerStartDate" bindtap="openStore">
  233. <view class="title">
  234. <text>*</text>
  235. 位置
  236. </view>
  237. <view class="date">{{shop.storeName||'选择位置'}}</view>
  238. </view>
  239. <view class="registerStartDate" bindtap="onDisplay">
  240. <view class="title">
  241. <text>*</text>
  242. 预约日期
  243. </view>
  244. <view class="date" wx:if="{{(!checkDate)&&aRegister.id}}">{{bookObj.from+' - '+bookObj.to}}</view>
  245. <view class="date" wx:else>{{checkDate?checkDate:'选择日期'}}</view>
  246. </view>
  247. <view class="registerStartTime" wx:if="{{checkDate}}">
  248. <view class="title">
  249. <text>*</text>
  250. 选择时间
  251. </view>
  252. <block wx:if="{{checkTimeList&&checkTimeList.length>0}}">
  253. <block wx:for="{{checkTimeList}}" wx:key="index">
  254. <view class="box">
  255. <view class="time">
  256. <view class="from">
  257. <van-icon name="underway-o" />
  258. {{item.from}}
  259. </view>
  260. <view class="to">
  261. <van-icon name="stop-circle-o" />
  262. {{item.to}}
  263. </view>
  264. </view>
  265. <view>
  266. <view wx:if="{{activity.price}}" style="display: flex;flex-direction: column;align-items: center;">
  267. <text style="color: red;font-weight: bold;margin-right: 10rpx;font-size: 28rpx;margin: 10rpx 0;">¥{{activity.price}}</text>
  268. </view>
  269. <block wx:if="{{tips.isEdit}}">
  270. <view class="btn" data-from="{{item.fromDate}}" data-to="{{item.toDate}}" bindtap="enlists">
  271. {{aRegister.id?'更改为本时间':'立即预约'}}
  272. </view>
  273. </block>
  274. </view>
  275. </view>
  276. </block>
  277. </block>
  278. <van-empty wx:else description="当天无可预约时间" />
  279. </view>
  280. <view class="registerStartDate">
  281. <view style="font-size: 30rpx;">
  282. <van-radio-group value="{{ isAttachment }}" bind:change="onChangeSexIsAttachment">
  283. <van-radio icon-size="35rpx" label-disabled name="同意">
  284. 我已阅读并同意
  285. <text bind:tap="openFile" style="color: red;">《参赛选手免责声明》</text>
  286. </van-radio>
  287. </van-radio-group>
  288. </view>
  289. </view>
  290. <van-calendar color="#4F9AF7" formatter="{{ formatter }}" min-date="{{minDate}}" max-date="{{maxDate}}" show="{{ showDate }}" bind:close="onCloseDate" bind:confirm="onConfirm" />
  291. <view class="btn_btm">
  292. <button wx:if="{{tips.isEdit&&aRegister.id&&!checkDate}}" class="revise" bindtap="enlists">确认修改</button>
  293. <button wx:if="{{aRegister.id&&isAttend}}" class="revise" bind:tap="goUrl">前往参与</button>
  294. </view>
  295. <view style="height: 200rpx;"></view>
  296. </view>
  297. </van-popup>
  298. <van-popup show="{{ showStorePopup }}" bind:click-overlay='closeStore' round position="bottom" bind:close="closeStore">
  299. <view style="height: 70vh;">
  300. <view style="padding: 20rpx;border-bottom: 1rpx solid rgb(206, 206, 206);text-align: center;font-weight: bold;">选择位置</view>
  301. <van-empty wx:if="{{!shopList.length}}" description="暂无可选地址" />
  302. <scroll-view style="height:calc(70vh - 200rpx) ;" scroll-y="{{true}}">
  303. <view class="company">
  304. <block wx:for="{{shopList}}" wx:key="index">
  305. <view data-index="{{index}}" bindtap="chooseShop" class="name" style="color: {{shop.objectId==item.objectId?'#4F9AF7':'gray'}};">{{item.storeName}}
  306. <van-icon wx:if="{{shop.objectId==item.objectId}}" name="success" />
  307. </view>
  308. </block>
  309. </view>
  310. </scroll-view>
  311. </view>
  312. </van-popup>
  313. <van-popup round show="{{showCheckRank}}">
  314. <view class="model">
  315. <view class="content">
  316. <view class="close">
  317. <view class="h2">输入{{checkRank=='sportDate'?'用时':'步数'}}</view>
  318. <van-icon name="cross" size="50rpx" bind:tap="onCloseCheckRank" />
  319. </view>
  320. <view class="text" wx:if="{{checkRank=='sportDate'}}">
  321. <view style="display: flex;flex-wrap: wrap;">
  322. 设置排行榜为指定时长
  323. <input placeholder='默认0' model:value="{{fixedNum}}" style="width: 100rpx;border-bottom: 1rpx solid black;margin:0 15rpx;padding: 0 15rpx;" type="number" />
  324. 秒,
  325. </view>
  326. 步数越多排名越高
  327. </view>
  328. <view class="text" wx:else>
  329. <view style="display: flex;">
  330. 设置排行榜为指定
  331. <input placeholder='默认0' model:value="{{fixedNum}}" style="width: 100rpx;border-bottom: 1rpx solid black;margin:0 15rpx;padding: 0 15rpx;" type="number" />
  332. 步,
  333. </view>
  334. 用时越短排名越高
  335. </view>
  336. <view class="btnBox">
  337. <view class="btn" style="background: gray;" bind:tap="onCloseCheckRank">
  338. 取消
  339. </view>
  340. <view class="btn" bind:tap="confirmCheckRank">
  341. 确认
  342. </view>
  343. </view>
  344. </view>
  345. </view>
  346. </van-popup>
  347. <block wx:if="{{activity.price}}">
  348. <payment style="z-index: 99999;" id='payMent' show="{{showPay}}" showType="wxpay" tradeNo="{{tradeNo}}" bind:payResult='acceptResult' price="{{activity.price}}" />
  349. </block>