1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <extend name="Public:pinduoduobase" />
- <block name="content">
- <script type="text/javascript">
- window.use_screen_base = '750';
- (function (a, b) {
- var c = "orientationchange" in b ? "orientationchange" : "resize",
- d = use_screen_base.indexOf("_mate"),
- e = parseInt(use_screen_base),
- f = a.documentElement,
- g = function () {
- var a = f.clientWidth,
- c = b.innerWidth;
- c >= 750 ? c = 750 : c;
- f.style.fontSize = 100 * (c / e) + "px"
- };
- if (/iPad.*OS|iPhone.*OS/.test(navigator.userAgent) && d > 0) {
- var h = a.querySelectorAll("meta[name=viewport]"),
- i = b.devicePixelRatio;
- i = i != 1 ? 2 : 1, h[0] && h[0].setAttribute("content",
- "width=device-width, user-scalable=no, minimum-scale=" + 1 / i + ", maximum-scale=" + 1 / i +
- ", initial-scale=" + 1 / i)
- }
- g(), b.addEventListener(c, g, !1), delete use_screen_base
- })(document, window);
- </script>
- <link rel="stylesheet" href="__PUBLIC__/mogu/bonus/css/index.css">
- <div id="main">
- <div class="duo-red-packet-container mobile-container">
- <div class="rp-main">
- <div class="main-bg-top"><img src="__PUBLIC__/mogu/bonus/image/red_packet_main_bg_top.png"></div>
- <div class="main-bg-middle"><img src="__PUBLIC__/mogu/bonus/image/red_packet_main_bg_middle.png"></div>
- <div class="main-bg-bottom">
- <img src="__PUBLIC__/mogu/bonus/image/red_packet_main_bg_bottom.png">
- </div>
- <img src="__PUBLIC__/mogu/bonus/image/red_packet_main_bg_ribbon.png" class="main-bg-ribbon">
- <img src="__PUBLIC__/mogu/bonus/image/cl_main_title.png" class="main-title">
- <img src="__PUBLIC__/mogu/bonus/image/cl_sub_title.png" class="main-sub-title">
- <!-- 未开 -->
- <div class="not_open">
- <img src="__PUBLIC__/mogu/bonus/image/red_packet_main_rp_bg.png" class="main-red-packet">
- <div role="button" class="main-open-btn">
- <img src="__PUBLIC__/mogu/bonus/image/red_packet_main_rp_open.png" class="main-open-btn-open">
- </div>
- </div>
- </div>
- </div>
- </div>
- {~W('Share/common_quan_share',array($id))}
- <script>
- var id = {$id};
- $('.main-open-btn').click(function () {
- $.ajax({
- url: 'index.php?s=/bonus/get_bonus_voucher/',
- type: 'GET',
- dataType: 'json',
- data: {
- voucher_id: id
- },
- })
- .done(function (res) {
- if (res.code == 0) {
- if (res.get_voucher_info.end_time > res.cur_time) {
- window.location.href = '{:U("bonus/bonus","id=$id&type=1","")}';
- } else {
- window.location.href = '{:U("bonus/overdue")}';
- }
- return;
- }
- if (res.code == -1) {
- alert('券被抢光了');
- return;
- }
- if (res.code == -2) {
- console.log('已领过')
- if (res.get_voucher_info.end_time > res.cur_time) {
- console.log('有效')
- window.location.href = '{:U("bonus/bonus","id=$id","")}';
- } else {
- window.location.href = '{:U("bonus/overdue")}';
- }
- return;
- }
- })
- .fail(function () {
- alert('请求错误');
- })
- })
- </script>
- </block>
|