|
@@ -86,7 +86,10 @@ export function getLocation() {
|
|
|
success: function(res) {
|
|
|
resolve(res);
|
|
|
},
|
|
|
- faile: function(res) {
|
|
|
+ faile: function(res) {
|
|
|
+ reject(res);
|
|
|
+ },
|
|
|
+ fail: function(res) {
|
|
|
reject(res);
|
|
|
},
|
|
|
complete() {}
|
|
@@ -110,6 +113,28 @@ export function scanQRCode(needResult) {
|
|
|
faile: function(res) {
|
|
|
reject(res);
|
|
|
},
|
|
|
+ fail: function(res) {
|
|
|
+ if(res.errMsg=='getLocation:timeout'){
|
|
|
+ mui.alert("定位超时,请检查是否开启'定位'");
|
|
|
+ }else if(res.errMsg=='getLocation:ERROR_NETWORK'){
|
|
|
+ mui.alert("网络异常");
|
|
|
+ }else if(res.errMsg=='getLocation:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF'){
|
|
|
+ mui.alert("没开启系统定位");
|
|
|
+ }else if(res.errMsg=='getLocation:system permission denied'){
|
|
|
+ mui.alert("未给微信位置授权");
|
|
|
+ }else if(res.errMsg=='getLocation:location permission'){
|
|
|
+ mui.alert("未给微信位置授权");
|
|
|
+ }else if(res.errMsg=='getLocation:auth denied'){
|
|
|
+ mui.alert("用户在小程序中未授权");
|
|
|
+ }else if(res.errMsg=='getLocation:fail authorize no response'){
|
|
|
+ mui.alert("用户在小程序中未授权");
|
|
|
+ }else if(res.errMsg=='getLocation:background'){
|
|
|
+ // mui.toast("正在");
|
|
|
+ }else{
|
|
|
+ mui.alert("未知异常:"+JSON.stringify(res));
|
|
|
+ }
|
|
|
+ // reject(res);
|
|
|
+ },
|
|
|
complete() {}
|
|
|
})
|
|
|
});
|