Commit 19857c75 by 梁建民

Merge branch 'master' of http://119.23.72.7/shiyu/icsalesProgram

parents 93275695 4cfc4111
......@@ -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) {
......
......@@ -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");
......
......@@ -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>
......
.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: #E6ECF2;
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: #e6ecf2;
border-radius: 8rpx;
box-sizing: border-box;
}
.chatinput-placeholder {
color: #cfcfcf;
padding-left: 5px;
}
.send_btn {
flex: 0 0 120rpx;
font-size: 28rpx;
color:#0D84D1;
padding: 0;
height:62rpx;
font-size: 28rpx;
color: #0d84d1;
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;
}
......@@ -32,7 +32,7 @@ Page({
},
onUnload() {
disp.fire("em.chatroom.leave");
// disp.fire("em.chatroom.leave");
},
closeTip: function () {
this.setData({
......
......@@ -172,7 +172,7 @@ Page({
userId: wx.getStorageSync('user_id'),
});
if (getApp().globalData.imBoolean && isShowModal) {
reloginIm()
reloginIm(true)
}
},
......
......@@ -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) { //用户名或者账号错误
......
......@@ -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)
};
}
});
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment