浏览代码

19.9活动

shenhao 4 年之前
父节点
当前提交
80f6f8acc2

+ 12 - 0
src/main/java/com/ssj/bean/weixin/sales/domain/LibOrderDetails.java

@@ -188,6 +188,11 @@ public class LibOrderDetails  extends BaseEntity{
 	 */
 	private Integer invoiceState;
 
+	/**
+	 * 购买人的手机号码
+	 */
+	private String buyPhone;
+
 	public Date getStartTime() {
 		return startTime;
 	}
@@ -437,4 +442,11 @@ public class LibOrderDetails  extends BaseEntity{
 		this.invoiceState = invoiceState;
 	}
 
+	public String getBuyPhone() {
+		return buyPhone;
+	}
+
+	public void setBuyPhone(String buyPhone) {
+		this.buyPhone = buyPhone;
+	}
 }

+ 2 - 2
src/main/java/com/ssj/dao/weixin/sales/dao/LibOrderDetailsDao.java

@@ -177,6 +177,6 @@ public interface LibOrderDetailsDao extends JpaRepository<LibOrderDetails, Strin
 	 */
 	List<LibOrderDetails> findByVipIdAndPriceSpeciesAndOrderStatusAndAppTypeOrderByCreateTimeDesc(String vipId, String priceSpecies, int orderStatus, int appType);
 
-	@Query(nativeQuery = true, value ="select count(1) from tb_lib_order_details where price_species=?1 and user_id=?2 ")
-	int getOrderTimesBySpeciesAndUserId(String species, String userId);
+	@Query(nativeQuery = true, value ="select count(1) from tb_lib_order_details where price_species=?1 and buy_phone=?2 ")
+	int getOrderTimesBySpeciesAndUserId(String species, String phone);
 }

+ 7 - 6
src/main/java/com/ssj/service/weixin/sales/service/impl/LibOrderDetailsServiceImpl.java

@@ -1623,14 +1623,15 @@ public class LibOrderDetailsServiceImpl extends BaseServiceImpl<LibOrderDetails,
 			entity.setUserId(libOrderDetails.getUserId());
 			signUpService.save(entity);
 
-			//查询用户是否有绑定手机号码
-			User user = userService.getById(libOrderDetails.getUserId());
-			if(StringUtils.isBlank(user.getMobile())){
-				user.setMobile(libOrderDetails.getPhone());
-				userService.save(user);
-			}
+//			//查询用户是否有绑定手机号码
+//			User user = userService.getById(libOrderDetails.getUserId());
+//			if(StringUtils.isBlank(user.getMobile())){
+//				user.setMobile(libOrderDetails.getPhone());
+//				userService.save(user);
+//			}
 
 			libOrderDetails.setStartTime(startTime);
+			libOrderDetails.setBuyPhone(libOrderDetails.getPhone());
 			libOrderDetails = this.save(libOrderDetails);
 			logger.info("小塾学伴缴费体验19.9支付成功后,添加销售订单"+libOrderDetails.getId());
 

+ 10 - 22
src/main/java/com/ssj/weixin/activity/controller/ActivityController.java

