Sfoglia il codice sorgente

圈在网订单列表添加角标

git-svn-id: svn://svn7.apicloud.com/A6007457911931/%E5%9C%88%E5%A4%9A%E5%A4%9A@661 0e1a2743-8d03-4e5a-a60c-7e26af42b145
1149931599@qq.com 4 anni fa
parent
commit
2aba514cdc
7 ha cambiato i file con 129 aggiunte e 16 eliminazioni
  1. 1 0
      home.html
  2. 63 3
      html/frame2.html
  3. 52 2
      html/frame3.html
  4. 4 2
      html/home/hoteldtl.html
  5. 1 1
      html/home/msglist.html
  6. 6 7
      html/home/showgoods.html
  7. 2 1
      slide.html

+ 1 - 0
home.html

@@ -116,6 +116,7 @@ function redirectAdv() {
         dataType: 'json',
         type: 'post',
         success: function(datas) {
+          console.log(datas.data);
             if (datas.result) {
                 if (datas.data.enable == 1) {
                     $('.adv').attr('style', 'background-image: url('+siteurl+'/uploads/home/adv/'+datas.data.images+')');

+ 63 - 3
html/frame2.html

@@ -21,6 +21,8 @@
             /*height: 0.76rem;*/
             line-height: 0.5rem;
             font-size: 0.28rem;
+			position: relative;
+			padding-top: 0.2rem;
         }
         .swiper-slide span {
             white-space: nowrap;
@@ -104,6 +106,24 @@
             font-size: 0.28rem;
             background-color: #fff;
         }
+		.dian{
+			position: absolute;
+			font-size: 10px;
+			color: #fff;
+			background-color: #D9332E;
+			border-radius: 25px;
+			top: 0.15rem;
+			right: -9px;
+			box-sizing: border-box;
+			white-space: nowrap;
+			text-align: center;
+			min-width:15px;
+			z-index: 999;
+			height: 0.3rem;
+			line-height: 0.3rem;
+			padding: 0 2px;
+			display: none;
+		}
       </style>
     <script>
     (function(w, d, m) {
@@ -141,12 +161,18 @@
             <li class="more-btn"></li>
         </ul>
     </header>
-    <section class="nav padding-top white-back" style="margin-top: 0.2rem;">
+    <section class="nav padding-top white-back" style="margin-top: 0.2rem;padding-top: 0.8rem;">
         <div class="swiper-container">
             <div class="swiper-wrapper">
                 <div class="swiper-slide active" state="100" state_as="all"><span>全部</span></div>
-                <div class="swiper-slide" state="10" state_as="waiting"><span>待付款</span></div>
-                <div class="swiper-slide" state="20,30" state_as="payed"><span>处理中</span></div>
+                <div class="swiper-slide waiting_count" state="10" state_as="waiting">
+					<span>待付款</span>
+					<em class="dian">9</em>
+				</div>
+                <div class="swiper-slide payed_count" state="20,30" state_as="payed">
+					<span>处理中</span>
+					<em class="dian">9</em>
+				</div>
                 <div class="swiper-slide" state="40" state_as="complete"><span>已收货</span></div>
                 <div class="swiper-slide" state="0" state_as="cancel"><span>已取消</span></div>
                 <!-- <div class="swiper-slide" state="50" state_as="refund"><span>退换/售后</span></div> -->
@@ -208,11 +234,45 @@ apiready = function() {
         _htmlstatus = true;
         lastpage = false;
         _page = '1';
+		$(".dian").hide();
         $(".border-none.kong").addClass("mask-hidden");
         getRouteData();
+		getNum();
     });
 };
 
+//获取订单角标
+function getNum(){
+	$.ajax({
+	    url: siteurl + 'v1/order/statistics',//'?do=orderdel',
+	    headers: { "X-TOKEN": $api.getStorage("accesstoken")},
+	    type: 'get',
+	    success: function(res) {
+			console.log(JSON.stringify(res));
+			var data=res.data;
+			if(data.waiting_count >0){
+				$(".waiting_count .dian").show();
+				if(data.waiting_count>99){
+					$(".waiting_count .dian").text('99+');
+				}else{
+					$(".waiting_count .dian").text(data.waiting_count);
+				}
+			}
+			if(data.payed_count >0){
+				$(".payed_count .dian").show();
+				if(data.waiting_count>99){
+					$(".payed_count .dian").text('99+');
+				}else{
+					$(".payed_count .dian").text(data.payed_count);
+				}
+				$(".payed_count .dian").text(data.payed_count);
+			}
+	    }
+	});
+};
+
+
+
 function getRouteData() {
     if (lastpage) {
         return false;

+ 52 - 2
html/frame3.html

@@ -42,6 +42,24 @@
         .my-head-name p {
             font-size: 0.2rem
         }
+		.dian{
+			position: absolute;
+			font-size: 10px;
+			color: #fff;
+			background-color: #D9332E;
+			border-radius: 25px;
+			top: 0rem;
+			right: 0px;
+			box-sizing: border-box;
+			white-space: nowrap;
+			text-align: center;
+			min-width:15px;
+			z-index: 999;
+			height: 0.3rem;
+			line-height: 0.3rem;
+			padding: 0 2px;
+			display: none;
+		}
     </style>
     <script>
     (function(w, d, m) {
@@ -95,11 +113,13 @@
         </div>
         <div class="my-order-btn">
             <ul>
-                <li class="order-list-btn" tag="10" state_as="waiting" tagname="待付款"><img src="../image/order_wat_pay.png" />
+                <li style="position: relative;" class="order-list-btn waiting_count" tag="10" state_as="waiting" tagname="待付款"><img src="../image/order_wat_pay.png" />
                     <p>待付款</p>
+					<em class="dian">9</em>
                 </li>
-                <li class="order-list-btn" tag="20,30" state_as="payed" tagname="处理中"><img src="../image/order_handle.png" />
+                <li style="position: relative;" class="order-list-btn payed_count" tag="20,30" state_as="payed" tagname="处理中"><img src="../image/order_handle.png" />
                     <p>处理中</p>
+					<em class="dian">9</em>
                 </li>
                 <li class="order-list-btn" tag="40" state_as="complete" tagname="待评价"><img src="../image/order_comment.png" />
                     <p>待评价</p>
@@ -191,9 +211,39 @@ apiready = function() {
         name:'viewappear'
     }, function(ret, err){
         getRouteData();
+		getNum();
     });
 };
 
+//获取订单角标
+function getNum(){
+	$.ajax({
+	    url: siteurl + 'v1/order/statistics',//'?do=orderdel',
+	    headers: { "X-TOKEN": $api.getStorage("accesstoken")},
+	    type: 'get',
+	    success: function(res) {
+			console.log(JSON.stringify(res));
+			var data=res.data;
+			if(data.waiting_count >0){
+				$(".waiting_count .dian").show();
+				if(data.waiting_count>99){
+					$(".waiting_count .dian").text('99+');
+				}else{
+					$(".waiting_count .dian").text(data.waiting_count);
+				}
+			}
+			if(data.payed_count >0){
+				$(".payed_count .dian").show();
+				if(data.waiting_count>99){
+					$(".payed_count .dian").text('99+');
+				}else{
+					$(".payed_count .dian").text(data.payed_count);
+				}
+				$(".payed_count .dian").text(data.payed_count);
+			}
+	    }
+	});
+};
 function getRouteData() {
     var _memberid = $api.getStorage("memberid");
     $.ajax({

+ 4 - 2
html/home/hoteldtl.html

@@ -564,7 +564,6 @@
 		});
 
 		function getRouteData(_storeid) {
-			// toast_loding_show();
 			$.ajax({
 				url: siteurl + 'v1/store/info',
 				data: {
@@ -576,6 +575,7 @@
 				dataType: 'json',
 				type: 'post',
 				success: function(datas) {
+					console.log(JSON.stringify(datas.data.store_slide))
 					if (datas.result) {
 						var img = siteurl + "uploads/home/store/" + datas.data.store_id + "/" + datas.data.store_banner;
 
@@ -607,7 +607,9 @@
 						}
 						if (datas.data.store_slide.length > 0) {
 							$.each(datas.data.store_slide, function(index, item) {
-								$(".swiper-wrapper").append('<div class="swiper-slide bg-full" style="background: url(' + item + ');">');
+								if (item.indexOf('jpg') != -1) {
+									$(".swiper-wrapper").append('<div class="swiper-slide bg-full" style="background: url(' + item + ');">');
+								}						
 							})
 						}
 						var swiper = new Swiper('.swiper-container', {

+ 1 - 1
html/home/msglist.html

@@ -199,7 +199,7 @@ function getRouteData() {
             member_id: $api.getStorage("memberid"),
             minid: _minid,
             page: _page,
-            page_size: '10'
+            page_size: '20'
         },
         headers: { "X-TOKEN": $api.getStorage("accesstoken") },
         dataType: 'json',

+ 6 - 7
html/home/showgoods.html

@@ -102,12 +102,11 @@
           color: #999;
         }
       span#goods_name.goods-desc-item.font-rem11 {
-          white-space: nowrap;
-          overflow: hidden;
-          text-overflow: ellipsis;
-          height: auto;
-          line-height: unset;
-          width: inherit;
+			overflow : hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-line-clamp: 2;
+			-webkit-box-orient: vertical;
       }
         .goods-desc-mtotal span#sale-number {
             color: #999;
@@ -419,7 +418,7 @@
                 <ul>
                     <li style="width: 5.1rem;">
                         <span class="goods-desc-item font-rem11" id="goods_name"></span>
-                        <p style="font-size: 0.26rem;color: #999;padding: 0.2rem 0 0.2rem 0px;">购买得<span class="goods-costprice">0</span>圈币</p>
+                        <p style="font-size: 0.26rem;color: #999;padding: 0.2rem 0 0.2rem 0px;">现金购买得<span class="goods-costprice">0</span>圈币</p>
                         <p class="goods-desc-item color-red" id="goods_price_span" style="color: #d9251c;">¥<span id="goods_price" class="color-red" style="color: #d9251c;"></span><span class="line-through"></span></p>
                     </li>
                     <li style="width: 1.7rem;">

+ 2 - 1
slide.html

@@ -103,9 +103,10 @@ function getRouteData() {
         dataType: 'json',
         type: 'post',
         success: function(datas) {
+			console.log(JSON.stringify(datas.data.slide));
             if (datas.result) {
                 $.each(datas.data.slide, function(index, item) {
-                    if (index == 2) {
+                    if (index == (datas.data.slide.length-1)) {
                         $(".swiper-wrapper").append('<div class="swiper-slide" id="go-to"><img src="' + siteurl + "uploads/home/adv/" + item.adv_code + '"/></div>');
                     } else {
                         $(".swiper-wrapper").append('<div class="swiper-slide"><img src="' + siteurl + "uploads/home/adv/" + item.adv_code + '"/></div>');