chenxiaofeng 5 years ago
parent
commit
3c0d41ad85

+ 16 - 3
app.js

@@ -7,6 +7,7 @@ App({
7
   },
7
   },
8
 
8
 
9
   judge_Land() {
9
   judge_Land() {
10
+<<<<<<< HEAD
10
     // try {
11
     // try {
11
     //   const value = wx.getStorageSync('wx_id')
12
     //   const value = wx.getStorageSync('wx_id')
12
     //   if (value) {
13
     //   if (value) {
@@ -15,6 +16,19 @@ App({
15
     // } catch (e) {
16
     // } catch (e) {
16
     //   // Do something when catch error
17
     //   // Do something when catch error
17
     // }
18
     // }
19
+=======
20
+    // console.log(wx.getStorageSync('wx_id'))    //已经授权 id
21
+    // console.log(wx.getStorageSync('access_token'))    //是否注册过
22
+
23
+    try {
24
+      const value = wx.getStorageSync('wx_id')
25
+      if (value) {
26
+        // Do something with return value
27
+      }
28
+    } catch (e) {
29
+      // Do something when catch error
30
+    }
31
+>>>>>>> 465e4a521529b4053bd5916de8135b481ec44d51
18
 
32
 
19
     try {
33
     try {
20
       if (wx.getStorageSync('access_token')) {   //是否注册过
34
       if (wx.getStorageSync('access_token')) {   //是否注册过
@@ -46,8 +60,6 @@ App({
46
     } catch (e) {
60
     } catch (e) {
47
       // Do something when catch error
61
       // Do something when catch error
48
     }
62
     }
49
-    // console.log(wx.getStorageSync('wx_id'))    //已经授权 id
50
-    // console.log(wx.getStorageSync('access_token'))    //是否注册过
51
 
63
 
52
 
64
 
53
 
65
 
@@ -58,6 +70,7 @@ App({
58
   onLoad: function (options) {
70
   onLoad: function (options) {
59
 
71
 
60
     webSocket.connectSocket();
72
     webSocket.connectSocket();
73
+
61
   
74
   
62
   },
75
   },
63
 
76
 
@@ -117,7 +130,7 @@ App({
117
       success: function (res) {
130
       success: function (res) {
118
           if(res.data.code == "401"){
131
           if(res.data.code == "401"){
119
             wx.clearStorageSync();
132
             wx.clearStorageSync();
120
-            wx.navigateTo({
133
+            wx.reLaunch({
121
               url: '/pages/Landpage/Land/Land'
134
               url: '/pages/Landpage/Land/Land'
122
             });
135
             });
123
           }
136
           }

+ 3 - 2
app.json

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

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

@@ -132,6 +132,9 @@ Page({
132
           if (dataAtt[index].type == 2) {
132
           if (dataAtt[index].type == 2) {
133
             dataAtt[index].content = '[图片]'
133
             dataAtt[index].content = '[图片]'
134
           }
134
           }
135
+     
136
+          dataAtt[index].isTouchMove = false    //  处理滑动
137
+
135
         }
138
         }
136
         if(data.data){
139
         if(data.data){
137
           _this.setData({
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
   touchmove: function (e) {
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
         </view>
13
         </view>
14
     </block>
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
                           <template is="chat-item-head" data="{{headUrl:item.img,count:item.count}}"/> <!-- 接收消息 提示小红点 引入页面 -->
8
                           <template is="chat-item-head" data="{{headUrl:item.img,count:item.count}}"/> <!-- 接收消息 提示小红点 引入页面 -->
9
 
9
 
10
                           <view class="chat-item-content-super-style">
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
         // wx.navigateTo({
263
         // wx.navigateTo({
264
         //   url: '../chat/chat?to_id=' +  + '&myheadurl=' + that.myheadurl + '&headUrl=' + that.data.options_img
264
         //   url: '../chat/chat?to_id=' +  + '&myheadurl=' + that.myheadurl + '&headUrl=' + that.data.options_img
265
         // });
265
         // });
266
-       
266
+       return;
267
       } 
267
       } 
268
 
268
 
269
       if (res.data.location == 'shiming') {
269
       if (res.data.location == 'shiming') {
@@ -275,14 +275,14 @@ console.log(that.data.uploadImages)
275
                 if (res.confirm) {
275
                 if (res.confirm) {
276
                     // console.log('用户点击确定');
276
                     // console.log('用户点击确定');
277
                       wx.navigateTo({
277
                       wx.navigateTo({
278
-                        url: '/pages/personal_core/Realname/Realname'
278
+                        url: '/pages/personal_core/home_list/home_list'
279
                       });
279
                       });
280
                 } else if (res.cancel) {
280
                 } else if (res.cancel) {
281
                   // console.log('用户点击取消')
281
                   // console.log('用户点击取消')
282
                 }
282
                 }
283
               }
283
               }
284
             })
284
             })
285
-
285
+        return;
286
       }
286
       }
287
 
287
 
288
       if (res.data.location == 'huiyuan') {
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
       // if (res.data.location == shiming) {
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
           isMy: false,   //他人
413
           isMy: false,   //他人
414
         };
414
         };
415
 
415
 
416
+       
416
         let _Receive_news = that.data.Receive_news;
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
         that.setData({
422
         that.setData({
420
           Receive_news: _Receive_news,     //前台数据赋值 
423
           Receive_news: _Receive_news,     //前台数据赋值 

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

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

+ 1 - 1
project.config.json

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