Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
N
newLive
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孟庆瑞
newLive
Commits
5c8342f3
Commit
5c8342f3
authored
Nov 28, 2022
by
jiaoyahui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
router的更改位置,和支付浏览器的测试
parent
ee0e2323
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
35 deletions
+62
-35
index.html
public/index.html
+1
-1
main.js
src/main.js
+2
-0
index.js
src/router/index.js
+16
-6
live.vue
src/views/live.vue
+20
-28
common.js
static/js/common.js
+23
-0
No files found.
public/index.html
View file @
5c8342f3
...
...
@@ -6,7 +6,7 @@
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<script
src=
"./static/js/mqttws31.js"
type=
"text/javascript"
></script>
<title>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
</title>
<title>
斗牛财经
</title>
</head>
<body>
<noscript>
...
...
src/main.js
View file @
5c8342f3
...
...
@@ -9,6 +9,7 @@ import store from './store/index'
import
server
from
'./axios/api'
import
VideoPlayer
from
'vue-video-player'
import
'vue-video-player/src/custom-theme.css'
import
common
from
'../static/js/common.js'
//公共方法
import
'video.js/dist/video-js.css'
//引入 hls,视频直播(m3u8)必须引入的
import
'videojs-contrib-hls'
...
...
@@ -25,6 +26,7 @@ Vue.prototype.qs = Qs;
Vue
.
prototype
.
axios
=
axios
;
Vue
.
prototype
.
router
=
router
;
Vue
.
prototype
.
$md5
=
md5
;
Vue
.
prototype
.
common
=
common
;
//引入公共方法
new
Vue
({
render
:
h
=>
h
(
App
),
router
,
...
...
src/router/index.js
View file @
5c8342f3
...
...
@@ -21,21 +21,31 @@ Vue.use(Router)
const
router
=
new
Router
({
routes
:[
{
path
:
'/
login
'
,
path
:
'/'
,
name
:
'index'
,
component
:
index
,
component
:
password
,
meta
:
{
requireAuth
:
true
}
// 判断是否需要登录
requireAuth
:
true
,
},
// 判断是否需要登录
redirect
:
'/password'
},
{
path
:
'/'
,
name
:
'
index
'
,
path
:
'/
login
'
,
name
:
'
login
'
,
component
:
index
,
meta
:
{
requireAuth
:
true
}
// 判断是否需要登录
},
// {
// path: '/',
// name: 'index',
// component: password,
// meta: {
// requireAuth: true
// } // 判断是否需要登录
// },
{
path
:
'/password'
,
name
:
'password'
,
...
...
src/views/live.vue
View file @
5c8342f3
...
...
@@ -479,7 +479,7 @@ export default {
applicationType
:
4
,
pmAppVersion
:
868
,
// applicationType: 3,
// applicationType: 3,
goodsType
:
3
,
goodsId
:
429
,
})
...
...
@@ -497,20 +497,19 @@ export default {
// 订单
payorder
(){
let
temp
=
this
.
qs
.
stringify
({
goodsId
:
429
,
goodsId
:
429
,
goodsType
:
3
,
sxUbId
:
26
,
pmoType
:
0
,
pmoType
:
0
,
subscribeDayType
:
26
,
applicationType
:
4
,
payType
:
1
,
// orderType:2,
subscribeDayType
:
19
,
rechargeFrom
:
1
,
isCheckBuy
:
1
,
paySource
:
"douniu_h5"
,
chargeModeKey
:
this
.
chargeModeKey
subscribeDayType
:
19
,
rechargeFrom
:
1
,
isCheckBuy
:
1
,
paySource
:
"douniu_h5"
,
chargeModeKey
:
this
.
chargeModeKey
...
...
@@ -520,7 +519,7 @@ export default {
this
.
pmoOrder
=
res
.
data
.
data
.
pmoOrder
if
(
res
.
code
=
200
){
console
.
log
(
res
.
data
.
data
.
pmoOrder
,
'===-'
)
console
.
log
(
res
.
data
.
data
.
pmoOrder
,
'===-'
)
this
.
paybuy
()
}
...
...
@@ -531,26 +530,19 @@ export default {
},
paybuy
(){
let
temp
=
this
.
qs
.
stringify
({
orderId
:
this
.
pmoId
,
orderNo
:
this
.
pmoOrder
,
payType
:
1
,
orderType
:
3
,
pmoType
:
0
,
orderId
:
this
.
pmoId
,
orderNo
:
this
.
pmoOrder
,
payType
:
1
,
orderType
:
3
,
pmoType
:
0
,
goodsType
:
3
,
})
this
.
server
.
live
.
buy
(
temp
).
then
(
res
=>
{
console
.
log
(
this
.
pmoOrder
,
'==='
)
this
.
server
.
live
.
buy
(
temp
).
then
(
res
=>
{
window
.
location
.
href
=
res
.
data
.
data
.
wechatInfo
.
payUrl
console
.
log
(
res
.
data
.
data
.
wechatInfo
.
payUrl
,
'==='
)
})
...
...
@@ -931,7 +923,7 @@ display: block;
}
.conten
{
position
:
fixed
;
top
:
2
7
%
;
top
:
2
4
%
;
left
:
0%
;
width
:
100%
;
/* background:red */
...
...
static/js/common.js
0 → 100644
View file @
5c8342f3
// 判断是否为微信浏览器
const
isWX
=
()
=>
{
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
return
true
;
}
else
{
return
false
;
}
}
// 判断是否为移动端浏览器
const
isMobile
=
()
=>
{
var
ua
=
navigator
.
userAgent
;
var
ipad
=
ua
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
),
isIphone
=
!
ipad
&&
ua
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
),
isAndroid
=
ua
.
match
(
/
(
Android
)\s
+
([\d
.
]
+
)
/
),
isMobile
=
isIphone
||
isAndroid
||
ipad
;
//判断
if
(
isMobile
)
{
return
true
;
}
else
{
return
false
;
}
}
\ No newline at end of file
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