Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
19857c75
authored
Sep 29, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/shiyu/icsalesProgram
parents
93275695
4cfc4111
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
34 deletions
app.js
components/chat/inputbar/inputbar.js
components/chat/inputbar/suit/main/main.wxml
components/chat/inputbar/suit/main/main.wxss
pages/detail/chat/index.js
pages/tab/message/message.js
utils/chat.js
utils/util.js
app.js
View file @
19857c75
...
...
@@ -8,8 +8,6 @@ import {
import
{
apis
}
from
'./utils/api.js'
;
App
({
globalData
:
{
auth
:
wx
.
getStorageSync
(
'auth'
),
//是否授权
...
...
@@ -45,6 +43,7 @@ App({
wx
.
setStorageSync
(
"member"
,
member
)
},
onLaunch
()
{
wx
.
removeStorageSync
(
'is_ShowModal'
)
//由于小程序的show切后台时会执行,导致异地登入弹窗会重复弹起,所以设置一个缓存进行转换
this
.
versionUpdate
();
//验证是否授权
if
(
this
.
globalData
.
auth
)
{
...
...
components/chat/inputbar/inputbar.js
View file @
19857c75
...
...
@@ -56,7 +56,7 @@ Component({
ready
()
{
this
.
setData
({
isIPX
:
getApp
().
globalData
.
isIPX
})
})
;
let
comps
=
this
.
data
.
__comps__
;
comps
.
main
=
this
.
selectComponent
(
"#chat-suit-main"
);
comps
.
emoji
=
this
.
selectComponent
(
"#chat-suit-emoji"
);
...
...
components/chat/inputbar/suit/main/main.wxml
View file @
19857c75
...
...
@@ -6,15 +6,15 @@
class="f news"
type="text"
value="{{ inputMessage }}"
cursor-spacing="
65
"
cursor-spacing="
10
"
confirm-type="send"
bindconfirm="sendMessage"
bindinput="bindMessage"
bindtap="focus"
bindfocus="focus"
bindblur="blur"
placeholder-class="chatinput-placeholder"
placeholder="{{isTopic?'不来点什么吗?':'输入新消息'}}"
placeholder-style="color:#CFCFCF; padding-left:5px;"
/>
<view class="send_btn" bind:tap="sendMessage">{{isTopic?'发布':'发送'}}</view>
...
...
components/chat/inputbar/suit/main/main.wxss
View file @
19857c75
.text-input {
width: 100%;
height: 100rpx;
padding: 0;
display: block;
width: 100%;
height: 100rpx;
padding: 0;
display: block;
}
.news {
width: 100%;
height: 62rpx;
font-size: 28rpx;
padding: 0 32rpx;
display: inline-block;
margin-left:24rpx;
line-height: 48rpx;
position:
relative;
top: 0;
background-color: #
E6ECF
2;
width: 100%;
height: 62rpx;
font-size: 28rpx;
padding: 0 32rpx;
display: inline-block;
margin-left:
24rpx;
line-height: 48rpx;
position:
relative;
top: 0;
background-color: #
e6ecf
2;
border-radius: 8rpx;
box-sizing: border-box;
}
.chatinput-placeholder {
color: #cfcfcf;
padding-left: 5px;
}
.send_btn {
flex: 0 0 120rpx;
font-size: 28rpx;
color:#0D84D
1;
padding: 0;
height:62rpx;
font-size: 28rpx;
color: #0d84d
1;
padding: 0;
height:
62rpx;
text-align: center;
line-height: 62rpx;
}
.f-row{
height:
100rpx;
display:
flex;
align-items:
center;
.f-row
{
height:
100rpx;
display:
flex;
align-items:
center;
}
pages/detail/chat/index.js
View file @
19857c75
...
...
@@ -32,7 +32,7 @@ Page({
},
onUnload
()
{
disp
.
fire
(
"em.chatroom.leave"
);
//
disp.fire("em.chatroom.leave");
},
closeTip
:
function
()
{
this
.
setData
({
...
...
pages/tab/message/message.js
View file @
19857c75
...
...
@@ -172,7 +172,7 @@ Page({
userId
:
wx
.
getStorageSync
(
'user_id'
),
});
if
(
getApp
().
globalData
.
imBoolean
&&
isShowModal
)
{
reloginIm
()
reloginIm
(
true
)
}
},
...
...
utils/chat.js
View file @
19857c75
...
...
@@ -199,7 +199,9 @@ const webimListen = () => {
let
curPage
=
pages
[
pages
.
length
-
1
];
getApp
().
globalData
.
imBoolean
=
true
;
wx
.
setStorageSync
(
'is_ShowModal'
,
true
);
if
(
curPage
.
route
==
"pages/detail/chat/index"
||
curPage
.
route
==
'pages/tab/message/message'
)
{
if
(
curPage
.
route
==
'pages/tab/message/message'
)
{
reloginIm
(
true
)
}
else
if
(
curPage
.
route
==
"pages/detail/chat/index"
){
reloginIm
()
}
}
else
if
(
error
.
type
==
1
)
{
//用户名或者账号错误
...
...
utils/util.js
View file @
19857c75
...
...
@@ -343,7 +343,7 @@ const matchReg = (str) => {
let
newStr
=
str
.
replace
(
reg
,
''
);
return
newStr
}
const
reloginIm
=
()
=>
{
const
reloginIm
=
(
bool
)
=>
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'您的聊天账号掉线啦!'
,
...
...
@@ -355,7 +355,12 @@ const reloginIm = () => {
getApp
().
conn
.
reopen
();
}
else
if
(
res
.
cancel
)
{
wx
.
switchTab
({
url
:
'/pages/tab/home/home'
url
:
'/pages/tab/home/home'
,
success
:
function
(){
if
(
bool
)
{
wx
.
setStorageSync
(
'is_ShowModal'
,
true
)
};
}
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment