mobileclient/alipay.html

198 lines
7.8 KiB
HTML
Raw Normal View History

2022-06-13 16:49:06 +08:00
<!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" />
2023-03-01 15:02:48 +08:00
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage2_0.css" />
2024-04-11 03:05:05 +08:00
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api2_0.js?v=1000"></script>
2023-03-13 10:47:44 +08:00
<!-- <script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api_test.js"></script> -->
2022-06-13 16:49:06 +08:00
<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%;
}
.bind_btn {
filter: grayscale(100%);
}
2022-06-13 16:49:06 +08:00
</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>
2023-12-20 15:16:04 +08:00
<div class="coupon_title" :class="couponInfo.voucher_name.length>10?'small_font':''">
2022-06-13 16:49:06 +08:00
{{couponInfo.voucher_name}}
2023-12-20 15:16:04 +08:00
<span class="send_num" v-if="couponInfo.rule.send_num>1">x{{couponInfo.rule.send_num||1}}</span>
2022-06-13 16:49:06 +08:00
</div>
<div class="coupon_full">
满{{reduceInfo.full}}元可用
</div>
</div>
<div @click="toReceive" :class="reduceInfo.status == 0 ? 'receive_btn' : 'receive_btn bind_btn'">
{{reduceInfo.status|statusFn}}</div>
2022-06-13 16:49:06 +08:00
<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",
2024-04-22 15:30:29 +08:00
data () {
2022-06-13 16:49:06 +08:00
return {
explain: `1.在活动期间每名用户仅可参与一次活动并享受一次赠礼。请注意a如用户在参与活动前已经是亚朵酒店金卡及以上级别会员该用户无法领取亚朵酒店会员权益赠礼权益不叠加b喜马拉雅会员叠加上限为10年cQQ音乐会员叠加上限为120个月。】如用户合作平台会员叠加含本次活动领取时长达到上限时间用户将无法完整领取该合作平台赠礼因此无法领取的赠礼不做补发购买前请您确认您在合作平台会员有效期情况。
2.活动期间,开通/续费严选Pro会员年卡后赠礼将发放至“联合会员领取页面”可前往一键领取赠礼仅支持领取到同一手机号如遇到网络问题等原因可能会存在延迟到账的情况请在24小时内查看到账情况。
3.赠礼需要用户在成功购买严选Pro会员年卡后15天内领取请注意及时进行手机号充值和领取否则由此产生的损失由您自行承担网易严选及合作平台不支持任何逾期赠礼的领取、补发或其他补偿服务。
6.仅限中国大陆手机号参与本活动及领取赠礼,非中国大陆手机号暂不支持领取赠礼。
7.领取赠礼时,如您因填错/登录错账号或者误操作等原因导致充值到错误账号,网易严选及合
作平台不支持退换、补发、补偿或退款,请您在领取前务必认真核对手机号及账号。
8.开通严选Pro会员后有效期即时生效不支持退款原属于严选Pro会员或赠礼会员的老用
户直接在原剩余有效期时长上叠加,新客户则自开通日起算。
9.本次活动每个用户仅限参与1次请勿重复参与。`,
orderNumber: "N/WgFb11HOdKx7N/TaBcr6WuYVOuwSZJ9gxa7DUtUN8=",
2022-06-13 16:49:06 +08:00
openId: "+UfCzEgd0h2Psj245UmcyHfW6QW0msZIAxO6RJBZ7Hk=",
popboxshow: false,
maskshow: false,
reduceInfo: {},
couponInfo: {},
disabledBtn: false,
2022-06-13 16:49:06 +08:00
};
},
async created () {
//唤起支付宝授权,打开领取
this.openId = this.getQueryString(
window.location.search,
"alipayuserid"
);
2022-06-13 16:49:06 +08:00
let orderNumber = this.getQueryString(
window.location.search,
"orderNumber"
);
this.orderNumber = orderNumber;
await this.getOrderDetail(this.orderNumber);
2022-06-13 16:49:06 +08:00
},
methods: {
2024-04-22 15:30:29 +08:00
getQueryString (path, name) {
2022-06-13 16:49:06 +08:00
//获取浏览器地址栏的参数
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = path.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
},
//获取订单详情
2024-04-22 15:30:29 +08:00
getOrderDetail (id, isNext = false, message = '') {
2022-06-13 16:49:06 +08:00
req.axiosGet('/voucher/info', {
order_number: id
}).then(res => {
this.reduceInfo = res.data.rule;
this.reduceInfo.status = res.data.status;
2022-06-13 16:49:06 +08:00
this.couponInfo = res.data;
sessionStorage.setItem('bm_auth', JSON.stringify(res.data));
if (isNext) {
window.location.href = './advise.html';
sessionStorage.setItem('messageTip', message);
}
2022-06-13 16:49:06 +08:00
}).catch();
},
2024-04-22 15:30:29 +08:00
toReceive () {
2022-06-13 16:49:06 +08:00
let self = this;
//领取立减金
let data = {
order_number: this.orderNumber,
channel: "1", //立减金发放渠道1支付宝2微信小程序
channel_user_id: this.openId, // "渠道用户id"
receive_mode: 1,
2022-06-13 16:49:06 +08:00
};
if (this.disabledBtn) {
return;
}
this.disabledBtn = true;
2022-06-13 16:49:06 +08:00
req.axiosPost("/voucher/grant", data)
.then((res) => {
setTimeout(() => {
this.disabledBtn = false;
}, 2000);
const text = res.code == 200 ? '' : res.message;
this.getOrderDetail(this.orderNumber, true, text);
2022-06-13 16:49:06 +08:00
})
.catch((err) => { });
2022-06-13 16:49:06 +08:00
},
//提示弹出框
2024-04-22 15:30:29 +08:00
openDialog (tip) {
2022-06-13 16:49:06 +08:00
this.maskshow = true;
this.tiptext = tip;
this.popboxshow = true;
},
2024-04-22 15:30:29 +08:00
knowFn () {
2022-06-13 16:49:06 +08:00
this.maskshow = false;
this.tiptext = '';
this.popboxshow = false;
}
},
filters: {
2024-04-22 15:30:29 +08:00
statusFn (val) {
2022-06-13 16:49:06 +08:00
switch (val) {
case 0:
return buttonTextFun(2, 'receive');
2022-06-13 16:49:06 +08:00
break;
case 1:
return buttonTextFun(2, 'receive');
2022-06-13 16:49:06 +08:00
break;
case 2:
return buttonTextFun(2, 'received');
2022-06-13 16:49:06 +08:00
break;
case 3:
return buttonTextFun(2, 'receive');
2022-06-13 16:49:06 +08:00
break;
case 5:
return '已过期';
break;
default:
return buttonTextFun(2, 'receive');
2022-06-13 16:49:06 +08:00
break;
}
}
}
});
</script>
</html>