home.wxml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <!-- home -->
  2. <view class="home fg" wx:if="{{curNav == 0}}">
  3. <view style="overflow:hidden">
  4. <view class="swiperContainer">
  5. <swiper indicator-dots indicator-active-color="#eee" autoplay interval="3000" circular>
  6. <swiper-item wx:for="{{home.banners}}" wx:key>
  7. <image src="{{imgUrl + item.bannerImage}}" class="full" mode="scaleFill"></image>
  8. </swiper-item>
  9. </swiper>
  10. </view>
  11. </view>
  12. <view class="home-nav-list">
  13. <image src="../../imgs/home/nav-bg.png"></image>
  14. <view class="home-nav-select">
  15. <view class="contest" bindtap="toLink" data-url="{{isRegister?'/pages/contest/answer/answer':'/pages/contest/info/info'}}">
  16. <image mode="widthFix" src="../../imgs/home/contest.png"></image>
  17. <view>参加竞赛</view>
  18. </view>
  19. <view class="ranking" bindtap="toLink" data-url="/pages/contest/ranking/ranking">
  20. <image mode="widthFix" src="../../imgs/home/ranking.png"></image>
  21. <view>排行榜</view>
  22. </view>
  23. <!-- <view class="study" bindtap="toLink" data-url="/pages/contest/answer/answer"> -->
  24. <view class="study">
  25. <image mode="widthFix" src="../../imgs/home/study.png"></image>
  26. <view>在线学习</view>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- <view class="hotNews fg">
  31. <view class="title">
  32. <view class="row crosscenter">
  33. <view class="bar"></view>
  34. <text class="txtpro txtbold" style="color: #002063">热点头条</text>
  35. </view>
  36. <view class="cuIcon-more" bindtap="clickHotnewsMore"></view>
  37. </view>
  38. <view>
  39. <view class="article" bindtap="clickArticle" wx:for="{{home.hotnews}}" wx:key data-i="{{index}}" data-id="{{item.id}}">
  40. <view class="imgbox">
  41. <image class="fullx" src="{{imgUrl + item.coverImage}}" mode="widthFix"></image>
  42. </view>
  43. <view class="content">
  44. <text style="color: #002063" class="txtbold">{{item.headlineTitle}}</text>
  45. <view class="imgsmr attr">
  46. <image src="../../imgs/clock-attr.png"></image>
  47. <text>{{item.releaseTime}}</text>
  48. </view>
  49. <view class="p">{{item.summary}}</view>
  50. </view>
  51. </view>
  52. </view>
  53. </view> -->
  54. <view class="news-list">
  55. <view class="hot-title">
  56. <view class="title">热点头条</view>
  57. <view class="more" bindtap="clickHotnewsMore">
  58. <view>更多</view>
  59. <image mode="widthFix" src="../../imgs/home/arrow.png"></image></view>
  60. </view>
  61. <view class="news-list-content">
  62. <view class="news-list-item" bindtap="clickArticle" wx:for="{{home.hotnews}}" wx:key data-i="{{index}}" data-id="{{item.id}}">
  63. <image mode="widthFix" src="../../imgs/home/list-bg.png"></image>
  64. <view class="content">
  65. <image src="{{imgUrl + item.coverImage}}" class="left"></image>
  66. <view class="right">
  67. <view class="title">{{item.headlineTitle}}</view>
  68. <view class="introduce">{{item.summary}}</view>
  69. <view class="bottom">
  70. <view class="tagR">赛事</view>
  71. <view class="time">{{item.releaseTime}}</view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <!-- <view class="partners">
  79. <view class="title">
  80. <view class="row crosscenter">
  81. <view class="bar"></view>
  82. <text class="txtpro txtbold" style="color: #002063">合作伙伴</text>
  83. </view>
  84. </view>
  85. <view class="partnersContainer">
  86. <view class="level" wx:for="{{home.partners}}" wx:key>
  87. <view class="levelTitle">
  88. <view>{{item.title}}</view>
  89. </view>
  90. <view class="row around wrap">
  91. <view class="bor" style="margin-bottom: 1em">
  92. <image src="{{imgUrl + item.brandImage}}" mode="scaleToFill"></image>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </view> -->
  98. <!-- <view class="authorization">
  99. <button open-type="getUserInfo" bindgetuserinfo="getUserinfo">点击授权</button>
  100. </view> -->
  101. </view>
  102. <!-- activity -->
  103. <view class="activities fg" wx:if="{{curNav == 1}}">
  104. <view class="searchContainer">
  105. <view class="row center search" bindtap="clickSearch">
  106. <input focus wx:if="{{searchOn}}" bindblur="blurSearch" bindinput="inputSearch"></input>
  107. <text class="cuIcon-search" wx:if="{{!searchOn}}"> 请输入活动关键字查询</text>
  108. </view>
  109. </view>
  110. <view class="activityContainer">
  111. <view class="activity" bindtap="clickActivity" wx:for="{{activity.list}}" wx:key data-i="{{index}}" data-id="{{item.id}}">
  112. <image src="{{imgUrl + item.coverImage}}"></image>
  113. <view class="tag {{item.status_attend=='已结束'?'finished':item.status_attend=='未开始'?'ready':'signing'}}" wx:if="{{item.status_attend}}">{{item.status_attend}}</view>
  114. <view class="skiing">{{item.activityTitle}}</view>
  115. </view>
  116. </view>
  117. </view>
  118. <!-- community -->
  119. <view class="community fg" wx:if="{{curNav==2}}">
  120. <view class="searchContainer">
  121. <view class="row center search" bindtap="clickSearch">
  122. <input focus wx:if="{{searchOn}}" bindblur="blurSearch" bindinput="inputSearch"></input>
  123. <text class="cuIcon-search" wx:if="{{!searchOn}}"> 请输入活动关键字查询</text>
  124. </view>
  125. </view>
  126. <view class="bfc">
  127. <!-- item -->
  128. <view wx:for="{{community.list}}" wx:key>
  129. <view class="imgtxt" bindtap="clickCommunityArticle" data-item="{{item}}">
  130. <view class="img">
  131. <!-- <image mode="aspectFill" src="{{imgUrl + item.avatar}}"></image> -->
  132. <image mode="aspectFill" src="{{imgUrl + item.coverImage}}"></image>
  133. <image mode="scaleToFill" src="../../imgs/video-play.png" class="videoPlay" wx:if="{{item.fileType ==2}}"></image>
  134. </view>
  135. <view class="text">
  136. <view class="textcontent">
  137. <text class="txtelldup">{{item.articleTitle||''}}</text>
  138. </view>
  139. <view class="row between more subtxt">
  140. <view class="row crosscenter avatar flexible noscroll">
  141. <view class="circle">
  142. <image src="{{item.avatar}}" class="full"></image>
  143. </view>
  144. <view class="flexible noscroll nowrap-ell">
  145. <text>{{item.nickname}}</text>
  146. </view>
  147. </view>
  148. <view class="row crosscenter favor" catchtap="clickFavorite" data-i="{{index}}" data-id="{{item.id}}" data-isCollect="{{!!item.isCollect}}">
  149. <image class="favorite" src="../../imgs/favorite{{item.isCollect?'-checked':''}}.png"></image>
  150. <text>{{item.collectNumber||0}}</text>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. <!-- item -->
  157. </view>
  158. </view>
  159. <!-- mine -->
  160. <view class="mine col full" wx:if="{{curNav==3}}">
  161. <view>
  162. <image class="fullx" src="../../imgs/mine-bg.png" mode="widthFix" style="display:block"></image>
  163. </view>
  164. <view class="wrp row fg" style="height: 200rpx" bindtap="clickMyinfo">
  165. <view class="circle shadow posrel bg" style="top: -158rpx; height: 236rpx; width: 236rpx;">
  166. <image class="" src="{{user.upload_head || user.avatar}}" class="full"></image>
  167. <!-- <image class="" src="{{user.avatarUrl}}" style="padding: 8rpx; height: 220rpx; width: 220rpx;"></image> -->
  168. </view>
  169. <view class="gapleft">
  170. <view class="txtbold txtlg imgsmr row bot gapbot">
  171. <text>{{user.realname || user.nickname}}</text>
  172. <image src="../../imgs/{{user.sex==1?'male':'female'}}.png" style="margin-bottom: 6rpx" class="gapleft"></image>
  173. </view>
  174. <text class="txtsub subtxt">{{user.introduction||'这个家伙很懒,什么都没留下...'}}</text>
  175. </view>
  176. </view>
  177. <view class="inbot bory row center mineNav">
  178. <view class="{{mine.curNav == 0?'selected':''}}" bindtap="clickMinenav" data-cur="0">
  179. 我的发布
  180. </view>
  181. <view class="{{mine.curNav == 1?'selected':''}}" bindtap="clickMinenav" data-cur="1">
  182. 我的收藏
  183. </view>
  184. <view class="{{mine.curNav == 2?'selected':''}}" bindtap="clickMinenav" data-cur="2">
  185. 我的评论
  186. </view>
  187. <view class="{{mine.curNav == 3?'selected':''}}" bindtap="clickMinenav" data-cur="3">
  188. 我的活动
  189. </view>
  190. </view>
  191. <view class="fg flexible myPub myCollection" wx:if="{{mine.curNav==1 || mine.curNav==0}}">
  192. <view class="bfc">
  193. <!-- item -->
  194. <view wx:for="{{mine.list}}" wx:key>
  195. <view class="imgtxt" bindtap="clickCommunityArticle" data-item="{{item}}">
  196. <view class="img">
  197. <image mode="aspectFill" src="{{imgUrl + item.coverImage}}"></image>
  198. <image mode="scaleToFill" src="../../imgs/video-play.png" class="videoPlay" wx:if="{{item.file_type=='2'}}"></image>
  199. <view class="tag {{item.is_prize=='0'?'ready':item.is_prize=='1'?'finished':''}}" wx:if="{{item.is_prize!=2}}">{{item.is_prize==0?'审核中':item.is_prize==1?'未通过':''}}</view>
  200. <view class="removeTag circle row center" catchtap="clickRemoveArticle" data-id="{{item.id}}" data-i="{{index}}" data-mineNav="{{mine.curNav}}">
  201. <text class="cuIcon-deletefill txtanti"></text>
  202. </view>
  203. </view>
  204. <view class="text">
  205. <view class="textcontent">
  206. <text>{{item.articleTitle||''}}</text>
  207. </view>
  208. <view class="row between more subtxt">
  209. <view class="row crosscenter avatar flexible noscroll">
  210. <view class="circle">
  211. <image src="{{item.avatar}}" class="full"></image>
  212. </view>
  213. <view class="flexible noscroll nowrap-ell">
  214. <text>{{item.nickname||''}}</text>
  215. </view>
  216. </view>
  217. <view class="row crosscenter favor" catchtap="clickFavorite" wx:if="{{false}}" data-i="{{index}}" data-id="{{item.id}}">
  218. <image class="favorite" src="../../imgs/favorite{{item.isCollect?'-checked':''}}.png"></image>
  219. <text>{{item.collectNumber||0}}</text>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <!-- item -->
  226. </view>
  227. </view>
  228. <view class="myComment flexible" wx:if="{{mine.curNav==2}}">
  229. <view class="inright row fg comment" wx:for="{{mine.list}}" wx:key>
  230. <image src="{{user.avatarUrl}}" class="gapright"></image>
  231. <view class="col flexible">
  232. <text class="txtsub nickname gapbot">{{user.articleTitle}}</text>
  233. <view class="row gapbot wrpright">
  234. <text class="flexible">{{item.comments}}</text>
  235. <text class="subtxt">{{item.createTime}}</text>
  236. </view>
  237. <view class="bortop wrpright row txtsub" style="padding-top: 8rpx">
  238. <text class="subtxt flexible">{{item.space_title}}</text>
  239. <text class="{{item.is_prize_show==1?'txtdanger':'subtxt'}}">{{['','待审核', '已通过', '未通过'][item.status]}}</text>
  240. </view>
  241. </view>
  242. </view>
  243. </view>
  244. <view class="myActivities flexible" wx:if="{{mine.curNav==3}}">
  245. <view class="fg wrplg myAct" wx:for="{{mine.list}}" wx:key>
  246. <view class="txtbold">{{item.activityTitle}}</view>
  247. <view class="txtsub gaptop">
  248. <text class="subtxt">活动时间:</text>
  249. <text>{{item.activityTime}}</text>
  250. </view>
  251. <view class="txtsub">
  252. <text class="subtxt">活动地点:</text>
  253. <text>{{item.activityLocation}}</text>
  254. </view>
  255. </view>
  256. </view>
  257. </view>
  258. <!-- bottom navigation bar -->
  259. <!-- <view class="navigation row around fg">
  260. <view class="nav col crosscenter {{curNav == 0 && 'act'}}" bindtap="clickNav" data-cur="0">
  261. <image src="../../imgs/home{{curNav==0? '-act':''}}.png"></image>
  262. <text>首页</text>
  263. </view>
  264. <view class="nav col crosscenter {{curNav==1&&'act'}}" bindtap="clickNav" data-cur="1">
  265. <image src="../../imgs/activity{{curNav==1? '-act':''}}.png"></image>
  266. <text>活动</text>
  267. </view>
  268. <view class="addTidings col crosscenter" bindtap="clickAddtidings" wx:if="{{curNav==2}}">
  269. <image src="../../imgs/add-tidings.png"></image>
  270. </view>
  271. <view class="nav col crosscenter {{curNav==2&&'act'}}" bindtap="clickNav" data-cur="2">
  272. <image src="../../imgs/community{{curNav==2?'-act':''}}.png"></image>
  273. <text>社区</text>
  274. </view>
  275. <view class="nav col crosscenter {{curNav==3&&'act'}}" bindtap="clickNav" data-cur="3">
  276. <image src="../../imgs/mine{{curNav==3?'-act':''}}.png"></image>
  277. <text>我的</text>
  278. </view>
  279. </view> -->
  280. <view class="nav-list">
  281. <image mode="widthFix" class="bg" src="../../imgs/nav/bg.png"></image>
  282. <view class="nav-select">
  283. <view class="home" bindtap="clickNav" data-cur="0">
  284. <image src="../../imgs/nav/home{{curNav==0? '-active':''}}.png"></image>
  285. <view>首页</view>
  286. </view>
  287. <view class="activity" bindtap="clickNav" data-cur="1">
  288. <image src="../../imgs/nav/activity{{curNav==1? '-active':''}}.png"></image>
  289. <view>活动</view>
  290. </view>
  291. <view class="release" bindtap="clickAddtidings" >
  292. <image mode="widthFix" src="../../imgs/nav/release.png"></image>
  293. </view>
  294. <view class="community" bindtap="clickNav" data-cur="2">
  295. <image src="../../imgs/nav/community{{curNav==2?'-active':''}}.png"></image>
  296. <view>社区</view>
  297. </view>
  298. <view class="me" bindtap="clickNav" data-cur="3">
  299. <image src="../../imgs/nav/me{{curNav==3?'-active':''}}.png"></image>
  300. <view>我的</view>
  301. </view>
  302. </view>
  303. </view>
  304. <!-- community img and video upload mask -->
  305. <view class="cover col center" wx:if="{{community.showAddtidings}}" catchtap="clickClosetidings">
  306. <view class="imglg txtanti txtsub">
  307. <view class="txtcenter col" bindtap="clickUploadpics">
  308. <image class="gapbot" src="../../imgs/picture.png"></image>
  309. <text>图片上传</text>
  310. </view>
  311. <view class="txtcenter col" style="margin-top: 120rpx" bindtap="clickUploadvideos">
  312. <image class="gapbot" src="../../imgs/video.png"></image>
  313. <text>视频上传</text>
  314. </view>
  315. </view>
  316. <!-- <view class="navigation row around">
  317. <view class="nav col crosscenter">
  318. <image></image>
  319. <text>0</text>
  320. </view>
  321. <view class="addTidings col crosscenter" bindtap="clickClosetidings">
  322. <image src="../../imgs/close-tidings.png" style="margin-top: calc(-32rpx - .4vh)"></image>
  323. </view>
  324. <view class="nav col crosscenter">
  325. <image></image>
  326. <text></text>
  327. </view>
  328. </view> -->
  329. </view>
  330. <view class="cu-modal {{showAuthPanel&&'show'}}">
  331. <view class="cu-dialog">
  332. <view class="cu-bar bg-white justify-end">
  333. <view class="content">微信授权</view>
  334. <view class="action" bindtap="clickHideAuthPanel">
  335. <text class="cuIcon-close text-red"></text>
  336. </view>
  337. </view>
  338. <view class="padding-xl">
  339. 使用小程序需要获取您的公开信息(昵称,头像等)
  340. </view>
  341. <view class="cu-bar bg-white justify-end">
  342. <view class="action">
  343. <button class="cu-btn line-green text-green" bindtap="clickHideAuthPanel">取消</button>
  344. <button class="cu-btn bg-green margin-left" open-type="getUserInfo" bindtap="getUserInfo">授权</button>
  345. </view>
  346. </view>
  347. </view>
  348. </view>