123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- <wxs module="wxs">
- function formatDate(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;
- }
- function getBirthday(birthday){
- var t = getDate(birthday);
- var tf = function(i){return (i < 10 ? '0' : '') + i};
- var year = t.getFullYear();
- var month = tf(t.getMonth() + 1);
- var day = tf(t.getDate());
- return year + '年' + month + '月' + day + '日';
- }
- module.exports.formatDate = formatDate;
- module.exports.getBirthday = getBirthday;
- </wxs>
- <template name="my">
- <view class='mine-container'>
- <view class='follow-details'>
- <view class='follow-info'>
- <view class='avatar-bg'>
- <view class='avatar-box'>
- <image class='avatar-image' src='{{ myData.user.user.avatar }}'></image>
- </view>
- <view class='occupation-title'>{{ myData.user.user.profession }}</view>
- </view>
- <view class='avatar-msg'>
- <view class='avatar-nickname'>
- <text>{{ myData.user.user.wechatName }}</text>
- <view class='flowers-box' wx:if='{{ myData.user.user.gender === 2 }}'>
- <image src='../../static/image/flowers.png'></image>
- </view>
- <view class='flowers-box' wx:elif='{{ myData.user.user.gender === 1 }}'>
- <image src='../../static/image/boy.png'></image>
- </view>
- <view wx:else class='gender-size'>未知</view>
- </view>
- <view class='avatar-birthday'>{{ wxs.getBirthday(myData.user.user.birthday) }}</view>
- <view class='avatar-address'>{{ myData.user.user.schoolName }}</view>
- </view>
- <view class='mine-edit' bindtap='toMyEdit' data-title='{{ myData.title }}'>
- <view class='edit-image'>
- <image class='edit-img' src='../../static/image/reset.png'></image>
- </view>
- <view class='edit-text'>修改</view>
- </view>
- </view>
- <view class='mine-category'>
- <view class='play-count'>
- <view>{{ myData.user.playAmount || 0 }}</view>
- <view class='border-right'>
- <view class='play-img'>
- <image src='../../static/image/play.png'></image>
- </view>
- <text>播放量</text>
- </view>
- </view>
- <view class='follow-count'>
- <view class='color'>{{ myData.user.fansAmount || 0 }}</view>
- <view class='border-right'>
- <view class='play-img'>
- <image src='../../static/image/follow.png'></image>
- </view>
- <text>关注</text>
- </view>
- </view>
- <view class='point-count'>
- <view class='color'>{{ myData.user.likeAmount || 0 }}</view>
- <view class='border-right'>
- <view class='play-img'>
- <image src='../../static/image/point.png'></image>
- </view>
- <text>赞</text>
- </view>
- </view>
- <view class='flower-count'>
- <view class='color'>{{ myData.user.pointAmount || 0 }}</view>
- <view class='border-right'>
- <view class='play-img'>
- <image src='../../static/image/flower.png'></image>
- </view>
- <text>红花</text>
- </view>
- </view>
- </view>
- <view class='wallet-module' bindtap='toMyWallet' data-title='{{ myData.wallet }}' wx:if="{{!myData.isIOS}}">
- <view class='wallet-center'>
- <view class='wallet-left'>
- <view class='icon-box'>
- <image src='../../static/image/wallet.png'></image>
- </view>
- <text>钱包</text>
- </view>
- <view class='wallet-right'>
- <image src='../../static/image/to.png'></image>
- </view>
- </view>
- </view>
- <view class='course-module' bindtap='toMyCourse' data-title='{{ myData.course }}'>
- <view class='wallet-center'>
- <view class='wallet-left'>
- <view class='icon-box'>
- <image src='../../static/image/courses.png'></image>
- </view>
- <text>我的课程</text>
- </view>
- <view class='wallet-right'>
- <image src='../../static/image/to.png'></image>
- </view>
- </view>
- </view>
- <view class='group-module' bindtap='toMyCollage' data-title='{{ myData.collage }}' wx:if="{{!myData.isIOS}}">
- <view class='wallet-center'>
- <view class='wallet-left'>
- <view class='icon-box'>
- <image src='../../static/image/group.png'></image>
- </view>
- <text>我的拼团</text>
- </view>
- <view class='wallet-right'>
- <image src='../../static/image/to.png'></image>
- </view>
- </view>
- </view>
- <view class='reading-module' bindtap='toMyRead' data-title='{{ myData.read }}'>
- <view class='wallet-center'>
- <view class='wallet-left'>
- <view class='icon-box'>
- <image src='../../static/image/record.png'></image>
- </view>
- <text>我的朗读</text>
- </view>
- <view class='wallet-right'>
- <image src='../../static/image/to.png'></image>
- </view>
- </view>
- </view>
- <view class='keep-module' bindtap='toMyKeep' data-title='{{ myData.keep }}'>
- <view class='wallet-center'>
- <view class='wallet-left'>
- <view class='icon-box'>
- <image src='../../static/image/keep.png'></image>
- </view>
- <text>我的收藏</text>
- </view>
- <view class='wallet-right'>
- <image src='../../static/image/to.png'></image>
- </view>
- </view>
- </view>
- <view class='myfollow-module' bindtap='toMyConcern' data-title='{{ myData.concern }}'>
- <view class='wallet-center'>
- <view class='wallet-left'>
- <view class='icon-box'>
- <image src='../../static/image/myfollow.png'></image>
- </view>
- <text>我的关注</text>
- </view>
- <view class='wallet-right'>
- <image src='../../static/image/to.png'></image>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
|