99 lines
3.1 KiB
Vue
99 lines
3.1 KiB
Vue
<script>
|
||
// import initApp from '@/common/appInit.js';
|
||
import openApp from '@/common/openApp.js';
|
||
import sysconfig from './app.config.js';
|
||
// #ifdef H5
|
||
openApp() //创建在h5端全局悬浮引导用户下载app的功能
|
||
// #endif
|
||
// import checkIsAgree from '@/pages/uni-agree/utils/uni-agree.js';
|
||
|
||
import utils from "@/utils/common.js" //自定义函数
|
||
export default {
|
||
globalData: {
|
||
appVersion: {},
|
||
config: sysconfig,
|
||
$i18n: {},
|
||
$t: {}
|
||
},
|
||
methods: {
|
||
|
||
},
|
||
onLaunch: function(o) {
|
||
// utils.debug('App Launch')
|
||
this.globalData.$i18n = this.$i18n
|
||
this.globalData.$t = str => this.$t(str)
|
||
this.utils = utils;
|
||
// initApp();
|
||
if (o.query) {
|
||
var opt = o.query;
|
||
//以下做裂变分销场景布置
|
||
if (opt.fuid) {
|
||
// console.log('判断来源用户', opt.fuid);
|
||
uni.setStorageSync('_userFromWhere_', opt.fuid)
|
||
}
|
||
}
|
||
// #ifdef APP-PLUS
|
||
//checkIsAgree(); //APP端暂时先用原生默认生成的。目前,自定义方式启动vue界面时,原生层已经请求了部分权限这并不符合国家的法规
|
||
// #endif
|
||
|
||
// #ifdef H5
|
||
// checkIsAgree(); // 默认不开启。目前全球,仅欧盟国家有网页端同意隐私权限的需要。如果需要可以自己去掉注视后生效
|
||
// #endif
|
||
|
||
// #ifdef APP-PLUS
|
||
//idfa有需要的用户在应用首次启动时自己获取存储到storage中
|
||
/*var idfa = '';
|
||
var manager = plus.ios.invoke('ASIdentifierManager', 'sharedManager');
|
||
if(plus.ios.invoke(manager, 'isAdvertisingTrackingEnabled')){
|
||
var identifier = plus.ios.invoke(manager, 'advertisingIdentifier');
|
||
idfa = plus.ios.invoke(identifier, 'UUIDString');
|
||
plus.ios.deleteObject(identifier);
|
||
}
|
||
plus.ios.deleteObject(manager);
|
||
utils.debug('idfa = '+idfa);*/
|
||
// #endif
|
||
},
|
||
onShow: function() {
|
||
// utils.debug('App Show')
|
||
},
|
||
onHide: function() {
|
||
// utils.debug('App Hide')
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
/*每个页面公共css */
|
||
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
|
||
@import '@/static/css/uni.css';
|
||
|
||
/* H5 兼容 pc 所需 */
|
||
/* #ifdef H5 */
|
||
@media screen and (min-width: 768px) {
|
||
body {
|
||
overflow-y: scroll;
|
||
}
|
||
}
|
||
|
||
/* 顶栏通栏样式 */
|
||
/* .uni-top-window {
|
||
left: 0;
|
||
right: 0;
|
||
} */
|
||
|
||
uni-page-body {
|
||
background-color: #F5F5F5 !important;
|
||
min-height: 100% !important;
|
||
height: auto !important;
|
||
}
|
||
|
||
.uni-top-window uni-tabbar .uni-tabbar {
|
||
background-color: #fff !important;
|
||
}
|
||
|
||
.uni-app--showleftwindow .hideOnPc {
|
||
display: none !important;
|
||
}
|
||
|
||
/* #endif */
|
||
</style> |