Your Name преди 5 години
родител
ревизия
795819c271

+ 3 - 3
app.json

@@ -1,6 +1,5 @@
1 1
 {
2 2
   "pages": [
3
-        "pages/payment/Member/Member",
4 3
         "pages/index/index",
5 4
   "pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction",
6 5
 "pages/personal_core/vehicle/vehicle",
@@ -17,7 +16,7 @@
17 16
   "pages/Setup/Aboutus/Aboutus",
18 17
    "pages/Setup/security/security",
19 18
    "pages/Setup/Setuplist/Setuplist",
20
-
19
+        "pages/payment/Member/Member",
21 20
     "pages/personal_core/Album/Album",
22 21
      "pages/personal_core/requirements/requirements",
23 22
     "pages/personal_core/personaldataModifythe/personaldataModifythe",
@@ -30,7 +29,8 @@
30 29
     "pages/index_details/index_details",
31 30
     "pages/index_screen/index_screen",
32 31
     "pages/Landpage/Retrievepassword/Retrievepassword",
33
-    "pages/register/fillTel/fillTel",
32
+  "pages/register/Agreement/Agreement",
33
+  "pages/register/fillTel/fillTel",
34 34
     "pages/register/OwnData/OwnData",
35 35
     "pages/news/newslist/newslist",
36 36
     "pages/news/FabulousI/FabulousI",

+ 73 - 3
pages/chat-list/chat-list.js

@@ -12,8 +12,11 @@ Page({
12 12
      * 页面的初始数据
13 13
      */
14 14
     data: {
15
-        conversations: [],
16
-        myheadurl:''
15
+      conversations: [],
16
+      myheadurl:'',
17
+      isTouchMove:false,
18
+      
19
+ 
17 20
     },
18 21
 
19 22
     /**
@@ -101,6 +104,8 @@ Page({
101 104
     getConversationsItem(item) {
102 105
         let {latestMsg, ...msg} = item;
103 106
         return Object.assign(msg, JSON.parse(latestMsg));
107
+
108
+      console.log(latestMsg)
104 109
     },
105 110
   onSocketMessageCallback:function(e){
106 111
      let _this = this; 
@@ -178,5 +183,70 @@ Page({
178 183
               }
179 184
           }
180 185
       return arr;
181
-  }
186
+  },
187
+
188
+
189
+  ceshi: function (e) {
190
+    console.log(this.data.isTouchMove);
191
+    this.setData({
192
+      isTouchMove: 'true',
193
+    })
194
+    
195
+    console.log(this.data.isTouchMove);
196
+
197
+
198
+  },
199
+
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);
209
+
210
+  },
211
+
212
+
213
+  touchmove: function (e) {
214
+
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坐标
221
+
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
+
227
+
228
+    // this.data.list.forEach(function (v, i) {
229
+    //   v.isTouchMove = false
230
+    //   //滑动超过30度角 return
231
+
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
+    // })
241
+
242
+
243
+    // //更新数据
244
+    // this.setData({
245
+    //   list: this.data.list
246
+    // })
247
+
248
+
249
+  },
250
+
251
+
182 252
 });

+ 16 - 3
pages/chat-list/chat-list.wxml

@@ -1,4 +1,17 @@
1
+
2
+
3
+
1 4
 <import src="view/chat-item.wxml"/>
2
-<block wx:for="{{conversations}}" wx:key="conversationId"  >
3
-    <template is="chat-item" data="{{item}}"/>
4
-</block>
5
+
6
+
7
+
8
+    <block wx:for="{{conversations}}" wx:key="conversationId"  >
9
+        <view class='m_container' bindtouchstart='touchstart'  bindtouchmove='touchmove'>
10
+               <template is="chat-item" data="{{item,isTouchMove}}"/>     <!-- 聊天用户列表 -->
11
+
12
+               <view class='delete'>删除</view>
13
+        </view>
14
+    </block>
15
+
16
+
17
+<!-- <view style=' margin-top:10px;width:100%;height:80rpx;border:1px solid;text-align:center;line-height:80rpx; '  bindtap='ceshi'>点击</view> -->

+ 5 - 1
pages/chat-list/view/chat-item-head.wxml

@@ -1,6 +1,10 @@
1
+
2
+<!-- 接收消息 提示小红点 -->
1 3
 <template name="chat-item-head">
2 4
     <view class="chat-item-head-super-style">
3 5
         <image class="chat-head-style" src="{{headUrl}}" />
4 6
         <text wx:if="{{count>0}}" class="unread-style">{{count<=99?count:'99+'}}</text>
5 7
     </view>
6
-</template>
8
+</template>
9
+
10
+

+ 22 - 15
pages/chat-list/view/chat-item.wxml

@@ -2,19 +2,26 @@
2 2
 <template name="chat-item">
3 3
 
4 4
 
5
-    <view class="chat-item-style" bindtap="toChat" data-item="{{item}}" hover-class="press-style">
6
-        <template is="chat-item-head" data="{{headUrl:item.img,count:item.count}}"/>
7
-        <view class="chat-item-content-super-style">
8
-            <view class="chat-item-name-style">{{item.nickname}}</view>
9
-            <!--<image src="./../../image/chat/send_fail.png" style="width: 28rpx;height: 28rpx;margin-right: 6rpx;"/>-->
10
-            <text class="chat-item-content-style">{{item.content}}</text>
11
-        </view>
12
-        <view class="chat-item-status-super-style">
13
-            <view class="chat-item-time-style">{{item.timeStr}}</view>
14
-        </view>
15
-    </view>
16
-    <view class="list-divide-line" style="width: 79.5%;margin-left: 20.5%"/>
17
-
18
-
19
-    
5
+            
6
+              <view class="{{isTouchMove ? 'chat-item-styleon' : 'chat-item-style'}}" bindtap="toChat" data-item="{{item}}" 
7
+              data-dsa="{{isTouchMove}}" hover-class="press-style">
8
+                          <template is="chat-item-head" data="{{headUrl:item.img,count:item.count}}"/> <!-- 接收消息 提示小红点 引入页面 -->
9
+
10
+                          <view class="chat-item-content-super-style">
11
+                              <view class="chat-item-name-style">{{item.nickname}}</view>
12
+                           <!--<image src="./../../image/chat/send_fail.png" style="width: 28rpx;height: 28rpx;margin-right: 6rpx;"/>-->
13
+                              <text class="chat-item-content-style">{{item.content}}</text>
14
+                          </view>
15
+                          
16
+                          <view class="chat-item-status-super-style">
17
+                              <view class="chat-item-time-style">{{item.timeStr}}</view>
18
+                          </view>
19
+              </view>
20
+
21
+          
22
+
23
+              <view class="list-divide-line" style="width: 79.5%;margin-left: 20.5%;border-bottom:1px solid #EEE;"/>
24
+
25
+
26
+
20 27
 </template>

+ 22 - 3
pages/chat-list/view/chat-item.wxss

@@ -1,10 +1,27 @@
1 1
 @import "chat-item-head.wxss";
2
-
2
+.m_container{position:relative;}
3
+.chat-item-styleon{
4
+    width:750rpx;
5
+    display: flex;
6
+    align-items: center;
7
+    position: relative;
8
+    z-index: 20;
9
+    background:#FFF;
10
+    transition: all 0.4s;
11
+  transform: translateX(-148rpx);
12
+  }
3 13
 .chat-item-style{
4
-    width:100%;
14
+    width:750rpx;
5 15
     display: flex;
6 16
     align-items: center;
7 17
     position: relative;
18
+    z-index: 20;
19
+    background:#FFF;
20
+    transition: all 0.4s;
21
+
22
+   
23
+   
24
+   
8 25
 }
9 26
 .chat-item-content-super-style{
10 27
     display: flex;
@@ -40,4 +57,6 @@
40 57
     font-size: 20rpx;
41 58
     margin-bottom: 20rpx;
42 59
     text-align: right;
43
-}
60
+}
61
+
62
+.delete{position:absolute;top:0;right:0;z-index:10;width:148rpx;height:148rpx;text-align:center;line-height:148rpx;background:#FF4500;font-size:32rpx;color:#FFF;}

+ 66 - 0
pages/register/Agreement/Agreement.js

@@ -0,0 +1,66 @@
1
+// pages/register/Agreement/Agreement.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
+
23
+  },
24
+
25
+  /**
26
+   * 生命周期函数--监听页面显示
27
+   */
28
+  onShow: function () {
29
+
30
+  },
31
+
32
+  /**
33
+   * 生命周期函数--监听页面隐藏
34
+   */
35
+  onHide: function () {
36
+
37
+  },
38
+
39
+  /**
40
+   * 生命周期函数--监听页面卸载
41
+   */
42
+  onUnload: function () {
43
+
44
+  },
45
+
46
+  /**
47
+   * 页面相关事件处理函数--监听用户下拉动作
48
+   */
49
+  onPullDownRefresh: function () {
50
+
51
+  },
52
+
53
+  /**
54
+   * 页面上拉触底事件的处理函数
55
+   */
56
+  onReachBottom: function () {
57
+
58
+  },
59
+
60
+  /**
61
+   * 用户点击右上角分享
62
+   */
63
+  onShareAppMessage: function () {
64
+
65
+  }
66
+})

+ 3 - 0
pages/register/Agreement/Agreement.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "注册服务条款"
3
+}

+ 1 - 0
pages/register/Agreement/Agreement.wxml

@@ -0,0 +1 @@
1
+<web-view src="https://xiaochengxuapi.jrjyjrjy.com/v1/other/about/agreement"></web-view>

+ 1 - 0
pages/register/Agreement/Agreement.wxss

@@ -0,0 +1 @@
1
+/* pages/register/Agreement/Agreement.wxss */

+ 32 - 26
pages/register/fillTel/fillTel.js

@@ -238,10 +238,7 @@ complete: function (e) {
238 238
   getVerificationCode(res) {
239 239
 
240 240
     var that = this
241
-    that.setData({
242
-      disabled: true,
243
-      color: '#ccc',
244
-    })
241
+
245 242
 
246 243
           var phone = that.data.user;
247 244
 
@@ -266,8 +263,11 @@ complete: function (e) {
266 263
             app.postRequest(code_url, code_data, function (res) {
267 264
               if (res.code == 201) {
268 265
                 // console.log(res.data.id);
266
+
269 267
                 that.setData({
270
-                  codeid: res.data.id     // 微信ID
268
+                  codeid: res.data.id,    // 微信ID
269
+                  disabled: true,
270
+                  color: '#ccc',
271 271
                 })
272 272
           
273 273
                 //当手机号正确的时候提示用户短信验证码已经发送
@@ -275,35 +275,41 @@ complete: function (e) {
275 275
                   title: '短信验证码已发送',
276 276
                   icon: 'none',
277 277
                   duration: 2000
278
-                });      
278
+                });    
279
+
280
+                //设置一分钟的倒计时
281
+                var interval = setInterval(function () {
282
+                  currentTime--; //每执行一次让倒计时秒数减一
283
+                  that.setData({
284
+                    text: "重新发送(" + currentTime + 's)', //按钮文字变成倒计时对应秒数
285
+
286
+                  })
287
+                  //如果当秒数小于等于0时 停止计时器 且按钮文字变成重新发送 且按钮变成可用状态 倒计时的秒数也要恢复成默认秒数 即让获取验证码的按钮恢复到初始化状态只改变按钮文字
288
+                  if (currentTime <= 0) {
289
+                    clearInterval(interval)
290
+                    that.setData({
291
+                      text: '重新发送',
292
+                      currentTime: 61,
293
+                      disabled: false,
294
+                      color: '#FF9BCA'
295
+                    })
296
+                  }
297
+                }, 1000);
298
+
299
+
300
+
301
+
279 302
                 return;
280 303
               }
281 304
 
282
-              // var _qrcode = '微信二维码与微信号,任选一项进行完善'
283
-              // getApp().Tips(_qrcode);
305
+              var _qrcode = res.data.mobile[0]
306
+              getApp().Tips(_qrcode);
284 307
 
285 308
             })
286 309
 
287 310
 
288 311
    
289
-            //设置一分钟的倒计时
290
-            var interval = setInterval(function () {
291
-              currentTime--; //每执行一次让倒计时秒数减一
292
-              that.setData({
293
-                text: "重新发送("+currentTime + 's)', //按钮文字变成倒计时对应秒数
294
-
295
-              })
296
-              //如果当秒数小于等于0时 停止计时器 且按钮文字变成重新发送 且按钮变成可用状态 倒计时的秒数也要恢复成默认秒数 即让获取验证码的按钮恢复到初始化状态只改变按钮文字
297
-              if (currentTime <= 0) {
298
-                clearInterval(interval)
299
-                that.setData({
300
-                  text: '重新发送',
301
-                  currentTime: 61,
302
-                  disabled: false,
303
-                  color: '#FF9BCA'
304
-                })
305
-              }
306
-            }, 1000);
312
+  
307 313
 
308 314
           };
