Commit c0bde137 authored by xhx's avatar xhx

live

parent 60e51083
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<img <img
class="icon9 mr-1" class="icon9 mr-1"
referrerpolicy="no-referrer" referrerpolicy="no-referrer"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngb67f1b6bfda58737e89dadee59bd68fad0b4964489b7942f9159db2c704f25e4" src="../../assets/img/Living.png"
/> />
<span class="word26">正在直播</span> <span class="word26">正在直播</span>
</div> </div>
...@@ -101,13 +101,14 @@ export default defineComponent({ ...@@ -101,13 +101,14 @@ export default defineComponent({
.outer3 { .outer3 {
overflow: hidden; overflow: hidden;
background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng7071930f7e4936335b32a1512a498654730fabf8a2a83c8137f07d12a7c2b4bd) background: url(../../assets/img/live-outer3.png)
100% no-repeat; 100% no-repeat;
background-size: cover; background-size: cover;
} }
.block2 { .block2 {
background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngb5e34933d0e615000378ebf1491cce32e934e21b7f3de7cddbddd3f05e03ed7a) background: url(../../assets/img/live-block2.png)
/* background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngb5e34933d0e615000378ebf1491cce32e934e21b7f3de7cddbddd3f05e03ed7a) */
100% no-repeat; 100% no-repeat;
background-size: cover; background-size: cover;
} }
......
import Bridge from "@/utils/jsBridge2"
import { Toast } from 'vant';
import { enableLive } from '@/service/StaffService/index'
export const sendLive = () => {
const USER_MSG = window.localStorage.getItem('USER_MSG')
if (!USER_MSG) {
Toast('请先登录')
return
}
let allow = false
let time_section = ''
// new Bridge().bridge_live({
// phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone,
// avatar: window.location.host + require('../../../assets/icons/avatar.png'),
// allow: true,
// time_section: '30000'
// })
enableLive().then(res => {
if (res.code === 200) {
allow = res.data.allow
time_section = res.data.time_section
}
new Bridge().bridge_live({
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_live({
phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone,
avatar: window.location.host + require('../assets/icons/avatar.png'),
allow,
time_section
})
})
}
\ No newline at end of file
import Bridge from "@/utils/jsBridge2" import Bridge from "@/utils/jsBridge2"
import { Toast } from 'vant'; import { Toast } from 'vant';
import {enableLive} from '@/service/StaffService/index' import {enableLive} from '@/service/StaffService/index'
import { sendLive } from "@/utils/live";
export default [ export default [
{ {
...@@ -44,38 +44,7 @@ export default [ ...@@ -44,38 +44,7 @@ export default [
icon: 'icon-jingcaizhibo', icon: 'icon-jingcaizhibo',
color: '#0FCBA5', color: '#0FCBA5',
cb(){ cb(){
const USER_MSG = window.localStorage.getItem('USER_MSG') sendLive()
if (!USER_MSG) {
Toast('请先登录')
return
}
let allow = false
let time_section = ''
// new Bridge().bridge_live({
// phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone,
// avatar: window.location.host + require('../../../assets/icons/avatar.png'),
// allow: true,
// time_section: '30000'
// })
enableLive().then(res => {
if (res.code === 200) {
allow = res.data.allow
time_section = res.data.time_section
}
new Bridge().bridge_live({
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_live({
phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone,
avatar: window.location.host + require('../../../assets/icons/avatar.png'),
allow,
time_section
})
})
}, },
}, },
{ {
......
...@@ -84,6 +84,7 @@ import { number } from "bitcoinjs-lib/types/script"; ...@@ -84,6 +84,7 @@ import { number } from "bitcoinjs-lib/types/script";
import { Skeleton } from "vant"; import { Skeleton } from "vant";
import { eProductStatus } from "@/service/LoanProductService/type"; import { eProductStatus } from "@/service/LoanProductService/type";
import { getUserMsg } from "@/utils/userMsg" import { getUserMsg } from "@/utils/userMsg"
import { sendLive } from "@/utils/live";
export default defineComponent({ export default defineComponent({
components: { components: {
Banner, Banner,
...@@ -146,7 +147,7 @@ export default defineComponent({ ...@@ -146,7 +147,7 @@ export default defineComponent({
}, },
methods: { methods: {
handleSeeMoreLive() { handleSeeMoreLive() {
sendLive()
}, },
initLiveRoomCard() { initLiveRoomCard() {
new Bridge().bridge_getliveInfo(getUserMsg()?.userInfo.phone, (msg: string) => { new Bridge().bridge_getliveInfo(getUserMsg()?.userInfo.phone, (msg: string) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment