Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lumastoreapp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xieyishang
lumastoreapp
Commits
4c44adb2
Commit
4c44adb2
authored
Nov 04, 2021
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11~
parent
98ead2f0
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
794 additions
and
179 deletions
+794
-179
pages/chat/chat/chat.vue
pages/chat/chat/chat.vue
+228
-98
pages/chat/chat/global.scss
pages/chat/chat/global.scss
+2
-2
pages/chat/message/message.scss
pages/chat/message/message.scss
+411
-2
pages/chat/message/message.vue
pages/chat/message/message.vue
+68
-27
pages/login/login.vue
pages/login/login.vue
+22
-7
store/Im_store.js
store/Im_store.js
+54
-41
utils/api/api.js
utils/api/api.js
+6
-0
utils/debug.js
utils/debug.js
+2
-2
utils/request.js
utils/request.js
+1
-0
No files found.
pages/chat/chat/chat.vue
View file @
4c44adb2
This diff is collapsed.
Click to expand it.
pages/chat/chat/global.scss
View file @
4c44adb2
...
...
@@ -660,9 +660,9 @@ page{
}
.utxstag
{
position
:
absolute
;
left
:
0
;
left
:
3upx
;
bottom
:
0
;
width
:
6
6
upx
;
width
:
6
0
upx
;
height
:
33upx
;
line-height
:
33upx
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.3
);
...
...
pages/chat/message/message.scss
View file @
4c44adb2
...
...
@@ -35,7 +35,7 @@ page{
border
:
1px
solid
#f1f1f1
;
width
:
106upx
;
height
:
106upx
;
border-radius
:
50%
;
border-radius
:
10upx
;
}
.chatitem_r
{
...
...
@@ -139,4 +139,413 @@ page{
.renlistsbox
{
}
\ No newline at end of file
}
.base-avatar-box
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
}
.base-img
{
padding
:
2px
;
box-sizing
:
border-box
;
}
.avatar-box-1
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
border-radius
:
10rpx
;
}
.avatar-box-1
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
100%
;
height
:
100%
;
}
.avatar-box-2
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
display
:
flex
;
align-items
:
center
;
border-radius
:
10rpx
;
}
.avatar-box-2
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
50%
;
height
:
50%
;
}
.avatar-box-3
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
position
:
relative
;
border-radius
:
10rpx
;
}
.avatar-box-3
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
50%
;
height
:
50%
;
}
.avatar-box-3
.img
:nth-of-type
(
1
)
{
position
:
absolute
;
top
:
1px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-3
.img
:nth-last-child
(
2
)
{
position
:
absolute
;
bottom
:
1px
;
left
:
1px
;
}
.avatar-box-3
.img
:nth-last-child
(
1
)
{
position
:
absolute
;
bottom
:
1px
;
right
:
1px
;
}
.avatar-box-4
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
position
:
relative
;
border-radius
:
10rpx
;
}
.avatar-box-4
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
50%
;
height
:
50%
;
}
.avatar-box-4
.img
:nth-of-type
(
1
)
{
position
:
absolute
;
top
:
1px
;
left
:
1px
;
}
.avatar-box-4
.img
:nth-of-type
(
2
)
{
position
:
absolute
;
top
:
1px
;
right
:
1px
;
}
.avatar-box-4
.img
:nth-last-child
(
2
)
{
position
:
absolute
;
bottom
:
1px
;
left
:
1px
;
}
.avatar-box-4
.img
:nth-last-child
(
1
)
{
position
:
absolute
;
bottom
:
1px
;
right
:
1px
;
}
.avatar-box-5
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
position
:
relative
;
border-radius
:
10rpx
;
}
.avatar-box-5
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
33
.333333333333336%
;
height
:
33
.333333333333336%
;
}
.avatar-box-5
.img
:nth-of-type
(
1
)
{
position
:
absolute
;
top
:
16
.666666666666668%
;
left
:
16
.666666666666668%
;
}
.avatar-box-5
.img
:nth-of-type
(
2
)
{
position
:
absolute
;
top
:
16
.666666666666668%
;
right
:
16
.666666666666668%
;
}
.avatar-box-5
.img
:nth-last-child
(
3
)
{
position
:
absolute
;
bottom
:
16
.666666666666668%
;
left
:
1px
;
}
.avatar-box-5
.img
:nth-last-child
(
2
)
{
position
:
absolute
;
bottom
:
16
.666666666666668%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-5
.img
:nth-last-child
(
1
)
{
position
:
absolute
;
bottom
:
16
.666666666666668%
;
right
:
1px
;
}
.avatar-box-6
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
position
:
relative
;
border-radius
:
10rpx
;
}
.avatar-box-6
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
33
.333333333333336%
;
height
:
33
.333333333333336%
;
}
.avatar-box-6
.img
:nth-of-type
(
1
)
{
position
:
absolute
;
top
:
16
.666666666666668%
;
left
:
1px
;
}
.avatar-box-6
.img
:nth-of-type
(
2
)
{
position
:
absolute
;
top
:
16
.666666666666668%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-6
.img
:nth-of-type
(
3
)
{
position
:
absolute
;
top
:
16
.666666666666668%
;
right
:
1px
;
}
.avatar-box-6
.img
:nth-last-child
(
3
)
{
position
:
absolute
;
bottom
:
16
.666666666666668%
;
left
:
1px
;
}
.avatar-box-6
.img
:nth-last-child
(
2
)
{
position
:
absolute
;
bottom
:
16
.666666666666668%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-6
.img
:nth-last-child
(
1
)
{
position
:
absolute
;
bottom
:
16
.666666666666668%
;
right
:
1px
;
}
.avatar-box-7
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
position
:
relative
;
border-radius
:
10rpx
;
}
.avatar-box-7
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
33
.333333333333336%
;
height
:
33
.333333333333336%
;
}
.avatar-box-7
.img
:nth-of-type
(
1
)
{
position
:
absolute
;
top
:
1px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-7
.img
:nth-last-child
(
6
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
left
:
1px
;
}
.avatar-box-7
.img
:nth-last-child
(
5
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-7
.img
:nth-last-child
(
4
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
right
:
1px
;
}
.avatar-box-7
.img
:nth-last-child
(
3
)
{
position
:
absolute
;
bottom
:
1px
;
left
:
1px
;
}
.avatar-box-7
.img
:nth-last-child
(
2
)
{
position
:
absolute
;
bottom
:
1px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-7
.img
:nth-last-child
(
1
)
{
position
:
absolute
;
bottom
:
1px
;
right
:
1px
;
}
.avatar-box-8
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
position
:
relative
;
border-radius
:
10rpx
;
}
.avatar-box-8
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
33
.333333333333336%
;
height
:
33
.333333333333336%
;
}
.avatar-box-8
.img
:nth-of-type
(
1
)
{
position
:
absolute
;
top
:
1px
;
left
:
16
.666666666666668%
;
}
.avatar-box-8
.img
:nth-of-type
(
2
)
{
position
:
absolute
;
top
:
1px
;
right
:
16
.666666666666668%
;
}
.avatar-box-8
.img
:nth-last-child
(
6
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
left
:
1px
;
}
.avatar-box-8
.img
:nth-last-child
(
5
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-8
.img
:nth-last-child
(
4
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
right
:
1px
;
}
.avatar-box-8
.img
:nth-last-child
(
3
)
{
position
:
absolute
;
bottom
:
1px
;
left
:
1px
;
}
.avatar-box-8
.img
:nth-last-child
(
2
)
{
position
:
absolute
;
bottom
:
1px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-8
.img
:nth-last-child
(
1
)
{
position
:
absolute
;
bottom
:
1px
;
right
:
1px
;
}
.avatar-box-9
{
background-color
:
#e8e8e8
;
width
:
106rpx
;
height
:
106rpx
;
position
:
relative
;
border-radius
:
10rpx
;
}
.avatar-box-9
.img
{
padding
:
2px
;
box-sizing
:
border-box
;
width
:
33
.333333333333336%
;
height
:
33
.333333333333336%
;
}
.avatar-box-9
.img
:nth-of-type
(
1
)
{
position
:
absolute
;
top
:
1px
;
left
:
1px
;
}
.avatar-box-9
.img
:nth-of-type
(
2
)
{
position
:
absolute
;
top
:
1px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-9
.img
:nth-of-type
(
3
)
{
position
:
absolute
;
top
:
1px
;
right
:
1px
;
}
.avatar-box-9
.img
:nth-last-child
(
6
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
left
:
1px
;
}
.avatar-box-9
.img
:nth-last-child
(
5
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-9
.img
:nth-last-child
(
4
)
{
position
:
absolute
;
top
:
33
.333333333333336%
;
right
:
1px
;
}
.avatar-box-9
.img
:nth-last-child
(
3
)
{
position
:
absolute
;
bottom
:
1px
;
left
:
1px
;
}
.avatar-box-9
.img
:nth-last-child
(
2
)
{
position
:
absolute
;
bottom
:
1px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.avatar-box-9
.img
:nth-last-child
(
1
)
{
position
:
absolute
;
bottom
:
1px
;
right
:
1px
;
}
pages/chat/message/message.vue
View file @
4c44adb2
...
...
@@ -3,12 +3,19 @@
<view
class=
"message"
>
<!-- 聊天 -->
<view
class=
"liaotiancards"
>
<view
class=
"emptybox"
v-if=
"conversationList.length==0"
>
<image
class=
"img"
src=
"/static/base/empty-image-default.png"
mode=
""
></image>
</view>
<view
class=
"chatlist"
>
<view
@
tap=
"tochats(item)"
class=
"chatitem flex"
v-for=
"(item,index) in conversationList"
:key=
"index"
>
<view
@
tap=
"tochats(item)"
class=
"chatitem flex"
v-for=
"(item,index) in conversationList
two
"
:key=
"index"
>
<view
class=
"usertxbox"
>
<view
class=
"tagmsgs"
v-if=
"item.unreadCount!=0 && item.unreadCount
<99
"
>
{{
item
.
unreadCount
}}
</view>
<view
class=
"tagmsgs"
v-else-if=
"item.unreadCount!=0 && item.unreadCount>=99"
>
99
</view>
<image
class=
"usertx"
:src=
"item.avatar|parseurl"
mode=
""
></image>
<view
v-if=
"item.type==2 && item.txlen"
:class=
"'avatar-box-'+item.txlen"
>
<image
class=
"img"
:src=
"dataa"
v-for=
"(dataa,i) in item.migtxs"
:key=
"i"
></image>
</view>
<image
v-else
class=
"usertx"
:src=
"item.avatar"
mode=
""
></image>
</view>
<view
class=
"chatitem_r flex1"
>
<view
class=
"linenamebox flex ali-c jus-b"
>
...
...
@@ -35,19 +42,7 @@
</view>
</view>
<view
class=
"chatitem flex"
@
tap=
"loginfun"
>
<image
class=
"usertx"
src=
"/static/store/yueicon.png"
mode=
""
></image>
<view
class=
"chatitem_r flex1"
>
<view
class=
"linenamebox flex ali-c jus-b"
>
<view
class=
"flex ali-c"
>
<view
class=
"nikenames"
>
通知
</view>
<view
class=
"qiyenames"
>
系统通知
</view>
</view>
<view
class=
"istimes"
>
11月2日
</view>
</view>
<view
class=
"isliaotcon oneline"
>
恭喜您获得点餐优惠券
</view>
</view>
</view>
</view>
</view>
...
...
@@ -61,14 +56,12 @@
//过滤器
filters
:
{
dateFormat
(
value
)
{
console
.
info
(
"
value
"
,
value
);
return
formatMsgTime
(
value
);
}
},
data
()
{
return
{
conversationListtwo
:[],
};
},
onLoad
()
{
...
...
@@ -86,20 +79,41 @@
return
this
.
$store
.
state
.
myconversationList
;
},
},
watch
:{
conversationList
(){
this
.
conversationListtwo
=
this
.
conversationList
;
}
},
methods
:
{
loginfun
()
{
let
userInfo
=
uni
.
getStorageSync
(
"
userInfo
"
);
console
.
info
(
"
userInfo
"
,
userInfo
);
// || userInfo.user_id=="817163" 9715
if
(
userInfo
.
user_id
){
let
userids
=
'
u_
'
+
String
(
userInfo
.
user_id
)
// this.$store.dispatch("baselogin", "user1"); //登录
this
.
$store
.
dispatch
(
"
baselogin
"
,
userids
);
//登录
}
let
IMUserID
=
uni
.
getStorageSync
(
"
IMUserID
"
);
this
.
$store
.
dispatch
(
"
baselogin
"
,
IMUserID
);
//登录
// let IMUserID = 'u_817157';
// this.$store.dispatch("baselogin", IMUserID); //登录
setTimeout
(()
=>
{
if
(
this
.
conversationList
.
length
==
0
){
// #ifdef APP-PLUS
this
.
getConversationList
();
// #endif
}
},
4000
)
// let userInfo = uni.getStorageSync("userInfo");
// if(userInfo.shop_id ){
// let userids = 'u_'+String(userInfo.shop_id)
// }
},
//获取会话列表 APP
getConversationList
()
{
this
.
$store
.
dispatch
(
"
getConversationList
"
,
{});
//获取会话列表
this
.
$store
.
dispatch
(
"
getConversationList
"
,
{}).
then
((
res
)
=>
{
console
.
info
(
"
APP获取会话列表成功
"
);
setTimeout
(()
=>
{
this
.
handchangelist
();
},
1000
)
});
//获取会话列表
},
tochats
(
item
)
{
let
type
=
item
.
type
;
//1单聊 2群聊
...
...
@@ -108,6 +122,33 @@
uni
.
navigateTo
({
url
:
`/pages/chat/chat/chat?type=
${
type
}
&userId=
${
userId
}
&groupId=
${
groupId
}
`
})
},
//获取群回话里面的群成员 生成群头像
handchangelist
(){
let
{
conversationList
}
=
this
;
for
(
let
i
=
0
;
i
<
conversationList
.
length
;
i
++
){
let
item
=
conversationList
[
i
];
if
(
item
.
type
==
2
){
//群
this
.
$store
.
dispatch
(
"
getGroupMemberList
"
,
{
groupId
:
item
.
groupId
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
let
ulist
=
res
.
members
;
let
migtxs
=
[];
for
(
let
j
=
0
;
j
<
ulist
.
length
;
j
++
){
if
(
j
<
10
){
migtxs
.
push
(
ulist
[
j
].
userAvatar
);
}
}
conversationList
[
i
].
migtxs
=
migtxs
;
conversationList
[
i
].
txlen
=
String
(
migtxs
.
length
);
this
.
$set
(
this
.
conversationListtwo
,
i
,
conversationList
[
i
]);
}
});
}
}
setTimeout
(()
=>
{
console
.
info
(
"
conversationListtwo
"
,
this
.
conversationListtwo
);
},
6000
)
}
}
}
...
...
pages/login/login.vue
View file @
4c44adb2
...
...
@@ -92,8 +92,11 @@
<
script
>
import
uniIcon
from
"
@/components/uni/uni-icon/uni-icon.vue
"
import
{
userLogin
,
userUpdatePassword
,
userSendSms
}
from
"
@/utils/api/api.js
"
;
import
showxieyi
from
"
@/components/showxieyi/showxieyi.vue
"
import
{
userLogin
,
userUpdatePassword
,
userSendSms
,
importShopAccount
}
from
"
@/utils/api/api.js
"
;
import
showxieyi
from
"
@/components/showxieyi/showxieyi.vue
"
console
.
info
(
"
importShopAccount
"
,
importShopAccount
);
export
default
{
components
:{
...
...
@@ -241,8 +244,8 @@
password
:
this
.
password
,
cid
:
cID
.
clientid
?
cID
.
clientid
:
''
});
this
.
$api
.
msg
(
res
);
// console.info('resaa1',res);
//
this.$api.msg(res);
if
(
res
.
code
==
0
){
//记住密码
...
...
@@ -261,7 +264,8 @@
uni
.
setStorageSync
(
'
token
'
,
tokens
);
this
.
$store
.
commit
(
'
changetoken
'
,
tokens
);
this
.
$store
.
commit
(
'
changeuserInfo
'
,
res
.
data
.
store
[
0
]);
uni
.
setStorageSync
(
'
userInfo
'
,
res
.
data
.
store
[
0
]);
uni
.
setStorageSync
(
'
userInfo
'
,
res
.
data
.
store
[
0
]);
this
.
importShopAccountfun
();
//去导账号
uni
.
switchTab
({
url
:
'
/pages/index/index
'
})
...
...
@@ -270,7 +274,7 @@
//有多个门店 需要切换
uni
.
setStorageSync
(
'
token
'
,
tokens
);
this
.
$store
.
commit
(
'
changetoken
'
,
tokens
);
this
.
importShopAccountfun
();
//去导账号
uni
.
setStorageSync
(
'
storelsit
'
,
res
.
data
.
store
);
uni
.
navigateTo
({
url
:
"
/pages/tagglestore/tagglestore?istologin=1
"
...
...
@@ -339,8 +343,19 @@
if
(
e
.
detail
.
value
.
length
==
0
){
this
.
ischecked
=
false
;
}
else
{
this
.
ischecked
=
true
;
this
.
ischecked
=
true
;
}
},
//导入账号信息
async
importShopAccountfun
(){
console
.
info
(
"
导入账号66
"
);
let
res
=
await
importShopAccount
({});
console
.
info
(
res
,
"
导入账号
"
);
if
(
res
.
code
==
0
){
}
}
}
}
...
...
store/Im_store.js
View file @
4c44adb2
...
...
@@ -129,9 +129,9 @@ const Im_store = {
//如果当前对话的人 和 给我发消息的人是一个人 就自动同步一波
if
(
store
.
state
.
dfuserId
==
result
.
msg
.
userId
)
{
store
.
dispatch
(
"
getC2CHistoryMessageList
"
,
{
msgId
:
""
}).
then
((
res
)
=>
{});
//去刷新聊天界面的消息
store
.
dispatch
(
"
getConversationList
"
,
{});
//刷新获取会话列表
store
.
dispatch
(
"
getConversationList
"
,
{})
.
then
(()
=>
{})
;
//刷新获取会话列表
}
else
{
store
.
dispatch
(
"
getConversationList
"
,
{});
//刷新获取会话列表
store
.
dispatch
(
"
getConversationList
"
,
{})
.
then
(()
=>
{})
;
//刷新获取会话列表
}
if
(
store
.
state
.
groupId
==
result
.
msg
.
groupId
){
...
...
@@ -500,8 +500,9 @@ const Im_store = {
//获取群成员列表 start
getGroupMemberList
(
store
,
obj
){
let
groupId
=
obj
.
groupId
?
obj
.
groupId
:
store
.
state
.
groupId
;
return
new
Promise
((
reslove
,
reject
)
=>
{
txIm
.
getGroupMemberList
({
"
groupId
"
:
store
.
state
.
groupId
,
"
filter
"
:
0
,
"
nextSeq
"
:
0
},
result
=>
{
txIm
.
getGroupMemberList
({
"
groupId
"
:
groupId
,
"
filter
"
:
0
,
"
nextSeq
"
:
0
},
result
=>
{
reslove
(
result
);
})
})
...
...
@@ -511,45 +512,48 @@ const Im_store = {
//获取会话列表
getConversationList
(
store
,
obj
)
{
txIm
.
getConversationList
({
nextSeq
:
0
,
count
:
99999
,
},
result
=>
{
let
conversationList
=
result
.
conversationList
;
//会话消息列表
let
Unread
=
0
;
//未读
conversationList
.
forEach
((
item
,
index
)
=>
{
Unread
+=
item
.
unreadCount
;
})
// console.info("未读总", Unread);
// console.info("conversationList",conversationList);
store
.
commit
(
"
setmyconversationList
"
,
conversationList
);
//更新会话列表
// let CornerIndex = 2;
// if (Unread > 0 && Unread <= 99) {
// uni.setTabBarBadge({
// index: CornerIndex,
// text: String(Unread),
// })
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(Unread);
// // #endif
// } else if (Unread > 0 && Unread > 99) {
// uni.setTabBarBadge({
// index: CornerIndex,
// text: "99",
// })
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(99);
// // #endif
// } else {
// uni.removeTabBarBadge({
// index: CornerIndex
// });
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(0);
// // #endif
// }
return
new
Promise
((
reslove
,
reject
)
=>
{
txIm
.
getConversationList
({
nextSeq
:
0
,
count
:
99999
,
},
result
=>
{
let
conversationList
=
result
.
conversationList
;
//会话消息列表
let
Unread
=
0
;
//未读
conversationList
.
forEach
((
item
,
index
)
=>
{
Unread
+=
item
.
unreadCount
;
})
// console.info("未读总", Unread);
// console.info("conversationList",conversationList);
store
.
commit
(
"
setmyconversationList
"
,
conversationList
);
//更新会话列表
reslove
(
result
);
// let CornerIndex = 2;
// if (Unread > 0 && Unread <= 99) {
// uni.setTabBarBadge({
// index: CornerIndex,
// text: String(Unread),
// })
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(Unread);
// // #endif
// } else if (Unread > 0 && Unread > 99) {
// uni.setTabBarBadge({
// index: CornerIndex,
// text: "99",
// })
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(99);
// // #endif
// } else {
// uni.removeTabBarBadge({
// index: CornerIndex
// });
// // #ifdef APP-PLUS
// plus.runtime.setBadgeNumber(0);
// // #endif
// }
})
})
},
//APP SDK funticon
...
...
@@ -563,7 +567,16 @@ const Im_store = {
//设置tag push is成功
});
// #endif
},
//批量获取指定用户的资料
geIMtUsersInfo
(
store
,
obj
){
return
new
Promise
((
reslove
,
reject
)
=>
{
txIm
.
getUsersInfo
({
userIdList
:
obj
.
userIdList
},
result
=>
{
reslove
(
result
)
})
});
}
}
}
export
default
Im_store
;
\ No newline at end of file
utils/api/api.js
View file @
4c44adb2
...
...
@@ -580,3 +580,9 @@ export function havepassword(data) {
export
function
getVoiceToken
(
data
)
{
return
request
.
post
(
'
store/getVoiceToken
'
,
data
,
{
noAuth
:
false
});
}
//导IM 聊天系统账号
export
function
importShopAccount
(
data
)
{
return
request
.
post
(
'
User/importShopAccount
'
,
data
,
{
noAuth
:
false
});
}
\ No newline at end of file
utils/debug.js
View file @
4c44adb2
...
...
@@ -5,8 +5,8 @@ module.exports = {
isdebug
:
false
,
//正式
//
isdebug:true,//测试
//
isdebug:false,//正式
isdebug
:
true
,
//测试
// xqdebug:false,//正式权限
xqdebug
:
true
,
//发布审核权限 也是测试环境的 主要用于ios
...
...
utils/request.js
View file @
4c44adb2
...
...
@@ -119,6 +119,7 @@ export default function request(api, method, data, {noAuth = false, noVerify = f
header
:
header
,
data
:
data
||
{},
success
:
(
res
)
=>
{
console
.
info
(
"
res
"
,
res
);
// uni.hideLoading();
if
(
noVerify
)
reslove
(
res
.
data
,
res
);
...
...
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