🎨 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}}
</p>
<p class="reduce">满{{item.voucher.denomination}}可用</p>
<p class="g-b-but" v-if='goods.receive_status==1'
:style="{marginTop:goods.group_info.channel==3&&'0.23rem'}">
<p class="g-b-but" v-if='goods.receive_status==1'>
待领取({{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-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>
<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>
</li>
</ul>

View File

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