游戏详情页面底部button根据不同条件显示不同的颜色
This commit is contained in:
parent
791588894e
commit
917bf27fdb
@ -33,7 +33,7 @@
|
|||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view class="vote-bottom-action-bar {{ config.hide ? 'hidden' : ''}}">
|
<view class="vote-bottom-action-bar {{ config.hide ? 'hidden' : ''}}">
|
||||||
<view class="vote-bottom-main zan-btn zan-btn--small zan-btn--primary" @tap="mainBtnTap"><i class="{{config.mainBtnIconClass}}"></i>{{config.mainBtnTitle}}</view>
|
<view class="vote-bottom-main zan-btn zan-btn--small {{config.primary ? 'zan-btn--primary' : 'zan-btn--warn'}}" @tap="mainBtnTap"><i class="{{config.mainBtnIconClass}}"></i>{{config.mainBtnTitle}}</view>
|
||||||
<view class="vote-bottom-second zan-btn zan-btn--small" @tap="secondBtnTap"><i class="{{config.secondBtnIconClass}}"></i>{{config.secondBtnTitle}}</view>
|
<view class="vote-bottom-second zan-btn zan-btn--small" @tap="secondBtnTap"><i class="{{config.secondBtnIconClass}}"></i>{{config.secondBtnTitle}}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -47,7 +47,8 @@
|
|||||||
mainBtnIconClass: '',
|
mainBtnIconClass: '',
|
||||||
mainBtnTitle: '',
|
mainBtnTitle: '',
|
||||||
secondBtnIconClass: '',
|
secondBtnIconClass: '',
|
||||||
secondBtnTitle: ''
|
secondBtnTitle: '',
|
||||||
|
primary: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data = {
|
data = {
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
hide: false,
|
hide: false,
|
||||||
mainBtnIconClass: 'icon-cart',
|
mainBtnIconClass: 'icon-cart',
|
||||||
mainBtnTitle: '开通游戏',
|
mainBtnTitle: '开通游戏',
|
||||||
|
primary: false,
|
||||||
secondBtnIconClass: 'icon-coin-yen',
|
secondBtnIconClass: 'icon-coin-yen',
|
||||||
secondBtnTitle: '领取金币'
|
secondBtnTitle: '领取金币'
|
||||||
}
|
}
|
||||||
@ -195,9 +196,11 @@
|
|||||||
if (this.record.owned) {
|
if (this.record.owned) {
|
||||||
this.bottomActionCfg.mainBtnIconClass = 'icon-merge';
|
this.bottomActionCfg.mainBtnIconClass = 'icon-merge';
|
||||||
this.bottomActionCfg.mainBtnTitle = '开始游戏';
|
this.bottomActionCfg.mainBtnTitle = '开始游戏';
|
||||||
|
this.bottomActionCfg.primary = true;
|
||||||
} else {
|
} else {
|
||||||
this.bottomActionCfg.mainBtnIconClass = 'icon-cart';
|
this.bottomActionCfg.mainBtnIconClass = 'icon-cart';
|
||||||
this.bottomActionCfg.mainBtnTitle = '开通游戏';
|
this.bottomActionCfg.mainBtnTitle = '开通游戏';
|
||||||
|
this.bottomActionCfg.primary = false;
|
||||||
}
|
}
|
||||||
if (this.record.taglist) {
|
if (this.record.taglist) {
|
||||||
this.tagList = this.record.taglist.split(',');
|
this.tagList = this.record.taglist.split(',');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user