Sfoglia il codice sorgente

提交代码~

release/210823_需求对对碰
王饶冀 4 anni fa
parent
commit
c041e52cb6

+ 1
- 0
pages/index/components/homepage/homepage.js Vedi File

tempListData.push(...datas.demandList); tempListData.push(...datas.demandList);
tempListData.forEach(el => { tempListData.forEach(el => {
el.createdOn = $util.formatTime(new Date(el.createdOn), true); el.createdOn = $util.formatTime(new Date(el.createdOn), true);
el.createdOn = el.createdOn.replaceAll('/', '-');
if (typeof el.type == 'string') { if (typeof el.type == 'string') {
el.type = el.type.split(','); el.type = el.type.split(',');
} }

+ 1
- 0
pages/index/components/listDetails/Details.js Vedi File

tempListData.push(...datas.demandList); tempListData.push(...datas.demandList);
tempListData.forEach(el => { tempListData.forEach(el => {
el.createdOn = $util.formatTime(new Date(el.createdOn), true); el.createdOn = $util.formatTime(new Date(el.createdOn), true);
el.createdOn = el.createdOn.replaceAll('/', '-');
if (typeof el.type == 'string') { if (typeof el.type == 'string') {
el.type = el.type.split(','); el.type = el.type.split(',');
} }

+ 1
- 0
pages/index/index.js Vedi File

tempListData.push(...datas.demandList); tempListData.push(...datas.demandList);
tempListData.forEach(el => { tempListData.forEach(el => {
el.createdOn = $util.formatTime(new Date(el.createdOn), true); el.createdOn = $util.formatTime(new Date(el.createdOn), true);
el.createdOn = el.createdOn.replaceAll('/', '-');
if (typeof el.type == 'string') { if (typeof el.type == 'string') {
el.type = el.type.split(','); el.type = el.type.split(',');
} }

+ 2
- 1
pages/msgModule/wechat2/wechat2.js Vedi File

} else { } else {
item.type = 1 item.type = 1
} }
item.date = utils.formatTime(new Date(item.sendTime))
item.date = utils.formatTime(new Date(item.sendTime));
item.date = item.date.replaceAll('/', '-');
}); });
this.setData({ this.setData({
historyList historyList

+ 46
- 53
pages/msgModule/wechat2/wechat2.wxml Vedi File

<!-- pages/wechat2/wechat2.wxml --> <!-- pages/wechat2/wechat2.wxml -->
<view class='news'> <view class='news'>
<view class="historycon"> <view class="historycon">
<scroll-view scroll-y="true" scroll-into-view="{{scrollid}}" scroll-with-animation="{{true}}" style="height:{{scrollHeight}}" class="history" refresher-enabled="true" bindrefresherrefresh="refresh" refresher-triggered="{{triggered}}">
<!-- 历史记录部分start -->
<view wx:if="{{historyList.length > 0}}">
<view class="historyText">历史消息</view>
<block wx:for="{{historyList}}" wx:key="index">
<!-- 此处为other -->
<view wx:if="{{item.type==1}}" id="historyscrollid{{index}}">
<view>
<text class='chat-time' style="display:none;">{{item.date}}</text>
</view>
<view class='other-record'>
<image class='other-head-img' src='{{item.senderHeadPortrait}}'></image>
<view class='other-record-content-triangle'></view>
<view class='other-record-content'>{{item.content}}</view>
</view>
</view>
<!-- 此处为结尾 -->
<!-- 此处为own -->
<view id="historyscrollid{{index}}" wx:else>
<view>
<text class='chat-time' style="display:none;">{{item.date}}</text>
</view>
<view class='own-record'>
<view class='own-record-content'>{{item.content}}</view>
<view class='own-record-content-triangle'></view>
<image class='own-head-img' src='{{item.senderHeadPortrait}}'></image>
</view>
</view>
<!-- own结尾 -->
</block>
<view class="historyText">以上为历史消息</view>
</view>
<!-- 历史记录部分end -->
<block wx:for="{{newsList}}" wx:key="index">
<!-- <scroll-view scroll-y="true" scroll-into-view="{{scrollid}}" scroll-with-animation="{{true}}" style="height:{{scrollHeight}}" class="history" refresher-enabled="true" bindrefresherrefresh="refresh" refresher-triggered="{{triggered}}"> -->
<!-- 历史记录部分start -->
<view wx:if="{{historyList.length > 0}}">
<view class="historyText">历史消息</view>
<block wx:for="{{historyList}}" wx:key="index">
<!-- 此处为other --> <!-- 此处为other -->
<view wx:if="{{item.type==1}}" id="scrollid{{index}}">
<view wx:if="{{item.type==1 && item.messageType != 1}}" id="historyscrollid{{index}}">
<view> <view>
<text class='chat-time' style="display:none;">{{item.date}}</text> <text class='chat-time' style="display:none;">{{item.date}}</text>
</view> </view>
<view class='other-record'> <view class='other-record'>
<image class='other-head-img' src='{{receivebaseInfo.avatar}}'></image>
<image class='other-head-img' src='{{item.senderHeadPortrait}}'></image>
<view class='other-record-content-triangle'></view> <view class='other-record-content-triangle'></view>
<view class='other-record-content'>{{item.message}}</view>
<view class='other-record-content'>{{item.content}}</view>
</view> </view>
</view> </view>
<!-- 此处为结尾 --> <!-- 此处为结尾 -->
<!-- 此处为own --> <!-- 此处为own -->
<view id="scrollid{{index}}" wx:else>
<view id="historyscrollid{{index}}" wx:elif="{{item.type==0 && item.messageType != 1}}">
<view> <view>
<text class='chat-time' style="display:none;">{{item.date}}</text> <text class='chat-time' style="display:none;">{{item.date}}</text>
</view> </view>
<view class='own-record'> <view class='own-record'>
<view class='own-record-content'>{{item.message}}</view>
<view class='own-record-content'>{{item.content}}</view>
<view class='own-record-content-triangle'></view> <view class='own-record-content-triangle'></view>
<image class='own-head-img' src='{{sendAvatar}}'></image>
<image class='own-head-img' src='{{item.senderHeadPortrait}}'></image>
</view> </view>
</view> </view>
<view wx:else>
{{ item.object.info }} \ {{ item.date }}
</view>
<!-- own结尾 --> <!-- own结尾 -->
</block> </block>
</scroll-view>
<view class="historyText">以上为历史消息</view>
</view>
<!-- 历史记录部分end -->
<block wx:for="{{newsList}}" wx:key="index">
<!-- 此处为other -->
<view wx:if="{{item.type==1}}" id="scrollid{{index}}">
<view>
<text class='chat-time' style="display:none;">{{item.date}}</text>
</view>
<view class='other-record'>
<image class='other-head-img' src='{{receivebaseInfo.avatar}}'></image>
<view class='other-record-content-triangle'></view>
<view class='other-record-content'>{{item.message}}</view>
</view>
</view>
<!-- 此处为结尾 -->
<!-- 此处为own -->
<view id="scrollid{{index}}" wx:else>
<view>
<text class='chat-time' style="display:none;">{{item.date}}</text>
</view>
<view class='own-record'>
<view class='own-record-content'>{{item.message}}</view>
<view class='own-record-content-triangle'></view>
<image class='own-head-img' src='{{sendAvatar}}'></image>
</view>
</view>
<!-- own结尾 -->
</block>
<!-- </scroll-view> -->
</view> </view>
</view> </view>
<view class="sendmessage"> <view class="sendmessage">
<view class="send-message"> <view class="send-message">
<input
class="chat-input"
type="text"
bindinput="bindChange"
confirm-type="send"
value='{{input}}'
cursor-spacing="16px"
hold-keyboard="{{true}}"
placeholder=""
bindconfirm="send"
/>
<image class="expression-msg-img" src="/images/home/expression-msg-icon.png" bind:tap="emotionChange"/>
<input class="chat-input" type="text" bindinput="bindChange" confirm-type="send" value='{{input}}' cursor-spacing="16px" hold-keyboard="{{true}}" placeholder="" bindconfirm="send" />
<image class="expression-msg-img" src="/images/home/expression-msg-icon.png" bind:tap="emotionChange" />
<image class="img-msg-img" src="/images/home/img-msg-icon.png" /> <image class="img-msg-img" src="/images/home/img-msg-icon.png" />
</view> </view>
<view class="emotions" wx:if="{{emotionVisible}}"> <view class="emotions" wx:if="{{emotionVisible}}">

+ 2
- 2
pages/msgModule/wechat2/wechat2.wxss Vedi File

background-color: #fff; background-color: #fff;
box-shadow: -2px 9px 21px 0px box-shadow: -2px 9px 21px 0px
rgba(0, 0, 0, 0.05); rgba(0, 0, 0, 0.05);
width: 180px;
max-width: 180rpx;
border-radius: 8px; border-radius: 8px;
padding: 15rpx 20rpx; padding: 15rpx 20rpx;
text-align: left; text-align: left;
background-color: #5e73e5; background-color: #5e73e5;
box-shadow: -2px 9px 21px 0px box-shadow: -2px 9px 21px 0px
rgba(0, 0, 0, 0.05); rgba(0, 0, 0, 0.05);
width: 180px;
max-width: 180rpx;
border-radius: 8px; border-radius: 8px;
padding: 15rpx 20rpx; padding: 15rpx 20rpx;
color: #fff; color: #fff;

+ 1
- 0
pages/myModule/components/myCollect/myCollect.js Vedi File

tempListData.push(...datas.demandList); tempListData.push(...datas.demandList);
tempListData.forEach(el => { tempListData.forEach(el => {
el.createdOn = $util.formatTime(new Date(el.createdOn), true); el.createdOn = $util.formatTime(new Date(el.createdOn), true);
el.createdOn = el.createdOn.replaceAll('/', '-');
if (typeof el.type == 'string') { if (typeof el.type == 'string') {
el.type = el.type.split(','); el.type = el.type.split(',');
} }

+ 1
- 0
pages/myModule/components/myRelease/myRelease.js Vedi File

tempListData.push(...datas.demandList); tempListData.push(...datas.demandList);
tempListData.forEach(el => { tempListData.forEach(el => {
el.createdOn = $util.formatTime(new Date(el.createdOn), true); el.createdOn = $util.formatTime(new Date(el.createdOn), true);
el.createdOn = el.createdOn.replaceAll('/', '-');
if (typeof el.type == 'string') { if (typeof el.type == 'string') {
el.type = el.type.split(','); el.type = el.type.split(',');
} }

+ 1
- 0
pages/releaseModule/index.js Vedi File

if (typeof listDetail.type == 'string') { if (typeof listDetail.type == 'string') {
listDetail.type = listDetail.type.split(','); listDetail.type = listDetail.type.split(',');
listDetail.createdOn = $util.formatTime(new Date(listDetail.createdOn), true); listDetail.createdOn = $util.formatTime(new Date(listDetail.createdOn), true);
listDetail.createdOn = listDetail.createdOn.replaceAll('/', '-');
} }
that.clearData(); that.clearData();
wx.setStorageSync('listDetail', listDetail) wx.setStorageSync('listDetail', listDetail)

Loading…
Annulla
Salva