Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
acced4ca
Commit
acced4ca
authored
Oct 20, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播
parent
2a1c5419
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
13 deletions
+93
-13
index.html
public/index.html
+2
-0
App.vue
src/App.vue
+6
-0
index.vue
src/components/LiveCard/index.vue
+46
-9
index.vue
src/components/NavBar/index.vue
+1
-0
jsBridge2.js
src/utils/jsBridge2.js
+21
-0
index.vue
src/views/withMenu/Home/index.vue
+17
-4
No files found.
public/index.html
View file @
acced4ca
...
...
@@ -5,6 +5,8 @@
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<!-- <meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1; minimum-scale=1; user-scalable=no;"> -->
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
...
...
src/App.vue
View file @
acced4ca
...
...
@@ -32,6 +32,12 @@ export default defineComponent({
setup
()
{
onBeforeMount
(()
=>
{
setTimeout
(()
=>
{
new
Bridge
().
getNotchHeight
(
null
,
(
height
:
any
)
=>
{
console
.
log
(
'getNotchHeight'
,
height
);
})
},
3000
);
new
Bridge
().
getNotchHeight
(
null
,
(
height
:
any
)
=>
{
height
=
Number
(
height
)
notchHeight
.
value
=
height
;
...
...
src/components/LiveCard/index.vue
View file @
acced4ca
<
template
>
<div
class=
"wrap18 flex mx-5 overflow-hidden"
>
<div
class=
"wrap18 flex mx-5 overflow-hidden"
@
click=
"goto"
>
<div
class=
"flex-shrink-0 block2 outer3"
style=
"width: 44%"
>
<div
class=
"flex-col"
>
<div
class=
"flex-col"
>
...
...
@@ -15,19 +15,56 @@
</div>
</div>
<div
class=
"flex flex-col justify-between items-center mx-2.5 py-5"
>
<p
class=
"word18"
>
知名财经专家现场精彩讲座
</p>
<p
class=
"word19"
>
建设银行财经专家分析
</p>
<p
class=
"word18"
>
{{
title
}}
</p>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
,
{
defineComponent
}
from
"vue"
;
import
{
defineComponent
}
from
"vue"
;
import
Icon
from
"../common/Icon.vue"
;
export
default
defineComponent
({
components
:
{
Icon
}
});
import
Bridge
from
"@/utils/jsBridge2"
import
{
Toast
}
from
"vant"
;
import
{
enableLive
}
from
"@/service/StaffService"
;
export
default
defineComponent
({
components
:
{
Icon
},
props
:
{
title
:
String
,
},
mounted
()
{
},
methods
:
{
goto
()
{
const
USER_MSG
=
window
.
localStorage
.
getItem
(
'USER_MSG'
)
if
(
!
USER_MSG
)
{
Toast
(
'请先登录'
)
return
}
let
allow
=
false
let
time_section
=
''
enableLive
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
allow
=
res
.
data
.
allow
time_section
=
res
.
data
.
time_section
}
new
Bridge
().
bridge_gotoLiveRoom
({
phone
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'USER_MSG'
)
as
string
)?.
userInfo
.
phone
,
avatar
:
window
.
location
.
host
+
require
(
'@/assets/icons/avatar.png'
),
allow
,
time_section
})
}).
catch
(()
=>
{
new
Bridge
().
bridge_gotoLiveRoom
({
phone
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'USER_MSG'
)
as
string
)?.
userInfo
.
phone
,
avatar
:
window
.
location
.
host
+
require
(
'@/assets/icons/avatar.png'
),
allow
,
time_section
})
})
},
}
});
</
script
>
<
style
scoped
>
.wrap18
{
...
...
src/components/NavBar/index.vue
View file @
acced4ca
...
...
@@ -95,6 +95,7 @@ export default defineComponent({
},
heightOfNotch
()
{
// 刘海屏的刘海高度 单位px
return
notchHeight
.
value
;
// return 103;
}
}
});
...
...
src/utils/jsBridge2.js
View file @
acced4ca
...
...
@@ -551,4 +551,25 @@ jsBridge.prototype.getNotchHeight = function (params, success) {
}
}
/* 获取直播信息 */
jsBridge
.
prototype
.
bridge_getliveInfo
=
function
(
params
,
success
)
{
if
(
this
.
curApp
==
ANDROID
)
{
dsBridge
.
call
(
'bridge_getliveInfo'
,
params
,
success
)
}
else
if
(
this
.
curApp
==
IOS
)
{
this
.
callHandler
(
'bridge_getliveInfo'
,
params
,
success
)
}
}
/* 去直播间 */
jsBridge
.
prototype
.
bridge_gotoLiveRoom
=
function
(
params
,
success
)
{
if
(
this
.
curApp
==
ANDROID
)
{
dsBridge
.
call
(
'bridge_gotoLiveRoom'
,
params
,
success
)
}
else
if
(
this
.
curApp
==
IOS
)
{
this
.
callHandler
(
'bridge_gotoLiveRoom'
,
params
,
success
)
}
}
export
default
jsBridge
;
src/views/withMenu/Home/index.vue
View file @
acced4ca
<
template
>
<Navbar
:bangsBlock=
"true"
/>
<Navbar
:bangsBlock=
"true"
/>
<div
class=
"page flex-col"
>
<div
class=
"outer1 flex-col"
>
<Banner
class=
"w-full overflow-hidden"
:bannerUrls=
"bannerList"
/>
...
...
@@ -28,8 +28,8 @@
"
/>
</Skeleton>
<group-title
class=
"mt-7"
title=
"精彩直播"
/>
<LiveCard
class=
"mt-4"
/>
<group-title
class=
"mt-7"
title=
"精彩直播"
v-if=
"LiveRoomTitle"
@
seeMore=
"handleSeeMoreLive"
/>
<LiveCard
class=
"mt-4"
:title=
"LiveRoomTitle"
/>
<group-title
class=
"mt-7"
v-if=
"src"
...
...
@@ -73,6 +73,7 @@ import { queryBannerList } from "@/service/BannerService";
import
{
getImageSrcFromFileHash
}
from
"@/service/FileService"
;
import
{
queryNotifyList
}
from
"@/service/NotifyService"
;
import
{
queryActivityList
}
from
"@/service/ActivityService"
;
import
Bridge
from
"@/utils/jsBridge2"
import
{
queryLoanProductList
,
queryLoanProductInfo
,
...
...
@@ -96,6 +97,7 @@ export default defineComponent({
},
data
()
{
return
{
LiveRoomTitle
:
''
,
appList
,
skeLoading
:
false
,
bannerList
:
[]
as
string
[],
...
...
@@ -137,8 +139,19 @@ export default defineComponent({
this
.
fetchNotifyList
();
this
.
fetchActivityList
();
this
.
fetchLoanProductList
();
this
.
initLiveRoomCard
();
},
methods
:
{
handleSeeMoreLive
()
{
},
initLiveRoomCard
()
{
new
Bridge
().
bridge_getliveInfo
(
null
,
(
msg
:
string
)
=>
{
if
(
msg
)
{
this
.
LiveRoomTitle
=
msg
;
}
})
},
getHotNews
()
{
getNewsList
({
limit
:
2
,
...
...
@@ -189,7 +202,7 @@ export default defineComponent({
this
.
skeLoading
=
false
;
this
.
hotLoanUuid
=
ret
.
data
.
uuid
[
0
];
const
uuid
=
this
.
hotLoanUuid
;
if
(
uuid
)
{
if
(
uuid
)
{
queryLoanProductInfo
({
uuid
}).
then
((
ret
)
=>
{
console
.
log
(
"uuid"
,
uuid
);
if
(
ret
.
code
===
200
)
{
...
...
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