litian
2024-12-04 63e49f648d64e62a5c0668a48072c73ed6217290
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!-- <view class="container" wx:if="{{!skeletonLoding}}"> -->
<view class="container">
  <scroll-view scroll-y class="content" style="{{allChecked || isMoreDel?'padding-top: 4vh':''}}" refresher-enabled="{{true}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom">
    <view slot="refresher" class="refresh-container">
      <view class="loading">
        <t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" />
      </view>
    </view>
    <view class="pageInfo">
      <t-checkbox-group value="{{value}}" bind:change="onChange">
        <view wx:for="{{optionsData}}" wx:key="index" class="card {{_.contain(value, index) ? 'card--active' : value.indexOf(index)}}">
          <image class="iconStyle" src="{{item.icon}}" mode="aspectFill" />
          <t-icon wx:if="{{_.contain(value, index)}}" name="check" t-class="card__icon" ariaHidden="{{true}}" />
          <t-checkbox value="{{index}}" label="{{item.name}}" content="{{item.description}}" borderless />
        </view>
      </t-checkbox-group>
      <view wx:if="{{!isNodata && cartList.length == 0}}" class="empyt">
        <t-empty icon="folder-open" description="暂无数据" />
      </view>
      <view class="bottom-loading" wx:if="{{bottomLoading}}">
        <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
      </view>
      <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}">
        <text>没有更多了</text>
      </view>
    </view>
  </scroll-view>
  <t-back-top theme="round" wx:if="{{isBackTop}}" class="backTop" text="顶部" bind:to-top="onToTop"></t-back-top>
  <view class="select_tabbar">
    <view class="cssPublic">
      <view class="tabItams">
        <text>最多可选 : </text>
        <text><text style="color: red;">{{allowSelectNum}}</text> 件</text>
      </view>
      <view class="tabItams">
        <text>已选 : </text>
        <text><text style="color: #0052d9;">{{selectNum}} </text>件</text>
      </view>
    </view>
    <view class="activeCode" bindtap="activeCode">
      <text>前往激活</text>
    </view>
  </view>
</view>
 
<!-- 骨架屏 -->
<!-- <import src="./index.skeleton.wxml" />
<template is="skeleton" wx:if="{{skeletonLoding}}"></template> -->
 
 
<wxs module="refresh">
  module.exports = {
    onPulling: function (evt, instance) {
      var p = Math.min(evt.detail.dy / 80, 1)
      var view = instance.selectComponent('.refresh-container')
      view.setStyle({
        opacity: p,
        transform: "scale(" + p + ")"
      })
    },
    wxsFunction: function (event, ownerInstance) {
      var img = instance.selectComponent('#image')
      return img;
    },
  }
 
</wxs>
<wxs module="_">
  module.exports.contain = function (arr, key) { if (arr && arr.length > 0) return arr.indexOf(key) > -1 } 
</wxs>