Browse Source

更新版本修改,商品列表解决重复出现问题

git-svn-id: svn://svn7.apicloud.com/A6007457911931/%E5%9C%88%E5%A4%9A%E5%A4%9A@677 0e1a2743-8d03-4e5a-a60c-7e26af42b145
1149931599@qq.com 4 years ago
parent
commit
0c4e6b9a35
5 changed files with 33 additions and 17 deletions
  1. 1 1
      html/frame0.html
  2. 11 2
      html/frame1.html
  3. 13 8
      html/home/hoteldtl.html
  4. 7 6
      html/my/about.html
  5. 1 0
      script/api.js

+ 1 - 1
html/frame0.html

@@ -615,7 +615,7 @@
 				url: siteurl + 'v2/entry/storeList',
 				url: siteurl + 'v2/entry/storeList',
 				data: {
 				data: {
 					page: _page,
 					page: _page,
-					page_size: '10',
+					page_size: '20',
 					minid: _minid,
 					minid: _minid,
 					lon: _lon,
 					lon: _lon,
 					lat: _lat
 					lat: _lat

+ 11 - 2
html/frame1.html

@@ -43,6 +43,12 @@
 		.new-list{
 		.new-list{
 			margin-top: 1.3rem;
 			margin-top: 1.3rem;
 		}
 		}
+		.null{
+			text-align: center;
+			color: #ccc;
+			margin: 10px 0;
+			display: none;
+		}
       </style>
       </style>
     <script>
     <script>
     (function(w, d, m) {
     (function(w, d, m) {
@@ -78,7 +84,9 @@
             </div>
             </div>
 		</div>
 		</div>
     </div>
     </div>
-    <section class="new-list" page="1" style="padding-top: 0rem;"></section>
+    <section class="new-list" page="1" style="padding-top: 0rem;">
+	</section>
+	<div class="null">没有更多了</div>
     <div class="back-top mask-hidden" id="fix1"></div>
     <div class="back-top mask-hidden" id="fix1"></div>
 </body>
 </body>
 <script type="text/javascript" src="../script/api.js"></script>
 <script type="text/javascript" src="../script/api.js"></script>
@@ -122,7 +130,7 @@ function getRouteData() {
         data: {
         data: {
             page: _page,
             page: _page,
             ac_id: _acid,
             ac_id: _acid,
-            page_size: 10
+            page_size: 20
         },
         },
         headers: { "X-TOKEN": $api.getStorage("accesstoken") },
         headers: { "X-TOKEN": $api.getStorage("accesstoken") },
         dataType: 'json',
         dataType: 'json',
@@ -145,6 +153,7 @@ function getRouteData() {
                 }
                 }
                 if ( datas.data.new_list.length <= 0) {
                 if ( datas.data.new_list.length <= 0) {
                     $(".new-list").attr("page", "false");
                     $(".new-list").attr("page", "false");
+					$(".null").show();
                 } else {
                 } else {
                     _page++;
                     _page++;
                     $(".new-list").attr("page", _page);
                     $(".new-list").attr("page", _page);

+ 13 - 8
html/home/hoteldtl.html

@@ -623,8 +623,7 @@
 						if (datas.data.store_slide.length > 0) {
 						if (datas.data.store_slide.length > 0) {
 							$.each(datas.data.store_slide, function(index, item) {
 							$.each(datas.data.store_slide, function(index, item) {
 								if (item.indexOf('jpg') != -1) {
 								if (item.indexOf('jpg') != -1) {
-									$(".swiper-wrapper").append('<div class="swiper-slide" type="0" keyid="0"><img src="' + item +
-										'"/></div>');
+									$(".swiper-wrapper").append('<div class="swiper-slide" type="0" keyid="0"><img src="' + item +'"/></div>');
 									// $(".swiper-wrapper").append('<div class="swiper-slide bg-full" style="background: url(' + item + ');">');
 									// $(".swiper-wrapper").append('<div class="swiper-slide bg-full" style="background: url(' + item + ');">');
 								}
 								}
 							})
 							})
@@ -801,39 +800,45 @@
 			var _xdata = {
 			var _xdata = {
 				store_id: _storeid,
 				store_id: _storeid,
 				page: _page,
 				page: _page,
-				praise: _desc
+				praise: _desc,
+				page_size:'20',
 			};
 			};
 			var _data_type = $(".hotel-goods-active").attr("tag");
 			var _data_type = $(".hotel-goods-active").attr("tag");
 			if (_data_type == 'praise') {
 			if (_data_type == 'praise') {
 				_xdata = {
 				_xdata = {
 					store_id: _storeid,
 					store_id: _storeid,
 					page: _page,
 					page: _page,
-					praise: _desc
+					praise: _desc,
+					page_size:'20',
 				};
 				};
 			} else if (_data_type == 'goods_commonid') {
 			} else if (_data_type == 'goods_commonid') {
 				_xdata = {
 				_xdata = {
 					store_id: _storeid,
 					store_id: _storeid,
 					page: _page,
 					page: _page,
-					goods_commonid: _desc
+					goods_commonid: _desc,
+					page_size:'20',
 				};
 				};
 			} else if (_data_type == 'goods_price') {
 			} else if (_data_type == 'goods_price') {
 				_xdata = {
 				_xdata = {
 					store_id: _storeid,
 					store_id: _storeid,
 					page: _page,
 					page: _page,
-					goods_price: _desc
+					goods_price: _desc,
+					page_size:'20',
 				};
 				};
 			} else {
 			} else {
 				var catid = $("#category-item .cate-active").parent(".category-list").attr("catid");
 				var catid = $("#category-item .cate-active").parent(".category-list").attr("catid");
 				if (catid == 'all') {
 				if (catid == 'all') {
 					_xdata = {
 					_xdata = {
 						store_id: _storeid,
 						store_id: _storeid,
-						page: _page
+						page: _page,
+						page_size:'20',
 					};
 					};
 				} else {
 				} else {
 					_xdata = {
 					_xdata = {
 						store_id: _storeid,
 						store_id: _storeid,
 						page: _page,
 						page: _page,
-						gc_id_1: catid
+						gc_id_1: catid,
+						page_size:'20',
 					};
 					};
 				}
 				}
 			}
 			}

+ 7 - 6
html/my/about.html

@@ -90,9 +90,10 @@ function go_privacy() {
 
 
 function is_ios() {
 function is_ios() {
     // body...
     // body...
-    if ( api.systemType == "android" ) {
+    // if ( api.systemType == "android" ) {
         var mam = api.require('mam');
         var mam = api.require('mam');
         mam.checkUpdate(function(ret, err){
         mam.checkUpdate(function(ret, err){
+			console.log(JSON.stringify(ret),JSON.stringify(err));
             if (ret) {
             if (ret) {
                 var result = ret.result;
                 var result = ret.result;
                 if (result.update == true && result.closed == false) {
                 if (result.update == true && result.closed == false) {
@@ -100,11 +101,11 @@ function is_ios() {
                 }
                 }
             }
             }
         })
         })
-    } else {
-        $("#is_update_btn").html('');
-        $("#is_update_btn").removeClass("weui-btn");
-        $("#is_update_btn").removeClass("weui-btn_plain-default");
-    }
+    // } else {
+    //     $("#is_update_btn").html('');
+    //     $("#is_update_btn").removeClass("weui-btn");
+    //     $("#is_update_btn").removeClass("weui-btn_plain-default");
+    // }
 }
 }
 
 
 </script>
 </script>

+ 1 - 0
script/api.js

@@ -845,6 +845,7 @@
 	qz_update = function() {
 	qz_update = function() {
 		var mam = api.require('mam');
 		var mam = api.require('mam');
 		mam.checkUpdate(function(ret, err) {
 		mam.checkUpdate(function(ret, err) {
+			console.log(JSON.stringify(ret),JSON.stringify(err));
 			if (ret) {
 			if (ret) {
 				var result = ret.result;
 				var result = ret.result;
 				if (result.update == true && result.closed == false) {
 				if (result.update == true && result.closed == false) {