瀏覽代碼

🐛 首页重复跳转问题

谢创宏 3 年之前
父節點
當前提交
036a9719f0
共有 5 個文件被更改,包括 34 次插入7 次删除
  1. 1 1
      pages/dossier/dossier.wxml
  2. 1 1
      pages/historyOrder/historyOrder.wxml
  3. 19 0
      pages/home/home.js
  4. 7 5
      pages/home/home.wxml
  5. 6 0
      pages/tagsAdd/tagsAdd.js

+ 1 - 1
pages/dossier/dossier.wxml

@@ -24,7 +24,7 @@
24 24
   <view class="item flex-align-center">
25 25
     <view class="flex-column flex1">
26 26
       <text class="title">直属上级</text>
27
-      <text class="flex1" wx:if="{{ userInfo.realname }}">{{ userInfo.realname  }}</text>
27
+      <text class="flex1" wx:if="{{ userInfo.higher_name }}">{{ userInfo.higher_name }}</text>
28 28
       <text class="flex1" wx:else style="font-size: 28rpx;color: #ccc;">'-'</text>
29 29
     </view>
30 30
     <!-- <image class="icon-right" src="/images/right.png"></image> -->

+ 1 - 1
pages/historyOrder/historyOrder.wxml

@@ -1,4 +1,4 @@
1
-<view class="tabs-content" style="padding: 28rpx;">
1
+<view class="tabs-content" style="padding: 28rpx;padding-top:8rpx;">
2 2
   <navigator url="/pages/orderDetail/orderDetail?orderId={{item.order_id}}" hover-class="none" wx:for="{{ list }}" wx:key="index">
3 3
     <view class="item border-radius">
4 4
       <view class="item-top flex-align-center">

+ 19 - 0
pages/home/home.js

@@ -189,5 +189,24 @@ Page({
189 189
     let day = date.getDate() < 10 ? '0'+date.getDate() : date.getDate()
190 190
     console.log(year,month,day)
191 191
     return `${year}-${month}-${day}`;
192
+  },
193
+
194
+  /**
195
+   * 跳转客户信息
196
+  */
197
+  goToClientInfo(e) {
198
+    wx.navigateTo({
199
+      url: `/pages/clientInfo/clientInfo?userId=${e.currentTarget.dataset.id}`,
200
+    })
201
+  },
202
+
203
+  /**
204
+   * 跳转客户信息
205
+  */
206
+  goToFeedback(e) {
207
+    let item = e.currentTarget.dataset.item
208
+    wx.navigateTo({
209
+      url: `/pages/feedback/feedback?orderId=${ item.order_id }&cover=${ item.cover_url }&name=${ item.project_name }`,
210
+    })
192 211
   }
193 212
 })

+ 7 - 5
pages/home/home.wxml

@@ -50,12 +50,14 @@
50 50
         </view>
51 51
         <view class="item-btn flex-align-center flex-justify-space-between">
52 52
           <view class="btn flex-center">订单详情</view>
53
-          <navigator url="/pages/clientInfo/clientInfo?userId={{ item.user_id }}" hover-class="none">
54
-            <view class="btn flex-center">客户信息</view>
55
-          </navigator>
56
-          <navigator url="/pages/feedback/feedback?orderId={{ item.order_id }}&cover={{ item.cover_url }}&name={{ item.project_name }}" hover-class="none">
53
+          <view class="btn flex-center" data-id="{{ item.user_id }}" catchtap="goToClientInfo">客户信息</view>
54
+          <view class="btn flex-center" data-item="{{ item }}" catchtap="goToFeedback">记录反馈</view>
55
+          <!-- <navigator url="/pages/clientInfo/clientInfo?userId={{ item.user_id }}" hover-class="none">
56
+            <view class="btn flex-center" data-id="{{ item.user_id }}" catchtap="goToClientInfo">客户信息</view>
57
+          </navigator> -->
58
+          <!-- <navigator url="/pages/feedback/feedback?orderId={{ item.order_id }}&cover={{ item.cover_url }}&name={{ item.project_name }}" hover-class="none">
57 59
             <view class="btn flex-center">记录反馈</view>
58
-          </navigator>
60
+          </navigator> -->
59 61
           <!-- <view class="btn flex-center">记录反馈</view> -->
60 62
         </view>
61 63
       </view>

+ 6 - 0
pages/tagsAdd/tagsAdd.js

@@ -157,6 +157,12 @@ Page({
157 157
       user_id,
158 158
       tags: list.toString()
159 159
     },(res) => {
160
+      wx.showToast({
161
+        title: res.msg,
162
+      })
163
+      setTimeout(() => {
164
+        wx.navigateBack()
165
+      }, 1000);
160 166
       console.log(res)
161 167
     })
162 168
   }