mobileclient/营销系统C端 2.0 正式环境/alipay.html

189 lines
7.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover" />
<title>支付宝立减金领取</title>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/common/vue.min.js?v=1367936144322" type="text/javascript"
charset="utf-8"></script>
<script type="text/javascript" src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/common/axios.js?v=1367936144322">
</script>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/js/swiper.min.js"></script>
<link href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/css/swiper.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage1_3_0.css" />
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api2_0.js"></script>
<style>
* {
margin: 0 auto;
padding: 0;
font-family: HYQiHei;
}
html {
font-size: 26.66666667vw;
}
body {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
</style>
</head>
<body>
<div id="alipay">
<!-- 弹出框 -->
<div class="mask" v-if="maskshow"></div>
<!-- 弹出提示 -->
<div class="popboxshow" v-if="popboxshow" :class="popboxshow?'active':''">
<div class="tip">
<p>{{tiptext}}</p>
<span @click="knowFn">知道了</span>
</div>
</div>
<div class="coupon_content">
<img class="coupon_bg"
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/alipay_coupon_bg.png" alt="" />
<div class="coupon_info">
<div class="coupon_money"><span class="symbol"></span>{{reduceInfo.reduce}}</div>
<div class="coupon_title" :class="31>12?'small_font':''">
{{couponInfo.voucher_name}}
</div>
<div class="coupon_full">
满{{reduceInfo.full}}元可用
</div>
</div>
<div class="receive_btn" @click="toReceive">{{reduceInfo.status|statusFn}}</div>
<div class="validity">
有效期:{{reduceInfo.time_limit.effect_time.start_time}}至{{reduceInfo.time_limit.effect_time.end_time}}</div>
</div>
<!-- 使用须知 -->
<div class="notice">
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/use-word.png"
class="rule_title" alt="" />
<div class="instructions" v-html="reduceInfo.instruction"></div>
</div>
</div>
</body>
<script>
new Vue({
el: "#alipay",
data() {
return {
explain: `1.在活动期间每名用户仅可参与一次活动并享受一次赠礼。请注意a如用户在参与活动前已经是亚朵酒店金卡及以上级别会员该用户无法领取亚朵酒店会员权益赠礼权益不叠加b喜马拉雅会员叠加上限为10年cQQ音乐会员叠加上限为120个月。】如用户合作平台会员叠加含本次活动领取时长达到上限时间用户将无法完整领取该合作平台赠礼因此无法领取的赠礼不做补发购买前请您确认您在合作平台会员有效期情况。
2.活动期间,开通/续费严选Pro会员年卡后赠礼将发放至“联合会员领取页面”可前往一键领取赠礼仅支持领取到同一手机号如遇到网络问题等原因可能会存在延迟到账的情况请在24小时内查看到账情况。
3.赠礼需要用户在成功购买严选Pro会员年卡后15天内领取请注意及时进行手机号充值和领取否则由此产生的损失由您自行承担网易严选及合作平台不支持任何逾期赠礼的领取、补发或其他补偿服务。
6.仅限中国大陆手机号参与本活动及领取赠礼,非中国大陆手机号暂不支持领取赠礼。
7.领取赠礼时,如您因填错/登录错账号或者误操作等原因导致充值到错误账号,网易严选及合
作平台不支持退换、补发、补偿或退款,请您在领取前务必认真核对手机号及账号。
8.开通严选Pro会员后有效期即时生效不支持退款原属于严选Pro会员或赠礼会员的老用
户直接在原剩余有效期时长上叠加,新客户则自开通日起算。
9.本次活动每个用户仅限参与1次请勿重复参与。`,
orderNumber: "j6o+nJz6L7Zi2k+9HZD5kUYpKwUYUu2tByteGkSGZu8=",
openId: "+UfCzEgd0h2Psj245UmcyHfW6QW0msZIAxO6RJBZ7Hk=",
popboxshow: false,
maskshow: false,
reduceInfo: {},
couponInfo: {},
disabledBtn:false,
};
},
created() {
//唤起支付宝授权,打开领取
this.openId = this.getQueryString(
window.location.search,
"alipayuserid"
);
let orderNumber = this.getQueryString(
window.location.search,
"orderNumber"
);
this.orderNumber=orderNumber;
this.getOrderDetail(this.orderNumber);
},
methods: {
getQueryString(path, name) {
//获取浏览器地址栏的参数
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = path.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
},
//获取订单详情
getOrderDetail(id) {
req.axiosGet('/voucher/info', {
order_number: id
}).then(res => {
this.reduceInfo = res.data.rule;
this.couponInfo = res.data;
}).catch();
},
toReceive() {
let self = this;
//领取立减金
let data = {
order_number: this.orderNumber,
channel: "1", //立减金发放渠道1支付宝2微信小程序
channel_user_id: this.openId, // "渠道用户id"
};
if(this.disabledBtn){
return
}
this.disabledBtn = true;
req.axiosPost("/voucher/grant", data)
.then((res) => {
setTimeout(()=>{
this.disabledBtn = false;
},2000)
if (res.code == 200) {
window.location.href = './advise.html'
sessionStorage.setItem('messageTip', '');
} else {
window.location.href = './advise.html'
sessionStorage.setItem('messageTip', res.message);
}
})
.catch((err) => {});
},
//提示弹出框
openDialog(tip) {
this.maskshow = true;
this.tiptext = tip;
this.popboxshow = true;
},
knowFn() {
this.maskshow = false;
this.tiptext = '';
this.popboxshow = false;
}
},
filters: {
statusFn(val) {
switch (val) {
case 0:
return '立即领取';
break;
case 1:
return '充值中';
break;
case 2:
return '已完成';
break;
case 3:
return '充值失败';
break;
case 5:
return '已过期';
break;
default:
return '立即领取';
break;
}
}
}
});
</script>
</html>