修正佛前供灯bug
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
|
||||
<fixed-bottom ref="fixedBottom">
|
||||
<button class="merit-button" @click="showSpec = true">点击供灯</button>
|
||||
<button class="merit-button" @click="onLightAction">点击供灯</button>
|
||||
</fixed-bottom>
|
||||
|
||||
<van-popup v-model="showSpec" position="bottom" closeable :style="{ height: 'auto' }" safe-area-inset-bottom :close-on-click-overlay="false" :close-on-popstate="true">
|
||||
@@ -101,7 +101,7 @@
|
||||
<script>
|
||||
import 'swiper/css/swiper.css'
|
||||
import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
||||
import { getGoodsLightDetail, getOrderCompare } from '@/api';
|
||||
import { getGoodsLightDetail, getOrderCompare, hasLogin } from "@/api";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -142,7 +142,7 @@ export default {
|
||||
payList: [],
|
||||
currentLight: null,
|
||||
currentLightPrice: 0,
|
||||
currentLightSize: '',
|
||||
currentLightSize: 53,
|
||||
buy_quantity: 1, // 购买数量
|
||||
}
|
||||
},
|
||||
@@ -159,7 +159,7 @@ export default {
|
||||
const len = Math.ceil(goods.length / 15);
|
||||
const lights = [];
|
||||
for(let i = 0; i < len; i++){
|
||||
lights.push(goods.slice(0 * i, 0 * i + 15))
|
||||
lights.push(goods.slice(15 * i, i * 15 + 15))
|
||||
}
|
||||
return lights;
|
||||
},
|
||||
@@ -172,10 +172,14 @@ export default {
|
||||
this.getGoodsLightDetail('common');
|
||||
},
|
||||
methods: {
|
||||
async onLightAction(){
|
||||
await hasLogin();
|
||||
this.showSpec = true
|
||||
},
|
||||
// 选择供灯种类
|
||||
onSelectLight(light){
|
||||
this.currentLight = light;
|
||||
this.currentLightSize = ''
|
||||
this.currentLightSize = light.children[0].id;
|
||||
},
|
||||
// 接收随喜金额
|
||||
onReceiveAnyAmount(anyObj){
|
||||
@@ -218,6 +222,7 @@ export default {
|
||||
const response = await getGoodsLightDetail(type, goods_id, temple_id);
|
||||
this.data = response;
|
||||
this.currentLight = response.goods[0];
|
||||
this.currentLightSize = this.currentLight.children[0].id
|
||||
await this.getPayRecords({ id: 1});
|
||||
this.$nextTick(() => {
|
||||
this.paddingBottom = this.$refs.fixedBottom.getOffsetHeight()
|
||||
@@ -238,7 +243,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
$lightWidth: 1.3rem;
|
||||
$lightWidth: 1.5rem;
|
||||
.goods-detail{
|
||||
.goods-content{
|
||||
padding-left: .3rem;
|
||||
@@ -251,7 +256,7 @@ $lightWidth: 1.3rem;
|
||||
.light-container{
|
||||
padding-left: .4rem;
|
||||
padding-right: .4rem;
|
||||
max-height: 10rem;
|
||||
max-height: 13rem;
|
||||
overflow: auto;
|
||||
.light-wrapper{
|
||||
border-top: 1px solid #ddd;
|
||||
@@ -266,6 +271,14 @@ $lightWidth: 1.3rem;
|
||||
text-align: center;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.van-swipe{
|
||||
padding-bottom: .5rem;
|
||||
}
|
||||
.van-grid-item__content{
|
||||
padding-bottom: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.current-light{
|
||||
border: 1px solid $primary-color;
|
||||
border-radius: 4px;
|
||||
@@ -279,12 +292,11 @@ $lightWidth: 1.3rem;
|
||||
vertical-align: top;
|
||||
}
|
||||
span{
|
||||
font-size: .4rem;
|
||||
font-size: .35rem;
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: .3rem;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
@@ -306,16 +318,16 @@ $lightWidth: 1.3rem;
|
||||
font-size: .4rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: .6rem;
|
||||
align-items: center;
|
||||
margin-bottom: .65rem;
|
||||
span{
|
||||
color: black;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
.light-size{
|
||||
margin-top: 1.1rem;
|
||||
margin-top: .4rem;
|
||||
margin-bottom: .4rem;
|
||||
|
||||
.van-radio__label{
|
||||
margin-left: 4px;
|
||||
font-size: .35rem;
|
||||
@@ -328,7 +340,7 @@ $lightWidth: 1.3rem;
|
||||
}
|
||||
.light-count{
|
||||
align-items: center;
|
||||
margin-bottom: .2rem;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
}
|
||||
.support{
|
||||
|
||||
Reference in New Issue
Block a user