309 315
 

+ 2 - 2
pages/register/fillTel/fillTel.wxml

@@ -20,7 +20,7 @@
20 20
       <button class='form_button'   bindtap='complete'>完成</button>
21 21
 
22 22
       <view class='Agreement c'>
23
-             <view class='Agreement_img'><image src='/image/xy.png' mode="widthFix"></image></view>
24
-             <navigator>本人<text>同意</text>本协议所有规定</navigator>
23
+             <!-- <view class='Agreement_img'><image src='/image/xy.png' mode="widthFix"></image></view> -->
24
+             <navigator url="/pages/register/Agreement/Agreement"  hover-class="none" >注册即表示同意约会邦<text>注册服务条款</text></navigator>
25 25
       </view>
26 26
 </view>

+ 2 - 2
pages/register/fillTel/fillTel.wxss

@@ -32,9 +32,9 @@ font-size:30rpx;
32 32
 
33 33
 .Verification{width:226rpx;height:70rpx;background: linear-gradient(to right, #FF9BCA , #FF79B8);position:absolute;right:0;top:18rpx;font-size:24rpx;color:#FFF;border-radius:5rpx;line-height:70rpx;overflow:hidden;}
34 34
 
35
-.Agreement{width:294rpx;margin:auto;margin-top:40rpx;}
35
+.Agreement{margin-top:40rpx;}
36 36
 .Agreement_img{width:24rpx;height:24rpx;border:1px solid #999;border-radius:4rpx;position:relative;float:left;}
37 37
 .Agreement_img image{width:32rpx;position:absolute;top:-4rpx;}
38 38
 
39
-.Agreement navigator{font-size:22rpx;color:#1B1B1B;float:left;margin-left:14rpx;display:block;}
39
+.Agreement navigator{font-size:22rpx;color:#1B1B1B;float:left;margin-left:14rpx;display:block;text-align:center;width:100%;}
40 40
 .Agreement navigator text{font-size:22rpx;color:#1E6CE1;}

+ 18 - 0
utils/websocket.js

@@ -1,3 +1,5 @@
1
+
2
+
1 3
 // socket已经连接成功
2 4
 var socketOpen = false
3 5
 // socket已经调用关闭function
@@ -107,6 +109,8 @@ var webSocket = {
107 109
     })
108 110
   },
109 111
 
112
+
113
+
110 114
   // 收到消息回调
111 115
   onSocketMessageCallback: function (msg) {
112 116
 
@@ -220,4 +224,18 @@ wx.onSocketClose(function (res) {
220 224
   }
221 225
 })
222 226
 
227
+// 监听WebSocket关闭。
228
+wx.onSocketClose(function (res) {
229
+  console.log('WebSocket 已关闭!')
230
+  if (!socketClose) {
231
+    clearTimeout(connectSocketTimeOut)
232
+    connectSocketTimeOut = setTimeout(() => {
233
+      webSocket.connectSocket();
234
+    }, 3000);
235
+  }
236
+})
237
+
238
+
239
+
240
+
223 241
 module.exports = webSocket;