2022-05-30 13:35:00 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
|
|
<head>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
<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="http://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage1_3_0.css" />
|
|
|
|
|
<script src="http://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api1_3_0.js"></script>
|
|
|
|
|
<style>
|
|
|
|
|
* {
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 0;
|
|
|
|
|
font-family: HYQiHei;
|
|
|
|
|
}
|
2022-05-30 13:35:00 +08:00
|
|
|
|
|
2022-06-13 16:49:06 +08:00
|
|
|
|
html {
|
|
|
|
|
font-size: 26.66666667vw;
|
|
|
|
|
}
|
2022-05-30 13:35:00 +08:00
|
|
|
|
|
2022-06-13 16:49:06 +08:00
|
|
|
|
body {
|
|
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
2022-05-30 13:35:00 +08:00
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
<div id="reduce">
|
|
|
|
|
<!-- 弹出框 -->
|
|
|
|
|
<div class="mask" v-if="maskshow"></div>
|
|
|
|
|
<!-- 单条弹出框 -->
|
|
|
|
|
<div class="prompt" :class="promtshow?'proactive':''">
|
|
|
|
|
{{this.promttip}}
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 弹出提示 -->
|
|
|
|
|
<div class="popboxshow" v-if="popboxshow" :class="popboxshow?'active':''">
|
|
|
|
|
<div class="tip">
|
|
|
|
|
<p>{{tiptext}}</p>
|
|
|
|
|
<span @click="knowFn">知道了</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="couponShow">
|
|
|
|
|
<div class="coupon-left">
|
|
|
|
|
<p class="coupon_money">
|
|
|
|
|
<span>¥</span>{{reduceInfo.reduce_amount}}
|
|
|
|
|
</p>
|
|
|
|
|
<p class="full_money">满{{reduceInfo.denomination}}可用</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="coupon-right">
|
|
|
|
|
<p class="title">{{reduceInfo.batch_goods_name}}</p>
|
|
|
|
|
<p style="font-size: 0.11rem">
|
|
|
|
|
{{reduceInfo.card_type|cardType}}可用
|
|
|
|
|
</p>
|
|
|
|
|
<p class="validity">
|
|
|
|
|
有效期:{{reduceInfo.time_limit.effect_time.start_time}}至{{reduceInfo.time_limit.effect_time.end_time}}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="receiveBtn" @click="receiveFn">立即领取</div>
|
|
|
|
|
<div class="coupon_explain">
|
|
|
|
|
<h1>- {{reduceInfo.batch_goods_name}}兑换说明 -</h1>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<h3>使用须知</h3>
|
|
|
|
|
<p>
|
|
|
|
|
1、在{{reduceInfo.channel==1?'支付宝H5':'微信APP内打开链接'}},点击【一键领取】完成领取{{reduceInfo.channel==1?'支付宝':'微信'}}立减金<br />
|
|
|
|
|
2、{{reduceInfo.channel==1?'支付宝':'微信'}}立减金一旦领取不可撤销、不可转让。注意不要将兑换券泄露给他人
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<h3>使用规则</h3>
|
|
|
|
|
<p v-html="reduceInfo.instruction"></p>
|
|
|
|
|
</div>
|
2022-05-30 13:35:00 +08:00
|
|
|
|
</div>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
</div>
|
2022-05-30 13:35:00 +08:00
|
|
|
|
</body>
|
|
|
|
|
<script>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
new Vue({
|
|
|
|
|
el: "#reduce",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
plaflam: 1, //支付宝
|
|
|
|
|
promtshow: false,
|
|
|
|
|
promttip: "警告提示",
|
|
|
|
|
popboxshow: false,
|
|
|
|
|
maskshow: false,
|
|
|
|
|
tiptext: "错误提示",
|
|
|
|
|
goodInfo: {}, //商品信息
|
|
|
|
|
reduceInfo: {}, //券信息
|
|
|
|
|
orderId: '',
|
|
|
|
|
tip: `1、立减金自领取之日起0天有效,请在有效期内使用<br />
|
|
|
|
|
2、微信立减金自领取后每个立减金一次性使用,不兑换,不找零,到期后自动失效,逾期未使用不再补发。使用微信支付进行付款(大于立减金面额0.01元以上)即可自动抵扣<br />
|
|
|
|
|
3、多张立减金可在单笔微信支付订单中一起使用,但当用户的立减金超过8张时,系统会选取其中一部分使用,不保证在一张订单中全部使用<br />
|
|
|
|
|
4、在中国境内商户使用微信支付即可使用,少数特定商户(包括但不限于:CoCo奶茶、优衣库、星巴克、肯德基、必胜客、同程艺龙、热风、太平鸟、孩子王、航联保险、华为商城、Miss
|
|
|
|
|
Sixty、Ochirly、Apple商城、FivePlus、信用卡还款、零钱通、理财通等)、以及社交支付(如转账、红包、个人收款码支付等)及合单支付(微信支付订单号为44开头的交易)无法使用立减金<br />
|
|
|
|
|
5、使用立减金的微信支付订单,如发生全额退款,且立减金仍在有效期内,立减金将自动退还给用户,如立减金已过期,则不退还给用户;如发生部分退款,用户支付金额将按比例原路退还,立减金将不退还给用户<br />`,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
/* 获取立减金信息*/
|
|
|
|
|
this.goodInfo = JSON.parse(sessionStorage.getItem("goodsInfo"));
|
|
|
|
|
this.reduceInfo = JSON.parse(
|
|
|
|
|
sessionStorage.getItem("goodsInfo")
|
|
|
|
|
).entity;
|
|
|
|
|
this.plaflam = JSON.parse(
|
|
|
|
|
sessionStorage.getItem("goodsInfo")
|
|
|
|
|
).entity.channel;
|
|
|
|
|
console.log(118, this.goodInfo);
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
|
|
|
|
cardType(val) {
|
|
|
|
|
return val
|
|
|
|
|
.map((item) => {
|
|
|
|
|
return item == 1 ? "借记卡" : "信用卡" + " ";
|
|
|
|
|
})
|
|
|
|
|
.join(" ");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
receiveFn() {
|
|
|
|
|
let self = this;
|
|
|
|
|
let data = {
|
|
|
|
|
key: sessionStorage.getItem("key"),
|
|
|
|
|
product_id: this.goodInfo.product_id,
|
|
|
|
|
code_batch_id: this.goodInfo.code_batch_id,
|
|
|
|
|
token: sessionStorage.getItem("token"),
|
|
|
|
|
};
|
|
|
|
|
req.axiosPost("/key/usage", data)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
sessionStorage.setItem("lastid", self.goodInfo.product_id);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.orderId = res.data.order_number;
|
|
|
|
|
let ua = navigator.userAgent.toLowerCase(); //判断用户打开链接环境
|
|
|
|
|
if (self.plaflam == 1) {
|
|
|
|
|
//支付宝-微信环境中不能唤起支付宝
|
|
|
|
|
self.toLinkAlipay();
|
|
|
|
|
}
|
|
|
|
|
if (self.plaflam == 2) {
|
|
|
|
|
//微信
|
|
|
|
|
if (ua.indexOf("dingtalk") > -1) {
|
|
|
|
|
//在钉钉内置环境打开,不能唤起微信小程序
|
|
|
|
|
self.openErrorDialog("请在其他浏览器打开!");
|
|
|
|
|
} else {
|
|
|
|
|
//唤起微信福利官小程序
|
|
|
|
|
window.location.replace(res.data.redirect_url);
|
2022-05-30 13:35:00 +08:00
|
|
|
|
}
|
2022-06-13 16:49:06 +08:00
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
self.openErrorDialog(res.message);
|
|
|
|
|
if (res.code == -1) {
|
|
|
|
|
let goodsCount = sessionStorage.getItem("goodsCount");
|
|
|
|
|
if (goodsCount > 1) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
window.location.replace("./homepage.html");
|
|
|
|
|
}, 3000);
|
|
|
|
|
} else {
|
|
|
|
|
let backUrl = window.history.length;
|
|
|
|
|
if (backUrl) {
|
|
|
|
|
history.go(-backUrl + 1);
|
|
|
|
|
}
|
2022-05-30 13:35:00 +08:00
|
|
|
|
}
|
2022-06-13 16:49:06 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
toLinkAlipay() {
|
|
|
|
|
//支付宝H5跳转
|
|
|
|
|
let self = this;
|
|
|
|
|
let banklink = encodeURIComponent(
|
|
|
|
|
window.location.origin +
|
|
|
|
|
"/optimization/alipay.html?orderNumber=" + this.orderId
|
|
|
|
|
);
|
|
|
|
|
let link = "http://openapi.1688sup.com/alipay/oauth?jump=" + banklink;
|
|
|
|
|
let ua = navigator.userAgent.toLowerCase(); //判断用户打开链接环境
|
|
|
|
|
if (ua.match(/MicroMessenger/i) == "micromessenger") {
|
|
|
|
|
//复制链接地址,提醒去浏览器打开
|
|
|
|
|
this.copyTextToClipboard(link);
|
|
|
|
|
} else {
|
|
|
|
|
//唤起支付宝
|
|
|
|
|
window.location.replace(link);
|
2022-05-30 13:35:00 +08:00
|
|
|
|
}
|
2022-06-13 16:49:06 +08:00
|
|
|
|
},
|
|
|
|
|
//错误弹出框关闭
|
|
|
|
|
knowFn() {
|
|
|
|
|
this.popboxshow = false;
|
|
|
|
|
this.maskshow = false;
|
|
|
|
|
},
|
|
|
|
|
//错误弹出框
|
|
|
|
|
openErrorDialog(tip) {
|
|
|
|
|
this.maskshow = true;
|
|
|
|
|
this.tiptext = tip;
|
|
|
|
|
this.popboxshow = true;
|
|
|
|
|
},
|
|
|
|
|
// 单条弹框
|
|
|
|
|
openDialog(tip) {
|
|
|
|
|
this.promtshow = true;
|
|
|
|
|
this.promttip = tip;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.promtshow = false;
|
|
|
|
|
this.promttip = "";
|
|
|
|
|
}, 3000);
|
|
|
|
|
},
|
|
|
|
|
//复制文本
|
|
|
|
|
copyTextToClipboard(text) {
|
|
|
|
|
var textArea = document.createElement("textarea");
|
|
|
|
|
textArea.value = text;
|
|
|
|
|
document.body.appendChild(textArea);
|
|
|
|
|
textArea.select();
|
|
|
|
|
document.execCommand("copy");
|
|
|
|
|
this.openDialog("复制成功,请到浏览器打开");
|
|
|
|
|
document.body.removeChild(textArea);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|
2022-05-30 13:35:00 +08:00
|
|
|
|
</script>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
|
2022-05-30 13:35:00 +08:00
|
|
|
|
</html>
|