iOS 跳转页面配置
适配 iOS 的视频播放大小
This commit is contained in:
31
main.js
31
main.js
@@ -21,7 +21,7 @@ Vue.use(uView);
|
||||
|
||||
|
||||
const app = new Vue({
|
||||
...App
|
||||
...App
|
||||
})
|
||||
|
||||
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
|
||||
@@ -33,3 +33,32 @@ import httpApi from '@/common/http.api.js'
|
||||
Vue.use(httpApi, app)
|
||||
|
||||
app.$mount()
|
||||
|
||||
console.log(uni);
|
||||
|
||||
// #ifdef APP
|
||||
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
|
||||
if (isIos) {
|
||||
const originNavigateTo = uni.navigateTo
|
||||
|
||||
uni.navigateTo = (params) => {
|
||||
|
||||
console.log("自定义 navigate 。。。。。。。。。。");
|
||||
|
||||
let jsonParam = JSON.parse(JSON.stringify(params))
|
||||
|
||||
|
||||
if (isIos && jsonParam.url.includes('/me/detail/detail')) {
|
||||
console.log('iOS 跳转视频也');
|
||||
jsonParam.url = jsonParam.url.replace('/me/detail/detail', '/me/detail/detailIOS')
|
||||
}
|
||||
|
||||
originNavigateTo(jsonParam)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// #endif
|
||||
Reference in New Issue
Block a user