|
|
@@ -189,30 +189,24 @@ class ProductController extends BaseController
|
|
|
}
|
|
|
} else {
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
- $printPrice = [4556, 52, 1459];
|
|
|
+ $doublePrice = [52, 1459];
|
|
|
} else {
|
|
|
- $printPrice = [644];
|
|
|
+ $doublePrice = [];
|
|
|
}
|
|
|
- if (in_array($this->mainId, $printPrice)) {
|
|
|
- if (in_array($this->mainId, [52, 1459, 644])) {
|
|
|
- //打价格
|
|
|
- $price = $info->skPrice ?? 0;
|
|
|
- $price = floatval($price);
|
|
|
- $hyPrice = $info->price ?? 0;
|
|
|
- $hyPrice = floatval($hyPrice);
|
|
|
- $content .= '<TEXT x="35" y="90" font="12" w="2" h="2" r="0">----------</TEXT>';
|
|
|
- $content .= '<TEXT x="35" y="150" font="12" w="2" h="2" r="0">正价 ' . $price . '元</TEXT>';
|
|
|
- $content .= '<TEXT x="35" y="230" font="12" w="2" h="2" r="0">会员价 ' . $hyPrice . '元</TEXT>';
|
|
|
- } else {
|
|
|
- //打价格
|
|
|
- $price = $info->skPrice ?? 0;
|
|
|
- $price = floatval($price);
|
|
|
- $content .= '<TEXT x="35" y="150" font="12" w="4" h="4" r="0">' . $price . '</TEXT>';
|
|
|
- }
|
|
|
+ if (in_array($this->mainId, $doublePrice)) {
|
|
|
+ //打价格,显示正价和会员价
|
|
|
+ $price = $info->skPrice ?? 0;
|
|
|
+ $price = floatval($price);
|
|
|
+ $hyPrice = $info->price ?? 0;
|
|
|
+ $hyPrice = floatval($hyPrice);
|
|
|
+ $content .= '<TEXT x="35" y="90" font="12" w="2" h="2" r="0">----------</TEXT>';
|
|
|
+ $content .= '<TEXT x="35" y="150" font="12" w="2" h="2" r="0">正价 ' . $price . '元</TEXT>';
|
|
|
+ $content .= '<TEXT x="35" y="230" font="12" w="2" h="2" r="0">会员价 ' . $hyPrice . '元</TEXT>';
|
|
|
} else {
|
|
|
- //打价码
|
|
|
- $content .= '<QR x="35" y="100" e="L" w="5">' . Yii::$app->params['mallHost'] . "/item/show-info?id=" . $id . '</QR>';
|
|
|
- $content .= '<TEXT x="40" y="270" font="12" w="1" h="1" r="0">扫码看价格</TEXT>';
|
|
|
+ //打价格,显示零售价,并且不带元,杭州斗南鲜花不要带元
|
|
|
+ $price = $info->skPrice ?? 0;
|
|
|
+ $price = floatval($price);
|
|
|
+ $content .= '<TEXT x="35" y="150" font="12" w="4" h="4" r="0">' . $price . '</TEXT>';
|
|
|
}
|
|
|
}
|
|
|
|