Commit bafa1fc042b8b1f1bfbc4f4a8d51707657739514

Authored by vking
1 parent a14015b6

切出后重新定位

var mta=require('mta-wechat-analysis')
var uri_dc = require('utils/uri.js')
import PubSub from 'utils/PubSub'
global.regeneratorRuntime = require('lib/regenerator/runtime-module')
const { regeneratorRuntime } = global
... ... @@ -172,7 +173,8 @@ App({
})
},
onHide(){
console.log('obHide');
console.log('onHide');
PubSub.emit('appHide')
let time=new Date()/1000;
wx.getStorageInfo({
success:(res)=>{
... ...
... ... @@ -78,6 +78,7 @@ Component({
}).show();
} else {
failCount=failCount+1;
setTimeout(() => {
this.getPos()
}, 500)
... ...
... ... @@ -67,6 +67,7 @@ Page({
*/
hasOnLoad:false,
hasGetLocation:false,//定位信息
hasAppHide:false,//app切至后台
onLoad: async function (options) {
this.hasOnLoad=true;
// this.qqmapsdk=new QQMapWX({
... ... @@ -95,6 +96,15 @@ Page({
}
}
)
PubSub.on(
'appHide',
data=>{
console.log('appHide');
this.hasGetLocation=false
this.hasClickMoveToLocation=false
this.hasAppHide=true
}
)
reddot.init()
},
... ... @@ -179,14 +189,12 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
... ...