Commit 7b11c98a authored by xhx's avatar xhx

直播未登录拦截

parent c948a563
import Bridge from "@/utils/jsBridge2" import Bridge from "@/utils/jsBridge2"
import { Toast } from 'vant';
export default [ export default [
...@@ -42,6 +43,12 @@ export default [ ...@@ -42,6 +43,12 @@ export default [
icon: 'icon-jingcaizhibo', icon: 'icon-jingcaizhibo',
color: '#0FCBA5', color: '#0FCBA5',
cb(){ cb(){
const USER_MSG = window.localStorage.getItem('USER_MSG')
if (!USER_MSG) {
Toast('请先登录')
return
}
console.log('bridge')
new Bridge().bridge_live({ new Bridge().bridge_live({
phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone, phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone,
avatar: window.location.host + require('../../../assets/icons/avatar.png') avatar: window.location.host + require('../../../assets/icons/avatar.png')
......
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