Mike 6 năm trước cách đây
mục cha
commit
f78644b02f

+ 10 - 2
wechat/app.wxss

xqd
@@ -1,9 +1,17 @@
 @import "bower_components/zanui-weapp/dist/index.wxss";
 
 page {
-  font-family: HYQiHei-DES;
-}
+  /* font-family: HYQiHei-DES; */
 
+    height: 100%;
+    font-size: 11pt;
+    color: #555;
+    background: #EFEFF4;
+    overflow-x: hidden;
+}
+page,block,view,scroll-view,swiper,movable-view,icon,text,progress,button,checkbox,form,input,label,picker,picker-view,radio,slider,switch,textarea,navigator,audio,image,video,map,canvas,contact-button {
+    box-sizing: border-box;
+}
 /* flex box */
 .flex-horizontal {
   display: flex;

+ 1 - 1
wechat/bower.json

xqd
@@ -13,6 +13,6 @@
     "tests"
   ],
   "dependencies": {
-    "zanui-weapp": "^3.0.4"
+    "zanui-weapp": "^3.0.6"
   }
 }

BIN
wechat/images/btn_gonggao_n@3x.png


BIN
wechat/images/btn_gonggao_s@3x.png


BIN
wechat/images/btn_home_n@3x.png


BIN
wechat/images/btn_home_s@3x.png


BIN
wechat/images/btn_kaishi_01@3x.png


BIN
wechat/images/btn_me_n@3x.png


BIN
wechat/images/btn_me_s@3x.png


BIN
wechat/images/btn_wenzhang_n@3x.png


BIN
wechat/images/btn_wenzhang_s@3x.png


BIN
wechat/images/icon-down.png


BIN
wechat/images/icon-up.png


BIN
wechat/images/icon_kecheng01@3x.png


BIN
wechat/images/icon_qingjia@3x.png


BIN
wechat/images/icon_xuexishijian@3x.png


BIN
wechat/images/img_banner01@3x.png


BIN
wechat/images/img_gqsj_01@3x.png


BIN
wechat/images/img_shijian_01@3x.png


BIN
wechat/images/img_touxiang@3x.png


BIN
wechat/images/video-play.png


+ 105 - 5
wechat/pages/article/article.js

xqd
@@ -1,8 +1,108 @@
+//var api = require("../../api.js"), app = getApp(), 
+var is_loading_more = !1, is_no_more = !1;
+
 
