Browse Source

权限修复完毕

git-svn-id: svn://svn7.apicloud.com/A6007457911931/%E5%9C%88%E5%A4%9A%E5%A4%9A@640 0e1a2743-8d03-4e5a-a60c-7e26af42b145
1149931599@qq.com 4 năm trước cách đây
mục cha
commit
95a3e4e3b7
1 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 4 5
      html/frame0.html

+ 4 - 5
html/frame0.html

@@ -242,15 +242,15 @@ apiready = function() {
     _adv_goods_id = api.pageParam.advgoodsid;
     _adv_store_id = api.pageParam.advstoreid;
     _adv_article_id = api.pageParam.advarticleid;
-	reqPermission('storage');
+	var storage = hasPermission('storage');
+	if(!storage || !storage[0] || !storage[0].granted){
+		reqPermission('storage')
+	}
     setIosTopBar();
     getAddress();
     get_adv();
-    // goto_adv();
-    // get_advx();
     getRouteData();
     webtoappinit();
-    // getRouteHotelData();
     _myalias = "member" + $api.getStorage("memberid");
     jpushInit();
     api.addEventListener({
@@ -750,7 +750,6 @@ function getAddress() {
             var index = ret.buttonIndex;
             if (index == 1) {
                 reqPermission('location');
-                // getAddress();
             } else {
                 api.toast({ msg: '获取定位权限失败...' }); 
             }