home.wxml 15 KB

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