123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <!--pages/diy/index.wxml-->
- <view class="diy-container">
- <view class="diy-setting" wx:if="{{!isManage}}">
- <view class="d-flex align-items-center" style="font-size: 26rpx;">
- <t-icon name="user" />
- <view class="ml-2">{{userInfo.nickName}}</view>
- </view>
- <t-button icon="setting" size="extra-small" t-class="litebtn" t-class-icon="liteicon" bindtap="handleManage">管理</t-button>
- </view>
- <view class="diy-setting" wx:else>
- <t-button icon="chevron-left" size="extra-small" t-class="litebtn" t-class-icon="liteicon" bindtap="handleManageBack">返回</t-button>
- <view>
- <t-button size="extra-small" t-class="litebtn ml-3" t-class-icon="liteicon" bindtap="handleUncheck">取消选择</t-button>
- <t-button theme="danger" icon="close" size="extra-small" t-class="litebtn ml-3" t-class-icon="liteicon" bindtap="handleDelete">删除({{deleteIds.length}})</t-button>
- </view>
- </view>
- <view class="diy-head">
- <view class="divbtn{{pageparams.mode === 'fangan' ? ' active' : ''}}" hover-class="divbtn-hover" data-tab="fangan" bindtap="changeTab">
- <t-icon name="cfangan" prefix="hn" t-class="icon" />
- <text>我的方案</text>
- </view>
- <view class="divbtn{{pageparams.mode === 'shoucang' ? ' active' : ''}}" hover-class="divbtn-hover" data-tab="shoucang" bindtap="changeTab">
- <t-icon name="cshoucang" prefix="hn" t-class="icon" />
- <text>我的收藏</text>
- </view>
- <view class="divbtn{{pageparams.mode === 'beijing'? ' active' : ''}}" hover-class="divbtn-hover" data-tab="beijing" bindtap="changeTab">
- <t-icon name="cbeijing" prefix="hn" t-class="icon" />
- <text>背景图库</text>
- </view>
- </view>
- <scroll-view scroll-y class="diy-content" bounces="{{false}}" bindscrolltolower="pagetolower" lower-threshold="{{200}}">
- <!-- <view wx:for="{{bag}}" class="divimage">
- <image src="{{item.url}}" mode="widthFix" />
- <view class="flbtn" hover-class="flbtn-hover">
- <t-icon name="ibag" prefix="hn" t-class="icon" />
- </view>
- </view> -->
- <view class="d-flex flex-wrap">
- <view class="divimage scbg" wx:if="{{pageparams.mode === 'beijing'}}">
- <t-image src="/assets/home/blank.png" mode="aspectFill" class="wrapimage" bindtap="onUploadBackground" />
- </view>
- <block wx:if="{{pageparams.mode === 'fangan'}}" wx:for="{{items}}" wx:key="id">
- <template is="fangan" data="{{...item, idx: index, isManage: isManage}}" />
- </block>
- <block wx:if="{{pageparams.mode === 'beijing'}}" wx:for="{{items}}" wx:key="id">
- <template is="beijing" data="{{...item, idx: index, isManage: isManage}}" />
- </block>
- <block wx:if="{{pageparams.mode === 'shoucang'}}" wx:for="{{items}}" wx:key="id">
- <template is="shoucang" data="{{...item, idx: index, isManage: isManage}}" />
- </block>
- </view>
- <view style="clear: both;" />
- <n-load-more status="{{status}}" no-more-text="没有更多了" />
- <view style="height: 120rpx;" />
- </scroll-view>
- <view class="diy-footer" />
- </view>
- <view class="flowbtn{{ani}}" wx:if="{{pageparams.mode === 'fangan'}}" bindtap="showdiy">
- <block wx:if="{{loadingDiy}}">
- <t-icon name="loading" t-class="nicon" />
- <text class="ntext">正在读取</text>
- </block>
- <block wx:else>
- <t-icon name="ishot" prefix="hn" t-class="nicon" />
- <text class="ntext">开始配画</text>
- </block>
- </view>
- <template name="fangan">
- <view class="divimage prod">
- <t-image src="{{this.url2thumb(imageUrl)}}" mode="aspectFill" class="wrapimage" data-idx="{{idx}}" bindtap="showPreview" />
- <!-- <view wx:if="{{goodId && goodId > 0 && !isManage}}" class="flbtn" hover-class="flbtn-hover" data-good="{{goodId}}" data-cate="{{cateId}}" bindtap="showGood">
- <t-icon name="ibag" prefix="hn" t-class="icon" />
- </view>
- <view wx:if="{{goodId && goodId > 0 && !isManage}}" class="flbtn2" hover-class="flbtn-hover" data-good="{{goodId}}" data-cate="{{cateId}}" bindtap="showGood">
- <t-icon name="bianji" prefix="hn" t-class="icon" />
- </view> -->
- <view class="floatPlace" wx:if="{{!isManage}}">
- <view wx:if="{{goodId && goodId > 0}}" class="flbtn" hover-class="flbtn-hover" data-good="{{goodId}}" data-cate="{{cateId}}" bindtap="showGood">
- <t-icon name="ibag" prefix="hn" t-class="icon" />
- </view>
- <view class="flbtn2" hover-class="flbtn-hover" data-id="{{id}}" data-type="{{cate2d ? 'flat' : 'space'}}" bindtap="getLink">
- <t-icon name="bianji" prefix="hn" t-class="icon" />
- </view>
- </view>
- <view wx:if="{{isManage}}" class="flcheck {{checked ? 'checked' : ''}}" data-idx="{{idx}}">
- <t-icon name="check" t-class="icon" />
- </view>
- </view>
- </template>
- <template name="beijing">
- <view class="divimage scbg">
- <t-image src="{{this.url2thumb(imageUrl)}}" mode="aspectFill" class="wrapimage" data-idx="{{idx}}" bindtap="showPreview" />
- <view wx:if="{{isManage}}" class="flcheck {{checked ? 'checked' : ''}}" data-idx="{{idx}}">
- <t-icon name="check" t-class="icon" />
- </view>
- </view>
- </template>
- <template name="shoucang">
- <view class="divimage scgood">
- <view class="wrapgood">
- <t-image src="{{this.url2thumb(imageUrl)}}" mode="aspectFill" class="wrapimage" data-idx="{{idx}}" bindtap="showPreview" />
- <view wx:if="{{isManage}}" class="flcheck {{checked ? 'checked' : ''}}" data-idx="{{idx}}">
- <t-icon name="check" t-class="icon" />
- </view>
- <t-icon wx:if="{{hasDraw}}" prefix="hn" name="m3d" size="32rpx" t-class="flatimg" />
- <view class="titlebar">
- <view class="title">{{title}}</view>
- <price wx:if="{{ price }}" wr-class="spec-for-price" symbol-class="spec-for-symbol" price="{{price}}" />
- </view>
- </view>
- </view>
- </template>
- <t-image-viewer initial-index="{{initIndex}}" showIndex="{{showIndex}}" visible="{{visible}}" images="{{images}}" bind:change="onChange">
- <view slot="deleteBtn" bindtap="onDelete" class="pr-2">
- <t-button icon="delete" shape="circle" size="small" bindtap="onDelete"></t-button>
- </view>
- <view slot="closeBtn" bindtap="onDelete" class="pl-2">
- <t-button icon="chevron-left" shape="circle" size="small" bindtap="onClose"></t-button>
- </view>
- </t-image-viewer>
- <t-dialog visible="{{showSingle}}" title="操作提示" content="是否确认删除选中的项" confirm-btn="{{ loading ? '正在删除' : '删除'}}" cancel-btn="取消" bind:confirm="closeSingleConfirm" bind:cancel="closeSignleCancel" />
- <t-popup visible="{{show}}" placement="bottom" bind:visible-change="handlePopupHide">
- <view class="d-flex chooseblock" style="gap: 20rpx">
- <view class="chooseitem" bind:tap="goflatdiy">
- <t-icon prefix="hn" name="flat" t-class="chooseicon" />
- <view>平面配画</view>
- </view>
- <view class="choosedivide" />
- <view class="chooseitem" bind:tap="gospacediy">
- <t-icon prefix="hn" name="space" t-class="chooseicon" />
- <view>空间配画</view>
- </view>
- </view>
- </t-popup>
- <n-wait loading="{{wait}}" />
- <wxs src="../../utils/url.wxs" module="this" />
- <n-pop-right open="{{true}}" bind:disagree="handleAuthDisagree" bind:ok="handleAuthOK" />
|