-var app = getApp()
 Page({
-  
-  onLoad: function () {
-    console.log('onLoad')
+  data: {
+    page: 1,
+    video_list: [],
+    url: "",
+    hide: "hide",
+    show: !1,
+    animationData: {}
+  },
+  onLoad: function (a) {
+    // app.pageOnLoad(this);
+    this.loadMoreGoodsList();
+  },
+  onReady: function () { },
+  onShow: function () {
+    // app.pageOnShow(this);
+  },
+  onHide: function () { },
+  onUnload: function () { },
+  onPullDownRefresh: function () { },
+  loadMoreGoodsList: function () {
+    var o = this;
+    if (!is_loading_more) {
+      o.setData({
+        show_loading_bar: !0
+      }), is_loading_more = !0;
+      var i = o.data.page;
+      var v = [{
+                "id":"234",
+                "title":"小程序项目整体介绍",
+                "url":"http://m1.beiyuesi.com/2.mp4",
+                "sort":"9",
+                "is_delete":"0",
+                "addtime":"1515120216",
+                "store_id":"20926",
+            "pic_url":"https://u5.9026.com/addons/swdz_mall/core/web/uploads/image/f0/f0734ad93d46497483344846864596a4.jpg",
+                "content":"想要自己开发APP,却备受组建开发团队的困扰更别说高昂的开发费用与漫长的开",
+                "type":"0",
+                "time":"01月05日",
+                "show":-1
+            },
+        {
+          "id": "235",
+          "title": "小程序模版介绍",
+          "url": "http://m1.beiyuesi.com/1.mp4",
+          "sort": "99",
+          "is_delete": "0",
+          "addtime": "1515120395",
+          "store_id": "20926",
+          "pic_url": "https://u5.9026.com/addons/swdz_mall/core/web/uploads/image/0e/0e739254177172e4b815d75f88da77b4.png",
+          "content": "小程序是腾讯旗下继朋友圈、公众号之后推出的又一款战略级的产品。是线下实体店实体零售转型升级、实现新突破的利器。小程序比公众号更容易传播和裂变,比传统电商更容易获客和成交,比朋友圈微商更专业和可信",
+          "type": "0",
+          "time": "01月05日",
+          "show": -1
+        },
+            ];
+      var t = o.data.video_list.concat(v);
+      o.setData({
+        video_list: t,
+        page: i + 1
+      });
+      // app.request({
+      //   url: api.default.video_list,
+      //   data: {
+      //     page: i
+      //   },
+      //   success: function (a) {
+      //     0 == a.data.list.length && (is_no_more = !0);
+      //     var t = o.data.video_list.concat(a.data.list);
+      //     o.setData({
+      //       video_list: t,
+      //       page: i + 1
+      //     });
+      //   },
+      //   complete: function () {
+      //     is_loading_more = !1, o.setData({
+      //       show_loading_bar: !1
+      //     });
+      //   }
+      // });
+    }
+  },
+  play: function (a) {
+    var t = a.currentTarget.dataset.index;
+    wx.createVideoContext("video_" + this.data.show_video).pause(), this.setData({
+      show_video: t,
+      show: !0
+    });
+  },
+  onReachBottom: function () {
+    is_no_more || this.loadMoreGoodsList();
+  },
+  more: function (a) {
+    var t = this, o = a.target.dataset.index, i = t.data.video_list, e = wx.createAnimation({
+      duration: 1e3,
+      timingFunction: "ease"
+    });
+    this.animation = e, -1 != i[o].show ? (e.rotate(0).step(), i[o].show = -1) : (e.rotate(0).step(),
+      i[o].show = 0), t.setData({
+        video_list: i,
+        animationData: this.animation.export()
+      });
   }
-})
+});

+ 4 - 1
wechat/pages/article/article.json

xqd
@@ -1,5 +1,8 @@
 {
+  "navigationBarBackgroundColor": "#000",
+  "navigationBarTextStyle": "white",
   "usingComponents": {
     "zan-card": "../../bower_components/zanui-weapp/dist/card/index"
-  }
+  },
+  "navigationBarTitleText": "视频专区"
 }

+ 24 - 3
wechat/pages/article/article.wxml

xqd
@@ -1,3 +1,24 @@
-<view>
-  已实现页面
-</view>
+<view class="after-navber">
+    <view class="info">
+        <view class="info-list">
+            <view class="info-content" wx:for="{{video_list}}">
+                <view class="info-bg">
+                    <view class="info-video">
+                        <image bindtap="play" class="bg {{show_video==index?hide:''}}" data-index="{{index}}" src="{{item.pic_url}}"></image>
+                        <image bindtap="play" class="play {{show_video==index?hide:''}}" data-index="{{index}}" src="/images/video-play.png"></image>
+                        <video autoplay="true" class="{{show_video==index?'':hide}}" controls="controls" id="video_{{index}}" src="{{item.url}}" wx:if="{{show_video==index}}"></video>
+                    </view>
+                    <view class="info-label">{{item.title||'未命名'}}</view>
+                    <view class="content {{item.show!=-1?'':'more'}}">{{item.content||'暂无信息'}}</view>
+                    <view class="flex-y-center flex-x-center" style="position:relative;height:80rpx;font-size:9pt;color:#afafaf">
+                        <text class="flex-y-center left">{{item.time}}</text>
+                        <view capture-bind:tap="more" class="right flex-y-center" data-index="{{index}}">
+                            <image animation="{{animationData}}" src="{{item.show!=-1?'/images/icon-up.png':'/images/icon-down.png'}}"></image>
+                            <text data-index="{{index}}">展开</text>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+</view>

