admin/app/frontend/models/order/PreOrderCoinExchange.php

27 lines
651 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\frontend\models\order;
use app\common\models\order\OrderCoinExchange;
class PreOrderCoinExchange extends OrderCoinExchange
{
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->appends = array_merge(['show_style'],$this->appends);
}
/**
* 前端显示样式:1左右布局积分全额抵扣 xxx0文字叙述177.00积分a全额 抵扣66.02元)
* @return int
*/
public function getShowStyleAttribute()
{
if (in_array($this->code,['point'])) {
return 1;
}
return 0;
}
}