Commit 7584082c by 李伟康

提交

1 parent f2e1f75d
...@@ -103,6 +103,9 @@ export default { ...@@ -103,6 +103,9 @@ export default {
if (carInfo) this.carInfo = carInfo if (carInfo) this.carInfo = carInfo
this.detail = activityInfo this.detail = activityInfo
this.setTotalPrice() this.setTotalPrice()
this.$nextTick(() => {
if (activityInfo.isStaffLoginLink) this.checkOpenLaunch()
})
} }
}, },
watchInfo: { watchInfo: {
...@@ -136,7 +139,8 @@ export default { ...@@ -136,7 +139,8 @@ export default {
path: '', path: '',
totalGoodsNumber: 0, totalGoodsNumber: 0,
totalPrice: {}, totalPrice: {},
supportOpenLaunch: true supportOpenLaunch: true,
detail: {}
} }
}, },
props: { props: {
...@@ -150,39 +154,46 @@ export default { ...@@ -150,39 +154,46 @@ export default {
} }
}, },
mounted () { mounted () {
this.checkOpenLaunch()
this.iSMiniprogram = window.__wxjs_environment === 'miniprogram' this.iSMiniprogram = window.__wxjs_environment === 'miniprogram'
}, },
methods: { methods: {
checkOpenLaunch () { checkOpenLaunch () {
/**
* 微信版本要求为:7.0.12及以上
* 系统版本要求为:iOS 10.3及以上、Android 5.0及以上
*/
const userAgent = navigator.userAgent, const userAgent = navigator.userAgent,
wechat_version = userAgent.match(/MicroMessenger\/([\d\.]+)/i)[1] MicroMessenger = userAgent.match(/MicroMessenger\/([\d\.]+)/i)
let wechat_version = ''
if (MicroMessenger && MicroMessenger.length) wechat_version = MicroMessenger[1]
try { try {
let [w_a, w_b, w_c] = wechat_version.split('.') let [w_a, w_b, w_c] = wechat_version.split('.')
if (!w_c) c = 0 if (!w_c) w_c = 0
/*
* 微信版本要求为:7.0.12及以上
*/
if (w_a < 7) throw false if (w_a < 7) throw false
if (w_a == 7 && w_b == 0 && w_c < 12) throw false if (w_a == 7 && w_b == 0 && w_c < 12) throw false
if (userAgent.includes('iPhone') || userAgent.includes('iPad')) { if (userAgent.includes('iPhone') || userAgent.includes('iPad')) {
let phone_version = userAgent.match(/iPhone OS ([\d\_]+)/i)[1] let phone_version = userAgent.match(/iPhone OS ([\d\_]+)/i)[1]
if (phone_version) { if (phone_version) {
let [a, b] = phone_version.split('_') let [a, b] = phone_version.split('_')
if (!b) b = 0 if (!b) b = 0
/**
* 系统版本要求为:iOS 10.3及以上
*/
if (a < 10) throw false if (a < 10) throw false
if (a == 10 && b < 3) throw false if (a == 10 && b < 3) throw false
/** /**
* 👇 iOS15底层 WebKit 接口发生变更,微信版本8.0.8以下(不包括8.0.8)无法使用开放标签,可引导用户升级最新版本微信 * 👇 iOS15底层 WebKit 接口发生变更,微信版本8.0.8以下(不包括8.0.8)无法使用开放标签,可引导用户升级最新版本微信
*/ */
if (a == 15 && w_a == 8 && w_b == 0 && w_c < 8) throw false if (wechat_version && a == 15 && w_a == 8 && w_b == 0 && w_c < 8) throw false
} }
} }
if (userAgent.includes('Android')) { if (userAgent.includes('Android')) {
let phone_version = userAgent.match(/Android ([\d\.]+)/i)[1] let phone_version = userAgent.match(/Android ([\d\.]+)/i)[1]
if (phone_version) { if (phone_version) {
let [a] = phone_version.split('.') let [a] = phone_version.split('.')
/**
* 系统版本要求为:Android 5.0及以上
*/
if (a < 5) throw false if (a < 5) throw false
} }
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
module.exports = { module.exports = {
title: '加载中...', title: '加载中...',
request: { request: {
baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址, baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!