feat:新增查看卡密
This commit is contained in:
parent
860a9b0f98
commit
b81e4a169d
|
@ -0,0 +1,118 @@
|
|||
<!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>
|
||||
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/lookCard.css">
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.4.1/vconsole.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
|
||||
<!-- 单条弹出框 -->
|
||||
<div class="prompt" :class="toastShow?'proactive':''">
|
||||
{{this.toastTip}}
|
||||
</div>
|
||||
<img class="backPresTy" @click="backHandler"
|
||||
src=" https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
||||
<p class="nav-title">卡密</p>
|
||||
<div class="topBox">
|
||||
<img :src="cardData.show_url" alt="">
|
||||
<p class="product_name">{{cardData.product_name}}</p>
|
||||
<p class="end_time">兑换有效期:{{cardData.end_time}} 20222-10-13 22:22:59</p>
|
||||
</div>
|
||||
<div class="bottomBox">
|
||||
<div>
|
||||
<p class="cardInformation">卡密信息</p>
|
||||
<template v-if="cardData.card_number">
|
||||
<div class="item item-margin">
|
||||
<p class="title">卡号:</p>
|
||||
<p class="number">{{cardData.card_number}}</p>
|
||||
<p class="copy" @click="copyFunction(cardData.card_number)">
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/copyNumber.png"
|
||||
alt="">
|
||||
复制卡号
|
||||
</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p class="title">密码:</p>
|
||||
<p class="number">{{cardData.card_password}}</p>
|
||||
<p class="copy" @click="copyFunction(cardData.card_password)">
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/copyNumber.png"
|
||||
alt="">
|
||||
复制密码
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="item item-margin">
|
||||
<p class="title">卡密:</p>
|
||||
<p class="number">{{cardData.card_password}}</p>
|
||||
<p class="copy" @click="copyFunction(cardData.card_password)">
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/copyNumber.png"
|
||||
alt="">
|
||||
复制卡密
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vConsole = new VConsole();
|
||||
new Vue({
|
||||
el: "#app",
|
||||
data () {
|
||||
return {
|
||||
cardData: {},
|
||||
toastShow: false,
|
||||
toastTip: ''
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
created () {
|
||||
this.cardData = JSON.parse(localStorage.getItem('cardProductDetail'));
|
||||
},
|
||||
|
||||
methods: {
|
||||
/* 复制 */
|
||||
copyFunction (number) {
|
||||
var aux = document.createElement("input");
|
||||
aux.setAttribute("value", number);
|
||||
document.body.appendChild(aux);
|
||||
aux.select();
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(aux);
|
||||
this.openDialog('复制成功')
|
||||
},
|
||||
|
||||
|
||||
// 单条弹框
|
||||
openDialog (tip) {
|
||||
this.toastShow = true;
|
||||
this.toastTip = tip;
|
||||
setTimeout(() => {
|
||||
this.toastShow = false;
|
||||
this.toastTip = '';
|
||||
}, 3000)
|
||||
},
|
||||
|
||||
backHandler () {
|
||||
history.go(-1);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -61,7 +61,8 @@
|
|||
</template>
|
||||
<template v-if="item.type==1">
|
||||
<!-- 查看卡密 -->
|
||||
<p class="button-card" @click="lookCard(item)" v-if="item.status==2">查看卡密</p>
|
||||
<p class="button-card" @click="lookCard(item)"
|
||||
v-if="item.status==2&&item.goods.product_type==2">查看卡密</p>
|
||||
<!-- 款项状态 -->
|
||||
<p class="pay_status" v-if="[2,3].includes(item.pay_status)&&item.status==3">
|
||||
{{item.pay_status==2?'已支付':'已退款'}}</p>
|
||||
|
|
Loading…
Reference in New Issue