Browse Source

修改质保卡页面内容和保活请求百胜cookie

liuzhiwei 7 years ago
parent
commit
aa345278c8

+ 2 - 10
wateroPF-wechat-web/src/main/java/com/iamberry/wechat/handles/mq/MQTask.java

@@ -12,6 +12,7 @@ import java.util.concurrent.locks.ReentrantLock;
 import com.iamberry.wechat.core.entity.admin.ShopSystemRule;
 import com.iamberry.wechat.face.admin.SystemService;
 import com.iamberry.wechat.tools.HttpClient431Util;
+import com.iamberry.wechat.tools.NameUtils;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -363,18 +364,9 @@ public class MQTask implements InitializingBean {
 		try{
 			//获取cookie值
 			ShopSystemRule rule =  systemService.selectOneShopRuleById(244);
-
 			String phone = "13590159563";
-			String url = "http://121.199.165.244/efast_test/order_export.php";
+			String url = NameUtils.getConfig("efast_order_url") + phone;
 			Map<String,String> params = new HashMap<String,String>();
-			params.put("mobile",phone);     //手机号码
-			params.put("is_ajax","1");
-			params.put("act","query_order_export");
-			params.put("no_confirm","1");   //未确认
-			params.put("is_confirm","1");   //已确认
-			params.put("is_shipping","1");  //已发货
-			params.put("no_shipping","1");  //未发货
-			params.put("wait_shipping","1");//待发货
 			String cookie = rule.getRuleDesc();
 			//查询百胜订单信息
 			String str = HttpClient431Util.doGet(params,url,null,null,cookie);

+ 7 - 2
wateroPF-wechat-web/src/main/webapp/view/warranty_card.html

@@ -41,7 +41,7 @@
 	</div>
 	<div class="data-cards" id="data-cards">
 
-			<div class="warranty-box" style="display: block;">
+			<div class="warranty-box" id="add_warranty" style="display: none;">
 				<img src="//s.iamberry.com/wateroPF/new/images/shop/warranty_card.png"/>
 				<img class="go_add_warranty_card" style="position: absolute;width: 30%;left: 35%;top: 22%;" src="//s.iamberry.com/wateroPF/new/images/shop/add_warranty_card.png"/>
 				<div style="position: absolute;bottom: 15%;color: #fff;text-align: center;width: 100%;">添加质保卡</div>
@@ -97,6 +97,11 @@
                             	+'</div>'
                             	+'</div>'
                         });
+                        if (li == '') {
+                            $('#add_warranty').show();
+                        } else {
+                            $('#add_warranty').hide();
+                        }
                         table.append(li);
                     } else {
                         mui.alert(dt.message);
@@ -122,7 +127,7 @@
 	}
 	//添加质保卡
     mui('body').on('tap', '.go_add_warranty_card', function() {
-        location.href='#';
+        location.href='/wateroPF/view/add_machine.html';
 	});
 
     function dateFormat(now) {