|
@@ -1,24 +1,56 @@
|
|
|
+<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='mine-center'>
|
|
|
- <view class='mine-info'>
|
|
|
- <view class='mine-bg'>
|
|
|
- <view class='mine-avatar'>
|
|
|
+ <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/_edit.png'></image>
|
|
|
+ <image class='edit-img' src='../../static/image/reset.png'></image>
|
|
|
</view>
|
|
|
- <view class='edit-text'>修改个人资料</view>
|
|
|
+ <view class='edit-text'>修改</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class='mine-detail'>
|
|
|
- <text class='mine-title'>{{ myData.user.user.wechatName }}</text>
|
|
|
- <view class='mine-address'>{{ myData.user.user.schoolName }}</view>
|
|
|
- <view class='mine-line'></view>
|
|
|
- </view>
|
|
|
<view class='mine-category'>
|
|
|
<view class='play-count'>
|
|
|
<view>{{ myData.user.playAmount || 0 }}</view>
|