海洋馆小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
minAPP-hyg/App.vue

85 lines
2.3 KiB

<script>
const param = require('./common/param.js');
const util = require('./common/util.js');
const aes = require('./common/aes.js');
export default {
onLaunch: function() {
console.log("App Launch")
var that = this;
// util.userLocation();//进来先调一次android定位方法
//检查缓存中userid的存储格式
var userStorageSync = aes.aesDecrypt(uni.getStorageSync("userid"))
if(userStorageSync.indexOf("data")&&userStorageSync!=null&&userStorageSync!=""){
var json = JSON.parse(userStorageSync);
uni.setStorageSync("userid",aes.aesMinEncrypt(json.data));
}
// uni.getLocation({
// type: 'gcj02',
// success: function (res) {
// that.$param.clng = res.longitude;
// that.$param.clat = res.latitude;
// },
// fail:function(){
// console.log("失败了")
// that.$param.clng = that.$param.lng;
// that.$param.clat = that.$param.lat;
// }
// });
// for (var i = 1; i <= 10; i++) {
// setTimeout(function(k) {
// var jwd = util.userLocation();
// // var jwd = "38.04204,114.48938";
// if(jwd != ""){
// var data = [];
// data = jwd.split(",");
// that.$param.clng = data[1];
// that.$param.clat = data[0];
// }
// }, 1000*i,i);
// }
// setInterval(function(){
// uni.getLocation({
// type: 'gcj02',
// success: function (res) {
// that.$param.clng = res.longitude;
// that.$param.clat = res.latitude;
// },
// fail:function(){
// console.log("失败了")
// that.$param.clng = that.$param.lng;
// that.$param.clat = that.$param.lat;
// }
// });
//util.userLocation();
// var jwd = util.userLocation();
// if(jwd != ""){
// var data = [];
// data = jwd.split(",");
// that.$param.clng = data[1];
// that.$param.clat = data[0];
// }
// }, 1000*3);
},
onShow: function() {
console.log('App Show')
let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform == 'ios') {
uni.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#F7F7F7'
});
}
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
/* @import './static/css/common.css'; */
@import './static/ancss/an.css';
@import '/static/css/iconfont.css';
</style>