|
@@ -17,8 +17,6 @@ class commonid_helper
|
|
|
|
|
|
private function __construct()
|
|
|
{
|
|
|
- $this->mGid2CidContainer = [];
|
|
|
- $this->mMainImage = [];
|
|
|
}
|
|
|
|
|
|
static public function instance()
|
|
@@ -26,8 +24,18 @@ class commonid_helper
|
|
|
if(self::$stInstance == null) {
|
|
|
self::$stInstance = new commonid_helper();
|
|
|
}
|
|
|
+ if(StatesHelper::fetch_state('common_info')) {
|
|
|
+ Log::record(__METHOD__ . " reinit.",Log::DEBUG);
|
|
|
+ self::$stInstance->init();
|
|
|
+ }
|
|
|
return self::$stInstance;
|
|
|
}
|
|
|
+ private function init()
|
|
|
+ {
|
|
|
+ $this->mGid2CidContainer = [];
|
|
|
+ $this->mCid2GidsContainer = [];
|
|
|
+ $this->mMainImage = [];
|
|
|
+ }
|
|
|
|
|
|
public function main_image($goods_id)
|
|
|
{
|