提交 763aa599 authored 作者: 王鹏飞's avatar 王鹏飞

打开直播增加微信版本升级提示

上级 9e622d3d
......@@ -42,12 +42,20 @@ import LanguageSwitch from '@/components/languageSwitch/index.vue'
export default {
components: { LanguageSwitch },
data() {
const UA = navigator.userAgent
const isWechat = /micromessenger/i.test(UA)
const wechatVersionMatch = UA.match(/MicroMessenger\/([\d.]+)/)
const wechatVersion = wechatVersionMatch ? wechatVersionMatch[1] : ''
const notSupport = isWechat && wechatVersion < '7.0.3'
return {
latest: null,
dataList: [],
loading: null,
message: null,
timer: null
timer: null,
isWechat,
wechatVersion,
notSupport
}
},
computed: {
......@@ -174,6 +182,10 @@ export default {
},
// 打开云直播
openCloudLive(data) {
if (this.notSupport) {
this.$message({ type: 'warning', message: '当前微信版本过低,请升级微信到最新版本' })
return
}
// https://doc.bokecc.com/live/Appendix_1.html
const liveStatus = data.live_status
data.user_name = data.user_name || this.nickName
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论