|
@@ -20,13 +20,25 @@ class DistAdminDistributor extends EloquentRepository
|
|
|
*/
|
|
|
protected $eloquentClass = Model::class;
|
|
|
|
|
|
+ /*
|
|
|
+ * 清缓存
|
|
|
+ */
|
|
|
+ public static function clearCache($distId,$timeOut = 2)
|
|
|
+ {
|
|
|
+ //使用二级域名清缓存
|
|
|
+ $domain = self::getDomain($distId,1);
|
|
|
+ $url = $domain . '/?__clear_cache=1';
|
|
|
+ curlGet($url,$timeOut);
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* 得到指定分销商的域名
|
|
|
+ * type 0:当前域名 1:二级域名 2:自定义域名
|
|
|
*/
|
|
|
- public static function getDomain($distId)
|
|
|
+ public static function getDomain($distId,$type=0)
|
|
|
{
|
|
|
$model = new Model();
|
|
|
- return $model->getDomain($distId);
|
|
|
+ return $model->getDomain($distId,$type);
|
|
|
}
|
|
|
/*
|
|
|
* 获取一个标签
|