index.wxml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!--pages/diy/index.wxml-->
  2. <view class="diy-container">
  3. <view class="diy-setting" wx:if="{{!isManage}}">
  4. <view class="d-flex align-items-center" style="font-size: 26rpx;">
  5. <t-icon name="user" />
  6. <view class="ml-2">{{userInfo.nickName}}</view>
  7. </view>
  8. <t-button icon="setting" size="extra-small" t-class="litebtn" t-class-icon="liteicon" bindtap="handleManage">管理</t-button>
  9. </view>
  10. <view class="diy-setting" wx:else>
  11. <t-button icon="chevron-left" size="extra-small" t-class="litebtn" t-class-icon="liteicon" bindtap="handleManageBack">返回</t-button>
  12. <view>
  13. <t-button size="extra-small" t-class="litebtn ml-3" t-class-icon="liteicon" bindtap="handleUncheck">取消选择</t-button>
  14. <t-button theme="danger" icon="close" size="extra-small" t-class="litebtn ml-3" t-class-icon="liteicon" bindtap="handleDelete">删除({{deleteIds.length}})</t-button>
  15. </view>
  16. </view>
  17. <view class="diy-head">
  18. <view class="divbtn{{pageparams.mode === 'fangan' ? ' active' : ''}}" hover-class="divbtn-hover" data-tab="fangan" bindtap="changeTab">
  19. <t-icon name="cfangan" prefix="hn" t-class="icon" />
  20. <text>我的方案</text>
  21. </view>
  22. <view class="divbtn{{pageparams.mode === 'shoucang' ? ' active' : ''}}" hover-class="divbtn-hover" data-tab="shoucang" bindtap="changeTab">
  23. <t-icon name="cshoucang" prefix="hn" t-class="icon" />
  24. <text>我的收藏</text>
  25. </view>
  26. <view class="divbtn{{pageparams.mode === 'beijing'? ' active' : ''}}" hover-class="divbtn-hover" data-tab="beijing" bindtap="changeTab">
  27. <t-icon name="cbeijing" prefix="hn" t-class="icon" />
  28. <text>背景图库</text>
  29. </view>
  30. </view>
  31. <scroll-view scroll-y class="diy-content" bounces="{{false}}" bindscrolltolower="pagetolower" lower-threshold="{{200}}">
  32. <!-- <view wx:for="{{bag}}" class="divimage">
  33. <image src="{{item.url}}" mode="widthFix" />
  34. <view class="flbtn" hover-class="flbtn-hover">
  35. <t-icon name="ibag" prefix="hn" t-class="icon" />
  36. </view>
  37. </view> -->
  38. <view class="d-flex flex-wrap">
  39. <view class="divimage scbg" wx:if="{{pageparams.mode === 'beijing'}}">
  40. <t-image src="/assets/home/blank.png" mode="aspectFill" class="wrapimage" bindtap="onUploadBackground" />
  41. </view>
  42. <block wx:if="{{pageparams.mode === 'fangan'}}" wx:for="{{items}}" wx:key="id">
  43. <template is="fangan" data="{{...item, idx: index, isManage: isManage}}" />
  44. </block>
  45. <block wx:if="{{pageparams.mode === 'beijing'}}" wx:for="{{items}}" wx:key="id">
  46. <template is="beijing" data="{{...item, idx: index, isManage: isManage}}" />
  47. </block>
  48. <block wx:if="{{pageparams.mode === 'shoucang'}}" wx:for="{{items}}" wx:key="id">
  49. <template is="shoucang" data="{{...item, idx: index, isManage: isManage}}" />
  50. </block>
  51. </view>
  52. <view style="clear: both;" />
  53. <n-load-more status="{{status}}" no-more-text="没有更多了" />
  54. <view style="height: 120rpx;" />
  55. </scroll-view>
  56. <view class="diy-footer" />
  57. </view>
  58. <view class="flowbtn{{ani}}" wx:if="{{pageparams.mode === 'fangan'}}" bindtap="showdiy">
  59. <block wx:if="{{loadingDiy}}">
  60. <t-icon name="loading" t-class="nicon" />
  61. <text class="ntext">正在读取</text>
  62. </block>
  63. <block wx:else>
  64. <t-icon name="ishot" prefix="hn" t-class="nicon" />
  65. <text class="ntext">开始配画</text>
  66. </block>
  67. </view>
  68. <template name="fangan">
  69. <view class="divimage prod">
  70. <t-image src="{{this.url2thumb(imageUrl)}}" mode="aspectFill" class="wrapimage" data-idx="{{idx}}" bindtap="showPreview" />
  71. <!-- <view wx:if="{{goodId && goodId > 0 && !isManage}}" class="flbtn" hover-class="flbtn-hover" data-good="{{goodId}}" data-cate="{{cateId}}" bindtap="showGood">
  72. <t-icon name="ibag" prefix="hn" t-class="icon" />
  73. </view>
  74. <view wx:if="{{goodId && goodId > 0 && !isManage}}" class="flbtn2" hover-class="flbtn-hover" data-good="{{goodId}}" data-cate="{{cateId}}" bindtap="showGood">
  75. <t-icon name="bianji" prefix="hn" t-class="icon" />
  76. </view> -->
  77. <view class="floatPlace" wx:if="{{!isManage}}">
  78. <view wx:if="{{goodId && goodId > 0}}" class="flbtn" hover-class="flbtn-hover" data-good="{{goodId}}" data-cate="{{cateId}}" bindtap="showGood">
  79. <t-icon name="ibag" prefix="hn" t-class="icon" />
  80. </view>
  81. <view class="flbtn2" hover-class="flbtn-hover" data-id="{{id}}" data-type="{{cate2d ? 'flat' : 'space'}}" bindtap="getLink">
  82. <t-icon name="bianji" prefix="hn" t-class="icon" />
  83. </view>
  84. </view>
  85. <view wx:if="{{isManage}}" class="flcheck {{checked ? 'checked' : ''}}" data-idx="{{idx}}">
  86. <t-icon name="check" t-class="icon" />
  87. </view>
  88. </view>
  89. </template>
  90. <template name="beijing">
  91. <view class="divimage scbg">
  92. <t-image src="{{this.url2thumb(imageUrl)}}" mode="aspectFill" class="wrapimage" data-idx="{{idx}}" bindtap="showPreview" />
  93. <view wx:if="{{isManage}}" class="flcheck {{checked ? 'checked' : ''}}" data-idx="{{idx}}">
  94. <t-icon name="check" t-class="icon" />
  95. </view>
  96. </view>
  97. </template>
  98. <template name="shoucang">
  99. <view class="divimage scgood">
  100. <view class="wrapgood">
  101. <t-image src="{{this.url2thumb(imageUrl)}}" mode="aspectFill" class="wrapimage" data-idx="{{idx}}" bindtap="showPreview" />
  102. <view wx:if="{{isManage}}" class="flcheck {{checked ? 'checked' : ''}}" data-idx="{{idx}}">
  103. <t-icon name="check" t-class="icon" />
  104. </view>
  105. <t-icon wx:if="{{hasDraw}}" prefix="hn" name="m3d" size="32rpx" t-class="flatimg" />
  106. <view class="titlebar">
  107. <view class="title">{{title}}</view>
  108. <price wx:if="{{ price }}" wr-class="spec-for-price" symbol-class="spec-for-symbol" price="{{price}}" />
  109. </view>
  110. </view>
  111. </view>
  112. </template>
  113. <t-image-viewer initial-index="{{initIndex}}" showIndex="{{showIndex}}" visible="{{visible}}" images="{{images}}" bind:change="onChange">
  114. <view slot="deleteBtn" bindtap="onDelete" class="pr-2">
  115. <t-button icon="delete" shape="circle" size="small" bindtap="onDelete"></t-button>
  116. </view>
  117. <view slot="closeBtn" bindtap="onDelete" class="pl-2">
  118. <t-button icon="chevron-left" shape="circle" size="small" bindtap="onClose"></t-button>
  119. </view>
  120. </t-image-viewer>
  121. <t-dialog visible="{{showSingle}}" title="操作提示" content="是否确认删除选中的项" confirm-btn="{{ loading ? '正在删除' : '删除'}}" cancel-btn="取消" bind:confirm="closeSingleConfirm" bind:cancel="closeSignleCancel" />
  122. <t-popup visible="{{show}}" placement="bottom" bind:visible-change="handlePopupHide">
  123. <view class="d-flex chooseblock" style="gap: 20rpx">
  124. <view class="chooseitem" bind:tap="goflatdiy">
  125. <t-icon prefix="hn" name="flat" t-class="chooseicon" />
  126. <view>平面配画</view>
  127. </view>
  128. <view class="choosedivide" />
  129. <view class="chooseitem" bind:tap="gospacediy">
  130. <t-icon prefix="hn" name="space" t-class="chooseicon" />
  131. <view>空间配画</view>
  132. </view>
  133. </view>
  134. </t-popup>
  135. <n-wait loading="{{wait}}" />
  136. <wxs src="../../utils/url.wxs" module="this" />
  137. <n-pop-right open="{{true}}" bind:disagree="handleAuthDisagree" bind:ok="handleAuthOK" />