stanley-king 7 лет назад
Родитель
Сommit
8bec8e6402
2 измененных файлов с 27 добавлено и 41 удалено
  1. 1 1
      helper/async/broadcast/params_table.php
  2. 26 40
      mobile/control/member_bonus.php

+ 1 - 1
helper/async/broadcast/params_table.php

@@ -19,7 +19,7 @@ class params_table
         $this->mSmstypeParams = [];
         $this->mSmstypeParams[Sms::tpl_new_goods] = [
             'type_bless' => '韩国品牌婵真上架,领红包,愉快购物~',
-            'type_name'  => '购物红包',
+            'type_name'  => '购物红包',
             'push_title' => "收到上新红包",
             'push_text'  => "韩国大牌 婵真 最新入驻,领50元红包,马上尝鲜~",
             'push_url' => ""

+ 26 - 40
mobile/control/member_bonus.php

@@ -616,48 +616,34 @@ class member_bonusControl extends mbMemberControl
 
     private function tip_block($state,$count)
     {
-        if(is_publish())
-        {
-            if($state == 'usable') {
-                $special_id = $count > 0 ? 151 : 149;
-            }
-            elseif($state == 'expiring') {
-                $special_id = $count > 0 ? 150 : 150;
-            }
-            elseif($state == 'used') {
-                $special_id = 153;
-            }
-            elseif($state == 'expired') {
-                $special_id = 0;
-            }
-            elseif($state == 'send') {
-                $special_id = $count == 0 ? 152 : 0;
-            }
-            else {
-                $special_id = 0;
-            }
+        global $config;
+        $banners = $config['bonus_detail_banner'];
+
+        if($state == 'usable') {
+            $key = 'usable';
         }
-        else
-        {
-            if($state == 'usable') {
-                $special_id = $count > 0 ? 151 : 149;
-            }
-            elseif($state == 'expiring') {
-                $special_id = $count > 0 ? 150 : 150;
-            }
-            elseif($state == 'used') {
-                $special_id = 153;
-            }
-            elseif($state == 'expired') {
-                $special_id = 0;
-            }
-            elseif($state == 'send') {
-                $special_id = $count == 0 ? 152 : 0;
-            }
-            else {
-                $special_id = 0;
-            }
+        elseif($state == 'expiring') {
+            $key = 'expiring';
+        }
+        elseif($state == 'used') {
+            $key = 'used';
+        }
+        elseif($state == 'expired') {
+            $key = 'expired';
         }
+        elseif($state == 'send') {
+            $key = 'send';
+        }
+        else {
+            $key = '';
+        }
+
+        if(!empty($key)) {
+            $special_id = $count <= 0 ? $banners[$key][0] : $banners[$key][1];
+        } else {
+            $special_id = 0;
+        }
+
         if($special_id == 0) return false;
 
         $helper = new special_formater($special_id);