2024-02-23 14:22:16 +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>
|
2024-02-23 16:18:52 +08:00
|
|
|
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/libs.js"></script>
|
2024-02-23 14:22:16 +08:00
|
|
|
|
<link rel="stylesheet" href="./style.css">
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body ontouchstart="">
|
|
|
|
|
<div id="app">
|
|
|
|
|
<!-- 轮播 -->
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
<!-- 说明 -->
|
|
|
|
|
<div class="use-mark">
|
|
|
|
|
<img :src="state.useMarkUrl" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 底部 -->
|
|
|
|
|
<footer class="footer">
|
|
|
|
|
<button type="button" class="footer-btn" @click="goToExchange">立即领取</button>
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
<div class="am-toast text" v-show="state.showToast">
|
|
|
|
|
<div class="am-toast-text">
|
|
|
|
|
{{state.toastTip}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
<script>
|
2024-02-23 17:09:34 +08:00
|
|
|
|
const bm_obj_data = sessionStorage.getItem("bm_auth") ? JSON.parse(sessionStorage.getItem("bm_auth")) : null;
|
2024-02-23 14:22:16 +08:00
|
|
|
|
const { createApp, ref, reactive, onMounted } = Vue;
|
|
|
|
|
createApp({
|
|
|
|
|
setup() {
|
|
|
|
|
// 参数
|
|
|
|
|
const state = reactive({
|
|
|
|
|
describeUrl: [], // 商品列表图片
|
|
|
|
|
useMarkUrl: "",
|
|
|
|
|
bmAuth: {},
|
|
|
|
|
toastTip: "",
|
|
|
|
|
showToast: false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const openToast = (msg) => {
|
|
|
|
|
if (state.showToast) return
|
|
|
|
|
state.toastTip = msg;
|
|
|
|
|
state.showToast = true;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
state.showToast = false;
|
|
|
|
|
}, 1500);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取商品信息
|
|
|
|
|
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) {
|
|
|
|
|
state.describeUrl = res.data[0].entity.describe_url;
|
|
|
|
|
state.useMarkUrl = res.data[0].entity.detail_url;
|
|
|
|
|
} else {
|
|
|
|
|
openToast(res.message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 立即领取
|
|
|
|
|
const goToExchange = () => {
|
2024-02-23 16:18:52 +08:00
|
|
|
|
// 领取结算 4
|
2024-02-23 14:22:16 +08:00
|
|
|
|
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-23 18:25:20 +08:00
|
|
|
|
window.location.href = '../homepage.html'
|
2024-02-23 14:22:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
2024-02-23 16:18:52 +08:00
|
|
|
|
// 打开成功结算3
|
2024-02-23 14:22:16 +08:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
goToExchange,
|
|
|
|
|
state
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).mount('#app')
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</html>
|