🎨 style: 优化样式

This commit is contained in:
wangsongsole 2024-03-15 23:13:38 +08:00
parent 74f089b386
commit 0584d624dc
2 changed files with 19 additions and 21 deletions

View File

@ -50,13 +50,11 @@
{{item.voucher.reduce_amount}} {{item.voucher.reduce_amount}}
</p> </p>
<p class="reduce">满{{item.voucher.denomination}}可用</p> <p class="reduce">满{{item.voucher.denomination}}可用</p>
<p class="g-b-but" v-if='goods.receive_status==1' <p class="g-b-but" v-if='goods.receive_status==1'>
:style="{marginTop:goods.group_info.channel==3&&'0.23rem'}">
待领取({{item.voucher.used_num}}/{{item.voucher.send_num}})</p> 待领取({{item.voucher.used_num}}/{{item.voucher.send_num}})</p>
<p class="g-b-but" :style="{marginTop:goods.group_info.channel==3&&'0.23rem'}" <p class="g-b-but" v-else-if='item.voucher.used_num'>
v-else-if='item.voucher.used_num'>
已使用({{item.voucher.used_num}}/{{item.voucher.send_num}})</p> 已使用({{item.voucher.used_num}}/{{item.voucher.send_num}})</p>
<p class="g-b-but" :style="{marginTop:goods.group_info.channel==3&&'0.23rem'}" v-else> <p class="g-b-but" v-else>
待使用({{item.voucher.used_num}}/{{item.voucher.send_num}})</p> 待使用({{item.voucher.used_num}}/{{item.voucher.send_num}})</p>
</li> </li>
</ul> </ul>

View File

@ -54,7 +54,8 @@
待领取({{item.voucher.used_num}}/{{item.voucher.send_num}})</p> 待领取({{item.voucher.used_num}}/{{item.voucher.send_num}})</p>
<p class="g-b-but" v-else-if='item.voucher.used_num'> <p class="g-b-but" v-else-if='item.voucher.used_num'>
已使用({{item.voucher.used_num}}/{{item.voucher.send_num}})</p> 已使用({{item.voucher.used_num}}/{{item.voucher.send_num}})</p>
<p class="g-b-but" v-else>待使用({{item.voucher.used_num}}/{{item.voucher.send_num}})</p> <p class="g-b-but" v-else>
待使用({{item.voucher.used_num}}/{{item.voucher.send_num}})</p>
</li> </li>
</ul> </ul>
<p class="notis" :style="{color:dynamicStyle.notis_color}" v-show="goods.product.length>3"> <p class="notis" :style="{color:dynamicStyle.notis_color}" v-show="goods.product.length>3">
@ -110,14 +111,13 @@
</div> </div>
</div> </div>
</body> </body>
<script> <script>
const bm_obj_data = sessionStorage.getItem("bm_auth") ? JSON.parse(sessionStorage.getItem("bm_auth")) : null; const bm_obj_data = sessionStorage.getItem("bm_auth") ? JSON.parse(sessionStorage.getItem("bm_auth")) : null;
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/; const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
const emailReg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; const emailReg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
new Vue({ new Vue({
el: "#app", el: "#app",
data() { data () {
return { return {
goods: '', goods: '',
backAble: (~~sessionStorage.getItem('goodsCount')) > 1, backAble: (~~sessionStorage.getItem('goodsCount')) > 1,
@ -139,14 +139,14 @@
}; };
}, },
mounted() { mounted () {
document.title = localStorage.getItem('title'); document.title = localStorage.getItem('title');
this.code_batch_id = JSON.parse(sessionStorage.getItem('goodsInfo')).entity.code_batch_id; this.code_batch_id = JSON.parse(sessionStorage.getItem('goodsInfo')).entity.code_batch_id;
this.getProductDetail(); this.getProductDetail();
}, },
computed: { computed: {
dynamicStyle() { dynamicStyle () {
switch (Number(this.goods.group_info.channel)) { switch (Number(this.goods.group_info.channel)) {
case 1: case 1:
return { return {
@ -199,7 +199,7 @@
methods: { methods: {
//获取商品详情 //获取商品详情
getProductDetail() { getProductDetail () {
req.axiosGet('/key/group/groupProductDetail', { req.axiosGet('/key/group/groupProductDetail', {
token: this.token, token: this.token,
code_batch_id: this.code_batch_id code_batch_id: this.code_batch_id
@ -227,7 +227,7 @@
/* ******************************************** 官方领取 ******************************************** */ /* ******************************************** 官方领取 ******************************************** */
/* 直接领取 */ /* 直接领取 */
directSubmit() { directSubmit () {
const data = { const data = {
key: this.key, key: this.key,
token: this.token, token: this.token,
@ -251,7 +251,7 @@
window.location.replace(res.data.redirect_url); window.location.replace(res.data.redirect_url);
} }
this.getProductDetail(); this.getProductDetail();
}, 300) }, 300);
} else { } else {
@ -262,7 +262,7 @@
}, },
/* 支付宝官方领取H5跳转 */ /* 支付宝官方领取H5跳转 */
toLinkAlipay() { toLinkAlipay () {
let self = this; let self = this;
let banklink = encodeURIComponent( let banklink = encodeURIComponent(
window.location.origin + window.location.origin +
@ -285,7 +285,7 @@
/* ******************************************** 账号领取 ******************************************** */ /* ******************************************** 账号领取 ******************************************** */
/* 立即领取 */ /* 立即领取 */
submit() { submit () {
if (this.goods.group_info.channel == 3 || this.goods.group_info.channel == 1 && this.goods.group_info.receive_mode == 2) { if (this.goods.group_info.channel == 3 || this.goods.group_info.channel == 1 && this.goods.group_info.receive_mode == 2) {
const { confirm, receive_account } = this.form; const { confirm, receive_account } = this.form;
if (this.loading) return; if (this.loading) return;
@ -303,7 +303,7 @@
}, },
/* 验证后 最终提交 */ /* 验证后 最终提交 */
finalSubmit() { finalSubmit () {
this.loading = true; this.loading = true;
const self = this; const self = this;
let data = { let data = {
@ -327,7 +327,7 @@
this.message = '领取成功'; this.message = '领取成功';
this.getProductDetail(); this.getProductDetail();
}, 300) }, 300);
} else { } else {
this.axiosErrorFun(code, message); this.axiosErrorFun(code, message);
@ -337,7 +337,7 @@
}, },
/* 返回 */ /* 返回 */
backGoodsFn() { backGoodsFn () {
if (this.backAble) { if (this.backAble) {
window.location.replace('./homepage.html'); window.location.replace('./homepage.html');
} else { } else {
@ -346,7 +346,7 @@
}, },
/* 接口异常处理 */ /* 接口异常处理 */
axiosErrorFun(code, message) { axiosErrorFun (code, message) {
this.loading = false; this.loading = false;
if (code == 403) { if (code == 403) {
if (this.backAble) { if (this.backAble) {
@ -363,7 +363,7 @@
}, },
//复制文本 //复制文本
copyFn() { copyFn () {
var textArea = document.createElement("textarea"); var textArea = document.createElement("textarea");
textArea.value = this.copyLink; textArea.value = this.copyLink;
document.body.appendChild(textArea); document.body.appendChild(textArea);
@ -378,7 +378,7 @@
}, },
/* 触发提示 */ /* 触发提示 */
tips(text) { tips (text) {
this.cls && clearTimeout(this.cls); this.cls && clearTimeout(this.cls);
this.prompt_text = text; this.prompt_text = text;
this.promptShow = true; this.promptShow = true;