xtz 4 年之前
父節點
當前提交
8c3f8c00ea

+ 2 - 1
app.json

@@ -14,7 +14,8 @@
     "pages/community/videoDetails/videoDetails",
     "pages/contest/answer/answer",
     "pages/contest/info/info",
-    "pages/contest/score/score"
+    "pages/contest/score/score",
+    "pages/contest/ranking/ranking"
   ],
   "window": {
     "backgroundTextStyle": "light",

二進制
imgs/contest/answer/close.png


二進制
imgs/contest/answer/confim-button-bg-2.png


二進制
imgs/contest/answer/confim-button-bg.png


二進制
imgs/contest/answer/confirm-bg.png


二進制
imgs/contest/answer/warning.png


二進制
imgs/contest/ranking/avatr.png


二進制
imgs/contest/ranking/bg.png


+ 11 - 2
pages/contest/answer/answer.js

@@ -6,9 +6,18 @@ Page({
    */
   data: {
     pagination: {
-      page: 1,
+      page: 2,
       rows: 10
-    }
+    },
+    show: false,
+    pattern: false,
+    isupdate: false
+  },
+
+  showToggle(e) {
+    this.setData({
+      show: !this.data.show
+    })
   },
 
   bindNavTagger(e) {

+ 31 - 4
pages/contest/answer/answer.wxml

@@ -1,6 +1,7 @@
 <!--pages/contest/answer/answer.wxml-->
 <view>
   <image mode="widthFix" src="../../../imgs/contest/answer/bg.png" class="bg"></image>
+  <view class="page-title">参加竞赛</view>
   <view class="top">
     <view class="top-title">您还有
       <view class="time">
@@ -26,11 +27,12 @@
         <view class="problem-text">现代奥林匹克圣火传递起于哪一年?</view>
       </view>
       <view class="problem-key-list">
-        <view class="active">A. 1936年</view>
-        <view class="">A. 1936年</view>
+        <view class="{{pattern?'':'active'}} border">A. 1936年</view>
+        <view class="border">A. 1936年</view>
         <view class="">A. 1936年</view>
         <view class="">A. 1936年</view>
       </view>
+      <view class="bd-b"></view>
     </view>
     <view class="content-item">
       <view class="problem">
@@ -41,15 +43,40 @@
         <view class="problem-text">现代奥林匹克圣火传递起于哪一年?</view>
       </view>
       <view class="problem-key-list">
-        <view class="active">A. 1936年</view>
+        <view class="active-R">A. 1936年</view>
         <view class="">A. 1936年</view>
         <view class="">A. 1936年</view>
         <view class="">A. 1936年</view>
       </view>
+      <view class="bd-b" wx:if="{{pattern}}"></view>
     </view>
   </view>
-  <view class="arrow-group">
+  <!-- <view class="arrow-group" wx:if="{{!pattern}}">
     <image class="" mode="widthFix" src="../../../imgs/contest/answer/left{{pagination.page==1?'':'-active'}}.png" bindtap="{{pagination.page==1?'':'bindNavTagger'}}" data-index="{{pagination.page-1}}"></image>
     <image class="" mode="widthFix" src="../../../imgs/contest/answer/right{{pagination.page==5?'':'-active'}}.png" bindtap="{{pagination.page==5?'':'bindNavTagger'}}" data-index="{{pagination.page+1}}"></image>
+  </view> -->
+  <view class="next-one" style="background-image: url('../../../imgs/contest/answer/confim-button-bg.png');" data-index="2" bindtap="{{isupdate?'提交':'bindNavTagger'}}" wx:if="{{pagination.page==1||isupdate}}">{{isupdate?'提交':'下一页'}}</view>
+  <view class="button-group-R" wx:else>
+    <view class="back" bindtap="{{pattern?'':'bindNavTagger'}}" data-index="{{pagination.page-1}}">{{pattern?'修改':'上一页'}}</view>
+    <view class="next" style="background-image: url('../../../imgs/contest/answer/confim-button-bg-2.png');" bindtap="{{pagination.page==5?'':'bindNavTagger'}}" data-index="{{pagination.page+1}}">{{pagination.page==5?'提交':'下一页'}}</view>
+  </view>
+
+  <!-- 确认框 -->
+  <view class="mask" wx:if="{{show}}" bindtap="showToggle">
+  </view>
+  <view class="confirm" wx:if="{{show}}">
+    <image mode="widthFix" class="confirm-bg" src="../../../imgs/contest/answer/confirm-bg.png"></image>
+    <view class="confirm-content">
+      <image mode="widthFix" class="warning-icon" src="../../../imgs/contest/answer/warning.png"></image>
+      <view class="confim-title">{{isupdate?'您的答题已修改,确认提交吗?':'您未答完全部题,确认提交吗?'}}</view>
+      <view class="button-group" wx:if="{{!isupdate}}">
+        <view>预览答题</view>
+        <view bindtap="clickConfim">提交</view>
+      </view>
+      <view class="button-group" wx:else>
+       <view class="confim-button" bindtap="clickConfim">提交</view>
+      </view>
+      <image mode="widthFix" src="../../../imgs/contest/answer/close.png" class="close-icon" bindtap="showToggle"></image>
+    </view>
   </view>
 </view>

+ 139 - 3
pages/contest/answer/answer.wxss

@@ -2,6 +2,16 @@
 page {
   background: #fff;
 }
+.page-title {
+  position: relative;
+  z-index: 1;
+  width: 100%;
+  font-size: 32rpx;
+  font-weight: 400;
+  color: #FFFFFF;
+  padding-top: 68rpx;
+  text-align: center;
+}
 .bg {
   width: 100%;
   position: absolute;
@@ -11,7 +21,7 @@ page {
 .top{
   position: relative;
   z-index: 9;
-  padding-top: 176rpx;
+  padding-top: 60rpx;
   width: 100%;
 }
 .top-title {
@@ -110,7 +120,6 @@ page {
   height: 68rpx; 
   background: #FFFFFF;
   border-radius: 34rpx;
-  border: 2rpx solid #EFEFFF;
   margin: 0 146rpx 20rpx 88rpx;
   font-size: 28rpx;
   font-weight: 400;
@@ -118,10 +127,23 @@ page {
   line-height: 68rpx;
   padding: 0 38rpx;
 }
+.active-R {
+  color: #FD8011!important;
+}
+.problem-key-list .border {
+  border: 2rpx solid #EFEFFF;
+}
 .problem-key-list .active {
   background: #5679F0;
   color: rgb(241, 241, 241);
 }
+.bd-b {
+  width: 640rpx;
+  height: 2rpx;
+  background: #59598D;
+  opacity: 0.12;
+  margin: 6rpx 52rpx 0 58rpx;
+}
 .arrow-group {
   display: flex;
   justify-content: center;
@@ -131,4 +153,118 @@ page {
 .arrow-group > image {
   width: 160rpx;
   margin: 0 18rpx;
-}
+}
+.next-one {
+  width: 656rpx;
+  height: 156rpx;
+  margin: auto;
+  background-repeat:no-repeat;
+  background-size:100% 100%;
+  -moz-background-size:100% 100%;
+  text-align: center;
+  line-height: 156rpx;
+  font-size: 28rpx;
+  font-weight: 600;
+  color: #FFFFFF;
+}
+.button-group-R {
+  display: flex;
+  justify-content: center;
+  padding: 48rpx 0 28rpx 0;
+  align-items: center;
+}
+.back{
+  width: 284rpx;
+  height: 96rpx;
+  border-radius: 50rpx;
+  border: 2rpx solid #C7CCF9;
+  text-align: center;
+  line-height: 96rpx;
+  font-size: 28rpx;
+  font-weight: 500;
+  color: #59598D;
+  margin: 0 10rpx;
+}
+.next {
+  width: 340rpx;
+  height: 152rpx;
+  background-repeat:no-repeat;
+  background-size:100% 100%;
+  -moz-background-size:100% 100%;
+  text-align: center;
+  line-height: 152rpx;
+  font-size: 28rpx;
+  font-weight: 600;
+  color: #FFFFFF;
+}
+.confirm {
+  position: fixed;
+  width: 100%;
+  z-index: 998;
+  display: flex;
+  justify-content: center;
+  top: 35%;
+  background: transparent;
+  transform: translateY(-30%);
+}
+.mask {
+  position: fixed;
+  top: 0;
+  height: 100vh;
+  width: 750rpx;
+  background: rgba(31, 33, 56,.8);
+  z-index: 998;
+}
+.confirm-bg {
+  width: 620rpx;
+  position: absolute;
+  z-index: 999;
+}
+.confirm-content {
+  width: 620rpx;
+  height: 650rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  position: relative;
+  z-index: 1000;
+}
+.warning-icon {
+  width: 100rpx;
+  padding-top: 108rpx;
+  position: relative;
+  z-index: 999;
+}
+.confim-title {
+  margin-top: 46rpx;
+  font-weight: 500;
+  color: #161616;
+  line-height: 50rpx;
+  font-size: 36rpx;
+}
+.button-group {
+  display: flex;
+  justify-content: center;
+}
+.button-group > view {
+  margin: 0 10rpx;
+  width: 240rpx;
+  height: 96rpx;
+  border-radius: 50rpx;
+  border: 2rpx solid #C7CCF9;
+  font-weight: 600;
+  color: #59598D;
+  line-height: 96rpx;
+  font-size: 32rpx;
+  margin-top: 60rpx;
+  text-align: center;
+}
+.button-group .confim-button {
+  width: 380rpx!important;
+}
+.close-icon {
+  top: 258rpx;
+  width: 100rpx;
+  position: relative;
+  z-index: 1000;
+}

+ 6 - 0
pages/contest/info/info.wxml

@@ -1,6 +1,7 @@
 <!--pages/contest/contest.wxml-->
 <view>
   <image mode="widthFix" src="../../../imgs/contest/bg.png" class="bg"></image>
+  <view class="page-title">排行榜</view>
   <view class="form">
     <view class="form-item">
       <image class="form-item-bg" mode="widthFix" src="../../../imgs/contest/list-bg.png"></image>
@@ -57,6 +58,11 @@
       </view>
     </view>
 
+    <view class="warning">
+      <image mode="widthFix" src="../../../imgs/contest/warning.png" class="warning-icon"></image>
+      <view class="warning-text">请填写学校完整名称</view>
+    </view>
+
     <view class="form-item">
       <image class="form-item-bg" mode="widthFix" src="../../../imgs/contest/list-bg.png"></image>
       <view class="content">

+ 26 - 1
pages/contest/info/info.wxss

@@ -2,13 +2,23 @@
 page {
   background: #fff;
 }
+.page-title {
+  position: relative;
+  z-index: 1;
+  width: 100%;
+  font-size: 32rpx;
+  font-weight: 400;
+  color: #FFFFFF;
+  padding-top: 68rpx;
+  text-align: center;
+}
 .bg {
   width: 100%;
   position: absolute;
   z-index: 0;
 }
 .form {
-  padding-top: 480rpx;
+  padding-top: 370rpx;
 }
 .form-item {
   position: relative;
@@ -77,4 +87,19 @@ input, .select {
   color: #FFFFFF;
   font-size: 48rpx;
   line-height: 58rpx;
+}
+
+.warning {
+  display: flex;
+  align-items: center;
+  height: 55rpx;
+}
+.warning-icon {
+  width: 36rpx;
+  margin: 0 24rpx 0 98rpx;
+}
+.warning-text {
+  font-size: 28rpx;
+  font-weight: 400;
+  color: #59598D;
 }

+ 71 - 0
pages/contest/ranking/ranking.js

@@ -0,0 +1,71 @@
+// pages/contest/ranking/ranking.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    page: 1
+  },
+  
+  togglePage(e) {
+    this.setData({
+      page: e.currentTarget.dataset.index
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 0
pages/contest/ranking/ranking.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 58 - 0
pages/contest/ranking/ranking.wxml

@@ -0,0 +1,58 @@
+<!--pages/contest/ranking/ranking.wxml-->
+<view>
+  <image src="../../../imgs/contest/ranking/bg.png" class="bg"></image>
+  <view class="page-title">排行榜</view>
+  <view class="content">
+    <view class="navList">
+      <view class="{{page==1&&'active'}}" bindtap="togglePage" data-index="1">个人排名</view>
+      <view class="{{page==2&&'active'}}" bindtap="togglePage" data-index="2">区排名</view>
+      <view class="{{page==3&&'active'}}" bindtap="togglePage" data-index="3">学校排名</view>
+    </view>
+    <view class="ranking-top">
+      <view class="second">
+        <image mode="widthFix" src="../../../imgs/contest/ranking/avatr.png"></image>
+        <view class="num">2</view>
+        <view class="nickname">豆丁</view>
+        <view class="fraction">99分</view>
+      </view>
+      <view class="first">
+        <image mode="widthFix" src="../../../imgs/contest/ranking/avatr.png"></image>
+        <view class="num">1</view>
+        <view class="nickname">豆丁</view>
+        <view class="fraction">99分</view>
+      </view>
+      <view class="third">
+        <image mode="widthFix" src="../../../imgs/contest/ranking/avatr.png"></image>
+        <view class="num">3</view>
+        <view class="nickname">豆丁</view>
+        <view class="fraction">99分</view>
+      </view>
+    </view>
+    <view class="ranking-list">
+      <view class="ranking-item">
+        <view class="order-num">4</view>
+        <image mode="widthFix" src="../../../imgs/contest/ranking/avatr.png"></image>
+        <view class="nickname">乔巴</view>
+        <view class="fraction">99分</view>
+      </view>
+      <view class="ranking-item">
+        <view class="order-num">4</view>
+        <image mode="widthFix" src="../../../imgs/contest/ranking/avatr.png"></image>
+        <view class="nickname">乔巴</view>
+        <view class="fraction">99分</view>
+      </view>
+      <view class="ranking-item">
+        <view class="order-num">4</view>
+        <image mode="widthFix" src="../../../imgs/contest/ranking/avatr.png"></image>
+        <view class="nickname">乔巴</view>
+        <view class="fraction">99分</view>
+      </view>
+      <view class="ranking-item">
+        <view class="order-num">4</view>
+        <image mode="widthFix" src="../../../imgs/contest/ranking/avatr.png"></image>
+        <view class="nickname">乔巴</view>
+        <view class="fraction">99分</view>
+      </view>
+    </view>
+  </view>
+</view>

+ 126 - 0
pages/contest/ranking/ranking.wxss

@@ -0,0 +1,126 @@
+/* pages/contest/ranking/ranking.wxss */
+.bg {
+  width: 100%;
+  height: 100vh;
+  position: fixed;
+  z-index: 0;
+}
+.page-title {
+  position: relative;
+  z-index: 1;
+  width: 100%;
+  font-size: 32rpx;
+  font-weight: 400;
+  color: #FFFFFF;
+  padding-top: 68rpx;
+  text-align: center;
+}
+.content {
+  position: relative;
+  z-index: 1;
+  margin-top: 42rpx;
+}
+.navList {
+  display: flex;
+  justify-content: space-around;
+}
+.navList > view {
+  width: 210rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  border-radius: 38rpx;
+  border: 2rpx solid rgba(255, 255, 255,.6); 
+  font-weight: 600;
+  color: #FFFFFF;
+  font-size: 28rpx;
+  text-align: center;
+}
+.navList .active {
+  background: #F4B622;
+  border-color: #F4B622;
+}
+.ranking-top {
+  display: flex;
+  justify-content: space-around;
+  margin-top: 64rpx;
+  margin-bottom: 60rpx;
+  padding: 0 40rpx;
+}
+.ranking-top > view {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+}
+.second, .third {
+  margin-top: 60rpx;
+}
+.second > image, .third > image {
+  width: 120rpx;
+}
+.first > image {
+  width: 140rpx;
+}
+.num {
+  margin-top:-18rpx ;
+  width: 40rpx;
+  height: 40rpx;
+  border-radius: 20rpx;
+  text-align: center;
+  line-height: 40rpx;
+  font-weight: 800;
+  color: #000000;
+  font-size: 28rpx;
+  margin-bottom: 10rpx;
+}
+.second .num {
+  background: #31B5FF;
+}
+.first .num {
+  background: #F4B622;
+}
+.third .num {
+  background: #E66F6F;
+}
+.nickname { 
+  font-size: 32rpx;
+  font-weight: 600;
+  color: #FFFFFF;
+  line-height: 44rpx;
+}
+.ranking-top .fraction {
+  margin-top: 6rpx;
+  width: 160rpx;
+  height: 40rpx;
+  border-radius: 20rpx;
+  text-align: center;
+  font-size: 24rpx;
+  font-weight: 800;
+  line-height: 40rpx;
+  color: #FFF431;
+  background: rgba(0, 0, 0,.15);
+}
+.ranking-item {
+  border-top: 2rpx rgba(255, 255, 255,.1) solid;
+  display: flex;
+  align-items: center;
+  height: 144rpx;
+}
+.order-num {
+  font-size: 32rpx;
+  color: #FFFFFF;
+  margin: 0 48rpx 0 44rpx;
+}
+.ranking-item > image {
+  width: 88rpx;
+}
+.ranking-item .nickname {
+  margin-left: 36rpx;
+  width: 300rpx;
+  margin-right: 100rpx;
+}
+.ranking-item .fraction {
+  font-size: 24rpx;
+  font-weight: 800;
+  line-height: 40rpx;
+  color: #FFF431;
+}

+ 14 - 5
pages/home/home.js

@@ -9,7 +9,9 @@ const app = getApp()
 
 Page({
   loadMyinformation() {
-    imine.loadMyinformation({reqdata: {id:1}},r => {
+    let id = wx.getStorageSync('id')
+    imine.loadMyinformation({reqdata: {id}},r => {
+      console.log(r);
       this.setData({
         user: Object.assign(this.data.user, r.object)
       })
@@ -64,6 +66,7 @@ Page({
   data: {
     showAuthPanel: false,
     curNav: 0,
+    user: {},
     imgUrl: app.globalData.imgUrl,
     navs: [{
       key: 'home',
@@ -337,7 +340,7 @@ Page({
         this.loadArticles()
         break;
       case '3':
-        if (!this.data.user || this.data.user.is_finish_reg == 0) {
+        if (!this.data.user || !this.data.user.id) {
           return this.setData({
             showAuthPanel: true
           })
@@ -370,6 +373,11 @@ Page({
       showAuthPanel: false
     })
   },
+  toLink (e) {
+    wx.navigateTo({
+      url: e.currentTarget.dataset.url,
+    })
+  },
   // getUserinfo(e) {
   //   let {encryptedData,iv} = e.detail
   //   console.log(e);
@@ -400,9 +408,10 @@ Page({
                 iv
               }
             }, r => {
-              console.log(r)
-              // console.log(e);
-              
+              wx.setStorageSync('id', r.object.id)
+              wx.setStorageSync('openId', r.object.openId)
+              this.loadMyinformation()
+              this.clickHideAuthPanel()
             })
           },
         })

+ 11 - 11
pages/home/home.wxml

@@ -13,15 +13,15 @@
   <view class="home-nav-list">
     <image src="../../imgs/home/nav-bg.png"></image>
     <view class="home-nav-select">
-      <view class="contest">
+      <view class="contest" bindtap="toLink" data-url="/pages/contest/info/info">
         <image mode="widthFix" src="../../imgs/home/contest.png"></image>
         <view>参加竞赛</view>
       </view>
-      <view class="ranking">
+      <view class="ranking" bindtap="toLink" data-url="/pages/contest/ranking/ranking">
         <image mode="widthFix" src="../../imgs/home/ranking.png"></image>
         <view>排行榜</view>
       </view>
-      <view class="study">
+      <view class="study" bindtap="toLink" data-url="/pages/contest/answer/answer">
         <image mode="widthFix" src="../../imgs/home/study.png"></image>
         <view>在线学习</view>
       </view>
@@ -58,7 +58,7 @@
   <view class="news-list">
     <view class="hot-title">
       <view class="title">热点头条</view>
-      <view class="more">
+      <view class="more" bindtap="clickHotnewsMore">
       <view>更多</view>
       <image mode="widthFix" src="../../imgs/home/arrow.png"></image></view>
     </view>
@@ -301,22 +301,22 @@
   <image mode="widthFix" class="bg" src="../../imgs/nav/bg.png"></image>
   <view class="nav-select">
     <view class="home" bindtap="clickNav" data-cur="0">
-      <image mode="widthFix" src="../../imgs/nav/home{{curNav==0? '-active':''}}.png"></image>
+      <image src="../../imgs/nav/home{{curNav==0? '-active':''}}.png"></image>
       <view>首页</view>
     </view>
     <view class="activity" bindtap="clickNav" data-cur="1">
-      <image mode="widthFix" src="../../imgs/nav/activity{{curNav==1? '-active':''}}.png"></image>
+      <image src="../../imgs/nav/activity{{curNav==1? '-active':''}}.png"></image>
       <view>活动</view>
     </view>
     <view class="release" bindtap="clickAddtidings" >
       <image mode="widthFix" src="../../imgs/nav/release.png"></image>
     </view>
     <view class="community" bindtap="clickNav" data-cur="2">
-      <image mode="widthFix" src="../../imgs/nav/community{{curNav==2?'-active':''}}.png"></image>
+      <image src="../../imgs/nav/community{{curNav==2?'-active':''}}.png"></image>
       <view>社区</view>
     </view>
     <view class="me" bindtap="clickNav" data-cur="3">
-      <image mode="widthFix" src="../../imgs/nav/me{{curNav==3?'-active':''}}.png"></image>
+      <image src="../../imgs/nav/me{{curNav==3?'-active':''}}.png"></image>
       <view>我的</view>
     </view>
   </view>
@@ -324,7 +324,7 @@
 
 <!-- community img and video upload mask -->
 
-<view class="cover col center" wx:if="{{community.showAddtidings}}" catchtap="clickClosetidings">
+<view class="cover col center"  wx:if="{{community.showAddtidings}}" catchtap="clickClosetidings">
 
   <view class="imglg txtanti txtsub">
     <view class="txtcenter col" bindtap="clickUploadpics">
@@ -336,7 +336,7 @@
       <text>视频上传</text>
     </view>
   </view>
-  <view class="navigation row around">
+  <!-- <view class="navigation row around">
     <view class="nav col crosscenter">
       <image></image>
       <text>0</text>
@@ -348,7 +348,7 @@
       <image></image>
       <text></text>
     </view>
-  </view>
+  </view> -->
 </view>
 
 

+ 9 - 1
pages/home/home.wxss

@@ -1,7 +1,7 @@
 @import "../../lib/style/main.wxss";
 
 page {
-  padding-bottom: 100rpx;
+  margin-bottom: 40rpx;
   background: transparent;
   padding-bottom: calc(100rpx + constant(safe-area-inset-bottom));
   padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
@@ -292,6 +292,7 @@ page {
   left: 0;
   right: 0;
   bottom: 0;
+  z-index: 999;
 }
 
 .cover .navigation {
@@ -406,6 +407,7 @@ page {
 }
 .nav-list image {
   width: 40rpx;
+  height: 40rpx;
 }
 .nav-list .bg {
   width: 100%;
@@ -548,4 +550,10 @@ page {
   font-weight: 400;
   color: #868AA8;
   line-height: 34rpx;
+}
+
+.z-i {
+  position: relative;
+  display: block;
+  z-index: 99999;
 }

+ 18 - 3
pages/hotnews/hotnews/hotnews.wxml

@@ -1,6 +1,6 @@
 <view class="hotNews">
 
-  <view class="article" bindtap="clickArticle" wx:for="{{news}}" wx:key data-id="{{item.id}}" data-i="{{index}}">
+  <!-- <view class="article" bindtap="clickArticle" wx:for="{{news}}" wx:key data-id="{{item.id}}" data-i="{{index}}">
     <view class="imgbox">
       <image class="fullx" src="{{imgUrl + item.coverImage}}" mode="widthFix"></image>
     </view>
@@ -12,6 +12,21 @@
       </view>
       <view class="p">{{item.summary}}</view>
     </view>
-  </view>
-  
+  </view> -->
+  <view class="news-list-content">
+      <view class="news-list-item" bindtap="clickArticle" wx:for="{{news}}" wx:key data-i="{{index}}" data-id="{{item.id}}">
+        <image mode="widthFix" src="../../../imgs/home/list-bg.png"></image>
+        <view class="content">
+          <image src="{{imgUrl + item.coverImage}}" class="left"></image>
+          <view class="right">
+            <view class="title">{{item.headlineTitle}}</view>
+            <view class="introduce">{{item.summary}}</view>
+            <view class="bottom">
+              <view class="tagR">赛事</view>
+              <view class="time">{{item.releaseTime}}</view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
 </view>

+ 68 - 0
pages/hotnews/hotnews/hotnews.wxss

@@ -56,3 +56,71 @@ page {
 .article .attr {
   align-items: center;
 }
+
+.news-list-content .news-list-item{
+  position: relative;
+  margin-top: -30rpx;
+}
+.news-list-content .news-list-item >image{
+  width: 100%;
+  position: absolute;
+  z-index: 0;
+}
+.news-list-content .news-list-item .content {
+  padding: 56rpx 60rpx 68rpx 50rpx;
+  box-sizing: border-box;
+  display: flex;
+  position: relative;
+  z-index: 9;
+}
+.news-list-content .news-list-item .content .left{
+  width: 292rpx;
+  height: 174rpx;
+  margin-right: 34rpx;
+  position: relative;
+  z-index: 0;
+}
+.news-list-content .news-list-item .content .right .title {
+  width: 312rpx;
+  height: 44rpx;
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #262626;
+  line-height: 44rpx;
+  margin-bottom: 14rpx;
+}
+.news-list-content .news-list-item .content .right .introduce {
+  width: 288rpx;
+  height: 68rpx;
+  font-size: 24rpx;
+  font-weight: bold;
+  color: #868AA8;
+  line-height: 34rpx;
+  margin-bottom: 12rpx;
+  text-overflow: -o-ellipsis-lastline;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  line-clamp: 2;
+  -webkit-box-orient: vertical;
+}
+.news-list-content .news-list-item .content .right .bottom {
+  display: flex;
+  justify-content: space-between;
+}
+.news-list-content .news-list-item .content .right .bottom .tagR {
+  background: #83CEBE;
+  padding: 0 20rpx;
+  border-radius: 17rpx;
+  line-height: 34rpx;
+  font-size: 24rpx;
+  color: #FFFFFF;
+  height: 34rpx;
+}
+.news-list-content .news-list-item .content .right .bottom .time { 
+  font-size: 24rpx;
+  font-weight: 400;
+  color: #868AA8;
+  line-height: 34rpx;
+}

+ 1 - 1
utils/http.js

@@ -29,7 +29,7 @@ function request(api, method, header, data, hideLoading) {
     "sidx": "",
     "sord": "",
     "token": "",
-    "userId": 1
+    "userId": wx.getStorageSync('id')||''
   }
   data = data || {}
   Object.assign(pdata, data)