fix : 修改联系方式
This commit is contained in:
parent
2af1859406
commit
b6e386ad1b
@ -23,12 +23,15 @@ class ContactInfo extends BaseController
|
||||
$query = ModelContactInfo::field([
|
||||
'contact_info_id',
|
||||
'contact_info_guid',
|
||||
'contact_info_location',
|
||||
'latitude',
|
||||
'longitude',
|
||||
'customer_service_wx',
|
||||
'contact_info_phone',
|
||||
'join_apply_content'
|
||||
'contact_info_location',
|
||||
'longitude',
|
||||
'latitude',
|
||||
'contact_info_content',
|
||||
'customer_service_wx_img',
|
||||
'wx_office_accounts_img',
|
||||
'weibo_img',
|
||||
'qq_img'
|
||||
])->where(1)->find();
|
||||
|
||||
return [
|
||||
@ -45,20 +48,25 @@ class ContactInfo extends BaseController
|
||||
{
|
||||
$params = $request->param();
|
||||
$this->validate($params, [
|
||||
'contact_info_location|定位' => 'require',
|
||||
'customer_service_wx|客户微信' => 'require',
|
||||
'contact_info_phone|联系电话' => 'require',
|
||||
'join_apply_content|加盟简介' => 'require'
|
||||
'contact_info_phone|咨询热线' => 'require',
|
||||
'contact_info_content|联系我们简介' => 'require',
|
||||
'customer_service_wx_img|客服微信图片' => 'require',
|
||||
'wx_office_accounts_img|微信公众号图片' => 'require',
|
||||
'weibo_img|官方微博图片' => 'require',
|
||||
'qq_img|官方qq图片' => 'require'
|
||||
]);
|
||||
$model = ModelContactInfo::where('contact_info_id',1)->find();
|
||||
$model = ModelContactInfo::where(1)->find();
|
||||
$model->allowField([
|
||||
'contact_info_update_user_guid',
|
||||
'contact_info_location',
|
||||
'latitude',
|
||||
'longitude',
|
||||
'customer_service_wx',
|
||||
'contact_info_phone',
|
||||
'join_apply_content'
|
||||
'contact_info_location',
|
||||
'longitude',
|
||||
'latitude',
|
||||
'contact_info_content',
|
||||
'customer_service_wx_img',
|
||||
'wx_office_accounts_img',
|
||||
'weibo_img',
|
||||
'qq_img'
|
||||
])->save($params);
|
||||
return msg('编辑成功!');
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller\ContactInfo;
|
||||
namespace app\api\controller\ContactUs;
|
||||
|
||||
use app\BaseController;
|
||||
use app\common\model\ContactUs\ContactInfo as ModelContactInfo;
|
||||
@ -21,14 +21,15 @@ class ContactInfo extends BaseController
|
||||
$params = $request->param();
|
||||
|
||||
$query = ModelContactInfo::field([
|
||||
'contact_info_id',
|
||||
'contact_info_guid',
|
||||
'contact_info_location',
|
||||
'latitude',
|
||||
'longitude',
|
||||
'customer_service_wx',
|
||||
'contact_info_phone',
|
||||
'join_apply_content'
|
||||
'contact_info_location',
|
||||
'longitude',
|
||||
'latitude',
|
||||
'contact_info_content',
|
||||
'customer_service_wx_img',
|
||||
'wx_office_accounts_img',
|
||||
'weibo_img',
|
||||
'qq_img'
|
||||
])->where(1)->find();
|
||||
|
||||
return [
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller\JoinApply;
|
||||
namespace app\api\controller\ContactUs;
|
||||
|
||||
use app\BaseController;
|
||||
use app\common\model\ContactUs\JoinApply as ModelJoinApply;
|
||||
@ -17,6 +17,20 @@ use think\facade\Env;
|
||||
|
||||
class JoinApply extends BaseController
|
||||
{
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @date 2022-03-15
|
||||
* @example
|
||||
* @author admin
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected function initialize(): void
|
||||
{
|
||||
$this->middleware[SessionInit::class] = [
|
||||
'only' => ['accountLogin', 'getCaptcha']
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加加盟申请
|
||||
@ -30,6 +44,7 @@ class JoinApply extends BaseController
|
||||
'join_apply_user_position|职位' => 'require',
|
||||
'join_apply_user_area|所在地区' => 'require',
|
||||
'join_apply_user_org|所属机构名称' => 'require',
|
||||
'captcha|验证码' => 'require|captcha',
|
||||
]);
|
||||
$model = ModelJoinApply::create($params, [
|
||||
'join_apply_guid',
|
@ -26,17 +26,23 @@ class ContactInfo extends BaseModel
|
||||
|
||||
"contact_info_guid" => "string",
|
||||
|
||||
"contact_info_location" => "string",
|
||||
"contact_info_phone" => "string",
|
||||
|
||||
"latitude" => "string",
|
||||
"contact_info_location" => "string",
|
||||
|
||||
"longitude" => "string",
|
||||
|
||||
"customer_service_wx" => "string",
|
||||
"latitude" => "string",
|
||||
|
||||
"contact_info_phone" => "int",
|
||||
"contact_info_content" => "string",
|
||||
|
||||
"join_apply_content" => "string",
|
||||
"customer_service_wx_img" => "string",
|
||||
|
||||
"wx_office_accounts_img" => "string",
|
||||
|
||||
"weibo_img" => "string",
|
||||
|
||||
"qq_img" => "string",
|
||||
|
||||
"contact_info_create_time" => "datetime",
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user