zhangqidong 6 năm trước cách đây
mục cha
commit
8e939459fc

+ 2 - 1
app.json

@@ -2,7 +2,8 @@
   "pages": [
     "pages/index/index",
     "pages/main/class/class",
-    "pages/main/reading/reading"
+    "pages/main/reading/reading",
+    "pages/user/myEdit/myEdit"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 52 - 131
component/hot/hot.js

@@ -1,127 +1,48 @@
 export const hotInit = (that) => {
   that.setData({
-      hotData: {
-        title: '热门',
-        imgUrls: [
-          'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
-          'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
-          'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
-        ],
-        indicatorDots: true,
-        autoplay: true,
-        interval: 5000,
-        duration: 700,
-        circular: true,
-        hotSearch: '鹅鹅鹅',
-        wareCards:[
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "1",
-            likes: "2",
-            classId: "1"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-          {
-            title:"铺满金色巴掌的水泥道",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "2"
-          },
-      
-        ]
-      }
-    }),
+    hotData: {
+      title: '热门',
+      imgUrls: [
+        'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
+        'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
+        'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
+      ],
+      indicatorDots: true,
+      autoplay: true,
+      interval: 5000,
+      duration: 700,
+      circular: true,
+      hotWareCardFirst: 'hotWareCardFirst',
+      hotWareCard: 'hotWareCard',
+      hotSearch: '鹅鹅鹅',
+      wareCards: [
+        {
+          title: "铺满金色巴掌的水泥道",
+          grade: "一年级 上学期",
+          img: "../../static/image/timg.jpg",
+          plays: "1",
+          likes: "2",
+          classId: "1"
+        },
+        {
+          title: "铺满金色巴掌的水泥道",
+          grade: "一年级 上学期",
+          img: "../../static/image/timg.jpg",
+          plays: "12345",
+          likes: "54321",
+          classId: "2"
+        },
+        {
+          title: "铺满金色巴掌的水泥道",
+          grade: "一年级 上学期",
+          img: "../../static/image/timg.jpg",
+          plays: "12345",
+          likes: "54321",
+          classId: "2"
+        },
+      ]
+    }
+  }),
     // 搜索方法
     that.searchHandler = () => {
       console.log('搜索按钮')
@@ -134,12 +55,12 @@ export const hotInit = (that) => {
       });
       console.log(that.data.hotInput)
     }
