2024-02-25 16:58:12 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<!-- A11Y:注意设置页面的 lang 属性 -->
|
|
|
|
|
<html lang="zh">
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<!-- A11Y:打开页面时,屏幕阅读器会首先阅读 title 的内容,确保 title 准确描述页面 -->
|
|
|
|
|
<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">
|
|
|
|
|
<!-- A11Y:如果有无障碍方面的需求,建议使用下面的 viewport 设置,不要禁止页面缩放 -->
|
|
|
|
|
<!--<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=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>
|
|
|
|
|
<link rel="stylesheet"
|
|
|
|
|
href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/libs/antui/swiper.min.css">
|
|
|
|
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/libs/antui/swiper.min.js"></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"></script>
|
|
|
|
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/libs.js"></script>
|
|
|
|
|
<link rel="stylesheet" href="./style.css">
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body ontouchstart="">
|
|
|
|
|
<div id="app">
|
2024-02-29 11:56:24 +08:00
|
|
|
|
|
|
|
|
|
<div class="am-loading am-loading-refresh" v-if="state.type === 0">
|
|
|
|
|
<div class="am-loading-indicator" aria-hidden="true">
|
|
|
|
|
<div class="am-loading-item"></div>
|
|
|
|
|
<div class="am-loading-item"></div>
|
|
|
|
|
<div class="am-loading-item"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="am-loading-text">加载中...</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-05 14:21:38 +08:00
|
|
|
|
<!-- 商品 1-->
|
2024-02-25 16:58:12 +08:00
|
|
|
|
<div class="goods-main" v-if="state.type === 1">
|
|
|
|
|
<!-- 轮播 -->
|
|
|
|
|
<div class="swiper-container am-carousel demo-swiper" id="J-swiper">
|
|
|
|
|
<div class="swiper-wrapper">
|
|
|
|
|
<div class="swiper-slide" v-for="item in state.describeUrl">
|
|
|
|
|
<img :src="item" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="swiper-pagination"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-07 14:42:51 +08:00
|
|
|
|
<div class="bm-goods-info">
|
|
|
|
|
<h4 class="title">{{state.goodsName}}</h4>
|
|
|
|
|
</div>
|
2024-02-25 16:58:12 +08:00
|
|
|
|
<!-- 说明 -->
|
2024-03-07 14:42:51 +08:00
|
|
|
|
<!-- <div class="use-mark">
|
2024-02-25 16:58:12 +08:00
|
|
|
|
<img :src="state.useMarkUrl" alt="">
|
2024-03-07 14:42:51 +08:00
|
|
|
|
</div> -->
|
2024-02-25 16:58:12 +08:00
|
|
|
|
|
|
|
|
|
<!-- 底部 -->
|
|
|
|
|
<footer class="footer">
|
|
|
|
|
<button type="button" class="footer-btn" @click="goToExchange">立即领取</button>
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-05 14:21:38 +08:00
|
|
|
|
<!-- 立减金 2-->
|
2024-02-25 16:58:12 +08:00
|
|
|
|
<div v-if="state.type === 2">
|
|
|
|
|
<!-- 支付宝 -> 账号领取 -->
|
|
|
|
|
<div class="bm-red-ljj-bg" v-if="state.channel === 1 && state.receive_mode === 2">
|
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/zfbljj-bg.png" alt=""
|
|
|
|
|
class="ref-bg-img">
|
|
|
|
|
<div class="ljj-btn-img-box">
|
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/zfbljj-btn.png"
|
|
|
|
|
alt="" class="ljj-btn-img" @click="gotoPage()">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-05 14:51:24 +08:00
|
|
|
|
<!-- 云闪付 账号领取 -->
|
2024-03-01 10:27:44 +08:00
|
|
|
|
<div class="bm-red-ljj-bg" v-if="state.channel === 3">
|
2024-02-25 16:58:12 +08:00
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/ysfljj-bg.png" alt=""
|
|
|
|
|
class="ref-bg-img">
|
|
|
|
|
<div class="ljj-btn-img-box">
|
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/ysf-btn.png" alt=""
|
|
|
|
|
class="ysf-btn-img" @click="gotoPage()">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-05 14:21:38 +08:00
|
|
|
|
<!-- 红包 3-->
|
2024-02-25 16:58:12 +08:00
|
|
|
|
<div v-if="state.type ===3">
|
|
|
|
|
<!-- 支付宝 -> 账号领取 -->
|
|
|
|
|
<div class="bm-red-ljj-bg" v-if="state.channel === 1 && state.receive_mode === 2">
|
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/zfbhb-bg.png" alt=""
|
|
|
|
|
class="ref-bg-img">
|
|
|
|
|
<div class="ljj-btn-img-box">
|
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/zfbysfhb-btn.png"
|
|
|
|
|
alt="" class="hb-btn1" @click="gotoPage()">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 云闪付 -> 账号领取 -->
|
2024-03-01 10:27:44 +08:00
|
|
|
|
<div class="bm-red-ljj-bg" v-if="state.channel === 3">
|
2024-02-25 16:58:12 +08:00
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/ysfhb-bg.png" alt=""
|
|
|
|
|
class="ref-bg-img">
|
|
|
|
|
<div class="ljj-btn-img-box">
|
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/zfbysfhb-btn.png"
|
|
|
|
|
alt="" class="hb-btn1" @click="gotoPage()">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-03-05 14:21:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-05 14:51:24 +08:00
|
|
|
|
<!-- 组合商品 4-->
|
|
|
|
|
<div v-if="state.type === 4">
|
|
|
|
|
<!-- 支付宝 账号领取 -->
|
2024-03-05 14:21:38 +08:00
|
|
|
|
<div class="bm-red-ljj-bg" v-if="state.channel === 1 && state.receive_mode === 2">
|
2024-03-05 14:51:24 +08:00
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/zfbljj-bg.png" alt=""
|
2024-03-05 14:21:38 +08:00
|
|
|
|
class="ref-bg-img">
|
|
|
|
|
<div class="ljj-btn-img-box">
|
2024-03-05 14:51:24 +08:00
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/zfbljj-btn.png"
|
|
|
|
|
alt="" class="ljj-btn-img" @click="gotoPage()">
|
2024-03-05 14:21:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-02-25 16:58:12 +08:00
|
|
|
|
|
2024-03-05 14:51:24 +08:00
|
|
|
|
<!-- 云闪付 账号领取 -->
|
2024-03-05 14:21:38 +08:00
|
|
|
|
<div class="bm-red-ljj-bg" v-if="state.channel === 3">
|
2024-03-05 14:51:24 +08:00
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/ysfljj-bg.png" alt=""
|
2024-03-05 14:21:38 +08:00
|
|
|
|
class="ref-bg-img">
|
|
|
|
|
<div class="ljj-btn-img-box">
|
2024-03-05 14:51:24 +08:00
|
|
|
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/bm-img/ysf-btn.png" alt=""
|
|
|
|
|
class="ysf-btn-img" @click="gotoPage()">
|
2024-03-05 14:21:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-02-25 16:58:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="am-toast text" v-show="state.showToast">
|
|
|
|
|
<div class="am-toast-text">
|
|
|
|
|
{{state.toastTip}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
<script>
|
2024-03-07 21:47:17 +08:00
|
|
|
|
// let bm_auth_moni_data = { "token": "2250cd4248ea70516cbc297b0a71df38", "settlement_data": { "is_settlement": false, "settlement_type": 4 } }
|
2024-03-07 14:44:08 +08:00
|
|
|
|
// const bm_auth = sessionStorage.setItem("bm_auth", JSON.stringify(bm_auth_moni_data));
|
2024-02-25 16:58:12 +08:00
|
|
|
|
|
|
|
|
|
const bm_obj_data = sessionStorage.getItem("bm_auth") ? JSON.parse(sessionStorage.getItem("bm_auth")) : null;
|
|
|
|
|
const { createApp, ref, reactive, onMounted } = Vue;
|
|
|
|
|
createApp({
|
|
|
|
|
setup() {
|
|
|
|
|
// 参数
|
|
|
|
|
const state = reactive({
|
|
|
|
|
describeUrl: [], // 商品列表图片
|
|
|
|
|
useMarkUrl: "",
|
|
|
|
|
bmAuth: {},
|
|
|
|
|
toastTip: "",
|
|
|
|
|
showToast: false,
|
2024-03-05 14:21:38 +08:00
|
|
|
|
type: 0, // 1商品 2立减金 3红包 4组合商品 -> 兑换码类型
|
2024-02-25 16:58:12 +08:00
|
|
|
|
channel: 1, // 1支付宝 2微信 3云闪付 -> 渠道平台
|
2024-03-07 14:42:51 +08:00
|
|
|
|
receive_mode: 1, // 1官方领取 2账号领取 -> 领取方式
|
|
|
|
|
goodsName: ""
|
2024-02-25 16:58:12 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const openToast = (msg) => {
|
|
|
|
|
if (state.showToast) return
|
|
|
|
|
state.toastTip = msg;
|
|
|
|
|
state.showToast = true;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
state.showToast = false;
|
|
|
|
|
}, 1500);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 判断 是那个页面
|
|
|
|
|
const gotoPage = () => {
|
|
|
|
|
// 领取结算 4
|
|
|
|
|
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 4) {
|
|
|
|
|
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
|
|
|
|
|
}
|
2024-02-25 17:19:14 +08:00
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
2024-02-28 10:11:01 +08:00
|
|
|
|
// window.location.href = '';
|
|
|
|
|
locationReplace("./homepage.html")
|
2024-02-25 17:19:14 +08:00
|
|
|
|
}, 300)
|
2024-02-28 17:28:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const gotoHomePage = (goods) => {
|
2024-03-07 20:00:22 +08:00
|
|
|
|
// 商品1,卡密2,平台查看2 特殊处理
|
2024-03-07 20:13:07 +08:00
|
|
|
|
if (goods.type === 1 && goods.entity.product_type === 2 && goods.entity.card_show === 2) {
|
2024-03-07 20:00:22 +08:00
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-28 17:28:47 +08:00
|
|
|
|
// 判断是不是官方领取 是官方领取 返回true 不是返回false
|
|
|
|
|
// 必须是立减金和红包
|
|
|
|
|
if (goods.type !== 1) {
|
|
|
|
|
// 立减金
|
|
|
|
|
if (goods.type === 2) {
|
|
|
|
|
// 支付宝
|
|
|
|
|
if (goods.entity.channel === 1) {
|
|
|
|
|
if (goods.entity.receive_mode === 1) {
|
|
|
|
|
return true
|
|
|
|
|
} else {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2024-02-29 11:21:21 +08:00
|
|
|
|
if (goods.entity.channel === 2) {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (goods.entity.channel === 3) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
2024-02-28 17:28:47 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 红包
|
|
|
|
|
if (goods.type === 3) {
|
|
|
|
|
// 支付宝
|
|
|
|
|
if (goods.entity.channel === 1) {
|
|
|
|
|
if (goods.entity.receive_mode === 1) {
|
|
|
|
|
return true
|
|
|
|
|
} else {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 2微信 3云闪付
|
2024-02-29 11:21:21 +08:00
|
|
|
|
if (goods.entity.channel === 2) {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (goods.entity.channel === 3) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
2024-02-28 17:28:47 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-03-05 14:21:38 +08:00
|
|
|
|
|
|
|
|
|
// 组合商品
|
|
|
|
|
if (goods.type === 4) {
|
|
|
|
|
// 支付宝
|
|
|
|
|
if (Number(goods.entity.channel) === 1) {
|
|
|
|
|
if (Number(goods.entity.receive_mode) === 1) {
|
|
|
|
|
return true
|
|
|
|
|
} else {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 2微信 3云闪付
|
|
|
|
|
if (Number(goods.entity.channel) === 2) {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Number(goods.entity.channel) === 3) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-28 17:28:47 +08:00
|
|
|
|
} else {
|
|
|
|
|
return false
|
|
|
|
|
}
|
2024-02-25 16:58:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取商品信息
|
|
|
|
|
const getProducts = async () => {
|
|
|
|
|
let params = {
|
|
|
|
|
last_product_id: 0,
|
|
|
|
|
token: state.bmAuth.token
|
|
|
|
|
}
|
|
|
|
|
let res = await req.axiosPost('/key/products', params);
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
// 如果不账号领取 直接过
|
2024-02-28 17:28:47 +08:00
|
|
|
|
if (gotoHomePage(res.data[0])) {
|
2024-03-07 20:36:01 +08:00
|
|
|
|
setTimeout(() => {
|
|
|
|
|
window.location.replace("./homepage.html");
|
|
|
|
|
}, 300)
|
2024-02-25 16:58:12 +08:00
|
|
|
|
} else {
|
2024-03-07 20:00:22 +08:00
|
|
|
|
|
2024-03-07 14:42:51 +08:00
|
|
|
|
state.goodsName = res.data[0].entity.product_name;
|
2024-03-05 14:21:38 +08:00
|
|
|
|
state.type = res.data[0].type; // 1商品 2立减金 3红包 4组合商品 -> 兑换码类型
|
|
|
|
|
state.channel = Number(res.data[0].entity.channel); // 1支付宝 2微信 3云闪付 -> 渠道平台
|
|
|
|
|
state.receive_mode = Number(res.data[0].entity.receive_mode); // 1官方领取 2账号领取 -> 领取方式
|
|
|
|
|
|
|
|
|
|
if (res.data[0].type === 1) {
|
|
|
|
|
state.describeUrl = res.data[0].entity.describe_url;
|
|
|
|
|
state.useMarkUrl = res.data[0].entity.detail_url;
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-25 16:58:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-03-07 20:00:22 +08:00
|
|
|
|
|
|
|
|
|
|
2024-02-25 16:58:12 +08:00
|
|
|
|
} else {
|
|
|
|
|
openToast(res.message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 立即领取
|
|
|
|
|
const goToExchange = () => {
|
|
|
|
|
// 领取结算 4
|
|
|
|
|
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 4) {
|
|
|
|
|
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
2024-02-28 10:11:01 +08:00
|
|
|
|
// window.location.href = '';
|
|
|
|
|
locationReplace("./homepage.html")
|
2024-02-25 16:58:12 +08:00
|
|
|
|
}, 300)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
2024-03-07 20:36:01 +08:00
|
|
|
|
// 打开成功结算3
|
|
|
|
|
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 3) {
|
|
|
|
|
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-25 16:58:12 +08:00
|
|
|
|
let bm_data = sessionStorage.getItem("bm_auth");
|
|
|
|
|
if (bm_data) {
|
|
|
|
|
state.bmAuth = JSON.parse(bm_data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getProducts().then(() => {
|
|
|
|
|
var mySwiper1 = new Swiper('#J-swiper', {
|
|
|
|
|
pagination: '.swiper-pagination',
|
|
|
|
|
loop: true,
|
|
|
|
|
initialSlide: 0
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
gotoPage,
|
|
|
|
|
goToExchange,
|
|
|
|
|
state
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).mount('#app')
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</html>
|