Your Name 5 yıl önce
ebeveyn
işleme
465e4a5215

+ 5 - 3
app.js

@@ -7,6 +7,9 @@ App({
7 7
   },
8 8
 
9 9
   judge_Land() {
10
+    // console.log(wx.getStorageSync('wx_id'))    //已经授权 id
11
+    // console.log(wx.getStorageSync('access_token'))    //是否注册过
12
+
10 13
     try {
11 14
       const value = wx.getStorageSync('wx_id')
12 15
       if (value) {
@@ -30,8 +33,6 @@ App({
30 33
     } catch (e) {
31 34
       // Do something when catch error
32 35
     }
33
-    // console.log(wx.getStorageSync('wx_id'))    //已经授权 id
34
-    // console.log(wx.getStorageSync('access_token'))    //是否注册过
35 36
 
36 37
 
37 38
     if (wx.getStorageSync('access_token')) {   //是否注册过
@@ -57,6 +58,7 @@ App({
57 58
   onLoad: function (options) {
58 59
 
59 60
     webSocket.connectSocket();
61
+
60 62
   
61 63
   },
62 64
 
@@ -116,7 +118,7 @@ App({
116 118
       success: function (res) {
117 119
           if(res.data.code == "401"){
118 120
             wx.clearStorageSync();
119
-            wx.navigateTo({
121
+            wx.reLaunch({
120 122
               url: '/pages/Landpage/Land/Land'
121 123
             });
122 124
           }

+ 3 - 2
app.json

@@ -1,6 +1,7 @@
1 1
 {
2 2
   "pages": [
3
-        "pages/index/index",
3
+  "pages/index/waitfor/waitfor",
4
+  "pages/index/index",
4 5
   "pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction",
5 6
 "pages/personal_core/vehicle/vehicle",
6 7
   "pages/information/chat/chat",
@@ -16,7 +17,7 @@
16 17
   "pages/Setup/Aboutus/Aboutus",
17 18
    "pages/Setup/security/security",
18 19
    "pages/Setup/Setuplist/Setuplist",
19
-        "pages/payment/Member/Member",
20
+   "pages/payment/Member/Member",
20 21
     "pages/personal_core/Album/Album",
21 22
      "pages/personal_core/requirements/requirements",
22 23
     "pages/personal_core/personaldataModifythe/personaldataModifythe",

+ 41 - 35
pages/chat-list/chat-list.js

@@ -132,6 +132,9 @@ Page({
132 132
           if (dataAtt[index].type == 2) {
133 133
             dataAtt[index].content = '[图片]'
134 134
           }
135
+     
136
+          dataAtt[index].isTouchMove = false    //  处理滑动
137
+
135 138
         }
136 139
         if(data.data){
137 140
           _this.setData({
@@ -197,56 +200,59 @@ Page({
197 200
 
198 201
   },
199 202
 
200
-  touchstart: function (e) {
201
-    var that =this;
202
-    // thath.setData({
203
-      startX: e.changedTouches[0].clientX
204
-    //   startY: e.changedTouches[0].clientY
205
-    // })
206
-
207
-    // console.log(e.changedTouches[0].clientX);
208
-    // console.log(e.changedTouches[0].clientY);
203
+ 
209 204
 
205
+  touchstart: function (e) {
206
+    this.setData({
207
+      startX: e.changedTouches[0].clientX,
208
+      startY: e.changedTouches[0].clientY
209
+    })
210 210
   },
211 211
 
212
-
213 212
   touchmove: function (e) {
214 213
 
215
-    console.log(e.changedTouches[0].clientX);
216
-    // console.log(e.changedTouches[0].clientY);
217
-
218
-    // let index = e.currentTarget.dataset.index,//当前索引
219
-      // startX = this.data.startX,//开始X坐标
220
-      // startY = this.data.startY,//开始Y坐标
214
+    let index = e.currentTarget.dataset.index,//当前索引
215
+      startX = this.data.startX,//开始X坐标
216
+      startY = this.data.startY,//开始Y坐标
217
+      touchMoveX = e.changedTouches[0].clientX,//滑动变化坐标
218
+      touchMoveY = e.changedTouches[0].clientY,//滑动变化坐标
219
+      //获取滑动角度
220
+      angle = this.angle({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY });
221
+    console.log(angle)
221 222
 
222
-      // touchMoveX = e.changedTouches[0].clientX,//滑动变化坐标
223
-      // touchMoveY = e.changedTouches[0].clientY,//滑动变化坐标
224
-      // //获取滑动角度
225
-      // angle = this.angle({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY });
226 223
 
224
+    this.data.list.forEach(function (v, i) {
225
+      v.isTouchMove = false
226
+      //滑动超过30度角 return
227 227
 
228
-    // this.data.list.forEach(function (v, i) {
229
-    //   v.isTouchMove = false
230
-    //   //滑动超过30度角 return
228
+      if (Math.abs(angle) > 30) return;
231 229
 
232
-    //   if (Math.abs(angle) > 30) return;
233
-
234
-    //   if (i == index) {
235
-    //     if (touchMoveX > startX) //右滑
236
-    //       v.isTouchMove = false
237
-    //     else //左滑
238
-    //       v.isTouchMove = true
239
-    //   }
240
-    // })
230
+      if (i == index) {
231
+        if (touchMoveX > startX) //右滑
232
+          v.isTouchMove = false
233
+        else //左滑
234
+          v.isTouchMove = true
235
+      }
236
+    })
241 237
 
242 238
 
243 239
     // //更新数据
244
-    // this.setData({
245
-    //   list: this.data.list
246
-    // })
240
+    this.setData({
241
+      list: this.data.list
242
+    })
247 243
 
248 244
 
249 245
   },
250 246
 
247
+  angle: function (start, end) {
248
+    var _X = end.X - start.X,
249
+      _Y = end.Y - start.Y
250
+    //返回角度 /Math.atan()返回数字的反正切值
251
+    return 360 * Math.atan(_Y / _X) / (2 * Math.PI)
252
+  },
253
+
254
+
255
+
256
+
251 257
 
252 258
 });

+ 2 - 2
pages/chat-list/chat-list.wxml

@@ -13,5 +13,5 @@
13 13
         </view>
14 14
     </block>
15 15
 
16
-
17
-<!-- <view style=' margin-top:10px;width:100%;height:80rpx;border:1px solid;text-align:center;line-height:80rpx; '  bindtap='ceshi'>点击</view> -->
16
+<!-- 
17
+<view style=' margin-top:10px;width:100%;height:80rpx;border:1px solid;text-align:center;line-height:80rpx; '  bindtap='ceshi'>点击</view> -->

+ 2 - 2
pages/chat-list/view/chat-item.wxml

@@ -3,8 +3,8 @@
3 3
 
4 4
 
5 5
             
6
-              <view class="{{isTouchMove ? 'chat-item-styleon' : 'chat-item-style'}}" bindtap="toChat" data-item="{{item}}" 
7
-              data-dsa="{{isTouchMove}}" hover-class="press-style">
6
+              <view class="{{item.isTouchMove ? 'chat-item-styleon' : 'chat-item-style'}}" bindtap="toChat" data-item="{{item}}" 
7
+              data-dsa="{{item.isTouchMove}}" hover-class="press-style">
8 8
                           <template is="chat-item-head" data="{{headUrl:item.img,count:item.count}}"/> <!-- 接收消息 提示小红点 引入页面 -->
9 9
 
10 10
                           <view class="chat-item-content-super-style">

+ 68 - 0
pages/index/waitfor/waitfor.js

@@ -0,0 +1,68 @@
1
+// pages/index/waitfor/waitfor.js
2
+Page({
3
+
4
+  /**
5
+   * 页面的初始数据
6
+   */
7
+  data: {
8
+
9
+  },
10
+
11
+  /**
12
+   * 生命周期函数--监听页面加载
13
+   */
14
+  onLoad: function (options) {
15
+
16
+  },
17
+
18
+  /**
19
+   * 生命周期函数--监听页面初次渲染完成
20
+   */
21
+  onReady: function () {
22
+    wx.showLoading({
23
+      title: '加载中',
24
+    })
25
+  },
26
+
27
+  /**
28
+   * 生命周期函数--监听页面显示
29
+   */
30
+  onShow: function () {
31
+
32
+  },
33
+
34
+  /**
35
+   * 生命周期函数--监听页面隐藏
36
+   */
37
+  onHide: function () {
38
+
39
+  },
40
+
41
+  /**
42
+   * 生命周期函数--监听页面卸载
43
+   */
44
+  onUnload: function () {
45
+
46
+  },
47
+
48
+  /**
49
+   * 页面相关事件处理函数--监听用户下拉动作
50
+   */
51
+  onPullDownRefresh: function () {
52
+
53
+  },
54
+
55
+  /**
56
+   * 页面上拉触底事件的处理函数
57
+   */
58
+  onReachBottom: function () {
59
+
60
+  },
61
+
62
+  /**
63
+   * 用户点击右上角分享
64
+   */
65
+  onShareAppMessage: function () {
66
+
67
+  }
68
+})

+ 3 - 0
pages/index/waitfor/waitfor.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "约会绑"
3
+}

+ 0 - 0
pages/index/waitfor/waitfor.wxml


+ 0 - 0
pages/index/waitfor/waitfor.wxss


+ 5 - 8
pages/index_details/index_details.js

@@ -263,7 +263,7 @@ console.log(that.data.uploadImages)
263 263
         // wx.navigateTo({
264 264
         //   url: '../chat/chat?to_id=' +  + '&myheadurl=' + that.myheadurl + '&headUrl=' + that.data.options_img
265 265
         // });
266
-       
266
+       return;
267 267
       } 
268 268
 
269 269
       if (res.data.location == 'shiming') {
@@ -275,14 +275,14 @@ console.log(that.data.uploadImages)
275 275
                 if (res.confirm) {
276 276
                     // console.log('用户点击确定');
277 277
                       wx.navigateTo({
278
-                        url: '/pages/personal_core/Realname/Realname'
278
+                        url: '/pages/personal_core/home_list/home_list'
279 279
                       });
280 280
                 } else if (res.cancel) {
281 281
                   // console.log('用户点击取消')
282 282
                 }
283 283
               }
284 284
             })
285
-
285
+        return;
286 286
       }
287 287
 
288 288
       if (res.data.location == 'huiyuan') {
@@ -300,7 +300,7 @@ console.log(that.data.uploadImages)
300 300
             }
301 301
           }
302 302
         })
303
-
303
+        return;
304 304
       }
305 305
 
306 306
       // if (res.data.location == shiming) {
@@ -310,10 +310,7 @@ console.log(that.data.uploadImages)
310 310
       // }
311 311
 
312 312
 
313
-    
314
-
315
-
316
-      // app.Tips(res.msg);
313
+      app.Tips(res.msg);
317 314
 
318 315
     })
319 316
 

+ 4 - 1
pages/information/chat/chat.js

@@ -413,8 +413,11 @@ Page({
413 413
           isMy: false,   //他人
414 414
         };
415 415
 
416
+       
416 417
         let _Receive_news = that.data.Receive_news;
417
-        _Receive_news.push(obj);      //合并历史消息对象
418
+        if (typeof _Receive_news == 'object'){
419
+          _Receive_news.push(obj);      //合并历史消息对象
420
+        }
418 421
 
419 422
         that.setData({
420 423
           Receive_news: _Receive_news,     //前台数据赋值 

+ 2 - 2
pages/personal_core/home/home.js

@@ -27,7 +27,7 @@ Page({
27 27
             };
28 28
     app.postRequest(datum_url, datum_data, function (res) {
29 29
             if (res.code == 201) {
30
-              console.log(res.data);
30
+              // console.log(res.data);
31 31
               that.setData({
32 32
                 datum: res.data
33 33
               })
@@ -69,7 +69,7 @@ Page({
69 69
     };
70 70
     app.postRequest(memberstatus_url, memberstatus_data, function (res) {
71 71
       if (res.code == 201) {
72
-        console.log(res.data);
72
+        console.log(res.data,6666);
73 73
         that.setData({
74 74
           memberstatus: res.data.messages
75 75
         })

+ 1 - 1
project.config.json

@@ -9,9 +9,9 @@
9 9
 		"postcss": true,
10 10
 		"minified": true,
11 11
 		"newFeature": true,
12
-		"coverView": true,
13 12
 		"autoAudits": false,
14 13
 		"checkInvalidKey": true,
14
+		"coverView": true,
15 15
 		"checkSiteMap": true,
16 16
 		"uploadWithSourceMap": true,
17 17
 		"babelSetting": {