flying-monkey/App.vue

72 lines
1.8 KiB
Vue
Raw Normal View History

<script>
export default {
globalData:{
projectname:'', // 项目名称
lat:'', // 公司地址维度
2022-03-28 10:40:48 +00:00
lng:'' ,// 公司地址经度
hostapi:'https://7and5.cn' ,// 域名配置
},
// 优先于show方法
onLaunch: function() {
// 配置全局域名
// #ifdef H5 || APP-PLUS
this.globalData.bgmMusic = uni.createInnerAudioContext();
// #endif
// #ifdef MP-WEIXIN
this.globalData.bgmMusic = wx.createInnerAudioContext();
// #endif
},
onShow: function() {
2022-04-24 09:35:39 +00:00
if(uni.getStorageSync('token')){
2022-04-13 12:36:32 +00:00
// 每十分钟更新用户地理位置
this.$toolAll.tools.renewLocationEv();
2022-04-24 09:35:39 +00:00
// 检测是否开启GPS定位服务
this.$toolAll.tools.checkOpenGPSServiceByAndroidIOS();
}
},
onLoad() {
},
onHide: function() {
2022-03-30 10:04:40 +00:00
},
methods:{
// uniapp设置消息提醒调用手机系统静音或铃声
openSettings() {
uni.getSystemInfo({
success(res) {
if(res.platform == 'ios'){
plus.runtime.openURL("app-settings://");
} else if (res.platform == 'android'){
var main = plus.android.runtimeMainActivity();
var Intent = plus.android.importClass("android.content.Intent");
var mIntent = new Intent('android.settings.SOUND_SETTINGS');
main.startActivity(mIntent);
}
}
});
},
}
};
</script>
<style>
/*每个页面公共css */
2022-03-30 10:04:40 +00:00
/* 阿里巴巴矢量图标库 start */
@import url("./commons/icon-font.css");
/* 阿里巴巴矢量图标库 end */
2022-03-16 00:58:52 +00:00
/* 项目基础样式 start */
@import url("./commons/base.css");
2022-03-16 00:58:52 +00:00
/* 项目基础样式 end */
/* 项目页面样式 start */
@import url("./commons/flying-monkey.css");
/* 项目页面样式 end */
2022-03-17 05:47:40 +00:00
/* 动画样式 start */
@import url("./commons/animate.min.css");
/* 动画样式 end */
page {background-color: #f7f7f7;}
</style>