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