|
@@ -77,7 +77,7 @@
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
onLaunch: function() {
|
|
|
var that = this
|
|
|
// #ifdef APP-PLUS
|
|
@@ -109,99 +109,105 @@
|
|
|
// }, cancel => {
|
|
|
// // 点击否的回调
|
|
|
// });
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
// console.log(res.networkType);
|
|
|
// }
|
|
|
// });
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success(res) {
|
|
|
+ uni.setStorageSync('phoneType', res)
|
|
|
+ }
|
|
|
+ });
|
|
|
console.log(uni.getStorageSync('userInfo'))
|
|
|
- if(uni.getStorageSync('userInfo')){
|
|
|
+ if (uni.getStorageSync('userInfo')) {
|
|
|
that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
|
- driverPhone:uni.getStorageSync('userInfo').phone,
|
|
|
+ driverPhone: uni.getStorageSync('userInfo').phone,
|
|
|
}).then(res => {
|
|
|
if (res.data.authenticationStatus == '已禁用') {
|
|
|
-
|
|
|
- // this.isShowAlert = true
|
|
|
- // this.alertTitle = '账号审核中'
|
|
|
- // this.confirmText = '退出APP'
|
|
|
- // this.showCancelButton = false
|
|
|
- let options = {
|
|
|
- title: '提示',
|
|
|
- info:'账号审核中',
|
|
|
- okText: '退出程序',
|
|
|
- infoAlignment:'center',
|
|
|
- radius:10,
|
|
|
- // cancelText: '否',
|
|
|
- showCancel:false,
|
|
|
- okButtonColor:'#2772FB'
|
|
|
- };
|
|
|
- const native = uni.requireNativePlugin('AJ-Alert');
|
|
|
- native.showAction(options, result => {
|
|
|
- // #ifdef APP-PLUS
|
|
|
- if (uni.getSystemInfoSync().platform == 'ios') {
|
|
|
- plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
|
|
|
- } else if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
- plus.runtime.quit();
|
|
|
- }
|
|
|
- // #endif
|
|
|
- // 点击是的回调, result暂时没有返回内容
|
|
|
- }, cancel => {
|
|
|
- // 点击否的回调
|
|
|
- });
|
|
|
- // uni.showModal({
|
|
|
- // title: '提示',
|
|
|
- // content: '这是一个模态弹窗',
|
|
|
- // showCancel:false,
|
|
|
- // confirmText:'退出app',
|
|
|
- // // confirmColor:'#317AFE',
|
|
|
- // confirmColor:'#F54E40',
|
|
|
- // success: function (res) {
|
|
|
- // if (res.confirm) {
|
|
|
- // // #ifdef APP-PLUS
|
|
|
- // if (uni.getSystemInfoSync().platform == 'ios') {
|
|
|
- // plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
|
|
|
- // } else if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
- // plus.runtime.quit();
|
|
|
- // }
|
|
|
- // // #endif
|
|
|
- // } else if (res.cancel) {
|
|
|
- // console.log('用户点击取消');
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
-
|
|
|
+
|
|
|
+ // this.isShowAlert = true
|
|
|
+ // this.alertTitle = '账号审核中'
|
|
|
+ // this.confirmText = '退出APP'
|
|
|
+ // this.showCancelButton = false
|
|
|
+ let options = {
|
|
|
+ title: '提示',
|
|
|
+ info: '账号审核中',
|
|
|
+ okText: '退出程序',
|
|
|
+ infoAlignment: 'center',
|
|
|
+ radius: 10,
|
|
|
+ // cancelText: '否',
|
|
|
+ showCancel: false,
|
|
|
+ okButtonColor: '#2772FB'
|
|
|
+ };
|
|
|
+ const native = uni.requireNativePlugin('AJ-Alert');
|
|
|
+ native.showAction(options, result => {
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ if (uni.getSystemInfoSync().platform == 'ios') {
|
|
|
+ plus.ios.import("UIApplication").sharedApplication().performSelector(
|
|
|
+ "exit")
|
|
|
+ } else if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
+ plus.runtime.quit();
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
+ // 点击是的回调, result暂时没有返回内容
|
|
|
+ }, cancel => {
|
|
|
+ // 点击否的回调
|
|
|
+ });
|
|
|
+ // uni.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ // content: '这是一个模态弹窗',
|
|
|
+ // showCancel:false,
|
|
|
+ // confirmText:'退出app',
|
|
|
+ // // confirmColor:'#317AFE',
|
|
|
+ // confirmColor:'#F54E40',
|
|
|
+ // success: function (res) {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // // #ifdef APP-PLUS
|
|
|
+ // if (uni.getSystemInfoSync().platform == 'ios') {
|
|
|
+ // plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
|
|
|
+ // } else if (uni.getSystemInfoSync().platform == 'android') {
|
|
|
+ // plus.runtime.quit();
|
|
|
+ // }
|
|
|
+ // // #endif
|
|
|
+ // } else if (res.cancel) {
|
|
|
+ // console.log('用户点击取消');
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
} else {
|
|
|
console.log(1231233212332312312213)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
// #endif
|
|
|
- uni.setStorageSync("region", region);
|
|
|
+ uni.setStorageSync("region", region);
|
|
|
uni.getSystemInfo({
|
|
|
- success:function(e){
|
|
|
- Vue.prototype.statusBar = e.statusBarHeight
|
|
|
- // #ifndef MP
|
|
|
- if(e.platform == 'android') {
|
|
|
- Vue.prototype.customBar = e.statusBarHeight + 50
|
|
|
- }else {
|
|
|
- Vue.prototype.customBar = e.statusBarHeight + 45
|
|
|
- }
|
|
|
- // #endif
|
|
|
-
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
- let custom = wx.getMenuButtonBoundingClientRect()
|
|
|
- Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight
|
|
|
- // #endif
|
|
|
-
|
|
|
- // #ifdef MP-ALIPAY
|
|
|
- Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
|
|
|
- // #endif
|
|
|
- }
|
|
|
- })
|
|
|
+ success: function(e) {
|
|
|
+ Vue.prototype.statusBar = e.statusBarHeight
|
|
|
+ // #ifndef MP
|
|
|
+ if (e.platform == 'android') {
|
|
|
+ Vue.prototype.customBar = e.statusBarHeight + 50
|
|
|
+ } else {
|
|
|
+ Vue.prototype.customBar = e.statusBarHeight + 45
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
+
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ let custom = wx.getMenuButtonBoundingClientRect()
|
|
|
+ Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight
|
|
|
+ // #endif
|
|
|
+
|
|
|
+ // #ifdef MP-ALIPAY
|
|
|
+ Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
|
|
|
+ // #endif
|
|
|
+ }
|
|
|
+ })
|
|
|
// #ifdef APP-PLUS
|
|
|
- var that=this
|
|
|
+ var that = this
|
|
|
//判断该用户是否需要开启持续定位
|
|
|
if(uni.getStorageSync('userInfo')){
|
|
|
this.$request.baseRequest('get', '/orderInfo/getData', {
|
|
@@ -243,6 +249,11 @@
|
|
|
console.log("查看参数",this.shippingNoteInfos)
|
|
|
that.send(res1.data)
|
|
|
if(res1.data.length>0){
|
|
|
+ // if (uni.getStorageSync('userInfo')) {
|
|
|
+ // this.$request.baseRequest('get', '/orderInfo/getData', {
|
|
|
+ // commonId: uni.getStorageSync('userInfo').id,
|
|
|
+ // }).then(res1 => {
|
|
|
+ // if (res1.data.length > 0) {
|
|
|
that.$helper.fUN_AmapLocation.start({
|
|
|
// intervalTime: 1000 * 60,
|
|
|
intervalTime: 5000,
|
|
@@ -290,9 +301,9 @@
|
|
|
}
|
|
|
//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
|
|
|
}
|
|
|
- );
|
|
|
+ );
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
// this.$helper.fUN_AmapLocation.stop({}, result => {
|
|
@@ -313,7 +324,7 @@
|
|
|
// }
|
|
|
// );
|
|
|
// });
|
|
|
-
|
|
|
+
|
|
|
// fUN_AmapLocation.permission({}, result => {
|
|
|
// console.log('====fUN_AmapLocation定位====');
|
|
|
// });
|
|
@@ -331,12 +342,12 @@
|
|
|
// console.log('====fUN_AmapLocation定位====', JSON.stringify(result));
|
|
|
// }
|
|
|
// );
|
|
|
-
|
|
|
- // let isOpenLocation= permision.checkSystemEnableLocation()
|
|
|
- // console.log("isOpenLocation",isOpenLocation)
|
|
|
- // this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
|
|
|
+
|
|
|
+ // let isOpenLocation= permision.checkSystemEnableLocation()
|
|
|
+ // console.log("isOpenLocation",isOpenLocation)
|
|
|
+ // this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
|
|
|
let type = uni.getSystemInfoSync().platform
|
|
|
- console.log(type)
|
|
|
+ console.log(type)
|
|
|
if (type == "android") {
|
|
|
appUpdate()
|
|
|
}
|
|
@@ -430,7 +441,7 @@
|
|
|
},
|
|
|
onShow: function() {
|
|
|
console.log('App Show')
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
onHide: function() {
|
|
|
console.log('App Hide')
|