-    // 打开课程页面
-    that.openClass = (e) =>{
-      let classId = e.currentTarget.dataset.classid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../main/class/class?id=${classId}&title=${title}`
-      })
-    }
-}
+  // 打开课程页面
+  that.openClass = (e) => {
+    let classId = e.currentTarget.dataset.classid;
+    let title = e.currentTarget.dataset.title;
+    wx.navigateTo({
+      url: `../social/works/works?id=${classId}&title=${title}`
+    })
+  }
+}

+ 27 - 12
component/hot/hot.wxml

@@ -18,20 +18,35 @@
             <image src="../../static/image/hot_recommand.png" alt="" />
             <text>热门推荐</text>
         </view>
-        <view class="hotWares"  style="flex-direction:row;">
-            <view class="hotWareCard" wx:for="{{hotData.wareCards}}" wx:key="">
-            <view class="hotWareCard" wx:for="{{hotData.wareCards}}" wx:key="{{index}}" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
+        <view class="hotWares" style="flex-direction:row;">
+            <view wx:for="{{hotData.wareCards}}" wx:key="{{index}}" class="{{index === 0 ? hotData.hotWareCardFirst: hotData.hotWareCard}}" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
                 <image class="wareCardImg" src="{{item.img}}" />
-                <text class="wareCardTitle">{{item.title}}</text>
-                <text class="wareCardTip">{{item.grade}}</text>
-                <view class="bottomData">
-                    <view class="wareCardPlays">
-                        <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
-                        <text>{{item.plays}}</text>
+                <view wx:if="{{index===0}}" class="wrapper">
+                    <text class="wareCardTitle">{{item.title}}</text>
+                    <view class="bottomData">
+                        <text class="wareCardTip">{{item.grade}}</text>
+                        <view class="wareCardPlays">
+                            <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
+                            <text>{{item.plays}}</text>
+                        </view>
+                        <view class="wareCardLikes">
+                            <image class="wareCardLikesImg" src="../../static/image/like.png" />
+                            <text>{{item.likes}}</text>
+                        </view>
                     </view>
-                    <view class="wareCardLikes">
-                        <image class="wareCardLikesImg" src="../../static/image/like.png" />
-                        <text>{{item.likes}}</text>
+                </view>
+                <view wx:if="{{index!==0}}">
+                    <text class="wareCardTitle">{{item.title}}</text>
+                    <text class="wareCardTip">{{item.grade}}</text>
+                    <view class="bottomData">
+                        <view class="wareCardPlays">
+                            <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
+                            <text>{{item.plays}}</text>
+                        </view>
+                        <view class="wareCardLikes">
+                            <image class="wareCardLikesImg" src="../../static/image/like.png" />
+                            <text>{{item.likes}}</text>
+                        </view>
                     </view>
                 </view>
             </view>

+ 147 - 30
component/hot/hot.wxss

@@ -1,14 +1,17 @@
 swiper {
-    background: red;
+    margin-top: 10rpx;
+    background: #fff;
     display: block;
     width: 100%;
-    height: 318rpx;
+    height: 312rpx;
 }
 
 .slide-image {
     display: block;
-    width: 100%;
-    height: 100%;
+    margin: 0 auto;
+    width: 728rpx;
+    height: 312rpx;
+    border-radius: 20rpx;
 }
 
 .searchSection {
@@ -46,43 +49,49 @@ swiper {
     top: 10rpx;
     right: 15rpx;
 }
-.searchSection .allBooks{
+
+.searchSection .allBooks {
     font-size: 28rpx;
-    color:#61ca54;
+    color: #61ca54;
     font-family: PingFangSC-regular;
     width: 112rpx;
     margin-left: 56rpx;
 }
-.hotSection{
+
+.hotSection {
     width: 100%;
     /* height: 50rpx; */
     background: #fff;
     margin-top: 8rpx;
 }
-.hotSection .title{
+
+.hotSection .title {
     display: flex;
     align-items: center;
     margin: 20rpx 0 20rpx 20rpx;
 }
+
 .hotSection .title image {
     /* margin-left: 24rpx; */
     width: 34rpx;
     height: 38rpx;
 }
-.hotSection .title text{
+.hotSection .title text {
     width: 112rpx;
     height: 40rpx;
     margin-left: 12rpx;
     font-size: 28rpx;
     line-height: 50rpx;
     font-family: PingFangSC-regular;
-    color:#101010 
+    color: #101010
 }
-.hotWares{
+
+.hotWares {
     display: flex;
     flex-wrap: wrap;
 }
-.hotSection .hotWares .hotWareCard{
+
+.hotSection .hotWares .hotWareCard {
     position: relative;
     overflow: hidden;
     width: 352rpx;
@@ -90,68 +99,176 @@ swiper {
     margin: 0 0 18rpx 16rpx;
     box-shadow: 0 8rpx 6rpx 0 rgba(0, 0, 0, .28);
 }
-.hotWareCard .wareCardImg{
+
+
+
+.hotWareCard .wareCardImg {
     width: 100%;
     height: 200rpx;
 }
-.hotWareCard .wareCardTitle{
+
+
+
+.hotWareCard .wareCardTitle {
     margin: 0 auto;
     width: 320rpx;
     height: 46rpx;
-    display:block; 
+    display: block;
     text-align: center;
-    color: rgba(16,16,16,1);
+    color: rgba(16, 16, 16, 1);
     font-size: 32rpx;
 }
-.hotWareCard .wareCardTip{
-   position: absolute;
-   top: 10rpx;
-   right: 4rpx;
-   z-index: 2;
+
+
+
+
+
+.hotWareCard .wareCardTip {
+    position: absolute;
+    top: 10rpx;
+    left: 4rpx;
+    z-index: 2;
     width: 178rpx;
     height: 40rpx;
-    display:block; 
+    display: block;
     text-align: center;
-    color: rgba(16,16,16,1);
+    color: rgba(16, 16, 16, 1);
     font-size: 28rpx;
 }
-.bottomData{
+
+
+
+.hotWareCard .bottomData {
     height: 34rpx;
     margin-top: 10rpx;
     display: flex;
     /* flex-direction: row; */
-    justify-content:space-between;
+    justify-content: space-between;
     align-items: center;
 }
-.hotWareCard .wareCardPlays{
+
+.hotWareCard .wareCardPlays {
     width: 100rpx;
     margin-left: 18rpx;
     display: flex;
     flex-direction: row;
     align-items: center;
 }
-.hotWareCard .wareCardPlays .wareCardPlaysImg{
+
+.hotWareCard .wareCardPlays .wareCardPlaysImg {
     width: 30rpx;
     height: 30rpx;
 }
+
 .hotWareCard .wareCardPlays text {
     margin-left: 4rpx;
     color: #61CA54;
     font-size: 24rpx;
 }
-.hotWareCard .wareCardLikes{
+
+.hotWareCard .wareCardLikes {
     width: 100rpx;
     margin-right: 18rpx;
     display: flex;
     flex-direction: row;
     align-items: center;
 }
-.hotWareCard .wareCardLikes .wareCardLikesImg{
+
+.hotWareCard .wareCardLikes .wareCardLikesImg {
     width: 30rpx;
     height: 30rpx;
 }
+
 .hotWareCard .wareCardLikes text {
     margin-left: 4rpx;
     color: #FF9800;
     font-size: 24rpx;
-}
+}
+/** 第一个大图**/
+.hotSection .hotWares .hotWareCardFirst {
+    position: relative;
+    overflow: hidden;
+    width: 740rpx;
+    height: 342rpx;
+    margin: 10rpx auto 20rpx;
+    box-shadow: 0 8rpx 6rpx 0 rgba(0, 0, 0, .28);
+}
+
+.hotWareCardFirst .wareCardImg {
+    width: 100%;
+    height: 100%;
+}
+
+.hotWareCardFirst .wrapper {
+    width: 100%;
+    height: 100rpx;
+    background: #fff;
+    position: absolute;
+    bottom: 0;
+}
+
+.hotWareCardFirst .wareCardTitle {
+    margin: 10rpx 20rpx 0;
+    display: block;
+    /* text-align: center; */
+    color: rgba(16, 16, 16, 1);
+    font-size: 32rpx;
+}
+
+.hotWareCardFirst .wareCardTip {
+    margin: 0 20rpx;
+    width: 178rpx;
+    height: 34rpx;
+    display: block;
+    text-align: center;
+    color: rgba(16, 16, 16, 1);
+    font-size: 28rpx;
+}
+
+.hotWareCardFirst .bottomData {
+    width: 100%;
+    height: 34rpx;
+    margin-top: 5rpx;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.hotWareCardFirst .wareCardPlays {
+    width: 100rpx;
+    margin-left: 230rpx;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+
+.hotWareCardFirst .wareCardPlays .wareCardPlaysImg {
+    width: 30rpx;
+    height: 30rpx;
+}
+
+.hotWareCardFirst .wareCardPlays text {
+    margin-left: 4rpx;
+    color: #61CA54;
+    font-size: 24rpx;
+}
+
+.hotWareCardFirst .wareCardLikes {
+    width: 100rpx;
+    margin-right: 18rpx;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+
+.hotWareCardFirst .wareCardLikes .wareCardLikesImg {
+    width: 30rpx;
+    height: 30rpx;
+}
+
+.hotWareCardFirst .wareCardLikes text {
+    margin-left: 4rpx;
+    color: #FF9800;
+    font-size: 24rpx;
+}

+ 5 - 1
component/my/my.js

@@ -11,6 +11,10 @@ export const myInit =  (that) => {
         flowerNum: 56245
     }
   })
-  //请求数据封装
+  that.toAttentionMe = (e) => {
+    wx.navigateTo({
+      url: '../user/myEdit/myEdit'
+    })
+  }
 
 }

+ 2 - 2
component/my/my.wxml

@@ -1,6 +1,6 @@
 <template name="my">
-  <view> 
-    <view class='mine-top'>
+  <view class='container'> 
+    <view class='mine-top' bindtap='toAttentionMe'>
       <view class='avatar-box'>
         <image src="{{ myData.imgUrl }}" background-size="cover"></image>
       </view>

+ 65 - 0
pages/user/myEdit/myEdit.js

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

+ 1 - 0
pages/user/myEdit/myEdit.json

@@ -0,0 +1 @@
+{}

+ 5 - 0
pages/user/myEdit/myEdit.wxml

@@ -0,0 +1,5 @@
+<view class='container'>
+  <form>
+    
+  </form>
+</view>

+ 4 - 0
pages/user/myEdit/myEdit.wxss

@@ -0,0 +1,4 @@
+.container{
+  width: 750rpx;
+  height: 428rpx;
+}

+ 19 - 6
project.config.json

@@ -13,11 +13,7 @@
 	"compileType": "miniprogram",
 	"libVersion": "2.3.0",
 	"appid": "wx8961a3e5512f307c",
-<<<<<<< HEAD
 	"projectname": "reading",
-=======
-	"projectname": "reader",
->>>>>>> de802dd4433d732c96f728e75151744607a72c93
 	"debugOptions": {
 		"hidedInDevtools": []
 	},
@@ -31,13 +27,30 @@
 			"current": -1,
 			"list": []
 		},
+		"plugin": {
+			"current": -1,
+			"list": []
+		},
 		"game": {
 			"currentL": -1,
 			"list": []
 		},
 		"miniprogram": {
-			"current": -1,
-			"list": []
+			"current": 1,
+			"list": [
+				{
+					"id": 0,
+					"name": "edit",
+					"pathName": "pages/user/myEdit/myEdit",
+					"query": ""
+				},
+				{
+					"id": -1,
+					"name": "edit",
+					"pathName": "pages/user/myEdit/myEdit",
+					"query": ""
+				}
+			]
 		}
 	}
 }