<html lang="en"> <head> <meta http-equiv="Content-Type" content="span/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="divport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" /> <meta name="screen-orientation" content="portrait"> </meta> <meta name="x5-orientation" content="portrait"> </meta> <title>支付订单</title> </head> <style> body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, spanarea, p, blockquote, th, td { margin: 0; padding: 0; } html, body { height: 100%; margin: 0; padding: 0; } .paySuccess { width: 100%; height: 100%; position: relative; text-align: center; background: url('https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/bg.jpg') no-repeat; background-size: 100% 100%; padding-top: 3.1rem; box-sizing: border-box; } /* */ .img_bg_M .received_img { position: absolute; right: 0.14rem; top: 0.67rem; width: 0.81rem; height: 0.65rem; display: none; } .img_bg_M { width: 100%; height: 2.14rem; background-image: url(https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/M_200.png); background-size: 100% 100%; background-repeat: no-repeat; position: relative; } .img_bg_M .imgBtn { margin-top: 0.08rem; background: url('https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/buy_btn.png') no-repeat; background-size: 100% 100%; padding: 0.09rem 0.12rem; } .img_bg_M .ylImg { position: absolute; right: 0; bottom: 0; width: 0.85rem; } .use_oupon { width: 3.14rem; height: 0.4rem; margin-top: 0.16rem; margin-left: 0.32rem; display: flex; flex-direction: row; align-items: center; justify-content: space-between; } .use_news { display: flex; flex-direction: row; align-items: center; } .use_news img { width: 0.4rem; height: 0.4rem; overflow: hidden; } .use_news div { height: 0.4rem; margin-left: 0.1rem; display: flex; flex-direction: column; justify-content: space-around; } .use_news div p:nth-child(1) { font-size: 0.12rem; color: #111111; text-align: left; } .use_news div p:nth-child(2) { font-size: 0.1rem; color: #888888; width: 1.8rem; overflow: hidden; text-align: left; } .click_use p { font-size: 0.11rem; color: #E03234; text-align: center; line-height: 0.25rem; } .click_use { width: 0.8rem; height: 0.25rem; border: solid 1px #E03234; } </style> <body> <div class="paySuccess"> <div class="img_bg_M"> <div class="img_bg_text" style="position:relative;width: 53%; margin-left: 45%;height: 1.18rem;display: flex;flex-direction: column;align-items: center;padding-top: 0.1rem"> <p class="img_bg_p1" style="font-size: 0.26rem;color: #E03234;padding-top: 0.1rem;font-weight: bold">无敌抵用券</p> <p class="img_bg_p2" style="font-size: 0.13rem;color: #E03234;padding-top: 0.07rem;"> 有效截止日期: </p> <p class="imgBtn" style="font-size: 0.15rem;color: #E03234;">返回活动首页</p> <img class="ylImg" src="https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/received@3x.png" alt=""> </div> <div class="use_oupon"> <div class="use_news"> <img src="https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/tx_bg.png" alt=""> <div> <p class="use_o"></p> <p class="use_t"></p> </div> </div> <div class="click_use"> <p>我的优惠券</p> </div> </div> </div> </div> </body> <script type="text/javascript" src="../js/autosize2.js"></script> <script type="text/javascript" src="../js/jquery-1.10.2.js"></script> <script type="text/javascript" src="../js/layer/layer.js"></script> <script type="text/javascript" src="../js/md5.js"></script> <script type="text/javascript" src="../js/mian.js"></script> <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script> <script> $(function() { pushHistory(); window.addEventListener("popstate", function(e) { //根据自己的需求实现自己的功能 window.location.href = 'https://activity.oytour.com/html/GT_activities.html'; }, false); function pushHistory() { var state = { title: "title", url: "#" }; window.history.pushState(state, "title", "#"); } }); let href = window.location.href; // let href = 'https://127.0.0.1:5500/html/GT_activities.html'; // let href='https://127.0.0.1:5500/html/GT_activities.html?customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NzM0NjY2NjMuMCwiZXhwIjoxNTczNTUzMDYzLjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6NH19.hX2b2MqSWYmWS0k3YsthxW-T6UxarIm5rdbqCVQtxdQ&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=xcx'; let userInfo = {}; let platform = ''; // 判断是app和小程序跳转过来的 if (href.split('?')[1]) { let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null; userInfo = { customerId: param[0].split('=')[1], accountId: param[1].split('=')[1], token: param[2].split('=')[1], secretKey: param[3].split('=')[1] } platform = param[4].split('=')[1] } else { if (localStorage.u) { userInfo = JSON.parse(localStorage.u); } } localStorage.userInfo = JSON.stringify(userInfo) $.ajax({ type: "POST", url: `${getApiUrl().urlJava}api/appActivity/getUserPurchaseTime`, contentType: "application/json", data: getJavaData({}), async: false, success: function(res) { if (res.resultCode === 1) { // let activityEndDate = res.data.activityEndDate.replace('T', ' ').replace(/-/g, '/'); //活动结束时间 let data = res.data; let activityEndDate = data.activityEndDate.split('T')[0].replace(/-/g, '.'); //活动结束时间 let str = ""; str += ` <div class="img_bg_text" style="position:relative;width: 53%; margin-left: 45%;height: 1.18rem;display: flex;flex-direction: column;align-items: center;padding-top: 0.1rem"> <p class="img_bg_p1" style="font-size: 0.26rem;color: #E03234;padding-top: 0.1rem;font-weight: bold">无敌抵用券</p> <p class="img_bg_p2" style="font-size: 0.13rem;color: #E03234;padding-top: 0.07rem;"> 有效截止日期:${activityEndDate} </p> <p class="imgBtn" style="font-size: 0.15rem;color: #E03234;">返回活动首页</p> <img class="ylImg" src="https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/pay/yl.png" alt=""> </div> <div class="use_oupon"> <div class="use_news"> <img src="https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/tx_bg.png" alt=""> <div> <p class="use_o">${data.contact}</p> <p class="use_t">${data.customerName}</p> </div> </div> <div class="click_use"> <p>我的优惠券</p> </div> </div> `; $('.img_bg_M').html(str); } }, error: function(res) { layer.msg(res.message) } }) $('.imgBtn').click(function() { if (platform == "xcx") { // window.location.href = `http://127.0.0.1:5500/html/GT_activities.html?customerId=${userInfo.customerId}&accountId=${userInfo.accountId}&token=${userInfo.token}&secretKey=${userInfo.secretKey}&platform=xcx`; window.location.href = `https://activity.oytour.com/html/GT_activities.html?customerId=${userInfo.customerId}&accountId=${userInfo.accountId}&token=${userInfo.token}&secretKey=${userInfo.secretKey}&platform=xcx`; } else { window.location.href = "https://activity.oytour.com/html/GT_activities.html" } }) $('.click_use').click(function() { if (platform == "xcx") { wx.miniProgram.getEnv(function(res) { window.wx.miniProgram.navigateTo({ url: `/pages/member/Coupon/Coupon`, }); }); } else { window.location.href = "https://activity.oytour.com/html/coupons.html" } }) </script> </html>