stanley-king il y a 8 ans
Parent
commit
dcc069c5c1

+ 3 - 0
admin/control/cache.php

@@ -184,6 +184,9 @@ class cacheControl extends SystemControl
             if (in_array('searcher_goods',$todo)) { //搜索引擎重新加载数据
                 $this->mPublisher->modify_seracher_init();
             }
+            if(in_array('pay_fcode',$todo)) {
+                $this->mPublisher->modify_index_fcode();
+            }
         }
 
         $this->log(L('cache_cls_operate'));

+ 4 - 0
admin/language/zh/cache.php

@@ -24,6 +24,10 @@ $lang['cache_cls_specials']	    = '手机专题、首页标签';
 $lang['cache_cls_discovery']	= '手机发现页相关缓存';
 $lang['cache_cls_goods']	    = '商品相关缓存';
 $lang['cache_cls_searcher']	    = '搜索引擎重新加载数据';
+$lang['cache_cls_payfcode']	    = '支付后F码商品';
+
+
+
 $lang['cache_cls_salelist']	    = '手机品牌相关缓存';
 $lang['cache_cls_appversion']	= 'Andrid手机版本信息缓存';
 $lang['cache_cls_ok']			= '更新成功';

+ 2 - 0
admin/language/zh_cn/cache.php

@@ -24,6 +24,8 @@ $lang['cache_cls_specials']	    = '手机专题、首页标签';
 $lang['cache_cls_discovery']	= '手机发现页相关缓存';
 $lang['cache_cls_goods']	    = '商品相关缓存';
 $lang['cache_cls_searcher']	    = '搜索引擎重新加载数据';
+$lang['cache_cls_payfcode']	    = '支付后F码商品';
+
 $lang['cache_cls_salelist']	    = '手机品牌相关缓存';
 $lang['cache_cls_appversion']	= 'Andrid手机版本信息缓存';
 

+ 7 - 0
admin/templates/default/cache.clear.php

@@ -153,6 +153,13 @@
                                             &nbsp;<?php echo $lang['cache_cls_searcher'] ?>
                                         </label>
                                     </li>
+                                    <li class="left w18pre">
+                                        <label>
+                                            <input type="checkbox" name="cache[]" id="pay_fcode"
+                                                   value="pay_fcode">
+                                            &nbsp;<?php echo $lang['cache_cls_payfcode'] ?>
+                                        </label>
+                                    </li>
                                 </ul>
                             </td>
                         </tr>

+ 27 - 0
helper/fcode/manager.php

@@ -6,7 +6,34 @@
  * Time: 下午10:35
  */
 
+namespace fcode;
+
+
 class manager
 {
+    public static $stInstance;
+
+    private function __construct()
+    {
+    }
+
+    static public function instance()
+    {
+        if(self::$stInstance == null) {
+            self::$stInstance = new manager();
+        }
+
+        if(StatesHelper::fetch_state('fcode')) {
+            Log::record("fcode reinit data.",Log::DEBUG);
+            self::$stInstance->init();
+        }
+
+        return self::$stInstance;
+    }
+
+    private function init()
+    {
+
+    }
 
 }

+ 3 - 0
helper/message/msgutil.php

@@ -26,6 +26,9 @@ class StatesHelper
         elseif($type == 'brands') {
             $states['brands'] = true;
         }
+        elseif($type == 'fcode') {
+            $states['fcode'] = true;
+        }
     }
 
     static public function onActivity($states,$msg)

+ 6 - 0
helper/message/publisher.php

@@ -46,6 +46,12 @@ class publisher
             $this->mRedis->publish('ch_index',serialize(array('type'=>'brands','value' => 0)));
         }
     }
+    public function modify_index_fcode()
+    {
+        if($this->mConnected) {
+            $this->mRedis->publish('ch_index',serialize(array('type'=>'fcode','value' => 0)));
+        }
+    }
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     public function modify_index_special()
     {