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>
|
2023-07-08 02:08:46 +08:00
|
|
|
|
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage2_0.css" />
|
2024-04-10 23:11:41 +08:00
|
|
|
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api_test1.js?v=1000"></script>
|
2024-03-25 21:53:04 +08:00
|
|
|
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/libs.js?v=sdfhksdfklwrwer"></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%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
2024-03-25 20:37:29 +08:00
|
|
|
|
<div id="reduce" :style="{paddingTop:this.outTime.length>0?'0':'0.21rem'}">
|
2022-06-13 16:49:06 +08:00
|
|
|
|
<!-- 弹出框 -->
|
2022-06-16 18:07:46 +08:00
|
|
|
|
<div class="mask" v-if="maskshow"></div>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
<!-- 单条弹出框 -->
|
|
|
|
|
<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>
|
2022-06-17 14:23:34 +08:00
|
|
|
|
<!-- 复制提示 -->
|
|
|
|
|
<div class="popboxshow" v-if="copyshow" :class="copyshow?'active':''">
|
|
|
|
|
<div class="tip">
|
|
|
|
|
<p>请点击下方[复制]按钮,复制链接到浏览器打开!</p>
|
|
|
|
|
<span @click="copyFn">复制</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-25 20:27:23 +08:00
|
|
|
|
<div class="countdown" v-if="this.outTime.length>0">
|
2024-03-25 20:42:54 +08:00
|
|
|
|
<span>链接有效期:</span>
|
2024-03-25 20:27:23 +08:00
|
|
|
|
<p>{{this.outTime[0]}}</p>时
|
2024-03-25 20:30:03 +08:00
|
|
|
|
<p>{{this.outTime[1]}}</p>分
|
2024-03-25 20:27:23 +08:00
|
|
|
|
<p>{{this.outTime[2]}}</p>秒
|
|
|
|
|
</div>
|
|
|
|
|
|
2022-10-11 09:43:31 +08:00
|
|
|
|
<div class="couponShow">
|
|
|
|
|
<span>
|
|
|
|
|
<img @click="backgoodsFn" v-if="backAble" class="backIcon"
|
|
|
|
|
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
|
|
|
|
</span>
|
|
|
|
|
<div class="coupon-left">
|
2023-07-06 10:56:39 +08:00
|
|
|
|
<p class="coupon_money" :style="{fontSize:this.fonts()}">
|
|
|
|
|
<span>¥</span>{{parseFloat(reduceInfo.reduce_amount)}}
|
2022-10-11 09:43:31 +08:00
|
|
|
|
</p>
|
2023-07-06 10:56:39 +08:00
|
|
|
|
<p class="full_money">满{{parseFloat(reduceInfo.denomination)}}可用</p>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
</div>
|
2022-10-11 09:43:31 +08:00
|
|
|
|
<div class="coupon-right">
|
2023-12-20 15:16:04 +08:00
|
|
|
|
<p class="title">
|
|
|
|
|
{{reduceInfo.batch_goods_name}}
|
|
|
|
|
<span class="send_num" v-if="reduceInfo.send_num>1">x{{reduceInfo.send_num}}</span>
|
|
|
|
|
</p>
|
2022-10-11 09:43:31 +08:00
|
|
|
|
<p style="font-size: 0.11rem">
|
|
|
|
|
{{reduceInfo.card_type|cardType}}可用
|
|
|
|
|
</p>
|
2024-03-25 19:29:41 +08:00
|
|
|
|
<p class="validity" v-if="receive_time.timer_show!=2">
|
2022-10-11 09:43:31 +08:00
|
|
|
|
有效期:{{receive_time.effect_time.start_time}}至{{receive_time.effect_time.end_time}}
|
|
|
|
|
</p>
|
|
|
|
|
<p class="validity" v-if="receive_time.use_time.type=='received'">
|
|
|
|
|
领取后{{receive_time.use_time.effect_date_type==0?'立即':'次日凌晨'}}生效,有效期
|
|
|
|
|
{{receive_time.use_time.effect_day}}天
|
|
|
|
|
</p>
|
|
|
|
|
<p class="validity" v-if="receive_time.use_time.type=='fiexd'">
|
|
|
|
|
可用时间:{{receive_time.use_time.fiexd_time.start_time}}-{{receive_time.use_time.fiexd_time.end_time}}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="receiveBtn" @click="receiveFn" :class="goodInfo.available!=1?'readOnly':''">立即领取</div>
|
|
|
|
|
<div class="coupon_explain">
|
|
|
|
|
<h1>- 兑换说明 -</h1>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<h3 v-if="receive_time.use_time.type=='week'||receive_time.use_time.type=='irregular'">可用时间</h3>
|
|
|
|
|
<ul v-if="receive_time.use_time.type=='week'" class="weekTime">
|
|
|
|
|
<li v-for="(item,index) in receive_time.use_time.week" :key="index">
|
|
|
|
|
<p>{{item}}</p>
|
|
|
|
|
<div>
|
|
|
|
|
<p v-for="(item2,index2) in receive_time.use_time.time" :key="index2">
|
|
|
|
|
{{item2[0]}}~{{item2[1]}}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
2022-08-15 16:49:16 +08:00
|
|
|
|
</ul>
|
2022-10-11 09:43:31 +08:00
|
|
|
|
<ul v-if="receive_time.use_time.type=='irregular'">
|
|
|
|
|
<li v-for="(item,index) in receive_time.use_time.day" :key="index">
|
|
|
|
|
<p>{{item[0]}}至{{item[1]}}</p>
|
|
|
|
|
<div>
|
|
|
|
|
<p v-for="(item2,index2) in receive_time.use_time.time" :key="index2">
|
|
|
|
|
{{item2[0]}}~{{item2[1]}}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<h3>使用须知</h3>
|
|
|
|
|
<p>
|
|
|
|
|
1、在{{reduceInfo.channel==1?'支付宝H5':'微信APP内打开链接'}},点击【一键领取】完成领取{{reduceInfo.channel==1?'支付宝':'微信'}}立减金<br />
|
|
|
|
|
2、{{reduceInfo.channel==1?'支付宝':'微信'}}立减金一旦领取不可撤销、不可转让。注意不要将兑换券泄露给他人
|
|
|
|
|
</p>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
</div>
|
2022-10-11 09:43:31 +08:00
|
|
|
|
<div class="content">
|
|
|
|
|
<h3>使用规则</h3>
|
2022-10-27 10:56:50 +08:00
|
|
|
|
<p v-html="goodInfo.instruction"></p>
|
2022-10-11 09:43:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-06-16 11:16:54 +08:00
|
|
|
|
</div>
|
2022-06-13 16:49:06 +08:00
|
|
|
|
</body>
|
|
|
|
|
<script>
|
2022-10-11 09:43:31 +08:00
|
|
|
|
let goodsDetail = null, goodsCount = null;
|
2022-06-13 16:49:06 +08:00
|
|
|
|
new Vue({
|
|
|
|
|
el: "#reduce",
|
2024-04-10 23:11:41 +08:00
|
|
|
|
data() {
|
2022-06-13 16:49:06 +08:00
|
|
|
|
return {
|
|
|
|
|
plaflam: 1, //支付宝
|
|
|
|
|
promtshow: false,
|
|
|
|
|
promttip: "警告提示",
|
2022-10-11 09:43:31 +08:00
|
|
|
|
copyshow: false,//解决ios,必须触发按钮复制
|
|
|
|
|
copyLink: '',//存储链接
|
2022-06-13 16:49:06 +08:00
|
|
|
|
popboxshow: false,
|
|
|
|
|
maskshow: false,
|
2024-03-06 17:45:16 +08:00
|
|
|
|
openId: localStorage.getItem('openid'),
|
2022-10-11 09:43:31 +08:00
|
|
|
|
bindClick: false,
|
2022-06-13 16:49:06 +08:00
|
|
|
|
tiptext: "错误提示",
|
|
|
|
|
goodInfo: {}, //商品信息
|
|
|
|
|
reduceInfo: {}, //券信息
|
|
|
|
|
orderId: '',
|
2022-06-15 14:41:42 +08:00
|
|
|
|
backAble: true,
|
2023-11-02 15:42:32 +08:00
|
|
|
|
loading: false,
|
2024-03-25 19:29:41 +08:00
|
|
|
|
outTime: [],
|
2022-10-11 09:43:31 +08:00
|
|
|
|
receive_time: {},//领取立减金时间
|
2022-06-13 16:49:06 +08:00
|
|
|
|
tip: `1、立减金自领取之日起0天有效,请在有效期内使用<br />
|
|
|
|
|
2、微信立减金自领取后每个立减金一次性使用,不兑换,不找零,到期后自动失效,逾期未使用不再补发。使用微信支付进行付款(大于立减金面额0.01元以上)即可自动抵扣<br />
|
|
|
|
|
3、多张立减金可在单笔微信支付订单中一起使用,但当用户的立减金超过8张时,系统会选取其中一部分使用,不保证在一张订单中全部使用<br />
|
|
|
|
|
4、在中国境内商户使用微信支付即可使用,少数特定商户(包括但不限于:CoCo奶茶、优衣库、星巴克、肯德基、必胜客、同程艺龙、热风、太平鸟、孩子王、航联保险、华为商城、Miss
|
|
|
|
|
Sixty、Ochirly、Apple商城、FivePlus、信用卡还款、零钱通、理财通等)、以及社交支付(如转账、红包、个人收款码支付等)及合单支付(微信支付订单号为44开头的交易)无法使用立减金<br />
|
|
|
|
|
5、使用立减金的微信支付订单,如发生全额退款,且立减金仍在有效期内,立减金将自动退还给用户,如立减金已过期,则不退还给用户;如发生部分退款,用户支付金额将按比例原路退还,立减金将不退还给用户<br />`,
|
|
|
|
|
};
|
|
|
|
|
},
|
2024-04-10 23:11:41 +08:00
|
|
|
|
created() {
|
2023-08-04 17:43:45 +08:00
|
|
|
|
document.title = localStorage.getItem('title');
|
2022-06-13 16:49:06 +08:00
|
|
|
|
/* 获取立减金信息*/
|
2022-10-11 09:43:31 +08:00
|
|
|
|
goodsDetail = JSON.parse(sessionStorage.getItem("goodsInfo"));
|
2022-06-15 20:28:39 +08:00
|
|
|
|
this.goodInfo = goodsDetail;
|
2022-06-16 11:16:54 +08:00
|
|
|
|
/*默认显示*/
|
2023-08-18 15:38:43 +08:00
|
|
|
|
// if (goodsDetail.available != 1) {
|
|
|
|
|
// this.openErrorDialog(product_status(goodsDetail.available, goodsDetail));
|
|
|
|
|
// this.bindClick = true;
|
|
|
|
|
// }
|
2022-06-15 14:41:42 +08:00
|
|
|
|
goodsCount = sessionStorage.getItem('goodsCount');
|
|
|
|
|
this.backAble = goodsCount > 1;//多个商品才有返回
|
2022-06-15 20:28:39 +08:00
|
|
|
|
this.reduceInfo = goodsDetail.entity;
|
|
|
|
|
this.plaflam = goodsDetail.entity.channel;
|
2024-03-15 11:29:12 +08:00
|
|
|
|
if (goodsDetail.entity.time_limit.use_time && goodsDetail.entity.time_limit.use_time.type == 'week') { //处理星期连贯操作
|
2022-10-11 09:43:31 +08:00
|
|
|
|
goodsDetail.entity.time_limit.use_time.week = sortWeeks(goodsDetail.entity.time_limit.use_time.week);
|
2022-06-15 20:28:39 +08:00
|
|
|
|
}
|
2022-10-11 09:43:31 +08:00
|
|
|
|
this.receive_time = goodsDetail.entity.time_limit;
|
2024-03-25 19:29:41 +08:00
|
|
|
|
|
|
|
|
|
/* 倒计时 */
|
|
|
|
|
const key_expiration_time = sessionStorage.getItem('key_expiration_time');
|
|
|
|
|
if (key_expiration_time != 0) {
|
2024-03-25 19:36:25 +08:00
|
|
|
|
const cls = setInterval(() => {
|
|
|
|
|
const time = pageOutTime(key_expiration_time);
|
|
|
|
|
if (time) {
|
|
|
|
|
this.outTime = time;
|
|
|
|
|
} else {
|
|
|
|
|
this.outTime = ['00', '00', '00'];
|
|
|
|
|
clearInterval(cls);
|
|
|
|
|
}
|
2024-03-25 19:29:41 +08:00
|
|
|
|
}, 1000);
|
|
|
|
|
} else {
|
2024-03-25 20:38:25 +08:00
|
|
|
|
this.outTime = [];
|
2024-03-25 19:29:41 +08:00
|
|
|
|
}
|
2022-06-13 16:49:06 +08:00
|
|
|
|
},
|
|
|
|
|
filters: {
|
2024-04-10 23:11:41 +08:00
|
|
|
|
cardType(val) {
|
2022-06-15 20:28:39 +08:00
|
|
|
|
return val.map((item) => {
|
2022-10-11 09:43:31 +08:00
|
|
|
|
return item == 1 ? "借记卡" : "信用卡" + " ";
|
|
|
|
|
}).join(" ");
|
2022-06-13 16:49:06 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2024-04-10 23:11:41 +08:00
|
|
|
|
backgoodsFn() {
|
2022-06-15 14:41:42 +08:00
|
|
|
|
if (goodsCount > 1) {
|
|
|
|
|
window.location.replace('./homepage.html');
|
|
|
|
|
} else {
|
|
|
|
|
history.go(-2);
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-04-10 23:11:41 +08:00
|
|
|
|
receiveFn() {
|
2023-11-02 15:42:32 +08:00
|
|
|
|
if (this.loading) return;
|
|
|
|
|
this.loading = true;
|
2022-06-13 16:49:06 +08:00
|
|
|
|
let self = this;
|
2022-10-11 09:43:31 +08:00
|
|
|
|
if (self.goodInfo.available != 1) {
|
|
|
|
|
self.openErrorDialog(product_status(self.goodInfo.available, self.goodInfo));
|
2023-12-20 20:41:34 +08:00
|
|
|
|
this.loading = false;
|
2023-06-05 13:36:44 +08:00
|
|
|
|
return;
|
2022-06-16 18:07:46 +08:00
|
|
|
|
}
|
2022-06-13 16:49:06 +08:00
|
|
|
|
let data = {
|
2022-10-11 09:43:31 +08:00
|
|
|
|
key: localStorage.getItem("key"),
|
2022-06-15 20:28:39 +08:00
|
|
|
|
goods_id: this.goodInfo.entity.goods_id,
|
2022-06-13 16:49:06 +08:00
|
|
|
|
code_batch_id: this.goodInfo.code_batch_id,
|
2022-10-11 09:43:31 +08:00
|
|
|
|
token: localStorage.getItem("token"),
|
2022-06-13 16:49:06 +08:00
|
|
|
|
};
|
|
|
|
|
req.axiosPost("/key/usage", data)
|
|
|
|
|
.then((res) => {
|
2023-11-02 15:42:32 +08:00
|
|
|
|
this.loading = false;
|
2022-06-13 16:49:06 +08:00
|
|
|
|
if (res.code == 200) {
|
2022-07-11 09:40:55 +08:00
|
|
|
|
sessionStorage.setItem("lastid", self.goodInfo.product_id);
|
2022-06-13 16:49:06 +08:00
|
|
|
|
this.orderId = res.data.order_number;
|
|
|
|
|
let ua = navigator.userAgent.toLowerCase(); //判断用户打开链接环境
|
|
|
|
|
if (self.plaflam == 1) {
|
|
|
|
|
//支付宝-微信环境中不能唤起支付宝
|
|
|
|
|
self.toLinkAlipay();
|
|
|
|
|
}
|
|
|
|
|
if (self.plaflam == 2) {
|
|
|
|
|
//微信
|
2022-12-16 17:03:01 +08:00
|
|
|
|
// if (ua.indexOf("dingtalk") > -1) {
|
|
|
|
|
// //在钉钉内置环境打开,不能唤起微信小程序
|
|
|
|
|
// self.openErrorDialog("请在其他浏览器打开!");
|
|
|
|
|
// } else {
|
2024-03-06 16:54:55 +08:00
|
|
|
|
if (this.goodInfo.entity.is_webview == 1) {
|
2024-03-06 17:47:12 +08:00
|
|
|
|
this.publicCollection(res.data.order_number);
|
2024-03-06 16:54:55 +08:00
|
|
|
|
} else {
|
|
|
|
|
//唤起微信福利官小程序
|
|
|
|
|
window.location.replace(res.data.redirect_url);
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-16 17:03:01 +08:00
|
|
|
|
// }
|
2022-06-13 16:49:06 +08:00
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
self.openErrorDialog(res.message);
|
2022-10-17 11:23:00 +08:00
|
|
|
|
if (res.code == 403) {
|
2022-06-13 16:49:06 +08:00
|
|
|
|
if (goodsCount > 1) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
window.location.replace("./homepage.html");
|
|
|
|
|
}, 3000);
|
|
|
|
|
} else {
|
2022-06-15 17:04:12 +08:00
|
|
|
|
self.openErrorDialog(res.message);
|
|
|
|
|
// window.location.replace("./index.html");
|
2022-06-13 16:49:06 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-11-02 15:42:32 +08:00
|
|
|
|
.catch((err) => { this.loading = false; });
|
2022-06-13 16:49:06 +08:00
|
|
|
|
},
|
2024-03-06 17:45:16 +08:00
|
|
|
|
|
|
|
|
|
/* 公众号领取 */
|
2024-04-10 23:11:41 +08:00
|
|
|
|
publicCollection(order_number) {
|
2024-03-06 17:45:16 +08:00
|
|
|
|
let params = {
|
|
|
|
|
order_number,
|
|
|
|
|
channel: 2,
|
2024-03-07 11:11:25 +08:00
|
|
|
|
channel_user_id: this.openId,
|
|
|
|
|
is_webview: 1
|
2024-03-06 17:45:16 +08:00
|
|
|
|
};
|
|
|
|
|
req.axiosPost("/voucher/grant", params)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
2024-03-06 17:51:13 +08:00
|
|
|
|
this.openErrorDialog('领取成功');
|
2024-03-06 17:45:16 +08:00
|
|
|
|
this.goodInfo.available = 9;
|
|
|
|
|
sessionStorage.setItem('goodInfo', JSON.stringify(this.goodInfo));
|
|
|
|
|
} else {
|
2024-03-06 17:51:13 +08:00
|
|
|
|
this.openErrorDialog(res.message);
|
2024-03-06 17:45:16 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => { this.loading = false; });
|
|
|
|
|
;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
2024-04-10 23:11:41 +08:00
|
|
|
|
toLinkAlipay() {
|
2022-06-13 16:49:06 +08:00
|
|
|
|
//支付宝H5跳转
|
|
|
|
|
let self = this;
|
|
|
|
|
let banklink = encodeURIComponent(
|
|
|
|
|
window.location.origin +
|
2022-06-15 09:42:49 +08:00
|
|
|
|
"/alipay.html?orderNumber=" + this.orderId
|
2022-06-13 16:49:06 +08:00
|
|
|
|
);
|
|
|
|
|
let link = "http://openapi.1688sup.com/alipay/oauth?jump=" + banklink;
|
|
|
|
|
let ua = navigator.userAgent.toLowerCase(); //判断用户打开链接环境
|
2022-11-16 16:47:37 +08:00
|
|
|
|
if (ua.indexOf("micromessenger") > -1 || ua.indexOf("baiduboxapp") > -1 || ua.indexOf("firefox") > -1) {
|
2022-06-13 16:49:06 +08:00
|
|
|
|
//复制链接地址,提醒去浏览器打开
|
2022-10-11 09:43:31 +08:00
|
|
|
|
this.copyLink = link;
|
|
|
|
|
this.copyshow = true;
|
|
|
|
|
this.maskshow = true;
|
2022-06-13 16:49:06 +08:00
|
|
|
|
} else {
|
|
|
|
|
//唤起支付宝
|
|
|
|
|
window.location.replace(link);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//错误弹出框关闭
|
2024-04-10 23:11:41 +08:00
|
|
|
|
knowFn() {
|
2022-06-13 16:49:06 +08:00
|
|
|
|
this.popboxshow = false;
|
|
|
|
|
this.maskshow = false;
|
|
|
|
|
},
|
|
|
|
|
//错误弹出框
|
2024-04-10 23:11:41 +08:00
|
|
|
|
openErrorDialog(tip) {
|
2022-06-13 16:49:06 +08:00
|
|
|
|
this.maskshow = true;
|
|
|
|
|
this.tiptext = tip;
|
|
|
|
|
this.popboxshow = true;
|
|
|
|
|
},
|
|
|
|
|
// 单条弹框
|
2024-04-10 23:11:41 +08:00
|
|
|
|
openDialog(tip) {
|
2022-06-13 16:49:06 +08:00
|
|
|
|
this.promtshow = true;
|
|
|
|
|
this.promttip = tip;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.promtshow = false;
|
|
|
|
|
this.promttip = "";
|
|
|
|
|
}, 3000);
|
|
|
|
|
},
|
2023-07-06 10:56:39 +08:00
|
|
|
|
|
|
|
|
|
/* 动态font */
|
2024-04-10 23:11:41 +08:00
|
|
|
|
fonts() {
|
2023-07-06 10:56:39 +08:00
|
|
|
|
const defaultCss = '0.32rem';
|
|
|
|
|
const count = String(parseFloat(this.reduceInfo.reduce_amount)).length + 1;
|
|
|
|
|
if (count > 4) {
|
|
|
|
|
return 0.32 - ((count - 3) / 100 * 2.2) + 'rem';
|
|
|
|
|
} else {
|
|
|
|
|
return defaultCss;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2022-06-13 16:49:06 +08:00
|
|
|
|
//复制文本
|
2024-04-10 23:11:41 +08:00
|
|
|
|
copyFn() {
|
2022-06-13 16:49:06 +08:00
|
|
|
|
var textArea = document.createElement("textarea");
|
2022-06-17 14:23:34 +08:00
|
|
|
|
textArea.value = this.copyLink;
|
2022-06-13 16:49:06 +08:00
|
|
|
|
document.body.appendChild(textArea);
|
|
|
|
|
textArea.select();
|
|
|
|
|
document.execCommand("copy");
|
|
|
|
|
this.openDialog("复制成功,请到浏览器打开");
|
|
|
|
|
document.body.removeChild(textArea);
|
2023-08-09 11:15:45 +08:00
|
|
|
|
this.copyshow = false;
|
|
|
|
|
this.maskshow = false;
|
2022-06-13 16:49:06 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</html>
|