86 lines
3.8 KiB
Plaintext
86 lines
3.8 KiB
Plaintext
<scroll-view class="try-container" scroll-y show-scrollbar="{{false}}" enhanced>
|
|
<view class="top">
|
|
<nav-bar/>
|
|
<view class="header">
|
|
<view>我的试衣间</view>
|
|
<button plain size="mini" class="button" bind:tap="chooseImg"
|
|
loading="{{personImage.uploading}}" disabled="{{personImage.uploading}}">
|
|
{{defaultPersonImage?'更换形象照':'添加形象照'}}
|
|
</button>
|
|
</view>
|
|
</view>
|
|
<view class="main" style="height:{{imgHeight}}px">
|
|
<block wx:if="{{defaultPersonImage}}">
|
|
<image class="person-image" src="{{currentHistory.completion_url}}" mode="aspectFit"
|
|
wx:if="{{currentHistory.id}}"/>
|
|
<image class="person-image" src="{{defaultPersonImage}}" mode="aspectFit" wx:else/>
|
|
</block>
|
|
<block wx:else>
|
|
<!-- <button plain size="mini" class="top-btn" bind:tap="chooseImg">添加形象照</button> -->
|
|
<view class="upload-btn">
|
|
<view class="icon body"></view>
|
|
</view>
|
|
</block>
|
|
<view class="clothing" wx:if="{{defaultPersonImage}}">
|
|
<view class="item c-top" bind:tap="chooseTopClothing">
|
|
<image src="{{currentHistory.top_clothing_url}}" class="image" mode="aspectFit"
|
|
wx:if="{{currentHistory.id}}"/>
|
|
<block wx:elif="{{topClothing.tempFilePath}}">
|
|
<image src="{{topClothing.serverUrl||topClothing.tempFilePath}}" class="image"
|
|
mode="aspectFit"/>
|
|
<view class="loading-area" wx:if="{{topClothing.uploading}}">
|
|
<view class="icon loading"></view>
|
|
</view>
|
|
</block>
|
|
<view class="icon top-clothing" wx:else></view>
|
|
</view>
|
|
<view class="item c-bottom" bind:tap="chooseBottomClothing">
|
|
<image src="{{currentHistory.bottom_clothing_url}}" class="image" mode="aspectFit"
|
|
wx:if="{{currentHistory.id}}"/>
|
|
<block wx:elif="{{bottomClothing.tempFilePath}}">
|
|
<image src="{{bottomClothing.serverUrl||bottomClothing.tempFilePath}}"
|
|
class="image" mode="aspectFit"/>
|
|
<view class="loading-area" wx:if="{{bottomClothing.uploading}}">
|
|
<view class="icon loading"></view>
|
|
</view>
|
|
</block>
|
|
<view class="icon bottom-clothing" wx:else></view>
|
|
</view>
|
|
<!-- <view class="item share-area">
|
|
<view class="icon share"></view>
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
<view class="bottom" wx:if="{{defaultPersonImage}}">
|
|
<button type="primary" bind:tap="tryon"
|
|
loading="{{hasTryon||trying}}"
|
|
disabled="{{hasTryon||trying||currentHistory.id}}">
|
|
{{hasTryon||trying?'请等待上一个试穿任务':'立刻试穿'}}
|
|
</button>
|
|
</view>
|
|
<scroll-view class="history" scroll-x="{{true}}" enable-flex show-scrollbar="{{false}}" enhanced>
|
|
<view class="item btn-new {{currentHistory.id?'':'current'}}" bind:tap="addNew">
|
|
<view class="icon plus"></view>
|
|
</view>
|
|
<view class="item {{currentHistory.id==item.id?'current':''}}" wx:for="{{history}}"
|
|
bind:tap="selectHistory" data-item="{{item}}" wx:key="index"
|
|
bind:longpress="deleteHistory">
|
|
<image wx:if="{{item.completion_url}}" src="{{item.completion_url}}" class="image"
|
|
mode="aspectFit"/>
|
|
<block wx:else>
|
|
<image src="{{item.top_clothing_url}}" class="top-img"/>
|
|
<image src="{{item.bottom_clothing_url}}" class="bottom-img"/>
|
|
<view class="error-area" wx:if="{{item.status=='失败'}}">
|
|
<view type="warn" size="60rpx" class="icon warn"><view class="dispatch"/></view>
|
|
<view class="tips">失败</view>
|
|
</view>
|
|
<view class="loading-area" wx:else>
|
|
<view class="icon loading"></view>
|
|
</view>
|
|
</block>
|
|
<view class="delete-area" capture-catch:tap="deleteHistory" data-item="{{item}}">
|
|
<view class="icon delete"></view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view> |