feat:增加 云闪付 v2

This commit is contained in:
zhangds 2024-04-28 16:26:35 +08:00
parent ee7b1610c9
commit 9cc030c321
2 changed files with 9 additions and 169 deletions

View File

@ -1,164 +0,0 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<title>云闪付立减金</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no, email=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<script>
var docEl = document.documentElement;
docEl.style.fontSize = 100 / 375 * docEl.clientWidth + 'px';
window.addEventListener('resize', function () {
docEl.style.fontSize = 100 / 375 * docEl.clientWidth + 'px';
});
</script>
<!-- <script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
<script>
var vConsole = new VConsole();
</script> -->
<link rel="stylesheet"
href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/libs/antui/antui-all.css" />
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/libs/antui/antui.js"></script>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/libs/vue.global.js"></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/MarketingSystem/js/api2_0.js?v=1000"></script>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/libs.js"></script>
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/ysf.css">
</head>
<body ontouchstart="">
<div id="app">
<div class="container">
<div class="header">
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/ysf-logo.png" alt="">
</div>
<div class="main">
<p class="title">{{ state.batch_goods_name }}
<span class="send_num" v-if=" state.send_num > 1"> x {{state.send_num}}</span>
</p>
<div class="information">
<p class="information-p1">
满2元减1元
</p>
<p class="information-p2">
请在 2024-04-28 11:52:40 ~ 2024-04-30 23:59:59 内领取 </p>
<div class="card">
<p class="type">
借记卡
</p>
</div>
</div>
<div class="form">
<div>
<p class="form-label">云闪付账号</p>
<input maxlength="11" type="text" placeholder="请输入手机号" class="form-input">
<input maxlength="11" type="text" placeholder="请再次输入手机号" class="form-input mt0">
<p class="form-note">
温馨提示单笔交易大于2元可立减1元
</p>
</div>
<button class="form-button" @click="submit">立即领取</button>
</div>
<div class="segmentation">
<i class="left"></i>
<i class="middle"></i>
<i class="right"></i>
</div>
<div class="illustrate">
<p class="illustrate-title">可用时间</p>
<p class="received-fiexd">
领取后立即生效,有效期
1 天
</p> <!----> <!----> <!---->
<p class="illustrate-title">活动说明</p>
<div class="illustrate-text">
<p>温馨提示单笔交易大于X.01元可用立减X元同一批次活动同一券编码为同一批次活动单日领取上限为10张总领取上限为30张
<br>1.当交易时使用云闪付消费券抵扣如发生撤销、退货等操作时用户实际支付金额原路退回至支付银行卡仅全额退款消费卡券会退还至用户部分退款卡券不会退回券退回日期为D+1个工作日逾期作废
<br>2.本券需绑定众邦银行卡使用,不可与其他优惠同享,请一次性使用,不找零、不兑换、不提现、不可叠加使用,不可用于购买活期+或者其他理财产品;
<br>3.用户主扫时,可自主选择是否使用消费券及具体使用哪一张;被扫时,默认优先使用符合规则且优惠最大的消费券;
<br>4.用户同一账号有多类云闪付消费券时,优先使用可抵扣金额大的消费券进行抵扣;可抵扣金额相同时,优先使用先获取的消费券进行抵扣;当同一类云闪付消费券有不同有效期的金额时,优先使用即将到期的消费券进行抵扣;
<br>5.对使用或涉嫌使用违反活动规则或不正当方式套取银联优惠的用户及其所使用的工具包括但不限于手机号、银行卡号、APP账号等中国银联和商户有权不予其使用云闪付消费券、追回己发放的云闪付消费券
<br>6.用户使用消费券时,请将 APP 更新到最新版本。由于用户电子设备不支持、APP 未更新到最新版本、卡片挂失、换卡、账号输错等自身原因导致无法享受优惠的,该优惠后续不予补发。
<br>7.本商品使用过程中如有不明之处请联系供应商成都蓝色兄弟网络科技有限公司客服4001181216
</p>
</div>
</div>
</div>
</div>
</div>
</body>
<script>
const { createApp, reactive, onMounted } = Vue;
createApp({
setup() {
const state = reactive({
token: localStorage.getItem("token"),
ysf: {},
batch_goods_name: "",
send_num: 0
});
// 获取商品详情
const getGoodsInfo = async () => {
let params = {
token: state.token
}
let res = await req.axiosPost('/key/products', params);
if (res.code === 200) {
console.log("res 1 =>", res)
let row = res.data[0];
state.ysf = row;
state.batch_goods_name = row.entity.batch_goods_name;
state.send_num = row.entity.send_num;
}
}
// 设置字体
const fontsFun = () => {
const { denomination, reduce_amount } = this.ysf.entity;
const defaultCss = { size: '0.34rem' };
const count = String(parseFloat(denomination)).length + String(parseFloat(reduce_amount)).length + 4;
if (count > 12) {
return {
size: 0.34 - ((count - 12) / 100 * 1.8) + 'rem',
};
} else {
return defaultCss;
}
}
// 提交按钮
const submit = () => { }
onMounted(() => {
getGoodsInfo();
});
return {
submit,
state
};
}
}).mount('#app')
</script>
</html>

View File

@ -215,10 +215,6 @@
},
},
methods: {
async getGoodsInfo(token) {
let res = await req.axiosPost('/key/products', { token });
},
async isPageV2(data, type) {
return new Promise((resolve, reject) => {
try {
@ -227,7 +223,15 @@
};
req.axiosGet('/key/isOnlyOneUnionVoucher', params).then(res => {
if (res.code === 200) {
resolve(res.data.is_only_one_union_voucher)
// 获取 商品详情,存储商品详情
req.axiosPost('/key/products', { token: data.token }).then(ysfRes => {
if (ysfRes.code === 200) {
sessionStorage.setItem('goodsInfo', JSON.stringify(ysfRes.data[0]));
resolve(res.data.is_only_one_union_voucher)
} else {
resolve(false)
}
})
} else {
resolve(false)
}