@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 /**
  * @author sh
@@ -43,30 +44,8 @@ public class ActivityController extends BaseController {
     private ParentService parentService;
 
     @Autowired
-    private LibSalesPriceService libSalesPriceService;
-
-    @Autowired
     private LibOrderDetailsService libOrderDetailsService;
 
-
-
-    @RequestMapping("/index")
-    public String index(Model model, String type) {
-        String userId = UserUtil.getUserId(request);
-        //查询用户支付次数
-        int times = libOrderDetailsService.getOrderTimesBySpeciesAndUserId("S009",userId);
-        //通用的收费标准,150/月
-        LibSalesPrice salesPrice=libSalesPriceService.findTopBySpecies("S009");
-
-        model.addAttribute("libId", salesPrice.getLibId());
-        model.addAttribute("salesPrice", salesPrice);
-        //推广渠道
-        model.addAttribute("type",type);
-        //1还可以购买,2不可购买了
-        model.addAttribute("timeLimit",times<3?1:2);
-        return "weixin/activity/extension/index";
-    }
-
     @RequestMapping(value="/sendCode",method = RequestMethod.POST)
     @ResponseBody
     public ResponseEntity sendCode(ActivityLogin req){
@@ -99,6 +78,15 @@ public class ActivityController extends BaseController {
             return responseEntity.failure(ResponseConstant.CODE_000,"请输入验证码");
         }
         responseEntity = parentService.confirmSmsV2(req.getPhoneNum().trim(),req.getMsgCode());
+
+        if(responseEntity.getCode().equals(ResponseConstant.CODE_999)){
+            //验证码验证成功,检查是否已经超过检查次数
+            int times = libOrderDetailsService.getOrderTimesBySpeciesAndUserId("S009",req.getPhoneNum());
+            if(times >0){
+                return  responseEntity.failure("一个电话号码只能参加一次活动!");
+            }
+        }
+
         return   responseEntity;
     }
 }

+ 2 - 2
src/main/java/com/ssj/weixin/interceptor/SetControlDataInterceptor.java

@@ -76,7 +76,7 @@ public class SetControlDataInterceptor extends HandlerInterceptorAdapter {
 	        notCheckPhoneList.add("/weixin/story/explainForm.html");
 	        notCheckPhoneList.add("/weixin/story/explainForm/save");
 		 	notCheckPhoneList.add("/weixin/story/maskForm.html");
-		 	notCheckPhoneList.add("/weixin/activity/index.html");
+		 	notCheckPhoneList.add("/weixin/payment/index.html");
 		 	notCheckPhoneList.add("/weixin/activity/sendCode");
 		 	notCheckPhoneList.add("/weixin/activity/checkCode");
 		 	notCheckPhoneList.add("/weixin/payment/payService");
@@ -96,7 +96,7 @@ public class SetControlDataInterceptor extends HandlerInterceptorAdapter {
         User user = UserUtil.getUser(request);
         if(!notCheckPhoneList.contains(url)){
 			if(StringUtils.isEmpty(user.getMobile())){
-				String sysUrl="https://book.sharingschool.com";
+				String sysUrl=SystemResourceLocator.getValue("gz_book_url").toString();
 				//String sysUrl= "http://localhost:8081/";
 				response.sendRedirect(sysUrl+"/weixin/mylib/bindingMobilePhone.html?redirectUrl="+(sysUrl+url));
 				return false;

+ 20 - 2
src/main/java/com/ssj/weixin/payment/controller/PaymentController.java

@@ -1201,8 +1201,26 @@ public class PaymentController extends BaseController {
 		}
 		return responseEntity;
 	}
-	
-	
+
+	@RequestMapping("/index")
+	public String index(Model model, String type) {
+		if(Objects.isNull(type)){
+			type = "8";
+		}
+//		String userId = UserUtil.getUserId(request);
+		//查询用户支付次数
+//		int times = libOrderDetailsService.getOrderTimesBySpeciesAndUserId("S009",userId);
+		//通用的收费标准,150/月
+		LibSalesPrice salesPrice=libSalesPriceService.findTopBySpecies("S009");
+
+		model.addAttribute("libId", salesPrice.getLibId());
+		model.addAttribute("salesPrice", salesPrice);
+		//推广渠道
+		model.addAttribute("type",type);
+//		//1还可以购买,2不可购买了
+//		model.addAttribute("timeLimit",times<1?1:2);
+		return "weixin/vip/extension/index";
+	}
 	
 
 

+ 27 - 24
src/main/resources/static/extension/css/style.css

@@ -50,38 +50,41 @@ html.no-scroll {
 .index_pic1{height:11.32rem;background:url(https://img.sharingschool.com/activity/images/index_a1.png?v=1) no-repeat center/ 100% 100%;}
 .index_pic2{height:4.85rem;margin-top:0.02rem;background:url(https://img.sharingschool.com/activity/images/index_a2.png?v=1) no-repeat center/ 100% 100%;}
 .index_pic3{height:5.98rem;margin-top:0.11rem;background:url(https://img.sharingschool.com/activity/images/index_a3.png?v=1) no-repeat center/ 100% 100%;}
-.index_pic4{height:5.1rem;margin-top:0.38rem;background:url(https://img.sharingschool.com/activity/images/index_a4.png?v=1) no-repeat center/ 100% 100%;}
-.index_pic5{height:16.86rem;background:url(https://img.sharingschool.com/activity/images/index_a5.png?v=1) no-repeat center/ 100% 100%;}
-.index_pic6{height:14.55rem;background:url(https://img.sharingschool.com/activity/images/index_a6.png?v=1) no-repeat center/ 100% 100%;}
-.index_pic7{height:6.05rem;background:url(https://img.sharingschool.com/activity/images/index_a7.png?v=1) no-repeat center/ 100% 100%;}
-.index_pic8{height:7.8rem;margin-top:0.31rem;background:url(https://img.sharingschool.com/activity/images/index_a8.png?v=1) no-repeat center/ 100% 100%;}
-.index_pic9{height:10.5rem;margin-top:0.27rem;background:url(https://img.sharingschool.com/activity/images/index_a9.png?v=1) no-repeat center/ 100% 100%;}
+
+.index_pic4{height:36.52rem;margin-top:0.38rem;background:url(https://img.sharingschool.com/activity/images/index_long.png?v=1) no-repeat center/ 100% 100%,#e12d39;}
+/* .index_pic4{height:5.12rem;margin-top:0.38rem;background:url(https://img.sharingschool.com/activity/images/index_a4.png?v=1) no-repeat center/ 100% 100%,#e12d39;}
+.index_pic5{height:16.9rem;background:url(https://img.sharingschool.com/activity/images/index_a5.png?v=1) no-repeat center/ 100% 100%,#e12d39;}
+.index_pic6{height:14.55rem;background:url(https://img.sharingschool.com/activity/images/index_a6.png?v=1) no-repeat center/ 100% 100%;} */
+
+.index_pic5{height:6.05rem;background:url(https://img.sharingschool.com/activity/images/index_a7.png?v=1) no-repeat center/ 100% 100%,#fff;}
+.index_pic6{height:7.8rem;margin-top:0.31rem;background:url(https://img.sharingschool.com/activity/images/index_a8.png?v=1) no-repeat center/ 100% 100%,#fff;}
+.index_pic7{height:10.5rem;margin-top:0.27rem;background:url(https://img.sharingschool.com/activity/images/index_a9.png?v=1) no-repeat center/ 100% 100%;}
 .index_pic0{height:1.94rem;background: #FFF;}
 
 /*跑马灯*/
-.index_pic1_marquee{width: 4.12rem;height: .46rem;top:.33rem;right:.2rem;background: rgba(62,3,19,.35);border-radius: 23px;font-size: .24rem;line-height:.46rem;font-family: PingFang SC;font-weight: 400;color: #FFFFFF;text-align: center;overflow: hidden;}
+.index_pic1_marquee{width: 4.12rem;height: .46rem;top:.33rem;right:.2rem;background: rgba(62,3,19,.35);border-radius: .23rem;font-size: .24rem;line-height:.46rem;font-family: PingFang SC;font-weight: 400;color: #FFFFFF;text-align: center;overflow: hidden;}
 .index_pic1_marquee ul{}
 .index_pic1_marquee ul li{width: 100%;height: .46rem;line-height:.46rem;}
 
 
 /*底部免费报名*/
-.wrap_footer{position: fixed;width: 7.5rem;height: 1.94rem;bottom:0;left:50%;transform:translate(-50%,0);background: #FFF;box-shadow: 0px 0px 16px 0px rgba(113, 53, 9, 0.4);}
+.wrap_footer{position: fixed;width: 7.5rem;height: 1.94rem;bottom:0;left:50%;transform:translate(-50%,0);background: #FFF;box-shadow: 0 0 .16rem 0 rgba(113, 53, 9, 0.4);}
 .wrap_footer_text{width: 100%;height: 0.3rem;top:.29rem;left:50%;transform:translate(-45%,0);font-size: 0.3rem;font-family: Source Han Sans CN;font-weight: bold;color: #E22331;line-height: 0.3rem;text-align: center;letter-spacing: 0.02rem;
 }
-.wrap_footer_icon{width: .62rem;height: .62rem;bottom: .66rem;left:.51rem;}
+.wrap_footer_icon{width: .62rem;height: .62rem;bottom: .71rem;left:.51rem;}
 .wrap_footer_icon img{width: 100%;line-height: .62rem;vertical-align: top;}
-#wrap_footer_btn{width: 5.02rem;height: .88rem;bottom: .5rem;left:50%;transform:translate(-45%,0);background: linear-gradient(187deg, #E12331, #E22331);border-radius: .44rem;text-align: center;letter-spacing: 0.02rem;cursor: pointer;}
+#wrap_footer_btn{width: 5.02rem;height: .88rem;bottom: .6rem;left:50%;transform:translate(-45%,0);background: linear-gradient(187deg, #E12331, #E22331);border-radius: .44rem;text-align: center;letter-spacing: 0.02rem;cursor: pointer;}
 #wrap_footer_btn.disabled{background: #BFBFBF;opacity: .9;}
-.wrap_footer_btn h3{font-size: .36rem;font-family: Source Han Sans CN;font-weight: 400;color: #FFF;}
-.wrap_footer_btn h3 span{font-size: .48rem;font-family: Source Han Sans CN;font-weight: bold;color: #FFF;}
-.wrap_footer_btn p{font-size: .24rem;font-family: Source Han Sans CN;font-weight: 400;color: #FFFFFF;}
+.wrap_footer_btn h3{font-size: .32rem;font-family: Source Han Sans CN;font-weight: 400;color: #FFF;}
+.wrap_footer_btn h3 span{font-size: .42rem;font-family: Source Han Sans CN;font-weight: bold;color: #FFF;}
+.wrap_footer_btn p{font-size: .2rem;font-family: Source Han Sans CN;font-weight: 400;color: #FFFFFF;}
 .wrap_footer_btn_tip{width: 1.84rem;height: .4rem;background: #FFB500;border-radius: .21rem .2rem .2rem 0;top:-.08rem;right:-.6rem;font-size: .24rem;font-family: Source Han Sans CN;font-weight: bold;color: #FFFFFF;line-height: .4rem;text-align: center;}
 
 /* 选择练习册 */
 .wrap_select{width: 100%;height: 100%;background: #F2F5F8;left: 0;top: 0;display: none;}
-.wrap_select_register{width: 6.22rem;height: auto;padding:.3rem;background: #fff;margin:0 auto;margin-top: .3rem;box-shadow: 0px 0px 18px 0px rgba(199, 216, 232, 0.15);border-radius: .2rem;overflow: hidden;}
-.wrap_select_workbook{width: 6.22rem;height: auto;padding:.3rem;background: #FFF;margin:0 auto;margin-top: .2rem;box-shadow: 0px 0px 18px 0px rgba(199, 216, 232, 0.15);border-radius: .2rem;overflow: hidden;}
-.wrap_select_payment{width: 100%;height: 1.38rem;background: #FFF;box-shadow: 0px -2px 24px 0px rgba(199, 216, 232, 0.54);position: fixed;bottom: 0;left:50%;transform:translate(-50%,0);}
+.wrap_select_register{width: 6.22rem;height: auto;padding:.3rem;background: #fff;margin:0 auto;margin-top: .3rem;box-shadow: 0 0 .18rem 0 rgba(199, 216, 232, 0.15);border-radius: .2rem;overflow: hidden;}
+.wrap_select_workbook{width: 6.22rem;height: auto;padding:.3rem;background: #FFF;margin:0 auto;margin-top: .2rem;box-shadow: 0 0 .18rem 0 rgba(199, 216, 232, 0.15);border-radius: .2rem;overflow: hidden;}
+.wrap_select_payment{width: 100%;height: 1.38rem;background: #FFF;box-shadow: 0 -0.02rem 0.24rem 0 rgba(199, 216, 232, 0.54);position: fixed;bottom: 0;left:50%;transform:translate(-50%,0);}
 .select_register_tel{width: 100%;height: 1.4rem;border-bottom: 0.01rem solid #E6E6E6;position: relative;}
 .select_register_yzm{width: 100%;height: 1rem;margin-top:.2rem;position: relative;}
 .select_register_tel span, .select_register_yzm span{float:left;display:inline-block;height:1rem;margin-right:.15rem;font-size: .36rem;font-family: Source Han Sans CN;font-weight: 500;color: #333;line-height: 1rem;}
@@ -91,8 +94,8 @@ html.no-scroll {
 .select_register_yzm input{width:2.5rem;}
 .select_register_yzm_tip1{width: 1.6rem;height: .3rem;font-size: .24rem;font-family: Source Han Sans CN;font-weight: 400;color: #3DBA40;line-height: .3rem;position: absolute;right: 0;top:36%;transform: translateY(-50%);display: none;}
 .select_register_yzm_tip2{width: 100%;height: .3rem;font-size: .24rem;font-family: Source Han Sans CN;font-weight: 400;color: #3DBA40;line-height: .3rem;position: absolute;left: 0;bottom: 0.05rem;}
-.select_register_yzm_tip1 i,.select_register_yzm_tip2 i{float:left;display: inline-block;width: .26rem;height: .26rem;margin:0.02rem 0;background:url(../images/tel_icon.png?v=1) no-repeat center/ 100% 100%;}
-.select_register_yzm_btn{width: 2.3rem;height: .78rem;background: #FFF;position:absolute;right:0;top:.1rem;border: 0.01px solid #EA3844;border-radius: .39rem;text-align: center;font-size: .28rem;font-family: Source Han Sans CN;font-weight: 400;color: #EA3844;line-height: .78rem;cursor: pointer;}
+.select_register_yzm_tip1 i,.select_register_yzm_tip2 i{float:left;display: inline-block;width: .26rem;height: .26rem;margin:0.02rem 0;background:url(https://img.sharingschool.com/activity/images/tel_icon.png?v=1) no-repeat center/ 100% 100%;}
+.select_register_yzm_btn{width: 2.3rem;height: .78rem;background: #FFF;position:absolute;right:0;top:.1rem;border: 0.02rem solid #EA3844;border-radius: .39rem;text-align: center;font-size: .28rem;font-family: Source Han Sans CN;font-weight: 400;color: #EA3844;line-height: .78rem;cursor: pointer;}
 
 .wrap_select_payment p{float:left;width:30%;height:1.38rem;line-height:1.38rem;font-size: .58rem;font-weight: bold;color: #EA3844;text-align: center;}
 .wrap_select_payment p span{font-size: .36rem;}
@@ -104,15 +107,15 @@ html.no-scroll {
 .select_wrokbook_title p{font-size: .36rem;font-family: Source Han Sans CN;font-weight: 500;color: #333;}
 .select_wrokbook_title p span{font-size: .28rem;font-family: Source Han Sans CN;font-weight: 400;color: #CCC;}
 .select_wrokbook_content{width: 100%;height: auto;margin:.4rem auto;overflow: hidden;}
-.select_wrokbook_content_tit{width: calc(100% - 0.04rem);height: .78rem;background: #FFF;margin-bottom:.5rem;border: .01rem solid #EA3844;border-radius: .39rem;}
-.select_wrokbook_content_tit ul li{float: left;width: 30%;height: .78rem;line-height:.8rem;font-size: .32rem;font-family: Source Han Sans CN;font-weight: 400;color: #EA3844;text-align: center;border-radius: .39rem;}
+.select_wrokbook_content_tit{width: calc(100% - 0.04rem);height: .78rem;background: #FFF;margin-bottom:.5rem;border: .02rem solid #EA3844;border-radius: .4rem;}
+.select_wrokbook_content_tit ul li{float: left;width: 30%;height: .78rem;line-height:.78rem;font-size: .32rem;font-family: Source Han Sans CN;font-weight: 400;color: #EA3844;text-align: center;border-radius: .39rem;}
 .select_wrokbook_content_tit ul li+li{margin-left: 5%;}
 .select_wrokbook_content_tit ul li.ton{background: #EA3844;color: #fff;position: relative;}
 .select_wrokbook_content_tit ul li.ton::before{content: '';width: 0;height: 0;border-left: .2rem solid transparent;border-right: .2rem solid transparent;border-top: .2rem solid #EA3844;position: absolute;bottom: -.14rem;left: 50%;transform: translateX(-50%);}
 
-.select_dlist_box{width: 100%;height: auto;overflow: hidden;}
+.select_dlist_box{width: 100%;padding-top: 0.16rem;height: auto;overflow: hidden;}
 .select_dlist_box2,.select_dlist_box3{display: none;}
-.select_dlist_box ul li{float: left;width: auto;height: .68rem;padding: 0 .34rem;margin-right: .14rem;margin-bottom:.16rem;background: #FFFFFF;box-sizing:border-box;border: .01rem solid #EA3844;border-radius: .34rem;text-align: center;font-size: .28rem;font-family: NotoSansHans;font-weight: 400;color: #EA3844;line-height: .68rem;position: relative;}
+.select_dlist_box ul li{float: left;width: auto;height: .68rem;padding: 0 .34rem;margin-right: .14rem;margin-bottom:.16rem;background: #FFFFFF;box-sizing:border-box;border: .02rem solid #EA3844;border-radius: .34rem;text-align: center;font-size: .28rem;font-family: NotoSansHans;font-weight: 400;color: #EA3844;line-height: .68rem;position: relative;}
 .select_dlist_box ul li input{position: absolute;left: 0;top: 0;width: 100%;height: 100%;opacity: 0;cursor: pointer;}
 
 /* 选中的元素添加一个 √ 的箭头 */
@@ -125,7 +128,7 @@ html.no-scroll {
   height: .28rem;
   bottom: 0.04rem;
   right: 0.04rem;
-  background: url(../images/select_tick.png?v=1) no-repeat center/ 100% 100%;
+  background: url(https://img.sharingschool.com/activity/images/select_tick.png?v=1) no-repeat center/ 100% 100%;
   z-index: 2;
 }
 
@@ -138,7 +141,7 @@ html.no-scroll {
 .success_next_text1{width: 100%;height: .5rem;font-size: .4rem;font-family: Source Han Sans CN;font-weight: 500;color: #313131;line-height: .5rem;text-align: center;}
 .success_next_text2{width: 100%;height: .5rem;margin-top:.17rem;font-size: .4rem;font-family: Source Han Sans CN;font-weight: bold;color: #313131;line-height: .5rem;text-align: center;}
 .success_next_ercode{width: 2.6rem;height: 2.6rem;margin:0 auto;margin-top:.51rem;text-align:center;line-height:2.68rem;overflow:hidden;}
-.success_next_ercode img{width: 100%;}
+.success_next_ercode img{width: 100%;-webkit-touch-callout: none;}
 .success_next_text3{width: 100%;height: .5rem;margin-top:.5rem;font-size: .38rem;font-family: Source Han Sans CN;font-weight: bold;color: #EA3844;line-height: .5rem;text-align: center;}
 
 @media screen and (max-width:320px){

二进制
src/main/resources/static/extension/images/index_icon.png


+ 20 - 11
src/main/resources/static/extension/js/activity.js

@@ -8,10 +8,6 @@ $(function () {
 
   // 弹出练习册选择页
   $('#wrap_footer_btn').click(function (event) {
-    if(times == 2){
-      layerNotify('您已超过支付限制次数!', 3)
-      return false
-    }
     $('.wrap_select').show();
     // 清空原选择
     $('#telphone').val('');
@@ -111,6 +107,10 @@ $(function () {
   });
 
   $('#verify').bind('input propertychange', function() {
+    checkCode();
+  });
+
+  function checkCode(){
     var code = $("#verify").val();
 
     _tel = $('#telphone').val();
@@ -119,6 +119,7 @@ $(function () {
       return;
     }
     if(code.length===6){
+      $("#verify").unbind();
       $.ajax({
         url: sysUrl+"/weixin/activity/checkCode",
         type: "post",
@@ -137,16 +138,22 @@ $(function () {
               $('.select_payment_btn').prop('disabled', false);
             }
           }else{
-            layerNotify(data.msg, 1.52)
+            layerNotify(data.msg)
           }
+          $("#verify").bind('input propertychange',function () {
+            checkCode();
+          });
         },
         error: function (error) {
           console.log(error)
+          $("#verify").bind('input propertychange',function () {
+            checkCode();
+          });
         }
       })
     }
-  });
 
+  }
   //点击 免费报名
   $('.select_payment_btn').click(function () {
 
@@ -175,10 +182,8 @@ $(function () {
     return _cacheData
   }
 
-  function layerNotify(content, time = 2, width = 1.38) {
-    const layerStyle = `height:.8rem;position:absolute;top:50%;left:50%;bottom:0;margin-left: -` + width + `rem;margin-top: -1.2rem;color:#fff;background-color:rgba(0,0,0,.8); border:none;z-index:9999` //自定风格
-    layer.open({
-      style: layerStyle,
+  function layerNotify(content, time = 2) {
+    parent.layer.open({
       skin: 'msg',
       content,
       time,
@@ -222,8 +227,12 @@ $(function () {
             "paySign" : payInfo.paySign           //微信签名
           },function(res){
             if(res.err_msg == "get_brand_wcpay_request:ok" ) {
+
               $('.wrap_select').hide();
-              $('.wrap_success').show();
+              $('#wrap_success'+type).show();
+              // document.getElementById('success_img_id').setAttribute("src",imgurl+"/activity/images/qrcode"+type+".png");
+
+              // $("#success_img_id").attr("src",imgurl + "/activity/images/qrcode"+type+".png");
             }else{
               $('.select_payment_btn').prop('disabled', false)
             }

文件差异内容过多而无法显示
+ 1 - 1
src/main/resources/static/extension/js/layer_mobile/need/layer.css


+ 2 - 2
src/main/resources/static/style/xkb.css

@@ -526,7 +526,7 @@
 }
 .ld-dialog1 .jt img{
 	width: 100%;
-	height: 100%%;
+	height: 100%;
 }
 
 .tjjddialog .txt_cj {
@@ -562,7 +562,7 @@
 .ld-dialog2 .nrbox{
 	width: 6.03rem;
 	height: 3.99rem;
-	background: url(../../upload/images/xkb_cjbg.png) no-repeat center center / 6.03rem 3.99rem;
+	background: url(../images/02-di.png) no-repeat center center / 6.03rem 3.99rem;
 	text-align: center;
 	overflow: hidden;
 }

+ 158 - 10
src/main/resources/templates/weixin/activity/extension/index.html

@@ -5,12 +5,14 @@
 	<meta charset="utf-8">
 	<meta name="viewport"
 		content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
-	<title>小塾学伴体验限时抢</title>
-	<link href="activity/index.css" type="text/css" th:href="@{/static/extension/css/style.css}" rel="stylesheet"/>
-	<script src="./js/jquery.js" th:src="@{/static/extension/js/layer_mobile/layer.js}"></script>
+	<title>小塾学伴</title>
+	<link rel="icon" th:href="@{/static/extension/favicon.ico}" type="image/x-icon" />
+	<link href="activity/index.css" type="text/css" th:href="@{/static/extension/css/style.css?version=8}" rel="stylesheet"/>
+	<script src="./js/jquery.js" th:src="@{/static/extension/js/layer_mobile/layer.js?version=2}"></script>
 
 	<script src="js/jquery.form.min.js" th:src="@{/static/extension/js/jquery.min.js}"></script>
 	<script src="js/flexible.js" th:src="@{/static/extension/js/activity.js}"></script>
+	<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
 
 	<script type="text/javascript">
 		var sysUrl = '[[${sysUrl}]]';
@@ -37,8 +39,8 @@
 				<div class="index_pic index_pic5"></div>
 				<div class="index_pic index_pic6"></div>
 				<div class="index_pic index_pic7"></div>
-				<div class="index_pic index_pic8"></div>
-				<div class="index_pic index_pic9"></div>
+<!--				<div class="index_pic index_pic8"></div>-->
+<!--				<div class="index_pic index_pic9"></div>-->
 				<div class="index_pic index_pic0"></div>
 			</div>
 			<div class="wrap_footer">
@@ -150,8 +152,8 @@
 				<button class="select_payment_btn" disabled="disabled">确认支付</button>
 			</div>
 		</div>
-		<!-- 成功页面 -->
-		<div class="pa wrap_success" id="wrap_success">
+		<!-- 成功页面3 -->
+		<div class="pa wrap_success" id="wrap_success3">
 			<div class="success_toppic">
 				<div class="success_toppic_tick"></div>
 				<p>报名成功</p>
@@ -159,7 +161,72 @@
 			<div class="success_baibox">
 				<p class="success_next_text1">长按识别二维码,加老师微信</p>
 				<p class="success_next_text2">开启5天打卡学习之旅</p>
-				<div class="success_next_ercode"><img th:src="@{/static/extension/images/ercode.png}" alt="小私塾二维码" /></div>
+				<div class="success_next_ercode"><img src="https://img.sharingschool.com/activity/images/qrcode3.png"  alt="小私塾二维码"/></div>
+				<p class="success_next_text3">你离奖品只差最后一步啦!</p>
+			</div>
+		</div>
+		<!-- 成功页面4 -->
+		<div class="pa wrap_success" id="wrap_success4">
+			<div class="success_toppic">
+				<div class="success_toppic_tick"></div>
+				<p>报名成功</p>
+			</div>
+			<div class="success_baibox">
+				<p class="success_next_text1">长按识别二维码,加老师微信</p>
+				<p class="success_next_text2">开启5天打卡学习之旅</p>
+				<div class="success_next_ercode"><img src="https://img.sharingschool.com/activity/images/qrcode4.png"  alt="小私塾二维码"/></div>
+				<p class="success_next_text3">你离奖品只差最后一步啦!</p>
+			</div>
+		</div>
+		<!-- 成功页面3 -->
+		<div class="pa wrap_success" id="wrap_success5">
+			<div class="success_toppic">
+				<div class="success_toppic_tick"></div>
+				<p>报名成功</p>
+			</div>
+			<div class="success_baibox">
+				<p class="success_next_text1">长按识别二维码,加老师微信</p>
+				<p class="success_next_text2">开启5天打卡学习之旅</p>
+				<div class="success_next_ercode"><img src="https://img.sharingschool.com/activity/images/qrcode5.png"  alt="小私塾二维码"/></div>
+				<p class="success_next_text3">你离奖品只差最后一步啦!</p>
+			</div>
+		</div>
+		<!-- 成功页面6 -->
+		<div class="pa wrap_success" id="wrap_success6">
+			<div class="success_toppic">
+				<div class="success_toppic_tick"></div>
+				<p>报名成功</p>
+			</div>
+			<div class="success_baibox">
+				<p class="success_next_text1">长按识别二维码,加老师微信</p>
+				<p class="success_next_text2">开启5天打卡学习之旅</p>
+				<div class="success_next_ercode"><img src="https://img.sharingschool.com/activity/images/qrcode6.png"  alt="小私塾二维码"/></div>
+				<p class="success_next_text3">你离奖品只差最后一步啦!</p>
+			</div>
+		</div>
+		<!-- 成功页面7 -->
+		<div class="pa wrap_success" id="wrap_success7">
+			<div class="success_toppic">
+				<div class="success_toppic_tick"></div>
+				<p>报名成功</p>
+			</div>
+			<div class="success_baibox">
+				<p class="success_next_text1">长按识别二维码,加老师微信</p>
+				<p class="success_next_text2">开启5天打卡学习之旅</p>
+				<div class="success_next_ercode"><img src="https://img.sharingschool.com/activity/images/qrcode7.png"  alt="小私塾二维码"/></div>
+				<p class="success_next_text3">你离奖品只差最后一步啦!</p>
+			</div>
+		</div>
+		<!-- 成功页面8 -->
+		<div class="pa wrap_success" id="wrap_success8">
+			<div class="success_toppic">
+				<div class="success_toppic_tick"></div>
+				<p>报名成功</p>
+			</div>
+			<div class="success_baibox">
+				<p class="success_next_text1">长按识别二维码,加老师微信</p>
+				<p class="success_next_text2">开启5天打卡学习之旅</p>
+				<div class="success_next_ercode"><img src="https://img.sharingschool.com/activity/images/qrcode8.png"  alt="小私塾二维码"/></div>
 				<p class="success_next_text3">你离奖品只差最后一步啦!</p>
 			</div>
 		</div>
@@ -179,9 +246,10 @@
 		win.addEventListener(reEvt, reFontSize);
 		doc.addEventListener("DOMContentLoaded", reFontSize);
 	})(document, window);
-
+	$(function(){
+		jssdk();
+	});
 	var box=$('#index_pic1_marquee'),oUl=box.find('.mUl');
-	var times = '[[${timeLimit}]]';
 	var codeCheck = false;
 	var libId = '[[${libId}]]';
 	var type = '[[${type}]]';
@@ -220,5 +288,85 @@
       $(this).css({ marginTop: "0px" }).find("li:first").appendTo(this)
     })
   }
+
+	function  jssdk(){
+		$.ajax({
+			url : "https://book.sharingschool.com/weixin/question/wxjssdk",
+			type : 'post',
+			dataType : 'json',
+			crossDomain: true,
+			data : {
+				'url' : location.href.split('#')[0]
+			},
+			success : function(data) {
+				if(data && data.code == 999){
+					wx.config({
+						debug : false,
+						appId : data.data.appId,
+						timestamp : data.data.timestamp,
+						nonceStr : data.data.noncestr,
+						signature : data.data.signature,
+						jsApiList : [
+							'onMenuShareAppMessage',
+							'onMenuShareTimeline'
+						]
+					});
+					var title="小塾学伴19.9元体验限时抢";
+					// var imgUrl='http://aikmt.sharingschool.com/H5/H5_brand/images/title.png';
+					var imgUrl='https://aikmt.sharingschool.com/H5/H5_brand/images/title.png';
+					var desc ="小学生作业管理神器19.9元立抢!无锡家长专享";
+					var link = "https://book.sharingschool.com/weixin/payment/index.html?type="+type;
+					wx.ready(function () {
+						// 2. 分享接口
+						// 2.1 监听“分享给朋友”,按钮点击、自定义分享内容及分享结果接口
+						wx.onMenuShareAppMessage({
+							title: title,
+							desc: desc,
+							link:link,
+							imgUrl: imgUrl,
+
+							trigger: function (res) {
+								// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容,因为客户端分享操作是一个同步操作,这时候使用ajax的回包会还没有返回
+							},
+							success: function (res) {
+
+							},
+							cancel: function (res) {
+
+							},
+							fail: function (res) {
+								alert(JSON.stringify(res));
+							}
+						});
+
+
+						// 2.2 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
+						wx.onMenuShareTimeline({
+							title: title,
+							link:link,
+							imgUrl: imgUrl,
+							trigger: function (res) {
+								// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容,因为客户端分享操作是一个同步操作,这时候使用ajax的回包会还没有返回
+							},
+							success: function (res) {
+
+							},
+							cancel: function (res) {
+
+							},
+							fail: function (res) {
+								$.toast(JSON.stringify(res),"cancel");
+							}
+						});
+
+					});
+
+					wx.error(function (res) {
+						$.toast(res.errMsg,"cancel");
+					});
+				}
+			}
+		});
+	}
 </script>
 </html>