|
@@ -1,54 +1,35 @@
|
|
-<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>
|
|
|
|
|
|
+<wxs src="../../pages/commonWxs/format.wxs" module="format"/>
|
|
<template name="my">
|
|
<template name="my">
|
|
<view class='mine-container'>
|
|
<view class='mine-container'>
|
|
<view class='follow-details'>
|
|
<view class='follow-details'>
|
|
<view class='follow-info'>
|
|
<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 class='set-msg'>
|
|
|
|
+ <view class='avatar-bg'>
|
|
|
|
+ <view class='avatar-box'>
|
|
|
|
+ <image class='avatar-image' src='{{ myData.user.user.avatar }}'></image>
|
|
</view>
|
|
</view>
|
|
- <view class='flowers-box' wx:elif='{{ myData.user.user.gender === 1 }}'>
|
|
|
|
- <image src='../../static/image/boy.png'></image>
|
|
|
|
|
|
+ <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>
|
|
- <view wx:else class='gender-size'>未知</view>
|
|
|
|
|
|
+ <view class='avatar-birthday'>{{ format.getBirthday(myData.user.user.birthday) }}</view>
|
|
|
|
+ <view class='avatar-address'>{{ myData.user.user.schoolName }}</view>
|
|
</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 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='edit-text'>修改</view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class='mine-category'>
|
|
<view class='mine-category'>
|
|
@@ -64,8 +45,8 @@
|
|
<view class='follow-count'>
|
|
<view class='follow-count'>
|
|
<view class='color'>{{ myData.user.fansAmount || 0 }}</view>
|
|
<view class='color'>{{ myData.user.fansAmount || 0 }}</view>
|
|
<view class='border-right'>
|
|
<view class='border-right'>
|
|
- <view class='play-img'>
|
|
|
|
- <image src='../../static/image/follow.png'></image>
|
|
|
|
|
|
+ <view class='red-heart'>
|
|
|
|
+ <image src='../../static/image/redheart.png'></image>
|
|
</view>
|
|
</view>
|
|
<text>关注</text>
|
|
<text>关注</text>
|
|
</view>
|
|
</view>
|
|
@@ -73,7 +54,7 @@
|
|
<view class='point-count'>
|
|
<view class='point-count'>
|
|
<view class='color'>{{ myData.user.likeAmount || 0 }}</view>
|
|
<view class='color'>{{ myData.user.likeAmount || 0 }}</view>
|
|
<view class='border-right'>
|
|
<view class='border-right'>
|
|
- <view class='play-img'>
|
|
|
|
|
|
+ <view class='point-img'>
|
|
<image src='../../static/image/point.png'></image>
|
|
<image src='../../static/image/point.png'></image>
|
|
</view>
|
|
</view>
|
|
<text>赞</text>
|
|
<text>赞</text>
|