Переглянути джерело

🐛 用户标签删除/检查记录编辑问题

谢创宏 3 роки тому
батько
коміт
95e9ef5af8

BIN
images/.DS_Store


BIN
images/icon_04.png


+ 1 - 1
pages/recordSheet/components/review/review.wxml

@@ -128,7 +128,7 @@
128 128
         </view>
129 129
       </block>
130 130
     </view>
131
-    <view class="btn flex-center" wx:if="{{ is_list && check.allow_edit == 1 }}" bindtap="onChangeEdit">编辑晚班记录</view>
131
+    <view class="btn flex-center" wx:if="{{ is_list && check.allow_edit == 1 }}" bindtap="onChangeEdit">复查</view>
132 132
     <view class="btn flex-center" wx:if="{{ !is_list }}" bindtap="onCheckUpdate">提交</view>
133 133
   </view>
134 134
 

+ 1 - 1
pages/recordSheet/components/verify/verify.wxml

@@ -128,7 +128,7 @@
128 128
         </view>
129 129
       </block>
130 130
     </view>
131
-    <view class="btn flex-center" wx:if="{{ is_list && check.allow_edit == 1 }}" bindtap="onChangeEdit">编辑晚班记录</view>
131
+    <view class="btn flex-center" wx:if="{{ is_list && check.allow_edit == 1 }}" bindtap="onChangeEdit">审核</view>
132 132
     <view class="btn flex-center" wx:if="{{ !is_list }}" bindtap="onCheckUpdate">提交</view>
133 133
   </view>
134 134
 

+ 2 - 2
pages/recordSheet/recordSheet.wxml

@@ -26,8 +26,8 @@
26 26
       <inspect style="display: {{ currentTab == 0 ? 'block' : 'none' }};" check_id="{{check_id}}" preCheck="{{detail.check}}" ></inspect>
27 27
       <!-- <inspect style="display: {{ currentTab == 1 ? 'block' : 'none' }};"></inspect>
28 28
       <inspect style="display: {{ currentTab == 2 ? 'block' : 'none' }};"></inspect> -->
29
-      <review style="display: {{ currentTab == 1 ? 'block' : 'none' }};" check_id="{{check_id}}" manager="{{ detail.manager }}"></review>
30
-      <verify style="display: {{ currentTab == 2 ? 'block' : 'none' }};" check_id="{{check_id}}" review="{{ detail.review }}"></verify>
29
+      <review style="display: {{ currentTab == 1 ? 'block' : 'none' }};" check_id="{{check_id}}" manager="{{ detail.review }}"></review>
30
+      <verify style="display: {{ currentTab == 2 ? 'block' : 'none' }};" check_id="{{check_id}}" review="{{ detail.manager }}"></verify>
31 31
     </view>
32 32
   </view>
33 33
   <view class="padding" style="padding: 0 36rpx;display: none;">

+ 16 - 0
pages/tagsEdit/tagsEdit.js

@@ -90,4 +90,20 @@ Page({
90 90
       console.log(res)
91 91
     })
92 92
   },
93
+
94
+  /**
95
+   * 删除标签
96
+  */
97
+  onDelTag(e) {
98
+    let { userInfo,user_id } = this.data;
99
+    userInfo.tags.splice(e.currentTarget.dataset.index,1)
100
+    post('api/user/update',{
101
+      user_id,
102
+      tags: userInfo.tags.toString()
103
+    },(res) => {
104
+      this.setData({
105
+        userInfo
106
+      })
107
+    })
108
+  }
93 109
 })

+ 4 - 1
pages/tagsEdit/tagsEdit.wxml

@@ -4,7 +4,10 @@
4 4
     <text style="font-size: 28rpx;color:#999;margin-left: 10rpx;">({{userInfo.tags.length || 0}}/10)</text>
5 5
   </view>
6 6
   <view class="list">
7
-    <view class="item flex-align-center" wx:for="{{ userInfo.tags }}" wx:key="index">{{ item }}</view>
7
+    <view class="item flex-justify-space-between flex-align-center" wx:for="{{ userInfo.tags }}" wx:key="index">
8
+      <text>{{ item }}</text>
9
+      <image src="/images/icon_04.png" bindtap="onDelTag" data-index="{{ index }}"></image>
10
+    </view>
8 11
   </view>
9 12
   <view class="no-more-data">没有更多标签啦~</view>
10 13
 </view>

+ 6 - 1
pages/tagsEdit/tagsEdit.wxss

@@ -15,7 +15,7 @@
15 15
 .content .list .item {
16 16
   background-color: #fff;
17 17
   height: 112rpx;
18
-  padding-left: 28rpx;
18
+  padding: 0 28rpx;
19 19
   border-bottom: 2rpx solid #eee;
20 20
   font-size: 32rpx;
21 21
   font-family: PingFangSC-Regular, PingFang SC;
@@ -23,6 +23,11 @@
23 23
   color: #333333;
24 24
 }
25 25
 
26
+.content .list image {
27
+  width: 48rpx;
28
+  height: 48rpx;
29
+}
30
+
26 31
 .btn-box {
27 32
   position: fixed;
28 33
   bottom: 0;