闫增涛
2024-04-09 3b22db15cfc9f3704c4654df9d694ebfc16875bf
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!--pages/bookServices/detail/components/note/note.wxml-->
<view class="note">
  <view class="note-btn">
    <t-button
      theme="primary"
      class="make-note"
      bind:tap="openDialog"
      style="width: 240rpx"
    >
      <view slot="content" class="btn-content">
        <image src="/static/images/bookService/detail/makeNote.png" />
        <text class="note-btn-text">记笔记</text>
      </view>
    </t-button>
  </view>
  <view class="note-content">
    <t-collapse
      value="{{activeValues}}"
      bind:change="handleChange"
      wx:if="{{!loading && noteList.length}}"
    >
      <t-collapse-panel
        value="{{item.id}}"
        expandIcon
        wx:for="{{noteList}}"
        wx:key="id"
      >
        <view slot="header" class="collapse-header">
          <t-image
            class="note-icon"
            src="/static/images/bookService/detail/note-icon.png"
          ></t-image>
          <view class="header-name">{{item.name}}</view>
        </view>
        <view>
          <view class="note-content">{{item.content}}</view>
          <view class="note-bottom">
            <view class="note-time">{{item.createDate}}</view>
            <view class="bottom-btn">
              <image
                src="/static/images/bookService/detail/compliceHover.png"
                class="complice"
                bind:tap="editNote"
                data-note="{{item}}"
              />
              <image
                src="/static/images/bookService/detail/deleteHover.png"
                class="delete"
                bind:tap="deleteNote"
                data-id="{{item.id}}"
              />
            </view>
          </view>
        </view>
      </t-collapse-panel>
    </t-collapse>
    <view wx:if="{{noList}}" class="noData">
      <t-empty icon="folder-open" description="暂无数据" />
    </view>
  </view>
  <view class="bottom-box" wx:if="{{noteList.length}}">
    <t-loading wx:if="{{isMore == true}}"></t-loading>
    <text wx:if="{{isMore == false}}">没有更多了</text>
  </view>
</view>
<view class="loading-box" wx:if="{{loading}}">
  <t-loading loading="{{loading}}" size="60rpx"></t-loading>
</view>
 
<!-- 记笔记弹窗 -->
<t-popup
  visible="{{showNoteDialog}}"
  bind:visible-change="onVisibleChange"
  placement="center"
>
  <view class="popup">
    <view slot="title">
      <view class="title-text" wx:if="{{!flag}}">
        <text class="note-title">{{submitTitle}}</text>
        <t-image
          src="/static/images/bookService/detail/edit.png"
          class="edit-icon"
          bind:tap="changeTitle"
          data-value="{{true}}"
        ></t-image>
      </view>
      <view wx:else>
        <t-input
          value="{{submitTitle}}"
          data-value="{{false}}"
          bind:enter="changeTitle"
          bind:blur="changeTitle"
          bind:change="inputChange"
          maxlength="{{50}}"
          style="{{inputStyle}}"
        ></t-input>
      </view>
    </view>
    <view slot="content" class="content">
      <t-textarea
        value="{{textvalue}}"
        t-class="external-class"
        label=""
        placeholder="请输入笔记内容"
        maxcharacter="500"
        disableDefaultPadding="{{true}}"
        indicator
        bind:change="textareaChange"
        bind:blur=""
        style="{{inputStyle}}"
        placeholder-style="{{placeholderstyle}}"
      />
    </view>
    <view class="submit-btn">
      <t-button theme="primary" size="large" block bind:tap="confirmSuggest"
        >提交</t-button
      >
    </view>
  </view>
  <t-icon
    t-class="close-btn"
    name="close-circle"
    size="32"
    color="#fff"
    bind:tap="closeDialog"
  />
</t-popup>