|
|
@@ -29,36 +29,6 @@ class Sys extends BaseController
|
|
|
$sys = (new SysModel)->getDataInfo();
|
|
|
return app('json')->success($sys);
|
|
|
}
|
|
|
- /**
|
|
|
- * 微信配置
|
|
|
- * @return type
|
|
|
- */
|
|
|
- public function wxSave(){
|
|
|
- $post = UtilService::getMore([
|
|
|
- ['appid', ''],
|
|
|
- ['secret', ''],
|
|
|
- ['mchid', ''],
|
|
|
- ['apiv2key', ''],
|
|
|
- ['apiclient_key', ''],
|
|
|
- ['apiclient_cert', ''],
|
|
|
- ['notify_url', ''],
|
|
|
- ], $request);
|
|
|
- (new SysModel())->saveWxConfig($post);
|
|
|
- return app('json')->success("数据保存成功");
|
|
|
- }
|
|
|
- /**
|
|
|
- * 分享配置
|
|
|
- * @return type
|
|
|
- */
|
|
|
- public function shareSave(){
|
|
|
- $post = UtilService::getMore([
|
|
|
- ['title', ''],
|
|
|
- ['img', ''],
|
|
|
- ['query', ''],
|
|
|
- ], $request);
|
|
|
- (new SysModel())->saveShareConfig($post);
|
|
|
- return app('json')->success("数据保存成功");
|
|
|
- }
|
|
|
/**
|
|
|
* 编辑用户条款
|
|
|
* @param Request $request
|
|
|
@@ -75,11 +45,13 @@ class Sys extends BaseController
|
|
|
* 保存数据
|
|
|
*/
|
|
|
public function save(Request $request){
|
|
|
- $post = UtilService::getMore([
|
|
|
- ['title', ''],
|
|
|
- ['system_url', ''],
|
|
|
- ['tag', ''],
|
|
|
- ['custom_tel', ''],
|
|
|
+ $saveType = $request->param("saveType", "sys");
|
|
|
+ if($saveType=="sys"){
|
|
|
+ $post = UtilService::getMore([
|
|
|
+ ['title', ''],
|
|
|
+ ['system_url', ''],
|
|
|
+ ['tag', ''],
|
|
|
+ ['custom_tel', ''],
|
|
|
// ['ip_income_per',0,'empty','IP商品收益百分比大于0'],
|
|
|
// ['tree_income_per',0],
|
|
|
// ['tree_income_per_two',0],
|
|
|
@@ -87,14 +59,32 @@ class Sys extends BaseController
|
|
|
// ['tx_limit_money',0],
|
|
|
// ['tx_process_per',0],
|
|
|
// ['tx_process_max',0],
|
|
|
- ], $request);
|
|
|
-// $post["tx_limit_money"] = (int)$post["tx_limit_money"];
|
|
|
-// $post["tx_process_per"] = (int)$post["tx_process_per"];
|
|
|
-// $post["tx_process_max"] = (int)$post["tx_process_max"];
|
|
|
- if(!empty($post["custom_tel"])){
|
|
|
- $post["custom_tel"] = str_replace(",", ",", $post["custom_tel"]);
|
|
|
+ ], $request);
|
|
|
+ if(!empty($post["custom_tel"])){
|
|
|
+ $post["custom_tel"] = str_replace(",", ",", $post["custom_tel"]);
|
|
|
+ }
|
|
|
+ (new SysModel())->saveSys($post);
|
|
|
+ }
|
|
|
+ if($saveType=="weixin"){
|
|
|
+ $post = UtilService::getMore([
|
|
|
+ ['appid', ''],
|
|
|
+ ['secret', ''],
|
|
|
+ ['mchid', ''],
|
|
|
+ ['apiv2key', ''],
|
|
|
+ ['apiclient_key', ''],
|
|
|
+ ['apiclient_cert', ''],
|
|
|
+ ['notify_url', ''],
|
|
|
+ ], $request);
|
|
|
+ (new SysModel())->saveWxConfig($post);
|
|
|
+ }
|
|
|
+ if($saveType=="share"){
|
|
|
+ $post = UtilService::getMore([
|
|
|
+ ['title', ''],
|
|
|
+ ['img', ''],
|
|
|
+ ['query', ''],
|
|
|
+ ], $request);
|
|
|
+ (new SysModel())->saveShareConfig($post);
|
|
|
}
|
|
|
-
|
|
|
(new SysModel())->saveSys($post);
|
|
|
return app('json')->success("数据保存成功");
|
|
|
}
|