Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
broadcast_cloud
/
web-live
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
2
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
872f2ac4
authored
Jun 11, 2020
by
xiaolanchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品推荐 pc端回复聊天
parent
2a2bc3af
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
588 additions
and
24 deletions
+588
-24
assets/css/transition.css
+1
-1
components/modules-pc/chatBox/chatList/chatItem/chatText.vue
+25
-3
components/modules-pc/chatBox/chatList/chatList.vue
+55
-1
components/modules-pc/sendBox/img/icon-close.png
+0
-0
components/modules-pc/sendBox/index.vue
+72
-3
components/modules-vertical/shopBox/index.vue
+12
-2
components/modules-vertical/shopBox/shopHot/img/icon-close.png
+0
-0
components/modules-vertical/shopBox/shopHot/index.vue
+200
-0
components/modules-vertical/shopBox/shopList/index.vue
+10
-1
components/modules/menuBox/menuClass/chat/chat.vue
+3
-0
components/modules/menuBox/menuClass/chat/chatItem/chatText.vue
+1
-1
components/modules/menuBox/menuClass/shop.vue
+12
-1
components/modules/menuBox/menuClass/shop/hot.vue
+173
-0
components/modules/menuBox/menuClass/shop/img/icon-close.png
+0
-0
components/modules/menuBox/menuClass/shop/index.vue
+10
-1
components/view/mobile.vue
+1
-1
plugins/API/request.js
+4
-9
plugins/Mixin/dms.js
+9
-0
No files found.
assets/css/transition.css
View file @
872f2ac4
...
@@ -64,5 +64,5 @@
...
@@ -64,5 +64,5 @@
}
}
.scale-enter
,
.scale-enter
,
.scale-leave-to
{
.scale-leave-to
{
transform
:
scale
(
0
.5
)
;
transform
:
scale
(
0
)
!important
;
}
}
components/modules-pc/chatBox/chatList/chatItem/chatText.vue
View file @
872f2ac4
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
{{
info
.
userNick
}}
{{
info
.
userNick
}}
<div
class=
"isTop"
v-if=
"isTop"
>
置顶
</div>
<div
class=
"isTop"
v-if=
"isTop"
>
置顶
</div>
</div>
</div>
<div
class=
"content"
@
click=
"_reply(info.id, info.userNick)"
>
<div
class=
"content"
>
<div
class=
"text"
>
<div
class=
"text"
>
<template
v-if=
"info.replyContent"
>
<template
v-if=
"info.replyContent"
>
<div
class=
"quote"
>
<div
class=
"quote"
>
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
></div>
></div>
</div>
</div>
</div>
</div>
<div
class=
"reply-btn"
@
click=
"_reply(info.id, info.userNick, info.filterContent)"
>
回复
</div>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -60,10 +61,11 @@ export default {
...
@@ -60,10 +61,11 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
_reply
(
id
,
name
)
{
_reply
(
id
,
userNick
,
filterContent
)
{
let
obj
=
{
let
obj
=
{
id
:
id
,
id
:
id
,
name
:
name
userNick
:
userNick
,
filterContent
:
filterContent
};
};
this
.
$Bus
.
$emit
(
'bus-setReply'
,
obj
);
this
.
$Bus
.
$emit
(
'bus-setReply'
,
obj
);
}
}
...
@@ -102,6 +104,7 @@ export default {
...
@@ -102,6 +104,7 @@ export default {
}
}
}
}
.content
{
.content
{
margin-right
:
10px
;
position
:
relative
;
position
:
relative
;
padding
:
6px
12px
;
padding
:
6px
12px
;
display
:
inline-block
;
display
:
inline-block
;
...
@@ -134,6 +137,25 @@ export default {
...
@@ -134,6 +137,25 @@ export default {
}
}
}
}
}
}
.reply-btn
{
vertical-align
:
top
;
margin
:
5px
0
;
display
:
none
;
width
:
52px
;
height
:
32px
;
line-height
:
32px
;
text-align
:
center
;
border-radius
:
4px
;
background
:
#383940
;
font-size
:
16px
;
color
:
#409eff
;
cursor
:
pointer
;
}
&
:hover
{
.reply-btn
{
display
:
inline-block
;
}
}
}
}
}
}
</
style
>
</
style
>
components/modules-pc/chatBox/chatList/chatList.vue
View file @
872f2ac4
...
@@ -11,6 +11,12 @@
...
@@ -11,6 +11,12 @@
<div
class=
"chat-unread"
v-show=
"unreadChatNum"
>
<div
class=
"chat-unread"
v-show=
"unreadChatNum"
>
<span
@
click=
"_scrollBottom"
>
{{
unreadChatNum
}}
条消息未读
</span>
<span
@
click=
"_scrollBottom"
>
{{
unreadChatNum
}}
条消息未读
</span>
</div>
</div>
<transition
name=
"move-left"
>
<div
class=
"chat-reply"
v-show=
"replyChatId"
>
<span
class=
"title"
@
click=
"_scrollReply"
>
有人提到了我
</span>
<span
class=
"close"
@
click=
"_closeReply"
>
×
</span>
</div>
</transition>
</div>
</div>
</
template
>
</
template
>
...
@@ -30,7 +36,8 @@ export default {
...
@@ -30,7 +36,8 @@ export default {
page
:
1
,
page
:
1
,
num
:
50
,
num
:
50
,
list
:
[],
list
:
[],
unreadChatNum
:
0
unreadChatNum
:
0
,
replyChatId
:
''
};
};
},
},
computed
:
{
computed
:
{
...
@@ -118,6 +125,7 @@ export default {
...
@@ -118,6 +125,7 @@ export default {
this
.
list
.
unshift
(
chatObj
);
this
.
list
.
unshift
(
chatObj
);
}
else
{
}
else
{
this
.
list
.
push
(
chatObj
);
this
.
list
.
push
(
chatObj
);
this
.
chatReply
(
chatObj
);
this
.
_scrollKeep
();
this
.
_scrollKeep
();
}
}
if
(
this
.
list
.
length
>
250
)
{
if
(
this
.
list
.
length
>
250
)
{
...
@@ -152,6 +160,28 @@ export default {
...
@@ -152,6 +160,28 @@ export default {
let
listHeigth
=
chatListDom
.
clientHeight
;
let
listHeigth
=
chatListDom
.
clientHeight
;
chatListBoxDom
.
scrollTop
=
listHeigth
;
chatListBoxDom
.
scrollTop
=
listHeigth
;
}
}
},
chatReply
(
obj
)
{
if
(
this
.
replyChatId
||
!
obj
.
replyOpenUid
)
{
return
false
;
}
if
(
obj
.
replyOpenUid
===
this
.
userInfo
.
openUid
)
{
this
.
replyChatId
=
obj
.
id
;
}
},
_scrollReply
()
{
let
id
=
this
.
replyChatId
;
let
el
=
document
.
querySelectorAll
(
`[data-chatid="
${
id
}
"]`
)[
0
];
if
(
!
el
)
{
this
.
_scrollBottom
();
return
false
;
}
let
scrollTop
=
el
.
offsetTop
;
this
.
$refs
.
chatListBox
.
scrollTop
=
scrollTop
;
this
.
_closeReply
();
},
_closeReply
()
{
this
.
replyChatId
=
''
;
}
}
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
@@ -167,6 +197,8 @@ export default {
...
@@ -167,6 +197,8 @@ export default {
height
:
100%
;
height
:
100%
;
}
}
.list-box
{
.list-box
{
position
:
relative
;
z-index
:
0
;
height
:
100%
;
height
:
100%
;
width
:
100%
;
width
:
100%
;
overflow-y
:
auto
;
overflow-y
:
auto
;
...
@@ -213,4 +245,26 @@ export default {
...
@@ -213,4 +245,26 @@ export default {
color
:
#fff
;
color
:
#fff
;
}
}
}
}
.chat-reply
{
position
:
absolute
;
bottom
:
10px
;
left
:
10px
;
z-index
:
1
;
padding
:
5px
10px
;
line-height
:
20px
;
background-color
:
var
(
--main-color
);
border-radius
:
4px
;
font-size
:
14px
;
.title
{
color
:
#fff
;
}
.close
{
display
:
inline-block
;
vertical-align
:
top
;
margin-left
:
5px
;
font-size
:
18px
;
color
:
#333
;
cursor
:
pointer
;
}
}
</
style
>
</
style
>
components/modules-pc/sendBox/img/icon-close.png
0 → 100644
View file @
872f2ac4
715 Bytes
components/modules-pc/sendBox/index.vue
View file @
872f2ac4
<
template
>
<
template
>
<div
class=
"send-box"
>
<div
class=
"send-box"
>
<div
class=
"chat-reply"
v-if=
"chatReplyObj.id"
>
<span>
{{
chatReplyObj
.
userNick
}}
:
</span>
<span
:title=
"chatReplyObj.filterContent"
v-html=
"$options.filters.emojiParse(chatReplyObj.filterContent)"
></span>
<span
class=
"close"
@
click=
"_remReplay"
></span>
</div>
<div
class=
"send-content"
>
<div
class=
"send-content"
>
<div
class=
"disabled"
v-if=
"channelInfo.chatDisable"
>
全员禁言中
</div>
<div
class=
"disabled"
v-if=
"channelInfo.chatDisable"
>
全员禁言中
</div>
<div
class=
"disabled"
v-else-if=
"userInfo.isDisableChat == 1"
>
<div
class=
"disabled"
v-else-if=
"userInfo.isDisableChat == 1"
>
...
@@ -10,7 +18,7 @@
...
@@ -10,7 +18,7 @@
v-else-if=
"allowChat"
v-else-if=
"allowChat"
maxlength=
"100"
maxlength=
"100"
v-model=
"content"
v-model=
"content"
placeholder=
"我也要说点什么
"
:placeholder=
"chatReplyObj.userNick ? `回复$
{chatReplyObj.userNick}` : '我也要说点什么'
"
>
</textarea>
>
</textarea>
<div
class=
"login"
v-else
>
<div
class=
"login"
v-else
>
<span
@
click=
"_isDisabled()"
>
登录
</span>
<span
@
click=
"_isDisabled()"
>
登录
</span>
...
@@ -49,7 +57,12 @@ export default {
...
@@ -49,7 +57,12 @@ export default {
return
{
return
{
showEmoji
:
false
,
showEmoji
:
false
,
sendDate
:
0
,
sendDate
:
0
,
content
:
''
content
:
''
,
chatReplyObj
:
{
id
:
''
,
userNick
:
''
,
filterContent
:
''
}
};
};
},
},
computed
:
{
computed
:
{
...
@@ -65,7 +78,26 @@ export default {
...
@@ -65,7 +78,26 @@ export default {
}
}
}
}
},
},
mounted
()
{
this
.
$Bus
.
$on
(
'bus-setReply'
,
this
.
_setReply
);
},
methods
:
{
methods
:
{
_setReply
(
obj
)
{
if
(
!
this
.
_isDisabled
(
true
))
{
this
.
chatReplyObj
=
{
id
:
obj
.
id
,
userNick
:
obj
.
userNick
,
filterContent
:
obj
.
filterContent
};
}
},
_remReplay
()
{
this
.
chatReplyObj
=
{
id
:
''
,
userNick
:
''
,
filterContent
:
''
};
},
// 发送聊天
// 发送聊天
async
_sendChat
()
{
async
_sendChat
()
{
this
.
showEmoji
=
false
;
this
.
showEmoji
=
false
;
...
@@ -84,11 +116,12 @@ export default {
...
@@ -84,11 +116,12 @@ export default {
const
res
=
await
sendChat
({
const
res
=
await
sendChat
({
uin
:
this
.
channelInfo
.
uin
,
uin
:
this
.
channelInfo
.
uin
,
channelId
:
this
.
channelInfo
.
id
,
channelId
:
this
.
channelInfo
.
id
,
replyId
:
''
,
replyId
:
this
.
chatReplyObj
.
id
,
content
:
this
.
content
.
trim
()
content
:
this
.
content
.
trim
()
});
});
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
this
.
content
=
''
;
this
.
content
=
''
;
this
.
_remReplay
();
if
(
res
.
data
.
chatAuthModel
===
1
)
{
if
(
res
.
data
.
chatAuthModel
===
1
)
{
this
.
$layer
.
msg
(
'已提交审核,请耐心等待'
);
this
.
$layer
.
msg
(
'已提交审核,请耐心等待'
);
}
}
...
@@ -171,6 +204,9 @@ export default {
...
@@ -171,6 +204,9 @@ export default {
}
}
}
}
}
}
},
beforeDestroy
()
{
this
.
$Bus
.
$off
(
'bus-setReply'
,
this
.
_setReply
);
}
}
};
};
</
script
>
</
script
>
...
@@ -245,5 +281,38 @@ export default {
...
@@ -245,5 +281,38 @@ export default {
cursor
:
pointer
;
cursor
:
pointer
;
}
}
}
}
.chat-reply
{
position
:
absolute
;
top
:
-40px
;
left
:
0
;
padding
:
5px
30px
5px
12px
;
width
:
100%
;
height
:
35px
;
line-height
:
25px
;
background
:
#27282e
;
font-size
:
16px
;
color
:
rgba
(
255
,
255
,
255
,
0.5
);
border-radius
:
8px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
::v-deep
{
.emoji
{
display
:
inline-block
;
vertical-align
:
middle
;
width
:
24px
;
height
:
24px
;
}
}
.close
{
position
:
absolute
;
right
:
10px
;
top
:
5px
;
width
:
25px
;
height
:
25px
;
background
:
url(./img/icon-close.png)
no-repeat
center
center
/
60%
auto
;
cursor
:
pointer
;
}
}
}
}
</
style
>
</
style
>
components/modules-vertical/shopBox/index.vue
View file @
872f2ac4
...
@@ -11,15 +11,20 @@
...
@@ -11,15 +11,20 @@
</div>
</div>
</div>
</div>
</transition>
</transition>
<div
class=
"shop-hot-box"
>
<shop-hot></shop-hot>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
shopList
from
'./shopList/index'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
import
shopList
from
'./shopList/index'
;
import
shopHot
from
'./shopHot/index'
;
export
default
{
export
default
{
name
:
'vertical-shop-box'
,
name
:
'vertical-shop-box'
,
components
:
{
components
:
{
shopList
shopList
,
shopHot
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -79,4 +84,9 @@ export default {
...
@@ -79,4 +84,9 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
}
}
}
}
.shop-hot-box
{
position
:
absolute
;
bottom
:
100%
;
right
:
0
;
}
</
style
>
</
style
>
components/modules-vertical/shopBox/shopHot/img/icon-close.png
0 → 100644
View file @
872f2ac4
715 Bytes
components/modules-vertical/shopBox/shopHot/index.vue
0 → 100644
View file @
872f2ac4
<
template
>
<transition
name=
"scale"
mode=
"out-in"
>
<div
class=
"shop-hot"
v-if=
"info.id"
:key=
"info.id"
>
<div
class=
"top"
>
宝贝上架了,快来抢~
<div
class=
"close"
@
click=
"close"
></div>
</div>
<div
class=
"body"
>
<div
class=
"img-box"
>
<img
:src=
"`$
{info.real_img}?x-oss-process=style/commodity_cover`" alt="" />
</div>
<div
class=
"content"
>
<div
class=
"name"
>
{{
info
.
name
}}
</div>
<div
class=
"price-box"
>
¥
{{
info
.
price
}}
</div>
<div
class=
"pay"
>
<div
class=
"type"
>
<div
class=
"tag"
v-if=
"info.type == 2"
>
{{
info
.
source
==
1
?
'外链'
:
info
.
source
==
2
?
'口令'
:
''
}}
</div>
</div>
<div
class=
"btn"
@
click=
"buyShop(info)"
>
去看看
</div>
</div>
</div>
</div>
</div>
</transition>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
;
export
default
{
name
:
'vertical-shop-hot'
,
data
()
{
return
{
info
:
{}
};
},
computed
:
{
...
mapGetters
({
channelInfo
:
'channelInfo'
})
},
mounted
()
{
this
.
$Bus
.
$on
(
'bus-addShopHot'
,
this
.
addShopHot
);
this
.
$Bus
.
$on
(
'bus-setShopHot'
,
this
.
addShop
);
this
.
$Bus
.
$off
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$on
(
'bus-delShopHot'
,
this
.
delShop
);
},
methods
:
{
addShopHot
(
info
)
{
this
.
info
=
info
;
},
addShop
(
data
)
{
let
{
type
,
includeId
,
goodInfo
}
=
data
;
if
(
type
===
2
&&
this
.
channelInfo
.
id
===
Number
(
includeId
))
{
this
.
info
=
goodInfo
;
}
},
editShop
(
data
)
{
let
{
type
,
includeId
,
goodInfo
}
=
data
;
if
(
type
===
2
&&
this
.
channelInfo
.
id
===
Number
(
includeId
))
{
if
(
Number
(
this
.
info
.
id
)
===
Number
(
goodInfo
.
id
))
{
this
.
info
=
goodInfo
;
}
}
},
delShop
(
data
)
{
let
{
type
,
includeId
,
goodInfo
}
=
data
;
if
(
type
===
2
&&
this
.
channelInfo
.
id
===
Number
(
includeId
))
{
if
(
Number
(
this
.
info
.
id
)
===
Number
(
goodInfo
.
id
))
{
this
.
info
=
{};
}
}
},
buyShop
()
{
this
.
$Bus
.
$emit
(
'bus-buyShop'
,
this
.
info
);
},
close
()
{
this
.
info
=
{};
}
},
beforeDestroy
()
{
this
.
$Bus
.
$off
(
'bus-addShopHot'
,
this
.
addShopHot
);
this
.
$Bus
.
$off
(
'bus-setShopHot'
,
this
.
addShop
);
this
.
$Bus
.
$off
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$off
(
'bus-delShopHot'
,
this
.
delShop
);
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.shop-hot
{
position
:
relative
;
margin-bottom
:
0.08rem
;
width
:
2.35rem
;
height
:
0.96rem
;
background-color
:
#fff
;
border-radius
:
0.04rem
;
transform-origin
:
calc
(
100%
-
0.18rem
)
100%
;
transform
:
scale
(
1
);
&::after
{
content
:
''
;
display
:
block
;
position
:
absolute
;
right
:
0.12rem
;
bottom
:
-0.12rem
;
border-width
:
0.06rem
;
border-style
:
solid
;
border-color
:
#fff
transparent
transparent
transparent
;
}
.top
{
position
:
relative
;
padding
:
0
0.08rem
;
height
:
0.18rem
;
line-height
:
0.18rem
;
background-color
:
#ffefd5
;
border-radius
:
0.04rem
0.04rem
0
0
;
font-size
:
0.1rem
;
color
:
#ff9918
;
.close
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
0.18rem
;
height
:
0.18rem
;
background
:
url(./img/icon-close.png)
no-repeat
center
center
;
background-size
:
0.14rem
auto
;
}
}
.body
{
height
:
0.78rem
;
display
:
flex
;
align-items
:
center
;
.img-box
{
margin-left
:
0.08rem
;
margin-right
:
0.04rem
;
width
:
0.6rem
;
height
:
0.6rem
;
border-radius
:
0.04rem
;
img
{
display
:
block
;
width
:
100%
;
height
:
100%
;
}
}
.content
{
padding
:
0.06rem
0.04rem
;
flex
:
1
;
width
:
0
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
.name
{
flex
:
0
0
auto
;
height
:
0.2rem
;
line-height
:
0.2rem
;
font-size
:
0.12rem
;
color
:
#26242d
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.price-box
{
flex
:
1
;
height
:
0.2rem
;
line-height
:
0.2rem
;
color
:
#e9355f
;
font-size
:
0.14rem
;
}
.pay
{
flex
:
0
0
auto
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.type
{
.tag
{
display
:
inline-block
;
padding
:
0
0.06rem
;
line-height
:
0.18rem
;
border-radius
:
0.02rem
;
border
:
0.01rem
solid
#feebf1
;
font-size
:
0.12rem
;
color
:
#e9355f
;
}
}
.btn
{
display
:
inline-block
;
width
:
0.72rem
;
height
:
0.26rem
;
line-height
:
0.26rem
;
text-align
:
center
;
background
:
linear-gradient
(
#ff7a9b
,
#ff366a
);
color
:
#fff
;
font-size
:
0.12rem
;
border-radius
:
0.15rem
;
}
}
}
}
}
</
style
>
components/modules-vertical/shopBox/shopList/index.vue
View file @
872f2ac4
...
@@ -87,6 +87,7 @@ export default {
...
@@ -87,6 +87,7 @@ export default {
this
.
$Bus
.
$on
(
'bus-addShop'
,
this
.
addShop
);
this
.
$Bus
.
$on
(
'bus-addShop'
,
this
.
addShop
);
this
.
$Bus
.
$on
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$on
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$on
(
'bus-delShop'
,
this
.
delShop
);
this
.
$Bus
.
$on
(
'bus-delShop'
,
this
.
delShop
);
this
.
$Bus
.
$on
(
'bus-buyShop'
,
this
.
_showDetails
);
},
},
methods
:
{
methods
:
{
async
getList
()
{
async
getList
()
{
...
@@ -96,7 +97,14 @@ export default {
...
@@ -96,7 +97,14 @@ export default {
type
:
2
type
:
2
});
});
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
this
.
list
=
res
.
data
.
list
||
[];
let
{
list
}
=
res
.
data
;
this
.
list
=
list
||
[];
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
isTop
)
{
this
.
$Bus
.
$emit
(
'bus-addShopHot'
,
list
[
i
]);
return
false
;
}
}
}
else
{
}
else
{
this
.
$layer
.
msg
(
res
.
errorMessage
);
this
.
$layer
.
msg
(
res
.
errorMessage
);
}
}
...
@@ -148,6 +156,7 @@ export default {
...
@@ -148,6 +156,7 @@ export default {
this
.
$Bus
.
$off
(
'bus-addShop'
,
this
.
addShop
);
this
.
$Bus
.
$off
(
'bus-addShop'
,
this
.
addShop
);
this
.
$Bus
.
$off
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$off
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$off
(
'bus-delShop'
,
this
.
delShop
);
this
.
$Bus
.
$off
(
'bus-delShop'
,
this
.
delShop
);
this
.
$Bus
.
$off
(
'bus-buyShop'
,
this
.
_showDetails
);
}
}
};
};
</
script
>
</
script
>
...
...
components/modules/menuBox/menuClass/chat/chat.vue
View file @
872f2ac4
...
@@ -241,6 +241,8 @@ export default {
...
@@ -241,6 +241,8 @@ export default {
height
:
100%
;
height
:
100%
;
}
}
.list-box
{
.list-box
{
position
:
relative
;
z-index
:
0
;
height
:
100%
;
height
:
100%
;
width
:
100%
;
width
:
100%
;
overflow-y
:
auto
;
overflow-y
:
auto
;
...
@@ -291,6 +293,7 @@ export default {
...
@@ -291,6 +293,7 @@ export default {
margin-left
:
0.03rem
;
margin-left
:
0.03rem
;
font-size
:
0.16rem
;
font-size
:
0.16rem
;
color
:
#333
;
color
:
#333
;
cursor
:
pointer
;
}
}
}
}
</
style
>
</
style
>
components/modules/menuBox/menuClass/chat/chatItem/chatText.vue
View file @
872f2ac4
...
@@ -129,7 +129,7 @@ export default {
...
@@ -129,7 +129,7 @@ export default {
}
}
.quote
{
.quote
{
padding
:
0.05rem
0
;
padding
:
0.05rem
0
;
border-bottom
:
0.1rem
solid
#e0e0e0
;
border-bottom
:
0.
0
1rem
solid
#e0e0e0
;
color
:
#999
;
color
:
#999
;
}
}
.reply
{
.reply
{
...
...
components/modules/menuBox/menuClass/shop.vue
View file @
872f2ac4
<
template
>
<
template
>
<div
class=
"shop"
>
<div
class=
"shop"
>
<shop-list
:menuId=
"menuId"
></shop-list>
<shop-list
:menuId=
"menuId"
></shop-list>
<div
class=
"shop-hot-box"
v-transfer-dom=
"'#menu-list-box'"
>
<shop-hot
:menuId=
"menuId"
></shop-hot>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
shopList
from
'./shop/index'
;
import
shopList
from
'./shop/index'
;
import
shopHot
from
'./shop/hot'
;
export
default
{
export
default
{
name
:
'menu-shop-box'
,
name
:
'menu-shop-box'
,
components
:
{
components
:
{
shopList
shopList
,
shopHot
},
},
props
:
{
props
:
{
menuId
:
{}
menuId
:
{}
...
@@ -27,4 +32,10 @@ export default {
...
@@ -27,4 +32,10 @@ export default {
position
:
relative
;
position
:
relative
;
height
:
100%
;
height
:
100%
;
}
}
.shop-hot-box
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
}
</
style
>
</
style
>
components/modules/menuBox/menuClass/shop/hot.vue
0 → 100644
View file @
872f2ac4
<
template
>
<transition
name=
"move-right-left"
mode=
"out-in"
>
<div
class=
"shop-hot"
v-if=
"info.id"
:key=
"info.id"
>
<div
class=
"img-box"
>
<img
:src=
"`$
{info.real_img}?x-oss-process=style/commodity_cover`" alt="" />
</div>
<div
class=
"content"
>
<div
class=
"name"
>
{{
info
.
name
}}
</div>
<div
class=
"type"
v-if=
"info.type == 2"
>
<div
class=
"tag"
>
{{
info
.
source
==
1
?
'外链'
:
info
.
source
==
2
?
'口令'
:
''
}}
</div>
</div>
<div
class=
"price-box"
>
<span
class=
"price"
>
¥
{{
info
.
price
}}
</span>
<span
class=
"shop_price"
>
¥
{{
info
.
shop_price
}}
</span>
</div>
</div>
<div
class=
"pay"
>
<div
class=
"btn"
@
click=
"buyShop(info)"
>
去看看
</div>
</div>
<div
class=
"close"
@
click=
"close"
></div>
</div>
</transition>
</
template
>
<
script
>
export
default
{
name
:
'shop-hot'
,
props
:
{
menuId
:
{}
},
data
()
{
return
{
info
:
{}
};
},
mounted
()
{
this
.
$Bus
.
$on
(
'bus-addShopHot'
,
this
.
addShopHot
);
this
.
$Bus
.
$on
(
'bus-setShopHot'
,
this
.
addShop
);
this
.
$Bus
.
$off
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$on
(
'bus-delShopHot'
,
this
.
delShop
);
},
methods
:
{
addShopHot
(
info
)
{
this
.
info
=
info
;
},
addShop
(
data
)
{
let
{
type
,
includeId
,
goodInfo
}
=
data
;
if
(
type
===
1
&&
this
.
menuId
===
Number
(
includeId
))
{
this
.
info
=
goodInfo
;
}
},
editShop
(
data
)
{
let
{
type
,
includeId
,
goodInfo
}
=
data
;
if
(
type
===
1
&&
this
.
menuId
===
Number
(
includeId
))
{
if
(
Number
(
this
.
info
.
id
)
===
Number
(
goodInfo
.
id
))
{
this
.
info
=
goodInfo
;
}
}
},
delShop
(
data
)
{
let
{
type
,
includeId
,
goodInfo
}
=
data
;
if
(
type
===
1
&&
this
.
menuId
===
Number
(
includeId
))
{
if
(
Number
(
this
.
info
.
id
)
===
Number
(
goodInfo
.
id
))
{
this
.
info
=
{};
}
}
},
buyShop
()
{
this
.
$Bus
.
$emit
(
'bus-buyShop'
,
this
.
info
);
},
close
()
{
this
.
info
=
{};
}
},
beforeDestroy
()
{
this
.
$Bus
.
$off
(
'bus-addShopHot'
,
this
.
addShopHot
);
this
.
$Bus
.
$off
(
'bus-setShopHot'
,
this
.
addShop
);
this
.
$Bus
.
$off
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$off
(
'bus-delShopHot'
,
this
.
delShop
);
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.shop-hot
{
position
:
relative
;
padding
:
0.04rem
0.12rem
;
display
:
flex
;
align-items
:
center
;
height
:
0.7rem
;
background
:
#fff
;
.img-box
{
margin-right
:
0.12rem
;
width
:
0.52rem
;
height
:
0.52rem
;
border-radius
:
0.04rem
;
img
{
display
:
block
;
width
:
100%
;
height
:
100%
;
}
}
.content
{
flex
:
1
;
width
:
0
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
.name
{
flex
:
0
0
auto
;
height
:
0.2rem
;
line-height
:
0.2rem
;
font-size
:
0.12rem
;
color
:
#26242d
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.type
{
flex
:
1
;
.tag
{
display
:
inline-block
;
padding
:
0
0.06rem
;
line-height
:
0.18rem
;
border-radius
:
0.02rem
;
border
:
0.01rem
solid
#feebf1
;
font-size
:
0.12rem
;
color
:
#e9355f
;
}
}
.price-box
{
flex
:
0
0
auto
;
height
:
0.2rem
;
line-height
:
0.2rem
;
.price
{
color
:
#e9355f
;
font-size
:
0.14rem
;
}
.shop_price
{
text-decoration
:
line-through
;
color
:
#999999
;
font-size
:
0.11rem
;
}
}
}
.pay
{
position
:
absolute
;
bottom
:
0.04rem
;
right
:
0.04rem
;
.btn
{
display
:
inline-block
;
width
:
0.72rem
;
height
:
0.26rem
;
line-height
:
0.26rem
;
text-align
:
center
;
background
:
linear-gradient
(
#ff7a9b
,
#ff366a
);
color
:
#fff
;
font-size
:
0.12rem
;
border-radius
:
0.15rem
;
}
}
.close
{
position
:
absolute
;
top
:
0
;
right
:
0
;
width
:
0.18rem
;
height
:
0.18rem
;
background
:
url(./img/icon-close.png)
no-repeat
center
center
;
background-size
:
0.14rem
auto
;
}
}
</
style
>
components/modules/menuBox/menuClass/shop/img/icon-close.png
0 → 100644
View file @
872f2ac4
715 Bytes
components/modules/menuBox/menuClass/shop/index.vue
View file @
872f2ac4
...
@@ -87,6 +87,7 @@ export default {
...
@@ -87,6 +87,7 @@ export default {
this
.
$Bus
.
$on
(
'bus-addShop'
,
this
.
addShop
);
this
.
$Bus
.
$on
(
'bus-addShop'
,
this
.
addShop
);
this
.
$Bus
.
$on
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$on
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$on
(
'bus-delShop'
,
this
.
delShop
);
this
.
$Bus
.
$on
(
'bus-delShop'
,
this
.
delShop
);
this
.
$Bus
.
$on
(
'bus-buyShop'
,
this
.
_showDetails
);
},
},
methods
:
{
methods
:
{
async
getList
()
{
async
getList
()
{
...
@@ -96,7 +97,14 @@ export default {
...
@@ -96,7 +97,14 @@ export default {
type
:
1
type
:
1
});
});
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
if
(
res
.
code
===
200
&&
res
.
errorCode
===
0
)
{
this
.
list
=
res
.
data
.
list
||
[];
let
{
list
}
=
res
.
data
;
this
.
list
=
list
||
[];
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
isTop
)
{
this
.
$Bus
.
$emit
(
'bus-addShopHot'
,
list
[
i
]);
return
false
;
}
}
}
else
{
}
else
{
this
.
$layer
.
msg
(
res
.
errorMessage
);
this
.
$layer
.
msg
(
res
.
errorMessage
);
}
}
...
@@ -148,6 +156,7 @@ export default {
...
@@ -148,6 +156,7 @@ export default {
this
.
$Bus
.
$off
(
'bus-addShop'
,
this
.
addShop
);
this
.
$Bus
.
$off
(
'bus-addShop'
,
this
.
addShop
);
this
.
$Bus
.
$off
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$off
(
'bus-editShop'
,
this
.
editShop
);
this
.
$Bus
.
$off
(
'bus-delShop'
,
this
.
delShop
);
this
.
$Bus
.
$off
(
'bus-delShop'
,
this
.
delShop
);
this
.
$Bus
.
$off
(
'bus-buyShop'
,
this
.
_showDetails
);
}
}
};
};
</
script
>
</
script
>
...
...
components/view/mobile.vue
View file @
872f2ac4
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<advert-text
v-if=
"isAdText"
></advert-text>
<advert-text
v-if=
"isAdText"
></advert-text>
</div>
</div>
<div
class=
"content-box"
@
touchmove
.
stop
>
<div
class=
"content-box"
@
touchmove
.
stop
>
<div
class=
"menu-list-box"
>
<div
class=
"menu-list-box"
id=
"menu-list-box"
>
<menu-list
v-model=
"menuActive"
></menu-list>
<menu-list
v-model=
"menuActive"
></menu-list>
</div>
</div>
<red-box></red-box>
<red-box></red-box>
...
...
plugins/API/request.js
View file @
872f2ac4
...
@@ -7,6 +7,7 @@ const arms = process.client ? require('@/plugins/arms') : false;
...
@@ -7,6 +7,7 @@ const arms = process.client ? require('@/plugins/arms') : false;
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
timeout
:
1000
*
10
,
timeout
:
1000
*
10
,
withCredentials
:
false
,
withCredentials
:
false
,
baseURL
:
'https://apiliveroom.dev.guangdianyun.tv/v1'
,
headers
:
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
'Content-Type'
:
'application/x-www-form-urlencoded'
,
'X-Ca-Stage'
:
process
.
env
.
X_CA_STAGE
'X-Ca-Stage'
:
process
.
env
.
X_CA_STAGE
...
@@ -66,26 +67,20 @@ service.interceptors.response.use(
...
@@ -66,26 +67,20 @@ service.interceptors.response.use(
};
};
}
}
);
);
const
selectPath
=
()
=>
{
return
'https://apiliveroom.dev.guangdianyun.tv/v1'
;
};
const
get
=
(
url
,
params
,
config
=
{})
=>
{
const
get
=
(
url
,
params
,
config
=
{})
=>
{
let
complete
=
/^http/
.
test
(
url
);
let
nUrl
=
complete
?
url
:
`
${
selectPath
()}${
url
}
`
;
let
default_config
=
{
let
default_config
=
{
method
:
'get'
,
method
:
'get'
,
url
:
nU
rl
,
url
:
u
rl
,
params
:
params
,
params
:
params
,
...
config
...
config
};
};
return
service
(
default_config
);
return
service
(
default_config
);
};
};
const
post
=
(
url
,
data
,
config
=
{})
=>
{
const
post
=
(
url
,
data
,
config
=
{})
=>
{
let
complete
=
/^http/
.
test
(
url
);
let
nUrl
=
complete
?
url
:
`
${
selectPath
()}${
url
}
`
;
let
default_config
=
{
let
default_config
=
{
method
:
'post'
,
method
:
'post'
,
url
:
nU
rl
,
url
:
u
rl
,
data
:
qs
.
stringify
(
data
),
data
:
qs
.
stringify
(
data
),
...
config
...
config
};
};
...
...
plugins/Mixin/dms.js
View file @
872f2ac4
...
@@ -276,6 +276,7 @@ const mixin = {
...
@@ -276,6 +276,7 @@ const mixin = {
}
}
return
false
;
return
false
;
}
}
console
.
log
(
data
);
if
(
data
.
cmd
===
'deleteShop'
)
{
if
(
data
.
cmd
===
'deleteShop'
)
{
this
.
$Bus
.
$emit
(
'bus-delShop'
,
data
);
this
.
$Bus
.
$emit
(
'bus-delShop'
,
data
);
return
false
;
return
false
;
...
@@ -292,6 +293,14 @@ const mixin = {
...
@@ -292,6 +293,14 @@ const mixin = {
this
.
$Bus
.
$emit
(
'bus-delShop'
,
data
);
this
.
$Bus
.
$emit
(
'bus-delShop'
,
data
);
return
false
;
return
false
;
}
}
if
(
data
.
cmd
===
'setTopShop'
)
{
this
.
$Bus
.
$emit
(
'bus-setShopHot'
,
data
);
return
false
;
}
if
(
data
.
cmd
===
'cancelTopShop'
)
{
this
.
$Bus
.
$emit
(
'bus-delShopHot'
,
data
);
return
false
;
}
},
},
_dmsAudience
(
data
)
{
_dmsAudience
(
data
)
{
let
ids
=
data
.
ids
.
map
(
x
=>
Number
(
x
));
let
ids
=
data
.
ids
.
map
(
x
=>
Number
(
x
));
...
...
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