💊 fix: 修复bug

This commit is contained in:
wangsongsole 2023-07-26 18:28:26 +08:00
parent 22883b5391
commit f356da9f52
2 changed files with 43 additions and 15 deletions

View File

@ -35,29 +35,21 @@
</p> </p>
<p class="information-p2">请在 <p class="information-p2">请在
{{receive_time.effect_time.start_time}} ~ {{receive_time.effect_time.end_time}} 内领取 </p> {{receive_time.effect_time.start_time}} ~ {{receive_time.effect_time.end_time}} 内领取 </p>
<div> <div class="card">
<p class="type"> <p class="type">
{{ysf.entity.card_type|cardType}} {{ysf.entity.card_type|cardType}}
</p> </p>
</div> </div>
<p class="type" 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="type" 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="form"> <div class="form">
<div v-if="ysf.available===1"> <div>
<p class="form-label">云闪付账号</p> <p class="form-label">云闪付账号</p>
<input class="form-input" maxlength="11" v-model="account" type="text" placeholder="请输入手机号" /> <input class="form-input" maxlength="11" v-model="account" type="text" placeholder="请输入手机号" />
<input class="form-input mt0" maxlength="11" v-model="confirmAccount" type="text" <input class="form-input mt0" maxlength="11" v-model="confirmAccount" type="text"
placeholder="请再次输入手机号" /> placeholder="请再次输入手机号" />
<p class="form-note">您可在云闪付的个人信息中查看【云闪付账号】</p> <p class="form-note">您可在云闪付的个人信息中查看【云闪付账号】</p>
</div> </div>
<button :class="ysf.available!==1?'disable':''" class="form-button" <button :class="ysf.available!==1?'disable':''" class="form-button" @click="submit">立即领取</button>
@click="submit">{{ysf.available===1?'立即领取':'已领取'}}</button>
</div> </div>
<div class="segmentation"> <div class="segmentation">
<i class="left"></i> <i class="left"></i>
@ -65,7 +57,14 @@
<i class="right"></i> <i class="right"></i>
</div> </div>
<div class="illustrate"> <div class="illustrate">
<p class="illustrate-title" v-if="['week','irregular'].includes(receive_time.use_time.type)">可用时间</p> <p class="illustrate-title">可用时间</p>
<p class="received-fiexd" 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="received-fiexd" 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 class="available_time" v-if="receive_time.use_time.type=='week'"> <div class="available_time" v-if="receive_time.use_time.type=='week'">
<ul class="timeList"> <ul class="timeList">
<li v-for="(item,index) in sortWeeks(receive_time.use_time.week)" :key="index"> <li v-for="(item,index) in sortWeeks(receive_time.use_time.week)" :key="index">
@ -115,6 +114,7 @@
cls: null, cls: null,
receive_time: JSON.parse(sessionStorage.getItem('goodsInfo')).entity.time_limit, receive_time: JSON.parse(sessionStorage.getItem('goodsInfo')).entity.time_limit,
isMini: false, isMini: false,
is: false,
}; };
}, },
@ -126,6 +126,12 @@
/* 判断是否是微信小程序内 */ /* 判断是否是微信小程序内 */
let ua = window.navigator.userAgent.toLowerCase(); let ua = window.navigator.userAgent.toLowerCase();
this.isMini = /miniProgram/i.test(ua); this.isMini = /miniProgram/i.test(ua);
/* 初始弹窗 */
if (this.ysf.available != 1) {
this.is = true;
this.tip(product_status(this.ysf.available, this.ysf), 2);
}
}, },
filters: { filters: {
cardType (val) { cardType (val) {
@ -197,6 +203,11 @@
backGoodsFn () { backGoodsFn () {
/* 判断是否web-view打开 则不返回 */ /* 判断是否web-view打开 则不返回 */
if (this.isMini) return; if (this.isMini) return;
/* 不让其关闭弹窗 */
if (this.is) {
this.popShow = true;
return;
}
if (this.backAble) { if (this.backAble) {
window.location.replace('./homepage.html'); window.location.replace('./homepage.html');
} else { } else {
@ -205,7 +216,7 @@
}, },
/* 触发提示 */ /* 触发提示 */
tip (text, status,) { tip (text, status) {
this.popText = text; this.popText = text;
this.popStatus = status; /*1 成功 2提示 3失败 */ this.popStatus = status; /*1 成功 2提示 3失败 */
this.popShow = true; this.popShow = true;

19
ysf.css
View File

@ -285,6 +285,7 @@ body {
.available_time { .available_time {
text-align: left; text-align: left;
margin-bottom: 0.1rem;
} }
.timeList { .timeList {
@ -306,7 +307,7 @@ body {
.type { .type {
font-size: 0.1rem; font-size: 0.1rem;
background-color: rgb(238, 25, 32); background-color: rgba(238, 25, 32);
border-radius: 0.2rem; border-radius: 0.2rem;
padding: 0.03rem 0.15rem; padding: 0.03rem 0.15rem;
display: inline-block; display: inline-block;
@ -317,3 +318,19 @@ body {
.information-tag { .information-tag {
font-size: 0.2rem; font-size: 0.2rem;
} }
.card {
text-align: center;
}
.card .type {
border-radius: 0.05rem;
padding: 0.03rem 0.1rem;
}
.received-fiexd {
color: rgb(150, 152, 158);
font-size: 0.12rem;
line-height: 0.24rem;
margin-bottom: 0.1rem;
}