exchange_coupons.html
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html >
<html>
<head>
<meta charset="UTF-8">
<title>微券兑换</title>
<include file="public/header" />
<include file="public/navBall" />
<body>
<ul class="integral">
<if condition='$tpshop_config[dhwz_switch] eq 1'>
<foreach name="buylist" item="v">
<li class="jfcz1">
<div>¥<span class="f_big">{$v['ToSum']}</span></div>
<div class="mb20">{$v['title']}</div>
<div><span money="{$v['ToSum']}" integral="{$v['Integral']}" class="jfzyc_btn btnpay"
onclick="duihuan(this)">立即兑换</span></div>
</li>
</foreach>
<empty name="buylist">
<p>暂无兑换信息</p>
</empty>
<else>
<p>商家未开启此功能</p>
</if>
</ul>
</body>
<if condition='$tpshop_config[dhwz_switch] eq 1'>
<script>
var gstoid="<?php echo I('stoid')?>";
function duihuan(ob) {
var mon=$(ob).attr("money");
var integral=$(ob).attr("integral");
layer.open({type:2, shadeClose: false});
$.ajax({
type:"get",
url:"/index.php?m=Mobile&c=User&a=exchangecoup&stoid="+gstoid,
data:{money:mon,integ:integral},
dataType:'json',
success: function (data) {
layer.closeAll();
layer.open({content:data.msg,time:2});
setTimeout(function () {
//window.location.href='/index.php/Mobile/User/coupon/stoid/'+gstoid;
},1000);
}
});
}
</script>
</if>
</html>