|
@@ -51,6 +51,16 @@ class Sys extends Model
|
|
|
];
|
|
|
$this->where("id",1)->update(["shareconfig"=> serialize($save)]);
|
|
|
}
|
|
|
+
|
|
|
+ * 邀请配置
|
|
|
+ * @param type $data
|
|
|
+ */
|
|
|
+ public function saveInviteConfig($data){
|
|
|
+ $save=[
|
|
|
+ "img" => empty($data["img"]) ? "" : $data["img"],
|
|
|
+ ];
|
|
|
+ $this->where("id",1)->update(["inviteconfig"=> serialize($save)]);
|
|
|
+ }
|
|
|
|
|
|
* 获取配置详情
|
|
|
* @return type
|
|
@@ -80,15 +90,26 @@ class Sys extends Model
|
|
|
if(!empty($sys->shareconfig)){
|
|
|
$shareconfig = unserialize($sys->shareconfig);
|
|
|
}
|
|
|
+
|
|
|
+ $inviteconfig=[
|
|
|
+ "img"=>"",
|
|
|
+ ];
|
|
|
+ if(!empty($sys->inviteconfig)){
|
|
|
+ $inviteconfig = unserialize($sys->inviteconfig);
|
|
|
+ }
|
|
|
if($code=="weixin"){
|
|
|
return $wxconfig;
|
|
|
}
|
|
|
if($code=="share"){
|
|
|
return $shareconfig;
|
|
|
}
|
|
|
+ if($code=="invite"){
|
|
|
+ return $inviteconfig;
|
|
|
+ }
|
|
|
$data = $sys->toArray();
|
|
|
- $data["shareconfig"] = $shareconfig;
|
|
|
$data["wxconfig"] = $wxconfig;
|
|
|
+ $data["shareconfig"] = $shareconfig;
|
|
|
+ $data["inviteconfig"] = $inviteconfig;
|
|
|
return $data;
|
|
|
}
|
|
|
|