Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e15cf7a4
authored
Aug 23, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
直播
1 parent
b28fb015
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
49 deletions
public/index.html
src/assets/css/crowdfunding.scss
src/views/crowdfunding/index.vue
vue.config.js
public/index.html
View file @
e15cf7a
...
...
@@ -23,6 +23,9 @@
<script
src=
"<%= htmlWebpackPlugin.options.cdn.js[i] %>"
></script>
<
% } %>
<!-- built files will be auto injected -->
<!-- <link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/tcplayer.min.css" rel="stylesheet">
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/libs/hls.min.0.13.2m.js"></script>
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.0/tcplayer.v4.5.0.min.js"></script> -->
</body>
</html>
\ No newline at end of file
src/assets/css/crowdfunding.scss
View file @
e15cf7a
...
...
@@ -66,6 +66,7 @@
flex-direction
:
column
;
justify-content
:
center
;
}
.order-move
{
animation
:
move-btn
1
.5s
infinite
cubic-bezier
(
.36
,
.07
,
.19
,
.97
)
both
;
}
...
...
@@ -280,6 +281,7 @@
position
:
relative
;
margin-bottom
:
14px
;
justify-content
:
space-between
;
span
{
color
:
#FC5B32
;
font-size
:
24px
;
...
...
@@ -383,4 +385,27 @@
padding-top
:
30px
;
font-size
:
12px
;
}
}
\ No newline at end of file
}
.live-box
{
position
:
fixed
;
top
:
10%
;
right
:
10%
;
z-index
:
7
;
width
:
150px
;
height
:
300px
;
.mask
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
z-index
:
2
;
}
#player-container-id
{
width
:
100%
;
height
:
100%
;
}
}
src/views/crowdfunding/index.vue
View file @
e15cf7a
<
template
>
<div
class=
"layout"
>
<div
class=
"live-box "
ref=
"b"
>
<div
class=
"mask"
@
click=
"openFullscreen"
></div>
<video
id=
"player-container-id"
preload=
"auto"
playsinline
webkit-playsinline
>
</video>
</div>
<div
class=
"to-top"
v-show=
"scrollY > 300"
...
...
@@ -268,7 +282,8 @@ export default {
audioFlag
:
false
,
carInfoKey
:
Date
.
now
(),
showOrderBtn
:
false
,
userOff
:
null
userOff
:
null
,
player
:
null
}
}
,
beforeRouteEnter
(
to
,
from
,
next
)
{
...
...
@@ -298,6 +313,13 @@ export default {
wxConfig
.
init
(
jsApiList
).
then
(()
=>
{
wxConfig
.
ready
(()
=>
{
this
.
getActivityDetail
()
this
.
player
=
TCPlayer
(
"player-container-id"
,
{
// fileID: "387702304976042167",
// appID: "1311227058",
controls
:
false
,
autoplay
:
true
}
)
this
.
player
.
src
(
'webrtc://play.glsx.com.cn/live/live'
)
}
)
}
)
window
.
addEventListener
(
'scroll'
,
_this
.
debounce
(()
=>
{
...
...
@@ -480,6 +502,13 @@ export default {
let
{
customerServerUrl
}
=
this
.
detail
if
(
!
customerServerUrl
)
this
.
showKf
=
true
else
window
.
location
.
href
=
customerServerUrl
}
,
openFullscreen
()
{
// this.player.requestFullscreen()
this
.
$refs
.
b
.
style
.
width
=
'100vw'
this
.
$refs
.
b
.
style
.
height
=
'100vh'
this
.
$refs
.
b
.
style
.
top
=
'0'
this
.
$refs
.
b
.
style
.
right
=
'0'
}
}
}
...
...
vue.config.js
View file @
e15cf7a
...
...
@@ -4,37 +4,29 @@ const defaultSettings = require('./src/config/conf.js')
const
BundleAnalyzerPlugin
=
require
(
'webpack-bundle-analyzer'
).
BundleAnalyzerPlugin
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
)
// page title
// page title
const
name
=
defaultSettings
.
title
||
'vue mobile template'
// 生产环境,测试和正式
// 生产环境,测试和正式
const
IS_PROD
=
[
'production'
,
'prod'
].
includes
(
process
.
env
.
NODE_ENV
)
// externals
// const externals = {
// vue: 'Vue',
// 'vue-router': 'VueRouter',
// vuex: 'Vuex',
// vant: 'vant',
// axios: 'axios'
// }
// CDN外链,会插入到index.html中
// const cdn = {
// // 开发环境
// dev: {
// css: [],
// js: []
// },
// // 生产环境
// build: {
// css: ['https://cdn.jsdelivr.net/npm/vant@2.4.7/lib/index.css'],
// js: [
// 'https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
// 'https://cdn.jsdelivr.net/npm/vue-router@3.1.5/dist/vue-router.min.js',
// 'https://cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js',
// 'https://cdn.jsdelivr.net/npm/vuex@3.1.2/dist/vuex.min.js',
// 'https://cdn.jsdelivr.net/npm/vant@2.4.7/lib/index.min.js'
// ]
// }
// }
// externals
// const externals = {
// vue: 'Vue',
// 'vue-router': 'VueRouter',
// vuex: 'Vuex',
// vant: 'vant',
// axios: 'axios'
// }
// CDN外链,会插入到index.html中
const
cdn
=
{
// 开发环境
css
:
[
'https://web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/tcplayer.min.css'
],
js
:
[
'https://web.sdk.qcloud.com/player/tcplayer/release/v4.2.1/libs/hls.min.0.13.2m.js'
,
'https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.0/tcplayer.v4.5.0.min.js'
]
}
/**
* 雪碧图插件
...
...
@@ -61,7 +53,7 @@ module.exports = {
disableHostCheck
:
true
,
port
:
9528
,
// 端口
open
:
false
,
// 启动后打开浏览器
public
:
'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main/#/'
,
public
:
'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main/#/'
,
overlay
:
{
// 当出现编译器错误或警告时,在浏览器中显示全屏覆盖层
warnings
:
false
,
...
...
@@ -126,11 +118,11 @@ module.exports = {
})
]
config
.
plugins
=
[...
config
.
plugins
,
...
Plugins
]
// 为生产环境修改配置...
// if (IS_PROD) {
// // externals
// config.externals = externals
// }
// 为生产环境修改配置...
// if (IS_PROD) {
// // externals
// config.externals = externals
// }
},
chainWebpack
:
config
=>
{
...
...
@@ -150,14 +142,10 @@ module.exports = {
/**
* 添加CDN参数到htmlWebpackPlugin配置中
*/
// config.plugin('html').tap(args => {
// if (IS_PROD) {
// args[0].cdn = cdn.build
// } else {
// args[0].cdn = cdn.dev
// }
// return args
// })
config
.
plugin
(
'html'
).
tap
(
args
=>
{
args
[
0
].
cdn
=
cdn
return
args
})
/**
* 设置保留空格
...
...
@@ -171,16 +159,16 @@ module.exports = {
return
options
})
.
end
()
/**
* 打包分析
*/
/**
* 打包分析
*/
if
(
IS_PROD
)
{
config
.
plugin
(
'webpack-report'
).
use
(
BundleAnalyzerPlugin
,
[{
analyzerMode
:
'static'
}])
}
config
// https://webpack.js.org/configuration/devtool/#development
// https://webpack.js.org/configuration/devtool/#development
.
when
(
!
IS_PROD
,
config
=>
config
.
devtool
(
'cheap-source-map'
))
config
.
when
(
IS_PROD
,
config
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment