Pārlūkot izejas kodu

Merge branch 'master' of http://git.iamberry.com/wangxiaoming/iamberry-watero

# Conflicts:
#	watero-common-tool/src/main/java/com/iamberry/wechat/tools/loadResultUtil.java
#	watero-wechat-web/src/main/java/com/iamberry/wechat/handles/home/HomeHandler.java
wangxiaoming 5 gadi atpakaļ
vecāks
revīzija
00eb28adca
100 mainītis faili ar 715 papildinājumiem un 10160 dzēšanām
  1. 5 5
      pom.xml
  2. 25 12
      watero-common-core/src/main/java/com/iamberry/wechat/core/entity/ResultMsg.java
  3. 4 16
      watero-common-core/src/main/java/com/iamberry/wechat/core/entity/WechatUtils.java
  4. 2 2
      watero-common-tool/src/main/java/com/iamberry/app/config/ImberryConfig.java
  5. 55 35
      watero-common-tool/src/main/java/com/iamberry/wechat/tools/loadResultUtil.java
  6. 2 0
      watero-common-web/src/main/java/com/iamberry/common/web/SimpleCORSFilter.java
  7. 33 24
      watero-wechat-service/src/main/java/com/iamberry/wechat/service/home/HomeServiceImpl.java
  8. 2 1
      watero-wechat-service/src/main/java/com/iamberry/wechat/service/wechat/ConfigServiceImpl.java
  9. 9 8
      watero-wechat-web/src/main/java/com/iamberry/wechat/filters/AdminLoginFilter.java
  10. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/filters/CSRFTokenFilter.java
  11. 9 21
      watero-wechat-web/src/main/java/com/iamberry/wechat/filters/WechatFilter.java
  12. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/binding/BindingAppHandler.java
  13. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/binding/BindingHandler.java
  14. 261 505
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/cart/CartHandlers.java
  15. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/cart/ProbationOrderHandler.java
  16. 76 176
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/cart/ProductInfoHandler.java
  17. 21 67
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/coupon/CouponTypeHandler.java
  18. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/AdminWithDrp.java
  19. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/DrpAgentHandler.java
  20. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/DrpWeChatHandler.java
  21. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/PlaceInfoHandler.java
  22. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/PlaceLogsHandler.java
  23. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/PlaceWithDrawalsLogsHandler.java
  24. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/flow/TemplateFlowInfoHandler.java
  25. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/flow/TemplateInfoHandler.java
  26. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/game/GameHandler.java
  27. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/giftCard/AgentInfoHandler.java
  28. 33 60
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/home/HomeHandler.java
  29. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/lease/LeaseMachineHandler.java
  30. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/lease/LeaseOrderHandler.java
  31. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/member/MemberHandler.java
  32. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/member/WithdrawHandler.java
  33. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/official/ProspectusHandler.java
  34. 78 125
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/order/OrderHandler.java
  35. 2 8
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/pay/WechatBackHandler.java
  36. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/probation/ProbationHandler.java
  37. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/reback/RebackHandler.java
  38. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/reserve/ReserveController.java
  39. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/rewards/RewardsHandler.java
  40. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/statistics/AdminStatisticsHandler.java
  41. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/statistics/StatisticsRelationHandler.java
  42. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/AgentWechatHandler.java
  43. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/CashWechatHandler.java
  44. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/CouponWechatHandler.java
  45. 1 0
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/IntegralWechatHandler.java
  46. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/LuckDrawWechatHandler.java
  47. 1 1
      watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/ProductCartHandler.java
  48. BIN
      watero-wechat-web/src/main/resources/apiclient_cert.p12
  49. 0 0
      watero-wechat-web/src/main/resources/config.properties
  50. 6 27
      watero-wechat-web/src/main/resources/iamberry-wechat-service-datasource.xml
  51. 6 25
      watero-wechat-web/src/main/resources/iamberry-wechat-web-ioc.xml
  52. 1 1
      watero-wechat-web/src/main/resources/jdbc.properties
  53. 26 27
      watero-wechat-web/src/main/resources/log4j.properties
  54. 0 0
      watero-wechat-web/src/main/resources/mvc.xml
  55. 0 0
      watero-wechat-web/src/main/resources/orm.xml
  56. 0 0
      watero-wechat-web/src/main/resources/task.xml
  57. 0 12
      watero-wechat-web/src/main/webapp/WEB-INF/index.jsp
  58. 28 25
      watero-wechat-web/src/main/webapp/WEB-INF/web.xml
  59. 0 58
      watero-wechat-web/src/main/webapp/view/2017_51.html
  60. 0 96
      watero-wechat-web/src/main/webapp/view/after_service_watero.html
  61. 0 275
      watero-wechat-web/src/main/webapp/view/apply_replacement.html
  62. 0 247
      watero-wechat-web/src/main/webapp/view/apply_returns.html
  63. 0 226
      watero-wechat-web/src/main/webapp/view/coupon_bag.html
  64. 0 52
      watero-wechat-web/src/main/webapp/view/coupon_dec.html
  65. 0 167
      watero-wechat-web/src/main/webapp/view/deposit_coupon.html
  66. 0 555
      watero-wechat-web/src/main/webapp/view/faq.html
  67. 0 75
      watero-wechat-web/src/main/webapp/view/gift_card_agent_explain.html
  68. 0 115
      watero-wechat-web/src/main/webapp/view/gift_card_agent_xiaxian_list.html
  69. 0 230
      watero-wechat-web/src/main/webapp/view/gift_card_exchange_details.html
  70. 0 80
      watero-wechat-web/src/main/webapp/view/gift_card_exchange_win.html
  71. 0 251
      watero-wechat-web/src/main/webapp/view/gift_card_get_give.html
  72. 0 172
      watero-wechat-web/src/main/webapp/view/gift_card_give_order_list.html
  73. 0 89
      watero-wechat-web/src/main/webapp/view/gift_card_go_agent.html
  74. 0 495
      watero-wechat-web/src/main/webapp/view/gift_card_renew_agent.html
  75. 0 494
      watero-wechat-web/src/main/webapp/view/gift_card_to_agent.html
  76. 0 283
      watero-wechat-web/src/main/webapp/view/gift_card_user_exchange.html
  77. 0 421
      watero-wechat-web/src/main/webapp/view/i_want_lease_pay.html
  78. 0 407
      watero-wechat-web/src/main/webapp/view/i_want_lease_test.html
  79. 0 357
      watero-wechat-web/src/main/webapp/view/i_want_to_renew.html
  80. 0 225
      watero-wechat-web/src/main/webapp/view/input_machine.html
  81. 0 98
      watero-wechat-web/src/main/webapp/view/lease_desc.html
  82. 0 116
      watero-wechat-web/src/main/webapp/view/lease_order_win.html
  83. 0 40
      watero-wechat-web/src/main/webapp/view/lease_test_xieyi.html
  84. 0 74
      watero-wechat-web/src/main/webapp/view/lease_xieyi.html
  85. 0 43
      watero-wechat-web/src/main/webapp/view/member_benefits.html
  86. 0 142
      watero-wechat-web/src/main/webapp/view/order_service.html
  87. 0 82
      watero-wechat-web/src/main/webapp/view/product/certificate.html
  88. 0 101
      watero-wechat-web/src/main/webapp/view/push_jiangli.html
  89. 0 443
      watero-wechat-web/src/main/webapp/view/rent/i_want_lease.html
  90. 0 117
      watero-wechat-web/src/main/webapp/view/rent/iot.html
  91. 0 209
      watero-wechat-web/src/main/webapp/view/rent/lease_after_sales.html
  92. 0 169
      watero-wechat-web/src/main/webapp/view/rent/lease_for_my_equipment.html
  93. 0 449
      watero-wechat-web/src/main/webapp/view/rent/lease_order_details.html
  94. 0 696
      watero-wechat-web/src/main/webapp/view/rent/my_equipment.html
  95. 0 229
      watero-wechat-web/src/main/webapp/view/rent/renew_logs.html
  96. 0 40
      watero-wechat-web/src/main/webapp/view/rent/try_xieyi.html
  97. 0 229
      watero-wechat-web/src/main/webapp/view/replace_free_filter.html
  98. 0 282
      watero-wechat-web/src/main/webapp/view/replace_free_filter_log.html
  99. 0 37
      watero-wechat-web/src/main/webapp/view/system_view/404.jsp
  100. 0 0
      watero-wechat-web/src/main/webapp/view/system_view/500.jsp

+ 5 - 5
pom.xml

@@ -551,15 +551,15 @@
 	<!-- 配置 -->
 	<profiles>
 		<profile>
-			<id>jdk-1.7</id>
+			<id>jdk-1.8</id>
 			<activation>
 				<activeByDefault>true</activeByDefault>
-				<jdk>1.7</jdk>
+				<jdk>1.8</jdk>
 			</activation>
 			<properties>
-				<maven.compiler.source>1.7</maven.compiler.source>
-				<maven.compiler.target>1.7</maven.compiler.target>
-				<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
+				<maven.compiler.source>1.8</maven.compiler.source>
+				<maven.compiler.target>1.8</maven.compiler.target>
+				<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
 			</properties>
 		</profile>
 		<profile>

+ 25 - 12
watero-common-core/src/main/java/com/iamberry/wechat/core/entity/ResultMsg.java

@@ -1,5 +1,7 @@
 package com.iamberry.wechat.core.entity;
 
+import com.iamberry.wechat.tools.ResultInfo;
+
 /**
  * @description 作为服务影响的返回结果,常用业务错误,返回错误码和错误信息;
  * @author 欧阳明
@@ -7,24 +9,34 @@ package com.iamberry.wechat.core.entity;
  */
 public class ResultMsg implements java.io.Serializable{
 
-	/**
-	 * 
-	 */
 	private static final long serialVersionUID = 8987614804726091566L;
 
 	public static final String SUCCESS = "SUCCESS";
 	public static final String ERROR = "ERROR";
 
-	private boolean status; // 状态
-	
-	private String ResultCode ; //状态码
-	
-	private String message; //返回信息
-	
-	private Object data; //返回对象
+	// 状态
+	private boolean status;
+
+	//状态码
+	private String ResultCode ;
+
+	//返回信息
+	private String message;
+
+	//返回对象
+	private Object data;
 
 	public ResultMsg(){}
-	
+
+	public static ResultMsg SUCCESS() {
+		return new ResultMsg(true, ResultInfo.SUCCESSCODE, "SUCCESS", null);
+	}
+
+	public static ResultMsg ERROR() {
+		return new ResultMsg(false, ResultInfo.SUCCESSCODE, "ERRORINFO", null);
+	}
+
+
 	public ResultMsg(boolean status, String resultCode, String message,
 			Object data) {
 		super();
@@ -62,8 +74,9 @@ public class ResultMsg implements java.io.Serializable{
 		return data;
 	}
 
-	public void setData(Object data) {
+	public ResultMsg setData(Object data) {
 		this.data = data;
+		return this;
 	}
 	
 	

+ 4 - 16
watero-common-core/src/main/java/com/iamberry/wechat/core/entity/WechatUtils.java

@@ -70,14 +70,6 @@ public class WechatUtils {
 	 * @Time   2016年11月24日
 	 */
 	public static Member getUserBySession(HttpServletRequest request) {
-//
-//		Member m = new Member();
-//		m.setUserId(1);
-//		m.setUserOpenid("o3G6nww8FoM08HSbwpJqrhGu8V6Q");
-//		if(true){
-//			return m;
-//		}
-
 		//获取一个cookie数组
 		Cookie[] cookies = request.getCookies();
 		if (cookies == null) {
@@ -158,16 +150,12 @@ public class WechatUtils {
 	 */
 	public static String getOpenIdFunction(String callback) throws Exception {
 		String redirect_url = NameUtils.getConfig("WECHAT_BACK_URL");
-		
 		if (callback != null) {
 			redirect_url = redirect_url + "?callback=" + setCallback(callback);
 		}
-		StringBuilder builder = new StringBuilder("https://open.weixin.qq.com/connect/oauth2/authorize?appid=");
-		builder.append(NameUtils.getConfig("appId"))
-		.append("&redirect_uri=")
-		.append(URLEncoder.encode(redirect_url, "UTF-8"))
-		.append("&response_type=code&scope=snsapi_base&state=iamberry#wechat_redirect");
-		
-		return builder.toString();
+		return "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" +
+				NameUtils.getConfig("appId") +
+				"&redirect_uri=" + URLEncoder.encode(redirect_url, "UTF-8") +
+				"&response_type=code&scope=snsapi_base&state=iamberry#wechat_redirect";
 	}
 }

+ 2 - 2
watero-common-tool/src/main/java/com/iamberry/app/config/ImberryConfig.java

@@ -13,11 +13,11 @@ public class ImberryConfig {
 	public static String MASTERSECRET="";
 	public static String APPKEY="";
 	public static String CDN_URL="";
-	public static String BASE_URL=""; //头像前缀
+	public static String BASE_URL="";
 
 	static {
 		Properties pro = new Properties();
-		InputStream in = ImberryConfig.class.getClassLoader().getResourceAsStream("iamberry-app-service-config.properties");
+		InputStream in = ImberryConfig.class.getClassLoader().getResourceAsStream("config.properties");
 		try {
 			pro.load(in);
 			SMS_USERNAME = pro.getProperty("SMS_USERNAME");

+ 55 - 35
watero-common-tool/src/main/java/com/iamberry/wechat/tools/loadResultUtil.java

@@ -4,16 +4,14 @@ import java.io.IOException;
 import java.util.Properties;
 
 import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
-//@Component("loadResultInfo")
 public class loadResultUtil {
 	private static Logger logger = Logger.getLogger(loadResultUtil.class);
-	
-	static String fileName="ResultInfo.properties";
+	private static String fileName="ResultInfo.properties";
 	public loadResultUtil(){
 		logger.info("loadResultInfo启动");
 		load();
-//		test();
 	}
 	public static void load() {
 		logger.info("loadResultInfo.load启动");
@@ -62,38 +60,60 @@ public class loadResultUtil {
 			ResultInfo.failedReceiveMsg=prop.getProperty("failedReceiveMsg");
 			ResultInfo.successReceiveMsg=prop.getProperty("successReceiveMsg");
 
-			ResultInfo.PAGE_SHIPMENT = prop.getProperty("PAGE_SHIPMENT"); 			// 订单发货的界面
-			ResultInfo.TUIHUI_SHIPMENT = prop.getProperty("TUIHUI_SHIPMENT"); 		//收益退回的界面
-			ResultInfo.ORDER_GUOQI = prop.getProperty("ORDER_GUOQI"); 				//订单即将过期提醒
-			ResultInfo.TRY_ORDER_DETAIL = prop.getProperty("TRY_ORDER_DETAIL");		//试用订单详情
-			ResultInfo.RENT_ORDER_DETAIL = prop.getProperty("RENT_ORDER_DETAIL");		//租赁订单详情
-			ResultInfo.SERVICE_PUSH_URL = prop.getProperty("SERVICE_PUSH_URL");		//活动推送详情
-			ResultInfo.AGENT_REFERRER_MACHINE_PAGE = prop.getProperty("AGENT_REFERRER_MACHINE_PAGE");		//推荐人点击模板消息跳转链接
+			ResultInfo.PAGE_SHIPMENT = prop.getProperty("PAGE_SHIPMENT");
+			// 订单发货的界面
+			ResultInfo.TUIHUI_SHIPMENT = prop.getProperty("TUIHUI_SHIPMENT");
+			//收益退回的界面
+			ResultInfo.ORDER_GUOQI = prop.getProperty("ORDER_GUOQI");
+			//订单即将过期提醒
+			ResultInfo.TRY_ORDER_DETAIL = prop.getProperty("TRY_ORDER_DETAIL");
+			//试用订单详情
+			ResultInfo.RENT_ORDER_DETAIL = prop.getProperty("RENT_ORDER_DETAIL");
+			//租赁订单详情
+			ResultInfo.SERVICE_PUSH_URL = prop.getProperty("SERVICE_PUSH_URL");
+			//活动推送详情
+			ResultInfo.AGENT_REFERRER_MACHINE_PAGE = prop.getProperty("AGENT_REFERRER_MACHINE_PAGE");
+			//推荐人点击模板消息跳转链接
 			//消息的模板id
-			ResultInfo.rewards_template_id = prop.getProperty("rewards_template_id");		//返现到账通知 		模版id 	TM00211
-			ResultInfo.Income_template_id = prop.getProperty("Income_template_id");			//账户变更提醒 		模版id	TM00370
-			ResultInfo.Shipment_template_id = prop.getProperty("Shipment_template_id");		//订单包裹跟踪通知 	模版id	TM00665
-			ResultInfo.Order_template_id = prop.getProperty("Order_template_id");			//订单未支付通知 	模版id	TM00184
-			
-			ResultInfo.trial_progress_remind = prop.getProperty("trial_progress_remind");	//试用进度提醒
-			ResultInfo.probation_apply_notice = prop.getProperty("probation_apply_notice");	//试用申请通知
-			ResultInfo.probation_apply_success = prop.getProperty("probation_apply_success");//试用申请成功通知
-			ResultInfo.probation_pay_success = prop.getProperty("probation_pay_success");	//订单支付成功
-			ResultInfo.probation_shut_down = prop.getProperty("probation_shut_down");		//订单关闭通知	 	模版id	TM00984
-			ResultInfo.prize_receive_push = prop.getProperty("prize_receive_push");			//付费代理商支付后推送推荐人通知  	模版id
-			ResultInfo.female_lady_reply = prop.getProperty("female_lady_reply");			//2019 38 妇女节活动回复语
-			ResultInfo.service_push = prop.getProperty("service_push");			//服务推送模板
-			ResultInfo.probation_spell_success = prop.getProperty("probation_spell_success");			//拼单成功推送模板
-			ResultInfo.spellErrorMsg = prop.getProperty("spellErrorMsg");			//拼单成功推送模板
-			ResultInfo.chineseLottery = prop.getProperty("chineseLottery");			//七夕回复url
-			ResultInfo.chineseLotteryFailure = prop.getProperty("chineseLotteryFailure");			//七夕回复失败
-
-			ResultInfo.member_activation = prop.getProperty("member_activation");		//会员激活-生日提醒
-			ResultInfo.member_activation_desc = prop.getProperty("member_activation_desc");		//会员激活-生日提醒-模板中的内容
-
-			ResultInfo.register_member = prop.getProperty("register_member");		//关注一个月还未注册通知
-
-		} catch (IOException e) {
+			ResultInfo.rewards_template_id = prop.getProperty("rewards_template_id");
+			//返现到账通知 		模版id 	TM00211
+			ResultInfo.Income_template_id = prop.getProperty("Income_template_id");
+			//账户变更提醒 		模版id	TM00370
+			ResultInfo.Shipment_template_id = prop.getProperty("Shipment_template_id");
+			//订单包裹跟踪通知 	模版id	TM00665
+			ResultInfo.Order_template_id = prop.getProperty("Order_template_id");
+			//订单未支付通知 	模版id	TM00184
+			ResultInfo.trial_progress_remind = prop.getProperty("trial_progress_remind");
+			//试用进度提醒
+			ResultInfo.probation_apply_notice = prop.getProperty("probation_apply_notice");
+			//试用申请通知
+			ResultInfo.probation_apply_success = prop.getProperty("probation_apply_success");
+			//试用申请成功通知
+			ResultInfo.probation_pay_success = prop.getProperty("probation_pay_success");
+			//订单支付成功
+			ResultInfo.probation_shut_down = prop.getProperty("probation_shut_down");
+			//订单关闭通知	 	模版id	TM00984
+			ResultInfo.prize_receive_push = prop.getProperty("prize_receive_push");
+			//付费代理商支付后推送推荐人通知  	模版id
+			ResultInfo.female_lady_reply = prop.getProperty("female_lady_reply");
+			//2019 38 妇女节活动回复语
+			ResultInfo.service_push = prop.getProperty("service_push");
+			//服务推送模板
+			ResultInfo.probation_spell_success = prop.getProperty("probation_spell_success");
+			//拼单成功推送模板
+			ResultInfo.spellErrorMsg = prop.getProperty("spellErrorMsg");
+			//拼单成功推送模板
+			ResultInfo.chineseLottery = prop.getProperty("chineseLottery");
+			//七夕回复url
+			ResultInfo.chineseLotteryFailure = prop.getProperty("chineseLotteryFailure");
+			//七夕回复失败
+			ResultInfo.member_activation = prop.getProperty("member_activation");
+			//会员激活-生日提醒
+			ResultInfo.member_activation_desc = prop.getProperty("member_activation_desc");
+			//会员激活-生日提醒
+            //关注一个月未注册
+            ResultInfo.register_member = prop.getProperty("register_member");		//关注一个月还未注册通知
+        } catch (IOException e) {
 			new RuntimeException(e.getMessage());
 		}
 	}

+ 2 - 0
watero-common-web/src/main/java/com/iamberry/common/web/SimpleCORSFilter.java

@@ -9,6 +9,7 @@ import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
+import javax.servlet.annotation.WebFilter;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -18,6 +19,7 @@ import org.apache.commons.lang3.StringUtils;
  * @description: 设置跨域请求
  * @createDate:2016年5月26日
  */
+@WebFilter("/*")
 public class SimpleCORSFilter implements Filter {
 	
 	public static List<String> origins = new ArrayList<String>(14);

+ 33 - 24
watero-wechat-service/src/main/java/com/iamberry/wechat/service/home/HomeServiceImpl.java

@@ -1,6 +1,8 @@
 package com.iamberry.wechat.service.home;
 import java.util.List;
 
+import com.iamberry.wechat.service.mapper.AdminBannerMapper;
+import com.iamberry.wechat.service.mapper.HomeMemberMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.dao.DuplicateKeyException;
 import org.springframework.stereotype.Service;
@@ -20,71 +22,77 @@ import com.iamberry.wechat.service.home.dao.HomeServiceDao;
 public class HomeServiceImpl implements HomeService {
 
 	@Autowired
-	private AdminBannerService adminBannerService;
+	private AdminBannerMapper adminBannerMapper;
+
 	@Autowired
-	private HomeServiceDao homeServiceDao;
+	private HomeMemberMapper homeMemberMapper;
 	
+	@Override
 	public List<ActionBannerImage> selectNowBannerByType() {
 		// TODO Auto-generated method stub
-		return adminBannerService.selectNowBannerByType(null);
+		return adminBannerMapper.selectNowBannerByType(null);
 	}
 
-	
+	@Override
 	public Member selectMemberInfoByOpenId(String openid) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.selectMemberInfoByOpenId(openid);
+		return homeMemberMapper.selectMemberInfoByOpenId(openid);
 	}
 
-	
+	@Override
 	public Integer updateWechatMemberInfoByByOpenid(Member member) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.updateWechatMemberInfoByByOpenid(member);
+		return homeMemberMapper.updateWechatMemberInfoByByOpenid(member);
 	}
 
-	
+	@Override
 	public Integer insertMemberInfo(Member member) {
 		// TODO Auto-generated method stub
 		try {
-			return homeServiceDao.insertMemberInfo(member);
-		} catch (DuplicateKeyException e) { // 报错,触发数据库唯一约束错误,系统捕获,而后对获取数据重头再来
-			// TODO: handle exception
-			member = homeServiceDao.selectMemberInfoByOpenId(member.getUserOpenid());
+			return homeMemberMapper.insertMemberInfo(member);
+		} catch (DuplicateKeyException e) {
+			// 报错,触发数据库唯一约束错误,系统捕获,而后对获取数据重头再来
+			member = homeMemberMapper.selectMemberInfoByOpenId(member.getUserOpenid());
 			return 1;
 		}
 	}
 
-	
+	@Override
 	public Integer updateUserResAndTypeByOpenid(Member member) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.updateUserResAndTypeByOpenid(member);
+		return homeMemberMapper.updateUserResAndTypeByOpenid(member);
 	}
 
-	
+	@Override
 	public Integer updateMemberStatusByOpenId(String openid) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.updateMemberStatusByOpenId(openid);
+		return homeMemberMapper.updateMemberStatusByOpenId(openid);
 	}
 
-	
+
+	@Override
 	public Member selectMemberQrcodeUrlByOpenid(String openid) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.selectMemberQrcodeUrlByOpenid(openid);
+		return homeMemberMapper.selectMemberQrcodeUrlByOpenid(openid);
 	}
 
-	
+
+	@Override
 	public Integer updateMemberQrcodeByOpenid(Member member) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.updateMemberQrcodeByOpenid(member);
+		return homeMemberMapper.updateMemberQrcodeByOpenid(member);
 	}
+
 	public Integer selectUserIntegralByOpenid(String openid) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.selectUserIntegralByOpenid(openid);
+		return homeMemberMapper.selectUserIntegralByOpenid(openid);
 	}
 
-	
+
+	@Override
 	public Member selectUserInfoByPlaceId(Integer placeId) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.selectUserInfoByPlaceId(placeId);
+		return homeMemberMapper.selectUserInfoByPlaceId(placeId);
 	}
 	
 	/**
@@ -92,8 +100,9 @@ public class HomeServiceImpl implements HomeService {
 	 * @param member
 	 * @return
 	 */
+	@Override
 	public Integer updateMemberIsFlagByOpenid(Member member) {
 		// TODO Auto-generated method stub
-		return homeServiceDao.updateMemberIsFlagByOpenid(member);
+		return homeMemberMapper.updateMemberIsFlagByOpenid(member);
 	}
 }

+ 2 - 1
watero-wechat-service/src/main/java/com/iamberry/wechat/service/wechat/ConfigServiceImpl.java

@@ -43,7 +43,8 @@ public class ConfigServiceImpl implements ConfigService {
 	 * @return
 	 * @throws SQLException
 	 */
-	public JSONObject selectConfig(String appid,String url){
+	@Override
+	public JSONObject selectConfig(String appid, String url){
 		try {
 			// 数据库获取微信配置,并获取ticket
 			Config cfg = configDAO.getConfig(appid);

+ 9 - 8
watero-wechat-web/src/main/java/com/iamberry/wechat/filters/AdminLoginFilter.java

@@ -36,10 +36,11 @@ public class AdminLoginFilter implements Filter {
 
 	public AdminLoginFilter() {}
 
+	@Override
 	public void destroy() {
 	}	
 
-	@SuppressWarnings("unchecked")
+	@Override
 	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
 		
 		// 权限拦截类
@@ -48,13 +49,12 @@ public class AdminLoginFilter implements Filter {
 		
 		// 当前路径,相对于应用路径,不包括参数
 		String url = req.getRequestURI().replace(req.getContextPath(), "");
-		if (url.indexOf("?") != -1) {
+		if (url.contains("?")) {
 			url = url.substring(0,  url.indexOf("?"));
 		}
 		// 防止盗链:一旦请求后台的数据,一定要经过判断,就算只是基本防范
 		String referer = req.getHeader("referer");
-		if (StringUtils.isEmpty(referer) || 
-				(!(referer.startsWith("http://localhost") || referer.startsWith(NameUtils.getConfig("IMAGE_BASE_URL"))))) {
+		if (StringUtils.isEmpty(referer) || (!(referer.startsWith("http://localhost") || referer.startsWith(NameUtils.getConfig("IMAGE_BASE_URL"))))) {
 			setRequestDispatcherInfo(req, resp);return;
 		}
 
@@ -93,7 +93,7 @@ public class AdminLoginFilter implements Filter {
 			if (adminChildPermissionErmissions.getErmissionsUrl() != null) {
 
 				// 权限中包括**, 表示当前*前面的/下面的所有路径允许访问
-				if (adminChildPermissionErmissions.getErmissionsUrl().indexOf("**") != -1) {
+				if (adminChildPermissionErmissions.getErmissionsUrl().contains("**")) {
 					String path = adminChildPermissionErmissions.getErmissionsUrl();
 					path = path.substring(0, path.indexOf("*"));
 					if (url.startsWith(path)) {
@@ -103,11 +103,11 @@ public class AdminLoginFilter implements Filter {
 				}
 
 				// 权限中包括*,表示当前*前面/下面的所有的路径允许访问
-				if (adminChildPermissionErmissions.getErmissionsUrl().indexOf("*") != -1) {
+				if (adminChildPermissionErmissions.getErmissionsUrl().contains("*")) {
 					String path = adminChildPermissionErmissions.getErmissionsUrl();
 					path = path.substring(0, path.indexOf("*"));
 					url = url.replaceAll(path, "");
-					if (url.indexOf("/") == -1) {
+					if (!url.contains("/")) {
 						// 合法
 						return true;
 					}
@@ -121,11 +121,12 @@ public class AdminLoginFilter implements Filter {
 		return false;
 	}
 
-	public void setRequestDispatcherInfo(HttpServletRequest req, HttpServletResponse resp)
+	private void setRequestDispatcherInfo(HttpServletRequest req, HttpServletResponse resp)
 			throws ServletException, IOException {
 		req.setAttribute("title", "对不起,您的权限不够!");
 		req.setAttribute("text", "对不起,您的权限不够!请联系管理员!");
 		req.getRequestDispatcher(ERROR_PAGE).forward(req, resp);
 	}
+	@Override
 	public void init(FilterConfig fConfig) throws ServletException {}
 }

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/filters/CSRFTokenFilter.java

@@ -30,7 +30,7 @@ import com.iamberry.wechat.tools.IpAddressUtil;
  * 			使用注意:如果多次重复启动,可能导致系统拒绝服务,这只是因为tomcat默认最多接受200个cookie的缘故,关闭浏览器重新打开即可。
  * 			另外系统本身已经做了优化处理,保证99%情况下不会出现问题。
  */
-@WebFilter(value = {"/admin/*", "/loginUI"})
+//@WebFilter(value = {"/admin/*", "/loginUI"})
 public class CSRFTokenFilter implements Filter {
 	
 	/**

+ 9 - 21
watero-wechat-web/src/main/java/com/iamberry/wechat/filters/WechatFilter.java

@@ -29,8 +29,9 @@ public class WechatFilter implements Filter {
 
 	private static Logger logger = LoggerFactory.getLogger(WechatFilter.class);
 	
+	@Override
 	public void doFilter(ServletRequest request, ServletResponse response,
-			FilterChain chain) throws IOException, ServletException {
+						 FilterChain chain) throws IOException, ServletException {
 		// 权限拦截类
 		HttpServletRequest req = (HttpServletRequest) request;
 		HttpServletResponse resp = (HttpServletResponse) response;
@@ -40,11 +41,10 @@ public class WechatFilter implements Filter {
 			chain.doFilter(req, resp);
 		} catch (UserNotLoginException e) {
 			// 未登录的用户处理逻辑
-			logger.info(e.getMessage() + " User Not Login!");
 			try {
 				forword(req, resp, chain);
 			} catch (Exception e1) {
-				logger.error("[致命错误 4003]" + e1.getMessage());
+				logger.error("[致命错误]" + e1.getMessage());
 			}
 		}
 	}
@@ -58,7 +58,7 @@ public class WechatFilter implements Filter {
 	 * @throws Exception 
 	 * @Time   2016年11月24日
 	 */
-	public void forword(HttpServletRequest req, HttpServletResponse resp, FilterChain chain) throws Exception {
+	private void forword(HttpServletRequest req, HttpServletResponse resp, FilterChain chain) throws Exception {
 		// 如果不是扫描二维码,那么获取后转发微信服务器,完成授权。
 		String query = req.getQueryString();
 		String urlstr = req.getRequestURI().replace(req.getContextPath(), "");
@@ -66,34 +66,22 @@ public class WechatFilter implements Filter {
 			urlstr = urlstr + "?" + query;
 		}
 		String url = WechatUtils.getOpenIdFunction(urlstr);
-		
 		// 判断请求,如果是来自Ajax,那么直接返回302跳转会导致前端报错,所以返回JSON格式数据,状态为200
 		String requestedWith = req.getHeader("x-requested-with");
 		String accept = req.getHeader("accept");
-		if ((requestedWith != null && StringUtils.isNotEmpty(requestedWith) && requestedWith.indexOf("XMLHttpRequest") != -1)
-				|| (StringUtils.isNotEmpty(accept) && accept.indexOf("json") != -1)) {
+		boolean isWith = (StringUtils.isNotEmpty(requestedWith) && requestedWith.contains("XMLHttpRequest"));
+		boolean isAccept = (StringUtils.isNotEmpty(accept) && accept.contains("json"));
+		if (isWith || isAccept) {
 			// 客户端需要的是json数据
 			String redirectURL = req.getHeader("Referer");
 			resp.getWriter().write("{\"isRedirect\":true, \"redirectURL\":\"" + WechatUtils.getOpenIdFunction(redirectURL) + "\"}");
 			return;
 		}
-
 		// 客户端没有登录的请求不是来自于Ajax,可以执行跳转动作
 		resp.sendRedirect(url);
 	}
-
-	/**
-	 * 转发请求
-	 * @param req
-	 * @param resp
-	 * @param url
-	 * @throws ServletException
-	 * @throws IOException
-	 * @author 献
-	 * @Time   2016年12月2日
-	 */
-	public void setRequestDispatcherInfo(HttpServletRequest req, HttpServletResponse resp, String url) 
-			throws ServletException, IOException {resp.sendRedirect(url);}
+	@Override
 	public void init(FilterConfig fConfig) throws ServletException {}
+	@Override
 	public void destroy() {}
 }

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/binding/BindingAppHandler.java

@@ -37,6 +37,7 @@ import com.iamberry.wechat.tools.ResultInfo;
  * @author 欧阳明
  * @date  2016-06-08
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/qrcode/")
 public class BindingAppHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/binding/BindingHandler.java

@@ -26,6 +26,7 @@ import com.iamberry.wechat.tools.ObjectExcelView;
  * @author 穆再兴
  *
  */
+@Deprecated
 @Controller
 @RequestMapping("/admin/binding")
 public class BindingHandler {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 261 - 505
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/cart/CartHandlers.java


+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/cart/ProbationOrderHandler.java

@@ -33,6 +33,7 @@ import com.iamberry.wechat.tools.ResponseJson;
 import com.iamberry.wechat.tools.ResultInfo;
 import com.iamberry.wechat.sendMsg.SendMessageUtil;
 @Controller
+@Deprecated
 @RequestMapping("/wechat/probationOrder")
 public class ProbationOrderHandler {
 	@Autowired

+ 76 - 176
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/cart/ProductInfoHandler.java

@@ -83,23 +83,20 @@ public class ProductInfoHandler {
 	public ResultMsg productIndex(HttpServletRequest request,
 			@RequestParam(value= "pageSize",defaultValue= "6" ,required=false) Integer pageSize,
 			@RequestParam(value = "pageNO", defaultValue = "1") Integer pageNO,
-			@RequestParam(value = "productName", defaultValue = "")String productName,
+			@RequestParam(value = "productName", required = false)String productName,
 			@RequestParam(value = "productType", defaultValue = "1") Integer productType,
 			@RequestParam(value = "productRentType", defaultValue = "1") Integer productRentType) throws Exception {
-		
-		ResultMsg remsg= new ResultMsg();
-		Member member =  WechatUtils.getUserBySession(request);
-		//member.setUserId(11907);
-		//member.setUserOpenid("o-icas-WiwbEXfwO1wLGDKQ1iWJU");
+		// 获取当前登陆的用户
+		WechatUtils.getUserBySession(request);
+		// 组装查询数据
 		Product product = new Product();
-		if (null != productName && !"".equals(productName)) {
-			product.setProductName(productName);
-		}
+		product.setProductName(productName);
 		product.getProductType().setTypeId(productType);
 		product.setProductRentType(productRentType);
 		product.getPage().setPageNumber(pageNO);
 		product.getPage().setPageSize(pageSize);
 		product.getPage().initRecordBegin();
+		// 查询产品
 		List<Product> productList = productInfoService.selectPageProduct(product);
 		Promotions promotions = activityUtil.getAllPromotions();
 		if(promotions != null){
@@ -116,17 +113,13 @@ public class ProductInfoHandler {
 				}
 			}
 		}
-
+		// 返回数据
 		int num = this.productInfoService.selectProductCount(product);
 		int count = num % pageSize == 0? num/pageSize:(num/pageSize)+1;
-		Map<String, Object> map = new HashMap<String, Object>();
+		Map<String, Object> map = new HashMap<String, Object>(2);
 		map.put("productList", productList);
 		map.put("total", count);
-		remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-		remsg.setResultCode(ResultInfo.SUCCESSCODE);
-		remsg.setStatus(true);
-		remsg.setData(map);
-		return remsg;
+		return ResultMsg.SUCCESS().setData(map);
 	}
 
 
@@ -139,26 +132,16 @@ public class ProductInfoHandler {
 	@ResponseBody
 	@RequestMapping(value = "/productIndexSellWell",method = RequestMethod.POST)
 	public ResultMsg productIndexSellWell(HttpServletRequest request) throws Exception {
-		ResultMsg remsg= new ResultMsg();
-		Member member =  WechatUtils.getUserBySession(request);
-
+		// 准备查询的数据
 		IndexProduct firColuProduct = new IndexProduct();
 		firColuProduct.setIndeProdType(1);
-		List<IndexProduct> firColuProductList = indexProductService.getIndexProductList(firColuProduct);
-
-		IndexProduct SecColuProduct = new IndexProduct();
-		SecColuProduct.setIndeProdType(2);
-		List<IndexProduct> SecColuProductList = indexProductService.getIndexProductList(SecColuProduct);
-
-
-		Map<String, Object> map = new HashMap<String, Object>();
-		map.put("firColuProductList", firColuProductList);
-		map.put("SecColuProductList", SecColuProductList);
-		remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-		remsg.setResultCode(ResultInfo.SUCCESSCODE);
-		remsg.setStatus(true);
-		remsg.setData(map);
-		return remsg;
+		IndexProduct seccoluproduct = new IndexProduct();
+		seccoluproduct.setIndeProdType(2);
+		// 开始返回
+		Map<String, Object> map = new HashMap<String, Object>(2);
+		map.put("firColuProductList", indexProductService.getIndexProductList(firColuProduct));
+		map.put("SecColuProductList", indexProductService.getIndexProductList(seccoluproduct));
+		return ResultMsg.SUCCESS().setData(map);
 	}
 	
 	/**
@@ -171,32 +154,15 @@ public class ProductInfoHandler {
 	 */
 	@ResponseBody
 	@RequestMapping("/getProductByProductId")
-	public ResultMsg getProductByProductId(HttpServletRequest request,HttpServletResponse response,
-			@RequestParam(value = "productId",defaultValue = "") String productId, 
-			@RequestParam("colorId") Integer colorId 
-			) throws Exception {
-
-		ResultMsg remsg = new ResultMsg();
+	public ResultMsg getProductByProductId(
+			HttpServletRequest request,
+			HttpServletResponse response,
+			@RequestParam(value = "productId") String productId,
+			@RequestParam("colorId") Integer colorId) throws Exception {
+		// 获取当前登陆的用户信息
 		Member member =  WechatUtils.getUserBySession(request);
-		//member.setUserId(11907);
-		//member.setUserOpenid("o-icas-WiwbEXfwO1wLGDKQ1iWJU");
+		ResultMsg remsg = new ResultMsg();
 		Map<String, Object> map=null;
-		/*
-		 * 判断用户信息及其参数
-		 */
-		if (member == null || member.getUserOpenid() == null) {
-			remsg.setMessage(ResultInfo.loginOutError);
-			remsg.setStatus(false);
-			remsg.setMessage(ResultInfo.loginOutError);
-			return remsg;
-		}
-		if (productId == null) {
-			remsg.setStatus(false);
-			remsg.setResultCode(ResultInfo.ERRORCODE);
-			remsg.setMessage(NameUtils.getConfig("ERRORINFO"));
-			return remsg;
-		}
-		
 		if (StaticInfo.pattern.matcher(productId).find()) {
 			Product product = this.productInfoService.getProductByProductId(Integer.parseInt(productId),colorId);
 
@@ -222,18 +188,11 @@ public class ProductInfoHandler {
 			/*
 			 * 组装数据
 			 */
-			map = new HashMap<String, Object>();
-//			map.put("isShow", ResultInfo.ISSHOW);
-//			map.put("cartDesc", ResultInfo.CARTDESC);
-//			map.put("cart_url", ResultInfo.CART_URL);
+			map = new HashMap<String, Object>(3);
 			map.put("product", product);
 			map.put("shareOpenid", member.getUserOpenid());
 			map.put("colorList", colorList);
-			remsg.setData(map);
-			remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-			remsg.setResultCode(ResultInfo.SUCCESSCODE);
-			remsg.setStatus(true);
-			return remsg;
+			return ResultMsg.SUCCESS().setData(map);
 		}
 		
 		try {
@@ -244,21 +203,13 @@ public class ProductInfoHandler {
 			/*
 			 * 组装数据
 			 */
-			map = new HashMap<String, Object>();
-//			map.put("isShow", ResultInfo.ISSHOW);
-//			map.put("cartDesc", ResultInfo.CARTDESC);
-//			map.put("cart_url", ResultInfo.CART_URL);
+			map = new HashMap<String, Object>(2);
 			map.put("product", product);
 			map.put("shareOpenid", member.getUserOpenid());
-			remsg.setData(map);
-			remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-			remsg.setResultCode(ResultInfo.SUCCESSCODE);
+			return ResultMsg.SUCCESS().setData(map);
 		} catch (Exception e) {
-			remsg.setMessage(NameUtils.getConfig("ERRORINFO"));
-			remsg.setResultCode(ResultInfo.ERRORCODE);
-			remsg.setStatus(false);			
+			return ResultMsg.ERROR().setData(e.getMessage());
 		}
-		return remsg;
 	}
 	
 	/**
@@ -271,37 +222,20 @@ public class ProductInfoHandler {
 	 */
 	@ResponseBody
 	@RequestMapping("/getPictureByProductId")
-	public ResultMsg getPictureByProductId(HttpServletRequest request,HttpServletResponse response,
-			@RequestParam(value = "productId",defaultValue = "") String productId) throws Exception {
-		ResultMsg remsg = new ResultMsg();
-		if (productId == null) {
-			remsg.setStatus(false);
-			remsg.setResultCode(ResultInfo.ERRORCODE);
-			remsg.setMessage(NameUtils.getConfig("ERRORINFO"));
-			return remsg;
-		}
+	public ResultMsg getPictureByProductId(@RequestParam(value = "productId") String productId) throws Exception {
 		if (StaticInfo.pattern.matcher(productId).find()) {
 			ProductImageText productImageText = productImageTextService.getProductImageTextByProduectId(Integer.parseInt(productId));
-			remsg.setData(productImageText);
-			remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-			remsg.setResultCode(ResultInfo.SUCCESSCODE);
-			remsg.setStatus(true);
-			return remsg;
+			return ResultMsg.SUCCESS().setData(productImageText);
 		}
 		try {
 			String productIdString = StaticInfo.md5.decrypt(productId);
 			ProductImageText productImageText = productImageTextService.getProductImageTextByProduectId(Integer.parseInt(productId));
 			List<ProductPicture> pictureList = productPictureService.getProductPictureByproductId(Integer.parseInt(productIdString));
 			productImageText.setPictureList(pictureList);
-			remsg.setData(productImageText);
-			remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-			remsg.setResultCode(ResultInfo.SUCCESSCODE);
+			return ResultMsg.SUCCESS().setData(productImageText);
 		} catch (Exception e) {
-			remsg.setMessage(NameUtils.getConfig("ERRORINFO"));
-			remsg.setResultCode(ResultInfo.ERRORCODE);
-			remsg.setStatus(false);			
+			return ResultMsg.ERROR().setData(e.getMessage());
 		}
-		return remsg;
 	}
 	
 	/**
@@ -314,65 +248,52 @@ public class ProductInfoHandler {
 	 */
 	@ResponseBody
 	@RequestMapping("/getProductByProductName")
-	public ResultMsg getProductByProductName(HttpServletRequest request,HttpServletResponse response,
-			@RequestParam(value = "productName", defaultValue = "")String productName) throws Exception {
-		
-		List<Product> productList = new ArrayList<Product>();
-		ResultMsg remsg=new ResultMsg();
+	public ResultMsg getProductByProductName(
+			HttpServletRequest request,
+			HttpServletResponse response,
+			@RequestParam(value = "productName", required = false) String productName) throws Exception {
+		// 获取登陆的用户
 		Member member =  WechatUtils.getUserBySession(request);
-		
+		// 查询
+		List<Product> productList = productInfoService.getProductByProductName(productName);
+		if (productList == null || productList.isEmpty()) {
+			return ResultMsg.SUCCESS().setData(productList);
+		}
 		/*
-		 * 判断用户信息及其参数
+		 * 优惠价计算
 		 */
-		if (member == null || member.getUserOpenid() == null) {
-			remsg.setMessage(ResultInfo.loginOutError);
-			remsg.setStatus(false);
-			remsg.setMessage(ResultInfo.loginOutError);
-			return remsg;
-		}
-		
-		if (null != productName && !"".equals(productName)) {
-			productName = "%" + productName + "%";
-		}
-		productList = this.productInfoService.getProductByProductName(productName);
-		
-		if (productList != null && productList.size() >= 1) {
-			/*
-			 * 优惠价计算
-			 */
-			boolean isPrice = false;
-			if (member.getUserIdentity() != null && member.getUserIdentity() == 2) { 									// 微代理:优惠价
+		boolean isPrice = false;
+		if (member.getUserIdentity() != null && member.getUserIdentity() == 2) {
+			// 微代理:优惠价
+			isPrice = true;
+		} else {
+			if (member.getUserResType() != null && (member.getUserResType() == 2 || member.getUserResType() == 3)) {
+				// 来源他人二维码:优惠价
 				isPrice = true;
 			} else {
-				if (member.getUserResType() != null && (member.getUserResType() == 2 || member.getUserResType() == 3)) { // 来源他人二维码:优惠价
+				Member tempMember = memberService.selectUserResAndIdSByOpenId(member.getUserOpenid());
+				member.setUserIdentity(tempMember.getUserIdentity());
+				member.setUserResType(tempMember.getUserResType());
+				if (tempMember.getUserIdentity() == 2) {
+					// 微代理:优惠价
 					isPrice = true;
 				} else {
-					Member tempMember = memberService.selectUserResAndIdSByOpenId(member.getUserOpenid());
-					member.setUserIdentity(tempMember.getUserIdentity());
-					member.setUserResType(tempMember.getUserResType());
-					if (tempMember.getUserIdentity() == 2) {// 微代理:优惠价
+					if (tempMember.getUserResType() == 2 || tempMember.getUserResType() == 3) {
+						// 来源他人二维码:优惠价
 						isPrice = true;
-					} else {
-						if (tempMember.getUserResType() == 2 || tempMember.getUserResType() == 3) { // 来源他人二维码:优惠价
-							isPrice = true;
-						}
 					}
 				}
 			}
-			if (isPrice) {
-				int price = systemService.selectOneShopRuleById(22).getRuleNum().intValue(); 
-				for (Product product2 : productList) {
-					product2.setProductPrice(product2.getProductDiscount());
-					product2.setProductDiscount(price);
-				}
+		}
+		if (isPrice) {
+			int price = systemService.selectOneShopRuleById(22).getRuleNum().intValue();
+			for (Product product2 : productList) {
+				product2.setProductPrice(product2.getProductDiscount());
+				product2.setProductDiscount(price);
 			}
 		}
 		
-		remsg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-		remsg.setResultCode(ResultInfo.SUCCESSCODE);
-		remsg.setStatus(true);
-		remsg.setData(productList);
-		return remsg;
+		return ResultMsg.SUCCESS().setData(productList);
 	}
 
 	/**
@@ -384,32 +305,16 @@ public class ProductInfoHandler {
 	@ResponseBody
 	@RequestMapping(value = "/shareProductUrl", method = RequestMethod.POST)
 	public ResultMsg shareProductUrl(
-			@RequestParam(value = "productId", required = false) Integer productId,
+			@RequestParam(value = "productId") Integer productId,
 			HttpServletRequest request
 			) throws Exception {
-		ResultMsg msg = new ResultMsg();
-		msg.setResultCode(ResultInfo.ERRORCODE);
-		
 		Member member = WechatUtils.getUserBySession(request);
-		if (member == null || member.getUserOpenid() == null) {
-			msg.setMessage(ResultInfo.loginOutError);
-			return msg;
-		}
-		if (productId == null) {
-			msg.setMessage(ResultInfo.paramFormatError);
-			return msg;
-		}
-		
-		StringBuffer buffer = new StringBuffer(NameUtils.getConfig("WECHAT_PRODUCT_SHARE_URL"));
-		buffer.append("?shareUser=" + StaticInfo.md5.encrypt(member.getUserOpenid()));
-		buffer.append("&productId=" + StaticInfo.md5.encrypt(productId.toString()));
-		buffer.append("&isShare=true&isProduct=true&isEnable=true"); // 是否分享,是否为产品,是否启动
-		
-		msg.setData(buffer.toString());
-		msg.setStatus(true);
-		msg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-		msg.setResultCode(ResultInfo.SUCCESSCODE);
-		return msg;
+		// 是否分享,是否为产品,是否启动
+		String buffer = NameUtils.getConfig("WECHAT_PRODUCT_SHARE_URL") +
+				"?shareUser=" + StaticInfo.md5.encrypt(member.getUserOpenid()) +
+				"&productId=" + StaticInfo.md5.encrypt(productId.toString()) +
+				"&isShare=true&isProduct=true&isEnable=true";
+		return ResultMsg.SUCCESS().setData(buffer);
 	}
 	
 	/**
@@ -420,15 +325,10 @@ public class ProductInfoHandler {
 	 * @throws ServletException
 	 * @throws IOException
 	 */
+	@Deprecated
 	@RequestMapping(value = "/desc", method = RequestMethod.GET)
-	public void productDesc(
-			@RequestParam("productId") Integer productId,
+	public void productDesc(@RequestParam("productId") Integer productId,
 			HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-		// 校验数据
-		if (productId == null || "".equals(productId)) {
-			request.getRequestDispatcher(NameUtils.getConfig("WECHAT_SHOP_PRODUCT_LIST_PAGE")).forward(request, response);return;
-		}
-		
 		//如果是分享 则绑定关系
 		Member member = WechatUtils.getUserBySession(request);
 		String shareOpenid = request.getParameter("shareOpenid");
@@ -436,8 +336,6 @@ public class ProductInfoHandler {
 			memberService.buildChildUser(shareOpenid, member,1,1);
 		}
 		request.getRequestDispatcher(NameUtils.getConfig("WECHAT_SHOP_PRODUCT_DESC_PAGE")).forward(request, response);
-		//response.sendRedirect(NameUtils.getConfig("WECHAT_SHOP_PRODUCT_DESC_PAGE"));
-		return;
 	}
 	
 	
@@ -447,6 +345,7 @@ public class ProductInfoHandler {
 	 * @param request
 	 * @param response
 	 */
+	@Deprecated
 	@RequestMapping(value = "/toLeasepProductDetails", method = RequestMethod.GET)
 	public void toLeasepProductDetails(
 			@RequestParam("productId") Integer productId,
@@ -460,6 +359,7 @@ public class ProductInfoHandler {
 	/**
 	 * 获取租赁产品详情
 	 */
+	@Deprecated
 	@RequestMapping(value = "/leasepProductDetails", method = RequestMethod.POST)
 	@ResponseBody
 	public ResultMsg leasepProductDetails(@RequestParam("productId") Integer productId,

+ 21 - 67
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/coupon/CouponTypeHandler.java

@@ -54,7 +54,7 @@ public class CouponTypeHandler {
 	/**
 	 * 领取优惠券的锁
 	 */
-	private Object lock = new Object();
+	private final Object lock = new Object();
 
 	/**
 	 * 分页查询优惠券类型列表<当前用户可领取的> 2016年7月6日
@@ -69,42 +69,30 @@ public class CouponTypeHandler {
 			HttpServletRequest req,
 			@RequestParam(value = "pageSize", defaultValue = "6", required = false) Integer pageSize,
 			@RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO) {
-		ResultMsg rm = new ResultMsg();
+		// 查询当前登陆的用户
+		Member member = memberService.getMemberByUserOpenId(WechatUtils.getUserBySession(req).getUserOpenid());
+		// 返回的中介数据
 		List<CouponType> typeList = new ArrayList<CouponType>();
 		Map<String, Object> map = new HashMap<String, Object>();
-
 		// 去掉已经领取过的
 		CouponItemDto couponItemDto = new CouponItemDto();
-
-		Member member = WechatUtils.getUserBySession(req);
-		member = memberService.getMemberByUserOpenId(member.getUserOpenid());
-
 		String typeIdStr = req.getParameter("typeId");
-		logger.info("----------typeIdStr-----------" + typeIdStr);
-		if (typeIdStr.indexOf("?") > -1) {
+		if (typeIdStr.contains("?")) {
 			typeIdStr = StringUtils.split(typeIdStr, "?")[0];
 		}
 		int couponTypeId = Integer.parseInt(typeIdStr);
-
 		// 如果当前用户来自金牌会员,并且优惠券的ID为400元,那么屏蔽
-		int templateId = systemService.selectOneShopRuleById(114).getRuleNum()
-				.intValue();
+		int templateId = systemService.selectOneShopRuleById(114).getRuleNum().intValue();
 		if (member.getTemplateId() == templateId) {
 			map.put("typeList", typeList);
-			rm.setData(map);
-			rm.setStatus(true);
-			rm.setResultCode(ResultInfo.SUCCESSCODE);
-			rm.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-			return rm;
+			return ResultMsg.SUCCESS().setData(map);
 		}
 
-		CouponType couponType = couponTypeService
-				.getCouponTypeById(couponTypeId);
+		CouponType couponType = couponTypeService.getCouponTypeById(couponTypeId);
 		typeList.add(couponType);
 
 		couponItemDto.setUseropenid(member.getUserOpenid());
-		List<CouponItemDto> itemList = couponItemService
-				.getCouponItemDtoList(couponItemDto);
+		List<CouponItemDto> itemList = couponItemService.getCouponItemDtoList(couponItemDto);
 		Iterator<CouponType> it = typeList.iterator();
 		while (it.hasNext()) {
 			CouponType cType = (CouponType) it.next();
@@ -142,11 +130,7 @@ public class CouponTypeHandler {
 		}
 
 		map.put("typeList", typeList);
-		rm.setData(map);
-		rm.setStatus(true);
-		rm.setResultCode(ResultInfo.SUCCESSCODE);
-		rm.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-		return rm;
+		return ResultMsg.SUCCESS().setData(map);
 	}
 
 	/**
@@ -157,14 +141,8 @@ public class CouponTypeHandler {
 	@RequestMapping("/getCoupon")
 	@ResponseBody
 	public ResultMsg getCoupon(HttpServletRequest req,
-			@RequestParam(value = "couponId", required = false) Integer couponId) {
+			@RequestParam(value = "couponId") Integer couponId) {
 		ResultMsg rm = new ResultMsg();
-		if (couponId == null) {
-			rm.setStatus(false);
-			rm.setResultCode(ResultInfo.ERRORCODE);
-			rm.setMessage(NameUtils.getConfig("ERRORINFO"));
-		}
-
 		Member member = WechatUtils.getUserBySession(req);
 		member = memberService.getMemberByUserOpenId(member.getUserOpenid());
 		synchronized (lock) {
@@ -208,7 +186,7 @@ public class CouponTypeHandler {
 		// 券使用条件为必须关注时,用户没关注则返回
 		if (couponType.getCouponIsConcern() == 1
 				&& member.getUserStatus() != null
-				&& member.getUserStatus().intValue() != 2) {
+				&& member.getUserStatus() != 2) {
 			rm.setMessage("请先关注公众号!");
 			return rm;
 		}
@@ -250,14 +228,16 @@ public class CouponTypeHandler {
 		couponItem.setCouponUseStatus(1); // 使用状态:未使用
 		Date endDate = DateTimeUtil.addHour(DateTimeUtil.now(),
 				couponType.getCouponLimitHours()); // 券的过期时间
-		if (endDate.before(couponType.getCouponEndDate())) { // 券的过期时间早于此类型券的截止时间则取券的过期时间
+		if (endDate.before(couponType.getCouponEndDate())) {
+			// 券的过期时间早于此类型券的截止时间则取券的过期时间
 			couponItem.setCouponUseEndDate(endDate);
-		} else { // 券的过期时间晚于此类型券的截止时间则取此类型券的截止时间
+		} else {
+			// 券的过期时间晚于此类型券的截止时间则取此类型券的截止时间
 			couponItem.setCouponUseEndDate(couponType.getCouponEndDate());
 		}
 		Integer j = couponItemService.insertCouponItem(couponItem);
 
-		if (i > 0 && j != null && j.intValue() > 0) {
+		if (i > 0 && j != null && j > 0) {
 			rm.setStatus(true);
 			rm.setMessage(NameUtils.getConfig("SUCCESSINFO"));
 			rm.setData(couponItem);
@@ -293,28 +273,6 @@ public class CouponTypeHandler {
 		openid = member.getUserOpenid();
 
 		CouponItemDto cDto = new CouponItemDto();
-		cDto.setUseropenid(openid);
-//		if ("1".equals(useStatus)) { // 未使用的优惠券
-//			cDto.setCouponUseStatus(Integer.parseInt(useStatus));
-//			cDto.setBeginDate(new Date());
-//		} else if ("2".equals(useStatus)) { // 已使用的优惠券
-//			cDto.setCouponUseStatus(Integer.parseInt(useStatus));
-//			cDto.setCouponReduce(7); // 加上了订单是待支付 即couponUseStatus是7的优惠券
-//		} else if ("3".equals(useStatus)) { // 已过期的优惠券
-//			cDto.setEndDate(new Date());
-//			cDto.setCouponItemRemark("4"); // 需去掉已经使用的优惠券
-//		}
-//		if ("10".equals(useStatus)) {
-//			//优惠券
-//			cDto.setCouponUseStatus(0);
-//			cDto.setCouponType(10);
-//			cDto.setBeginDate(new Date());
-//		}else if("11".equals(useStatus)){
-//			//兑换券
-//			cDto.setCouponUseStatus(0);
-//			cDto.setCouponType(11);
-//			cDto.setBeginDate(new Date());
-//		}
 		cDto.setCouponUseStatus(1);
 		cDto.setCouponVipExclusive(Integer.valueOf(useStatus));
 		cDto.setBeginDate(new Date());
@@ -324,12 +282,8 @@ public class CouponTypeHandler {
 		list = couponItemService.getCouponItemDtoList(cDto);
 
 		Date now = new Date();
-		for (CouponItemDto itemDto : list) { 	// 为了在全部优惠券页面区分已过期的优惠券,使之不能使用
-//			itemDto.setCouponItemRemark(ResultInfo.COUPONITEMSTATUS_NORMAL);
-//			if (itemDto.getCouponUseEndDate() != null
-//					&& itemDto.getCouponUseEndDate().before(now)) {
-//				itemDto.setCouponItemRemark(ResultInfo.COUPONITEMSTATUS_PASSED);
-//			}
+		for (CouponItemDto itemDto : list) {
+			// 为了在全部优惠券页面区分已过期的优惠券,使之不能使用
 			if(itemDto.getCouponType().equals(3)){
 				Exchange exchange = new Exchange();
 				exchange.setCouponId(itemDto.getCouponId());
@@ -389,7 +343,7 @@ public class CouponTypeHandler {
 			// 券使用条件为必须关注时,用户没关注则返回
 			if (cType.getCouponIsConcern() == 1
 					&& member.getUserStatus() != null
-					&& member.getUserStatus().intValue() != 2) {
+					&& member.getUserStatus() != 2) {
 				it.remove();
 				count--;
 				continue;
@@ -520,7 +474,7 @@ public class CouponTypeHandler {
 		}
 		// 判断是否为金牌会员下线,如果是,则以优惠价显示,如果不是则按原价显示
 		if (user.getUserDealers() != null && user.getTemplateId() != null
-				&& templateId == user.getTemplateId().intValue()
+				&& templateId == user.getTemplateId()
 				&& user.getUserResType() == 3) {
 			rm.setMessage(NameUtils.getConfig("SUCCESSINFO"));
 			rm.setStatus(true);

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/AdminWithDrp.java

@@ -85,7 +85,7 @@ import com.iamberry.wechat.tools.ResultInfo;
  * @author 欧阳明
  * @date 2016-4-21
  */
-
+@Deprecated
 @Controller
 @RequestMapping("/admin/drp")
 public class AdminWithDrp {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/DrpAgentHandler.java

@@ -18,7 +18,7 @@ import com.iamberry.wechat.face.drp.PlaceInfoService;
  * @author 欧阳明
  * @date 2016-4-21
  */
-
+@Deprecated
 @Controller
 @RequestMapping("/agent/drp")
 public class DrpAgentHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/DrpWeChatHandler.java

@@ -39,6 +39,7 @@ import com.iamberry.wechat.tools.ValidatorUtil;
  * @description 分销链接 跳转
  * @date  2016-4-26
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/drp")
 public class DrpWeChatHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/PlaceInfoHandler.java

@@ -42,6 +42,7 @@ import com.iamberry.wechat.tools.ResultInfo;
  * @author 欧阳明
  * @Date 2016-04-20
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/placeInfo")
 public class PlaceInfoHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/PlaceLogsHandler.java

@@ -16,6 +16,7 @@ import com.iamberry.wechat.tools.ResultInfo;
  * @author 欧阳明
  * @Date 2016-04-20
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/placeLogs")
 public class PlaceLogsHandler {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/PlaceWithDrawalsLogsHandler.java

@@ -23,7 +23,7 @@ import com.iamberry.wechat.tools.ValidationUtils;
  * @author 欧阳明
  *
  */
-
+@Deprecated
 @Controller
 @RequestMapping("/wechat/WithDrawalsLogs")
 public class PlaceWithDrawalsLogsHandler {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/flow/TemplateFlowInfoHandler.java

@@ -22,7 +22,7 @@ import com.iamberry.wechat.face.drp.DrpRoleInfoService;
 import com.iamberry.wechat.face.flow.TemplateFlowInfoService;
 import com.iamberry.wechat.face.flow.TemplateInfoService;
 import com.iamberry.wechat.face.porduct.ProductTypeService;
-
+@Deprecated
 @Controller
 @RequestMapping("/admin/templateFlow")
 public class TemplateFlowInfoHandler {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/flow/TemplateInfoHandler.java

@@ -17,7 +17,7 @@ import com.iamberry.wechat.core.entity.product.ProductType;
 import com.iamberry.wechat.face.flow.TemplateFlowInfoService;
 import com.iamberry.wechat.face.flow.TemplateInfoService;
 import com.iamberry.wechat.face.porduct.ProductTypeService;
-
+@Deprecated
 @Controller
 @RequestMapping("/admin/template")
 public class TemplateInfoHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/game/GameHandler.java

@@ -27,6 +27,7 @@ import com.iamberry.wechat.face.game.GameService;
 import com.iamberry.wechat.tools.NameUtils;
 import com.iamberry.wechat.tools.ResultInfo;
 @Controller
+@Deprecated
 @RequestMapping("/wechat/game")
 public class GameHandler {
 

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/giftCard/AgentInfoHandler.java

@@ -22,6 +22,7 @@ import com.iamberry.wechat.tools.StrUtils;
  * 2017年2月16日
  * @author muzx
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/agent_pay")
 public class AgentInfoHandler {

+ 33 - 60
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/home/HomeHandler.java

@@ -50,9 +50,6 @@ public class HomeHandler {
 
 	@Autowired
 	private HomeService homeService;
-	public void setHomeService(HomeService homeService) {
-		this.homeService = homeService;
-	}
 
 	@Autowired
 	private ProductInfoService productInfoService;
@@ -61,16 +58,12 @@ public class HomeHandler {
 	private MemberService memberService;
 
 	@Autowired
-	private SystemService systemService;
-
-	@Autowired
 	private CartService cartService;
 
 	/**
 	 * 微信商城首页URL
 	 * @return
 	 * @throws Exception
-	 */
 	@RequestMapping(value = "/index", method = RequestMethod.GET)
 	public void index(HttpServletRequest request, HttpServletResponse response) throws Exception {
 
@@ -84,6 +77,7 @@ public class HomeHandler {
 		request.getRequestDispatcher(NameUtils.getConfig("WECHAT_SHOP_INDEX")).forward(request, response);
 		//response.sendRedirect(NameUtils.getConfig("WECHAT_SHOP_INDEX"));
 	}
+	 */
 
 	/**
 	 * 获取首页Banner、广告位信息
@@ -95,42 +89,33 @@ public class HomeHandler {
 	 */
 	@ResponseBody
 	@RequestMapping(value = "/indexData", method = RequestMethod.POST)
-	public ResultMsg indexData(HttpServletRequest request) throws Exception {
-		ResultMsg msg = new ResultMsg();
-
-		Member m = WechatUtils.getUserBySession(request);
-		m = memberService.getMemberByUserOpenId(m.getUserOpenid());
-
-		Member member =  WechatUtils.getUserBySession(request);
-		// 准备数据
-		Map<String, Object> returnMap = new HashMap<String, Object>();
-
-		/*
-		 * 广告位、Banner处理
-		 */
-		List<ActionBannerImage> images = homeService.selectNowBannerByType(); 	// Banner、广告位集合
-		List<ActionBannerImage> banners = new ArrayList<ActionBannerImage>();	// banner
-		List<ActionBannerImage> advs = new ArrayList<ActionBannerImage>();		// 广告位
+	public ResultMsg indexData(HttpServletRequest request) {
+		Member m = memberService.getMemberByUserOpenId(WechatUtils.getUserBySession(request).getUserOpenid());
+		// Banner、广告位集合
+		List<ActionBannerImage> images = homeService.selectNowBannerByType();
+		// 广告位
+		int size = 0;
 		if (images != null && images.size() >= 1) {
-			// 分类注册
-			for (ActionBannerImage actionBannerImage : images) {
+			size = images.size();
+		}
+		List<ActionBannerImage> banners = new ArrayList<ActionBannerImage>(size);
+		List<ActionBannerImage> advs = new ArrayList<ActionBannerImage>(size);
+		if (size > 0) {
+			images.forEach((actionBannerImage) -> {
 				if (actionBannerImage.getBannerId() == 1) {
 					banners.add(actionBannerImage);
 				} else {
 					advs.add(actionBannerImage);
 				}
-			}
+			});
 		}
+		// 准备数据返回
+		Map<String, Object> returnMap = new HashMap<String, Object>(3);
 		returnMap.put("advs", advs);
 		returnMap.put("banners", banners);
-		returnMap.put("memberOpenid", member.getUserOpenid()); 				// 当前用户信息 分享用
-
-		msg.setData(returnMap); // 封装数据
-		msg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-		msg.setResultCode(ResultInfo.SUCCESSCODE);
-		msg.setStatus(true);
-
-		return msg;
+		returnMap.put("memberOpenid", m.getUserOpenid());
+		// 组装前端需要的数据
+		return ResultMsg.SUCCESS().setData(returnMap);
 	}
 	/**
 	 * 刷新用户信息
@@ -138,12 +123,11 @@ public class HomeHandler {
 	@ResponseBody
 	@RequestMapping(value = "/getUserInfo", method = RequestMethod.POST)
 	public ResultMsg getUserInfo(HttpServletRequest request) throws Exception {
-		ResultMsg msg = new ResultMsg();
-
-		Member m = WechatUtils.getUserBySession(request);
-		m = memberService.getMemberByUserOpenId(m.getUserOpenid());
+		Member m = memberService.getMemberByUserOpenId(WechatUtils.getUserBySession(request).getUserOpenid());
 		try{
 				JSONObject jsonObject = WeixinUtil.getUserInfo(m.getUserOpenid());
+                assert jsonObject != null;
+                assert jsonObject.has("nickname");
 				String nickname = jsonObject.getString("nickname");
 				String headimgurl = jsonObject.getString("headimgurl");
 				try {
@@ -166,14 +150,9 @@ public class HomeHandler {
 				}
 				logger.info("获取个人信息成功;openid:"+m.getUserOpenid());
 		}catch (Exception e){
-			logger.info("获取个人信息失败;openid:"+m.getUserOpenid());
-			e.printStackTrace();
+			logger.error("获取个人信息失败:{}", e);
 		}
-
-		msg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-		msg.setResultCode(ResultInfo.SUCCESSCODE);
-		msg.setStatus(true);
-		return msg;
+		return ResultMsg.SUCCESS();
 	}
 
 	/**
@@ -185,21 +164,16 @@ public class HomeHandler {
 	@ResponseBody
 	@RequestMapping(value = "/prodects", method = RequestMethod.GET)
 	public ResultMsg getProdects(HttpServletRequest request) {
-		ResultMsg msg = new ResultMsg();
-
 		Member member =  WechatUtils.getUserBySession(request);
-		// 准备数据
-		Map<String, Object> returnMap = new HashMap<String, Object>();
-
 		List<Product> productList = productInfoService.selectIndexPageProduct();
-
+		/*
 		// 判断是否为金牌会员下线,如果是,则以优惠价显示,如果不是则按原价显示
 		// 查询金牌会员模板id
 		int templateId = systemService.selectOneShopRuleById(114).getRuleNum().intValue();
 		// 查询用户信息
 		Member user = memberService.getMemberByUserOpenId(member.getUserOpenid());
 		// 如果模板id等于金牌会模板id,则该用户为金牌会员下线
-		if (user.getTemplateId() != null && templateId == user.getTemplateId().intValue() && user.getUserResType().intValue() == 3) {
+		if (user.getTemplateId() != null && templateId == user.getTemplateId() && user.getUserResType() == 3) {
 			// 若果是金牌会员下线,产品的价格就以优惠价显示
 			if (productList != null && productList.size() >= 1) {
 				for (Product productInfo : productList) {
@@ -214,7 +188,8 @@ public class HomeHandler {
 					}
 				}
 			}
-		}
+		}*/
+
 
 		// 根据openid查询该用户是否购买过订单
 		ShopSalesOrderDto shopSalesOrderDto = new ShopSalesOrderDto();
@@ -225,7 +200,7 @@ public class HomeHandler {
 		if (orderNum > 0) {
 			if (productList != null && productList.size() >= 1) {
 				for (Product productInfo : productList) {
-					if (productInfo.getProductType().getTypeId().intValue() == 2) {
+					if (productInfo.getProductType().getTypeId() == 2) {
 						UserGiftDto userGiftDto = new UserGiftDto();
 						userGiftDto.setUserLevel(3);
 						userGiftDto.setUserProductId(productInfo.getProductId());
@@ -240,12 +215,10 @@ public class HomeHandler {
 			}
 		}
 
-		returnMap.put("products", productList); 							// 产品信息,10个
-		msg.setData(returnMap); // 封装数据
-		msg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
-		msg.setResultCode(ResultInfo.SUCCESSCODE);
-		msg.setStatus(true);
-		return msg;
+		// 准备数据
+		Map<String, Object> returnMap = new HashMap<String, Object>();
+		returnMap.put("products", productList);
+		return ResultMsg.SUCCESS().setData(returnMap);
 	}
 
 }

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/lease/LeaseMachineHandler.java

@@ -23,7 +23,7 @@ import com.iamberry.wechat.face.lease.LeaseMachineService;
 import com.iamberry.wechat.face.member.MemberService;
 import com.iamberry.wechat.tools.NameUtils;
 import com.iamberry.wechat.tools.ResultInfo;
-
+@Deprecated
 @Controller
 @RequestMapping("/wechat/machine")
 public class LeaseMachineHandler {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/lease/LeaseOrderHandler.java

@@ -35,7 +35,7 @@ import com.iamberry.wechat.tools.OrderNOUtil;
 import com.iamberry.wechat.tools.ResponseJson;
 import com.iamberry.wechat.tools.ResultInfo;
 import com.iamberry.wechat.tools.ValidatorUtil;
-
+@Deprecated
 @Controller
 @RequestMapping("/wechat/leaseOrder")
 public class LeaseOrderHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/member/MemberHandler.java

@@ -36,6 +36,7 @@ import com.iamberry.wechat.tools.StaticInfo;
  * 	   		@author: 张应真
  *	    @createDate: 2016年4月21日
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/member")
 public class MemberHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/member/WithdrawHandler.java

@@ -37,6 +37,7 @@ import com.iamberry.wechat.tools.ValidatorUtil;
  * Update Date:2016年4月21日
  */
 @Controller
+@Deprecated
 @RequestMapping("/wechat/withdraw")
 public class WithdrawHandler {
 	

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/official/ProspectusHandler.java

@@ -19,6 +19,7 @@ import java.util.List;
 /**
  * @author Administrator
  */
+@Deprecated
 @Controller
 public class ProspectusHandler {
 

+ 78 - 125
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/order/OrderHandler.java

@@ -38,6 +38,7 @@ import com.iamberry.wechat.tools.NameUtils;
 import com.iamberry.wechat.tools.OrderNOUtil;
 import com.iamberry.wechat.tools.ResultInfo;
 import com.iamberry.wechat.tools.ValidatorUtil;
+import org.apache.commons.lang.StringUtils;
 import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -178,10 +179,10 @@ public class OrderHandler {
 		String isSpell = request.getParameter("isSpell");
 		for (CartDto cartDto : cartDtos) {
 			int subTotal = cartDto.getProductDiscount();
-			if (cartDto.getProductStatus() != null && cartDto.getProductStatus().intValue() == 1) {
+			if (cartDto.getProductStatus() != null && cartDto.getProductStatus() == 1) {
 				if (isSpell != null && isSpell.equals("1")) {
 					//是否可拼团
-					if(cartDto.getProductIsSpell() != null && cartDto.getProductIsSpell().intValue() == 2){
+					if(cartDto.getProductIsSpell() != null && cartDto.getProductIsSpell() == 2){
 						subTotal = cartDto.getColorSpellAmount(); // 小计 拼团价
 					}else{
 						subTotal = cartDto.getProductDiscount(); // 小计 正常价
@@ -192,7 +193,7 @@ public class OrderHandler {
 			sum++;
 
 			//计算商品为滤芯的数量
-			if (cartDto.getProductType().intValue() == 2) {
+			if (cartDto.getProductType() == 2) {
 				productNum++;
 			}
 		}
@@ -292,26 +293,15 @@ public class OrderHandler {
 	 */
 	@ResponseBody
 	@RequestMapping(value = "/pay", method = RequestMethod.POST)
-	public ResultMsg requestPay(
-			TempOrderDto temp,
-			HttpServletRequest request
-			)  {
+	public ResultMsg requestPay(TempOrderDto temp, HttpServletRequest request)  {
 		
 		ResultMsg msg = new ResultMsg();
 		msg.setResultCode(ResultInfo.ERRORCODE);
-		//System.out.println(temp.toString());
 		//当前支付时间
 		Date nowDate=new Date();
-
 		SendPayDto dto = new SendPayDto();
 		dto.setSuccess(false);
-		Member member = WechatUtils.getUserBySession(request); // 当前用户
-		member = memberService.getMemberByUserId(member.getUserId());
-		/** 数据格式校验 */
-		if (member == null || member.getUserOpenid() == null) {// 校验当前用户信息是否丢失
-			msg.setMessage(ResultInfo.loginOutError);
-			return msg;
-		}
+		Member member = memberService.getMemberByUserId(WechatUtils.getUserBySession(request).getUserId());
 
 		if("收货人".equals(temp.getOrderAddressName())){
 			msg.setMessage("收货人信息有误,请重新选择地址信息!");
@@ -321,9 +311,8 @@ public class OrderHandler {
 			msg.setMessage("收货人电话信息有误,请重新选择地址信息!");
 			return msg;
 		}
-		
-		member=memberService.getMemberByUserId(member.getUserId());
-		if (!validatorUtil.validatorObject(temp)) { // 校验订单信息是否输入有误
+		if (!validatorUtil.validatorObject(temp)) {
+			// 校验订单信息是否输入有误
 			msg.setMessage(ResultInfo.paramFormatError);
 			return msg;
 		}
@@ -336,17 +325,19 @@ public class OrderHandler {
 		Integer [] cartId = null;
 		try {
 			cartId = checkCartIdListString(temp.getCartIdStr());
-		} catch (Exception e) { // 一旦发生异常,表示错误
-			msg.setMessage(ResultInfo.paramFormatError);
+		} catch (Exception e) {
+			// 一旦发生异常,表示错误
+			msg.setMessage(e.getMessage());
 			return msg;
 		}
 		List<CartDto> cartDtos = cartService.selectCartItemByListId(cartId);
-		if (cartDtos == null || cartDtos.size() <= 0) {// 根据购物车ID,查询数据库中对应的产品信息(ID、产品状态)
+		if (cartDtos == null || cartDtos.size() <= 0) {
+			// 根据购物车ID,查询数据库中对应的产品信息(ID、产品状态)
 			msg.setMessage(ResultInfo.cartEmptyError);
 			return msg;
 		}
-
-		boolean isUse99Voucher = false;	//true:可以使用    false:不允许使用
+		//true:可以使用    false:不允许使用
+		boolean isUse99Voucher = false;
 		if(temp.getExchangeColorId() != null && !"".equals(temp.getExchangeColorId())){
 			boolean flag = false;
 			Integer exchangeColorId = Integer.valueOf(temp.getExchangeColorId());
@@ -365,7 +356,7 @@ public class OrderHandler {
 					cartDto.setCartColorId(productColor.getColorId());
 					cartDto.setCartNum(1);
 					cartDto.setProductName(productColor.getColorProductName());
-					cartDto.setProductType(productColor.getColorProductType());	//colorProductType
+					cartDto.setProductType(productColor.getColorProductType());
 					cartDto.setProductPrice(productColor.getColorPrice());
 					cartDto.setProductDiscount(productColor.getColorDiscount());
 					cartDto.setProductStatus(1);
@@ -377,52 +368,45 @@ public class OrderHandler {
 				}
 			}
 		}
-
-		//根据openid查询该用户是否购买过订单
-//		ShopSalesOrderDto shopSalesOrderDto = new ShopSalesOrderDto();
-//		shopSalesOrderDto.setSalesOpenid(member.getUserOpenid());
-//		shopSalesOrderDto.setSalesStatus("2");
-//		int orderNum = cartService.selectOrderCount(shopSalesOrderDto);
-		
-		int total = 0; // 需要支付的总额, 单位为分
-
+		// 需要支付的总额, 单位为分
+		int total = 0;
 		//vip会员买年套滤芯减价,此表示为减价金额
 		int priceReduction = 0;
-
-		boolean isCludeT1ORT2 = false;	//是否包含T1/T2
+		//是否包含T1/T2
+		boolean isCludeT1ORT2 = false;
 		
 		/** 提前准备订单项数据 */
 		/** 准备数据 */
 		Order order = new Order();
-		order.setSalesOrderid(OrderNOUtil.createOrderCode(member.getUserId())); // 订单ID
+		order.setSalesOrderid(OrderNOUtil.createOrderCode(member.getUserId()));
 		List<OrderItem> list = new ArrayList<OrderItem>();
 		List<Integer> cartIds = new ArrayList<Integer>();
-
 		//添加赠品
 		activityUtil.preferential(cartDtos);
-
 		for (CartDto cartDto : cartDtos) {
 			//VIP用户滤芯年套减一百
 			if(cartDto.getCartColorId() == 5 && member.getUserIsVip() == 2){
 				priceReduction += 10000*cartDto.getCartNum();
 			}
-
 			if(7 == cartDto.getCartColorId() || 8 == cartDto.getCartColorId()){
 				isCludeT1ORT2 = true;
 			}
-			if (cartDto.getProductStatus() != null && cartDto.getProductStatus().intValue() == 1) {
+			if (cartDto.getProductStatus() != null && cartDto.getProductStatus() == 1) {
 				cartIds.add(cartDto.getCartId());
 				Integer subTotal = 0;
 				//是否是团购订单
 				if(temp.getIsSpell() != null && temp.getIsSpell() == 1){
 					//是否可拼团
-					if(cartDto.getProductIsSpell().intValue() == 2){
-						subTotal = cartDto.getCartNum() * cartDto.getColorSpellAmount(); // 小计 拼团价
+					if(cartDto.getProductIsSpell() == 2){
+						subTotal = cartDto.getCartNum() * cartDto.getColorSpellAmount();
+						// 小计 拼团价
 					}else{
-						subTotal = cartDto.getCartNum() * cartDto.getProductDiscount(); // 小计 正常价
+						subTotal = cartDto.getCartNum() * cartDto.getProductDiscount();
+						// 小计 正常价
 					}
 				}else{
-					subTotal = cartDto.getCartNum() * cartDto.getProductDiscount(); // 小计 正常价
+					subTotal = cartDto.getCartNum() * cartDto.getProductDiscount();
+					// 小计 正常价
 				}
 				total += subTotal;
 				OrderItem item = new OrderItem();
@@ -443,7 +427,8 @@ public class OrderHandler {
 
 		//是否是团购订单
 		if(temp.getIsSpell() != null && temp.getIsSpell() == 1){
-			order.setSalesIsSpellOrder(1);//团购订单
+			//团购订单
+			order.setSalesIsSpellOrder(1);
 		}else{
 			order.setSalesIsSpellOrder(2);
 		}
@@ -452,17 +437,15 @@ public class OrderHandler {
 			order.setSalesSpellOrderId(temp.getSpellOrderId());
 		}
 		// 准备订单对象
-		order.setSalesOpenid(member.getUserOpenid()); // openid 
-		order.setSalesAmount(total); // 订单金额
-
+		order.setSalesOpenid(member.getUserOpenid());
+		order.setSalesAmount(total);
 		int mustPay=0;
-		
 		String couponId=temp.getCouponId();
 		CouponItemDto couponItemDto=new CouponItemDto();
 		CouponItem couponItem=new CouponItem();
 		boolean hasCoupon=false;
 		//获取优惠券不为空
-		if(couponId!=null && !couponId.equals("")){
+		if(!StringUtils.isEmpty(couponId)){
 			hasCoupon=true;
 			//查询优惠券,获取对应的金额
 			couponItemDto = couponItemService.getCouponItemById(couponId);
@@ -474,25 +457,29 @@ public class OrderHandler {
 			couponItem.setCouponUseDate(couponItemDto.getCouponUseDate());
 			
 			if(null==couponItemDto || !couponItemDto.getUseropenid().equals(member.getUserOpenid()) || couponItemDto.getCouponUseStatus()!=1){
-				msg.setMessage(ResultInfo.COUPON_INVALID); //优惠券无效
+				//优惠券无效
+				msg.setMessage(ResultInfo.COUPON_INVALID);
 				return msg;
 			}
 			if(couponItem.getCouponUseEndDate().getTime()<nowDate.getTime()){
-				msg.setMessage(ResultInfo.COUPON_OUTOFDATE); //优惠券过期
+				//优惠券过期
+				msg.setMessage(ResultInfo.COUPON_OUTOFDATE);
 				return msg;
 			}
 			
 			//消费达到指定额度
 			CouponType couponType = couponTypeService.getCouponTypeById(couponItemDto.getCouponId());
 			if(couponType.getCouponConsumeEnough()>total){
-				msg.setMessage(ResultInfo.COUPON_CONSUME_NO_ENOUGH); //消费额度不足
+				//消费额度不足
+				msg.setMessage(ResultInfo.COUPON_CONSUME_NO_ENOUGH);
 				return msg;
 			}
 
 			if(3 == couponType.getCouponType()){
 				if(couponType.getCouponId() == 10001){
 					if(!isCludeT1ORT2){
-						msg.setMessage(ResultInfo.COUPON_T1_T2_NO_MSG); //未购买指定商品
+						//未购买指定商品
+						msg.setMessage(ResultInfo.COUPON_T1_T2_NO_MSG);
 						return msg;
 					}
 				}else if(couponType.getCouponId() == 10000){
@@ -514,7 +501,8 @@ public class OrderHandler {
 						}
 					}
 					if(!fl){
-						msg.setMessage(ResultInfo.COUPON_NO_MEET_DEMAND); //消费没有达到需求
+						//消费没有达到需求
+						msg.setMessage(ResultInfo.COUPON_NO_MEET_DEMAND);
 						return msg;
 					}
 				}
@@ -536,7 +524,8 @@ public class OrderHandler {
 		Integer integralNum = temp.getOrderIntegralNum();
 		//使用积分
 		if(integralNum != null && integralNum != 0){
-			if(member.getUserIsVip() == 2 && member.getUserSurplusIntegral() >= integralNum){// vip用户 && 用户积分大于等于使用的积分
+			if(member.getUserIsVip() == 2 && member.getUserSurplusIntegral() >= integralNum){
+				// vip用户 && 用户积分大于等于使用的积分
 				//积分的使用需要除以10,但是支付金额的单位为分,所以需要乘以100  == 》 integralNum/10*100 ==》 integralNum*10
 				total -= integralNum*10;
 			}else{
@@ -587,9 +576,7 @@ public class OrderHandler {
 			}
 		} catch (Exception e) {
 			flag = false;
-			System.out.println("====插入订单列表信息失败====");
-			msg.setMessage(ResultInfo.paramFormatError);
-			e.printStackTrace();
+			msg.setMessage(e.getMessage());
 			return msg;
 		}
 		
@@ -624,7 +611,8 @@ public class OrderHandler {
 		if(updateFlase){
 			//设置订单状态,还有优惠券id
 
-			if(temp.getIsSpell() == 1){//如果是团购订单则状态改为正在团购
+			if(temp.getIsSpell() == 1){
+				//如果是团购订单则状态改为正在团购
 				order.setSalesStatus(15);
 			}else{
 				order.setSalesStatus(2);
@@ -636,16 +624,17 @@ public class OrderHandler {
 //				int i=couponItemService.updateCouponItemById(couponItem);
 			}
 
-			if(temp.getIsSpell() == null || temp.getIsSpell() == 2){//如果是团购订单则暂时不推送订单,在完成拼单后再推送
+			if(temp.getIsSpell() == null || temp.getIsSpell() == 2){
+				//如果是团购订单则暂时不推送订单,在完成拼单后再推送
 				/*if(o.getSalesIsSpellOrder() != null && o.getSalesIsSpellOrder() == 1 && o.getSalesSpellOrderId() != null){*/
 				// 给rst推送订单
 				try {
 					MQMessage message = new MQMessage();
 					message.setServiceToMessage(order.getSalesOrderid());
 					message.setServiceOtherMessage("efast.trade.new.add");
-					message.setServiceIsSend(2);			// 没有推送的信息
-					message.setServiceStatus(1); 			// 推送成功
-					message.setServiceType(1); 				// 添加订单信息
+					message.setServiceIsSend(2);
+					message.setServiceStatus(1);
+					message.setServiceType(1);
 					message.setServiceHandlerObjectName("efastOrderServiceImpl");
 					message.setServiceHandlerMethodName("addOrderInfoToEfast");
 					mQservice.insertMQMessage(message);
@@ -653,39 +642,7 @@ public class OrderHandler {
 					e.printStackTrace();
 				}
 			}
-
-
 			//更新账户余额
-//			if(balancePayAmount>0){
-//				member.setUserIncome(-balancePayAmount);
-//				memberService.updateUserIncomeByOpenId(member);
-//
-//				//修改用户购买记录为已购买
-//				memberService.updateIsBaughtByOpenid(member.getUserOpenid(), 2);
-//				//更新用户绑定状态
-//				if (member.getUserIsFlag()!= null && member.getUserIsFlag() == 1) {
-//					member.setUserIsFlag(2);//终身绑定
-//					homeService.updateMemberIsFlagByOpenid(member);
-//				}
-//				try {
-//					temporaryQrcodeService.applyTempQrcode(member.getUserOpenid());//为用户生成二维码
-//				} catch (Exception e) {
-//					System.out.println("为用户生成二维码失败!");
-//				}
-//
-//				//现金使用记录
-//				CashLog log=new CashLog();
-//				log.setCashLogsIntroduction("订单支出");
-//				log.setCashLogsNum(balancePayAmount);
-//				log.setCashLogsOpenid(member.getUserOpenid());
-//				log.setCashLogsType(2);
-//				log.setCashLogsResType(3);
-//				log.setCashLogsOrderid(order.getSalesOrderid());
-//				log.setCashLogsCreateDate(nowDate);
-//				cashLogService.addCashLog(log);
-//
-//			}
-//			rebackServices.loadSingleOrderReward(order);
 			productInfoService.updateProductNumList(order.getSalesOrderid());
 
 			/**
@@ -697,7 +654,8 @@ public class OrderHandler {
 				or1.setSalesOrderid(temp.getSpellOrderId());
 				or1.setSalesStatus(2);
 				or1.setSalesSpellOrderId(order.getSalesOrderid());
-				cartService.updateOrderSpellOrderId(or1);//修改状态为已支付,待发货,关联拼单订单id
+				//修改状态为已支付,待发货,关联拼单订单id
+				cartService.updateOrderSpellOrderId(or1);
 				//邀请人信息state
 				Order orderOne = new Order();
 				orderOne.setSalesOrderid(temp.getSpellOrderId());
@@ -720,27 +678,27 @@ public class OrderHandler {
 						e.printStackTrace();
 					}
 				}
-					String names = name +",微信好友";
+				String names = name +",微信好友";
 
-					try {
-						names  = name +","+(member.getUserNickname() == null? "微信好友": URLDecoder.decode(member.getUserNickname(),"UTF-8"));
-					} catch (UnsupportedEncodingException e) {
-						e.printStackTrace();
-					}
+				try {
+					names  = name +","+(member.getUserNickname() == null? "微信好友": URLDecoder.decode(member.getUserNickname(),"UTF-8"));
+				} catch (UnsupportedEncodingException e) {
+					e.printStackTrace();
+				}
 				//推送微信模板消息
-					logger.info("微信账户支付推送拼单成功消息-------------------------------------------------1");
-					try {
-						sendMessageUtil.spellPush(
-								"恭喜您与"+name+"拼单成功,点击逛逛更多好货吧。",
-								orderItems1.get(0).getItemProductName(),
-								names,
-								"点击查看拼单详情>>",
-								orderOne.getSalesOpenid(),
-								ResultInfo.ORDER_GUOQI+"?salesStatus=2");
-					}catch (Exception e){
-						logger.info("推送拼单成功消息失败,失败openId:"+orderOne.getSalesOpenid());
-						e.printStackTrace();
-					}
+				logger.info("微信账户支付推送拼单成功消息-------------------------------------------------1");
+				try {
+					sendMessageUtil.spellPush(
+							"恭喜您与"+name+"拼单成功,点击逛逛更多好货吧。",
+							orderItems1.get(0).getItemProductName(),
+							names,
+							"点击查看拼单详情>>",
+							orderOne.getSalesOpenid(),
+							ResultInfo.ORDER_GUOQI+"?salesStatus=2");
+				}catch (Exception e){
+					logger.info("推送拼单成功消息失败,失败openId:"+orderOne.getSalesOpenid());
+					e.printStackTrace();
+				}
 				}
 				//推送邀请人订单到rst
 				try {
@@ -756,11 +714,6 @@ public class OrderHandler {
 				} catch (Exception e) {
 					e.printStackTrace();
 				}
-
-
-
-
-
 				//被邀请人(当前)订单修改
 				Order or2 = new Order();
 				or2.setSalesOrderid(order.getSalesOrderid());
@@ -804,9 +757,9 @@ public class OrderHandler {
 					MQMessage message = new MQMessage();
 					message.setServiceToMessage(order.getSalesOrderid());
 					message.setServiceOtherMessage("efast.trade.new.add");
-					message.setServiceIsSend(2);			// 没有推送的信息
-					message.setServiceStatus(1); 			// 推送成功
-					message.setServiceType(1); 				// 添加订单信息
+					message.setServiceIsSend(2);
+					message.setServiceStatus(1);
+					message.setServiceType(1);
 					message.setServiceHandlerObjectName("efastOrderServiceImpl");
 					message.setServiceHandlerMethodName("addOrderInfoToEfast");
 					mQservice.insertMQMessage(message);

+ 2 - 8
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/pay/WechatBackHandler.java

@@ -18,18 +18,13 @@ import com.iamberry.wechat.tools.WeixinUtil;
 
 /**
  * @author 何秀刚
- * Class Description: 微信授权handler
- * Create Date:2016年4月19日
- * Update Date:2016年4月19日
+ * 微信授权handler
  */
 @Controller
 public class WechatBackHandler {
 	
 	@Autowired
 	private HomeService homeService;
-	public void setHomeService(HomeService homeService) {
-		this.homeService = homeService;
-	}
 
 	/**
 	 * 微信授权功能
@@ -39,8 +34,7 @@ public class WechatBackHandler {
 	 * @throws Exception
 	 */
 	@RequestMapping("/wechatBack")
-	public ModelAndView getOpenId(
-			@RequestParam(value = "callback", required = false) String callback,
+	public ModelAndView getOpenId(@RequestParam(value = "callback", required = false) String callback,
 			HttpServletRequest request,
 			HttpServletResponse response) throws Exception {
 		String callbackURL = NameUtils.getConfig("redirectUrl_index");

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/probation/ProbationHandler.java

@@ -42,6 +42,7 @@ import com.iamberry.wechat.sendMsg.SendMessageUtil;
  * @version 1.0
  * @createDate 2016年11月15日16:08:30
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/probation")
 public class ProbationHandler {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/reback/RebackHandler.java

@@ -29,7 +29,7 @@ import com.iamberry.wechat.tools.ResultInfo;
  * @author 欧阳明
  * @date 2016-05-25
  */
-
+@Deprecated
 @Controller
 @RequestMapping("/wechat/rebackStatic")
 public class RebackHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/reserve/ReserveController.java

@@ -28,6 +28,7 @@ import java.util.Date;
  * @tel 18271840547
  * @website www.iamberry.com
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/rent")
 public class ReserveController {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/rewards/RewardsHandler.java

@@ -26,6 +26,7 @@ import com.iamberry.wechat.tools.NameUtils;
  * @author Administrator
  *
  */
+@Deprecated
 @Controller
 @RequestMapping("/admin/rewards")
 public class RewardsHandler {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/statistics/AdminStatisticsHandler.java

@@ -20,7 +20,7 @@ import com.iamberry.wechat.core.entity.statictics.MarketInfo;
 import com.iamberry.wechat.core.entity.statictics.StatisticsInfo;
 import com.iamberry.wechat.core.entity.statictics.UerActivateInfo;
 import com.iamberry.wechat.face.statistics.AdminStatisticsService;
-
+@Deprecated
 @Controller
 @RequestMapping("/admin/statistics")
 public class AdminStatisticsHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/statistics/StatisticsRelationHandler.java

@@ -42,6 +42,7 @@ import com.iamberry.wechat.tools.ResultInfo;
  * @author all~
  *
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/statistics")
 public class StatisticsRelationHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/AgentWechatHandler.java

@@ -22,6 +22,7 @@ import com.iamberry.wechat.tools.NameUtils;
  * @author 穆再兴
  *
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/agentWechat")
 public class AgentWechatHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/CashWechatHandler.java

@@ -17,6 +17,7 @@ import com.iamberry.wechat.tools.NameUtils;
  * @author 穆再兴
  *
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/cashWechat")
 public class CashWechatHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/CouponWechatHandler.java

@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
  * @author Administrator
  *
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/couponWechat")
 public class CouponWechatHandler {

+ 1 - 0
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/IntegralWechatHandler.java

@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
  * @author Administrator
  *
  */
+@Deprecated
 @Controller
 @RequestMapping("/wechat/integralWechat")
 public class IntegralWechatHandler {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/LuckDrawWechatHandler.java

@@ -10,7 +10,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import com.iamberry.wechat.tools.NameUtils;
-
+@Deprecated
 @Controller
 @RequestMapping("/wechat/activity")
 public class LuckDrawWechatHandler {

+ 1 - 1
watero-wechat-web/src/main/java/com/iamberry/wechat/handles/wx/ProductCartHandler.java

@@ -10,7 +10,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import com.iamberry.wechat.tools.NameUtils;
-
+@Deprecated
 @Controller
 @RequestMapping("/wechat/wxCart")
 public class ProductCartHandler {

BIN
watero-wechat-web/src/main/resources/apiclient_cert.p12


watero-wechat-web/src/main/resources/iamberry-app-service-config.properties → watero-wechat-web/src/main/resources/config.properties


+ 6 - 27
watero-wechat-web/src/main/resources/iamberry-wechat-service-datasource.xml

@@ -53,13 +53,13 @@
     </bean>  
     <bean id="wall-config" class="com.alibaba.druid.wall.WallConfig">  
         <property name="multiStatementAllow" value="true" />  
-    </bean> 
-    
+    </bean>
+
 	<!-- 配置SqlSessionFactoryBean -->
 	<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
 		<!-- 配置数据源 -->
 		<property name="dataSource" ref="ratfwDataSource" />
-		<property name="configLocation" value="classpath:iamberry-wechat-service-mybatis.xml" />
+		<property name="configLocation" value="classpath:orm.xml" />
 	</bean>
 
 	<!-- 自动扫描SQL隐射文件 -->
@@ -75,28 +75,7 @@
 		<property name="dataSource" ref="ratfwDataSource" />
 	</bean>
 
-	<tx:advice id="webTxAdvice" transaction-manager="transactionManager">
-		<tx:attributes>
-			<!-- 需要多个service协同操作,并需要事务支持的均以doxxx开头-->
-			<tx:method name="do*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception"/>
-			<tx:method name="delete*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception"/>
-			<tx:method name="insert*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" />
-			<tx:method name="update*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" />
-			<tx:method name="synUpdate*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" />
-			<tx:method name="save*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" />
-			<!-- 凡是查询,都不开协同操作 -->
-			<tx:method name="get*" read-only="true" propagation="SUPPORTS"/>
-			<tx:method name="find*" read-only="true" propagation="SUPPORTS"/>
-			<tx:method name="query*" read-only="true" propagation="SUPPORTS"/>
-			<tx:method name="is*" read-only="true" propagation="SUPPORTS"/>
-			<tx:method name="*" propagation="REQUIRED" rollback-for="java.lang.Exception"/>
-		</tx:attributes>
-	</tx:advice>
-	<!-- 事务处理 -->
-	
-	<!-- 事物切入点 -->
-	<aop:config>
-		<aop:pointcut expression="execution(* com.iamberry.*.service.*.*.*(..))" id="userPoint" />
-		<aop:advisor advice-ref="webTxAdvice" pointcut-ref="userPoint" />
-	</aop:config>
+	<!-- 配置基于注解的声明式事务 -->
+	<tx:annotation-driven transaction-manager="transactionManager"/>
+
 </beans>

+ 6 - 25
watero-wechat-web/src/main/resources/iamberry-wechat-web-ioc.xml

@@ -2,31 +2,16 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 	xmlns:context="http://www.springframework.org/schema/context"
-	xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
-	xmlns:cache="http://www.springframework.org/schema/cache"
-	xmlns:tx="http://www.springframework.org/schema/tx"
-	default-autowire="byName"
 	default-lazy-init="true"
     xmlns:task="http://www.springframework.org/schema/task"
 	xmlns:aop="http://www.springframework.org/schema/aop"
-	xmlns:ehcache-spring="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
-	xmlns:p="http://www.springframework.org/schema/p"
-	xmlns:websocket="http://www.springframework.org/schema/websocket" 
 	xsi:schemaLocation=
 		"http://www.springframework.org/schema/aop
 		http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
 		http://www.springframework.org/schema/beans
 		http://www.springframework.org/schema/beans/spring-beans.xsd
-		http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring
-		http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd
-		http://www.springframework.org/schema/cache
-		http://www.springframework.org/schema/cache/spring-cache-4.1.xsd
-		http://www.springframework.org/schema/tx 
-		http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
-		http://www.springframework.org/schema/task  
-		http://www.springframework.org/schema/task/spring-task-3.1.xsd  
-		http://www.springframework.org/schema/websocket 
-		http://www.springframework.org/schema/websocket/spring-websocket.xsd
+		http://www.springframework.org/schema/task
+		http://www.springframework.org/schema/task/spring-task-3.1.xsd
 		http://www.springframework.org/schema/context
 		http://www.springframework.org/schema/context/spring-context-3.2.xsd">
 		
@@ -43,21 +28,17 @@
     <bean class="com.iamberry.zk.SpringContextHolder" lazy-init="false" />
     
 	<!-- 平台LOG配置,立即加载,拒绝懒加载 -->
-	<bean id="logger" class="com.iamberry.app.tool.log.RatFWLogger" scope="singleton" autowire="byName" lazy-init="false">
+	<bean id="logger" class="com.iamberry.app.tool.log.RatFWLogger" lazy-init="false">
 		<property name="appId" value="iamberry" />
 	</bean>
-	
-	<!-- 加载静态资源 -->
-	<bean id="loadResultInfo" class="com.iamberry.wechat.tools.loadResultUtil" lazy-init="false"></bean>
 
 	<!-- 开启注解启动定时器 -->
     <task:annotation-driven/>
     <!-- 将30天后奖励积分的定时任务的xml引入 -->
-	<!--<import resource="classpath:iamberry-wechat-service-orderTesk.xml"></import>-->
 
-	<import resource="classpath:iamberry-wechat-service-datasource.xml"/>
+	<import resource="classpath:db.xml"/>
 	
-	<!-- spring监控 -->
+	<!-- spring监控
     <bean id="druid-stat-interceptor" class="com.alibaba.druid.support.spring.stat.DruidStatInterceptor">
 	</bean>
 	<bean id="druid-stat-pointcut" class="org.springframework.aop.support.JdkRegexpMethodPointcut" scope="prototype">
@@ -69,5 +50,5 @@
 	</bean>
 	<aop:config proxy-target-class="true">
 		<aop:advisor advice-ref="druid-stat-interceptor" pointcut-ref="druid-stat-pointcut" />
-	</aop:config>
+	</aop:config> -->
 </beans>

+ 1 - 1
watero-wechat-web/src/main/resources/jdbc.properties

@@ -14,4 +14,4 @@ jdbc.password=Watero1234
 jdbc.pool.init=1
 jdbc.pool.minIdle=3
 jdbc.pool.maxActive=20
-jdbc.testSql=SELECT * from tb_wx_config
+jdbc.testSql=SELECT 1

+ 26 - 27
watero-wechat-web/src/main/resources/log4j.properties

@@ -1,43 +1,42 @@
-#levels: debug, info, warn, error, fatal
-log4j.rootLogger=info,stdout,infoLog,errorLog
-
-#\u63a7\u5236\u53f0
+# 根日志的基本定义为info,具体实例为: stdout,infoLog,errorLog,debug;levels :ALL < DEBUG < INFO < WARN < ERROR < FATAL < OFF
+log4j.rootLogger=info,stdout,infoLog,errorLog,debug
+# stdout日志配置
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.Target=System.out
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m %n
-log4j.appender.stdout.File=D:/log/watero/iamberry_wechat_out.log
-
-#\u4e3b\u65e5\u5fd7\u6587\u4ef6
+log4j.appender.stdout.File=D:/log/watero/out.log
+# infoLog日志配置
 log4j.appender.infoLog=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.infoLog.File=D:/log/watero/iamberry_wechat_info.log
+log4j.appender.infoLog.File=D:/log/watero/info.log
 log4j.appender.infoLog.Append=true
 log4j.appender.infoLog.Threshold=INFO
 log4j.appender.infoLog.layout=org.apache.log4j.PatternLayout
 log4j.appender.infoLog.layout.ConversionPattern=%d %p [%c] - %m %n 
 log4j.appender.infoLog.encoding=UTF-8
-
-#\u9519\u8bef\u65e5\u5fd7
+# error日志配置
 log4j.appender.errorLog=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.errorLog.File=D:/log/watero/iamberry_wechat_error.log
+log4j.appender.errorLog.File=D:/log/watero/error.log
 log4j.appender.errorLog.Append=true
 log4j.appender.errorLog.Threshold=ERROR
 log4j.appender.errorLog.layout=org.apache.log4j.PatternLayout
-log4j.appender.errorLog.layout.ConversionPattern=%d %p [%c] - %m %n 
+log4j.appender.errorLog.layout.ConversionPattern=%d %p [%c] - %m %n
 log4j.appender.errorLog.encoding=UTF-8
-
-#\u663e\u793aSQL\u8bed\u53e5\u90e8\u5206
-log4j.logger.com.iamberry.wechat.service=DEBUG
-log4j.logger.java.sql.ResultSet=INFO
+# debug日志配置
+log4j.appender.debug=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.debug.File=D:/log/watero/debug.log
+log4j.appender.debug.Append=true
+log4j.appender.debug.Threshold=DEBUG
+log4j.appender.debug.layout=org.apache.log4j.PatternLayout
+log4j.appender.debug.layout.ConversionPattern=%d %p [%c] - %m %n
+log4j.appender.debug.encoding=UTF-8
+# apache日志级别
 log4j.logger.org.apache=INFO
-log4j.logger.java.sql.Connection=INFO
-log4j.logger.java.sql.Statement=INFO
-log4j.logger.java.sql.PreparedStatement=INFO
-
-#\u663e\u793aSQL\u8bed\u53e5\u90e8\u5206
-log4j.logger.com.iamberry.rent.service=DEBUG
-log4j.logger.java.sql.ResultSet=INFO
-log4j.logger.org.apache=INFO
-log4j.logger.java.sql.Connection=INFO
-log4j.logger.java.sql.Statement=INFO
-log4j.logger.java.sql.PreparedStatement=INFO
+# 整个项目代码的日志级别
+log4j.logger.com.iamberry=INFO
+# mybatis日志配置,为了方便定位问题,将日志级别设置为DEBUG,方便打印SQL语句
+log4j.logger.com.ibatis=DEBUG
+log4j.logger.java.sql.Connection=DEBUG
+log4j.logger.java.sql.Statement=DEBUG
+log4j.logger.java.sql.PreparedStatement=DEBUG
+log4j.logger.java.sql.ResultSet=DEBUG

watero-wechat-web/src/main/resources/iamberry-wechat-web-springmvc.xml → watero-wechat-web/src/main/resources/mvc.xml


watero-wechat-web/src/main/resources/iamberry-wechat-service-mybatis.xml → watero-wechat-web/src/main/resources/orm.xml


watero-wechat-web/src/main/resources/iamberry-wechat-service-orderTesk.xml → watero-wechat-web/src/main/resources/task.xml


+ 0 - 12
watero-wechat-web/src/main/webapp/WEB-INF/index.jsp

@@ -1,12 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8"
-    pageEncoding="ISO-8859-1"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Insert title here</title>
-</head>
-<body>
-	hello!
-</body>
-</html>

+ 28 - 25
watero-wechat-web/src/main/webapp/WEB-INF/web.xml

@@ -7,8 +7,9 @@
 	<!-- Session配置 -->
 	<session-config>
 		<cookie-config>
+            <name>WATERO_WEB_</name>
 			<http-only>true</http-only>
-			<name>WATERO_WEB_</name>
+            <max-age>30</max-age>
 		</cookie-config>
 	</session-config>
 
@@ -20,7 +21,7 @@
 
 	<context-param>
 		<param-name>contextConfigLocation</param-name>
-		<param-value>classpath:iamberry-wechat-web-ioc.xml</param-value>
+		<param-value>classpath:ioc.xml</param-value>
 	</context-param>
 
 	<listener>
@@ -38,7 +39,7 @@
 		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
 		<init-param>
 			<param-name>contextConfigLocation</param-name>
-			<param-value>classpath:iamberry-wechat-web-springmvc.xml</param-value>
+			<param-value>classpath:mvc.xml</param-value>
 		</init-param>
 		<load-on-startup>1</load-on-startup>
 	</servlet>
@@ -64,29 +65,31 @@
 		<url-pattern>/*</url-pattern>
 	</filter-mapping>
 
-	<filter>
-		<filter-name>cors</filter-name>
-		<filter-class>com.iamberry.common.web.SimpleCORSFilter</filter-class>
-	</filter>
-	<filter-mapping>
-		<filter-name>cors</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
 
-	<error-page>
-		<error-code>404</error-code>
-		<location>/view/system_view/404.jsp</location>
-	</error-page>
-	<error-page>
-		<error-code>500</error-code>
-		<location>/view/system_view/500.jsp</location>
-	</error-page>
+<!--
+        <filter>
+            <filter-name>cors</filter-name>
+            <filter-class>com.iamberry.common.web.SimpleCORSFilter</filter-class>
+        </filter>
+        <filter-mapping>
+            <filter-name>cors</filter-name>
+            <url-pattern>/*</url-pattern>
+        </filter-mapping>
+        <error-page>
+            <error-code>404</error-code>
+            <location>/view/system_view/404.jsp</location>
+        </error-page>
+        <error-page>
+            <error-code>500</error-code>
+            <location>/view/system_view/500.jsp</location>
+        </error-page>
+-->
 
 	<listener>
 		<listener-class>com.iamberry.wechat.listener.MessageQueueListener</listener-class>
 	</listener>
 
-	<!-- 数据库监控 -->
+	<!-- 数据库监控
 	<servlet>
 		<servlet-name>DruidStatView</servlet-name>
 		<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
@@ -94,9 +97,9 @@
 	<servlet-mapping>
 		<servlet-name>DruidStatView</servlet-name>
 		<url-pattern>/admin/db/*</url-pattern>
-	</servlet-mapping>
+	</servlet-mapping> -->
 
-	<!-- WEB 监控 -->
+	<!-- WEB 监控
 	<filter>
 		<filter-name>DruidWebStatFilter</filter-name>
 		<filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
@@ -104,9 +107,9 @@
 	<filter-mapping>
 		<filter-name>DruidWebStatFilter</filter-name>
 		<url-pattern>/*</url-pattern>
-	</filter-mapping>
+	</filter-mapping>-->
 
-	<!-- 解决Tomcat内部缓存问题 -->
+	<!-- 解决Tomcat内部缓存问题
 	<filter>
 		<filter-name>ExpiresFilter</filter-name>
 		<filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
@@ -119,5 +122,5 @@
 		<filter-name>ExpiresFilter</filter-name>
 		<url-pattern>/*</url-pattern>
 		<dispatcher>REQUEST</dispatcher>
-	</filter-mapping>
+	</filter-mapping>-->
 </web-app>

+ 0 - 58
watero-wechat-web/src/main/webapp/view/2017_51.html

@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>五一嗨购!送你全套净水滤芯!来不来?</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.mui-content img{display: block;width: 100%;}
-	</style>
-	<script>
-        // 屏蔽分享
-        //window.hiddenAllWechatMenu = true;
-        var url = '//'+document.domain+'/watero/view/2017_51.html';
-        window.repleFlag = true;
-        window.repleWxData = {
-            "appId": "",
-            "imgUrl": '//s.iamberry.com/watero/images/shop/2017-51-share.png',
-            "link": url,
-            "desc": "4月29日-5月1日下单的顾客均有电动牙刷相赠!前五名还有一年净水滤芯套装赠送哦!手快有!手慢无!就看你手速行不行了!",
-            "title": "五一嗨购!送你全套净水滤芯!来不来?",
-            "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
-            "shareTimeSuccess": "分享成功",
-            "shareTimeCancel": "已取消分享",
-            "shareAppSuccess": "分享成功!",
-            "shareAppCancel": "已取消分享"
-        };
-	</script>
-</head>
-<body style="background: #fd3b70;">
-<img style="display: none" src="//s.iamberry.com/watero/images/shop/2017-51-share.png" />
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fd3b70;">
-	<img src="//s.iamberry.com/watero/images/shop/2017-51-01.jpg" />
-	<a class="go_web_shop" href="/watero/wechat/wxCart/goProductList"><img src="//s.iamberry.com/watero/images/shop/2017-51-02.jpg" /></a>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function() {
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-</script>
-</body>
-</html>

+ 0 - 96
watero-wechat-web/src/main/webapp/view/after_service_watero.html

@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>售后服务</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=3, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.after-table-view li{position: relative;padding-left: 10px;font-size: 13px;}
-		.after-table-view li:after{content: '';position: absolute;left: 0;top:7px;width: 6px;height: 6px;border-radius: 50%;background: #63ccdf;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content" style="background: #fff;">
-	<div class="mui-content-padded">
-	<h4 class="mui-text-center" style="padding: 20px 0 10px 0;">watero净水机售后服务政策</h4>
-	<p style="font-size: 13px;text-indent: 2em;">
-		依据中国产品质量监督委员会规定的《部分商品修理更换退货
-		责任规定》、《中华人民共和国消费者权益保护法》以及《产品质
-		量法》的有关规定,为维护公司销售产品及品牌的信誉,维护消费
-		者权益,制定以下售后服务细则,消费者可通过售后服务热线:
-		400-8006692或关注对应品牌产品的微信公众号联系客服,享受
-		相关售后服务
-	</p>
-	<ul class="after-table-view">
-		<li>
-			一.	产品签收开箱检查发现配件损坏、漏发情况,经沟通核实后给予补寄,补寄运费由公司承担
-		</li>
-		<li>
-			二.	自签收之日起七天内(含)消费者可享受以下售后服务:
-			<div>
-				1. 产品未出现性能问题,消费者可无理由退货,无理由退货具体要求如下:
-				<p class="mui-h6">
-				(1)影响二次销售的情况:产品被人为损坏、包装箱破损人为导致零配件缺失、随机耗材被消耗使用均不在七天无理由退货范围内,需按各产品的 价目表 收取折旧费用(含耗材费用)运费由消费者承担
-				</p>
-				<p class="mui-h6">(2)除以上不影响二次销售情况,消费者只需承担寄回运费</p>
-				2.	发生非人为损坏的性能问题,消费者可选择退货、换货或维修,所产生的来回运费、耗材、人工费用由公司承担
-			</div>
-		</li>
-		<li>
-			三.	自签收之日起三个月内(含)发生非人为损坏的性能问题消费者可以选择换货或修理,所产生的来回运费、人工费用由公司承担。耗材滤芯不在换货范围内,换货寄回时用户需取下机器上的滤芯(可用保鲜膜封住滤芯口并放冰箱冷藏保存)
-		</li>
-		<li>
-			四.	自签收之日起至一年内(含),主机(不包含配件、耗材)发生非人为损坏的性能问题,消费者可以选择修理,所产生的来回运费、耗材、人工费用由公司承担。
-		</li>
-		<li>
-			五.	自签收之日起超出一年,消费者可以选择修理,消费都需按各产品的价目表自费修理,并自费承担来回运费
-		</li>
-		<li>
-			六.	三包有效期内,因性能故障经两次修理仍不能正常使用的核实修理记录后,免费为消费者调换同型号同规格的商品同型号同规格产品停产的,应当调换不低于原产品性能的同品牌商品
-		</li>
-		<li>
-			七.	三包有效期内,符合换货条件的,消费者不愿意换货而要求退货的,应当予以退货,并按各产品价目表的规定收取相关费用
-		</li>
-		<li>
-			八.	产品发生以下情况的,属于非保修范围,需按各产品价目表规定付费维修:
-			<div>1.已超过三包有效期限</div>
-			<div>2.不能出示发票或购买凭证</div>
-			<div>3.发票或者购买记录与实际不符,或者发票有涂改、严重污损</div>
-			<div>4.因不可抗力造成的损坏</div>
-			<div>5.未经授权的维修、误用、碰撞、疏忽、滥用、进液、事故、改动、拆动、不正确使用非本机配件;或撕毁、涂改标贴、机 身序号、防伪标记等行为</div>
-			<div>6.“三包”凭证的型号与修理产品型号不符或涂改的</div>
-			<div>7.使用环境(如电压、湿度、温度、通风条件等)不符合产品</div>
-			<div>说明书的表述,造成的损坏</div>
-		</li>
-		<li>
-			九.	消费者产品在三个月有进行过换新的,自换新日开始计算质保期限;消费者产品在三个月至一年内有维修的,维修期限从维修后签收日开始延续计算
-		</li>
-	</ul>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        document.querySelector('.loading-bg').style.display='none';
-    });
-</script>
-</body>
-</html>

+ 0 - 275
watero-wechat-web/src/main/webapp/view/apply_replacement.html

@@ -1,275 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="utf-8">
-	<title>申请换货</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.cart_fixed{position: fixed;right: 30px;bottom:135px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .5;}
-		.cart_fixed .mui-badge{position: absolute;right:-7px;top:-5px;font-size: 12px;}
-		.return{position: fixed;right: 30px;bottom: 80px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #1cc9f4;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #c5c5c5;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px;}
-		.lease-ul{font-size: 12px;color: #999;}
-		.lease-ul li{padding: 5px 0;}
-		.lease-left{display: inline-block;width: 25%;}
-		.ul_radio{width: 73%;display: inline-block;}
-		.ul_radio li{width:100%;height: 55px;margin: 0 1%;border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.radio-cell .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.lease-r-center{position: absolute;left: 70px;top: 20px;}
-		.lease-color{padding: 10px 0;float: left;}
-		.lease-select-box{padding: 12px 0;position: relative;}
-		.lease-select{position: absolute;left: 0;top: 10px;}
-		.mui-input-row{font-size: 13px;}
-		.mui-input-row input{font-size: 13px;}
-		.mui-input-group:before{display: none;}
-		#xieyi-dalog{text-decoration:underline}
-		.ul_noline{padding-bottom: 60px;}
-		.ul_noline:before{display: none;}
-		.ul_noline li:after{display: none;}
-		.address_ul{color: #999;font-size: 12px;}
-		.address_ul li{white-space:nowrap;overflow: hidden;text-overflow: ellipsis;}
-		.my-select {border:0!important;color: #999;background-color: #f5f5f5;margin-bottom: 0;padding: 3px 14px;text-align: center;-webkit-appearance: menulist;height: 40px;}
-		.my-view1:after,.my-view1 li:after{display: none;}
-		.ul_noline:after{display: none;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-
-<body style="background-color: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<div style="padding: 0 10px;background: #fff;">
-		<ul class="mui-table-view">
-			<li class="mui-table-view-cell" style="padding: 11px 0;">
-				<span class="iconfont icon-lease7 cl-blue"></span>&nbsp;订单编号:<span id="order_num"></span>
-			</li>
-		</ul>
-		<ul class="lease-ul">
-			<!--<li>产品名称:美国watero净饮水一体机</li>
-            <li>产品颜色:黑色x1</li>-->
-		</ul>
-		<ul class="mui-table-view my-view1">
-			<li class="mui-table-view-cell" style="padding: 11px 0;">
-				<span class="mui-h5">寄回快递单号:</span><input type="text" style="width:50% !important"  id="ipt_kuaidi"/><span id="kuaidi_name"></span>
-			</li>
-		</ul>
-
-		<ul class="mui-table-view ul_noline">
-			<li class="mui-table-view-cell" style="padding: 11px 0 0 0;">
-				<span class="iconfont icon-lease2 cl-blue"></span>&nbsp;选择换货邮寄地址
-			</li>
-			<li class="mui-table-view-cell"  style="padding: 11px 10px;">
-				<a class="mui-navigate-right" id="open-wechat-addres-a">
-					<!--选择收货地址-->
-					<ul class="address_ul">
-						<!--<li>收  货  人:林林</li>
-                        <li>手 机 号:15999999999</li>
-                        <li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>-->
-					</ul>
-				</a>
-			</li>
-			<li>
-				<span class="mui-h5">换货备注</span>
-			</li>
-			<li style="ppadding:10px 0 5px 0;">
-				<input type="text" placeholder="请输入您的换货备注" style="font-size: 12px;background: #f0f0f0;border: 0;text-align: center;" id="ipt_beizhu"/>
-			</li>
-			<li class="mui-text-center" style="padding:10px 15px 15px 15px;">
-				<a href="/watero/view/lease_xieyi.html" style="text-decoration: underline;color: #999;" id="btn_shouhou">售后说明</a>
-			</li>
-		</ul>
-	</div>
-	<div class="buy-footer">
-		<button type="button" class="mui-btn my-btn-hand active" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="申请中" id="btn_submit">申请换货</button>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script>
-    var address='',nickname='',ads_tel='';
-    var parm=getParam("orderId"),item1=getParam("itemId");
-    mui.ready(function() {
-        mui.ajax(base_path + '/rent_order/to_apply_exchange', {
-            data: {
-                orderId: parm,
-                itemId:item1
-            },
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-				/*console.log(dt)*/
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                }else{
-                    if(dt.status) {
-                        address=dt.data.rentAddressInfo;
-                        nickname=dt.data.rentAddressName;
-                        ads_tel=dt.data.rentAddressTel;
-                        $("#order_num").text(dt.data.rentOrderId);
-                        $(".address_ul").html('<li>收  货  人:' + dt.data.rentAddressName + '</li><li>手 机 号:' + dt.data.rentAddressTel + '</li><li>详细地址:' + dt.data.rentAddressInfo + '</li>');
-                        var str='';
-                        mui(dt.data.list).each(function(index) {
-                            if(this.itemProductType==1){
-                                str+='<li>产品名称:'+this.itemProductName+'</li><li>产品颜色:'+this.itemProductColorName+'x1</li>'
-                            }else{
-                                str+='<li>赠品名称:'+this.itemProductName+'</li><li>赠品颜色:'+this.itemProductColorName+'x1</li>'
-                            }
-                        });
-                        $(".lease-ul").html(str);
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        })
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-
-    //申请换货
-    var isPay=true,check=false;
-    mui('body').on('tap', '#btn_submit', function() {
-        console.log(check)
-        var th=this;
-        if(check){
-            if(isPay) {
-                isPay = false; // 锁定请求按钮
-                mui(this).button('loading');
-
-                var param = {
-                    "orderId": parm,
-                    "itemId": item1,
-                    "exchangeAddressName": nickname,
-                    "exchangeAddressTel": ads_tel,
-                    "exchangeAddressInfo":address,
-                    "exchangePostFirm":"申通快递",
-                    "exchangePostNum":$("#ipt_kuaidi").val(),
-                    "exchangeRemark":$("#ipt_beizhu").val()
-                }
-                $.ajax({
-                    type: 'post',
-                    url: base_path+'/rent_order/apply_exchange?dates=' + new Date().getTime(),
-                    data: param,
-                    dataType: 'json',
-                    timeout: 15000,
-                    success: function(dt) {
-                        //console.log(dt);
-                        if(dt.isRedirect) {
-                            location.href = dt.redirectURL;
-                        }else{
-                            if(dt.status) {
-                                mui.alert(dt.message,'',function(){
-                                    location.href='/watero/view/rent/lease_order_details.html?rentStatus=-1';
-                                });
-                            } else {
-                                mui(th).button('reset');
-                                isPay = true;
-                                mui.alert(dt.message);
-                            }
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        //异常处理;
-                        console.log(xhr);
-                        isPay = true;
-                        layer.closeAll();
-                        mui.alert("请检查网络或刷新页面重试!");
-                        mui(th).button('reset');
-                    }
-                });
-            }else{
-                mui.alert("正在申请换货中~~请稍后!");
-                return;
-            }
-        }
-    });
-    // 获取微信共享地址
-    mui('body').on('tap', '#open-wechat-addres-a', function() {
-        editAddrV1(
-            function(res) {
-                // 用户成功拉出地址
-                address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
-                nickname=res.userName;
-                ads_tel= res.telNumber;
-                wechatAddr.status = true;
-                wechatAddr.detailInfo = address;
-                wechatAddr.postalCode = res.postalCode;
-                wechatAddr.userName = res.userName;
-                wechatAddr.userTel = res.telNumber;
-                wechatAddr.nationalCode = res.nationalCode;
-                $("#open-wechat-addres-a").empty().append('<ul class="address_ul"><li>收  件  人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
-            },
-            function() {
-                if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
-                    wechatAddr.status = true;
-                } else {
-                    wechatAddr.status = false;
-                    // 用户取消拉出地址
-                    $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
-                    mui.alert("您没有选择收货地址!");
-                }
-            }
-        );
-
-    });
-    mui.os.ios ? listener_ipt() : keyup_fn();
-
-    function keyup_fn() {
-        $('body').on('keyup', '#ipt_kuaidi', function(e) {
-            //传参数并加载数据
-            var str = $.trim($(this).val());
-            console.log(str!='' && typeof(str) != "undefined");
-            if(str!='' && typeof(str) != "undefined"){
-                check=true;
-                $("#btn_submit").removeClass("active").removeAttr("disabled");
-            }else{
-                check=false;
-                $("#btn_submit").addClass("active").prop("disabled","disabled");
-            }
-        });
-    }
-
-    function listener_ipt() {
-        document.getElementById('ipt_kuaidi').onblur = function() {
-            //传参数并加载数据
-            var str = $.trim($("#ipt_kuaidi").val());
-            console.log(str!='' && typeof(str) != "undefined");
-            var btn_submit=$("#btn_submit");
-            if(str!='' && typeof(str) != "undefined"){
-                check=true;
-                $("#btn_submit").removeClass("active").removeAttr("disabled");
-            }else{
-                check=false;
-                $("#btn_submit").addClass("active").prop("disabled","disabled");
-            }
-        }
-    }
-    mui('body').on('tap', '#btn_shouhou', function() {
-        location.href="/watero/view/lease_xieyi.html"
-    });
-</script>
-</body>
-
-</html>

+ 0 - 247
watero-wechat-web/src/main/webapp/view/apply_returns.html

@@ -1,247 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="utf-8">
-	<title>申请退货</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.cart_fixed{position: fixed;right: 30px;bottom:135px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .5;}
-		.cart_fixed .mui-badge{position: absolute;right:-7px;top:-5px;font-size: 12px;}
-		.return{position: fixed;right: 30px;bottom: 80px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #1cc9f4;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #c5c5c5;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px;}
-		.lease-ul{font-size: 12px;color: #999;}
-		.lease-ul li{padding: 5px 0;}
-		.lease-left{display: inline-block;width: 25%;}
-		.ul_radio{width: 73%;display: inline-block;}
-		.ul_radio li{width:100%;height: 55px;margin: 0 1%;border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.radio-cell .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.lease-r-center{position: absolute;left: 70px;top: 20px;}
-		.lease-color{padding: 10px 0;float: left;}
-		.lease-select-box{padding: 12px 0;position: relative;}
-		.lease-select{position: absolute;left: 0;top: 10px;}
-		.mui-input-row{font-size: 13px;}
-		.mui-input-row input{font-size: 13px;}
-		.mui-input-group:before{display: none;}
-		.btn-pull-code{position: absolute;right: 10px;top:3px;height:34px;padding:0 6px;border-radius: 5px; line-height: 34px;font-size: 12px; color: #fff; background: #24cae9;}
-		.btn-pull-code .active{background: #c8c8c8;}
-		.icon-fuxuankuang a {color: #24cae9;}
-		.icon-fuxuankuang{font-size: 13px;padding:5px 5px 5px 22px;}
-		.icon-fuxuankuang:before{font-size: 13px;color:#e4004d;position: absolute;left: 0;width: 20px;height: 18px;}
-		.icon-fuxuankuang.mui-active:before {color: #c8c8c8;}
-		#xieyi-dalog{text-decoration:underline}
-		.ul_noline:after,.ul_noline:before{display: none;}
-		.ul_noline li:after,.ul_noline li:before{display: none;}
-		.address_ul{color: #999;font-size: 12px;}
-		.address_ul li{white-space:nowrap;overflow: hidden;text-overflow: ellipsis;}
-		.my-select {border:0!important;color: #999;background-color: #f5f5f5;margin-bottom: 0;padding: 3px 14px;text-align: center;-webkit-appearance: menulist;height: 40px;}
-		.my-view1:after,.my-view1 li:after{display: none;}
-		.mui-checkbox input[type=checkbox]:checked:before, .mui-radio input[type=radio]:checked:before{color:#1cc9f4;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-
-<body>
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<div style="padding: 0 10px;background: #fff;">
-		<ul class="mui-table-view ul_noline">
-			<li class="mui-table-view-cell mui-text-center">
-				<span class="cl-red mui-h4">注意</span>
-			</li>
-		</ul>
-		<ul class="lease-ul">
-			<li>1、因净水机滤芯为耗材,若申请退货,所交服务费将无法退还,请 知悉</li>
-			<li>2、成功退货后,我们将在5个工作日内退还至您微信</li>
-		</ul>
-
-		<ul class="mui-table-view ul_noline">
-			<li class="mui-table-view-cell" style="padding: 11px 5px;">
-				<span class="iconfont icon-lease5 cl-blue"></span>&nbsp;退货流程<span class="mui-h6">(如若完成请勾选,进行下一步)</span>
-			</li>
-		</ul>
-		<div class="mui-input-row mui-checkbox mui-left">
-			<label>我已联系客服,并已沟通确认退货</label>
-			<input name="checkbox" value="1" type="checkbox" id="checkbox1">
-		</div>
-		<div class="mui-input-row mui-checkbox mui-left">
-			<label>我已经将机器及配件完整打包好并邮寄</label>
-			<input name="checkbox" value="2" type="checkbox" id="checkbox2">
-		</div>
-		<ul class="mui-table-view ul_noline">
-			<li class="mui-table-view-cell">寄回快递单号<input type="text" placeholder="请填写单号" style="width: 50% !important;margin-bottom: 0;font-size: 12px;margin-left: 10px;" id="ipt_kuaidi"/></li>
-		</ul>
-		<ul class="mui-table-view ul_noline">
-			<li class="mui-table-view-cell mui-h6">
-				<span class="mui-h5">提示:</span>我们收到货品并验货后,将立即退还押金:<span class="cl-red" class="money">¥0.00</span>
-			</li>
-		</ul>
-		<img src="//s.iamberry.com/watero/images/shop/welcome_to_use_again.png" width="100%" />
-	</div>
-	<div class="buy-footer">
-		<button type="button" class="mui-btn my-btn-hand active"  data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="申请中" id="btn_submit">申请退货</button>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script>
-    var parm1=getParam("orderId"),item=getParam("itemId");
-    mui.ready(function() {
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-    mui.os.ios ? listener_ipt() : keyup_fn();
-
-    function keyup_fn() {
-        $('body').on('keyup', '#ipt_kuaidi', function(e) {
-            var str = $.trim($(this).val());
-            if(str!='' && typeof(str) != "undefined"){
-                if($("#checkbox1").is(":checked") && $("#checkbox2").is(":checked")) {
-                    check=true;
-                    see_apply_exchange();
-                    $("#btn_submit").removeClass("active").removeAttr("disabled");
-                }else{
-                    check=false;
-                    $("#btn_submit").addClass("active").prop("disabled","disabled");
-                }
-            }else{
-                check=false;
-                $("#btn_submit").addClass("active").prop("disabled","disabled");
-            }
-        });
-    }
-
-    function listener_ipt() {
-        document.getElementById('ipt_kuaidi').onblur = function() {
-            var str = $.trim($("#ipt_kuaidi").val());
-            var btn_submit=$("#btn_submit");
-            if(str!='' && typeof(str) != "undefined"){
-                if($("#checkbox1").is(":checked") && $("#checkbox2").is(":checked")) {
-                    check=true;
-                    see_apply_exchange();
-                    $("#btn_submit").removeClass("active").removeAttr("disabled");
-                }else{
-                    check=false;
-                    $("#btn_submit").addClass("active").prop("disabled","disabled");
-                }
-            }else{
-                check=false;
-                $("#btn_submit").addClass("active").prop("disabled","disabled");
-            }
-        }
-    }
-    //申请退货
-    var isPay=true,check=false;
-    mui('body').on('tap', '#btn_submit', function() {
-        console.log(check)
-        var th=this;
-        if(check){
-            if($("#checkbox1").is(":checked") && $("#checkbox2").is(":checked")){
-                if(isPay) {
-                    isPay = false; // 锁定请求按钮
-                    mui(this).button('loading');
-
-                    var param = {
-                        "orderId": parm1,
-                        "itemId": item,
-                        "rentPostNum":$("#ipt_kuaidi").val()
-                    }
-                    $.ajax({
-                        type: 'post',
-                        url: base_path+'/rent_order/apply_exit?dates=' + new Date().getTime(),
-                        data: param,
-                        dataType: 'json',
-                        timeout: 15000,
-                        success: function(dt) {
-                            //console.log(dt);
-                            if(dt.isRedirect) {
-                                location.href = dt.redirectURL;
-                            }else{
-                                if(dt.status) {
-                                    mui.alert(dt.message,'',function () {
-                                        location.href='/watero/view/rent/lease_order_details.html?rentStatus=-1';
-                                    });
-                                } else {
-                                    mui(th).button('reset');
-                                    isPay = true;
-                                    mui.alert(dt.message);
-                                }
-                            }
-                        },
-                        error: function(xhr, type, errorThrown) {
-                            //异常处理;
-                            console.log(xhr);
-                            isPay = true;
-                            mui.alert("请检查网络或刷新页面重试!");
-                            mui(th).button('reset');
-                        }
-                    });
-                }else{
-                    mui.alert("正在申请退货中~~请稍后!");
-                    return;
-                }
-            }
-        }
-    });
-    mui('body').on('click', 'input[type=checkbox]', function() {
-        if($("#checkbox1").is(":checked") && $("#checkbox2").is(":checked")){
-            if(check=true){
-                $("#btn_submit").removeClass("active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("active").prop("disabled","disabled");
-            }
-        }else{
-            $("#btn_submit").addClass("active").prop("disabled","disabled");
-        }
-    });
-    function see_apply_exchange(){
-        mui.ajax(base_path + '/rent_order/to_apply_exit', {
-            data: {
-                "orderId": parm1,
-                "itemId": item
-            },
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-				/*console.log(dt)*/
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                }else{
-                    if(dt.status) {
-                        if(dt.resultCode==200){
-                            $(".money").text("¥"+accDiv(dt.data,100))
-                        }else{
-                            $(".money").text("¥0.00")
-                        }
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        })
-    }
-</script>
-</body>
-
-</html>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 226
watero-wechat-web/src/main/webapp/view/coupon_bag.html


+ 0 - 52
watero-wechat-web/src/main/webapp/view/coupon_dec.html

@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>滤芯兑换券使用流程</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.mui-content img{display: block;width: 100%;}
-		.mui-bar-tab .mui-btn{background: #55c0dc;border:1px solid #55c0dc;color: #fff;margin: 0 20px;width: 124px;}
-		.mui-bar-tab .mui-btn:active{background: #55c0dc;border:1px solid #55c0dc;color: #fff;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<img src="//s.iamberry.com/watero/images/coupon_dsc.jpg" />
-	<div style="height: 60px;">&nbsp;</div>
-	<nav class="mui-bar mui-bar-tab mui-text-center">
-		<button type="button" class="mui-btn go_web_shop">立即使用</button>
-		<button type="button" class="mui-btn go_coupon_bag">查看我的兑换券</button>
-	</nav>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function() {
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-    $(document).on('tap', '.go_coupon_bag', function() {
-        location.href ='/watero/view/coupon_bag.html';
-    });
-</script>
-</body>
-</html>

+ 0 - 167
watero-wechat-web/src/main/webapp/view/deposit_coupon.html

@@ -1,167 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>押金提取券</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.mui-checkbox.mui-left input[type=checkbox], .mui-radio.mui-left input[type=radio] {left: 0px;}
-		.mui-checkbox.mui-left label, .mui-radio.mui-left label {padding-right: 15px;padding-left: 38px;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #1cc9f4;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #c5c5c5;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="mui-content-padded">
-		<div style="position: relative;">
-			<img src="//s.iamberry.com/watero/images/shop/bg_quan_02.jpg" width="100%" />
-			<div style="position: absolute;left: 0;width: 100%;top:30%;line-height: 1.6; width: 100%;text-align: center;color: #fff;font-size: 16px;">
-				<span class="coupon_name"></span><br />
-				<span class="mui-h4 coupon_money">¥0.00</span>
-			</div>
-		</div>
-		<div style="padding: 10px 0;">选择订单</div>
-		<div class="cp_list">
-			<!--<div class="mui-input-row mui-radio mui-left">
-						<label>2017550548058(黑色水机)</label>
-						<input name="radio1" type="radio">
-			</div>
-			<div class="mui-input-row mui-radio mui-left">
-						<label>2017550548058(白色水机)</label>
-						<input name="radio1" type="radio">
-			</div>-->
-		</div>
-		<div style="padding: 10px 0;">
-			订单押金:<span class="cl-red yajin">¥0.00</span>
-		</div>
-		<div style="padding: 0 0 20px 0;">
-			本次提取押金<span class="cl-red now_money">¥0.00</span>,剩余<span class="cl-red sy_money">¥0.00</span>,待提取
-		</div>
-		<div class="mui-h6">
-			财务审核通过后,将于5个工作日内,转至您的微信钱包
-		</div>
-	</div>
-	<div class="buy-footer">
-		<button type="button" class="mui-btn my-btn-hand active" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="确认提取中..." id="btn_submit" disabled="disabled">确认提取</button>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    var pledgeId=getParam("pledgeId");
-    mui.ready(function(){
-        mui.ajax(base_path + '/rent_coupon/toExtractDeposit', {
-            data: {
-                pledgeId: pledgeId
-            },
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-				/*console.log(dt)*/
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                }else{
-                    console.log(dt)
-                    if(dt.status){
-                        $(".coupon_name").text(dt.data.couponInfo.pledgeName);
-                        $(".coupon_money").text("¥"+accDiv(dt.data.couponInfo.pledgeMoney,100)).attr("name",accDiv(dt.data.couponInfo.pledgeMoney,100));
-                        var table=document.querySelector(".cp_list");
-                        var cp_data=[];
-                        cp_data=dt.data.listOrderItem;
-                        mui(cp_data).each(function(index) {
-                            var li=document.createElement("div");
-							/*li.innerHTML='<div class="mui-input-row mui-checkbox mui-left"><label>'+this.itemOrderId+'('+this.itemProductColorName+')</label> <input name="checkbox" value="Item 1" type="checkbox" ></div>'*/
-                            li.innerHTML='<div class="mui-input-row mui-radio mui-left"><label>'+this.itemOrderId+'('+this.itemProductColorName+')</label><input name="radio1" value="'+accDiv(this.rentDeposit,100)+'" tip="'+this.itemId+'" sy="'+accDiv(this.rentRemainDeposit,100)+'" type="radio"></div>';
-                            table.appendChild(li);
-                        });
-                        $(document).on('click',".cp_list .mui-radio>input[type=radio]:checked", function() {
-                            $(".yajin").text("¥"+$(this).val());
-                            console.log($(".coupon_money").attr("name")+"_"+$(this).val());
-                            if($(".coupon_money").attr("name")<$(this).val()){
-                                $(".now_money").text("¥"+$(this).val());
-                            }else{
-                                $(".now_money").text("¥"+$(".coupon_money").attr("name"));
-                                $(".sy_money").text("¥"+$(this).attr("sy"));
-                            }
-                            $("#btn_submit").removeClass("active").removeAttr("disabled");
-                        });
-                    }else{
-                        mui.alert("请求数据失败,请稍后重试!")
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        });
-        document.querySelector('.loading-bg').style.display='none';
-    });
-
-    //申请退货
-    var isPay=true;
-    mui('body').on('tap', '#btn_submit', function() {
-        var th=this;
-        if(isPay) {
-            isPay = false; // 锁定请求按钮
-            mui(this).button('loading');
-
-            var param = {
-                "pledgeId": pledgeId,
-                "orderItemId": $(".cp_list .mui-radio>input[type=radio]:checked").attr("tip")
-            }
-            $.ajax({
-                type: 'post',
-                url: base_path+'/rent_coupon/extractDeposit?dates=' + new Date().getTime(),
-                data: param,
-                dataType: 'json',
-                timeout: 15000,
-                success: function(dt) {
-                    //console.log(dt);
-                    if(dt.isRedirect) {
-                        location.href = dt.redirectURL;
-                    }else{
-                        if(dt.status) {
-                            mui.alert(dt.message);;
-                        } else {
-                            mui(th).button('reset');
-                            isPay = true;
-                            mui.alert(dt.message);
-                        }
-                    }
-                },
-                error: function(xhr, type, errorThrown) {
-                    //异常处理;
-                    console.log(xhr);
-                    isPay = true;
-                    mui.alert("请检查网络或刷新页面重试!");
-                    mui(th).button('reset');
-                }
-            });
-        }else{
-            mui.alert("正在确认提取中~~请稍后!");
-            return;
-        }
-    });
-</script>
-</body>
-</html>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 555
watero-wechat-web/src/main/webapp/view/faq.html


+ 0 - 75
watero-wechat-web/src/main/webapp/view/gift_card_agent_explain.html

@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>代理说明</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.icon-quanyizhanshi,.icon-shouquan,.icon-pinleiyouhui{font-size: 15px;padding-left:30px;}
-		.icon-quanyizhanshi:before,.icon-shouquan:before,.icon-pinleiyouhui:before{font-size: 19px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
-		.my-div{padding: 5px 0;border-bottom: 1px solid rgba(0,0,0,.1);margin-bottom: 5px;}
-		.ul-desc{padding:10px 10px 10px 15px;background: #fff;color: #666;font-size: 12px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-
-	<ul class="mui-table-view">
-		<li class="mui-table-view-cell">
-			<span class="iconfont icon-quanyizhanshi">尊享权益</span>
-		</li>
-	</ul>
-	<ul class="ul-desc">
-		<li>1.将获赠价值3680元的美国watero净饮水一体机一台。</li>
-		<li>2.将获得8张礼品兑换卡(每张可兑换一台美国watero净饮水一体机)</li>
-		<li>3.成功推荐其他人成为代理商,可获赠一台美国watero桌面净饮水一 体机)</li>
-		<li>4.一年后,未使用的礼品卡每张可兑换成1250元现金。</li>
-		<li>5.如果您销售完8张提货卡,系统即将赠送一台水机。</li>
-	</ul>
-	<ul class="mui-table-view">
-		<li class="mui-table-view-cell">
-			<span class="iconfont icon-shouquan">产品代理权</span>
-		</li>
-	</ul>
-	<ul class="ul-desc">
-		<li>当您成为尊贵的代理以后,即可享受美国watero净饮水一体机及礼品卡的产品代理权,在您代理的范围内,我们(深圳爱贝源科技有限公司)保证只有您一人可以代理我们的礼品卡。</li>
-		<li><br/>公司郑重承诺!</li>
-	</ul>
-	<ul class="mui-table-view">
-		<li class="mui-table-view-cell">
-			<span class="iconfont icon-pinleiyouhui">低价拿货权</span>
-		</li>
-	</ul>
-	<ul class="ul-desc">
-		<li>当您成为尊贵的代理以后,即可享受美国watero净饮水一体机及礼品卡的产品代理权,并且享受我们(深圳爱贝源科技有限公司)的最低价拿货权益!</li>
-		<li><br/>我们保证让您享受我们最低价的拿货权!</li>
-	</ul>
-</div>
-<script type="text/javascript" src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script type="text/javascript" src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script type="text/javascript" src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        //console.log("页面加载完毕");
-        document.querySelector('.loading-bg').style.display='none';
-    });
-</script>
-</body>
-</html>

+ 0 - 115
watero-wechat-web/src/main/webapp/view/gift_card_agent_xiaxian_list.html

@@ -1,115 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title></title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.mui-table-view-chevron .mui-table-view-cell{padding-right:10px;}
-		.my-tab-view-pull{padding: 10px 0;}
-		.my-table-view-cell{margin: 0 15px 10px 15px;background: #61cfe7;padding: 10px;border-radius: 5px;position: relative;}
-		.my-table-view-cell p,.my-table-view-cell a{color: #fff !important;}
-		.my-right-center{position: absolute;right: 10px;top: 50%;-webkit-transform: translateY(-50%);}
-		.yuan{border-radius: 50%;border: 3px solid #8ddbed;}
-		.mui-media-object{width: 60px !important;height: 60px !important;max-width: 60px !important;}
-		.mui-media-body{padding-top: 10px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body>
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<!--下拉刷新容器开始-->
-<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
-	<div class="mui-scroll">
-		<!--数据列表-->
-		<ul class="mui-table-view mui-table-view-chevron my-tab-view-pull">
-
-		</ul>
-	</div>
-</div>
-<!--下拉刷新容器结束-->
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.init({
-        pullRefresh: {
-            container: '#pullrefresh',
-            down: {
-                //callback: pulldownRefresh
-            },
-            up: {
-                contentrefresh: '正在加载...',
-                callback: pullupRefresh
-            }
-        }
-    });
-    var pageNumber = 0,pagesize = 10;
-    /**
-     * 上拉加载具体业务实现
-     */
-    function pullupRefresh() {
-        ++pageNumber;
-        mui.ajax(base_path + '/giftCard/card/beRefereesList?dates=' + new Date().getTime(), {
-            data: {
-                "pageSize": pagesize,
-                "pageNO": pageNumber
-            },
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);						
-                if(dt.status) {
-                    var xiaxian_data = [];
-                    xiaxian_data = dt.data;
-                    mui('#pullrefresh').pullRefresh().endPullupToRefresh(xiaxian_data.length < pagesize);
-                    var table = document.body.querySelector('.my-tab-view-pull');
-                    mui(xiaxian_data).each(function(index) {
-                        var li = document.createElement('li');
-                        var status='未付款';
-                        li.className = 'my-table-view-cell';
-                        if(typeof(this.payStatus) == "undefined"){
-                            status='未付款';
-                        }else{
-                            if(this.payStatus==2){
-                                status='已付款';
-                            }else{
-                                status='未付款';
-                            }
-                        }
-                        li.innerHTML = '<a><img class="mui-media-object yuan mui-pull-left" src="'+this.agentHead+'"><div class="mui-media-body">'+decodeURI(this.agentNickname)+'<p class="mui-ellipsis">'+formatDate(this.agentCreateTime)+'</p></div><span class="my-right-center">'+status+'</span></a>';
-                        table.appendChild(li)
-                    })
-                } else {
-                    mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        })
-    }
-    mui.ready(function(){
-        document.querySelector('.loading-bg').style.display='none';
-        //页面首次加载时拉取一次数据
-        mui('#pullrefresh').pullRefresh().pullupLoading();
-    });
-</script>
-</body>
-</html>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 230
watero-wechat-web/src/main/webapp/view/gift_card_exchange_details.html


+ 0 - 80
watero-wechat-web/src/main/webapp/view/gift_card_exchange_win.html

@@ -1,80 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>兑换成功</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.tips{padding-bottom: 65px;}
-		.gift-card-title{padding:25px 0;background:url(//s.iamberry.com/watero/images/shop/gift-card-tit-bg3.png) top center /100% no-repeat #71d8ec;}
-		.gift-card-title .mui-table-view-cell.mui-active{background:transparent;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn){color: #fff;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn).mui-active{background:transparent;}
-		.gift-card-title .mui-navigate-right:after{color: #fff;font-size: 20px;right: 7px;}
-		.gift-card-title .mui-table-view-cell{color: #fff;}
-		.mui-table-view-cell:after,.mui-table-view:after{display:none;}
-		.mui-icon-checkmarkempty{font-size:50px;border:2px solid #fff;border-radius: 50%;}
-		.my-btn-line{border: 1px solid #71d8ec; background: transparent;color: #71d8ec;padding: 5px 10px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="tips">
-		<ul class="mui-table-view gift-card-title">
-			<li class="mui-table-view-cell mui-text-center">
-				<span class="mui-icon mui-icon-checkmarkempty"></span>
-			</li>
-			<li class="mui-table-view-cell mui-text-center">兑换成功</li>
-		</ul>
-		<ul class="mui-table-view mui-text-center">
-			<li class="mui-table-view-cell">
-				兑换时间:<span class="new-time">1900-01-01  00:00:00</span><br/><h6>(可再次扫描礼品卡上二维码,查询兑换信息)</h6>
-			</li>
-			<li class="mui-table-view-cell">
-				<button type="button" class="my-btn-line" id="go-exchange-details">查看兑换详情</button>
-			</li>
-			<li class="mui-table-view-cell">
-				<image width="50%" src="//s.iamberry.com/watero/images/shop/gift-card-2wm.png" />
-			</li>
-			<li class="mui-table-view-cell mui-text-left">
-				<div style="margin-left:5%;font-size:12px;color:#8f8f94;">1.长按识别二维码关注watero水时代<br/>
-					2.公众号回复“礼品卡”,即可查看兑换物流信息<br/>
-					3.享受watero水时代完善的产品售后服务</div>
-			</li>
-		</ul>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        $(".new-time").text(formatDate(new Date()));
-        document.querySelector('.loading-bg').style.display='none';
-    });
-    mui('body').on('tap', '#go-exchange-details', function() {
-        mui.openWindow({
-            url: base_path + '/giftCard/card/exchangeUI'
-        });
-    });
-</script>
-</body>
-</html>

+ 0 - 251
watero-wechat-web/src/main/webapp/view/gift_card_get_give.html

@@ -1,251 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>领取赠品</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.head {height: 60px;}
-		#head {line-height: 60px;}
-		h3 {margin-top: 5px;margin-bottom: 0;}
-		.icon-fuxuankuang a {color: #24cae9;text-decoration: underline;}
-		.icon-daifahuo, .icon-lease2, .icon-jiage, .icon-lipin {font-size: 15px;padding-left: 22px;}
-		.icon-fuxuankuang {font-size: 12px;padding: 5px 5px 5px 22px;}
-		.icon-fuxuankuang:before {font-size: 14px;margin-top: 5px;margin-right: 3px;}
-		.icon-daifahuo:before, .icon-lease2:before, .icon-jiage:before,
-		.icon-lipin:before {font-size: 19px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
-		.try_price {color: #f1436c;}
-		.ul_radio {width: 100%;}
-		.ul_radio li {width: 21%;height: 55px;margin: 0 1%;border: 1px solid rgba(0, 0, 0, .1);border-radius: 5px;display: inline-block;position: relative;font-family: "iconfont" !important;font-style: normal;-webkit-font-smoothing: antialiased;}
-		.ul_radio .active:after {position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.radio1 {background: url(//s.iamberry.com/watero/images/cp-1.jpg)center center/auto 85% no-repeat;}
-		.radio2 {background: url(//s.iamberry.com/watero/images/cp-2.jpg)center center/auto 85% no-repeat;}
-		.radio3 {background: url(//s.iamberry.com/watero/images/cp-3.jpg)center center/auto 85% no-repeat;}
-		.radio4 {background: url(//s.iamberry.com/watero/images/cp-4.jpg)center center/auto 85% no-repeat;}
-		.head-img {position: absolute;bottom: 15px;right: 13px;width: 60px;height: 60px;border-radius: 30px;border: 3px solid #E5E5E5;}
-		.mui-table-view .mui-media .mui-media-body {height: 41px;line-height: 41px;color: #333;}
-		.mui-table-view .mui-media .mui-media-body>span {color: #f1436c;}
-		.my-table-view-try {border-top: .6em solid #f0f0f0;border-bottom: .6em solid #f0f0f0;padding-bottom: 10px;}
-		.my-table-view-try .mui-table-view-cell {padding: 10px 13px 10px 30px !important;font-size: 12px;}
-		.mui-table-view-cell:after, .mui-table-view:before, .mui-table-view:after,
-		.mui-input-group .mui-input-row:after, .mui-input-group:before,
-		.mui-input-group:after {display: none;}
-		.mui-table-view-cell>a:not (.mui-btn ){margin: -15px -15px;}
-		.mui-table-view-cell>a .mui-pull-right {color: #999;font-size: 14px;}
-		#btn_submit {color: #fff;font-size: 18px;background: #24cae9;margin-bottom: 0;border: 0;}
-		.mui-btn-block.mui-active, .btn-pull-code.mui-active {background-color: #c8c8c8 !important;}
-		.icon-fuxuankuang.mui-active:before {color: #c8c8c8;}
-		.mui-content-padded {margin: 10px 13px;}
-		.mui-input-group .mui-input-row {height: 50px;padding: 5px 0;border: 1px solid rgba(0, 0, 0, .1);margin: 10px 0;}
-		.mui-input-row label {color: #666;width: 27%;font-size: 15px;}
-		.mui-input-row label ~input{width: 73%;}
-		.mui-input-row label ~input::-webkit-input-placeholder {font-size: 15px;}
-		.triangle-down {width: 0;height: 0;border-left: 7px solid transparent;border-right: 7px solid transparent;border-top: 7px solid #ccc;}
-		.my-arrowright {position: absolute;right: 18px;top: 28px;color: #666;pointer-events: none;}
-		.mui-btn-red {background-color: #e9004c;}
-		.tips {padding-bottom: 65px;}
-		.gift-card-title {padding-top: 70px;background: url(//s.iamberry.com/watero/images/shop/gift-card-tit-bg2.png) top center/100% no-repeat #71d8ec;}
-		.gift-card-title .mui-table-view-cell.mui-active {background: transparent;}
-		.gift-card-title .mui-table-view-cell>a:not (.mui-btn ){color: #fff;}
-		.gift-card-title .mui-table-view-cell>a:not (.mui-btn ).mui-active {background: transparent;}
-		.gift-card-title .mui-navigate-right:after {color: #fff;font-size: 20px;right: 7px;}
-		.gift-card-title .mui-table-view-cell {color: #fff;}
-		.mui-table-view-cell.mui-collapse .mui-collapse-content {background: #71d8ec;}
-		.accordion {float: right;margin: 2px 15px 0 0;font-size: 12px;color: #fff;}
-		.my-btn-hand {display: block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active {background-color: #1cc9f4;}
-		.my-div {padding: 5px 0;border-bottom: 1px solid rgba(0, 0, 0, .1);margin-bottom: 5px;}
-		.mui-h5, h5 { margin-left: 30px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner"></div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="tips">
-		<ul class="mui-table-view gift-card-title">
-			<li class="mui-table-view-cell mui-text-center">您已成功推荐一位代理商,获赠价值¥3680水机一台</li>
-			<li class="mui-table-view-cell mui-text-left mui-collapse"></li>
-		</ul>
-		<div class="mui-content-padded">
-			<div class="my-div">
-				<span class="iconfont icon-lipin">选择赠品</span>
-			</div>
-			<div class="mui-h6">产品名称:美国watero净饮水一体机</div>
-			<div class="mui-h6">产品数量:1台</div>
-			<form class="mui-input-group">
-				<div style="display: table; width: 100%; padding: 10px 0;">
-					<div
-							style="display: table-cell; width: 20%; vertical-align: middle;">
-						选择颜色:</span>
-					</div>
-					<div style="display: table-cell; width: 70%; text-align: right;">
-						<ul class="ul_radio">
-							<!-- <li class="radio1 active"></li>
-                            <li class="radio2"></li>
-                            <li class="radio3"></li>
-                            <li class="radio4"></li> -->
-						</ul>
-					</div>
-				</div>
-			</form>
-		</div>
-		<div class="my-div">
-			<span class="iconfont icon-lease2">收货信息</span>
-		</div>
-		<ul class="mui-table-view">
-			<li class="mui-table-view-cell">
-				<a class="mui-navigate-right" id="open-wechat-addres-a">
-					收货地址<span class="mui-h5">请选择收货地址</span>
-					<!-- <ul class="ft-12" style="color: #333;">
-                        <li>收  货  人:林林</li>
-                        <li>手 机 号:15999999999</li>
-                        <li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>
-                    </ul> -->
-				</a>
-			</li>
-		</ul>
-	</div>
-</div>
-<div class="buy-footer">
-	<button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="提交中" class="mui-btn mui-btn-block mui-btn-outlined mui-active" id="btn_submit" disabled="disabled">确认领取</button>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js?v=201706001"></script>
-<script type="text/javascript">
-    var check = false, alert_msg = '';
-    var agentMachineId =getParam("agentMachineId");
-    mui.ready(function(){
-        mui.ajax(base_path + '/giftCard/card/product/details?dates=' + new Date().getTime(), {
-            data: {"agentMachineId":agentMachineId},
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.returnCode=="200" && dt.resultCode=="200"){
-                        if (typeof(dt.returnMsg.msg) != "undefined"){
-                            if(dt.returnMsg.msg==2){
-                                mui.alert("已经领取过,请在赠品订单列表查看",'',function(){
-                                    mui.openWindow({url: '/watero/view/gift_card_give_order_list.html'})
-                                });
-                            }
-                        }
-                        var table = document.body.querySelector('.ul_radio');
-                        mui(dt.returnMsg.colors).each(function(index) {
-                            var li = document.createElement('li');
-                            if(index==0){
-                                li.className ='radio'+this.colorId+' active';
-                            }else{
-                                li.className ='radio'+this.colorId;
-                            }
-                            li.setAttribute("id",this.colorId);
-                            table.appendChild(li);
-                        });
-                        $(".ul_radio li").each(function() {
-                            $(this).on("click", function() {
-                                $(this).addClass("active");
-                                $(this).siblings().removeClass("active");
-                            });
-                        });
-                        document.querySelector('.loading-bg').style.display='none';
-                    }else{
-                        mui.alert(dt.resultMsg);
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        });
-    });
-    var address='',nickname='',ads_tel='';
-    // 获取微信共享地址
-    mui('body').on('tap', '#open-wechat-addres-a', function() {
-        editAddrV1(
-            function(res) {
-                // 用户成功拉出地址
-                address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
-                nickname=res.userName;
-                ads_tel= res.telNumber;
-                wechatAddr.status = true;
-                wechatAddr.detailInfo = address;
-                wechatAddr.postalCode = res.postalCode;
-                wechatAddr.userName = res.userName;
-                wechatAddr.userTel = res.telNumber;
-                wechatAddr.nationalCode = res.nationalCode;
-                $("#open-wechat-addres-a").empty().append('<ul class="ft-12" style="color: #333;"><li>收  货  人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
-                $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
-            },
-            function() {
-                if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
-                    wechatAddr.status = true;
-                    $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
-                } else {
-                    wechatAddr.status = false;
-                    // 用户取消拉出地址
-                    $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
-                    mui.alert("您没有选择收货地址!");
-                }
-            }
-        );
-
-    });
-    mui('body').on('tap','#btn_submit',function() {
-        if(wechatAddr.status){
-            mui(this).button('loading');
-            var param = {
-                "agentMachineColorId":$(".ul_radio .active").attr("id"),
-                "agentMachineId": agentMachineId,
-                "agentMachineAddressInfo": address,
-                "agentMachineAddressName":nickname,
-                "agentMachineAddressTel":ads_tel ,
-            };
-            $.ajax({
-                type: 'post',
-                url: base_path+'/giftCard/card/updateAgentMachine?dates=' + new Date().getTime(),
-                data:param,
-                dataType: 'json',
-                timeout: 15000,
-                success: function(dt) {
-                    //console.log(dt);
-                    if(dt.resultCode=="200" && dt.returnCode=="200") {
-                        mui.openWindow({url: '/watero/view/gift_card_give_order_list.html'})
-                    } else {
-                        mui(th).button('reset');
-                        mui.alert(dt.returnMsg);
-                    }
-                },
-                error: function(xhr, type, errorThrown) {
-                    //异常处理;
-                    console.log(xhr);
-                    mui.alert("请检查网络或刷新页面重试!");
-                    mui(th).button('reset');
-                }
-            });
-        }else{
-            mui.alert("请选择收货信息");
-        }
-    });
-</script>
-</body>
-</html>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 172
watero-wechat-web/src/main/webapp/view/gift_card_give_order_list.html


+ 0 - 89
watero-wechat-web/src/main/webapp/view/gift_card_go_agent.html

@@ -1,89 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>进入小代理</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.tips {padding-bottom: 65px;}
-		.gift-card-title {padding:55px 0;background: url(//s.iamberry.com/watero/images/shop/gift-card-tit3-bg.jpg) top center /100% auto no-repeat #71d8ec;}
-		.my-btn-exchange{border: 1px solid rgba(66,199,244,.5)  !important;text-align: center;height: 48px !important;width:90% !important;margin-left:5%;}
-		#btn_submit{padding:7px 0 !important;background: #e3ecee;border: 0;color: #fff;}
-		.my-footer{position: fixed;text-align: center;width: 100%;left: 0; bottom: 0;padding: 10px 0;font-size:12px;color:#c5c5c5;}
-		#btn_submit.my-active{background:#6fd7eb;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner"></div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="tips">
-		<ul class="mui-table-view gift-card-title">
-			<li class="mui-table-view-cell mui-text-left mui-collapse"></li>
-		</ul>
-		<div style="margin: 90px 13% 80px 13%;">
-			<input type="tel" value="" placeholder="请输入暗号" maxlength="6" class="mui-input-clear my-btn-exchange" id="ipt-exchange"/>
-			<br/><br/>
-			<button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="提交中" class="mui-btn mui-btn-block mui-btn-outlined" id="btn_submit" disabled="disabled">确认</button>
-		</div>
-	</div>
-</div>
-<div class="my-footer">
-	深圳爱贝源科技有限公司<br/>400-8006692
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    var code='031552';
-    mui.ready(function(){
-        document.querySelector('.loading-bg').style.display='none';
-    });
-    mui.os.ios ? listener_ipt() : keyup_fn();
-
-    function keyup_fn() {
-        $('body').on('keyup', '#ipt-exchange', function(e) {
-            //传参数并加载数据
-            var str = $.trim($('#ipt-exchange').val());
-            if(str==code){
-                $("#btn_submit").addClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").removeClass("my-active").prop("disabled","disabled");
-            }
-        });
-    }
-
-    function listener_ipt() {
-        document.getElementById('ipt-exchange').onblur = function() {
-            //传参数并加载数据
-            var str = $.trim($('#ipt-exchange').val());
-            if(str==code){
-                $("#btn_submit").addClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").removeClass("my-active").prop("disabled","disabled");
-            }
-        }
-    }
-    mui('body').on('tap','#btn_submit',function() {
-        if($.trim($('#ipt-exchange').val())==code){
-            mui.openWindow({url: '/watero/view/gift_card_to_agent.html'})
-        }
-    });
-</script>
-</body>
-</html>

+ 0 - 495
watero-wechat-web/src/main/webapp/view/gift_card_renew_agent.html

@@ -1,495 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>继续代理</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.head {height: 60px;}
-		#head {line-height: 60px;}
-		h3{margin-top:5px;margin-bottom: 0;}
-		.icon-fuxuankuang a{color: #24cae9;text-decoration:underline;font-size: 12px;}
-		.icon-daifahuo,.icon-lease2,.icon-jiage,.icon-lipin,.icon-lease1,.icon-jiage{font-size: 15px;padding-left: 22px;}
-		.icon-fuxuankuang{font-size: 14px;padding:5px 5px 5px 22px;}
-		.icon-fuxuankuang:before{font-size: 15px;margin-top: 5px;margin-right: 3px;color:#e4004d;}
-		.icon-daifahuo:before,.icon-lease2:before,.icon-jiage:before,.icon-lipin:before,.icon-lease1:before,.icon-jiage:before{font-size: 19px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
-		.try_price{color: #f1436c;}
-		.ul_radio{width: 100%;text-align: left;}
-		.ul_radio li{width:21%;height: 55px;margin: 0 1%;border: 1px solid rgba(0,0,0,.1);border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.ul_radio .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.radio1{background: url(//s.iamberry.com/watero/images/cp-1.jpg) center center /auto 85% no-repeat;}
-		.radio2{background: url(//s.iamberry.com/watero/images/cp-2.jpg) center center /auto 85% no-repeat;}
-		.radio3{background: url(//s.iamberry.com/watero/images/cp-3.jpg) center center /auto 85% no-repeat;}
-		.radio4{background: url(//s.iamberry.com/watero/images/cp-4.jpg) center center /auto 85% no-repeat;}
-		.head-img {position: absolute;bottom: 15px;right: 13px;width: 60px;height: 60px;border-radius: 30px;border: 3px solid #E5E5E5;}
-		.mui-table-view .mui-media .mui-media-body{height: 41px;line-height: 41px;color: #333;}
-		.mui-table-view .mui-media .mui-media-body>span{color: #f1436c;}
-		.my-table-view-try{border-top: .6em solid #f0f0f0;border-bottom: .6em solid #f0f0f0;padding-bottom: 10px;}
-		.my-table-view-try .mui-table-view-cell{padding:10px 13px 10px 30px !important;font-size: 12px;}
-		.mui-table-view-cell:after,.mui-table-view:before,.mui-table-view:after,.mui-input-group .mui-input-row:after,.mui-input-group:before,.mui-input-group:after{display: none;}
-		#open-wechat-addres-a{margin: -15px -15px -15px -28px !important;}
-		.mui-table-view-cell>a .mui-pull-right{color: #999;font-size: 14px;}
-		#btn_submit{color: #fff;font-size: 18px;background: #24cae9;margin-bottom: 0;border: 0;}
-		.mui-btn-block.mui-active,.btn-pull-code.mui-active{background-color: #c8c8c8 !important;}
-		.icon-fuxuankuang.mui-active:before{color: #c8c8c8;}
-		.mui-content-padded{margin: 10px 13px;}
-		.mui-input-group .mui-input-row {height: 50px;padding: 5px 0;border: 1px solid rgba(0,0,0,.1); margin:10px 0;}
-		.mui-input-row label{color: #666;width:27%;font-size: 15px;}
-		.mui-input-row label~input{width:73%;}
-		.mui-input-row label~input::-webkit-input-placeholder{font-size: 15px;}
-		.triangle-down {width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;}
-		.my-arrowright{position: absolute;right: 18px;top: 28px;color: #666;pointer-events:none;}
-		.mui-btn-red{background-color: #e9004c;}
-		.tips{padding-bottom: 85px;}
-
-		.gift-card-title{padding-top:70px;background:url(//s.iamberry.com/watero/images/shop/gift-card-tit2-bg.jpg) top center /100% no-repeat #71d8ec;}
-		.gift-card-title .mui-table-view-cell.mui-active{background:transparent;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn){color: #fff;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn).mui-active{background:transparent;}
-		.gift-card-title .mui-navigate-right:after{color: #fff;font-size: 20px;right: 7px;}
-		.gift-card-title .mui-table-view-cell{color: #fff;}
-		.mui-table-view-cell.mui-collapse .mui-collapse-content{background: #71d8ec;}
-		.accordion{float: right;margin:2px 15px 0 0;font-size: 12px;color: #fff;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #1cc9f4;}
-		.my-div{padding: 5px 0;border-bottom: 1px solid rgba(0,0,0,.1);margin-bottom: 5px;}
-		.mui-h5, h5 {margin-left: 30px;font-size: 12px;}
-		.mui-h6, h6 {padding: 5px 0;}
-		.my-btn-exchange{background: #ddf2f8 !important;text-align: center;border: 0 !important;font-size: 14px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="tips">
-		<ul class="mui-table-view gift-card-title">
-			<li class="mui-table-view-cell mui-text-center">代理费用:10000元</li>
-			<li class="mui-table-view-cell mui-text-left mui-collapse">
-				<a class="mui-navigate-right" id="mui-navigate-right"><span class="iconfont icon-quanyizhanshi"></span> 尊享权益<span class="accordion">详情</span></a>
-				<div class="mui-collapse-content">
-					<ul class="ft-12">
-						<li>1.将获赠价值3680元的美国watero净水机一台。</li>
-						<li>2.将获得8张提货卡(每张可兑换一台美国watero净水机)</li>
-						<li>3.成功推荐其他人成为代理商,可获赠一台美国watero净水机</li>
-						<li>4.一年后,未使用的礼品卡每张可兑换成1250元现金。</li>
-					</ul>
-				</div>
-			</li>
-		</ul>
-		<div class="mui-content-padded">
-			<div>
-				<span class="iconfont icon-lease1">代理商信息</span>
-			</div>
-			<form class="mui-input-group">
-				<div class="mui-input-row">
-					<label>您的姓名</label>
-					<input type="text" maxlength="10" class="mui-input-clear" placeholder="请输入您的姓名" id="ipt-name">
-				</div>
-				<div class="mui-input-row">
-					<label>手机号码</label>
-					<input type="tel" maxlength="11" class="mui-input-clear" placeholder="请输入您的手机号" id="ipt-phone">
-				</div>
-			</form>
-			<div class="my-div">
-				<span class="iconfont icon-lipin">选择赠品</span>
-			</div>
-			<div class="mui-h6">
-				产品名称:美国watero净饮水一体机
-			</div>
-			<div class="mui-h6">
-				产品数量:1台
-			</div>
-			<form class="mui-input-group">
-				<div style="display: table;width: 100%;padding: 10px 0;">
-					<div style="display: table-cell;width: 20%;vertical-align: middle;font-size: 12px;font-weight: 400;color: #8f8f94;">选择颜色:</span></div><div style="display:table-cell;width:70%;text-align: right;">
-					<ul class="ul_radio">
-						<!-- <li class="radio1 active"></li>
-                        <li class="radio2"></li>
-                        <li class="radio3"></li>
-                        <li class="radio4"></li> -->
-					</ul>
-				</div>
-				</div>
-				<div class="my-div">
-					<span class="iconfont icon-daifahuo">提货卡</span>
-				</div>
-				<div class="mui-h6">
-					美国watero净饮水一体机提货卡<span class="mui-pull-right cl-red">X8张</span>
-				</div>
-			</form>
-			<!-- 				<div class="my-div">
-                                <span class="iconfont icon-lease2">收货信息</span>
-                            </div> -->
-			<ul class="mui-table-view" style="padding-top: 15px;">
-				<li class="mui-table-view-cell">
-					<a class="mui-navigate-right" id="open-wechat-addres-a">
-						<span class="iconfont icon-lease2">收货信息</span><span class="mui-h5">请选择收货地址</span>
-						<!-- <ul class="ft-12" style="color: #333;">
-							<li>收  货  人:林林</li>
-							<li>手 机 号:15999999999</li>
-							<li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>
-						</ul> -->
-					</a>
-				</li>
-			</ul>
-			<div style="padding:8px 0;margin-top:4px;border-top: 1px solid rgba(0,0,0,.1);">
-				<span class="iconfont icon-jiage">抵扣密码</span>
-			</div>
-			<div>
-				<input type="text" value="" placeholder="请输入抵扣密码" maxlength="12" class="mui-input-clear my-btn-exchange" id="ipt-exchange"/>
-				<br/>
-				<span class="mui-h5">说明:如你已经线下支付并已获得抵扣密码,输入即可!</span>
-			</div>
-			<ul class="mui-table-view">
-				<li style="padding:20px 10px 0px 10px;text-align: center;">
-					<span class="iconfont icon-fuxuankuang mui-active" id="btn-tongyi">我已经阅读并同意<a id="xieyi-dalog">《美国watero代理说明》</a></span>
-				</li>
-			</ul>
-		</div>
-
-		<div class="mui-text-center">
-			支付金额:<span class="cl-red" id="pay_price">¥10000</span>
-		</div>
-	</div>
-</div>
-<div class="buy-footer">
-	<button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="支付中" class="mui-btn mui-btn-block mui-btn-outlined mui-active" id="btn_submit" disabled="disabled">立即支付</button>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    //wechatAddr.status=true;
-    var check = false,alert_msg='';
-    var uname = /^[A-Za-z\-\u4e00-\u9fa5]{1,10}$/;//简体中文英文
-    var mobile=/^(13|14|15|18|17)[0-9]{9}$/; //11位手机号码
-    var dcode=/^[A-Z]{1}[0-9]{11}$/; //12位抵扣密码
-    var isPay = true; // 是否在请求支付,false表示正在请求,true可以请求
-    mui.ready(function(){
-        mui.ajax(base_path + '/giftCard/card/product/details?dates=' + new Date().getTime(), {
-            data: {},
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.returnCode=="200" && dt.resultCode=="200"){
-                        if (dt.returnMsg.agentInfo == null){
-                            mui.openWindow({url:'/watero/view/gift_card_to_agent.html'})
-                        }
-                        $("#ipt-name").val(decodeURI(dt.returnMsg.agentInfo.agentNickname));
-                        $("#ipt-phone").val(dt.returnMsg.agentInfo.agentTel);
-                        var table = document.body.querySelector('.ul_radio');
-                        mui(dt.returnMsg.colors).each(function(index) {
-                            var li = document.createElement('li');
-                            if(index==0){
-                                li.className ='radio'+this.colorId+' active';
-                            }else{
-                                li.className ='radio'+this.colorId;
-                            }
-                            li.setAttribute("id",this.colorId);
-                            li.setAttribute("name",this.colorProductId);
-                            table.appendChild(li);
-                        });
-                        $(".ul_radio li").each(function() {
-                            $(this).on("tap", function() {
-                                $(this).addClass("active");
-                                $(this).siblings().removeClass("active");
-                            });
-                        });
-                        document.querySelector('.loading-bg').style.display='none';
-                    }else{
-                        mui.alert(dt.resultMsg);
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        });
-    });
-    mui('body').on('tap', '#btn_submit', function() {
-        change_input();
-        var th=this;
-        if(check){
-            if(isPay) {
-                isPay = false; // 锁定请求按钮
-                mui(this).button('loading');
-                var param = {
-                    "agentMachineColorId":$(".ul_radio .active").attr("id"),
-                    "agentMachineProductId": $(".ul_radio .active").attr("name"),
-                    "agentMachineAddressInfo": address,
-                    "agentMachineAddressName": nickname,
-                    "agentMachineAddressTel":ads_tel,
-                    "agentNickname":encodeURI($("#ipt-name").val().trim()),
-                    "agentTel":$("#ipt-phone").val().trim(),
-                    "payPassword":$("#ipt-exchange").val().trim(),
-                };
-                $.ajax({
-                    type: 'post',
-                    url: '/watero/pay/pay_agent_renewal?dates=' + new Date().getTime(),
-                    data: param,
-                    dataType: 'json',
-                    timeout: 15000,
-                    success: function(dt) {
-                        //console.log(dt);
-                        if($("#ipt-exchange").val().trim()!=''){
-                            if(dt.status && dt.data.success) {
-                                mui.openWindow({url:base_path+ '/giftCard/card/agencyUI'});
-                            }else{
-                                mui(th).button('reset');
-                                isPay = true;
-                                mui.alert(dt.data.info);
-                            }
-                        }else{
-                            if(dt.status) {
-                                var obj = JSON.parse("{" + dt.data.info + "}");
-                                WeixinJSBridge.invoke('getBrandWCPayRequest', obj, function(res) {
-                                    if(res.err_msg == 'get_brand_wcpay_request:ok') {
-                                        $.ajax({
-                                            type: 'post',
-                                            url: base_path+'/agent_pay/check_agent_pay_success',
-                                            data: {"orderId":dt.data.orderId},
-                                            dataType: 'json',
-                                            timeout: 15000,
-                                            success: function(data) {
-                                                //console.log(data);
-                                                if(data.status) {
-                                                    if(data.data==2){
-                                                        mui.openWindow({url:base_path+ '/giftCard/card/agencyUI'});
-                                                    }else{
-                                                        mui.alert('如果已支付,请等待同步支付状态!', '', function() {
-                                                            mui(th).button('reset');
-                                                        });
-                                                    }
-                                                } else {
-                                                    mui(th).button('reset');
-                                                    mui.alert(data.message);
-                                                }
-                                            },
-                                            error: function(xhr, type, errorThrown) {
-                                                //异常处理;
-                                                console.log(xhr);
-                                                mui(th).button('reset');
-                                                isPay = true;
-                                                mui.alert("请检查网络或刷新页面重试!");
-                                            }
-                                        });
-                                    } else {
-                                        isPay = true;
-                                        mui(th).button('reset');
-                                        mui.alert("对不起,支付失败!请稍后重试!");
-                                    }
-                                });
-                            } else {
-                                mui(th).button('reset');
-                                isPay = true;
-                                mui.alert(dt.returnMsg);
-                            }
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        //异常处理;
-                        console.log(xhr);
-                        mui.alert("请检查网络或刷新页面重试!");
-                        mui(th).button('reset');
-                        isPay = true;
-                    }
-                });
-            }else{
-                mui.alert("正在请求支付中~~请稍后!");
-                return;
-            }
-        }else{
-            mui.alert(alert_msg);
-        }
-    });
-    mui('body').on('tap', '#xieyi-dalog', function() {
-        mui.openWindow({
-            url: '/watero/view/gift_card_agent_explain.html'
-        });
-    });
-    mui('body').on('tap', '#mui-navigate-right', function() {
-        if(this.parentNode.classList.contains('mui-active')){
-            this.lastChild.innerHTML='详情'
-        }else{
-            this.lastChild.innerHTML='收起'
-        }
-    });
-    $(document).on('tap', '#btn-tongyi', function() {
-        var btn_submit=$("#btn_submit");
-        if($(this).hasClass("mui-active")){
-            $(this).removeClass("mui-active");
-            check=true;
-            if(wechatAddr.status){
-                btn_submit.removeClass("mui-active").removeAttr("disabled");
-            }else{
-                btn_submit.addClass("mui-active").prop("disabled","disabled");
-            }
-        }else{
-            check=false;
-            $(this).addClass("mui-active");
-            btn_submit.addClass("mui-active").prop("disabled","disabled");
-        }
-    });
-    var address='',nickname='',ads_tel='';
-    // 获取微信共享地址
-    mui('body').on('tap', '#open-wechat-addres-a', function() {
-        editAddrV1(
-            function(res) {
-                // 用户成功拉出地址 
-                address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
-                nickname=res.userName;
-                ads_tel= res.telNumber;
-                wechatAddr.status = true;
-                wechatAddr.detailInfo = address;
-                wechatAddr.postalCode = res.postalCode;
-                wechatAddr.userName = res.userName;
-                wechatAddr.userTel = res.telNumber;
-                wechatAddr.nationalCode = res.nationalCode;
-                $("#open-wechat-addres-a").empty().append('<ul class="ft-12" style="color: #333;"><li>收  货  人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
-                if(check){
-                    $(this).removeClass("mui-active");
-                    $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
-                }
-            },
-            function() {
-                if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
-                    wechatAddr.status = true;
-                } else {
-                    wechatAddr.status = false;
-                    // 用户取消拉出地址
-                    $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
-                }
-            }
-        );
-
-    });
-    function change_input() {
-        if($("#btn-tongyi").hasClass("mui-active")){
-            alert_msg="请勾选同意《美国watero代理说明》";
-            check=false;
-            return false;
-        }else{
-            check=true;
-        }
-        if(dcode.test($("#ipt-exchange").val().trim()) || $("#ipt-exchange").val().trim()==''){
-            check=true;
-            $("#pay_price").text("¥0");
-        }else{
-            alert_msg="抵扣密码不正确,请重新填写";
-            check=false;
-            $("#pay_price").text("¥10000");
-            return false;
-        }
-        if(wechatAddr.status){
-            check=true;
-        }else{
-            alert_msg="请选择收货地址";
-            check=false;
-            return false;
-        }
-        $(".mui-input-group input").each(function(index) {
-            switch ($(this).attr("id")){
-                case "ipt-phone":
-                    if($(this).val().trim()==""){
-                        alert_msg="请填写手机号";
-                        check=false;
-                        return false;
-                    }else{
-                        if(mobile.test($(this).val().trim())) {
-                            check=true;
-                        }else{
-                            alert_msg="手机号码不正确,请重新填写";
-                            check=false;
-                            return false;
-                        }
-                    }
-                    break;
-                case "ipt-name":
-                    if($(this).val().trim()==""){
-                        alert_msg="请填写姓名";
-                        check=false;
-                        return false;
-                    }else{
-                        if(uname.test($(this).val().trim())) {
-                            check=true;
-                        }else{
-                            alert_msg="姓名格式不正确,请重新填写";
-                            check=false;
-                            return false;
-                        }
-                    }
-                    break;
-                default:
-                    break;
-            }
-        });
-        if(check) {
-            $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
-        }else{
-            $("#btn_submit").addClass("mui-active").prop("disabled","disabled");
-        }
-    }
-    mui.os.ios ? listener_ipt() : keyup_fn();
-
-    function keyup_fn() {
-        $(document).on('keyup', '#ipt-name', function(e) {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("my-active").prop("disabled","disabled");
-            }
-        });
-        $(document).on('keyup', '#ipt-phone', function(e) {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("my-active").prop("disabled","disabled");
-            }
-        });
-    }
-
-    function listener_ipt() {
-        document.getElementById('ipt-name').onblur = function() {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("my-active").prop("disabled","disabled");
-            }
-        }
-        document.getElementById('ipt-phone').onblur = function() {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("my-active").prop("disabled","disabled");
-            }
-        }
-    }
-</script>
-</body>
-</html>

+ 0 - 494
watero-wechat-web/src/main/webapp/view/gift_card_to_agent.html

@@ -1,494 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title></title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.head {height: 60px;}
-		#head {line-height: 60px;}
-		h3{margin-top:5px;margin-bottom: 0;}
-		.icon-fuxuankuang a{color: #24cae9;text-decoration:underline;font-size: 12px;}
-		.icon-daifahuo,.icon-lease2,.icon-jiage,.icon-lipin,.icon-lease1{font-size: 15px;padding-left: 22px;}
-		.icon-fuxuankuang{font-size: 14px;padding:5px 5px 5px 22px;}
-		.icon-fuxuankuang:before{font-size: 15px;margin-top: 5px;margin-right: 3px;color:#e4004d;}
-		.icon-daifahuo:before,.icon-lease2:before,.icon-jiage:before,.icon-lipin:before,.icon-lease1:before{font-size: 19px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
-		.try_price{color: #f1436c;}
-		.ul_radio{width: 100%;text-align: left;}
-		.ul_radio li{width:21%;height: 55px;margin: 0 1%;border: 1px solid rgba(0,0,0,.1);border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.ul_radio .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.radio1{background: url(//s.iamberry.com/watero/images/cp-1.jpg) center center /auto 85% no-repeat;}
-		.radio2{background: url(//s.iamberry.com/watero/images/cp-2.jpg) center center /auto 85% no-repeat;}
-		.radio3{background: url(//s.iamberry.com/watero/images/cp-3.jpg) center center /auto 85% no-repeat;}
-		.radio4{background: url(//s.iamberry.com/watero/images/cp-4.jpg) center center /auto 85% no-repeat;}
-		.head-img {position: absolute;bottom: 15px;right: 13px;width: 60px;height: 60px;border-radius: 30px;border: 3px solid #E5E5E5;}
-		.mui-table-view .mui-media .mui-media-body{height: 41px;line-height: 41px;color: #333;}
-		.mui-table-view .mui-media .mui-media-body>span{color: #f1436c;}
-		.my-table-view-try{border-top: .6em solid #f0f0f0;border-bottom: .6em solid #f0f0f0;padding-bottom: 10px;}
-		.my-table-view-try .mui-table-view-cell{padding:10px 13px 10px 30px !important;font-size: 12px;}
-		.mui-table-view-cell:after,.mui-table-view:before,.mui-table-view:after,.mui-input-group .mui-input-row:after,.mui-input-group:before,.mui-input-group:after{display: none;}
-		#open-wechat-addres-a{margin: -15px -15px -15px -28px !important;}
-		.mui-table-view-cell>a .mui-pull-right{color: #999;font-size: 14px;}
-		#btn_submit{color: #fff;font-size: 18px;background: #24cae9;margin-bottom: 0;border: 0;}
-		.mui-btn-block.mui-active,.btn-pull-code.mui-active{background-color: #c8c8c8 !important;}
-		.icon-fuxuankuang.mui-active:before{color: #c8c8c8;}
-		.mui-content-padded{margin: 10px 13px;}
-		.mui-input-group .mui-input-row {height: 50px;padding: 5px 0;border: 1px solid rgba(0,0,0,.1); margin:10px 0;}
-		.mui-input-row label{color: #666;width:27%;font-size: 15px;}
-		.mui-input-row label~input{width:73%;}
-		.mui-input-row label~input::-webkit-input-placeholder{font-size: 15px;}
-		.triangle-down {width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;}
-		.my-arrowright{position: absolute;right: 18px;top: 28px;color: #666;pointer-events:none;}
-		.mui-btn-red{background-color: #e9004c;}
-		.tips{padding-bottom: 85px;}
-
-		.gift-card-title{padding-top:60px;background:url(//s.iamberry.com/watero/images/shop/gift-card-tit-bg.jpg) top center /100% no-repeat #71d8ec;}
-		.gift-card-title .mui-table-view-cell.mui-active{background:transparent;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn){color: #fff;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn).mui-active{background:transparent;}
-		.gift-card-title .mui-navigate-right:after{color: #fff;font-size: 20px;right: 7px;}
-		.gift-card-title .mui-table-view-cell{color: #fff;}
-		.mui-table-view-cell.mui-collapse .mui-collapse-content{background: #71d8ec;}
-		.accordion{float: right;margin:2px 15px 0 0;font-size: 12px;color: #fff;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #1cc9f4;}
-		.my-div{padding: 5px 0;border-bottom: 1px solid rgba(0,0,0,.1);margin-bottom: 5px;}
-		.mui-h5, h5 {margin-left: 30px;font-size: 12px;}
-		.mui-h6, h6 {padding: 5px 0;}
-		.my-btn-exchange{background: #ddf2f8 !important;text-align: center;border: 0 !important;font-size: 14px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="tips">
-		<ul class="mui-table-view gift-card-title">
-			<li class="mui-table-view-cell mui-text-center">代理费用:10000元</li>
-			<li class="mui-table-view-cell mui-text-left mui-collapse">
-				<a class="mui-navigate-right" id="mui-navigate-right"><span class="iconfont icon-quanyizhanshi"></span> 尊享权益<span class="accordion">详情</span></a>
-				<div class="mui-collapse-content">
-					<ul class="ft-12">
-						<li>1.将获赠价值3680元的美国watero净水机一台。</li>
-						<li>2.将获得8张提货卡(每张可兑换一台美国watero净水机)</li>
-						<li>3.成功推荐其他人成为代理商,可获赠一台美国watero净水机</li>
-						<li>4.一年后,未使用的礼品卡每张可兑换成1250元现金。</li>
-					</ul>
-				</div>
-			</li>
-		</ul>
-		<div class="mui-content-padded">
-			<div>
-				<span class="iconfont icon-lease1">代理商信息</span>
-			</div>
-			<form class="mui-input-group">
-				<div class="mui-input-row">
-					<label>您的姓名</label>
-					<input type="text" maxlength="12" class="mui-input-clear" placeholder="请输入您的姓名" id="ipt-name">
-				</div>
-				<div class="mui-input-row">
-					<label>手机号码</label>
-					<input type="tel" maxlength="11" class="mui-input-clear" placeholder="请输入您的手机号" id="ipt-phone">
-				</div>
-			</form>
-			<div class="my-div">
-				<span class="iconfont icon-lipin">选择赠品</span>
-			</div>
-			<div class="mui-h6">
-				产品名称:美国watero净饮水一体机
-			</div>
-			<div class="mui-h6">
-				产品数量:1台
-			</div>
-			<form class="mui-input-group">
-				<div style="display: table;width: 100%;padding: 10px 0;">
-					<div style="display: table-cell;width: 20%;vertical-align: middle;font-size: 12px;font-weight: 400;color: #8f8f94;">选择颜色:</span></div><div style="display:table-cell;width:70%;text-align: right;">
-					<ul class="ul_radio">
-						<!-- <li class="radio1 active"></li>
-                        <li class="radio2"></li>
-                        <li class="radio3"></li>
-                        <li class="radio4"></li> -->
-					</ul>
-				</div>
-				</div>
-				<div class="my-div">
-					<span class="iconfont icon-daifahuo">提货卡</span>
-				</div>
-				<div class="mui-h6">
-					美国watero净饮水一体机提货卡<span class="mui-pull-right cl-red">X8张</span>
-				</div>
-			</form>
-			<!-- 				<div class="my-div">
-                                <span class="iconfont icon-lease2">收货信息</span>
-                            </div> -->
-			<ul class="mui-table-view" style="padding-top: 15px;">
-				<li class="mui-table-view-cell">
-					<a class="mui-navigate-right" id="open-wechat-addres-a">
-						<span class="iconfont icon-lease2">收货信息</span><span class="mui-h5">请选择收货地址</span>
-						<!-- <ul class="ft-12" style="color: #333;">
-							<li>收  货  人:林林</li>
-							<li>手 机 号:15999999999</li>
-							<li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>
-						</ul> -->
-					</a>
-				</li>
-			</ul>
-			<div style="padding:8px 0;margin-top:4px;border-top: 1px solid rgba(0,0,0,.1);">
-				<span class="iconfont icon-jiage">抵扣密码</span>
-			</div>
-			<div>
-				<input type="text" value="" placeholder="请输入抵扣密码" maxlength="12" class="mui-input-clear my-btn-exchange" id="ipt-exchange"/>
-				<br/>
-				<span class="mui-h5">说明:如你已经线下支付并已获得抵扣密码,输入即可!</span>
-			</div>
-			<ul class="mui-table-view">
-				<li style="padding:20px 10px 0px 10px;text-align: center;">
-					<span class="iconfont icon-fuxuankuang mui-active" id="btn-tongyi">我已经阅读并同意<a id="xieyi-dalog">《美国watero代理说明》</a></span>
-				</li>
-			</ul>
-		</div>
-
-		<div class="mui-text-center">
-			支付金额:<span class="cl-red" id="pay_price">¥10000</span>
-		</div>
-	</div>
-</div>
-<div class="buy-footer">
-	<button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="提交中" class="mui-btn mui-btn-block mui-btn-outlined mui-active" id="btn_submit" disabled="disabled">确认支付</button>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    //wechatAddr.status=true;
-    var check = false,alert_msg='';
-    var uname = /^[A-Za-z\-\u4e00-\u9fa5]{1,10}$/;//简体中文英文
-    var mobile=/^(13|14|15|18|17)[0-9]{9}$/; //11位手机号码
-    var dcode=/^[A-Z]{1}[0-9]{11}$/; //12位抵扣密码
-    var isPay = true; // 是否在请求支付,false表示正在请求,true可以请求
-    mui.ready(function(){
-        mui.ajax(base_path + '/giftCard/card/product/details?dates=' + new Date().getTime(), {
-            data: {},
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.returnCode=="200" && dt.resultCode=="200"){
-                        var table = document.body.querySelector('.ul_radio');
-                        mui(dt.returnMsg.colors).each(function(index) {
-                            var li = document.createElement('li');
-                            if(index==0){
-                                li.className ='radio'+this.colorId+' active';
-                            }else{
-                                li.className ='radio'+this.colorId;
-                            }
-                            li.setAttribute("id",this.colorId);
-                            li.setAttribute("name",this.colorProductId);
-                            table.appendChild(li);
-                        });
-                        $(".ul_radio li").each(function() {
-                            $(this).on("tap", function() {
-                                $(this).addClass("active");
-                                $(this).siblings().removeClass("active");
-                            });
-                        });
-                        document.querySelector('.loading-bg').style.display='none';
-                    }else{
-                        mui.alert(dt.resultMsg);
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        });
-    });
-    mui('body').on('tap', '#btn_submit', function() {
-        change_input();
-        var th=this;
-        if(check){
-            if(isPay) {
-                isPay = false; // 锁定请求按钮
-                mui(this).button('loading');
-                var param = {
-                    "agentMachineColorId":$(".ul_radio .active").attr("id"),
-                    "agentMachineProductId": $(".ul_radio .active").attr("name"),
-                    "agentMachineAddressInfo": address,
-                    "agentMachineAddressName": nickname,
-                    "agentMachineAddressTel":ads_tel,
-                    "userName":encodeURI($("#ipt-name").val().trim()),
-                    "userTel":$("#ipt-phone").val().trim(),
-                    "payPassword":$("#ipt-exchange").val().trim(),
-                };
-                $.ajax({
-                    type: 'post',
-                    url: '/watero/pay/pay_agent?dates=' + new Date().getTime(),
-                    data: param,
-                    dataType: 'json',
-                    timeout: 15000,
-                    success: function(dt) {
-                        //console.log(dt);
-                        if($("#ipt-exchange").val().trim()!=''){
-                            if(dt.status && dt.data.success) {
-                                mui.openWindow({url:base_path+ '/giftCard/card/agencyUI'});
-                            }else{
-                                mui(th).button('reset');
-                                mui.alert(dt.data.info,'',function(){
-                                    if(dt.data.info=='您已经是代理商,无须再次申请!'){
-                                        mui.openWindow({url:base_path+ '/giftCard/card/agencyUI'});
-                                    }
-                                });
-                                isPay = true;
-                            }
-                        }else{
-                            if(dt.status) {
-                                var obj = JSON.parse("{" + dt.data.info + "}");
-                                WeixinJSBridge.invoke('getBrandWCPayRequest', obj, function(res) {
-                                    if(res.err_msg == 'get_brand_wcpay_request:ok') {
-                                        $.ajax({
-                                            type: 'post',
-                                            url: base_path+'/agent_pay/check_agent_pay_success',
-                                            data: {"orderId":dt.data.orderId},
-                                            dataType: 'json',
-                                            timeout: 15000,
-                                            success: function(data) {
-                                                //console.log(data);
-                                                if(data.status) {
-                                                    if(data.data==2){
-                                                        mui.openWindow({url:base_path+ '/giftCard/card/agencyUI'});
-                                                    }else{
-                                                        mui.alert('如果已支付,请等待同步支付状态!', '', function() {
-                                                            mui(th).button('reset');
-                                                        });
-                                                    }
-                                                } else {
-                                                    mui(th).button('reset');
-                                                    mui.alert(data.message);
-                                                }
-                                            },
-                                            error: function(xhr, type, errorThrown) {
-                                                //异常处理;
-                                                console.log(xhr);
-                                                mui(th).button('reset');
-                                                isPay = true;
-                                                mui.alert("请检查网络或刷新页面重试!");
-                                            }
-                                        });
-                                    } else {
-                                        isPay = true;
-                                        mui(th).button('reset');
-                                        mui.alert("对不起,支付失败!请稍后重试!");
-                                    }
-                                });
-                            } else {
-                                mui(th).button('reset');
-                                isPay = true;
-                                mui.alert(dt.returnMsg);
-                            }
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        //异常处理;
-                        console.log(xhr);
-                        isPay = true;
-                        mui.alert("请检查网络或刷新页面重试!");
-                        mui(th).button('reset');
-                    }
-                });
-            }else{
-                mui.alert("正在请求支付中~~请稍后!");
-                return;
-            }
-        }else{
-            mui.alert(alert_msg);
-        }
-    });
-    mui('body').on('tap', '#xieyi-dalog', function() {
-        mui.openWindow({
-            url: '/watero/view/gift_card_agent_explain.html'
-        });
-    });
-    mui('body').on('tap', '#mui-navigate-right', function() {
-        if(this.parentNode.classList.contains('mui-active')){
-            this.lastChild.innerHTML='详情'
-        }else{
-            this.lastChild.innerHTML='收起'
-        }
-    });
-    $(document).on('tap', '#btn-tongyi', function() {
-        var btn_submit=$("#btn_submit");
-        if($(this).hasClass("mui-active")){
-            $(this).removeClass("mui-active");
-            check=true;
-            if(wechatAddr.status){
-                btn_submit.removeClass("mui-active").removeAttr("disabled");
-            }else{
-                btn_submit.addClass("mui-active").prop("disabled","disabled");
-            }
-        }else{
-            check=false;
-            $(this).addClass("mui-active");
-            btn_submit.addClass("mui-active").prop("disabled","disabled");
-        }
-    });
-    var address='',nickname='',ads_tel='';
-    // 获取微信共享地址
-    mui('body').on('tap', '#open-wechat-addres-a', function() {
-        editAddrV1(
-            function(res) {
-                // 用户成功拉出地址 
-                address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
-                nickname=res.userName;
-                ads_tel= res.telNumber;
-                wechatAddr.status = true;
-                wechatAddr.detailInfo = address;
-                wechatAddr.postalCode = res.postalCode;
-                wechatAddr.userName = res.userName;
-                wechatAddr.userTel = res.telNumber;
-                wechatAddr.nationalCode = res.nationalCode;
-                $("#open-wechat-addres-a").empty().append('<ul class="ft-12" style="color: #333;"><li>收  货  人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
-                if(check){
-                    $(this).removeClass("mui-active");
-                    $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
-                }
-            },
-            function() {
-                if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
-                    wechatAddr.status = true;
-                } else {
-                    wechatAddr.status = false;
-                    // 用户取消拉出地址
-                    $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
-                }
-            }
-        );
-
-    });
-    function change_input() {
-        if($("#btn-tongyi").hasClass("mui-active")){
-            alert_msg="请勾选同意《美国watero代理说明》";
-            check=false;
-            return false;
-        }else{
-            check=true;
-        }
-        if(dcode.test($("#ipt-exchange").val().trim()) || $("#ipt-exchange").val().trim()==''){
-            check=true;
-            $("#pay_price").text("¥0");
-        }else{
-            alert_msg="抵扣密码不正确,请重新填写";
-            check=false;
-            $("#pay_price").text("¥10000");
-            return false;
-        }
-        if(wechatAddr.status){
-            check=true;
-        }else{
-            alert_msg="请选择收货地址";
-            check=false;
-            return false;
-        }
-        $(".mui-input-group input").each(function(index) {
-            switch ($(this).attr("id")){
-                case "ipt-phone":
-                    if($(this).val().trim()==""){
-                        alert_msg="请填写手机号";
-                        check=false;
-                        return false;
-                    }else{
-                        if(mobile.test($(this).val().trim())) {
-                            check=true;
-                        }else{
-                            alert_msg="手机号码不正确,请重新填写";
-                            check=false;
-                            return false;
-                        }
-                    }
-                    break;
-                case "ipt-name":
-                    if($(this).val().trim()==""){
-                        alert_msg="请填写姓名";
-                        check=false;
-                        return false;
-                    }else{
-                        if(uname.test($(this).val().trim())) {
-                            check=true;
-                        }else{
-                            alert_msg="姓名格式不正确,请重新填写";
-                            check=false;
-                            return false;
-                        }
-                    }
-                    break;
-                default:
-                    break;
-            }
-        });
-        if(check) {
-            $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
-        }else{
-            $("#btn_submit").addClass("mui-active").prop("disabled","disabled");
-        }
-    }
-    mui.os.ios ? listener_ipt() : keyup_fn();
-
-    function keyup_fn() {
-        $(document).on('keyup', '#ipt-name', function(e) {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("my-active").prop("disabled","disabled");
-            }
-        });
-        $(document).on('keyup', '#ipt-phone', function(e) {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("my-active").prop("disabled","disabled");
-            }
-        });
-    }
-
-    function listener_ipt() {
-        document.getElementById('ipt-name').onblur = function() {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("my-active").prop("disabled","disabled");
-            }
-        }
-        document.getElementById('ipt-phone').onblur = function() {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("my-active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("my-active").prop("disabled","disabled");
-            }
-        }
-    }
-</script>
-</body>
-</html>

+ 0 - 283
watero-wechat-web/src/main/webapp/view/gift_card_user_exchange.html

@@ -1,283 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>用户提货</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.head {height: 60px;}
-		#head {line-height: 60px;}
-		h3{margin-top:5px;margin-bottom: 0;}
-		.icon-fuxuankuang a{color: #24cae9;text-decoration:underline;}
-		.icon-daifahuo,.icon-lease2,.icon-jiage,.icon-lipin{font-size: 15px;padding-left: 25px;}
-		.icon-fuxuankuang{font-size: 12px;padding:5px 5px 5px 22px;}
-		.icon-fuxuankuang:before{font-size: 14px;margin-top: 5px;margin-right: 3px;}
-		.icon-daifahuo:before,.icon-lease2:before,.icon-jiage:before,.icon-lipin:before{font-size: 19px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
-		.try_price{color: #f1436c;}
-		.ul_radio{width: 100%;text-align: left;}
-		.ul_radio li{width:21%;height: 55px;margin: 0 1%;border: 1px solid rgba(0,0,0,.1);border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.ul_radio .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.radio1{background: url(//s.iamberry.com/watero/images/cp-1.jpg) center center /auto 85% no-repeat;}
-		.radio2{background: url(//s.iamberry.com/watero/images/cp-2.jpg) center center /auto 85% no-repeat;}
-		.radio3{background: url(//s.iamberry.com/watero/images/cp-3.jpg) center center /auto 85% no-repeat;}
-		.radio4{background: url(//s.iamberry.com/watero/images/cp-4.jpg) center center /auto 85% no-repeat;}
-		.head-img {position: absolute;bottom: 15px;right: 13px;width: 60px;height: 60px;border-radius: 30px;border: 3px solid #E5E5E5;}
-		.mui-table-view .mui-media .mui-media-body{height: 41px;line-height: 41px;color: #333;}
-		.mui-table-view .mui-media .mui-media-body>span{color: #f1436c;}
-		.my-table-view-try{border-top: .6em solid #f0f0f0;border-bottom: .6em solid #f0f0f0;padding-bottom: 10px;}
-		.my-table-view-try .mui-table-view-cell{padding:10px 13px 10px 30px !important;font-size: 12px;}
-		.mui-table-view-cell:after,.mui-table-view:before,.mui-table-view:after,.mui-input-group .mui-input-row:after,.mui-input-group:before,.mui-input-group:after{display: none;}
-		.mui-table-view-cell>a:not(.mui-btn){margin: -15px -25px;}
-		.mui-table-view-cell>a .mui-pull-right{color: #999;font-size: 14px;}
-		#btn_submit{color: #fff;font-size: 18px;background: #24cae9;margin-bottom: 0;border: 0;}
-		.mui-btn-block.mui-active,.btn-pull-code.mui-active{background-color: #c8c8c8 !important;}
-		.icon-fuxuankuang.mui-active:before{color: #c8c8c8;}
-		.mui-content-padded{margin: 10px 13px;}
-		.mui-input-group .mui-input-row {height: 50px;padding: 5px 0;border: 1px solid rgba(0,0,0,.1);margin:10px 0;}
-		.mui-input-row label{color: #666;width:27%;font-size: 15px;}
-		.mui-input-row label~input{width:73%;}
-		.mui-input-row label~input::-webkit-input-placeholder{font-size: 15px;}
-		.triangle-down {width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;}
-		.my-arrowright{position: absolute;right: 18px;top: 28px;color: #666;pointer-events:none;}
-		.mui-btn-red{background-color: #e9004c;}
-		.tips{padding-bottom: 65px;}
-
-		.gift-card-title{padding-top:60px;background:url(//s.iamberry.com/watero/images/gift-card-tit-bg.jpg) top center /100% no-repeat #71d8ec;}
-		.gift-card-title .mui-table-view-cell.mui-active{background:transparent;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn){color: #fff;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn).mui-active{background:transparent;}
-		.gift-card-title .mui-navigate-right:after{color: #fff;font-size: 20px;right: 7px;}
-		.gift-card-title .mui-table-view-cell{color: #fff;}
-		.mui-table-view-cell.mui-collapse .mui-collapse-content{background: #71d8ec;}
-		.accordion{float: right;margin:2px 15px 0 0;font-size: 12px;color: #fff;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #1cc9f4;}
-		.my-div{padding:10px 0;border-bottom: 1px solid rgba(0,0,0,.1);margin-bottom:10px;}
-		.my-div.noline{padding: 5px 0;border-bottom:0;margin-bottom: 5px;}
-		.my-btn-exchange{background: #ddf2f8 !important;text-align: center;border: 0 !important;margin-bottom:0 !important;}
-		.btn-pull-code{position: absolute;right: 10px;top:7px;height:34px;padding:0 6px;border-radius: 5px; line-height: 34px;font-size: 12px; color: #fff; background: #24cae9;}
-		.btn-pull-code .active{background: #c8c8c8;}
-		.mui-btn-block.mui-active,.btn-pull-code.mui-active{background-color: #e3ecee !important;}
-		.mui-h5, h5 {margin-left: 30px;}
-		.mui-h6{font-size:14px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="tips">
-		<div class="mui-content-padded">
-			<div class="my-div">
-				<span class="iconfont icon-lipin">提货信息</span>
-			</div>
-			<div class="mui-h6">
-				提货产品:美国watero净饮水一体机
-			</div>
-			<form class="mui-input-group">
-				<div style="display: table;width: 100%;padding: 10px 0;">
-					<div style="display: table-cell;width: 20%;vertical-align: middle;color: #8f8f94;">选择颜色:</span></div><div style="display:table-cell;width:70%;text-align: right;">
-					<ul class="ul_radio">
-						<!-- <li class="radio1 active"></li>
-                        <li class="radio2"></li>
-                        <li class="radio3"></li>
-                        <li class="radio4"></li> -->
-					</ul>
-				</div>
-				</div>
-			</form>
-			<ul class="mui-table-view" style="border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);margin:10px 0;">
-				<li class="mui-table-view-cell" style="padding: 15px 15px;">
-					<a class="mui-navigate-right" id="go-gift-details" href="//w.iamberry.com/watero/wechat/product/desc?productId=34&colorId=2">
-						查看产品详情
-					</a>
-				</li>
-			</ul>
-			<div class="my-div">
-				<span class="iconfont icon-lease2">收货信息</span>
-			</div>
-			<ul class="mui-table-view">
-				<li class="mui-table-view-cell">
-					<a class="mui-navigate-right" id="open-wechat-addres-a">
-						收货地址<span class="mui-h5">请选择收货地址</span>
-						<!-- <ul class="ft-12" style="color: #333;">
-							<li>收  货  人:林林</li>
-							<li>手 机 号:15999999999</li>
-							<li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>
-						</ul> -->
-					</a>
-				</li>
-			</ul>
-			<!-- <div style="padding:8px 0;margin-top:4px;border-top: 1px solid rgba(0,0,0,.1);">
-                <span class="iconfont icon-daifahuo">礼品卡兑换码</span>
-            </div>
-            <div>
-                <input type="text" value="" placeholder="请输入兑换密码" class="my-btn-exchange" id="ipt-exchange"/>
-            </div> -->
-			<!-- 				<form class="mui-input-group">
-                                <div class="mui-input-row">
-                                    <label>手机号</label>
-                                    <input type="tel" maxlength="11" class="mui-input-clear" placeholder="请输入手机号" id="ipt-phone">
-                                </div>
-                                <div class="mui-input-row">
-                                    <label>验证码</label>
-                                    <input type="text" maxlength="4" placeholder="请输入验证码" id="ipt-code">
-                                    <span class="btn-pull-code" id="pull-code">获取验证码</span>
-                                </div>
-                            </form> -->
-			<!-- 				<div class="mui-h6">
-                                说明:成功兑换后,可再次扫描提货卡上二维码查看兑换记录!
-                            </div> -->
-		</div>
-	</div>
-</div>
-<div class="buy-footer">
-	<button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="提交中" class="mui-btn mui-btn-block mui-btn-outlined mui-active" id="btn_submit" disabled="disabled">确认提货</button>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js?v=201706001"></script>
-<script type="text/javascript">
-    var check = false,alert_msg='';
-    var mobile=/^(13|14|15|18)[0-9]{9}$/; //11位手机号码
-    var code = /^[0-9]{4}$/; //4位数字
-    var en_num=/^[A-Za-z0-9]{7}$/;//简体中文英文数字
-    mui.ready(function(){
-        mui.ajax(base_path + '/giftCard/card/product/details?dates=' + new Date().getTime(), {
-            data: {},
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.returnCode=="200" && dt.resultCode=="200"){
-                        var table = document.body.querySelector('.ul_radio');
-                        mui(dt.returnMsg.colors).each(function(index) {
-                            var li = document.createElement('li');
-                            if(index==0){
-                                li.className ='radio'+this.colorId+' active';
-                            }else{
-                                li.className ='radio'+this.colorId;
-                            }
-                            li.setAttribute("id",this.colorId);
-                            table.appendChild(li);
-                        });
-                        //遍历产品颜色单选
-                        $(".ul_radio li").each(function() {
-                            $(this).on("tap", function() {
-                                $(this).addClass("active");
-                                $(this).siblings().removeClass("active");
-                            });
-                        });
-
-                    }else{
-                        mui.alert(dt.resultMsg);
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        });
-        document.querySelector('.loading-bg').style.display='none';
-    });
-    var address='',nickname='',ads_tel='',ads_pos='';
-    // 获取微信共享地址
-    mui('body').on('tap', '#open-wechat-addres-a', function() {
-        editAddrV1(
-            function(res) {
-                // 用户成功拉出地址 
-                address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
-                nickname=res.userName;
-                ads_tel= res.telNumber;
-                ads_pos =  res.postalCode;
-                wechatAddr.status = true;
-                wechatAddr.detailInfo = address;
-                wechatAddr.postalCode = res.postalCode;
-                wechatAddr.userName = res.userName;
-                wechatAddr.userTel = res.telNumber;
-                wechatAddr.nationalCode = res.nationalCode;
-                $("#open-wechat-addres-a").empty().append('<ul class="ft-12" style="color: #333;"><li>收  货  人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
-                $("#btn_submit").removeClass("mui-active").removeAttr('disabled');
-            },
-            function() {
-                if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
-                    wechatAddr.status = true;
-                } else {
-                    wechatAddr.status = false;
-                    // 用户取消拉出地址
-                    $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
-                    mui.alert("您取消了选择收货地址!");
-                }
-            }
-        );
-
-    });
-    mui('body').on('tap', '#btn_submit', function() {
-        var th=this;
-        if(wechatAddr.status){
-            //开始提交,改变按钮样式并锁定
-            mui(this).button('loading');
-            var param = {
-                "cardPwd": getParam('cardPwd'),
-                "userMachineColorId":$(".ul_radio .active").attr("id") ,
-                "userMachineAddressInfo": address,
-                "userMachineAddressName": nickname,
-                "userMachineAddressTel":ads_tel,
-                "userMachineAddressPostalcode": ads_pos
-            };
-            $.ajax({
-                type: 'post',
-                url: base_path+'/giftCard/card/exchange?dates=' + new Date().getTime(),
-                data: param,
-                dataType: 'json',
-                timeout: 15000,
-                success: function(dt) {
-                    //console.log(dt);
-                    if(dt.resultCode=="200" && dt.returnCode=="200") {
-                        //成功后跳转页面
-                        mui.openWindow({url: '/watero/view/gift_card_exchange_details.html?psw='+getParam('cardPwd')})
-                    } else {
-                        //失败后还原按钮,并弹出警告
-                        mui.alert(dt.returnMsg.returnMsg);
-                        mui(th).button('reset');
-                    }
-                },
-                error: function(xhr, type, errorThrown) {
-                    //异常处理;还原提交按钮,并弹出警告
-                    console.log(xhr);
-                    mui.alert("请检查网络或刷新页面重试!");
-                    mui(th).button('reset');
-                }
-            });
-        }else{
-            //文本框值校验未通过,并弹出警告
-            mui.alert('请选择地址');
-        }
-    });
-    mui('body').on('tap', '#go-gift-details', function() {
-        var th=this;
-        mui.openWindow({url: th.getAttribute("href")})
-    });
-</script>
-</body>
-</html>

+ 0 - 421
watero-wechat-web/src/main/webapp/view/i_want_lease_pay.html

@@ -1,421 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="utf-8">
-	<title>租用结算</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.cart_fixed{position: fixed;right: 30px;bottom:135px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .5;}
-		.cart_fixed .mui-badge{position: absolute;right:-7px;top:-5px;font-size: 12px;}
-		.return{position: fixed;right: 30px;bottom: 80px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #1cc9f4;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px;}
-		.lease-ul{font-size: 14px;color: #999;}
-		.lease-ul li{padding: 5px 0;}
-		.lease-left{display: inline-block;width: 25%;}
-		.ul_radio{width: 73%;display: inline-block;}
-		.ul_radio li{width:100%;height: 55px;margin: 0 1%;border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.radio-cell .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.lease-r-center{position: absolute;left: 70px;top: 20px;}
-		.lease-color{padding: 10px 0;float: left;}
-		.lease-select-box{padding: 12px 0;position: relative;}
-		.lease-select{position: absolute;left: 0;top: 10px;}
-		.mui-input-row{font-size: 13px;}
-		.mui-input-row input{font-size: 13px;}
-		.mui-input-group:before{display: none;}
-		.btn-pull-code{position: absolute;right: 10px;top:3px;height:34px;padding:0 6px;border-radius: 5px; line-height: 34px;font-size: 12px; color: #fff; background: #24cae9;}
-		.btn-pull-code .active{background: #c8c8c8;}
-		.icon-fuxuankuang a {color: #24cae9;}
-		.icon-fuxuankuang{font-size: 13px;padding:5px 5px 5px 22px;}
-		.icon-fuxuankuang:before{font-size: 18px;color:#e4004d;position: absolute;left: 0;width: 20px;height: 18px;top:1px;}
-		.icon-fuxuankuang.mui-active:before {color: #c8c8c8;}
-		#xieyi-dalog{text-decoration:underline}
-		.ul_noline{padding-bottom: 60px;}
-		.ul_noline:before{display: none;}
-		.ul_noline li:after{display: none;}
-		.address_ul{color: #999;font-size: 12px;}
-		.address_ul li{white-space:nowrap;overflow: hidden;text-overflow: ellipsis;}
-		.my-select {border:0!important;color: #999;background-color: #f5f5f5;margin-bottom: 0;padding: 3px 14px;text-align: center;-webkit-appearance: none;height:36px;}
-		.my-view1:after,.my-view1 li:after{display: none;}
-		.color{position:absolute; left:100px;top:25px;-webkit-transform: translateY(-50%);}
-		.after{position: relative;}
-		.after:before{content:'';width: 0;
-			height: 0;
-			border-left: 4px solid transparent;
-			border-right: 4px solid transparent;
-			border-top: 8px solid #666;position: absolute;
-			right: 15px;
-			top: 15px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body>
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<div style="padding: 0 10px;background: #fff;">
-		<ul class="mui-table-view">
-			<li class="mui-table-view-cell" style="padding: 11px 0;">
-				<span class="iconfont icon-lease cl-blue"></span>&nbsp;租用产品信息
-			</li>
-		</ul>
-		<ul class="lease-ul">
-			<li>产品名称:<span id="productName"></span></li>
-			<li style="position: relative;"><span class="lease-color">产品颜色:</span><img src="//s.iamberry.com/watero/images/cp-1.jpg" width="30px" /> <span class="color" id="productColor"></span></li>
-			<li>租用时长:<span id="rentTime"></span><span class="mui-pull-right">年服务费:<span id="serviceMoney" class="cl-red"></span></span></li>
-			<li>设备押金:<span id="pledgeMoney" class="cl-red"></span><span class="mui-pull-right">费用合计:<span id="rentMoney" class="cl-red"></span></span></li>
-		</ul>
-		<ul class="mui-table-view my-view1">
-			<li class="mui-table-view-cell" style="padding: 11px 0;">
-				<span class="mui-h6">使用抵扣券</span>
-			</li>
-			<li class="after">
-				<select class="my-select" id="couponSelect">
-
-				</select>
-			</li>
-			<li style="padding: 10px 0;display:none;" class="for_money">
-				<div><span class="mui-h6">抵扣金额:</span><span id="couponMoney" class="cl-red mui-pull-right">¥0</span></div>
-			</li>
-		</ul>
-
-		<ul class="mui-table-view ul_noline">
-			<li class="mui-table-view-cell" style="padding: 11px 0 5px 0;border-bottom: 1px solid rgba(0,0,0,.1);">
-				<span class="iconfont icon-lease2 cl-blue"></span>&nbsp;收货信息
-			</li>
-			<li class="mui-table-view-cell"  style="padding: 11px 10px;">
-				<a class="mui-navigate-right" id="open-wechat-addres-a">
-					<span class="mui-h6">选择收货地址</span>
-					<!-- <ul class="address_ul">
-                        <li>收  货  人:林林</li>
-                        <li>手 机 号:15999999999</li>
-                        <li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>
-                    </ul>  -->
-				</a>
-			</li>
-			<li>
-				<span class="mui-h6">说明:因滤芯为一次性耗材,不可回收,故充值金额概不退返</span>
-			</li>
-			<li class="mui-text-center" style="padding: 10px;">
-				<span class="iconfont icon-fuxuankuang mui-active" id="btn-tongyi">我已阅,并同意<a id="xieyi-dalog">《美国watero租用协议》</a></span>
-			</li>
-			<li class="mui-text-center" style="padding:10px 15px 15px 15px;">
-				支付金额:<span class="cl-red" id="rentPayMoney"></span>
-			</li>
-		</ul>
-	</div>
-	<div class="buy-footer">
-		<button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="支付中" class="mui-btn my-btn-hand" id="btn_submit">立即支付</button>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/layer.js"></script>
-<script>
-    var pledgeMoney=getParam('pledgeMoney');
-    var serviceMoney=getParam('serviceMoney');
-    var radio1=getParam('radio1');
-    var rentProduct=getParam('rentProduct');
-    var giftId=getParam('giftId');
-    var productName = decodeURI(escape(getParam('productName')));
-    var rentMoney = getParam('rentMoney');
-    var productColor = decodeURI(escape(getParam('productColor')));
-    var isPay = true; // 是否在请求支付,false表示正在请求,true可以请求
-
-    mui.ready(function() {
-        document.querySelector('.loading-bg').style.display = 'none';
-        $('#productName').html(productName);
-        $('#productColor').html(productColor + ' x1');
-        $('#btn_submit').addClass("mui-active").prop("disabled","disabled");
-        $('#rentPayMoney').html('¥ ' + accDiv(rentMoney, 100));
-        switch (radio1) {
-            case '1':
-                $('#rentTime').html('1年');
-                $('#pledgeMoney').html('¥' + accDiv(pledgeMoney, 100));
-                $('#serviceMoney').html('¥' + accDiv(serviceMoney, 100));
-                $('#rentMoney').html('¥' + accDiv(rentMoney, 100));
-                break;
-            case '2':
-                $('#rentTime').html('2年');
-                $('#pledgeMoney').html('¥' + 0);
-                $('#serviceMoney').html('¥' + accDiv(rentMoney, 100));
-                $('#rentMoney').html('¥' + accDiv(rentMoney, 100));
-                break;
-            default:
-                $('#rentTime').html('3年');
-                $('#pledgeMoney').html('¥' + 0);
-                $('#serviceMoney').html('¥' + accDiv(rentMoney, 100));
-                $('#rentMoney').html('¥' + accDiv(rentMoney, 100));
-                break;
-        }
-
-        mui.ajax(base_path + '/rent_order/selectServiceCoupon?dates=' + new Date().getTime(), {
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                }else{
-                    if(dt.status) {
-                        var coupon_data = dt.data[0];
-                        //循环显示租用类型
-                        if (coupon_data != null) {
-                            mui(coupon_data).each(function(index) {
-                                if (index == 0) {
-                                    $("#couponSelect").append( '<option serviceid="" value="0" selected>不使用抵扣券</option><option serviceId="' + this.serviceId + '"  value="' + this.serviceMoney + '">' + this.serviceName + '</option>');
-                                } else {
-                                    $("#couponSelect").append( '<option serviceId="' + this.serviceId + '" value="' + this.serviceMoney + '">' + this.serviceName + '</option>');
-                                }
-                            });
-							/* console.log($('#couponSelect option:first').val())
-							 $('#couponMoney').html('-¥' + accDiv($('#couponSelect option:first').val(),100)); */
-                        }else{
-                            $("#couponSelect").append( '<option serviceid="" value="" selected="selected">没有可用的抵扣券</option>');
-                        }
-                    } else {
-                        //mui('#pullrefresh_chanpin_list').pullRefresh().endPullupToRefresh(true);
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        })
-    });
-
-    //支付方法
-    mui('body').on('tap', '#btn_submit', function() {
-        var th=this;
-        var check = true;
-        if(!wechatAddr.status){
-            mui.alert("请选择收货地址");
-            check = false;
-        }
-        if (radio1 == null) {
-            mui.alert("请选择租用类型");
-            check = false;
-        }
-        if (rentProduct == null) {
-            mui.alert("请选择租用商品信息");
-            check = false;
-        }
-        if (giftId == null) {
-            mui.alert("请选择租用赠品信息");
-            check = false;
-        }
-        if(check){
-            if(isPay) {
-                isPay = false; // 锁定请求按钮
-                layer.open({
-                    type: 2,
-                    shadeClose: false,
-                    content: "正在请求加载订单信息..."
-                }); // 调用加载弹出层
-                mui(this).button('loading');
-
-                var param = {
-                    "rentAddressInfo": address,
-                    "rentAddressName": nickname,
-                    "rentAddressTel": ads_tel,
-                    "rentTypeId": radio1,
-                    "rentServiceId":$("#couponSelect").find("option:selected").attr("serviceId"),
-                    "productId":rentProduct,
-                    "giftId":giftId
-                }
-                $.ajax({
-                    type: 'post',
-                    url: '/watero/wechat/rent_order/rentOrderPay?dates=' + new Date().getTime(),
-                    data: param,
-                    dataType: 'json',
-                    timeout: 15000,
-                    success: function(dt) {
-                        //console.log(dt);
-                        layer.closeAll();
-                        if(dt.isRedirect) {
-                            location.href = dt.redirectURL;
-                        }else{
-                            if(dt.resultCode== '200') {
-                                var obj = JSON.parse("{" + dt.data.info + "}");
-                                WeixinJSBridge.invoke('getBrandWCPayRequest', obj, function(res) {
-                                    if(res.err_msg == 'get_brand_wcpay_request:ok') {
-                                        layer.open({
-                                            type: 2,
-                                            shadeClose: false,
-                                            content: "正在请求加载订单信息..."
-                                        }); // 调用加载弹出层
-                                        $.ajax({
-                                            type: 'post',
-                                            url: base_path +'/rent_order/check_rent_order_status',
-                                            data: {"orderId":dt.data.orderId},
-                                            dataType: 'json',
-                                            timeout: 15000,
-                                            success: function(data) {
-                                                //console.log(data);
-                                                if(data.status) {
-                                                    if(data.data.rentStatus == 2){
-                                                        isPay = true;
-                                                        mui.openWindow({url:'/watero/view/lease_order_win.html'});
-                                                    }else{
-                                                        mui.alert('如果已支付,请等待同步支付状态!', '', function() {
-                                                            isPay = true;
-                                                        });
-                                                    }
-                                                } else {
-                                                    isPay = true;
-                                                    mui.alert(data.message);
-                                                }
-                                            },
-                                            error: function(xhr, type, errorThrown) {
-                                                //异常处理;
-                                                console.log(xhr);
-                                                isPay = true;
-                                                mui.alert("请检查网络或刷新页面重试!");
-                                            }
-                                        });
-                                    } else {
-                                        isPay = true;
-                                        mui(th).button('reset');
-                                        mui.alert("对不起,支付失败!请稍后重试!");
-                                    }
-                                });
-                            } else {
-                                mui(th).button('reset');
-                                isPay = true;
-                                mui.alert(dt.message);
-                            }
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        //异常处理;
-                        console.log(xhr);
-                        isPay = true;
-                        layer.closeAll();
-                        mui.alert("请检查网络或刷新页面重试!");
-                        mui(th).button('reset');
-                    }
-                });
-            }else{
-                mui.alert("正在请求支付中~~请稍后!");
-                return;
-            }
-        }
-    });
-
-    var address='',nickname='',ads_tel='';
-    // 获取微信共享地址
-    mui('body').on('tap', '#open-wechat-addres-a', function() {
-        editAddrV1(
-            function(res) {
-                // 用户成功拉出地址 
-                address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
-                nickname=res.userName;
-                ads_tel= res.telNumber;
-                wechatAddr.status = true;
-                wechatAddr.detailInfo = address;
-                wechatAddr.postalCode = res.postalCode;
-                wechatAddr.userName = res.userName;
-                wechatAddr.userTel = res.telNumber;
-                wechatAddr.nationalCode = res.nationalCode;
-                $("#open-wechat-addres-a").empty().append('<ul class="ft-12" style="color: #333;"><li>收  货  人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
-                var btn_submit=$("#btn_submit");
-                if ($('#btn-tongyi').hasClass("mui-active")) {
-                    btn_submit.addClass("mui-active").prop("disabled","disabled");
-                    btn_submit.removeClass("active");
-                } else {
-                    btn_submit.removeClass("mui-active").removeAttr("disabled");
-                    btn_submit.addClass("active");
-                }
-            },
-            function() {
-                if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
-                    wechatAddr.status = true;
-                } else {
-                    wechatAddr.status = false;
-                    // 用户取消拉出地址
-                    $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
-                    mui.alert("您没有选择收货地址!");
-                }
-            }
-        );
-
-    });
-
-    $(".ul_radio li").each(function() {
-        $(this).on("click", function() {
-            $(this).addClass("active");
-            $(this).siblings().removeClass("active");
-        });
-    });
-
-    $('#couponSelect').change(function(){
-        var serMoney = $('#couponSelect').val();
-        var money = rentMoney - serMoney;
-        $('#couponMoney').html('-¥' + accDiv(serMoney,100));
-        if(serMoney!=0){
-            $(".for_money").show();
-        }else{
-            $(".for_money").hide();
-        }
-        $('#rentPayMoney').html('¥' + accDiv(money,100));
-    });
-
-    $(document).on('tap', '#btn-tongyi', function() {
-        var btn_submit=$("#btn_submit");
-        if($(this).hasClass("mui-active")){
-            $(this).removeClass("mui-active");
-            if(wechatAddr.status){
-                btn_submit.removeClass("mui-active").removeAttr("disabled");
-                btn_submit.addClass("active");
-            }else{
-                btn_submit.addClass("mui-active").prop("disabled","disabled");
-                btn_submit.removeClass("active");
-            }
-        }else{
-            $(this).addClass("mui-active");
-            btn_submit.addClass("mui-active").prop("disabled","disabled");
-            btn_submit.removeClass("active");
-        }
-    });
-	/*
-	 $(document).on('tap', '#btn-tongyi', function() {
-	 var btn_submit=$("#btn_submit");
-	 console.log($(this).hasClass("mui-active"));
-	 if($(this).hasClass("mui-active")){
-	 $(this).removeClass("mui-active");
-	 btn_submit.removeClass("mui-active");
-	 }else{
-	 $(this).addClass("mui-active");
-	 btn_submit.addClass("mui-active");
-	 }
-	 }); */
-    mui('body').on('tap', '#xieyi-dalog', function() {
-        mui.openWindow({
-            url: '/watero/view/rent/try_xieyi.html'
-        });
-    });
-</script>
-</body>
-
-</html>

+ 0 - 407
watero-wechat-web/src/main/webapp/view/i_want_lease_test.html

@@ -1,407 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="utf-8">
-	<title>我要租赁</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.mui-backdrop {
-			position: fixed;
-			z-index: 998;
-			top: 0;
-			right: 0;
-			bottom: 0;
-			left: 0;
-			background: url(//s.iamberry.com/watero/images/shop/share-lease.png) top center no-repeat rgba(0, 0, 0, .4);
-			background-size: 100%;
-		}
-		.cart_fixed{position: fixed;right: 30px;bottom:135px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .5;}
-		.cart_fixed .mui-badge{position: absolute;right:-7px;top:-5px;font-size: 12px;}
-		.return{position: fixed;
-			right: 30px;
-			bottom: 80px;
-			background: rgba(0,0,0,.2);
-			padding: 12px;
-			border-radius: 50%;
-			text-align: center;
-			opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #1cc9f4;color: #fff;border: 0;border-radius: 0;font-size: 20px;}
-		.my-btn-hand.active{background-color: #ccc;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px 10px 40px 10px;}
-		.lease-ul{font-size: 14px;color: #999;}
-		.lease-ul:after,.no-line:after,.no-line:before{display: none;}
-		.lease-left{display: inline-block;width: 20%;}
-		.ul_radio{width: 100%;}
-		.ul_radio li{width:21%;height: 55px;margin: 0 1%;border: 1px solid rgba(0,0,0,.1);border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.ul_radio .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.radio1{background: url(//s.iamberry.com/watero/images/cp-1.jpg) center center /auto 85% no-repeat;}
-		.radio2{background: url(//s.iamberry.com/watero/images/cp-2.jpg) center center /auto 85% no-repeat;}
-		.radio3{background: url(//s.iamberry.com/watero/images/cp-3.jpg) center center /auto 85% no-repeat;}
-		.radio4{background: url(//s.iamberry.com/watero/images/cp-4.jpg) center center /auto 85% no-repeat;}
-		.ul_radio .radio5,.ul_radio .radio6,.ul_radio .radio7,.ul_radio .radio8{border: 0;}
-		.radio5{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio5:before,.radio6:before,.radio7:before,.radio8:before{content: 'watero水杯';position: absolute;bottom: -20px;font-size: 12px;text-align: center;width: 100%;color: #999;}
-		.radio6{background: url(//s.iamberry.com/watero/images/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio7{background: url(//s.iamberry.com/watero/images/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio8{background: url(//s.iamberry.com/watero/images/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.lease-r-center{position: absolute;left: 70px;top: 20px;}
-		.lease-select-box{padding: 12px 0;position: relative;}
-		.lease-select{position: absolute;left: 0;top: 10px;}
-		.mui-checkbox input[type=checkbox]:checked:before, .mui-radio input[type=radio]:checked:before{color: #1cc9f4;}
-		.mui-checkbox.mui-left input[type=checkbox], .mui-radio.mui-left input[type=radio]{left: 0;}
-		.mui-checkbox.mui-left label, .mui-radio.mui-left label{padding-left: 35px;font-size: 12px;color: #999;}
-		.icon-lease2{font-size: 15px;padding-left: 22px;}
-		.icon-lease2:before{font-size: 19px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
-		#open-wechat-addres-a{margin: -15px -15px -15px -28px !important;}
-		.mui-table-view-cell>a .mui-pull-right{color: #999;font-size: 14px;}
-		.mui-h5, h5 {margin-left: 30px;font-size: 12px;}
-		.my-btn-exchange{background: #f5f5f5 !important;text-align: center;border: 0 !important;font-size: 14px;margin-bottom: 0 !important;}
-		.icon-fuxuankuang a{color: #24cae9;text-decoration:underline;font-size: 12px;}
-		.icon-fuxuankuang{font-size: 14px;padding:5px 5px 5px 22px;}
-		.icon-fuxuankuang:before{font-size: 15px;margin-top: 5px;margin-right: 3px;color:#e4004d;}
-		.icon-fuxuankuang.mui-active:before{color: #c8c8c8;}
-	</style>
-	<script>
-        // 屏蔽分享
-        //window.hiddenAllWechatMenu = true;
-        var url = '//'+document.domain+'/watero/view/i_want_lease_test.html';
-        window.repleFlag = true;
-        window.repleWxData = {
-            "appId": "",
-            "imgUrl": '//s.iamberry.com/watero/images/shop/share-lease.png',
-            "link": url,
-            "desc": "快来围观吧,美国watero一款可移动的净水机。",
-            "title": "净水机可以租啦!",
-            "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
-            "shareTimeSuccess": "分享成功",
-            "shareTimeCancel": "已取消分享",
-            "shareAppSuccess": "分享成功!",
-            "shareAppCancel": "已取消分享"
-        };
-        //getConfig();
-	</script>
-</head>
-
-<body>
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<div id="lease-slider" class="mui-slider">
-		<div class="mui-slider-group">
-			<div class="mui-slider-item">
-				<a>
-					<img src="//s.iamberry.com/watero/images/shop/banner-lease2.png">
-				</a>
-			</div>
-		</div>
-		<!-- <div class="mui-slider-indicator">
-            <div class="mui-indicator"></div>
-        </div> -->
-	</div>
-	<ul class="mui-table-view no-line">
-		<li class="mui-table-view-cell">
-			<span class="iconfont icon-lease3 cl-blue"></span>&nbsp;美国watero净饮水一体机
-		</li>
-	</ul>
-	<div class="mui-content-madded" style="padding-bottom: 80px;padding-top: 0;">
-		<div class="lease-select-box">
-			<div class="lease-left"><span class="lease-select">选择颜色:</span></div>
-			<div style="display:inline-block;width:73%;text-align: right;">
-				<ul class="ul_radio">
-					<li class="radio1 active" id="3"></li>
-					<li class="radio2" id="2"></li>
-					<li class="radio3" id="4"></li>
-					<li class="radio4" id="1"></li>
-				</ul>
-			</div>
-		</div>
-		<div style="padding:0 0 10px 0;"><span>选择租期:</span></div>
-		<form class="my-input-group">
-			<div class="mui-input-row mui-radio mui-left">
-				<label>租一年   <span class="cl-red">¥1599.00   (800元押金+799元服务费)</span></label>
-				<input name="radio1" type="radio" value="1" checked>
-			</div>
-			<div class="mui-input-row mui-radio mui-left">
-				<label>租两年(免押金) <span class="cl-red">¥1499.00(0元押金+1499元服务费)</span></label>
-				<input name="radio1" type="radio" value="2">
-			</div>
-		</form>
-		<ul class="mui-table-view" style="padding: 10px 0;margin: 10px 0 0 0;">
-			<li class="mui-table-view-cell">
-				<a class="mui-navigate-right" id="open-wechat-addres-a">
-					<span class="iconfont icon-lease2">收货信息</span><span class="mui-h5">请选择收货地址</span>
-					<!-- <ul class="ft-12" style="color: #333;">
-                        <li>收  货  人:林林</li>
-                        <li>手 机 号:15999999999</li>
-                        <li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>
-                    </ul> -->
-				</a>
-			</li>
-		</ul>
-		<div style="padding:10px 0;"><span>推荐人</span><span class="mui-h6">(核实后,将会为推荐人免去半年服务费)</span></div>
-		<div>
-			<input type="tel" value="" placeholder="请填写推荐人手机号码" maxlength="11" class="mui-input-clear my-btn-exchange" id="ipt-exchange"/>
-		</div>
-		<ul class="mui-table-view no-line">
-			<li style="padding:20px 10px 20px 10px;text-align: center;">
-				<span class="iconfont icon-fuxuankuang mui-active" id="btn-tongyi">我已经阅读并同意<a id="xieyi-dalog">《美国watero租赁协议》</a></span>
-			</li>
-		</ul>
-		<div class="mui-text-center">
-			<span id="pay_text">支付定金:</span><span class="cl-red" id="pay_price">¥99.00</span>
-		</div>
-	</div>
-
-	<div class="buy-footer">
-		<button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="提交中" class="mui-btn my-btn-hand active" id="btn_submit" disabled="disabled">立即支付</button>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script>
-    //wechatAddr.status=true;
-    var check = false,alert_msg='';
-    var uname = /^[A-Za-z\-\u4e00-\u9fa5]{1,10}$/;//简体中文英文
-    var mobile=/^(13|14|15|18|17)[0-9]{9}$/; //11位手机号码
-    var isPay = true; // 是否在请求支付,false表示正在请求,true可以请求
-    mui.ready(function() {
-        $(".ul_radio li").each(function() {
-            $(this).on("click", function() {
-                $(this).addClass("active");
-                $(this).siblings().removeClass("active");
-            });
-        });
-        $(".mui-radio input[name=radio1]").each(function() {
-            $(this).on("click", function() {
-                if(city=='深圳市' || wechatAddr.status==false){
-                    $("#pay_price").text('¥99.00');
-                    $("#pay_text").text('支付定金:');
-                }else{
-                    $("#pay_text").text('支付金额:');
-                    if($(this).val()=='1'){
-                        $("#pay_price").text('¥1599.00');
-                    }else{
-                        $("#pay_price").text('¥1499.00');
-                    }
-                }
-            });
-        });
-        mui.ajax(base_path + '/giftCard/card/product/details?dates=' + new Date().getTime(), {
-            data: {},
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        });
-
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-    mui('body').on('tap', '#btn_submit', function() {
-        change_input();
-        var th=this;
-        if(check){
-            if(isPay) {
-                isPay = false; // 锁定请求按钮
-                mui(this).button('loading');
-                var param = {
-                    "applyColor":$(".ul_radio .active").attr("id"),
-                    "applyTime": $("input[name=radio1]:checked").val(),
-                    "applyAddr": address,
-                    "applyName": nickname,
-                    "applyTel":ads_tel,
-                    "applyReTel":$("#ipt-exchange").val().trim(),
-                };
-                $.ajax({
-                    type: 'post',
-                    url: '/watero/wechat/leaseOrder/apply?dates=' + new Date().getTime(),
-                    data: param,
-                    dataType: 'json',
-                    timeout: 15000,
-                    success: function(dt) {
-                        //console.log(dt);
-                        if(dt.isRedirect) {
-                            location.href = dt.redirectURL;
-                        }else{
-                            if(dt.resultCode=='200' && dt.returnCode=='200') {
-                                var obj = JSON.parse("{" + dt.returnMsg.returnMsg + "}");
-                                WeixinJSBridge.invoke('getBrandWCPayRequest', obj, function(res) {
-                                    if(res.err_msg == 'get_brand_wcpay_request:ok') {
-                                        mui.openWindow({url:'/watero/view/lease_order_win.html'});
-                                    } else {
-                                        isPay = true;
-                                        mui(th).button('reset');
-                                        mui.alert("对不起,支付失败!请稍后重试!");
-                                    }
-                                });
-                            } else {
-                                mui(th).button('reset');
-                                isPay = true;
-                                mui.alert(dt.returnMsg);
-                            }
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        //异常处理;
-                        console.log(xhr);
-                        isPay = true;
-                        mui.alert("请检查网络或刷新页面重试!");
-                        mui(th).button('reset');
-                    }
-                });
-            }else{
-                mui.alert("正在请求支付中~~请稍后!");
-                return;
-            }
-        }else{
-            mui.alert(alert_msg);
-        }
-    });
-    mui('body').on('tap', '#xieyi-dalog', function() {
-        mui.openWindow({
-            url: '/watero/view/lease_test_xieyi.html'
-        });
-    });
-    $(document).on('tap', '#btn-tongyi', function() {
-        var btn_submit=$("#btn_submit");
-        if($(this).hasClass("mui-active")){
-            $(this).removeClass("mui-active");
-            check=true;
-            if(wechatAddr.status){
-                btn_submit.removeClass("active").removeAttr("disabled");
-            }else{
-                btn_submit.addClass("active").prop("disabled","disabled");
-            }
-        }else{
-            check=false;
-            $(this).addClass("mui-active");
-            btn_submit.addClass("active").prop("disabled","disabled");
-        }
-    });
-    var address='',nickname='',ads_tel='',city='';
-    //获取微信共享地址
-    mui('body').on('tap', '#open-wechat-addres-a', function() {
-        editAddrV1(
-            function(res) {
-                // 用户成功拉出地址 
-                address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
-                city=res.cityName;
-                nickname=res.userName;
-                ads_tel= res.telNumber;
-                wechatAddr.status = true;
-                wechatAddr.detailInfo = address;
-                wechatAddr.postalCode = res.postalCode;
-                wechatAddr.userName = res.userName;
-                wechatAddr.userTel = res.telNumber;
-                wechatAddr.nationalCode = res.nationalCode;
-                $("#open-wechat-addres-a").empty().append('<ul class="ft-12" style="color: #333;"><li>收  货  人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
-                if(city=='深圳市'){
-                    $("#pay_price").text('¥99.00');
-                    $("#pay_text").text('支付定金:');
-                }else{
-                    $("#pay_text").text('支付金额:');
-                    if($("input[name=radio1]:checked").val()=='1'){
-                        $("#pay_price").text('¥1599.00');
-                    }else{
-                        $("#pay_price").text('¥1499.00');
-                    }
-                }
-                if(check){
-                    $(this).removeClass("mui-active");
-                    $("#btn_submit").removeClass("active").removeAttr("disabled");
-                }
-            },
-            function() {
-                if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
-                    wechatAddr.status = true;
-                } else {
-                    wechatAddr.status = false;
-                    // 用户取消拉出地址
-                    $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
-                }
-            }
-        );
-
-    });
-    function change_input() {
-        if($("#btn-tongyi").hasClass("mui-active")){
-            alert_msg="请勾选同意《美国watero代理说明》";
-            check=false;
-            return false;
-        }else{
-            check=true;
-        }
-        if(mobile.test($("#ipt-exchange").val().trim()) || $("#ipt-exchange").val().trim()==''){
-            check=true;
-        }else{
-            alert_msg="手机号码不正确,请重新填写";
-            check=false;
-            return false;
-        }
-        if(wechatAddr.status){
-            check=true;
-        }else{
-            alert_msg="请选择收货地址";
-            check=false;
-            return false;
-        }
-        if(check) {
-            $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
-        }else{
-            $("#btn_submit").addClass("mui-active").prop("disabled","disabled");
-        }
-    }
-    mui.os.ios ? listener_ipt() : keyup_fn();
-
-    function keyup_fn() {
-        $(document).on('keyup', '#ipt-exchange', function(e) {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("active").prop("disabled","disabled");
-            }
-        });
-    }
-
-    function listener_ipt() {
-        document.getElementById('ipt-exchange').onblur = function() {
-            change_input();
-            if(check){
-                $("#btn_submit").removeClass("active").removeAttr("disabled");
-            }else{
-                $("#btn_submit").addClass("active").prop("disabled","disabled");
-            }
-        }
-    }
-    mui('body').on('tap', '#btn-share-mask', function() {
-        mask.show();//显示遮罩
-    });
-    var mask = mui.createMask();//callback为用户点击蒙版时自动执行的回调;
-    //mask.close();//关闭遮罩
-</script>
-</body>
-
-</html>

+ 0 - 357
watero-wechat-web/src/main/webapp/view/i_want_to_renew.html

@@ -1,357 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>我要续租</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.my-bar-nav {top: 0;-webkit-box-shadow: 0 0 0 #ccc;box-shadow: 0 0 0 #ccc;background: #fff;}
-		.my-bar-nav  .mui-btn-link{color: #1cc9f4;font-size: 14px;}
-		.my-btn-bluetooth{color: #1cc9f4;padding:2px 18px;font-size: 15px;border-color: #1cc9f4;}
-		.my-table-noline:after,.my-table-noline:before,.my-table-noline li:after,.my-table-noline:before{display: none;}
-		.mui-btn-link{color: #1cc9f4;}
-		.my-btn-water-quality{padding:6px 38px;font-size: 15px;}
-		.my-btn-water-quality.active{border: 1px solid rgba(78,215,249,.5);color: #1cc9f4;}
-		.year-list{width: 100%;}
-		.year-list>li{float: left;width: 22%;text-align: center;color: #1cc9f4;}
-		.year-list>li:first-child{text-align: left;width: 17%;}
-		.year-list>li:last-child{text-align: right;width: 17%;}
-		.mui-input-row.mui-input-range{padding-right: 0;}
-		.my-select {border:0!important;color: #999;background-color: #f5f5f5;margin-bottom: 0;padding: 3px 14px;text-align: center;-webkit-appearance: none;height: 40px;}
-		.after{padding: 0 11px;position: relative;}
-		.after:before{content:'';position:absolute;right: 20px;top: 16px;width: 0;height: 0;border-left: 4px solid transparent;border-right: 4px solid transparent;border-top: 7px solid #666;}
-		.my-view1:after,.my-view1 li:after{display: none;}
-		.loading{position: fixed;display:none;left: 0;top: 0;right: 0;bottom: 0;width: 100%;height: 100%;background: rgba(0,0,0,.8);color: #fff;text-align: center;padding-top: 50%;font-size: 18px;}
-		/* 设定WebKit浏览器下range */
-		/*拖动块的样式*/
-		.mui-input-range input[type=range]::-webkit-slider-thumb {
-			-webkit-appearance: none;/*清除系统默认样式*/
-			height: 26px;/*拖动块高度*/
-			width: 26px;/*拖动块宽度*/
-			background: #1cc9f4;/*拖动块背景*/
-			border-radius: 50%; /*外观设置为圆形*/
-			border: solid 1px #ddd; /*设置边框*/
-		}
-		/*横条样式*/
-		input[type=range] {
-			-webkit-appearance: none;/*清除系统默认样式*/
-			width: 100%;
-			background: -webkit-linear-gradient(#1cc9f4, #1cc9f4) no-repeat, #ddd;/*设置左边颜色为#61bd12,右边颜色为#ddd*/
-			background-size: 0% 100%;/*设置左右宽度比例*/
-			height: 3px;/*横条的高度*/
-		}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content" style="background: #fff;">
-	<ul class="mui-table-view mui-text-center my-table-noline">
-		<li class="mui-table-view-cell">
-			<span id="machineStopDate" class="mui-h6" ></span>
-		</li>
-		<li class="mui-table-view-cell">
-			<img src="//s.iamberry.com/watero/images/shop/my_equipment.png" width="50%" />
-			<span id="machineNO" style="position: absolute;color: #fff;left: 50%;top: 70%;-webkit-transform: translateX(-50%);"></span>
-		</li>
-		<li class="mui-table-view-cell">
-			<button type="button" id="machineConnectState" class="my-btn-bluetooth mui-btn-link">
-				未连接
-			</button>
-		</li>
-		<li class="mui-table-view-cell" style="padding: 0 35px;">
-			<div class="mui-input-row mui-input-range">
-				<input type="range" id='block-range' name="rechargeDuration" value="1" min="1" max="5" >
-			</div>
-			<ul class="year-list">
-				<li>1年</li>
-				<li>2年</li>
-				<li>3年</li>
-				<li>4年</li>
-				<li>5年</li>
-			</ul>
-		</li>
-		<li class="mui-table-view-cell mui-text-left">
-			<span class="mui-h5">服务费:</span><span class="cl-red" id="serviceCharge">¥799 元</span><span class="mui-h6 mui-pull-right">到期时间:<span id="rechargeStopDate"></span></span>
-		</li>
-		<li class="mui-table-view-cell" style="text-align: left;">
-			<span class="mui-h6">使用抵扣券</span>
-		</li>
-		<li class="after">
-			<select class="my-select" id="couponSelect" name="couponId">
-
-			</select>
-		</li>
-		<li class="mui-table-view-cell" style="text-align: left;">
-			<div><span class="mui-h6">抵扣金额:</span><span id="couponMoney" class="cl-red mui-pull-right">- ¥0 元</span></div>
-		</li>
-		<li class="mui-table-view-cell">
-			支付金额:<span class="cl-red" id="payCharge">¥799 元</span>
-		</li>
-		<li class="mui-table-view-cell">
-			<button id="sbumitRent" type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="支付中,请稍候"  class="" disabled>
-				确认续租
-			</button>
-		</li>
-		<li class="mui-table-view-cell">
-			<a id="toRechargeLog" style="text-decoration: underline;font-size: 13px;color: #999;">续租记录</a>
-		</li>
-	</ul>
-</div>
-<div class="loading">
-	支付中,请稍候<span class="dian">...</span>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<!-- <script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script> -->
-<script src="//s.iamberry.com/watero/js/shop/layer.js"></script>
-<script src="//s.iamberry.com/watero/js/wechat_iot.js?v=6734343"></script>
-<script type="text/javascript">
-    var machineDeviceId = '',machineId = '',couponId = '',stopDate = '';
-    var rechargeOrderId = '', payUrl = '';
-    var payData = {};
-    var yearNum = 1;//最后要充值的年数
-    var isPay = true;
-    //每充一年需要多少钱			最后要充值的费用		优惠金额
-    var payMoneyOne = 799, payMoney = 799,couponMoney = 0;
-    mui.ready(function(){
-        machineId = getParam("machineId");
-        $('#block-range').val(1);
-        initMachine(machineId);
-        //判断机器是否在线
-        setTimeout("myInterval()",3000);//1000为1秒钟
-        document.querySelector('.loading-bg').style.display='none';
-    });
-    function myInterval(){
-        sendMsgAndReceiveData(machineDeviceId,"*getData#",function(state,res){
-            if(200 == state){
-                //1.去掉遮罩
-                document.querySelector('.loading-bg').style.display='none';
-                //2.“确认续租”按钮亮起
-                $("#sbumitRent").addClass("my-btn-water-quality");
-                $("#sbumitRent").addClass("active");
-                $("#sbumitRent").removeAttr("disabled");
-            }
-            if(500 == state){
-                //1.去掉遮罩
-                document.querySelector('.loading-bg').style.display='none';
-                //2.弹框该机器不可续费
-                $("#sbumitRent").prop("disabled","disabled");
-                $("#machineConnectState").text('未连接');
-            }
-        });
-    }
-    /**
-     *	初始化服务费抵扣券下拉框和机器信息
-     */
-    function initMachine(machineId){
-        mui.ajax(base_path + '/machine/get_coupons_machine?dates=' + new Date().getTime(), {
-            data:{
-                "machineId":machineId
-            },
-            dataType:'json',
-            type:'post',
-            timeout:15000,
-            success: function(dt) {
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.resultCode == 200 && dt.returnCode == 200){
-                        var couponList = dt.returnMsg.couponList;
-                        var machine = dt.returnMsg.machine;
-                        machineDeviceId = machine.machineDeviceId;
-                        stopDate = machine.machineStopDate;
-                        $("#machineStopDate").text(stopDate + '  到期');
-                        $("#rechargeStopDate").text(addYears(stopDate,1));
-
-                        $("#machineNO").text("NO." + (10000 + parseInt(machineId)));
-                        if(machine.machineConnectState == 1){
-                            $("#machineConnectState").text('已连接');
-                        }else{
-                            $("#machineConnectState").text('未连接');
-                        }
-
-                        var couponSelect = $("#couponSelect");
-                        if(couponList.length == 0){
-                            $("#couponSelect").append('<option value="0">没有可用的抵扣券</option>');
-                        }else{
-                            couponSelect.append('<option serviceMoney="0" value="0">请选择抵扣券</option>');
-                            mui(couponList).each(function(index) {
-                                couponSelect.append('<option value="' + this.serviceId + '" serviceMoney="' + accDiv(this.serviceMoney,100) + '">' + this.serviceName + '</option>');
-                            });
-                        }
-                    }else{
-                        mui.alert("该机器不可以续费!请选择正确的机器!");
-                    }
-                }
-            },
-            error:function(xhr, type, errorThrown){
-                console.log(xhr);
-                mui.alert("该机器不可以续费!!");
-            }
-        });
-    }
-    /**
-     *	点击年数进度条点击事件
-     */
-    document.getElementById('block-range').addEventListener('input',function(){
-        document.getElementById('block-range').value = this.value;
-        //修改服务费、到期时间
-        yearNum = parseInt(this.value);
-        this.style.backgroundSize= (yearNum - 1) * 25 + "% 100%";
-        payMoney = yearNum * payMoneyOne;
-        //year_num = yearNum;
-        $("#serviceCharge").text('¥' + payMoney + ' 元');
-        $("#payCharge").text('¥' + (payMoney - couponMoney) + ' 元');
-        $("#rechargeStopDate").text(addYears(stopDate,yearNum));
-    });
-
-    /**
-     *	抵扣券下拉框change事件
-     */
-    $('#couponSelect').change(function(){
-        couponMoney = $($('#couponSelect option')[$(this)[0].selectedIndex]).attr("serviceMoney");
-        $('#couponMoney').text('-¥' + couponMoney + ' 元');
-        $("#payCharge").text('¥' + (payMoney - couponMoney) + ' 元');
-        couponId = this.value;
-    });
-
-    /**
-     * 立即续费
-     * 校验机器在线、获取预支付id、发起支付
-     */
-    mui('body').on('tap', '#sbumitRent', function() {
-        sendMsgAndReceiveData(machineDeviceId,"*getData#",function(state,res){
-            if(200 == state){
-                toPay();
-            }
-            if(500 == state){
-                mui.alert("请保持机器在线!");
-            }
-        });
-    });
-
-    function toPay(){
-        if(rechargeOrderId == ''){
-            payUrl = base_path + '/machine/machine_pay?dates=';
-            payData = {
-                "machineId":machineId,
-                "year_num":yearNum,
-                "couponId":couponId
-            };
-        }else{
-            payUrl = base_path + '/machine/recharge_pay?dates=';
-            payData = {"orderId":rechargeOrderId};
-        }
-        if(isPay) {
-            isPay = false;
-            layer.open({
-                type: 2,
-                shadeClose: false,
-                content: "正在请求加载订单信息..."
-            }); // 调用加载弹出层
-            mui.ajax(payUrl + new Date().getTime(), {
-                data:payData,
-                dataType:'json',
-                type:'post',
-                timeout:15000,
-                success: function(dt) {
-                    layer.closeAll();
-                    if(dt.resultCode == 200 && dt.returnCode == 200){
-                        $('#couponSelect').css("display","none");
-                        $("#block-range").prop("disabled","disabled");
-                        var dataObj = dt.returnMsg;
-                        rechargeOrderId = dataObj.returnMsg;
-                        var obj = JSON.parse("{" + dataObj.wechat_pay_id + "}");
-                        WeixinJSBridge.invoke('getBrandWCPayRequest', obj, function(res) {
-                            if(res.err_msg == 'get_brand_wcpay_request:ok') {
-                                layer.open({
-                                    type: 2,
-                                    shadeClose: false,
-                                    content: "正在请求加载订单信息..."
-                                }); // 调用加载弹出层
-                                $.ajax({
-                                    type: 'post',
-                                    url: base_path + '/machine/check_recharge_pay_status',
-                                    data: {"rechargeOrderId":rechargeOrderId},
-                                    dataType: 'json',
-                                    timeout: 15000,
-                                    success: function(data) {
-                                        //console.log(data);
-                                        if(data.status) {
-                                            if(data.data.rechargeState == 1){
-                                                isPay = true;
-                                                //mui.alert("支付成功!跳转到我的设备!");
-                                                mui.openWindow({url:'/watero/view/rent/my_equipment.html'});
-                                            }else{
-                                                mui.alert('如果已支付,请等待同步支付状态!', '', function() {
-                                                    isPay = true;
-                                                });
-                                            }
-                                        } else {
-                                            isPay = true;
-                                            mui.alert(data.message);
-                                        }
-                                    },
-                                    error: function(xhr, type, errorThrown) {
-                                        //异常处理;
-                                        console.log(xhr);
-                                        isPay = true;
-                                        mui.alert("请检查网络或刷新页面重试!");
-                                    }
-                                });
-                            } else {
-                                isPay = true;
-                                mui.alert("对不起,支付失败!请稍后重试!");
-                            }
-                        });
-
-                    }else{
-                        //console.log(xhr);
-                        isPay = true;
-                        mui.alert("该机器不可以续费!请确保机器已经激活并连接!");
-                    }
-                },
-                error:function(xhr, type, errorThrown){
-                    console.log(xhr);
-                    layer.closeAll();
-                    isPay = true;
-                    mui.alert("支付失败!请检查网络或刷新页面重试!");
-                }
-            });
-        } else{
-            mui.alert("正在请求支付中~~请稍后!");
-            return;
-        }
-    }
-    mui('body').on('tap', '#toRechargeLog', function() {
-        window.location.href = '/watero/view/rent/renew_logs.html?machineId=' + machineId;
-    });
-
-    /**
-     * 给日期字符串增加年
-     */
-    function addYears(dateStr,years){
-        var date = new Date(Date.parse(stopDate.replace(/-/g, "/")));
-        var yearStr = date.getFullYear() + years;
-        var otherStr = dateStr.substring(4,dateStr.length);
-        return yearStr + otherStr;
-    }
-</script>
-</body>
-</html>

+ 0 - 225
watero-wechat-web/src/main/webapp/view/input_machine.html

@@ -1,225 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title></title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<base href="//s.iamberry.com/watero/">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.my-select {-webkit-appearance: menulist;border:1px solid #ccc !important;}
-		.box{width:100%;text-align: center;}
-		.box .left_tab{display: inline-block;width:45%;margin-right: 4%;}
-		.box .right_tab{display: inline-block;width:45%;margin-left: 4%;}
-		.mui-btn-block{padding: 10px 0;}
-	</style>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content" style="background: #fff;">
-	<div class="mui-content-padded">
-		<input type="text" id="mac-input" class="mui-text-center" placeholder="请输入蓝牙MAC地址 :不需要" />
-		<br/>
-		<button type="button" id="confirm-mac-btn" class="mui-btn mui-btn-block mui-btn-blue" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="确认中...">确认蓝牙MAC</button>
-		<div class="box">
-			<div class="left_tab"><button type="button" id="conn-dev-btn" class="mui-btn mui-btn-block mui-btn-blue" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="连接中...">连接机器</button></div>
-			<div class="right_tab"><button type="button" id="dis-dev-btn" class="mui-btn mui-btn-block mui-btn-blue" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="断开中...">断开连接</button></div>
-		</div>
-		<div class="box">
-			<div class="left_tab"><select class="my-select" id="init-year-input"><option value="1">1年</option><option value="2">2年</option><option value="3">3年</option></select></div>
-			<div class="right_tab"><button type="button" id="init-dev-btn" class="mui-btn mui-btn-block mui-btn-blue" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="激活中...">激活机器</button></div>
-		</div>
-		<div class="box" style="display: none;">
-			<div class="left_tab"><select class="my-select"><option>1年</option><option>2年</option><option>3年</option></select></div>
-			<div class="right_tab"><button type="button" class="mui-btn mui-btn-block mui-btn-blue" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="续费中...">续费</button></div>
-		</div>
-		<div class="box">
-			<div class="left_tab"><input type="text" id="tds-input" value="TDS" style="width: 45%;" readonly="readonly"/><input type="text" id="water-input" value="水量" style="width: 45%;float: right;" readonly="readonly"/></div>
-			<div class="right_tab"><button type="button" id="get-data-btn" class="mui-btn mui-btn-block mui-btn-blue" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="获取中...">获取水量、TDS</button></div>
-		</div>
-		<div class="box">
-			<div class="left_tab" id="state-div">
-				<span class="iconfont icon-lvxin_full"></span><span class="iconfont icon-lvxin_full"></span><span class="iconfont icon-lvxin_full"></span><span class="iconfont icon-lvxin_null"></span>
-			</div>
-			<div class="right_tab"><button type="button" id="get-state-btn" class="mui-btn mui-btn-block mui-btn-blue" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="获取中...">获取滤芯状态</button></div>
-		</div>
-	</div>
-</div>
-<script type="text/javascript" src="js/mui.min.js"></script>
-<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
-<script type="text/javascript" src="//s.iamberry.com/watero/js/wechat_iot.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        console.log("页面加载完毕")
-        document.querySelector('.loading-bg').style.display='none';
-
-    });
-    // 全局flag:是否允许请求
-    var isRequest = false;
-    var deviceId = null;
-    // 确认MAC
-    $(function () {
-        // 确认MAC
-        $("#confirm-mac-btn").click(function () {
-            // 校验数据
-            var mac = $("#mac-input").val();
-            if (mac == null || mac == "") {
-                mui.alert("请检查MAC是否为空");
-                return;
-            }
-            // 处理 :
-            if (mac.indexOf(":") != -1) {
-                var replaceStr = ":";
-                mac = mac.replace(new RegExp(replaceStr,'gm'),'').toLowerCase();
-            }
-
-            // 发起请求
-            var url = "//w.iamberry.com/watero/wechat/factory/info_by_mac";
-            $.post(url,{"mac":mac},function(result){
-                if (result.resultCode != 200 || result.returnCode != 200) {
-                    mui.alert("没有查找到机器,请检查");
-                    return;
-                }
-                // 允许请求
-                isRequest = true;
-                // 保存deviceid
-                deviceId = result.returnMsg.info.machineDeviceId;
-                mui.alert("已检测到机器,请确认机器在线,然后开始测试...");
-            });
-        });
-
-        // 连接请求
-        $("#conn-dev-btn").click(function () {
-            if (!isRequest) {
-                mui.alert("请先输入mac地址 然后测试...");
-                return;
-            }
-            wx.invoke('getWXDeviceTicket', {'deviceId':deviceId,'type':'1', 'connType':'blue'}, function(res) {
-                if (res.err_msg == "getWXDeviceTicket:ok") {
-                    var ticket = res.ticket;
-                    var url = "//w.iamberry.com/watero/wechat/factory/bind";
-                    $.post(url,{"ticket":ticket, "device_id":deviceId},function(result){
-                        if (result.resultCode != 200 || result.returnCode != 200) {
-                            mui.alert("绑定失败,请检查");
-                            return;
-                        }
-
-                    });
-                }
-            });
-        });
-
-        // 断开连接
-        $("#dis-dev-btn").click(function () {
-            if (!isRequest) {
-                mui.alert("请先输入mac地址 然后测试...");
-                return;
-            }
-            wx.invoke('getWXDeviceTicket', {'deviceId':deviceId,'type':'2', 'connType':'blue'}, function(res) {
-                if (res.err_msg == "getWXDeviceTicket:ok") {
-                    var ticket = res.ticket;
-                    var url = "//w.iamberry.com/watero/wechat/factory/un_bind";
-                    $.post(url,{"ticket":ticket, "device_id":deviceId},function(result){
-                        if (result.resultCode != 200 || result.returnCode != 200) {
-                            mui.alert("解除绑定失败,请检查");
-                            return;
-                        }
-                    });
-                }
-            });
-        });
-
-        // 激活机器
-        $("#init-dev-btn").click(function () {
-            if (!isRequest) {
-                mui.alert("请先输入mac地址 然后测试...");
-                return;
-            }
-            // 发送
-            sendMsgToDevice(deviceId, base64encode("*setDir2#"), function(state, res){
-                if (state == 200) {
-                    var hour = parseInt($("#init-year-input").val()) * 365 * 24;
-                    hour = append(hour);
-                    var water = 2500  * parseInt($("#init-year-input").val());
-                    water = append(water);
-                    sendMsgToDevice(deviceId, base64encode("*setData" + hour + " " + water + "#"), function(code, data){
-                        receiveData(function(temp) {
-                            var t = base64decode(temp);
-                            if (t == "ok1") {
-                                mui.alert("激活成功...");
-                            } else {
-                                mui.alert("激活失败...");
-                            }
-                        });
-                        // 改变数据方向
-                        sendMsgToDevice(deviceId, base64encode("*setDir0#"), function(){});
-                    });
-                }
-            });
-
-        });
-
-        // 获取数据
-        $("#get-data-btn").click(function () {
-            if (!isRequest) {
-                mui.alert("请先输入mac地址 然后测试...");
-                return;
-            }
-            sendMsgAndReceiveData(deviceId, "*getData#", function(state, data){
-                if (state == 200) {
-                    var temp = data.split(" ");
-                    $("#tds-input").val(temp[0]);
-                    $("#water-input").val(temp[1]);
-                } else {
-                    mui.alert("获取失败,请重试!");
-                }
-            });
-        });
-
-        // 获取滤芯状态
-        $("#get-state-btn").click(function(){
-            if (!isRequest) {
-                mui.alert("请先输入mac地址 然后测试...");
-                return;
-            }
-            sendMsgAndReceiveData(deviceId, "*isUse#", function(state, data){
-                if (state == 200) {
-                    var t = data.split("");
-                    // 先清空
-                    $("#state-div").html("");
-                    for (var i = 0; i < t.length; i++) {
-                        if (t[i] == "0") {
-                            // 不可用
-                            $("#state-div").append("<span class='iconfont icon-lvxin_null'></span>");
-                        } else {
-                            $("#state-div").append("<span class='iconfont icon-lvxin_full'></span>");
-                        }
-                    }
-                } else {
-                    mui.alert("获取失败,请重试!");
-                }
-            });
-        });
-    });
-
-    // 填充参数
-    function append(hour) {
-        var temp = hour + "";
-        if (hour.length == 5) {
-            return temp;
-        }
-        return append("0" + hour);
-    }
-</script>
-</body>
-</html>

+ 0 - 98
watero-wechat-web/src/main/webapp/view/lease_desc.html

@@ -1,98 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>产品介绍</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=3, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.table-box{display:table;width:100%;text-align: center;border:1px solid rgba(0,0,0,.1);border-radius: 7px;}
-		.table-box>div{display:table-cell;width: 50%;height: 100%;vertical-align: middle;}
-		.table-box>div:first-child{font-size: 0;line-height: 0;}
-		.table-box>div img{width:100%;}
-		h4{color:#666;padding-bottom:10px;}
-		.mui-table-view:after,.mui-table-view:before,.mui-table-view li:after,.mui-table-view:before{display:none;}
-	</style>
-	<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content" style="background: #fff;">
-	<ul class="mui-table-view" style="margin-top: 5px;">
-		<li class="mui-table-view-cell">
-			<div class="table-box">
-				<div><img src="//s.iamberry.com/watero/images/shop/desc_menu1.jpg" /></div><div><h4>产品资质</h4><h6>查看更多</h6></div>
-			</div>
-		</li>
-		<li class="mui-table-view-cell">
-			<div class="table-box">
-				<div><img src="//s.iamberry.com/watero/images/shop/desc_menu2.jpg" /></div><div><h4>产品H5</h4><h6>查看更多</h6></div>
-			</div>
-		</li>
-		<li class="mui-table-view-cell">
-			<div class="table-box">
-				<div><img src="//s.iamberry.com/watero/images/shop/desc_menu3.jpg" /></div><div><h4>功能介绍视频</h4><h6>查看更多</h6></div>
-			</div>
-		</li>
-		<li class="mui-table-view-cell">
-			<div class="table-box">
-				<div><img src="//s.iamberry.com/watero/images/shop/desc_menu4.jpg" /></div><div><h4>生活场景视频</h4><h6>查看更多</h6></div>
-			</div>
-		</li>
-	</ul>
-</div>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        mui.each(document.querySelectorAll('.mui-table-view .mui-table-view-cell'), function(index, el) {
-            el.addEventListener('tap', function() {
-                switch (index) {
-                    case 0:
-                        //产品资质
-                        mui.openWindow({
-                            url: '//w.iamberry.com/watero/view/product/certificate.html'
-                        });
-                        break;
-                    case 1:
-                        //产品H5
-                        mui.openWindow({
-                            url: '//www.watero.cn/watero_wap_app_1.2/index.html'
-                        });
-                        break;
-                    case 2:
-                        //功能介绍视频
-                        mui.openWindow({
-                            url: '//m.v.qq.com/x/page/y/1/k/y0348fng61k.html?ptag=v_qq_com%23v.play.adaptor%233'
-                        });
-                        break;
-                    case 3:
-                        //生活场景视频
-                        mui.openWindow({
-                            url: '//m.v.qq.com/x/page/o/p/s/o0344c2okps.html?ptag=v_qq_com%23v.play.adaptor%233'
-                        });
-                        break;
-                    default:
-                        break;
-                }
-            }, false);
-        });
-        document.querySelector('.loading-bg').style.display='none';
-    });
-</script>
-</body>
-</html>

+ 0 - 116
watero-wechat-web/src/main/webapp/view/lease_order_win.html

@@ -1,116 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>下单成功</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.tips{padding-bottom: 65px;}
-		.gift-card-title{padding:35px 0 0 0;}
-		.gift-card-title .mui-table-view-cell.mui-active{background:transparent;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn){color: #fff;}
-		.gift-card-title .mui-table-view-cell>a:not(.mui-btn).mui-active{background:transparent;}
-		.gift-card-title .mui-navigate-right:after{color: #fff;font-size: 20px;right: 7px;}
-		.gift-card-title .mui-table-view-cell{color: #fff;}
-		.mui-table-view-cell:after,.mui-table-view:after,.mui-table-view:before{display:none;}
-		.mui-icon-checkmarkempty{font-size:90px;background: #1cc9f4;border-radius: 50%;}
-		.my-btn-line{border: 1px solid #71d8ec; background: transparent;color: #71d8ec;padding: 5px 10px;}
-		#go_lease_order_details{color:#1cc9f4;text-decoration: underline;}
-	</style>
-	<script>
-        // 屏蔽分享
-        //window.hiddenAllWechatMenu = true;
-        var url = '//'+document.domain+'/watero/view/i_want_lease_test.html';
-        window.repleFlag = true;
-        window.repleWxData = {
-            "appId": "",
-            "imgUrl": '//s.iamberry.com/watero/images/shop/share-lease.png',
-            "link": url,
-            "desc": "快来围观吧,美国watero一款可移动的净水机。",
-            "title": "净水机可以租啦!",
-            "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
-            "shareTimeSuccess": "分享成功",
-            "shareTimeCancel": "已取消分享",
-            "shareAppSuccess": "分享成功!",
-            "shareAppCancel": "已取消分享"
-        };
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="tips">
-		<ul class="mui-table-view gift-card-title">
-			<li class="mui-table-view-cell mui-text-center">
-				<span class="mui-icon mui-icon-checkmarkempty"></span>
-			</li>
-		</ul>
-		<ul class="mui-table-view mui-text-center">
-			<li style="color: #999;">
-				租用下单成功
-			</li>
-			<li style="color: #999;">
-				我们将尽快联系您发货
-			</li>
-			<li class="mui-table-view-cell">
-				<a id="go_lease_order_details" name="/watero/view/rent/lease_order_details.html?rentStatus=-1">查看租用订单详情</a>
-			</li>
-			<li class="mui-text-center gzwx">
-				<img width="30%" style="padding-top:35px;" src="//s.iamberry.com/watero/images/shop/lease-2wm.png" />
-			<li>
-			<li class="mui-table-view-cell gzwx" style="color: #999;">
-				请长按识别二维码,关注公众号享受售后服务
-			<li>
-		</ul>
-	</div>
-</div>
-<div style="position: fixed;width: 100%;left: 0;bottom: 0;text-align: center;padding: 15px 0;color: #999;">
-	深圳爱贝源科技有限公司<br/>服务热线:<a href="tel:400-800-6692">400-800-6692</a>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function() {
-        mui.ajax(base_path + '/rent_order/isFocus', {
-            data: {},
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-				/*console.log(dt)*/
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                }else{
-                    if(dt.status) {
-                        $(".gzwx").hide();
-                    }else{
-                        $(".gzwx").show();
-                    }
-                    document.querySelector('.loading-bg').style.display = 'none';
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-                document.querySelector('.loading-bg').style.display = 'none';
-            }
-        });
-    });
-    mui('body').on('tap', '#go_lease_order_details', function() {
-        location.href=this.getAttribute("name");
-    });
-</script>
-</body>
-</html>

+ 0 - 40
watero-wechat-web/src/main/webapp/view/lease_test_xieyi.html

@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>租赁协议</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=3, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<img width="100%" src="//s.iamberry.com/watero/images/shop/xieyi_lease1.jpg" />
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        //$(".new-time").text(formatDate(new Date()));
-        document.querySelector('.loading-bg').style.display='none';
-    });
-</script>
-</body>
-</html>

+ 0 - 74
watero-wechat-web/src/main/webapp/view/lease_xieyi.html

@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<html>
-	<head>
-		<meta charset="UTF-8">
-		<title>售后说明</title>
-		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=3, user-scalable=no">
-		<meta name="apple-mobile-web-app-capable" content="yes">
-		<meta name="apple-mobile-web-app-status-bar-style" content="black">
-		<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-		<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-		<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-		<style
-			.mui-table-view>li{margin: 10px 0;}
-		.mui-table-view:before,.mui-table-view:after{display: none;}
-		.mui-table-view >li:before,.mui-table-view >li:after{display: none;}
-		</style>
-		<script>
-			// 屏蔽分享
-			window.hiddenAllWechatMenu = true;
-		</script>
-	</head>
-	<body style="background: #fff;">
-	<div class="loading-bg">
-			<div class="mui-loading">
-				<div class="mui-spinner">
-				</div>
-				&nbsp;&nbsp;加载中...
-			</div>
-	</div>
-
-			<div class="mui-content" style="background: #fff;">
-				<div style="padding: 10px">
-				<ul class="mui-table-view">
-					<li class="mui-table-view-cell">
-						一、邮寄前注意事项及邮寄地址
-					</li>
-					<li  class="mui-h6">
-						1、您好,机器邮寄前请将水箱、接水台中的水倒掉并擦干,机器
-						内置水箱中的水要通过排水管塞排干净,确保机器不会再出水,避
-						免运输途中水溅入机器内部造成不必要的损失;用原包装或泡沫等
-						材质包裹好机身。避免运输途中造成机器磕碰、损坏。
-					</li>
-					<li  class="mui-h6">
-						2、邮寄地址:东莞清溪三中金龙工业区徐福记对面优尼雅电子科技
-						陈舜杰,13168418770
-					</li>
-					<li class="mui-table-view-cell">
-						二、邮寄方式及运费
-					</li>
-					<li class="mui-h6">
-						1、请勿寄顺丰、EMS以及到付件快递,其他快递物流随意,寄回
-						时,麻烦您在产品箱里留下机器故障说明,并提供给客服快递单号
-						便于客服查询和及时跟进您的换货/维修进度
-					</li>
-					<li class="mui-h6">
-						2、寄回的运费需要您先垫付,待工厂检测之后,如果是产品问题
-						我公司会承担您寄回机器的运费,之后将通过支付宝等方式退还您!
-						如果检测结果是人为原因造成,则需您自行承担运费。
-					</li>
-				</ul>
-				</div>
-			</div>
-	<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-	<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-	<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-	<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-	mui.ready(function(){
-		//$(".new-time").text(formatDate(new Date()));
-		document.querySelector('.loading-bg').style.display='none';
-	});
-</script>
-</body>
-</html>

+ 0 - 43
watero-wechat-web/src/main/webapp/view/member_benefits.html

@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>会员权益</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css?v=2016111701">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/icons-extra.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css?v=2016111701" />
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<div class="mui-text-center">
-		<h3 style="padding: 70px 0 30px 0;">WaterO会员权益</h3>
-		<img style="width:80%;display: block;margin: 0 auto;" src="//s.iamberry.com/watero/images/vip-4.jpg" />
-	</div>
-</div>
-
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        console.log("页面加载完毕")
-        document.querySelector('.loading-bg').style.display='none';
-    });
-</script>
-</body>
-</html>

+ 0 - 142
watero-wechat-web/src/main/webapp/view/order_service.html

@@ -1,142 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>订单服务</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.huanhuo,.tuihuo,.tuikuan{position: relative;display: inline-block;width: 70px;height: 20px;color: #666;    text-align: center;}
-		.huanhuo:after{content: '申请换货';position: absolute;right: 1px;top: 0;font-size: 14px;width: 5em;}
-		.tuihuo:after{content: '申请退货';position: absolute;right: 1px;top: 0;font-size: 14px;width: 5em;}
-		.tuikuan:after{content: '申请退款';position: absolute;right: 1px;top: 0;font-size: 14px;width: 5em;}
-		.iconfont{color: #22cbf5;font-size: 30px;}
-		.mui-table-view:after,.mui-table-view:before,.mui-table-view .mui-table-view-cell:after,.mui-table-view .mui-table-view-cell:before{display: none;}
-		.mui-table-view-cell{padding: 20px 15px;background: #eee;margin: 10px 0;border-radius: 5px;}
-		.mui-navigate-right:after, .mui-push-right:after {font-size: 25px;color: #666;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content" style="background: #fff;">
-	<div class="mui-content-padded">
-		<ul class="mui-table-view" id="my_order_service">
-			<li class="mui-table-view-cell">
-				<a class="mui-navigate-right my-navigate-right" href="/watero/view/apply_replacement.html">
-						<span class="iconfont icon-huanhuo"><span/><div class="huanhuo"></div>
-				</a>
-			</li>
-			<li class="mui-table-view-cell">
-				<a class="mui-navigate-right my-navigate-right"  href="/watero/view/apply_returns.html">
-						<span class="iconfont icon-tuihuo"><span/><div class="tuihuo"></div><span class="mui-h6" style="-webkit-transform:translateY(-50%);">(退还押金)</span>
-				</a>
-			</li>
-			<li class="mui-table-view-cell">
-				<a class="mui-navigate-right my-navigate-right1"  href="#">
-						<span class="iconfont icon-tuikuan"><span/><div class="tuikuan"></div>
-				</a>
-			</li>
-		</ul>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        var parm=getParam("orderId"),item=getParam("itemId"),postStatus=getParam("postStatus");
-        mui.each(document.querySelectorAll('#my_order_service .my-navigate-right'), function(index, el) {
-            var th=this;
-            el.addEventListener('tap', function() {
-                if(postStatus==5){
-                    mui.openWindow({
-                        url: th.getAttribute("href")+"?orderId="+parm+"&itemId="+item
-                    });
-                }else{
-                    mui.alert('此订单暂时不支持此操作');
-                }
-            }, false)
-        });
-        mui('body').on('tap', '.my-navigate-right1', function() {
-            if(postStatus==2) {
-                mui.ajax(base_path + '/rent_order/apply_return_money', {
-                    data: {
-                        orderId: parm,
-                        itemId: item
-                    },
-                    type: 'post',
-                    timeout: 15000,
-                    success: function (dt) {
-						/*console.log(dt)*/
-                        if (dt.isRedirect) {
-                            location.href = dt.redirectURL;
-                        } else {
-                            if (dt.status) {
-                                mui.alert("申请成功!", function () {
-                                    location.href = '/watero/view/rent/lease_order_details.html?rentStatus=-1';
-                                });
-                            } else {
-                                mui.alert(dt.message);
-                            }
-                        }
-                    },
-                    error: function (xhr, type, errorThrown) {
-                        console.log(xhr)
-                    }
-                });
-            }else if(postStatus==3){
-                mui.alert('正在退款中,请耐心等候');
-            }else{
-                mui.alert('此订单暂时不支持此操作');
-            }
-        });
-        document.querySelector('.loading-bg').style.display='none';
-    });
-    function getOrderStatus(status){
-        switch (status){
-            case 0:
-                return '取消订单';
-            case 1:
-                return '待支付';
-            case 2:
-                return '待发货';
-            case 3:
-                return '退款申请中';
-            case 4:
-                return '已退款';
-            case 5:
-                return '已发货';
-            case 6:
-                return '申请退货中';
-            case 7:
-                return '退货中';
-            case 8:
-                return '退货成功';
-            case 9:
-                return '换货中';
-            case 10:
-                return '换货完成';
-            case 11:
-                return '申请换货中';
-            default:
-                break;
-        }
-    }
-</script>
-</body>
-</html>

+ 0 - 82
watero-wechat-web/src/main/webapp/view/product/certificate.html

@@ -1,82 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="UTF-8">
-	<title></title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.mui-table-view .mui-table-view-cell img {
-			width: 100%;
-		}
-	</style>
-</head>
-
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<nav class="mui-bar mui-bar-tab" id="footer-bar">
-	<a class="mui-tab-item">
-		<div class="iconfont icon-home"></div>
-		<span class="mui-tab-label">首页</span>
-	</a>
-	<a class="mui-tab-item">
-		<div class="iconfont icon-gouwuche"><span class="mui-badge">0</span></div>
-		<span class="mui-tab-label">购物车</span>
-	</a>
-	<a class="mui-tab-item">
-		<div class="iconfont icon-dingdan"></div>
-		<span class="mui-tab-label">我的订单</span>
-	</a>
-	<a class="mui-tab-item">
-		<div class="iconfont icon-vip"></div>
-		<span class="mui-tab-label">会员中心</span>
-	</a>
-</nav>
-<header class="mui-bar mui-bar-nav header">
-	<div class="go-index go_index">
-		<img src="//s.iamberry.com/watero/images/shop/logo.png">
-	</div>
-</header>
-<div class="mui-content" style="background: #fff;">
-	<ul class="mui-table-view">
-		<li class="mui-table-view-cell">
-			<img src="//s.iamberry.com/watero/images/shop/cp-z-01.png" />
-		</li>
-		<li class="mui-table-view-cell">
-			<img src="//s.iamberry.com/watero/images/shop/certificate1.jpg" />
-		</li>
-		<li class="mui-table-view-cell">
-			<img src="//s.iamberry.com/watero/images/shop/certificate2.jpg" />
-		</li>
-		<li class="mui-table-view-cell">
-			<img src="//s.iamberry.com/watero/images/shop/certificate3.jpg" />
-		</li>
-		<li class="mui-table-view-cell">
-			<img src="//s.iamberry.com/watero/images/shop/certificate4.jpg" />
-		</li>
-	</ul>
-</div>
-
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script type="text/javascript">
-    mui.ready(function() {
-        console.log("页面加载完毕")
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-</script>
-</body>
-
-</html>

+ 0 - 101
watero-wechat-web/src/main/webapp/view/push_jiangli.html

@@ -1,101 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>推荐奖励</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.desc-content{padding:30px 0 40px 0;background: #fff;}
-		.img_div>img{display: block;}
-		.my-btn-blue{border: 1px solid rgba(73,212,246,.5);background-color: transparent;color: rgb(73,212,246);}
-		.my-btn-box{text-align: center;padding: 20px;background: #fff;}
-		.my-btn-box>button{margin: 0 25px;}
-		.my-btn-blue:active{background-color:rgb(73,212,246) !important;color: #fff !important;}
-		.mui-backdrop {position: fixed;z-index: 998;top: 0;right: 0;bottom: 0;left: 0;background: url(//s.iamberry.com/watero/images/shop/share_tj.png) top center no-repeat rgba(0, 0, 0, .4);background-size: 100%;}
-	</style>
-</head>
-<body>
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<div class="img_div">
-		<img width="100%" src="//s.iamberry.com/watero/images/shop/2017-04-13-01.jpg" />
-		<img width="100%" src="//s.iamberry.com/watero/images/shop/2017-04-13-02.jpg" />
-		<img width="100%" src="//s.iamberry.com/watero/images/shop/2017-04-13-03.jpg" />
-	</div>
-	<div class="my-btn-box">
-		<button class="mui-btn my-btn-blue" id="i_want_lease">我要租用</button><button class="mui-btn my-btn-blue" id="my_btn_share">分享推荐</button>
-	</div>
-	<div class="mui-text-center mui-h6 desc-content">
-		注:本活动最终解释权归爱贝源科技有限公司所有
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        $.ajax({
-            type: 'post',
-            url: base_path + '/rent_order/select_rent_order_num',
-            data: {},
-            dataType: 'json',
-            timeout: 15000,
-            success: function(dt) {
-                console.log(dt)
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.status){
-                        if(dt.data>0){
-                            mui.openWindow({
-                                url: "/watero/view/rent/i_want_lease.html?dates=" + new Date().getTime()
-                            })
-                        }
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr);
-            }
-        })
-        var url = "https:" + domanUrl+"/watero/view/push_jiangli.html";
-        window.repleFlag = false;
-        window.wxFriend = {
-            "appId": "",
-            "imgUrl": '//s.iamberry.com/watero/images/shop/share_lease_0.jpg',
-            "link": url,
-            "desc": "高端智能净水机不用买,可以直接拿回家用啦!这是一款可租赁的智能净水机!体验好了,分享出去,还可有千元现金可以拿!",
-            "title": "Watero智能净水机免费用!还可赢现金豪礼!",
-            "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
-            "shareTimeSuccess": "分享成功",
-            "shareTimeCancel": "已取消分享",
-            "shareAppSuccess": "分享成功!",
-            "shareAppCancel": "已取消分享"
-        };
-        getConfig();
-        document.querySelector('.loading-bg').style.display='none';
-    });
-    mui('body').on('tap', '#i_want_lease', function() {
-        mui.openWindow({
-            url: "/watero/view/rent/i_want_lease.html?dates=" + new Date().getTime()
-        })
-    });
-    mui('body').on('tap', '#my_btn_share', function() {
-        mask.show();
-    });
-    var mask = mui.createMask(function() {});
-</script>
-</body>
-</html>

+ 0 - 443
watero-wechat-web/src/main/webapp/view/rent/i_want_lease.html

@@ -1,443 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="utf-8">
-	<title>我要租用</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.mui-backdrop {
-			position: fixed;
-			z-index: 998;
-			top: 0;
-			right: 0;
-			bottom: 0;
-			left: 0;
-			background:url(//s.iamberry.com/watero/images/shop/share.png) top center no-repeat rgba(0, 0, 0, .8);
-			background-size: 80%;
-		}
-		.mui-backdrop:after{content:'分享有福利啦!';position: absolute;left:0;top:0;width:100%; text-align: center;color:#fff;padding-top:50%;font-size:19px;}
-		.mui-backdrop:before{content:'如果您是新用户,分享好友并成功租用后,将奖励您300元服务费抵扣券;如果您已经租用过我们的净水机,分享后奖励,请 点击查看!';position: absolute;left:0;top:0;width:90%; text-align: left;color:#fff;font-size:16px;padding:60% 5% 10px 5%;}
-		.cart_fixed{position: fixed;right: 30px;bottom:135px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .5;}
-		.cart_fixed .mui-badge{position: absolute;right:-7px;top:-5px;font-size: 12px;}
-		.return{position: fixed;
-			right: 30px;
-			bottom: 80px;
-			background: rgba(0,0,0,.2);
-			padding: 12px;
-			border-radius: 50%;
-			text-align: center;
-			opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #1cc9f4;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px 10px 40px 10px;}
-		.lease-ul{font-size: 14px;color: #999;}
-		.lease-ul li{margin:10px 0;}
-		.lease-ul:after{display: none;}
-		.lease-left{display: inline-block;width: 20%;}
-		.ul_radio{width: 100%;}
-		.gift_radio{margin-bottom:20px;}
-		.ul_radio li{width:23%;height: 55px;margin: 10px 1%;border: 1px solid rgba(0,0,0,.1);border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.ul_radio .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.radio16{background: url(//s.iamberry.com/watero/images/rent/rent_product_img.png) center center /auto 85% no-repeat;}
-		.radio20:before,.radio21:before,.radio22:before,.radio23:before,.radio24:before,.radio25:before,.radio26:before,.radio27:before,.radio28:before{content: 'watero水杯';position: absolute;bottom: -20px;font-size: 12px;text-align: center;width: 100%;color: #999;}
-		.radio20{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio21{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio22{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio23{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio24{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio25{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio26{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio27{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio28{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio29{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio30{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio31{background: url(//s.iamberry.com/watero/images/shop/lease-zeng1.jpg) center center /auto 85% no-repeat;}
-		.radio24:before,.radio25:before,.radio26:before,.radio27:before{content: '赠品1';position: absolute;bottom: -20px;font-size: 12px;text-align: center;width: 100%;color: #999;}
-		.radio28:before,.radio29:before,.radio30:before,.radio31:before{content: '赠品2';position: absolute;bottom: -20px;font-size: 12px;text-align: center;width: 100%;color: #999;}
-		.lease-r-center{position: absolute;left: 70px;top: 20px;}
-		.lease-select-box{padding:4px 0;position: relative;}
-		.lease-select{position: absolute;left: 0;top:30px;}
-		.mui-checkbox input[type=checkbox]:checked:before, .mui-radio input[type=radio]:checked:before{color: #1cc9f4;}
-		.mui-checkbox.mui-left input[type=checkbox], .mui-radio.mui-left input[type=radio]{left: 0;}
-		.mui-checkbox.mui-left label, .mui-radio.mui-left label{padding-left: 35px;font-size: 14px;color: #999;}
-		.chanpin-ditails-dic img{width:100%;height:100%;}
-		.chanpin-ditails-dic {
-			padding: 0px;
-			background: #fff;
-			margin:0;
-			color: #444;
-		}
-		.icon-lease8{position: relative;}
-		.icon-lease8:before{position: absolute;
-			right: 0;
-			top: 2px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        //window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-
-<body>
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<div id="lease-slider" class="mui-slider">
-		<div class="mui-slider-group mui-slider-loop">
-			<!-- 额外增加的一个节点(循环轮播:第一个节点是最后一张轮播) -->
-			<div class="mui-slider-item mui-slider-item-duplicate">
-				<a>
-					<img src="//s.iamberry.com/watero/images/rent/rent_banner3.png">
-				</a>
-			</div>
-			<!-- 第一张 -->
-			<div class="mui-slider-item">
-				<a>
-					<img src="//s.iamberry.com/watero/images/rent/rent_banner1.png">
-				</a>
-			</div>
-			<!-- 第二张 -->
-			<div class="mui-slider-item">
-				<a href="#">
-					<img src="//s.iamberry.com/watero/images/rent/rent_banner2.png">
-				</a>
-			</div>
-			<!-- 第三张 -->
-			<div class="mui-slider-item">
-				<a href="#">
-					<img src="//s.iamberry.com/watero/images/rent/rent_banner3.png">
-				</a>
-			</div>
-			<!-- 额外增加的一个节点(循环轮播:最后一个节点是第一张轮播) -->
-			<div class="mui-slider-item mui-slider-item-duplicate">
-				<a href="#">
-					<img src="//s.iamberry.com/watero/images/rent/rent_banner1.png">
-				</a>
-			</div>
-		</div>
-		<div class="mui-slider-indicator">
-			<div class="mui-indicator mui-active"></div>
-			<div class="mui-indicator"></div>
-			<div class="mui-indicator"></div>
-		</div>
-	</div>
-	<ul class="mui-table-view">
-		<li class="mui-table-view-cell">
-			<span class="iconfont icon-lease3 cl-blue"></span >&nbsp;<span id="rentProductName"></span><span class="mui-pull-right cl-blue" id="btn-share-mask"><span class="iconfont icon-lease8"></span>分享</span>
-		</li>
-	</ul>
-	<div class="mui-content-madded" style="padding-bottom: 80px;">
-		<ul class="lease-ul">
-			<li>设备押金:<span class="cl-red" id="pledgeMoney"></span> (租期终止后押金退还)</li>
-			<li>年服务费:<span class="cl-red" id="serviceMoney"></span> (租期内免费更换滤芯)</li>
-		</ul>
-		<div class="lease-select-box">
-			<div class="lease-left"><span class="lease-select">选择颜色:</span></div>
-			<div style="display:inline-block;width:73%;text-align: left;">
-				<ul class="ul_radio lease-order-list" style="padding-left: 20px;">
-
-				</ul>
-			</div>
-		</div>
-		<div style="padding:0 0 10px 0;"><span>选择租期:</span></div>
-		<form class="my-input-group" id="rentType">
-
-		</form>
-		<div style="padding: 10px 0;"><span>选择赠品:</span></div>
-		<ul class="ul_radio gift_radio1" id="gift_radio1"></ul>
-		<ul class="ul_radio gift_radio2" style="display: none;" id="gift_radio2"></ul>
-		<ul class="ul_radio gift_radio3" style="display: none;" id="gift_radio3"></ul>
-		<ul class="mui-table-view lease-ul" style="margin-top: 20px;">
-			<li class="mui-table-view-cell mui-collapse">
-				<a class="mui-navigate-right" id="goProductInfo" proid="" colorid="" href="#productImage">查看产品详情</a>
-				<div class="mui-collapse-content" style="padding: 0;">
-					<div class="chanpin-ditails-dic" id="productImage" style="display: none;">
-						<ul>
-							<li>
-								<img id="product_image_info" src="">
-							</li>
-						</ul>
-					</div>
-				</div>
-			</li>
-		</ul>
-
-	</div>
-
-	<div class="buy-footer">
-		<button type="button" class="mui-btn my-btn-hand btn-pay active">我要租用</button>
-	</div>
-</div>
-<div class="return">
-	<span onClick="gotoTop();return false;" class="mui-icon-extra mui-icon-extra-top"></span>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    var productId = 0;
-    var shareOpenid = '';
-    var ruleOne = 0;
-    var ruleTwo = 0;
-    var ruleThree = 0;
-
-    mui.ready(function() {
-        document.querySelector('.loading-bg').style.display = 'none';
-        mui.ajax(base_path + '/rent_order/selectRentProduct?dates=' + new Date().getTime(), {
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.status) {
-                        var type_data = dt.data.typeList;
-                        var product_data = dt.data.rentProductList;
-                        var gift_data = dt.data.giftList;
-                        ruleOne = dt.data.ruleOne;
-                        ruleTwo = dt.data.ruleTwo;
-                        ruleThree = dt.data.ruleThree;
-                        var type_item = '';
-                        shareOpenid = dt.data.shareOpenid;
-                        var table = document.body.querySelector('.lease-order-list');
-
-                        //banner图循环播放
-                        var bannerstr = "",
-                            dian = "";
-                        dc('mui-slider-loop').innerHTML = bannerstr;
-                        dc('my-slider-indicator').innerHTML = dian;
-                        $("<div id='lease-slider' class='mui-slider'><div class='mui-slider-group mui-slider-loop' id='mui-slider-loop'>" + bannerstr + "</div><div id='my-slider-indicator' class='mui-slider-indicator my-slider-indicator'>" + dian + "</div></div>").insertBefore(".chanpin-box");
-                        dc('lease-slider').style.display = 'block';
-                        var banner = mui('#lease-slider');
-                        banner.slider({
-                            interval: 5000
-                        });
-                        mui.each(document.querySelectorAll('#lease-slider a'), function(index, el) {
-                            el.addEventListener('tap', function() {
-                                //document.querySelector('.loading-bg').style.display = 'block';
-                                var str=this.getAttribute('href');
-                                //console.log(this.getAttribute('href'));
-                                if(str!="#" && str!=''){
-                                    location.href = this.getAttribute('href')
-                                }
-                            }, false)
-                        });
-
-                        //循环显示租赁类型
-                        mui(type_data).each(function(index) {
-                            var cheType = '';
-                            //默认选中租一年的选项
-                            if (this.typeId == 1){
-                                cheType = 'checked';
-                                $('#pledgeMoney').val(this.typePledgeMoney);
-                                $('#serviceMoney').val(this.typeServiceMoney);
-                                $('#pledgeMoney').html('¥' + accDiv( this.typePledgeMoney, 100) + '/台');
-                                $('#serviceMoney').html('¥' + accDiv( this.typeServiceMoney, 100) + '/年');
-                            }
-                            type_item += '<div class="mui-input-row mui-radio mui-left">'
-                                + '<label>' + this.typeName + '<span class="cl-red"> ' + accDiv(this.typeMoney, 100) + '元</span></label>'
-                                + '<input name="radio1" value="' + this.typeId + '" rentMoney = ' + this.typeMoney + ' type="radio" ' + cheType + '>'
-                                + '</div>';
-                        });
-                        //循环显示租赁商品信息
-                        mui(product_data).each(function(index) {
-                            productName = this.productName;
-                            $('#rentProductName').html(productName);
-                            $('#product_image_info').attr('src',this.productParameterImg);
-                            var li = document.createElement('li');
-                            if(index==0){
-                                li.className ='radio'+this.colorId+' active';
-                                $('#goProductInfo').attr('proid',this.productId);
-                                $('#goProductInfo').attr('colorid',this.colorId);
-                            }else{
-                                li.className ='radio'+this.colorId;
-                            }
-                            li.setAttribute("id",this.colorId);
-                            li.setAttribute("value",this.productColor);
-                            table.appendChild(li);
-                        });
-                        $(".lease-order-list li").each(function() {
-                            $(this).on("click", function() {
-                                $(this).addClass("active");
-                                $(this).siblings().removeClass("active");
-                                var productColorId = $(".lease-order-list .active").attr("id");
-                                $('#goProductInfo').attr('colorid',productColorId);
-                            });
-                        });
-
-                        //循环显示赠品信息
-                        var gift1 = document.body.querySelector('.gift_radio1');
-                        var gift2 = document.body.querySelector('.gift_radio2');
-                        var gift3 = document.body.querySelector('.gift_radio3');
-                        mui(gift_data).each(function(index) {
-                            var li = document.createElement('li');
-                            if (this.productId == ruleOne) {
-                                if($("#gift_radio1 li").length==0){
-                                    li.className ='radio'+this.colorId+' active';
-                                }else{
-                                    li.className ='radio'+this.colorId;
-                                }
-                                li.setAttribute("id",this.colorId);
-                                gift1.appendChild(li);
-                            }
-                            if (this.productId == ruleTwo) {
-                                if($("#gift_radio2 li").length==0){
-                                    li.className ='radio'+this.colorId+' active';
-                                }else{
-                                    li.className ='radio'+this.colorId;
-                                }
-                                li.setAttribute("id",this.colorId);
-                                gift2.appendChild(li);
-                            }
-                            if (this.productId == ruleThree) {
-                                if($("#gift_radio3 li").length==0){
-                                    li.className ='radio'+this.colorId+' active';
-                                }else{
-                                    li.className ='radio'+this.colorId;
-                                }
-                                li.setAttribute("id",this.colorId);
-                                gift3.appendChild(li);
-                            }
-                        });
-                        $(".gift_radio1 li").each(function() {
-                            $(this).on("click", function() {
-                                $(this).addClass("active");
-                                $(this).siblings().removeClass("active");
-                            });
-                        });
-                        $(".gift_radio2 li").each(function() {
-                            $(this).on("click", function() {
-                                $(this).addClass("active");
-                                $(this).siblings().removeClass("active");
-                            });
-                        });
-                        $(".gift_radio3 li").each(function() {
-                            $(this).on("click", function() {
-                                $(this).addClass("active");
-                                $(this).siblings().removeClass("active");
-                            });
-                        });
-                        $('#rentType').html(type_item);
-
-                        //分享
-                        var url = "https:" + domanUrl + base_path + "/rent_order/goWantLease?shareOpenid=" + shareOpenid;
-                        window.repleFlag = false;
-                        window.wxFriend = {
-                            "appId": "",
-                            "imgUrl": domanUrl + '/watero/common/shop/images/index.jpg',
-                            "link": url,
-                            "desc": "美国标准,4级净化,5档水温,废水比3:1,水质TDS智能显示。",
-                            "title": "Watero,美国高端净水专家,4级净化,5档水温,免安装饮水一体机。",
-                            "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
-                            "shareTimeSuccess": "分享成功",
-                            "shareTimeCancel": "已取消分享",
-                            "shareAppSuccess": "分享成功!",
-                            "shareAppCancel": "已取消分享"
-                        };
-                        getConfig();
-                    } else {
-                        //mui('#pullrefresh_chanpin_list').pullRefresh().endPullupToRefresh(true);
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        })
-    });
-
-    mui('body').on('tap', '#btn-share-mask', function() {
-        mask.show();//显示遮罩
-    });
-
-    $(document).on('click', 'input[name=radio1]', function() {
-        var value = $("input[name=radio1]:checked").val(); //获取选中的值
-        switch (value) {
-            case '1':
-                $('.gift_radio1').show();
-                $('.gift_radio2').hide();
-                $('.gift_radio3').hide();
-                break;
-            case '2':
-                $('.gift_radio1').hide();
-                $('.gift_radio2').show();
-                $('.gift_radio3').hide();
-                break;
-            case '3':
-                $('.gift_radio1').hide();
-                $('.gift_radio2').hide();
-                $('.gift_radio3').show();
-                break;
-            default:
-                $('.gift_radio1').show();
-                $('.gift_radio2').hide();
-                $('.gift_radio3').hide();
-                break;
-        }
-    });
-
-    mui('body').on('tap', '#goProductInfo', function() {
-        if($("#productImage").is(":hidden")){
-            $('#productImage').show();    //如果元素为隐藏,则将它显现
-            setTimeout(function(){
-                window.scrollTo(0,580)
-            },1000)
-        }else{
-            $('#productImage').hide();     //如果元素为显现,则将其隐藏
-        }
-
-    });
-
-    mui('body').on('tap', '.btn-pay', function() {
-        var pledgeMoney = $('#pledgeMoney').val();
-        var serviceMoney = $('#serviceMoney').val();
-        var radio1 = $("input[name='radio1']:checked").val();
-        var rentMoney = $("input[name='radio1']:checked").attr("rentMoney");
-        var rentProduct = $(".lease-order-list .active").attr("id");
-        var giftId = 0;
-        var productColor = $(".lease-order-list .active").attr("value");
-        switch (radio1) {
-            case '1':
-                giftId = $(".gift_radio1 .active").attr("id");
-                break;
-            case '2':
-                giftId = $(".gift_radio2 .active").attr("id");
-                break;
-            case '3':
-                giftId = $(".gift_radio3 .active").attr("id");
-                break;
-            default:
-                giftId = $(".gift_radio1 .active").attr("id");
-                break;
-        }
-        mui.openWindow({url: encodeURI('/watero/view/i_want_lease_pay.html?pledgeMoney='+pledgeMoney+'&serviceMoney='+serviceMoney + '&radio1=' + radio1 + '&rentProduct=' + rentProduct + '&giftId=' + giftId + '&productName=' + productName + '&productColor=' + productColor + '&rentMoney=' + rentMoney) });
-    });
-    var mask = mui.createMask();//callback为用户点击蒙版时自动执行的回调;
-    $(window).on("scroll", function() {
-        if($(window).scrollTop() > 280) {
-            $(".return").show()
-        } else {
-            $(".return").hide()
-        }
-    });
-</script>
-</body>
-
-</html>

+ 0 - 117
watero-wechat-web/src/main/webapp/view/rent/iot.html

@@ -1,117 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="UTF-8">
-	<title></title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.mui-table-view .mui-table-view-cell img {
-			width: 100%;
-		}
-		li {
-			text-align: center;padding-top: 10px;
-		}
-	</style>
-</head>
-
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<header class="mui-bar mui-bar-nav header">
-	<div class="go-index go_index">
-		<img src="//s.iamberry.com/watero/images/shop/logo.png">
-	</div>
-</header>
-<div class="mui-content" style="background: #fff;">
-	<ul class="mui-table-view">
-		<li>
-			<textarea rows="5" cols="10" id="text-info"></textarea>
-		</li>
-		<li>
-			<button type="button" id="send-btn" class="mui-btn mui-btn-primary">向机器发送消息</button>
-		</li>
-		<li>
-			<button type="button" id="revc-btn" class="mui-btn mui-btn-primary">接受消息</button>
-		</li>
-		<li id="text-message"></li>
-	</ul>
-</div>
-
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/wechat_iot.js?v=6734343"></script>
-<script type="text/javascript">
-    mui.ready(function() {
-        // console.log("页面加载完毕" + base64encode("test"))
-        document.querySelector('.loading-bg').style.display = 'none';
-		/* $("#test-btn-scan").click(function(){
-		 wx.scanQRCode({
-		 needResult: 0, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
-		 scanType: ["qrCode"],
-		 success: function (res) {
-		 var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
-		 }
-		 });
-		 }); */
-        $("#revc-btn").click(function() {
-            getData();
-        });
-        $("#send-btn").click(function() {
-            //               gh_2674097b2442_5321e5d368254ac8
-            // mui.alert("data:" + $("#text-info").val());
-            sendMsgAndReceiveData("gh_2674097b2442_6d2fd2a9287de3de", ($("#text-info").val()), function(state, data) {
-                if (200 == state) {
-                    // 成功
-                    $("#text-message").append('<p>' + (data) + "</p>");
-                } else {
-                    // 失败
-                    $("#text-message").append('<p>err:' + (data) + "</p>");
-                }
-            });
-            // getData();
-        });
-
-    });
-
-    function getData() {
-        receiveData(function(res) {
-            $("#text-message").append('<p>' + base64decode(res.base64Data) + "</p>");
-        });
-    }
-
-    function test() {
-        console.log(parseInt(base64decode("EQ=="),16));
-    }
-
-    function getTicket() {
-        // , 'gh_2674097b2442_5321e5d368254ac8', 'gh_2674097b2442_27ac2c088f9c2007'
-        var ds = ['gh_2674097b2442_5321e5d368254ac8'];
-
-        for (var i = 0; i < ds.length; i ++) {
-            var d = ds[i];
-            wx.invoke('getWXDeviceTicket', {'deviceId':d,'type':'2', 'connType':'blue'}, function(res) {
-                try
-                {
-                    new Image().src = "//w.iamberry.com/watero/ticket/" + JSON.stringify(res);
-                } catch (err) {
-                }
-            });
-        }
-        mui.alert("ok");
-    }
-
-</script>
-</body>
-</html>

+ 0 - 209
watero-wechat-web/src/main/webapp/view/rent/lease_after_sales.html

@@ -1,209 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="utf-8">
-	<title>申请退货</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.return{position: fixed;
-			right: 30px;
-			bottom: 80px;
-			background: rgba(0,0,0,.2);
-			padding: 12px;
-			border-radius: 50%;
-			text-align: center;
-			opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #1cc9f4;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px 10px 40px 10px;}
-		.lease-ul{font-size: 12px;color: #999;}
-		article, section, time, aside {
-			display: block;
-		}
-		.point-time {
-			content: "";
-			position: absolute;
-			width: 12px;
-			height: 12px;
-			top: 5px;
-			left: 28%;
-			background: #1c87bf;
-			margin-left: -5px;
-			border-radius: 50%;
-		}
-
-		.text-red {
-			color: #f6393f;
-		}
-
-		.text-blue {
-			color: #1c87bf;
-		}
-		.point-blue {
-			background-color: #1cc9f4;
-		}
-		.content {
-			width: 100%;
-			margin: 0 auto;
-			padding: 10px 0;
-		}
-		.content article {
-			position: relative;
-		}
-		.content article > h3 {
-			width: 100%;
-			height: 20px;
-			line-height: 20px;
-			text-align: left;
-			text-indent: 3%;
-			font-size: 1.4em;
-			color: #fff;
-			padding: 10px 0 20px;
-			background-color: #dd6d01;
-		}
-		.content article section {
-			padding: 0 0 17px;
-			position: relative;
-		}
-		.content article section:before {
-			content: "";
-			width: 2px;
-			top: 5px;
-			bottom:-30px;
-			left: 28%;
-			background: #1cc9f4;
-			position: absolute;
-		}
-		.content article section:last-child:before {
-			display: none;
-		}
-		.content article section time {
-			width: 25%;
-			display: block;
-			position: absolute;
-		}
-		.content article section time > span {
-			display: block;
-			text-align: center;
-			margin-left: 0;
-			color: #999;
-		}
-		.content article section aside {
-			color: #3a3a38;
-			margin-left: 35%;
-			padding-bottom: 15px;
-		}
-		.content article section .brief {
-			color: #9f9f9f;
-		}
-		.content article section aside .things {
-			color: #999;margin-top: 5px;
-		}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-
-<body>
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<ul class="mui-table-view">
-		<li class="mui-table-view-cell">
-			<span class="iconfont icon-lease5 cl-blue"></span>&nbsp;返还押金
-		</li>
-	</ul>
-	<div class="mui-content-madded">
-		<ul class="lease-ul">
-			<li><span class="cl-blue">如果1、2项已经完成,只需录入物流单号申请退货即可!</span></li>
-		</ul>
-
-		<div class="content">
-			<article>
-				<section>
-					<span class="point-time point-blue"></span>
-					<time>
-						<span>第一步</span>
-					</time>
-					<aside>
-						<p class="things">
-							我已联系客服,并告 知退货原因
-						</p>
-					</aside>
-				</section>
-				<section>
-					<span class="point-time point-blue"></span>
-					<time>
-						<span>第二步</span>
-					</time>
-					<aside>
-						<p class="things">
-							我已和客服确认,并 且已经将水机寄回到 和客服联系的地址
-						</p>
-					</aside>
-				</section>
-				<section>
-					<span class="point-time point-blue"></span>
-					<time>
-						<span>第三步</span>
-					</time>
-					<aside>
-						<p class="things">
-							公司收货,客服确认 后,会将押金退还到 您支付账户
-						</p>
-						<p class="brief">
-							<span>注意:如果机器损坏 可能产生赔偿问题</span>
-						</p>
-					</aside>
-				</section>
-				<section>
-					<span class="point-time point-blue"></span>
-					<time>
-						<span>第四步</span>
-					</time>
-					<aside>
-						<p class="things">
-							押金退还以后,申请 退货完成
-						</p>
-					</aside>
-				</section>
-			</article>
-		</div>
-		<div>
-			<input type="text" class="mui-input-text" value="" placeholder="请输入物流单号">
-		</div>
-	</div>
-	<div class="buy-footer">
-		<button type="button" class="mui-btn my-btn-hand active">申请退货</button>
-	</div>
-</div>
-
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script>
-    mui.ready(function() {
-        console.log("页面加载完毕")
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-</script>
-</body>
-
-</html>

+ 0 - 169
watero-wechat-web/src/main/webapp/view/rent/lease_for_my_equipment.html

@@ -1,169 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>收到的设备</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.my-bar-nav {top: 0;-webkit-box-shadow: 0 0 0 #ccc;box-shadow: 0 0 0 #ccc;background: #fff;}
-		.my-bar-nav  .mui-btn-link{color: #1cc9f4;font-size: 14px;}
-		.mui-content>.mui-table-view:first-child {margin-top: 50px;}
-		.my-btn-bluetooth{color: #1cc9f4;padding:2px 18px;font-size: 15px;border-color: #1cc9f4;}
-		.my-table-noline:after,.my-table-noline:before,.my-table-noline li:after,.my-table-noline:before{display: none;}
-		.mui-btn-link{color: #1cc9f4;}
-		.my-btn-water-quality{padding:6px 38px;font-size: 15px;}
-		.my-btn-water-quality.active{border: 1px solid rgba(78,215,249,.5);color: #1cc9f4;}
-		.my-box-w{position: absolute;left: 50%;top: 50%;background: rgba(255,255,255,.1);width: 100px;height: 100px;border-radius: 50%;margin-left: -50px;margin-top: -60px;padding: 8px;}
-		.my-box-n{background: rgba(255,255,255,.2);position: relative;height: 100%;width: 100%;border-radius: 50%;}
-		.my-box-machine{position: absolute;left: 50%;top: 50%;width: auto;color: #fff;-webkit-transform:translateX(-50%) translateY(-20%);}
-		.machine-num{position: absolute;left: 50%;top: 50%;margin-top:40px;-webkit-transform: translateX(-50%);color: #fff;}
-		#user-head img{border:3px solid rgba(56,209,247,.5);border-radius: 50%;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content" style="background: #fff;">
-	<div style="position: relative;">
-		<img width="100%" src="//s.iamberry.com/watero/images/shop/renew_bg1.png">
-		<span class="my-box-w">
-		    	<div class="my-box-n">
-		    		<div class="my-box-machine">
-		    			<span class="iconfont icon-shebeiliebiao" style="font-size: 70px;"></span>
-		    		</div>
-		    	</div>
-		    </span>
-		<span class="machine-num">
-		    	净饮一体机
-		    </span>
-	</div>
-	<ul class="mui-table-view mui-text-center my-table-noline">
-		<li class="mui-table-view-cell" id="user-head">
-			<img id="shareHead" src="//s.iamberry.com/watero/images/shop/image-12.jpg" width="100px" />
-		</li>
-		<li class="mui-table-view-cell">
-			<span id="shareName" class="mui-h5">爱贝源</span>
-			<br/>
-			<span id="shareTime" class="mui-h6">2017-03-22 10:00:00</span>
-		</li>
-		<li class="mui-table-view-cell" id="expain">
-			<span class="mui-h5">hi,我为你准备了一台净水机</span>
-			<br/>
-			<span class="mui-h5"> 送你一份饮水健康,希望你喜欢</span>
-		</li>
-		<li class="mui-table-view-cell">
-			<span class="mui-h5">1.打开手机蓝牙,靠近设备</span>
-			<br/>
-			<span class="mui-h5">2.点击此下方“立即激活”按钮</span>
-			<br/>
-			<span class="mui-h5">3.扫描设备机身二维码激活设备</span>
-		</li>
-		<li class="mui-table-view-cell">
-			<button type="button" class="my-btn-bluetooth iconfont icon-erweima" id="toActivate">
-				立即激活
-			</button>
-		</li>
-		<li class="mui-table-view-cell">
-			<a style="text-decoration: underline;font-size: 13px;color: #999;">帮助文档</a>
-		</li>
-	</ul>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        console.log("页面加载完毕");
-        var shareId = getParam("shareId");
-        mui.ajax(base_path + '/machine/received_machine?dates=' + new Date().getTime(), {
-            data: {
-                "shareId":shareId
-            },
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.resultCode == '500'){
-                        mui.alert(dt.message);
-                        return;
-                    }
-                    var user = dt.data;
-                    if(checkStr(user.userHead)){
-                        $("#shareHead").attr("src",user.userHead);
-                    }
-                    if(checkStr(user.userName)){
-                        $("#shareName").text(decodeURI(user.userName));
-                    }
-                    if(checkStr(user.userDate)){
-                        $("#shareTime").text(user.userDate);
-                    }
-                    if(user.isUsed == '2' || dt.resultCode == '201'){
-                        $('#toActivate').hide();
-                    }
-                    if(dt.resultCode == '201'){//说明是本人进入页面
-                        if(user.isUsed == '0'){
-                            $("#expain").text("好友还未领取你送的净水机,快快提醒他哦!");
-                        }else{
-                            $("#expain").text("好友已经领取你送的净水机,并收到了你的心意!");
-                        }
-                        return;
-                    }
-                    if(dt.status) {
-                        mui.alert("领取成功!");
-                    } else {
-                        if(user.isUsed == '2' != ''){
-                            mui.alert(dt.message);
-                        }
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                mui.alert("操作有误!该机器不可分享!");
-                console.log(xhr)
-            }
-        })
-        document.querySelector('.loading-bg').style.display='none';
-    });
-
-    //激活
-    mui('body').on('tap', '#toActivate', function() {
-        wx.scanQRCode({
-            needResult: 0, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
-            scanType: ["qrCode"], // 可以指定扫二维码还是一维码,默认二者都有
-            success: function (res) {
-                //console.log("result--->" + result);
-            }
-        });
-    });
-
-    /**
-     *	校验变量是否为 undefined、null、空字符串
-     */
-    function checkStr(str){
-        if(typeof(str) != "undefined" && str != null && str != ''){
-            return true;
-        }else{
-            return false;
-        }
-    }
-</script>
-</body>
-</html>

+ 0 - 449
watero-wechat-web/src/main/webapp/view/rent/lease_order_details.html

@@ -1,449 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="utf-8">
-	<title>订单详情</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.return{position: fixed;
-			right: 30px;
-			bottom: 80px;
-			background: rgba(0,0,0,.2);
-			padding: 12px;
-			border-radius: 50%;
-			text-align: center;
-			opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #1cc9f4;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px 10px 40px 10px;}
-		.lease-ul{font-size: 12px;color: #999;}
-		.lease-left{display: inline-block;width: 25%;}
-		.ul_radio{width: 73%;display: inline-block;}
-		.ul_radio li{width:100%;height: 55px;margin: 0 1%;border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.radio-cell .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.lease-r-center{position: absolute;left: 70px;top: 20px;}
-		.lease-select-box{padding: 12px 0;position: relative;}
-		.lease-select{position: absolute;left: 0;top: 10px;}
-		.order-noline{font-size: 13px;color: #666;padding: 5px 0;background: #f8f8f8;}
-		.order-noline>li{margin:7px 0;}
-		.order-noline .mui-media{padding-left: 10px;padding-right: 10px;}
-
-		.order-noline li:after{}
-		.wh-60{width: 50px;margin-right:25px;}
-		.btn-give,.btn-activation{padding: 3px 10px; border: 0;font-size: 14px;margin-right: 10px;color: #1cc9f4;width: 90px;background-color: transparent;}
-		.btn-give:before,.btn-activation:before,.btn-tui:before,.btn-shouhou:before{font-size: 16px;}
-		.btn-tui{padding: 3px 10px;border:0;font-size: 14px;color: #1CC9F4;}
-		.btn-shouhou{padding: 3px 10px;border: 0;font-size: 14px;color: #1CC9F4;}
-		.lease-order-list li:before,.lease-order-list li:after{display: none;}
-		.lease-order-list>.mui-table-view-cell{margin:10px;background:#f8f8f8;padding: 10px;border-radius: 5px;}
-		.lease-order-list:after,.lease-order-list:before,.order-noline:after{display: none;}
-		.lease-titie{padding: 12px;font-size: 12px;color: #999;background: #fff;}
-		.ui{padding:0 0  8px 0;}
-		.line{width: 100%;height: 10px;position: relative;}
-		.line:after{content: '';position: absolute;left: 0;top: 50%;height: 1px;background: #c8c7cc;width: 100%;-webkit-transform: scaleY(.5);transform: scaleY(.5);}
-		.sp-details{border-bottom: 1px solid rgba(0,0,0,.1);    margin-bottom: 0px !important;}
-		.mui-backdrop {
-			position: fixed;
-			z-index: 998;
-			top: 0;
-			right: 0;
-			bottom: 0;
-			left: 0;
-			background:url(//s.iamberry.com/watero/images/shop/share.png) top center no-repeat rgba(0, 0, 0, .8);
-			background-size: 80%;
-		}
-		.mui-backdrop:after{content:'点键右上角分享,将水机送给好友吧。';position: absolute;left:0;top:0;width:100%; text-align: center;color:#fff;padding-top:50%;font-size:18px;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-
-<body>
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<!--下拉刷新容器-->
-	<div id="pullrefresh_lease_orderlist" class="mui-content mui-scroll-wrapper">
-		<div class="mui-scroll">
-			<!--数据列表-->
-			<div class="lease-titie" id="countOrderNum">
-				您共有0个订单
-			</div>
-			<ul class="mui-table-view lease-order-list" style="margin-top: -10px;">
-
-			</ul>
-			<!--<ul class="mui-table-view mui-grid-view my-tab-view-pull">
-
-            </ul> -->
-		</div>
-	</div>
-
-	<!--<ul class="mui-table-view lease-order-list">
-        <li class="mui-table-view-cell">
-            <span class="iconfont icon-lease3 cl-blue"></span>&nbsp;订单编号:15646231654321
-            <ul class="mui-table-view order-noline">
-                <li>订单状态:已发货<span class="mui-pull-right">已支付金额:<span class="cl-red">¥1000.00</span></span></li>
-                <li>下单时间:   2017年2月01日 10:00:12</li>
-                <li>收货人信息:何小刚   1599999999</li>
-                <li>广东省-深圳市-福田区-莲花街道深南大道特区报业大厦12B 深圳爱贝源科技有限公司</li>
-                <li>物流信息:顺丰快递 89411145413314<span class="cl-blue mui-pull-right">物流查询</span></li>
-                <li class="mui-table-view-cell mui-media">
-                    <a href="javascript:;">
-                        <img class="mui-pull-left wh-60" src="images/cp-3.jpg">
-                        <div class="mui-media-body">
-                            美国watero高端净水专家
-                            <div>
-                                服务费:¥700.00设备押金:¥300.00
-                            </div>
-                            <div>
-                                <button type="button" class="mui-btn iconfont icon-lease8 btn-give"> 送人</button><button type="button" class="mui-btn iconfont icon-erweima mui-pull-right btn-activation"> 激活</button>
-                            </div>
-                        </div>
-                    </a>
-                </li>
-                <li style="padding-top: 10px;">
-                    <button type="button" class="mui-btn iconfont icon-lease5 btn-tui"> 退押金</button><button type="button" class="mui-btn iconfont icon-lease6 mui-pull-right btn-shouhou"> 申请售后</button>
-                </li>
-            </ul>
-        </li>
-        <li class="mui-table-view-cell">
-            <span class="iconfont icon-lease3 cl-blue"></span>&nbsp;订单编号:15646231654321
-            <ul class="mui-table-view order-noline">
-                <li>订单状态:已发货<span class="mui-pull-right">已支付金额:<span class="cl-red">¥1000.00</span></span></li>
-                <li>下单时间:   2017年2月01日 10:00:12</li>
-                <li>收货人信息:何小刚   1599999999</li>
-                <li>广东省-深圳市-福田区-莲花街道深南大道特区报业大厦12B 深圳爱贝源科技有限公司</li>
-                <li>物流信息:顺丰快递 89411145413314<span class="cl-blue mui-pull-right">物流查询</span></li>
-                <li class="mui-table-view-cell mui-media">
-                    <a href="javascript:;">
-                        <img class="mui-pull-left wh-60" src="images/cp-3.jpg">
-                        <div class="mui-media-body">
-                            美国watero高端净水专家
-                            <div>
-                                服务费:¥700.00设备押金:¥300.00
-                            </div>
-                            <div>
-                                <button type="button" class="mui-btn iconfont icon-lease8 btn-give"> 送人</button><button type="button" class="mui-btn iconfont icon-erweima mui-pull-right btn-activation"> 激活</button>
-                            </div>
-                        </div>
-                    </a>
-                </li>
-                <li style="padding-top: 10px;">
-                    <button type="button" class="mui-btn iconfont icon-lease5 btn-tui"> 退押金</button><button type="button" class="mui-btn iconfont icon-lease6 mui-pull-right btn-shouhou"> 申请售后</button>
-                </li>
-            </ul>
-        </li>
-    </ul>-->
-</div>
-<div class="return">
-	<span onClick="gotoTop();return false;" class="mui-icon-extra mui-icon-extra-top"></span>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script>
-    mui.init({
-        pullRefresh: {
-            container: '#pullrefresh_lease_orderlist',
-            down: {
-                //callback: pulldownRefresh
-            },
-            up: {
-                contentrefresh: '正在加载...',
-                callback: pullupRefresh
-            }
-        }
-    });
-    var count = 0;
-    var proType=1;
-    var pageNumber = 0,pagesize = 2;
-    var rentStatus = -1;
-    var userNickName = '';
-    /**
-     * 上拉加载具体业务实现
-     */
-    function pullupRefresh() {
-        ++pageNumber;
-        mui.ajax(base_path + '/rent_order/list?dates=' + new Date().getTime(), {
-            data: {
-                "pageSize": pagesize,
-                "pageNO": pageNumber,
-                "rentStatus":rentStatus
-            },
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                }else{
-                    if(dt.status) {
-                        var order_data = dt.data.list;
-                        var countOrderNum = dt.data.countOrder;
-                        $("#countOrderNum").text("您共有" + countOrderNum + "个订单");
-
-                        mui('#pullrefresh_lease_orderlist').pullRefresh().endPullupToRefresh(order_data.length < pagesize);//参数为true代表没有更多数据了。
-                        var table = document.body.querySelector('.lease-order-list');
-                        //var cells = document.body.querySelectorAll('.lease-order-list>li');
-                        mui(order_data).each(function(index) {
-                            if(userNickName == ''){
-                                userNickName = decodeURI(this.rentUserNickName);
-                            }
-                            var li = document.createElement('li');
-                            li.className = 'mui-table-view-cell';
-                            var productItem = '',presentItem = '';
-                            var rentYears = this.typeName;
-                            var orderStatus = this.rentStatus;
-                            var rentOrderId = this.rentOrderId;
-                            mui(this.orderItemList).each(function(n) {
-                                if(this.itemProductType == 1){
-                                    var activateButton = '';
-                                    var presentButton = '';
-                                    if(orderStatus == 5 && this.itemCodeState == 1){
-                                        activateButton = '<button type="button" class="mui-btn iconfont icon-erweima mui-pull-right btn-activation toActivate" id="actIvateBtn_' + rentOrderId + '"> 激活</button>'
-                                        presentButton = '<button type="button" class="mui-btn iconfont icon-lease8 btn-give" onclick="presentOther('+ this.itemId +')" style="text-align: left;padding: 3px 10px 3px 0;"> 送人</button>'
-                                    }
-                                    productItem = '<li class="mui-table-view-cell mui-media">'
-                                        + '<a class="sp-details">'
-                                        + '<img class="mui-pull-left wh-60" src="//s.iamberry.com/watero/images/cp-1.jpg">'
-                                        + '<div class="mui-media-body">' + this.itemProductName
-                                        + activateButton
-                                        + '<div style="height:30px;">租期:<span>' + rentYears + '</span>'
-                                        + '</div>'
-                                        + '<div>'
-                                        + '<button type="button" class="mui-btn iconfont icon-lease6 mui-pull-right btn-activation afterSale" id="'+rentOrderId+'" name="'+this.itemId+'" postStatus="'+orderStatus+'"> 售后</button>'
-                                        +  presentButton
-                                        + '</div>'
-                                        + '</div>'
-                                        + '</a>'
-                                        + '</li>';
-                                }else if(this.itemProductType == 5){
-                                    presentItem = '<li>精美礼品:' + this.itemProductName + '</li>';
-                                }
-                            });
-                            var postInfo = '';
-                            if(typeof(this.rentPostFirm) != 'undefined' && this.rentPostFirm != ''
-                                && typeof(this.rentPostNum) != 'undefined' && this.rentPostNum != ''){
-                                postInfo = '<li>物流信息:' + getPostFirm(this.rentPostFirm) + ' ' + this.rentPostNum
-                                    + '<span class="cl-blue mui-pull-right show_post_info" postNum="' + this.rentPostNum + '">'
-                                    + '物流查询</span>'
-                                    +'</li>'
-                            }
-                            li.innerHTML = '<div class="ui">'
-                                + '<span class="iconfont icon-lease3 cl-blue"></span>'
-                                + '&nbsp;订单编号:' + this.rentOrderId
-                                + '</div>'
-                                + '<ul class="mui-table-view order-noline">'
-                                + '<li>订单状态:' + getOrderStatus(this.rentStatus) + '<span class="mui-pull-right">订单合计:<span class="cl-red">¥' + accDiv(this.rentAmount,100) + '</span>元</span></li>'
-                                + '<li>抵扣金额:<span class="cl-red">¥' + accDiv(this.rentServiceMoney,100) + '</span>元<span class="mui-pull-right">支付金额:<span class="cl-red">¥' + accDiv(this.rentPayMoney,100) + '</span>元</span></li>'
-                                + '<li>订单时间:   ' + this.rentCreateDate + '</li>'
-                                + '<div class="line"></div><li>收货信息:</li>'
-                                + '<li>' + this.rentAddressName + '   ' + this.rentAddressTel + '</li>'
-                                + '<li>' + this.rentAddressInfo + '</li>'
-                                + postInfo
-                                + productItem
-                                + presentItem
-                                + '</ul>';
-                            table.appendChild(li);
-                            //激活
-                            $(".toActivate").each(function() {
-                                $('#actIvateBtn_' + rentOrderId).on("click", function() {
-                                    wx.scanQRCode({
-                                        needResult: 0, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
-                                        scanType: ["qrCode"], // 可以指定扫二维码还是一维码,默认二者都有
-                                        success: function (res) {
-                                            //console.log("result--->" + result);
-                                        }
-                                    });
-                                });
-                            });
-                        })
-                    } else {
-                        mui.alert("暂未查询到租用订单!请稍后重试!");
-                        mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-                mui.alert("查询租用订单出错!请稍后重试!");
-                mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
-            }
-        })
-    }
-    mui.ready(function() {
-        //console.log("页面加载完毕");
-        rentStatus = getParam("rentStatus") == null ? '' : getParam("rentStatus");
-        mui('#pullrefresh_lease_orderlist').pullRefresh().pullupLoading();
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-    $(window).on("scroll", function() {
-        if ($(window).scrollTop() > 120) {
-            $(".return").show();
-        } else {
-            $(".return").hide();
-        }
-    });
-    $(".ul_radio li").each(function() {
-        $(this).on("click", function() {
-            $(this).addClass("active");
-            $(this).siblings().removeClass("active");
-        });
-    });
-    function presentOther(itemId){
-        mui.ajax(base_path + '/machine/present_other?dates=' + new Date().getTime(), {
-            data: {
-                "orderItemId":itemId
-            },
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.status) {
-                    mask.show();//显示遮罩
-                    var url = encodeURI('https://' + window.location.host+'/watero/view/rent/lease_for_my_equipment.html?shareId=' + dt.data);
-                    var desc = userNickName + "送给你一台净水机,为你送上一份饮水健康。";
-                    window.repleFlag = false;
-                    window.hiddenAllWechatMenu = false;		//window.wxFriend window.repleWxData
-                    window.wxFriend = {
-                        "appId": "",
-                        "imgUrl": '//s.iamberry.com/watero/images/shop/share-lease.png',
-                        "link": url,
-                        "desc": desc,
-                        "title": "给你送净水机了,快来领取吧!",
-                        "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
-                        "shareTimeSuccess": "分享成功",
-                        "shareTimeCancel": "已取消分享",
-                        "shareAppSuccess": "分享成功!",
-                        "shareAppCancel": "已取消分享"
-                    };
-                    getConfig();
-                } else {
-                    mui.alert(dt.message);
-                    //mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                mui.alert("操作有误!该机器不可分享!");
-                console.log(xhr)
-            }
-        })
-    }
-
-    //售后
-    mui('body').on('tap', '.afterSale', function() {
-		/*			mui.alert("请在公众号聊天窗口发送您的问题!");*/
-        var th=this;
-        mui.openWindow({
-            url: '/watero/view/order_service.html?orderId='+th.getAttribute("id")+'&itemId='+th.getAttribute("name")+'&postStatus='+th.getAttribute("postStatus")
-        });
-    });
-
-    var mask = mui.createMask();//callback为用户点击蒙版时自动执行的回调;
-    //mask.close();//关闭遮罩
-    function getOrderStatus(status){
-        switch (status){
-            case 0:
-                return '取消订单';
-            case 1:
-                return '待支付';
-            case 2:
-                return '待发货';
-            case 3:
-                return '退款申请中';
-            case 4:
-                return '已退款';
-            case 5:
-                return '已发货';
-            case 6:
-                return '申请退货中';
-            case 7:
-                return '退货中';
-            case 8:
-                return '退货成功';
-            case 9:
-                return '换货中';
-            case 10:
-                return '换货完成';
-            case 11:
-                return '申请换货中';
-            default:
-                break;
-        }
-    }
-
-    function getPostFirm(firmCode){
-        switch(firmCode){
-            case 'sto':
-                return '申通快递';
-                break;
-            case 'yto':
-                return '圆通快递';
-                break;
-            case 'sf':
-                return '顺丰快递';
-                break;
-            case 'ems':
-                return '邮政EMS';
-                break;
-            case 'zto':
-                return '中通快递';
-                break;
-            case 'zjs':
-                return '宅急送';
-                break;
-            case 'yunda':
-                return '韵达快递';
-                break;
-            case 'cces':
-                return 'cces快递';
-                break;
-            case 'pick':
-                return '上门提货';
-                break;
-            case 'htky':
-                return '汇通快递';
-                break;
-            case 'ttkdex':
-                return '天天快递';
-                break;
-            case 'stars':
-                return '星晨急便';
-                break;
-            case 'jd':
-                return '京东快递';
-                break;
-            case '01':
-                return '其他';
-                break;
-            case '02':
-                return '上门送货';
-                break;
-            case 'dbkd':
-                return '德邦快递';
-                break;
-        }
-    }
-</script>
-</body>
-
-</html>

+ 0 - 696
watero-wechat-web/src/main/webapp/view/rent/my_equipment.html

@@ -1,696 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>我的设备</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		.my-bar-nav {top: 0;-webkit-box-shadow: 0 0 0 #ccc;box-shadow: 0 0 0 #ccc;background: #fff;}
-		.my-bar-nav  .mui-btn-link{color: #1cc9f4;font-size: 14px;}
-		.mui-content>.mui-table-view:first-child {margin-top: 50px;}
-		.my-btn-bluetooth{color: #1cc9f4;padding:2px 18px;font-size: 15px;border-color: #1cc9f4;}
-		.my-table-noline:after,.my-table-noline:before,.my-table-noline li:after,.my-table-noline:before{display: none;}
-		.mui-btn-link{color: #1cc9f4;}
-		.mui-btn-link.active{color:#999;}
-		.my-btn-water-quality{padding:6px 38px;font-size: 15px;}
-		.my-btn-water-quality.active{border: 1px solid rgba(78,215,249,.5);color: #1cc9f4;}
-		.off_none{position: fixed;left: 0;right: 0;bottom: 0;top: 0;width: 100%;background: #fff;z-index: 99;text-align: center;padding-top: 35%;display:none;}
-		.off_none .iconfont{font-size:80px;color:#ccc;}
-		.off_none>div{padding-top:15px;}
-		.off_none a{color:#1cc9f4;text-decoration: underline;}
-		.number{position: absolute;bottom: 45px;width: 100%;text-align: center;left: 0;color:#fff;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg" id="loadingbg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<header id="header" class="mui-bar my-bar-nav">
-	<button class="mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left" id="btn_map"><span class="mui-icon mui-icon-location"></span>水质地图</button>
-	<button id="filterElement" class="mui-btn mui-btn-blue mui-btn-link mui-pull-right" onclick="functional();" style="display: none;">免费换滤芯</button>
-</header>
-<div class="mui-content" style="background: #fff;">
-	<ul class="mui-table-view mui-text-center my-table-noline">
-		<li class="mui-table-view-cell">
-			<span class="mui-h6" id="dudToTime">2017年3月12日到期</span>
-			<div><a class="mui-btn mui-btn-link" onclick="continueRenting();">我要续租</a></div>
-		</li>
-		<li class="mui-table-view-cell">
-			<img id="my_equipment" src="//s.iamberry.com/watero/images/shop/my_equipment1.png" width="170px" />
-			<div class="number" id="equipmentIdId">No:</div>
-		</li>
-		<li class="mui-table-view-cell" id="liclass">
-			<button type="button" class="my-btn-bluetooth iconfont icon-lease10" onclick="openScanning();">
-				连接
-			</button>
-		</li>
-		<li class="mui-table-view-cell" id="liclass2">
-			总净饮水量:0l
-			<br/>
-			<span class="mui-h6">约相当于0桶传统18.9L的桶装水</span>
-		</li>
-		<li class="mui-table-view-cell" id="liclass3">
-			<span class="mui-h5">我家水质(tds):未知 ppm</span>
-		</li>
-		<li class="mui-table-view-cell">
-			<button type="button" class="my-btn-water-quality active">
-				比拼水质
-			</button>
-		</li>
-		<li class="mui-table-view-cell">
-			<input type="hidden" value="" id="switchingEquipment">
-			<input type="hidden" value="" id="machineId">
-			<a style="text-decoration: underline;font-size: 13px;color: #999;" id="switching">切换设备</a>
-		</li>
-	</ul>
-	<div class="off_none">
-		<span class="iconfont icon-shebeiliebiao"></span>
-		<div>还没有机器?<a id="toActivate" href="" onclick="openScanning();">立即连接</a></div>
-		<ul style="text-align: left;padding: 10% 0 0 10%;font-size: 13px;">
-			<li>   第一步: 打开手机蓝牙,给净水机通电</li>
-			<li>  第二步:靠近设备,点击“立即连接”</li>
-			<li>  第三步:扫描设备上的二维码进行设备绑定</li>
-			<li>   第四步:点击微信菜单“我的设备”进入设备信息页面 </li>
-		</ul>
-	</div>
-</div>
-
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/wechat_iot.js?v=6734343"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script type="text/javascript">
-    var data = null;
-    var datalength = null;
-    var machineState = null
-    var machineDeviceId = null;
-    var info = null;
-    function pullupRefresh() {
-        mui.ajax(base_path + '/wechat/machine/machine_info?dates=' + new Date().getTime(), {
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                console.log(dt);
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                } else {
-                    if(dt.status) {
-                        data = dt.data;//赋值到全局变量
-                        datalength = dt.data.length;
-                        var renewal_data = [];
-                        renewal_data = dt.data;
-                        var table = document.body.querySelector('.liclass');
-                        info = renewal_data[0];
-                        //未初始化硬件
-                        if(!isInitialize){
-                            mui.ajax(base_path + '/wechat/machine/updateByDeviceId?dates=' + new Date().getTime(), {
-                                data: {
-                                    state: 2,
-                                    deviceId: info.machineDeviceId
-                                },
-                                dataType: 'json',
-                                type: 'post',
-                                timeout: 15000,
-                                success: function(dt) {
-                                    if(dt.status) {
-                                        mui.ajax(base_path + '/wechat/machine/select_machineByDeviceId?dates=' + new Date().getTime(), {
-                                            data: {
-                                                deviceId: info.machineDeviceId
-                                            },
-                                            dataType: 'json',
-                                            type: 'post',
-                                            timeout: 15000,
-                                            success: function(dt) {
-                                                if(dt.status) {
-                                                    info = dt.data;
-                                                    isDueTo(info.machineStopDate,info.machineSurplusWater);
-                                                    //给页面填值
-                                                    $("#equipmentIdId").text("设备编号:"+(10000+info.machineId));
-                                                    $("#dudToTime").text(""+format(info.machineStopDate)+"到期");
-                                                    if(info.machineConnectState == "1"){
-                                                        $("#liclass").html('<span style="color:#1cc9f4;">已连接</span>');
-                                                        $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment.png");
-                                                    }else{
-                                                        $("#liclass").html('<button type="button" class="my-btn-bluetooth iconfont icon-lease10" onclick="openScanning();">连接</button>');
-                                                        $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment1.png");
-                                                    }
-                                                    var count = info.machineHaveWater/18.9;
-                                                    $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/>');
-                                                    if(info.machineHaveWater >= 18.9){
-                                                        $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/><span class="mui-h6">约相当于'+parseInt(count)+'桶传统18.9L的桶装水</span>');
-                                                    }
-                                                    if(info.machineTDS ==  0){
-                                                        $("#liclass3").html('<span class="mui-h5">我家水质(tds):未知 ppm</span> ');
-                                                    }else{
-                                                        $("#liclass3").html('<span class="mui-h5">我家水质(tds):'+info.machineTDS+'ppm</span> ');
-                                                    }
-
-                                                    $("#switchingEquipment").val("0");
-                                                    $("#machineId").val(info.machineId);
-                                                    document.querySelector('.loading-bg').style.display = 'none';
-                                                    machineState = info.machineConnectState;
-                                                    machineDeviceId = info.machineDeviceId;
-                                                }
-                                            },
-                                            error: function(xhr, type, errorThrown) {
-                                                console.log(xhr)
-                                                document.querySelector('.loading-bg').style.display = 'none';
-                                            }
-                                        })
-                                    }
-                                },
-                                error: function(xhr, type, errorThrown) {
-                                    console.log(xhr)
-                                    document.querySelector('.loading-bg').style.display = 'none';
-                                }
-                            })
-                        }
-                        //发送消息到设备,同步数据
-                        sendMsgAndReceiveData(info.machineDeviceId,"*getData#",function(state,res){
-                            if(200 == state){
-                                var arr = res.split(" ");
-                                //根据设备id查询数据库并更新当前页面设备
-                                mui.ajax(base_path + '/wechat/machine/sync_machine?dates=' + new Date().getTime(), {
-                                    data: {
-                                        tds: arr[0],
-                                        water_num: arr[1],
-                                        deviceId: info.machineDeviceId,
-                                        state: 1
-                                    },
-                                    dataType: 'json',
-                                    type: 'post',
-                                    timeout: 15000,
-                                    success: function(dt) {
-                                        if(dt.returnCode == "200") {
-                                            mui.ajax(base_path + '/wechat/machine/select_machineByDeviceId?dates=' + new Date().getTime(), {
-                                                data: {
-                                                    deviceId: info.machineDeviceId
-                                                },
-                                                dataType: 'json',
-                                                type: 'post',
-                                                timeout: 15000,
-                                                success: function(dt) {
-                                                    if(dt.status) {
-                                                        info = dt.data;
-                                                        isDueTo(info.machineStopDate,info.machineSurplusWater);
-                                                        //给页面填值
-                                                        $("#equipmentIdId").text("设备编号:"+(10000+info.machineId));
-                                                        $("#dudToTime").text(""+format(info.machineStopDate)+"到期");
-                                                        if(info.machineConnectState == "1"){
-                                                            $("#liclass").html('<span style="color:#1cc9f4;">已连接</span>');
-                                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment.png");
-                                                        }else{
-                                                            $("#liclass").html('<button type="button" class="my-btn-bluetooth iconfont icon-lease10" onclick="openScanning();">连接</button>');
-                                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment1.png");
-                                                        }
-                                                        var count = info.machineHaveWater/18.9;
-                                                        $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/>');
-                                                        if(info.machineHaveWater >= 18.9){
-                                                            $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/><span class="mui-h6">约相当于'+parseInt(count)+'桶传统18.9L的桶装水</span>');
-                                                        }
-                                                        if(info.machineTDS ==  0){
-                                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):未知 ppm</span> ');
-                                                        }else{
-                                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):'+info.machineTDS+'ppm</span> ');
-                                                        }
-
-                                                        $("#switchingEquipment").val("0");
-                                                        $("#machineId").val(info.machineId);
-                                                        document.querySelector('.loading-bg').style.display = 'none';
-                                                        machineState = info.machineConnectState;
-                                                        machineDeviceId = info.machineDeviceId;
-                                                    }
-                                                },
-                                                error: function(xhr, type, errorThrown) {
-                                                    console.log(xhr)
-                                                    document.querySelector('.loading-bg').style.display = 'none';
-                                                }
-                                            })
-                                        }else{
-                                            isDueTo(info.machineStopDate,info.machineSurplusWater);
-                                            //给页面填值
-                                            $("#equipmentIdId").text("设备编号:"+(10000+info.machineId));
-                                            $("#dudToTime").text(""+format(info.machineStopDate)+"到期");
-                                            if(info.machineConnectState == "1"){
-                                                $("#liclass").html('<span style="color:#1cc9f4;">已连接</span>');
-                                                $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment.png");
-                                            }else{
-                                                $("#liclass").html('<button type="button" class="my-btn-bluetooth iconfont icon-lease10" onclick="openScanning();">连接</button>');
-                                                $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment1.png");
-                                            }
-                                            var count = info.machineHaveWater/18.9;
-                                            $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/>');
-                                            if(info.machineHaveWater >= 18.9){
-                                                $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/><span class="mui-h6">约相当于'+parseInt(count)+'桶传统18.9L的桶装水</span>');
-                                            }
-                                            if(info.machineTDS ==  0){
-                                                $("#liclass3").html('<span class="mui-h5">我家水质(tds):未知 ppm</span> ');
-                                            }else{
-                                                $("#liclass3").html('<span class="mui-h5">我家水质(tds):'+info.machineTDS+'ppm</span> ');
-                                            }
-
-                                            $("#switchingEquipment").val("0");
-                                            $("#machineId").val(info.machineId);
-                                            document.querySelector('.loading-bg').style.display = 'none';
-                                            machineState = info.machineConnectState;
-                                            machineDeviceId = info.machineDeviceId;
-                                        }
-                                    },
-                                    error: function(xhr, type, errorThrown) {
-                                        console.log(xhr)
-                                        document.querySelector('.loading-bg').style.display = 'none';
-                                    }
-                                })
-                            }
-                            if(500 == state){
-                                //根据设备id查询数据库并更新当前页面设备
-                                mui.ajax(base_path + '/wechat/machine/updateByDeviceId?dates=' + new Date().getTime(), {
-                                    data: {
-                                        state: 2,
-                                        deviceId: info.machineDeviceId
-                                    },
-                                    dataType: 'json',
-                                    type: 'post',
-                                    timeout: 15000,
-                                    success: function(dt) {
-                                        if(dt.status) {
-                                            mui.ajax(base_path + '/wechat/machine/select_machineByDeviceId?dates=' + new Date().getTime(), {
-                                                data: {
-                                                    deviceId: info.machineDeviceId
-                                                },
-                                                dataType: 'json',
-                                                type: 'post',
-                                                timeout: 15000,
-                                                success: function(dt) {
-                                                    if(dt.status) {
-                                                        info = dt.data;
-                                                        isDueTo(info.machineStopDate,info.machineSurplusWater);
-                                                        //给页面填值
-                                                        $("#equipmentIdId").text("设备编号:"+(10000+info.machineId));
-                                                        $("#dudToTime").text(""+format(info.machineStopDate)+"到期");
-                                                        if(info.machineConnectState == "1"){
-                                                            $("#liclass").html('<span style="color:#1cc9f4;">已连接</span>');
-                                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment.png");
-                                                        }else{
-                                                            $("#liclass").html('<button type="button" class="my-btn-bluetooth iconfont icon-lease10" onclick="openScanning();">连接</button>');
-                                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment1.png");
-                                                        }
-                                                        var count = info.machineHaveWater/18.9;
-                                                        $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/>');
-                                                        if(info.machineHaveWater >= 18.9){
-                                                            $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/><span class="mui-h6">约相当于'+parseInt(count)+'桶传统18.9L的桶装水</span>');
-                                                        }
-                                                        if(info.machineTDS ==  0){
-                                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):未知 ppm</span> ');
-                                                        }else{
-                                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):'+info.machineTDS+'ppm</span> ');
-                                                        }
-
-                                                        $("#switchingEquipment").val("0");
-                                                        $("#machineId").val(info.machineId);
-                                                        document.querySelector('.loading-bg').style.display = 'none';
-                                                        machineState = info.machineConnectState;
-                                                        machineDeviceId = info.machineDeviceId;
-                                                    }
-                                                },
-                                                error: function(xhr, type, errorThrown) {
-                                                    console.log(xhr)
-                                                    document.querySelector('.loading-bg').style.display = 'none';
-                                                }
-                                            })
-                                        }
-                                    },
-                                    error: function(xhr, type, errorThrown) {
-                                        console.log(xhr)
-                                        document.querySelector('.loading-bg').style.display = 'none';
-                                    }
-                                })
-                            }
-                        });
-                    }else{
-                        $(".off_none").show();
-                        document.querySelector('.loading-bg').style.display = 'none';
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-                document.querySelector('.loading-bg').style.display = 'none';
-            }
-        })
-    }
-    mui.ready(function(){
-        setTimeout("myInterval()",2000);
-    });
-    function myInterval()
-    {
-        pullupRefresh();
-    }
-    //切换设备
-
-    mui('body').on('tap', '#switching', function() {
-        if(datalength <= 1){
-            mui.alert("当前只检测到一台设备,如有疑问,请咨询公众号客服!");
-            return;
-        }
-        document.querySelector('.loading-bg').style.display='block';
-        var num = $("#switchingEquipment").val();
-        if(num*1+1 >= datalength){
-            num = 0;
-            info = data[num];
-            $("#switchingEquipment").val(num);
-        }else{
-            info = data[num*1+1];
-            $("#switchingEquipment").val(num*1+1);
-        }
-        //发送消息到设备,同步数据
-        sendMsgAndReceiveData(info.machineDeviceId,"*getData#",function(state,res){
-            if(200 == state){
-                var arr = res.split(" ");
-                //根据设备id查询数据库并更新当前页面设备
-                mui.ajax(base_path + '/wechat/machine/sync_machine?dates=' + new Date().getTime(), {
-                    data: {
-                        tds: arr[0],
-                        water_num: arr[1],
-                        deviceId: info.machineDeviceId,
-                        state: 1
-                    },
-                    dataType: 'json',
-                    type: 'post',
-                    timeout: 15000,
-                    success: function(dt) {
-                        if(dt.returnCode == "200") {
-                            mui.ajax(base_path + '/wechat/machine/select_machineByDeviceId?dates=' + new Date().getTime(), {
-                                data: {
-                                    deviceId: info.machineDeviceId
-                                },
-                                dataType: 'json',
-                                type: 'post',
-                                timeout: 15000,
-                                success: function(dt) {
-                                    if(dt.status) {
-                                        info = dt.data;
-                                        isDueTo(info.machineStopDate,info.machineSurplusWater);
-                                        $("#equipmentIdId").text("设备编号:"+(10000+info.machineId));
-                                        $("#dudToTime").text(format(info.machineStopDate)+"到期");
-                                        if(info.machineConnectState == "1"){
-                                            $("#liclass").html('<span style="color:#1cc9f4;">已连接</span>');
-                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment.png");
-                                        }else{
-                                            $("#liclass").html('<button type="button" class="my-btn-bluetooth iconfont icon-lease10" onclick="openScanning();">连接</button>');
-                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment1.png");
-                                        }
-                                        var count = info.machineHaveWater/18.9;
-                                        $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/>');
-                                        if(info.machineHaveWater >= 18.9){
-                                            $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/><span class="mui-h6">约相当于'+parseInt(count)+'桶传统18.9L的桶装水</span>');
-                                        }
-                                        if(info.machineTDS ==  0){
-                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):未知 ppm</span> ');
-                                        }else{
-                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):'+info.machineTDS+'ppm</span> ');
-                                        }
-
-                                        $("#machineId").val(info.machineId);
-                                        document.querySelector('.loading-bg').style.display='none';
-                                        machineState = info.machineConnectState;
-                                        machineDeviceId = info.machineDeviceId;
-                                    }
-                                },
-                                error: function(xhr, type, errorThrown) {
-                                    console.log(xhr)
-                                    document.querySelector('.loading-bg').style.display = 'none';
-                                }
-                            })
-                        }else{
-                            //给页面填值
-                            isDueTo(info.machineStopDate,info.machineSurplusWater);
-                            $("#equipmentIdId").text("设备编号:"+(10000+info.machineId));
-                            $("#dudToTime").text(""+format(info.machineStopDate)+"到期");
-                            if(info.machineConnectState == "1"){
-                                $("#liclass").html('<span style="color:#1cc9f4;">已连接</span>');
-                                $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment.png");
-                            }else{
-                                $("#liclass").html('<button type="button" class="my-btn-bluetooth iconfont icon-lease10" onclick="openScanning();">连接</button>');
-                                $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment1.png");
-                            }
-                            var count = info.machineHaveWater/18.9;
-                            $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/>');
-                            if(info.machineHaveWater >= 18.9){
-                                $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/><span class="mui-h6">约相当于'+parseInt(count)+'桶传统18.9L的桶装水</span>');
-                            }
-                            if(info.machineTDS ==  0){
-                                $("#liclass3").html('<span class="mui-h5">我家水质(tds):未知 ppm</span> ');
-                            }else{
-                                $("#liclass3").html('<span class="mui-h5">我家水质(tds):'+info.machineTDS+'ppm</span> ');
-                            }
-
-                            $("#switchingEquipment").val("0");
-                            $("#machineId").val(info.machineId);
-                            document.querySelector('.loading-bg').style.display = 'none';
-                            machineState = info.machineConnectState;
-                            machineDeviceId = info.machineDeviceId;
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        console.log(xhr)
-                        document.querySelector('.loading-bg').style.display = 'none';
-                    }
-                })
-            }
-            if(500 == state){
-                //根据设备id查询数据库并更新当前页面设备
-                mui.ajax(base_path + '/wechat/machine/updateByDeviceId?dates=' + new Date().getTime(), {
-                    data: {
-                        state: 2,
-                        deviceId: info.machineDeviceId
-                    },
-                    dataType: 'json',
-                    type: 'post',
-                    timeout: 15000,
-                    success: function(dt) {
-                        if(dt.status) {
-                            mui.ajax(base_path + '/wechat/machine/select_machineByDeviceId?dates=' + new Date().getTime(), {
-                                data: {
-                                    deviceId: info.machineDeviceId
-                                },
-                                dataType: 'json',
-                                type: 'post',
-                                timeout: 15000,
-                                success: function(dt) {
-                                    if(dt.status) {
-                                        info = dt.data;
-                                        isDueTo(info.machineStopDate,info.machineSurplusWater);
-                                        //给页面填值
-                                        $("#equipmentIdId").text("设备编号:"+(10000+info.machineId));
-                                        $("#dudToTime").text(format(info.machineStopDate)+"到期");
-                                        if(info.machineConnectState == "1"){
-                                            $("#liclass").html('<span style="color:#1cc9f4;">已连接</span>');
-                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment.png");
-                                        }else{
-                                            $("#liclass").html('<button type="button" class="my-btn-bluetooth iconfont icon-lease10" onclick="openScanning();">连接</button>');
-                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment1.png");
-                                        }
-                                        var count = info.machineHaveWater/18.9;
-                                        $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/>');
-                                        if(info.machineHaveWater >= 18.9){
-                                            $("#liclass2").html('总净饮水量:'+info.machineHaveWater+'L<br/><span class="mui-h6">约相当于'+parseInt(count)+'桶传统18.9L的桶装水</span>');
-                                        }
-                                        if(info.machineTDS ==  0){
-                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):未知 ppm</span> ');
-                                        }else{
-                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):'+info.machineTDS+'ppm</span> ');
-                                        }
-
-                                        $("#machineId").val(info.machineId);
-                                        document.querySelector('.loading-bg').style.display='none';
-                                        machineState = info.machineConnectState;
-                                        machineDeviceId = info.machineDeviceId;
-                                    }
-                                },
-                                error: function(xhr, type, errorThrown) {
-                                    console.log(xhr)
-                                    document.querySelector('.loading-bg').style.display = 'none';
-                                }
-                            })
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        console.log(xhr)
-                        document.querySelector('.loading-bg').style.display = 'none';
-                    }
-                })
-            }
-        });
-
-    });
-    function   format(now)   {
-        now = now.replace(new RegExp("-","gm"),"/");
-        var nowHaoMiao = (new Date(now)).getTime();
-        now = new Date(nowHaoMiao);
-        var   year=now.getFullYear();
-        var   month=now.getMonth()+1;
-        var   date=now.getDate();
-        var   hour=now.getHours();
-        var   minute=now.getMinutes();
-        var   second=now.getSeconds();
-        return   year+"年"+month+"月"+date+"日";
-    }
-
-    base_path = "/watero";
-    function continueRenting(){
-        if(machineState == 1){
-            var machineId = $("#machineId").val();//#gotopagenum是文本框的id属性  
-            location.href = base_path + '/view/i_want_to_renew.html?machineId='+machineId;
-        }else{
-            mui.alert("请保持机器在线后,再进行续租操作!");
-        }
-
-    }
-
-    //激活
-    function openScanning() {
-        //发送消息到设备,同步数据
-        if(!isInitialize){
-            //初始化硬件库
-            getConfig();
-        }else{
-            sendMsgAndReceiveData(machineDeviceId,"*getData#",function(state,res){
-                if(200 == state){
-                    var arr = res.split(" ");
-                    //根据设备id查询数据库并更新当前页面设备
-                    mui.ajax(base_path + '/wechat/machine/sync_machine?dates=' + new Date().getTime(), {
-                        data: {
-                            tds: arr[0],
-                            water_num: arr[1],
-                            deviceId: info.machineDeviceId,
-                            state: 1
-                        },
-                        dataType: 'json',
-                        type: 'post',
-                        timeout: 15000,
-                        success: function(dt) {
-                            if(dt.returnCode == "200") {
-                                mui.ajax(base_path + '/wechat/machine/select_machineByDeviceId?dates=' + new Date().getTime(), {
-                                    data: {
-                                        deviceId: info.machineDeviceId
-                                    },
-                                    dataType: 'json',
-                                    type: 'post',
-                                    timeout: 15000,
-                                    success: function(dt) {
-                                        if(dt.status) {
-                                            var arr = res.split(" ");
-                                            isDueTo(info.machineStopDate,info.machineTotalWater  - arr[1]);
-                                            $("#liclass").html('<span style="color:#1cc9f4;">已连接</span>');
-                                            $("#my_equipment").prop("src","//s.iamberry.com/watero/images/shop/my_equipment.png");
-
-                                            var count = arr[1]/18.9;
-                                            $("#liclass2").html('总净饮水量:'+arr[1]+'L<br/>');
-                                            if(info.machineHaveWater >= 18.9){
-                                                $("#liclass2").html('<span class="mui-h6">约相当于'+parseInt(count)+'桶传统18.9L的桶装水</span>');
-                                            }
-                                            $("#liclass3").html('<span class="mui-h5">我家水质(tds):'+arr[0]+'ppm</span> ');
-                                            machineState = 1;
-                                        }
-                                    },
-                                    error: function(xhr, type, errorThrown) {
-                                        console.log(xhr)
-                                        document.querySelector('.loading-bg').style.display = 'none';
-                                    }
-                                })
-                            }
-                        },
-                        error: function(xhr, type, errorThrown) {
-                            console.log(xhr)
-                            document.querySelector('.loading-bg').style.display = 'none';
-                        }
-                    })
-                }else{
-                    mui.alert("请确保设备已通电、手机蓝牙打开,并且让手机靠近设备后,重试");
-                }
-            })
-        }
-
-
-    };
-    var t1='',t2='',t3='',t4='';
-    function isDueTo(dueToDate,Water){
-        sendMsgAndReceiveData(info.machineDeviceId,"*isUse#",function(state,res){
-            if(200 == state){
-                mui.ajax(base_path + '/wechat/machine/check_change_filter?dates=' + new Date().getTime(), {
-                    data: {
-                        filterT1: res.substring(0,1),
-                        filterT2: res.substring(1,2),
-                        filterT3: res.substring(2,3),
-                        filterT4: res.substring(3,4),
-                        deviceId: info.machineDeviceId
-                    },
-                    dataType: 'json',
-                    type: 'post',
-                    timeout: 15000,
-                    success: function(dt) {
-                        if(dt.status) {
-                            var filters = dt.data;
-                            t1=filters.T1;
-                            t2= filters.T2;
-                            t3= filters.T3;
-                            t4=filters.T4;
-                            if(filters.T1 == 1 || filters.T2 == 1 || filters.T3 == 1 || filters.T4 == 1){
-                                document.getElementById("filterElement").style.display = "block";
-                            }
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        console.log(xhr)
-                        document.querySelector('.loading-bg').style.display = 'none';
-                    }
-                })
-            }
-        })
-
-        dueToDate = dueToDate.replace(new RegExp("-","gm"),"/");
-        dueToDate = (new Date(dueToDate)).getTime();
-        remainingTime = dueToDate - new Date().getTime();
-        var days = remainingTime /1000/60/60/24;
-        if(days <= 30){
-			/*document.getElementById("filterElement").style.display = "block"; */
-            document.getElementById("dudToTime").style.color = "#ff0000";
-            mui.alert("您的设备剩余使用时间或水量不足,请尽快续费以免影响您的正常使用");
-        }
-
-    }
-
-    function functional(){
-        if(t1!='' && t2!='' && t3!='' && t4!=''){
-            mui.openWindow({
-                url: '/watero/view/replace_free_filter.html?t1='+t1+'&t2='+t2+'&t3='+t3+'&t4='+t4+'&deviceId='+machineDeviceId
-            });
-        }else{
-            mui.alert('获取滤芯状态失败,请联系客服!')
-        }
-    }
-    mui('body').on('tap', '.my-btn-water-quality', function() {
-        location.href='/watero/view/water_competition_for_me.html?deviceId='+info.machineDeviceId;
-    });
-    mui('body').on('tap', '#btn_map', function() {
-        mui.alert("功能正在完善中...");
-        //location.href='/watero/view/water_competition_for_me.html?deviceId='+info.machineDeviceId;
-    });
-</script>
-</body>
-</html>

+ 0 - 229
watero-wechat-web/src/main/webapp/view/rent/renew_logs.html

@@ -1,229 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>续租记录</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<style>
-		body{ text-align:center}
-		article, section, time, aside {
-			display: block;
-		}
-		.point-time {
-			content: "";
-			position: absolute;
-			width: 13px;
-			height: 13px;
-			top: 12px;
-			left: 30%;
-			background: #1c87bf;
-			margin-left: -4px;
-			border-radius: 50%;
-			box-shadow: 0 0 0 2px #fff;
-		}
-
-		.text-red {
-			color: #f6393f;
-		}
-
-		.text-blue {
-			color: #1c87bf;
-		}
-
-		.text-green {
-			color: #95c91e;
-		}
-
-		.text-yellow {
-			color: #ffb902;
-		}
-
-		.text-purple {
-			color: #d32d93;
-		}
-
-		.point-red {
-			background-color: #f6393f;
-		}
-
-		.point-blue {
-			background-color: #38d1f7;
-		}
-
-		.point-green {
-			background-color: #95c91e;
-		}
-
-		.point-yellow {
-			background-color: #ffb902;
-		}
-
-		.point-purple {
-			background-color: #d32d93;
-		}
-
-		.content {
-			width: 100%;
-			margin: 0 auto;
-		}
-		.content article {
-			position: relative;
-		}
-		.content article > h3 {
-			width: 100%;
-			height: 20px;
-			line-height: 20px;
-			text-align: left;
-			text-indent: 3%;
-			font-size: 1.4em;
-			color: #fff;
-			padding: 10px 0 20px;
-			background-color: #dd6d01;
-		}
-		.content article section {
-			padding: 0 10px 17px;
-			position: relative;
-		}
-		.content article section:before {
-			content: "";
-			width: 5px;
-			top: 17px;
-			bottom: -17px;
-			left: 30%;
-			background: #e6e6e6;
-			position: absolute;
-			-webkit-transform: scaleX(.5);
-		}
-		.content article section:last-child:before {
-			display: none;
-		}
-		.content article section time {
-			width: 25%;
-			display: block;
-			position: absolute;
-			padding: 8px 0;
-		}
-		.content article section time > span {
-			display: block;
-			text-align: center;
-		}
-		.content article section aside {
-			color: #3a3a38;
-			margin-left: 42%;
-			padding-bottom: 15px;
-		}
-		.content article section .brief {
-			color: #9f9f9f;
-		}
-
-		.my-box-w{position: absolute;left: 50%;top: 50%;background: rgba(255,255,255,.1);width: 100px;height: 100px;border-radius: 50%;margin-left: -50px;margin-top: -60px;padding: 8px;}
-		.my-box-n{background: rgba(255,255,255,.2);position: relative;height: 100%;width: 100%;border-radius: 50%;}
-		.my-box-machine{position: absolute;left: 50%;top: 50%;width: auto;color: #fff;-webkit-transform:translateX(-50%) translateY(-20%);}
-		.machine-num{position: absolute;left: 50%;top: 50%;margin-top:40px;-webkit-transform: translateX(-50%);color: #fff;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<!-- <div class="loading-bg">
-        <div class="mui-loading">
-            <div class="mui-spinner">
-            </div>
-            &nbsp;&nbsp;加载中...
-        </div>
-</div> -->
-<div class="mui-content" style="background: #fff;">
-	<div style="position: relative;">
-		<img width="100%" src="//s.iamberry.com/watero/images/shop/renew_bg1.png">
-		<span class="my-box-w">
-		    	<div class="my-box-n">
-		    		<div class="my-box-machine">
-		    			<span class="iconfont icon-shebeiliebiao" style="font-size: 70px;"></span>
-		    		</div>
-		    	</div>
-		    </span>
-		<span class="machine-num" id="equipmentIdId">
-
-		    </span>
-	</div>
-
-	<div id="pullrefresh_lease_orderlist" class="content">
-		<article class="my-tab-view-pull">
-		</article>
-	</div>
-	<div id="orderlist" class="content" style="display:none;">
-		暂无续费记录
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<!-- <script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script> -->
-<script type="text/javascript">
-
-
-    function pullupRefresh() {
-        var rechargeMachineId = getParam("machineId");
-        $("#equipmentIdId").text("设备编号:"+(10000+ parseInt(rechargeMachineId)));
-        mui.ajax(base_path + '/machine/recharge_list?dates=' + new Date().getTime(), {
-            data: {
-                "rechargeMachineId": rechargeMachineId
-            },
-            dataType: 'json',
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt);
-                if(dt.status) {
-                    var renewal_data = [];
-                    renewal_data = dt.data;
-                    var table = document.body.querySelector('.my-tab-view-pull');
-                    mui(renewal_data).each(function(index) {
-                        var li = document.createElement('section');
-                        var renewal = this.rechargeTime;
-                        var dateLength = this.rechargeDuration / 12;
-                        var rechargeEndTime = this.rechargeEndTime;
-                        li.innerHTML = ' <span class="point-time point-blue"></span><time>'+format(renewal)+'</time><aside><p class="things">续租时长:'+dateLength+'年</p><p class="brief">续后到期时间:'+format(rechargeEndTime)+'</p></aside>';
-                        table.appendChild(li);
-
-                    })
-                }else{
-                    $("#pullrefresh_lease_orderlist").hide();
-                    $("#orderlist").show();
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        })
-    }
-    mui.ready(function(){
-        //页面首次加载时拉取一次数据
-        pullupRefresh();
-    });
-    function   format(now)   {
-        now = new Date(now);
-        var   year=now.getFullYear();
-        var   month=now.getMonth()+1;
-        var   date=now.getDate();
-        var   hour=now.getHours();
-        var   minute=now.getMinutes();
-        var   second=now.getSeconds();
-        if(month <10 && month > 0){
-            month = "0"+month;
-        }
-        if(date <10 && date > 0){
-            date = "0"+date;
-        }
-        return   year+"-"+month+"-"+date;
-    }
-</script>
-</body>
-</html>

+ 0 - 40
watero-wechat-web/src/main/webapp/view/rent/try_xieyi.html

@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="UTF-8">
-	<title>租用协议</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=3, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" type="text/css" href="//s.iamberry.com/watero/css/style.css" />
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-<body style="background: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-
-<div class="mui-content" style="background: #fff;">
-	<img width="100%" src="//s.iamberry.com/watero/images/shop/xieyi_lease1.jpg" />
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script type="text/javascript">
-    mui.ready(function(){
-        //$(".new-time").text(formatDate(new Date()));
-        document.querySelector('.loading-bg').style.display='none';
-    });
-</script>
-</body>
-</html>

+ 0 - 229
watero-wechat-web/src/main/webapp/view/replace_free_filter.html

@@ -1,229 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="utf-8">
-	<title>免费换滤芯</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.cart_fixed{position: fixed;right: 30px;bottom:135px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .5;}
-		.cart_fixed .mui-badge{position: absolute;right:-7px;top:-5px;font-size: 12px;}
-		.return{position: fixed;right: 30px;bottom: 80px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #1cc9f4;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #c5c5c5;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px;}
-		.lease-ul{font-size: 12px;color: #999;}
-		.lease-ul li{padding: 5px 0;}
-		.lease-left{display: inline-block;width: 25%;}
-		.ul_radio{width: 73%;display: inline-block;}
-		.ul_radio li{width:100%;height: 55px;margin: 0 1%;border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
-		.radio-cell .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
-		.lease-r-center{position: absolute;left: 70px;top: 20px;}
-		.lease-color{padding: 10px 0;float: left;}
-		.lease-select-box{padding: 12px 0;position: relative;}
-		.lease-select{position: absolute;left: 0;top: 10px;}
-		.mui-input-row{font-size: 13px;}
-		.mui-input-row input{font-size: 13px;}
-		.mui-input-group:before{display: none;}
-		.btn-pull-code{position: absolute;right: 10px;top:3px;height:34px;padding:0 6px;border-radius: 5px; line-height: 34px;font-size: 12px; color: #fff; background: #24cae9;}
-		.btn-pull-code .active{background: #c8c8c8;}
-		.icon-fuxuankuang a {color: #24cae9;}
-		.icon-fuxuankuang{font-size: 13px;padding:5px 5px 5px 22px;}
-		.icon-fuxuankuang:before{font-size: 13px;color:#e4004d;position: absolute;left: 0;width: 20px;height: 18px;}
-		.icon-fuxuankuang.mui-active:before {color: #c8c8c8;}
-		#xieyi-dalog{text-decoration:underline}
-		.ul_noline{padding-bottom: 60px;}
-		.ul_noline:before{display: none;}
-		.ul_noline li:after{display: none;}
-		.address_ul{color: #999;font-size: 12px;}
-		.address_ul li{white-space:nowrap;overflow: hidden;text-overflow: ellipsis;}
-		.my-select {border:0!important;color: #999;background-color: #f5f5f5;margin-bottom: 0;padding: 3px 14px;text-align: center;-webkit-appearance: menulist;height: 40px;}
-		.my-view1:after,.my-view1 li:after{display: none;}
-		.device_num{position: absolute;left: 0;top: 65%;width: 100%;color: #fff;text-align: center;}
-		.mui-table-view:after{display: none;}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-
-<body style="background-color: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<div style="position: relative;">
-		<img src="//s.iamberry.com/watero/images/shop/renew_bg1.png" width="100%" style="display: block;"/>
-		<img src="//s.iamberry.com/watero/images/shop/my_equipment.png" style="width:25%;left: 38%;top: 15%;position: absolute;"/>
-		<div class="device_num">
-			<!--no.3456--><span class="my_num"></span>
-			<br />
-			提示:<span class="lvxin_status"></span>滤芯失效
-		</div>
-	</div>
-	<div style="padding: 0 10px;background: #fff;">
-		<ul class="mui-table-view">
-			<li class="mui-table-view-cell" style="padding: 11px 0;">
-				按机器反馈信息,将为您邮寄:   <span class="device_lvxin"></span>
-			</li>
-		</ul>
-		<ul class="lease-ul">
-			<li>感谢您的使用!</li>
-		</ul>
-
-		<ul class="mui-table-view ul_noline">
-			<li class="mui-table-view-cell" style="padding: 11px 0 0 0;">
-				<span class="iconfont icon-lease2 cl-blue"></span>&nbsp;选择邮寄信息
-			</li>
-			<li class="mui-table-view-cell"  style="padding: 11px 10px;">
-				<a class="mui-navigate-right"  id="open-wechat-addres-a">
-					<!--选择收货地址-->
-					<ul class="address_ul">
-						<li>
-							<span class="mui-h5">收货信息: 请选择收货地址</span>
-						</li>
-						<!--<li>收  货  人:林林</li>
-                        <li>手 机 号:15999999999</li>
-                        <li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>-->
-					</ul>
-				</a>
-			</li>
-		</ul>
-	</div>
-	<div class="buy-footer">
-		<button type="button" class="mui-btn my-btn-hand active" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="申请中..." id="btn_submit" disabled="disabled">确认申请</button>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/wechat-utils-1.0.js"></script>
-<script>
-    var check = false;
-    var isPay = true; // 是否在请求支付,false表示正在请求,true可以请求
-    var t1=getParam("t1"),t2=getParam("t2"),t3=getParam("t3"),t4=getParam("t4"),deviceId=getParam("deviceId");
-    mui.ready(function() {
-        $(".my_num").text("设备编号:"+deviceId);
-        var str="";
-        var count=0;
-        if(t1!=1){str+="T1、";count++;}
-        if(t2!=1){str+="T2、";count++;}
-        if(t3!=1){str+="T3、";count++;}
-        if(t4!=1){str+="T4、";count++;}
-        console.log(str)
-        if(count>1){
-            $(".lvxin_status").text(str);
-            $(".device_lvxin").text(str+"滤芯各一个");
-        }else if(count==0){
-            $(".lvxin_status").text("暂无");
-            $(".device_lvxin").text("滤芯0个");
-        }else{
-            $(".lvxin_status").text(str);
-            $(".device_lvxin").text(str+"滤芯一个");
-        }
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-    var address='',nickname='',ads_tel='';
-    //获取微信共享地址
-    mui('body').on('tap', '#open-wechat-addres-a', function() {
-        editAddrV1(
-            function(res) {
-                // 用户成功拉出地址
-                address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
-                nickname=res.userName;
-                ads_tel= res.telNumber;
-                wechatAddr.status = true;
-                wechatAddr.detailInfo = address;
-                wechatAddr.postalCode = res.postalCode;
-                wechatAddr.userName = res.userName;
-                wechatAddr.userTel = res.telNumber;
-                wechatAddr.nationalCode = res.nationalCode;
-                $(".address_ul").empty().append('<ul class="ft-12" style="color: #333;"><li>收  货  人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
-
-                if(check){
-                    $("#btn_submit").removeClass("active").removeAttr("disabled");
-                }
-            },
-            function() {
-                if($('.address_ul').html() != null && $('.address_ul').html() != '') {
-                    wechatAddr.status = true;
-                } else {
-                    wechatAddr.status = false;
-                    // 用户取消拉出地址
-                    $('.address_ul').html('收货地址<span class="mui-h5">请选择收货地址</span>');
-                }
-            }
-        );
-
-    });
-
-    mui('body').on('tap', '#btn_submit', function() {
-        if(check){
-            if(isPay) {
-                isPay = false; // 锁定请求按钮
-                mui(this).button('loading');
-                var param = {
-                    filterT1:t1,
-                    filterT2:t2,
-                    filterT3:t3,
-                    filterT4:t4,
-                    logsMachineDeviceId:deviceId,
-                    logsAddressInfo:address,
-                    logsAddressTel:ads_tel,
-                    logsAddressName:nickname
-                };
-                $.ajax({
-                    type: 'post',
-                    url: '/watero/wechat/machine/save_change_filter?dates=' + new Date().getTime(),
-                    data: param,
-                    dataType: 'json',
-                    timeout: 15000,
-                    success: function(dt) {
-                        //console.log(dt);
-                        if(dt.isRedirect) {
-                            location.href = dt.redirectURL;
-                        }else{
-                            if(dt.status) {
-                                isPay = true;
-                                mui(th).button('reset');
-                                mui.alert("申请成功!");
-                            } else {
-                                mui(th).button('reset');
-                                isPay = true;
-                                mui.alert('申请失败,请稍后重试或联系客服!');
-                            }
-                        }
-                    },
-                    error: function(xhr, type, errorThrown) {
-                        //异常处理;
-                        console.log(xhr);
-                        isPay = true;
-                        mui.alert("请检查网络或刷新页面重试!");
-                        mui(th).button('reset');
-                    }
-                });
-            }else{
-                mui.alert("正在申请中~~请稍后!");
-                return;
-            }
-        }else{
-            mui.alert('请选择邮寄地址信息!');
-        }
-    });
-</script>
-</body>
-
-</html>

+ 0 - 282
watero-wechat-web/src/main/webapp/view/replace_free_filter_log.html

@@ -1,282 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-	<meta charset="utf-8">
-	<title>更换滤芯记录</title>
-	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/mui.min.css">
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/iconfont.css" />
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/icons-extra.css"/>
-	<link rel="stylesheet" href="//s.iamberry.com/watero/css/style.css" />
-	<style type="text/css">
-		.return{position: fixed;
-			right: 30px;
-			bottom: 80px;
-			background: rgba(0,0,0,.2);
-			padding: 12px;
-			border-radius: 50%;
-			text-align: center;
-			opacity: .9;color: #333;display: none;}
-		.my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
-		.my-btn-hand.active{background-color: #1cc9f4;}
-		.cl-blue{color: #1cc9f4;}
-		.iconfont{font-size: 20px;}
-		.mui-content-madded{background: #fff;padding: 10px 10px 40px 10px;}
-		.lease-ul{font-size: 12px;color: #999;}
-		.device_num{position: absolute;left: 0;top: 70%;width: 100%;color: #fff;text-align: center;}
-		article, section, time, aside {
-			display: block;
-		}
-		.point-time {
-			content: "";
-			position: absolute;
-			width: 12px;
-			height: 12px;
-			top: 5px;
-			left: 28%;
-			background: #1c87bf;
-			margin-left: -5px;
-			border-radius: 50%;
-		}
-
-		.text-red {
-			color: #f6393f;
-		}
-
-		.text-blue {
-			color: #1c87bf;
-		}
-		.point-blue {
-			background-color: #1cc9f4;
-		}
-		.content {
-			width: 100%;
-			margin: 0 auto;
-			padding: 10px 0;
-		}
-		.content article {
-			position: relative;
-		}
-		.content article > h3 {
-			width: 100%;
-			height: 20px;
-			line-height: 20px;
-			text-align: left;
-			text-indent: 3%;
-			font-size: 1.4em;
-			color: #fff;
-			padding: 10px 0 20px;
-			background-color: #dd6d01;
-		}
-		.content article section {
-			padding: 0 0 17px;
-			position: relative;
-		}
-		.content article section:before {
-			content: "";
-			width: 2px;
-			top: 5px;
-			bottom:-30px;
-			left: 28%;
-			background: #1cc9f4;
-			position: absolute;
-		}
-		.content article section:last-child:before {
-			display: none;
-		}
-		.content article section time {
-			width: 25%;
-			display: block;
-			position: absolute;
-		}
-		.content article section time > span {
-			display: block;
-			text-align: center;
-			margin-left: 0;
-			color: #999;
-		}
-		.content article section aside {
-			color: #3a3a38;
-			margin-left: 35%;
-			padding-bottom: 15px;
-		}
-		.content article section .brief {
-			color: #9f9f9f;
-		}
-		.content article section aside .things {
-			color: #999;margin-top: 5px;
-		}
-	</style>
-	<script>
-        // 屏蔽分享
-        window.hiddenAllWechatMenu = true;
-	</script>
-</head>
-
-<body style="background-color: #fff;">
-<div class="loading-bg">
-	<div class="mui-loading">
-		<div class="mui-spinner">
-		</div>
-		&nbsp;&nbsp;加载中...
-	</div>
-</div>
-<div class="mui-content">
-	<div style="position: relative;">
-		<img src="//s.iamberry.com/watero/images/shop/renew_bg1.png" width="100%" style="display: block;"/>
-		<img src="//s.iamberry.com/watero/images/shop/my_equipment.png" style="width:25%;left: 38%;top:20%;position: absolute;"/>
-		<div class="device_num">
-			<!--no.3456-->
-		</div>
-	</div>
-
-
-	<div class="mui-content-madded">
-
-		<div class="content">
-			<article>
-				<!--					<section>
-                                        <span class="point-time point-blue"></span>
-                                        <time>
-                                            <span>2017-03-12</span>
-                                        </time>
-                                        <aside>
-                                            <p class="things">
-                                                产品:T1x1、T2x1
-                                            </p>
-                                            <p class="things">
-                                                状态:申请中<span class="mui-pull-right cl-blue">取消</span>
-                                            </p>
-                                        </aside>
-                                    </section>
-                                    <section>
-                                        <span class="point-time point-blue"></span>
-                                        <time>
-                                            <span>2017-03-12</span>
-                                        </time>
-                                        <aside>
-                                            <p class="things">
-                                                产品:T1x1、T2x1
-                                            </p>
-                                            <p class="things">
-                                                状态:申请中<span class="mui-pull-right cl-blue">查看物流</span>
-                                            </p>
-                                        </aside>
-                                    </section>
-                                    <section>
-                                        <span class="point-time point-blue"></span>
-                                        <time>
-                                            <span>2017-03-12</span>
-                                        </time>
-                                        <aside>
-                                            <p class="things">
-                                                产品:T1x1、T2x1
-                                            </p>
-                                            <p class="things">
-                                                状态:已完成
-                                            </p>
-                                        </aside>
-                                    </section>-->
-			</article>
-		</div>
-	</div>
-</div>
-<script src="//s.iamberry.com/watero/js/mui.min.js"></script>
-<script src="//s.iamberry.com/watero/js/jquery-2.1.1.min.js"></script>
-<script src="//s.iamberry.com/watero/js/shop/main.js"></script>
-<script>
-    var deviceId=getParam("deviceId");
-    mui.ready(function() {
-        mui.ajax('/watero/wechat/machine/select_change_filter_list', {
-            data: {
-                deviceId: deviceId
-            },
-            type: 'post',
-            timeout: 15000,
-            success: function(dt) {
-                //console.log(dt)
-                if(dt.isRedirect) {
-                    location.href = dt.redirectURL;
-                }else{
-                    if(dt.status) {
-                        $(".device_num").text("设备编号:"+dt.data[0].logsMachineDeviceId);
-                        var logs_data = [];
-                        logs_data = dt.data;
-                        var table = $('.content>article');
-                        var html_str='';
-                        var lvxin='';
-                        mui(logs_data).each(function(index) {
-                            // var section = document.createElement('section');
-
-                            var status='';
-                            var btn_str='<span class="mui-pull-right cl-blue">取消</span>';
-                            switch (this.logsStatus){
-                                case 0:
-                                    status='取消';
-                                    btn_str='';
-                                    break;
-                                case 1:
-                                    status='申请中';
-                                    break;
-                                case 2:
-                                    status='更换中';
-                                    break;
-                                case 3:
-                                    status='驳回';
-                                    btn_str='';
-                                    break;
-                                case 4:
-                                    status='已发货';
-                                    btn_str='<span class="mui-pull-right cl-blue show_post_info" postfirm="' + this.logsPostFirm + '" postnum="' + this.logsPostNum + '" gourl="/watero/view/replace_free_filter_log.html?deviceId="'+deviceId+'">查看物流</span>';
-                                    break;
-                                case 5:
-                                    status='已完成';
-                                    btn_str='';
-                                    break;
-                                default:
-                                    break;
-                            }
-                            if(index<(logs_data.length-1)){
-                                console.log(logs_data[index+1].logsCreateTime)
-
-                                console.log(formatDate(this.logsCreateTime)==formatDate(logs_data[index+1].logsCreateTime) && this.logsStatus==logs_data[index+1].logsStatus)
-                                if(formatDate(this.logsCreateTime)==formatDate(logs_data[index+1].logsCreateTime) && this.logsStatus==logs_data[index+1].logsStatus){
-                                    lvxin+='T'+this.logsFilterType+'滤芯 ';
-                                    console.log(lvxin)
-                                }else{
-                                    html_str='<section><span class="point-time point-blue"></span><time><span>'+formatDate(this.logsCreateTime)+'</span></time><aside><p class="things">产品:T'+this.logsFilterType+'滤芯 '+lvxin+'</p><p class="things">状态:'+status+btn_str+'</p></aside></section> ';
-                                    lvxin='';
-                                    // console.log(lvxin)
-                                    table.append(html_str);
-                                }
-                            }else{
-                                html_str='<section><span class="point-time point-blue"></span><time><span>'+formatDate(this.logsCreateTime)+'</span></time><aside><p class="things">产品:'+lvxin+'T'+this.logsFilterType+'滤芯 '+'</p><p class="things">状态:'+status+btn_str+'</p></aside></section> ';
-                                table.append(html_str);
-                            }
-							/*section.innerHTML='<section><span class="point-time point-blue"></span><time><span>'+formatDate(this.logsCreateTime)+'</span></time><aside><p class="things">产品:T1x1、T2x1</p><p class="things">状态:'+status+'<span class="mui-pull-right cl-blue">取消</span></p></aside></section>';
-							 table.appendChild(section);*/
-                        });
-                    }
-                }
-            },
-            error: function(xhr, type, errorThrown) {
-                console.log(xhr)
-            }
-        });
-        document.querySelector('.loading-bg').style.display = 'none';
-    });
-
-    function formatDate(now) {
-        now = new Date(now);
-        var year = now.getFullYear();
-        var month = now.getMonth() + 1;
-        var date = now.getDate();
-        return year + "-" + month + "-" + date
-    };
-</script>
-</body>
-
-</html>

+ 0 - 37
watero-wechat-web/src/main/webapp/view/system_view/404.jsp

@@ -1,37 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=utf-8"
-	pageEncoding="utf-8"%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta charset="utf-8">
-<meta name="renderer" content="webkit|ie-comp|ie-stand">
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-<meta http-equiv="Cache-Control" content="no-siteapp" />
-<!--[if lt IE 9]>
-<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/html5.js"></script>
-<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/respond.min.js"></script>
-<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/PIE_IE678.js"></script>
-<![endif]-->
-<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
-<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
-<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
-<!--[if IE 6]>
-<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
-<script>DD_belatedPNG.fix('*');</script>
-<![endif]-->
-<title>对不起,您访问的数据不存在!</title>
-</head>
-<body>
-<section class="page-404 minWP text-c">
-  <p class="error-title">
-  <img width="100%" src="/watero/common/shop/images/404.jpg" />
- <!--  <i class="Hui-iconfont va-m" style="font-size:80px">&#xe656;</i><span class="va-m"> 404</span> -->
-  </p>
-  <p style="color:#709df8">it looks like you` re lost ....<br>很抱歉,页面它不小心迷路了~</p>
-  <br>
-  <p class="error-info">您可以:<a href="javascript:;" onclick="history.go(-1)" class="c-primary" style="background-color:#709df8;padding:5px 10px;color:#fff;border-radius: 5px;">返回上一页</a><span class="ml-20">|</span><a href="/watero/wechat/index" class="c-primary ml-20" style="background-color:#709df8;padding:5px 10px;color:#fff;border-radius: 5px;">返回商城首页 </a></p>
-</section>
-</body>
-</html>

+ 0 - 0
watero-wechat-web/src/main/webapp/view/system_view/500.jsp


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels