|
@@ -15,6 +15,7 @@
|
|
<dt>确认会员手机号</dt>
|
|
<dt>确认会员手机号</dt>
|
|
<dd>
|
|
<dd>
|
|
<input type="number" id="mobile"/>
|
|
<input type="number" id="mobile"/>
|
|
|
|
+ <input type="hidden" id="open" value="1"/>
|
|
</dd>
|
|
</dd>
|
|
</dl>
|
|
</dl>
|
|
<dl>
|
|
<dl>
|
|
@@ -51,17 +52,33 @@
|
|
</div>
|
|
</div>
|
|
<div id="pay"></div>
|
|
<div id="pay"></div>
|
|
<button class="button fixed-button" id="submit">确认支付</button>
|
|
<button class="button fixed-button" id="submit">确认支付</button>
|
|
|
|
+ <div class="tiplayer" style="display: none;">
|
|
|
|
+ <div class="pay-result">
|
|
|
|
+ <h3>订单信息</h3>
|
|
|
|
+ <p>VIP会员1年: <em>¥300</em></p>
|
|
|
|
+ <div class="btns">
|
|
|
|
+ <a href="#" id="unpay">未支付</a>
|
|
|
|
+ <a href="#" id="ypay">我已支付</a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<script type="text/javascript" src="js/global.js?v=099b487e"></script><script type="text/javascript" src="js/pay.js?v=099b487e"></script></body>
|
|
<script type="text/javascript" src="js/global.js?v=099b487e"></script><script type="text/javascript" src="js/pay.js?v=099b487e"></script></body>
|
|
<script>
|
|
<script>
|
|
-function pay(url,mobile,type)
|
|
|
|
|
|
+function pay(self, url,mobile,type)
|
|
{
|
|
{
|
|
|
|
+ var html = self.html();
|
|
|
|
+ self.unbind('click');
|
|
|
|
+ self.html('支付中...');
|
|
$.getJSON(url + '&json=1', {mobile:mobile,type:type}, function(t) {
|
|
$.getJSON(url + '&json=1', {mobile:mobile,type:type}, function(t) {
|
|
|
|
+ self.html(html);
|
|
if (t.status == 1) {
|
|
if (t.status == 1) {
|
|
|
|
+ $('.tiplayer').show();
|
|
$("#pay").html(t.data);
|
|
$("#pay").html(t.data);
|
|
} else {
|
|
} else {
|
|
|
|
+ submit();
|
|
|
|
+ $('.tiplayer').hide();
|
|
alert(t.msg);
|
|
alert(t.msg);
|
|
}
|
|
}
|
|
-
|
|
|
|
})
|
|
})
|
|
}
|
|
}
|
|
$(function(){
|
|
$(function(){
|
|
@@ -73,6 +90,7 @@ function pay(url,mobile,type)
|
|
$('#package').on('click','[data-package]',function(){
|
|
$('#package').on('click','[data-package]',function(){
|
|
$(this).addClass('active').siblings().removeClass('active');
|
|
$(this).addClass('active').siblings().removeClass('active');
|
|
oPackage.price = $(this).data('price');
|
|
oPackage.price = $(this).data('price');
|
|
|
|
+ oPackage.name = $(this).data('name');
|
|
oPackage.package = $(this).data('package');
|
|
oPackage.package = $(this).data('package');
|
|
oPackage.url = $(this).data('url');
|
|
oPackage.url = $(this).data('url');
|
|
$('#submit').html('确认支付¥' + oPackage.price);
|
|
$('#submit').html('确认支付¥' + oPackage.price);
|
|
@@ -81,15 +99,27 @@ function pay(url,mobile,type)
|
|
$(this).addClass('active').siblings().removeClass('active');
|
|
$(this).addClass('active').siblings().removeClass('active');
|
|
oPayType = $(this).data('type')
|
|
oPayType = $(this).data('type')
|
|
})
|
|
})
|
|
- $('#submit').click(function(){
|
|
|
|
- var mobile = $("#mobile").val();
|
|
|
|
- if(!/1\d{10}/.test(mobile)){
|
|
|
|
- alert("手机号码不正确");
|
|
|
|
- return;
|
|
|
|
|
|
+
|
|
|
|
+ function submit()
|
|
|
|
+ {
|
|
|
|
+ var open = $('#open').val();
|
|
|
|
+ if (open == 2) {
|
|
|
|
+ $('.tiplayer').show();
|
|
}
|
|
}
|
|
- //console.log(mobile,oPackage,oPayType)
|
|
|
|
- pay(oPackage.url, mobile, oPayType);
|
|
|
|
- })
|
|
|
|
|
|
+ $('#submit').unbind('click').bind('click', function(){
|
|
|
|
+ var mobile = $("#mobile").val();
|
|
|
|
+ if(!/1\d{10}/.test(mobile)){
|
|
|
|
+ alert("手机号码不正确");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ //console.log(mobile,oPackage,oPayType)
|
|
|
|
+ $('.pay-result p').html('VIP会员'+oPackage.name+': <em>¥'+oPackage.price+'</em>');
|
|
|
|
+ pay($(this), oPackage.url, mobile, oPayType);
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ submit();
|
|
|
|
+
|
|
|
|
|
|
$('.active').click();
|
|
$('.active').click();
|
|
})
|
|
})
|