123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <!--pages/user/myworks/myworks.wxml-->
- <wxs module="wxs">
- function formatDate(time) {
- console.log(time);
- var t = getDate(time);
- var tf = function(i){return (i < 10 ? '0' : '') + i};
- var year = t.getFullYear();
- var month = tf(t.getMonth() + 1);
- var day = tf(t.getDate());
- var hour = tf(t.getHours());
- var minute = tf(t.getMinutes());
- return month + '-' + day + ' ' + hour + ':' + minute;
- }
- module.exports.formatDate = formatDate;
- </wxs>
- <view class='user-works'>
- <view class='works-article' wx:for="{{ wareCards }}" wx:key="{{ index }}">
- <view class='user-info'>
- <view class='avatar-img'>
- <image src='{{ item.user.avatar }}'></image>
- </view>
- <view>
- <view class='user-name'>{{ item.user.wechatName }}</view>
- <view class='user-time'>{{ wxs.formatDate(item.userRead.gmtCreated) }}</view>
- </view>
- </view>
- <view class='video-preview' bindtap='toMyWorks' data-id='{{ item.userRead.id }}' data-title='{{ item.userRead.title }}'>
- <image src='{{ item.userRead.iconImg }}'></image>
- </view>
- <view class='content-title'>
- {{ item.userRead.title }}
- </view>
- <view class='content-detail'>
- <view class='left'>{{ item.userRead.summary }}</view>
- <view class='right'>
- <view class='right-detail'>
- <view class='play-img'>
- <image src='../../../static/image/hotPlays.png'></image>
- </view>
- <text>{{ item.userRead.playAmount }}</text>
- </view>
- <view class='right-detail'>
- <view class='point-img'>
- <image src='../../../static/image/like.png'></image>
- </view>
- <text>{{ item.userRead.likeAmount }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
|