+ 123 - 0
wechat/pages/article/article.wxss

xqd
@@ -0,0 +1,123 @@
+.info {
+    overflow-x: hidden;
+    padding-bottom: 20rpx;
+}
+
+.info .info-list {
+    margin-right: -10rpx;
+    margin-left: -10rpx;
+}
+
+.info-content {
+    padding: 0 10rpx;
+    width: 100%;
+    display: inline-block;
+    margin-bottom: 20rpx;
+}
+
+.info-content .info-bg {
+    background-color: #fff;
+    position: relative;
+    width: 100%;
+    height: 100%;
+}
+
+.info-content .info-video {
+    width: 100%;
+    height: 422rpx;
+    background-color: #fff;
+    position: relative;
+}
+
+.hide {
+    display: none;
+}
+
+.info-content .info-video .bg {
+    width: 100%;
+    height: 422rpx;
+    position: absolute;
+    top: 0;
+    left: 0;
+}
+
+.info-content .info-video .play {
+    width: 128rpx;
+    height: 128rpx;
+    position: absolute;
+    top: 137rpx;
+    left: 311rpx;
+    opacity: 0.8;
+}
+
+.info-content .info-video video {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    left: 0;
+}
+
+.info-content .info-label {
+    width: 100%;
+    height: 100rpx;
+    line-height: 100rpx;
+    padding: 0 24rpx;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    font-weight: bold;
+}
+
+.modal {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background-color: rgba(0,0,0,1);
+    z-index: 9999;
+}
+
+.modal video {
+    width: 100%;
+    height: 430rpx;
+}
+
+.no-scroll {
+    height: 100%;
+    overflow-y: hidden;
+}
+
+.info-content .content {
+    padding: 0 24rpx;
+}
+
+.info-content .content.more {
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 3;
+}
+
+.info-content .left {
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    padding: 0 20rpx;
+}
+
+.info-content .right {
+    position: absolute;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    padding: 0 20rpx;
+}
+
+.info-content .right image {
+    width: 18rpx;
+    height: 10rpx;
+    margin-right: 16rpx;
+}

+ 7 - 2
wechat/pages/mycourse/mycourse.wxml

xqd
@@ -2,14 +2,19 @@
   <zan-cell-group>
     <zan-cell title="主讲老师" value="余军"></zan-cell>
     <zan-cell title="报名日期" value="2018/5/27"></zan-cell>
-    <zan-cell title="课程截至日期" value="2018/5/27"></zan-cell>
+    <zan-cell title="课程截至日期" >
+    <view slot="footer">
+      <text class="text-new">2018/5/27</text>
+
+    </view> 
+    </zan-cell>
     <zan-cell title="评价讲师" is-link url="/pages/rate/rate">
     <view slot="footer">
       <text class="text-new">NEW</text>
 
     </view> 
     </zan-cell>
-    <zan-cell title="课程剩余天数" value="332天"></zan-cell>
+    <!-- <zan-cell title="课程剩余天数" value="332天"></zan-cell> -->
     <zan-cell title="剩余请假次数(短假)" value="8次"></zan-cell>
     <zan-cell title="剩余请假次数(长假)" value="2次"></zan-cell>
   </zan-cell-group>

+ 1 - 1
wechat/pages/userinfo/userinfo.wxml

xqd
@@ -14,7 +14,7 @@
       <image src="../../images/icon_xuexishijian@2x.png" />
     </view>
   </zan-cell>
-  <zan-cell title="请假" class="userinfo-list__item" is-link url="/pages/apply-leave/apply-leave">
+  <zan-cell title="我要请假" class="userinfo-list__item" is-link url="/pages/apply-leave/apply-leave">
     <view class="userinfo-list__icon" slot="icon">
       <image src="../../images/icon_qingjia@2x.png" />
     </view>