|
@@ -249,9 +249,14 @@ apiready = function() {
|
|
|
_myalias = "member" + $api.getStorage("memberid");
|
|
|
jpushInit();
|
|
|
var storage = hasPermission('storage');
|
|
|
+ var has = hasPermission('camera');
|
|
|
if(!storage || !storage[0] || !storage[0].granted){
|
|
|
reqPermission('storage')
|
|
|
}
|
|
|
+ if(!has || !has[0] || !has[0].granted){
|
|
|
+ reqPermission('location');
|
|
|
+
|
|
|
+ }
|
|
|
//滑动到底部
|
|
|
api.addEventListener({
|
|
|
name: 'scrolltobottom'
|
|
@@ -305,7 +310,6 @@ $("#hotel-list").on("tap", ".home-hotel-list", function() {
|
|
|
})
|
|
|
|
|
|
$(".scan-barcode").on("tap", function() {
|
|
|
- var has = hasPermission('camera');
|
|
|
if(!has || !has[0] || !has[0].granted){
|
|
|
api.confirm({
|
|
|
title: '提醒',
|
|
@@ -484,7 +488,6 @@ function getmsgtotal() {
|
|
|
}
|
|
|
} else {
|
|
|
if (datas.code == 2000) {
|
|
|
- console.log(datas)
|
|
|
} else {
|
|
|
errcode(datas, datas.code);
|
|
|
}
|
|
@@ -736,18 +739,7 @@ $("#set-local").on("tap", function() {
|
|
|
function getAddress() {
|
|
|
var has = hasPermission('location');
|
|
|
if(!has || !has[0] || !has[0].granted){
|
|
|
- api.confirm({
|
|
|
- title: '提醒',
|
|
|
- msg: "没有获得 定位 权限\n是否前往设置?",
|
|
|
- buttons: ['去设置', '取消']
|
|
|
- }, function (ret, err) {
|
|
|
- var index = ret.buttonIndex;
|
|
|
- if (index == 1) {
|
|
|
- reqPermission('location');
|
|
|
- } else {
|
|
|
- api.toast({ msg: '获取定位权限失败...' });
|
|
|
- }
|
|
|
- });
|
|
|
+ reqPermission('location');
|
|
|
$(".border-none").removeClass("mask-hidden");
|
|
|
return false;
|
|
|
}
|