Explorar o código

111

git-svn-id: svn://svn7.apicloud.com/A6007457911931/%E5%9C%88%E5%A4%9A%E5%A4%9A@644 0e1a2743-8d03-4e5a-a60c-7e26af42b145
1149931599@qq.com %!s(int64=4) %!d(string=hai) anos
pai
achega
d4ddc3a8f6
Modificáronse 1 ficheiros con 10 adicións e 13 borrados
  1. 10 13
      html/frame0.html

+ 10 - 13
html/frame0.html

@@ -252,21 +252,23 @@ apiready = function() {
 	if(!storage || !storage[0] || !storage[0].granted){
 		reqPermission('storage')
 	}
+	//滑动到底部
     api.addEventListener({
         name: 'scrolltobottom'
     }, function(ret, err) {
-        getRouteHotelData();
         getmsgtotal();
     });
+	//应用从后台回到前台事件
     api.addEventListener({
         name: 'resume'
     }, function(ret, err) {
         _isload = false;
         _minid = '';
         _isrefurbish = true;
-        getAddress();
+		getAddress();
         getmsgtotal();
     });
+	//应用每次显示
 	api.addEventListener({
 	    name: 'viewappear'
 	}, function(ret, err) {
@@ -314,7 +316,7 @@ $(".scan-barcode").on("tap", function() {
             if (index == 1) {
                 reqPermission('camera');
             } else {
-               api.toast({ msg: '获取相机权限失败...' }); 
+               api.toast({ msg: '获取相机权限失败...' });
             }
         });
         return false;
@@ -336,7 +338,7 @@ $(".scan-barcode").on("tap", function() {
                         var _goods_id = ret.content.split("?")[1];
                         _goods_id = _goods_id.split("&")[1];
                         _goods_id = _goods_id.replace("goods_id=", "");
-                        // alert(_goods_id); 
+                        // alert(_goods_id);
                         api.openWin({
                             name: 'showgoods',
                             url: './home/showgoods.html',
@@ -465,7 +467,7 @@ function set_height() {
 
 function getmsgtotal() {
     $.ajax({
-        url: siteurl + 'v2/shop/msg_count',//'?do=getmsgtotal',
+        url: siteurl + 'v2/shop/msg_count',
         data: {
             member_id: $api.getStorage("memberid")
         },
@@ -473,7 +475,6 @@ function getmsgtotal() {
         dataType: 'json',
         type: 'post',
         success: function(datas) {
-			console.log(JSON.stringify(datas.data));
             if (datas.result) {
                 if (datas.data.total > 0) {
                     $(".msg-total").text(datas.data.total);
@@ -493,7 +494,6 @@ function getmsgtotal() {
 }
 
 function get_advx() {
-    // body...
     api.execScript({
         name: 'index',
         script: 'get_adv();'
@@ -519,7 +519,6 @@ function goto_adv() {
 }
 
 function get_adv() {
-    // 
     $.ajax({
         url: siteurl + 'v1/entry/poster',
         data: {},
@@ -560,7 +559,6 @@ function get_adv() {
 function getRouteHotelData() {
     if (_lon=='0') {
         $(".border-none").removeClass("mask-hidden");
-        getAddress();
         return false;
     } else {
         $(".border-none").addClass("mask-hidden");
@@ -588,7 +586,7 @@ function getRouteHotelData() {
 
                         var _tags_0 = item.store_summary.split(' ');
                         _tags_0 = jQuery.grep(_tags_0, function( a ) { return a !== ''; });
-                        
+
                         html += '<div class="home-hotel-list" keyid="' + item.store_id + '"><div class="home-hotel-left"><img src="' + siteurl + 'uploads/home/store/' + item.store_id + '/' + item.store_banner + '"/></div>';
                         html += '<div class="home-hotel-right"><div class="home-hotel-title">' + item.store_name + '</div>';
                         html += '<div class="home-hotel-dtl"><ul><li style="width:40%"><div class="hotel_credit my-rating' + i + '">'+intToFloat(item.store_servicecredit)+'</div></li>';
@@ -654,7 +652,6 @@ $(".swiper-wrapper").on("tap", ".swiper-slide", function() {
 })
 
 function intToFloat(val) {
-    // body...
     return new Number(val).toFixed(1);
 }
 
@@ -748,7 +745,7 @@ function getAddress() {
             if (index == 1) {
                 reqPermission('location');
             } else {
-                api.toast({ msg: '获取定位权限失败...' }); 
+                api.toast({ msg: '获取定位权限失败...' });
             }
         });
         $(".border-none").removeClass("mask-hidden");
@@ -909,4 +906,4 @@ $.fn.fixedDiv = function(actCls) {
 $('#fix1').fixedDiv('mask-hidden')
 
 </script>
-</html>
+</html>