提交代码
This commit is contained in:
parent
75ae3e2c3b
commit
a14334a19f
|
|
@ -3,10 +3,15 @@
|
|||
<view class="ft-fixed">
|
||||
<scroll-view class="button-scroll" scroll-x show-scrollbar="false" enhanced>
|
||||
<view class="button-container">
|
||||
<!-- 按钮1 -->
|
||||
<view v-if="checkVisible(1)" class="btn common_bg column center"
|
||||
<!-- 按钮1 (小按钮) - 当有多个按钮显示时才显示 -->
|
||||
<view v-if="checkVisible(1) && !onlyButton1Visible" class="btn common_bg column center"
|
||||
:style="{ backgroundImage: `url(${$img1('common/chouBtn1.png')})` }" @click="handleButtonClick(1)">
|
||||
</view>
|
||||
<!-- 只显示按钮1的时候,显示这个按钮,上面小的按钮隐藏 -->
|
||||
<view v-if="checkVisible(1) && onlyButton1Visible" class="btn common_bg column center"
|
||||
style="width: 260rpx;height:80rpx;" :style="{ backgroundImage: `url(${$img1('common/btn.png')})` }"
|
||||
@click="handleButtonClick(1)">
|
||||
</view>
|
||||
|
||||
<!-- 按钮3 -->
|
||||
<view v-if="checkVisible(3)" class="btn common_bg column center"
|
||||
|
|
@ -23,11 +28,11 @@
|
|||
:style="{ backgroundImage: `url(${$img1('common/chouBtn10.png')})` }" @click="handleButtonClick(10)">
|
||||
</view>
|
||||
<!-- 无限抽 -->
|
||||
<view v-if="isWuxian && checkVisible(-1)" class="btn common_bg column center"
|
||||
<!-- <view v-if="isWuxian && checkVisible(-1)" class="btn common_bg column center"
|
||||
style="background-color: #333333;border-radius: 15rpx;color: #CDEF27;font-size: 24rpx;font-family: PingFangSC, PingFang SC;letter-spacing: 2rpx;"
|
||||
@click="handleButtonClick(-1)">
|
||||
{{ wxtext }}
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 全部按钮 (仅在非无限模式显示) -->
|
||||
<view v-if="!isWuxian && checkVisible(0) && pageData.goods && pageData.goods.type != 5"
|
||||
class="btn common_bg column center" :style="{ backgroundImage: `url(${$img1('common/chouBtnAll.png')})` }"
|
||||
|
|
@ -58,6 +63,19 @@ export default {
|
|||
data() {
|
||||
return { wxtext: '十连抽' };
|
||||
},
|
||||
computed: {
|
||||
// 判断是否只有按钮1可见
|
||||
onlyButton1Visible() {
|
||||
const button1Visible = this.checkVisible(1);
|
||||
const button3Visible = this.checkVisible(3);
|
||||
const button5Visible = this.checkVisible(5);
|
||||
const button10Visible = this.isWuxian && this.checkVisible(10);
|
||||
const buttonAllVisible = !this.isWuxian && this.checkVisible(0) && this.pageData.goods && this.pageData.goods.type != 5;
|
||||
|
||||
// 如果只有按钮1可见,返回true,否则返回false
|
||||
return button1Visible && !button3Visible && !button5Visible && !button10Visible && !buttonAllVisible;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleButtonClick(num) {
|
||||
console.log(num);
|
||||
|
|
@ -88,7 +106,7 @@ export default {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (this.pageData != null && this.pageData.limitInfo != null) {
|
||||
let limitInfo = this.pageData.limitInfo;
|
||||
if (limitInfo.global_limit > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user