1234567891011121314151617181920212223242526272829303132333435363738 |
- <wxs module="wxs">
- function formatDate(time) {
- var timeTemp = getDate(time);
- var timeString = timeTemp.toLocaleDateString() + timeTemp.toLocaleTimeString();
- return timeString.replace('/','-').replace('/','-').replace('上午',' ').replace('下午',' ');
- }
- function parseDouble(number) {
- return parseFloat(number).toFixed(2);
- }
- module.exports.formatDate = formatDate;
- module.exports.parseDouble = parseDouble;
- </wxs>
- <view class='walletDetails'>
- <view class="walletDetails-center">
- <view class='walletDetails-info' wx:for="{{ walletDatails }}" wx:key="{{ index }}">
- <view class="walletDetails-left">
- <view class='avatar-box'>
- <image src="../../../static/image/walletdetails.png" />
- </view>
- <view class="avatar-info">
- <text class="avatar-doc">{{ item.description }}</text>
- <text class="avatar-time">{{wxs.formatDate(item.gmtCreated)}}</text>
- </view>
- </view>
- <view class="walletDetails-right">
- <view class="avatar-value-pos" wx:if="{{ item.type === 'INCOME' }}">
- <text class="avatar-symbol">+</text>
- <text>{{ wxs.parseDouble(item.price / 100) }}</text>
- </view>
- <view class="avatar-value-neg" wx:else>
- <text class="avatar-symbol">-</text>
- <text>{{ wxs.parseDouble(item.price / 100) }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
|