File tree 5 files changed +27
-13
lines changed 5 files changed +27
-13
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,10 @@ var util = require('./utils/util')
5
5
App ( {
6
6
onLaunch ( ) {
7
7
//调用API从本地缓存中获取数据
8
- var logs = wx . getStorageSync ( 'logs' ) || [ ]
9
- logs . unshift ( Date . now ( ) )
10
- wx . setStorageSync ( 'logs' , logs )
11
- setTimeout ( ( ) => {
12
- this . fetchCurrentUser ( )
13
- } , 0 )
8
+ // var logs = wx.getStorageSync('logs') || []
9
+ // logs.unshift(Date.now())
10
+ // wx.setStorageSync('logs', logs)
11
+ this . fetchCurrentUser ( )
14
12
} ,
15
13
fetchCurrentUser ( cb ) {
16
14
var currentUser = wx . getStorageSync ( 'currentUser' )
Original file line number Diff line number Diff line change 69
69
this . setData ( {
70
70
liveId : query . liveId
71
71
} )
72
+
72
73
var app = getApp ( )
73
74
this . setData ( {
74
75
curUser : app . globalData . currentUser
@@ -320,7 +321,10 @@ Page({
320
321
this . addSystemMsg ( '聊天服务器连接成功' )
321
322
this . registerEvent ( )
322
323
this . fetchConv ( )
323
- } ) . catch ( this . handleError )
324
+
325
+ } ) . catch ( ( error ) => {
326
+ this . addSystemMsg ( '连接聊天服务器失败 ' + error )
327
+ } )
324
328
} ,
325
329
registerEvent ( ) {
326
330
this . client . on ( 'message' , ( message , conversation ) => {
@@ -361,7 +365,9 @@ Page({
361
365
this . fetchCount ( )
362
366
} , 5 * 1000 )
363
367
364
- } ) . catch ( this . handleError )
368
+ } ) . catch ( ( error ) => {
369
+ this . addSystemMsg ( '加载聊天记录失败:' + error )
370
+ } )
365
371
} ,
366
372
fetchCount ( ) {
367
373
this . conv . count ( )
@@ -386,6 +392,9 @@ Page({
386
392
util . showError ( error )
387
393
} ,
388
394
upper ( e ) {
395
+ if ( ! this . messageIterator ) {
396
+ return
397
+ }
389
398
if ( this . isLoading ) {
390
399
return
391
400
}
@@ -548,5 +557,11 @@ Page({
548
557
desc : '来自趣直播-知识直播平台' ,
549
558
path : '/pages/live/live?liveId=' + live . liveId
550
559
}
560
+ } ,
561
+ viewQrcode ( e ) {
562
+ console . log ( e )
563
+ wx . previewImage ( {
564
+ urls : [ 'http://mres.quzhiboapp.com/qrcode_me_3.jpg' ]
565
+ } )
551
566
}
552
567
} )
Original file line number Diff line number Diff line change 9
9
<view class="small-title">开播时您将收到一条微信通知~</view>
10
10
<view class="small-title">可打开 quzhiboapp.com 在电脑上观看</view>
11
11
<view class="small-title">另可长按加微信进入用户群和主播聊聊</view>
12
- <image class="qrcode" src="http://mres.quzhiboapp.com/qrcode_me_3.jpg" alt="" mode="widthFix"></image>
12
+ <image bindtap="viewQrcode" class="qrcode" src="http://mres.quzhiboapp.com/qrcode_me_3.jpg" alt="" mode="widthFix"></image>
13
13
</view>
14
14
15
15
<view class="video-on" wx:if="{{live.status == 20 || live.status == 25 || live.status == 30}}">
Original file line number Diff line number Diff line change 45
45
justify-content: center;
46
46
align-items: center;
47
47
flex-direction: column;
48
+ height: 100%;
48
49
}
49
50
50
51
.video-error {
51
- height: 100%;
52
+
52
53
}
53
54
54
55
.player-area .video-wait .qrcode {
Original file line number Diff line number Diff line change 37
37
}
38
38
39
39
.live-item .live-info .subject {
40
- height: 80rpx ;
41
- line-height: 40rpx ;
40
+ height: 70rpx ;
41
+ line-height: 35rpx ;
42
42
overflow: hidden;
43
43
text-overflow: ellipsis;
44
44
word-wrap: break-word;
45
- font-size: 36rpx ;
45
+ font-size: 34rpx ;
46
46
display: table-cell;
47
47
vertical-align: middle;
48
48
}
You can’t perform that action at this time.
0 commit comments