55 lines
2.4 KiB
Plaintext
55 lines
2.4 KiB
Plaintext
<view class="custom-scroll-view closet-container">
|
|
<nav-bar/>
|
|
<view class="header">
|
|
<view class="header-title">我的衣橱</view>
|
|
<button class="icon-button" size="mini" bind:tap="addClothing">
|
|
<view class="icon cloud"></view>
|
|
</button>
|
|
</view>
|
|
<view class="category">
|
|
<button class="item {{categoryIndex==0?'current':''}}" size="mini" plain
|
|
data-index="0" bind:tap="changeCategory">全部</button>
|
|
<button class="item {{categoryIndex==index+1?'current':''}}" size="mini" plain
|
|
wx:for="{{categories}}" wx:key="index" data-index="{{index+1}}"
|
|
bind:tap="changeCategory">{{item.name}}</button>
|
|
</view>
|
|
<list-view bind:refresh="refreshList" bind:loadMore="loadMore"
|
|
refresher-triggered="{{pager.refreshTriggered}}" class="main list"
|
|
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
|
<view class="list-content">
|
|
<view class="item" wx:for="{{list}}" wx:key="index">
|
|
<image class="image" src="{{item.image_url}}"/>
|
|
<view class="to-try" wx:if="{{hasDefaultImage}}" bind:tap="toTry" data-item="{{item}}">
|
|
试穿</view>
|
|
<view class="delete-area" capture-catch:tap="deleteClothing" data-item="{{item}}">
|
|
<view class="icon delete"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</list-view>
|
|
</view>
|
|
|
|
<page-container show="{{isShowUploader}}" position="bottom">
|
|
<view class="add-clothing content">
|
|
<view class="category">
|
|
<button class="item {{categoryUploadIndex==index?'current':''}}" size="mini" plain
|
|
wx:for="{{categories}}" wx:key="index" data-index="{{index}}"
|
|
bind:tap="changeUploadCategory">{{item.name}}</button>
|
|
</view>
|
|
<block wx:if="{{uploadImg.tempFilePath}}">
|
|
<view class="upload-img-area">
|
|
<image class="image" src="{{uploadImg.tempFilePath}}" mode="aspectFit"/>
|
|
<view class="mask" style="height:{{(100-uploadPercent)+'%'}};"></view>
|
|
</view>
|
|
<button disabled="{{!uploadImg.serverUrl}}" loading="{{uploading}}"
|
|
type="primary" class="button"
|
|
bind:tap="saveClothing">确定保存</button>
|
|
</block>
|
|
<view class="upload-btn" bind:tap="chooseImg" wx:else>
|
|
<view class="icon cloud"></view>
|
|
<view>上传你的衣服</view>
|
|
</view>
|
|
<!-- <img-uploader options="{{uploadOptions}}" id="imgUploader"
|
|
bind:imgChange="uploaderImgChange" class="img-uploader {{hasUploadImg?'has-img':'no-img'}}"/> -->
|
|
</view>
|
|
</page-container> |