zhengwei 6 anni fa
parent
commit
f3c840b2f4

+ 5 - 3
WebContent/static/mobile/js/index.js

@@ -47,6 +47,7 @@ function swiper() {
     if ($("#hot .swiper-slide").length>1) {
         var mySwiper1 = new Swiper('#hot-swiper', {
             loop: true,
+            lazy: true,
             autoplay: 3000,//可选选项,自动滑动
             // 如果需要分页器
             pagination: '#hot-pagination',
@@ -57,6 +58,7 @@ function swiper() {
     if ($("#cut .swiper-slide").length>1) {
         var mySwiper2 = new Swiper('#cut-swiper', {
             loop: true,
+            lazy: true,
             autoplay: 3000,//可选选项,自动滑动
             // 如果需要分页器
             pagination: '#cut-pagination',
@@ -177,7 +179,7 @@ function getProduct(){
                     html.push('<div class="info-title">'+item2.product_name+'</div>');
                     html.push('<div class="items">');
                     html.push('<div class="product-price item"><em>¥'+item2.product_price+'<span class="del-line color3 ml5">'+item2.product_old_price+'元</span></em></div>')
-                    html.push('<div class="fs12 color3">已抢:'+item2.sale_num+'</div>')
+                    html.push('<div class="fs12 color3">关注:'+item2.visit_num+'</div>')
                     html.push('</div></div>');
                     html.push('</a>');
                 });
@@ -211,7 +213,7 @@ function getIndex(){
                 html.push('<span class="fs13 del-line color3 ml5">'+item.product_old_price+'元</span>');
                 html.push('</div>');
                 html.push('<div class="mui-table-cell mui-col-xs-6 mui-text-right saleNum">');
-                html.push('<span class="color2 fs12 pr5">已抢:<span>'+item.sale_num+'</span> </span>');
+                html.push('<span class="color3 fs12 pr5">关注:'+item.visit_num+' </span>');
                 html.push('<span class="mui-btn mui-btn-primary">立即购买</span>');
                 html.push('</div>');
                 html.push('</div>');
@@ -236,7 +238,7 @@ function getIndex(){
                 html.push('<span class="fs13 del-line color3 ml5">'+item.product_old_price+'元</span>');
                 html.push('</div>');
                 html.push('<div class="mui-table-cell mui-col-xs-6 mui-text-right saleNum">');
-                html.push('<span class="color2 fs12 pr5">已抢:<span>'+item.sale_num+'</span> </span>');
+                html.push('<span class="color3 fs12 pr5">关注:'+item.visit_num+' </span>');
                 html.push('<span class="mui-btn mui-btn-primary">立即参与</span>');
                 html.push('</div>');
                 html.push('</div>');

+ 2 - 2
WebContent/static/mobile/js/merchantDetail.js

@@ -94,7 +94,7 @@ function getMerchant(){
                 html.push('<div class="info-title">'+item.product_name+'</div>');
                 html.push('<div class="items">');
                 html.push('<div class="product-price item"><em>¥'+item.product_price+'<span class="del-line color3 ml5">'+item.product_old_price+'元</span></em></div>')
-                html.push('<div class="fs12 color3">已抢:'+item.sale_num+'</div>')
+                html.push('<div class="fs12 color3">关注:'+item.visit_num+'</div>')
                 html.push('</div></div>');
                 html.push('</a>');
             });
@@ -121,7 +121,7 @@ function getMerchant(){
                 html.push('<span class="fs13 del-line color3 ml5">'+item.product_old_price+'元</span>');
                 html.push('</div>');
                 html.push('<div class="mui-table-cell mui-col-xs-6 mui-text-right saleNum">');
-                html.push('<span class="color2 fs12 pr5">已抢:<span>'+item.sale_num+'</span> </span>');
+                html.push('<span class="color2 fs12 pr5">关注:<span>'+item.visit_num+'</span> </span>');
                 html.push('<span class="mui-btn mui-btn-primary">立即参与</span>');
                 html.push('</div>');
                 html.push('</div>');

+ 1 - 1
WebContent/static/mobile/js/productCategory.js

@@ -106,7 +106,7 @@ function getProduct(type){
                             html.push('<div class="info-title">'+item.product_name+'</div>');
                             html.push('<div class="items">');
                             html.push('<div class="product-price item"><em>¥'+item.product_price+'<span class="del-line color3 ml5">'+item.product_old_price+'元</span></em></div>')
-                            html.push('<div class="fs12 color3">已抢:'+item.sale_num+'</div>')
+                            html.push('<div class="fs12 color3">关注:'+item.visit_num+'</div>')
                             html.push('</div></div>');
                             html.push('</a>');
 						});

+ 1 - 1
WebContent/static/mobile/js/productDetail.js

@@ -537,7 +537,7 @@ function getHot() {
                 html.push('<div class="info-title">'+item.product_name+'</div>');
                 html.push('<div class="items">');
                 html.push('<div class="product-price item"><em>¥'+item.product_price+'<span class="del-line color3 ml5">'+item.product_old_price+'元</span></em></div>')
-                html.push('<div class="fs12 color3">已抢:'+item.sale_num+'</div>')
+                html.push('<div class="fs12 color3">关注:'+item.visit_num+'</div>')
                 html.push('</div></div>');
                 html.push('</a>');
             });

+ 4 - 4
src/com/mall/model/product/Product.java

@@ -241,7 +241,7 @@ public class Product extends Model<Product>
 
 	public List<Product> search(Map<String,Object> map){
 		StringBuffer sql = new StringBuffer();
-		sql.append(" select t.id,t.product_name,t.product_price,t.product_old_price,");
+		sql.append(" select t.id,t.product_name,t.product_price,t.product_old_price,visit_num,");
 		sql.append(" t.product_main_img,");
 		sql.append(" (select ifnull(sum(a.product_qty),0) from user_order a,user_order_detail b where ");
 		sql.append(" a.id =b.order_id and b.product_id = t.id and (order_status='20' or order_status='30' or order_status='40')) sale_num");
@@ -261,7 +261,7 @@ public class Product extends Model<Product>
 
     public List<Product> getHot(String id){
         StringBuffer sql = new StringBuffer();
-        sql.append(" select t.id,t.product_name,t.product_price,t.product_old_price,t.product_img_1,");
+        sql.append(" select t.id,t.product_name,t.product_price,t.product_old_price,t.product_img_1,visit_num,");
         sql.append(" t.product_main_img,");
         sql.append(" (select ifnull(sum(a.product_qty),0) from user_order a,user_order_detail b where ");
         sql.append(" a.id =b.order_id and b.product_id = t.id and (order_status='20' or order_status='30' or order_status='40')) sale_num");
@@ -276,7 +276,7 @@ public class Product extends Model<Product>
 
     public List<Product> getCut(){
         StringBuffer sql = new StringBuffer();
-        sql.append(" select t.id,t.product_name,t.product_price,t.product_old_price,t.product_img_1,");
+        sql.append(" select t.id,t.product_name,t.product_price,t.product_old_price,t.product_img_1,visit_num,");
         sql.append(" t.product_main_img,");
         sql.append(" (select ifnull(sum(a.product_qty),0) from user_order a,user_order_detail b where ");
         sql.append(" a.id =b.order_id and b.product_id = t.id and (order_status='20' or order_status='30' or order_status='40')) sale_num");
@@ -288,7 +288,7 @@ public class Product extends Model<Product>
 
     public List<Product> getEnd(){
         StringBuffer sql = new StringBuffer();
-        sql.append(" select t.id,t.product_name,t.product_price,t.product_old_price,t.product_img_1,t.time_status,");
+        sql.append(" select t.id,t.product_name,t.product_price,t.product_old_price,t.product_img_1,t.time_status,visit_num,");
         sql.append(" t.product_main_img,");
         sql.append(" (select ifnull(sum(a.product_qty),0) from user_order a,user_order_detail b where ");
         sql.append(" a.id =b.order_id and b.product_id = t.id and (order_status='20' or order_status='30' or order_status='40')) sale_num");