作者 杨育虎
1 个管道 的构建 通过 耗费 1 秒

Merge branch 'master' of http://114.215.101.231:8099/guosheng/community

Conflicts:
	public/api.html
<?php
namespace app\api\controller;
use app\api\model\Deposit;
use app\api\model\DepositOrder;
use app\api\model\Industry;
use app\api\model\StoreComment;
use app\api\model\StoreInform;
use app\api\model\StoreInformGood;
use app\api\model\UserHouse;
use app\api\validate\HotValidate;
use app\common\controller\Api;
use think\Db;
use think\Exception;
use think\exception\PDOException;
use think\Request;
/**
* 周边热点接口
*/
class Hot extends Api
{
protected $noNeedLogin = [];
protected $noNeedRight = ['*'];
protected $store_model;
protected $store_inform_model;
protected $store_inform_good_model;
protected $user_house_model;
protected $industry_model;
protected $favorite_model;
protected $comment_model;
protected $good_model;
protected $follow_model;
protected $user_id;
public function __construct(Request $request,\app\api\model\Store $store,Industry $industry,StoreInform $store_inform,UserHouse $user_house,StoreInformGood $store_inform_good)
{
parent::__construct($request);
$this->industry_model = $industry;
$this->store_model = $store;
$this->store_inform_model = $store_inform;
$this->store_inform_good_model = $store_inform_good;
$this->user_house_model = $user_house;
$this->user_id = $this->auth->id;
}
/**
* 商圈信息列表
* @ApiWeigh (80)
*
* @ApiTitle (商圈信息列表)
* @ApiSummary (商圈信息列表)
* @ApiMethod (POST)
* @ApiRoute (/api/hot/store_list)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="page", type="integer", required=true, description="页数")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功',
"data": {
"list": [
{
"id": 1,
"name": "行业名称",
"weigh": 0,
}
]
}
})
*/
public function store_list()
{
if($this->request->isPost()){
$page = $this->request->param('page',1,'intval');
$house_ids = $this->user_house_model->where('user_id',$this->user_id)->column('house_id');
$query = function ($query) use ($house_ids){
foreach ($house_ids as $k=>$v){
$w = ['house_ids'=>['like','%,'.$v.',%']];
if($k == 0) {
$query->where($w);
} else {
$query->whereOr($w);
}
}
};
$where = [
'where' => $query
];
$order = ['number'=>'DESC','createtime'=>'DESC'];
$inform = $this->store_inform_model->pageSelect($page,$where,'*',$order,config('option.num'));
$list = $inform->items();
foreach ($list as &$v) {
// 获取点赞数及是否点赞
$where_g = [
'object_id' => $v['id']
];
$v['good_count'] = $this->store_inform_good_model->getCount($where_g);
$where_g['user_id'] = $this->user_id;
$v['is_good'] = $this->store_inform_good_model->getCount($where_g);
}
$return = [
'list' => $list,
'this_page' => $inform->currentPage(),
'total_page' => $inform->lastPage()
];
$this->success('请求成功',$return);
}
}
/**
* 留言提交
* @ApiWeigh (50)
*
* @ApiTitle (留言提交)
* @ApiSummary (留言提交)
* @ApiMethod (POST)
* @ApiRoute (/api/hot/comment_add)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="store_id", type="integer", required=true, description="店铺id")
* @ApiParams (name="content", type="string", required=true, description="留言内容")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功'
})
*/
public function comment_add()
{
$param = (new HotValidate())->goCheck('comment_add');
$where = [
'where' => ['id' => $param['store_id']]
];
$store = $this->store_model->findOrFail($where);
Db::startTrans();
$result = false;
try{
$param['user_id'] = $this->auth->id;
$param['store_user_id'] = $store['user_id'];
$model = new StoreComment();
$result = $model->add($param);
Db::commit();
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if(!$result) {
$this->error('留言失败');
}
$this->success('留言成功');
}
}
\ No newline at end of file
... ...
... ... @@ -4,12 +4,18 @@
namespace app\api\controller;
use addons\litestore\model\Litestoreorder;
use app\api\model\Deposit;
use app\api\model\DepositOrder;
use app\api\model\Industry;
use app\api\model\LitestoreBanner;
use app\api\model\LitestoreGoodsSpec;
use app\api\model\Report;
use app\api\model\StoreApply;
use app\api\model\StoreComment;
use app\api\model\StoreInform;
use app\api\model\StoreOrder;
use app\api\model\UserSearch;
use app\api\validate\StoreValidate;
use app\common\controller\Api;
use EasyWeChat\Foundation\Application;
use EasyWeChat\Payment\Order;
... ... @@ -28,24 +34,20 @@ class Store extends Api
protected $noNeedRight = ['*'];
protected $store_model;
protected $industry_model;
protected $goods_model;
protected $banner_model;
protected $spec_model;
protected $search_model;
protected $deposit_model;
protected $deposit_order_model;
protected $favorite_model;
protected $comment_model;
protected $good_model;
protected $follow_model;
protected $user_id;
public function __construct(Request $request, LitestoreBanner $banner, \app\api\model\LitestoreGoods $goods,LitestoreGoodsSpec $spec,UserSearch $search,\app\api\model\Store $store,Industry $industry)
public function __construct(Request $request,\app\api\model\Store $store,Industry $industry,Deposit $deposit,DepositOrder $deposit_order)
{
parent::__construct($request);
$this->banner_model = $banner;
$this->industry_model = $industry;
$this->goods_model = $goods;
$this->spec_model = $spec;
$this->search_model = $search;
$this->deposit_model = $deposit;
$this->deposit_order_model = $deposit_order;
$this->store_model = $store;
$this->user_id = $this->auth->id;
}
... ... @@ -96,7 +98,7 @@ class Store extends Api
/**
* 店铺申请
* @ApiWeigh (77)
* @ApiWeigh (55)
*
* @ApiTitle (店铺申请)
* @ApiSummary (店铺申请)
... ... @@ -118,7 +120,7 @@ class Store extends Api
*/
public function store_add()
{
// $param = (new RecruitValidate())->goCheck('add');
$param = (new StoreValidate())->goCheck('store_add');
$order_sn = $param['order_sn'] = get_order_sn();
$pay_data = [];
if($this->auth->end_time > time()) {
... ... @@ -170,7 +172,7 @@ class Store extends Api
/**
* 开通社区提交
* @ApiWeigh (74)
* @ApiWeigh (50)
*
* @ApiTitle (开通社区提交)
* @ApiSummary (开通社区提交)
... ... @@ -192,14 +194,13 @@ class Store extends Api
*/
public function store_apply()
{
// $param = (new RecruitValidate())->goCheck('add');
$param = (new StoreValidate())->goCheck('store_apply');
Db::startTrans();
$result = false;
try{
$param['user_id'] = $this->auth->id;
$model = new StoreApply();
$result = $model->add($param);
$id = $model->id;
Db::commit();
} catch (PDOException $e) {
Db::rollback();
... ... @@ -216,7 +217,7 @@ class Store extends Api
/**
* 举报建议提交
* @ApiWeigh (70)
* @ApiWeigh (45)
*
* @ApiTitle (举报建议提交)
* @ApiSummary (举报建议提交)
... ... @@ -233,7 +234,7 @@ class Store extends Api
*/
public function store_report()
{
// $param = (new RecruitValidate())->goCheck('add');
$param = (new StoreValidate())->goCheck('store_report');
Db::startTrans();
$result = false;
try{
... ... @@ -254,4 +255,441 @@ class Store extends Api
}
$this->success('提交成功');
}
/**
* 商家首页
* @ApiWeigh (40)
*
* @ApiTitle (商家首页)
* @ApiSummary (商家首页)
* @ApiMethod (POST)
* @ApiRoute (/api/store/store)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功'
})
*/
public function store()
{
$store = $this->get_store();
$return = [
'id' => $store['id'],
'store_name' => $store['store_name'],
'image_arr' => $store['image_arr'],
];
$this->success('成功',$return);
}
/**
* 店铺信息更新
* @ApiWeigh (35)
*
* @ApiTitle (店铺信息更新)
* @ApiSummary (店铺信息更新)
* @ApiMethod (POST)
* @ApiRoute (/api/store/store_edit)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="id", type="integer", required=true, description="店铺id")
* @ApiParams (name="store_icon", type="string", required=true, description="店铺图标")
* @ApiParams (name="store_name", type="string", required=true, description="店铺名称")
* @ApiParams (name="mobile", type="string", required=true, description="商家电话")
* @ApiParams (name="province", type="string", required=true, description="省")
* @ApiParams (name="city", type="string", required=true, description="市")
* @ApiParams (name="region", type="string", required=true, description="区")
* @ApiParams (name="images", type="string", required=true, description="宣传图/轮播图")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功'
})
*/
public function store_edit()
{
$param = (new StoreValidate())->goCheck('store_edit');
$store = $this->get_store($param['id']);
Db::startTrans();
$result = false;
try{
$param['user_id'] = $this->auth->id;
$result = $this->store_model->edit($param);
Db::commit();
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if(!$result) {
$this->error('保存失败');
}
$this->success('保存成功');
}
/**
* 发布信息
* @ApiWeigh (30)
*
* @ApiTitle (发布信息)
* @ApiSummary (发布信息)
* @ApiMethod (POST)
* @ApiRoute (/api/store/store_inform_add)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="content", type="string", required=true, description="详细内容")
* @ApiParams (name="images", type="string", required=true, description="图片")
* @ApiParams (name="house_ids", type="string", required=true, description="推广社区")
* @ApiParams (name="type", type="integer", required=true, description="推广类型1=红包推送信息2=一般信息")
* @ApiParams (name="red_package", type="string", required=false, description="红包总金额")
* @ApiParams (name="number", type="string", required=false, description="红包数量")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功'
})
*/
public function store_inform_add()
{
$param = (new StoreValidate())->goCheck('store_inform_add');
if($param['type'] == 1) {
$param = (new StoreValidate())->goCheck('red');
}
$store = $this->get_store();
if($param['type'] == 1) {
$param['score'] = bcadd(config('site.send_score'),$param['red_package'],2);
}
Db::startTrans();
$result = false;
try{
$param['user_id'] = $this->auth->id;
$param['house_ids'] = ','.$param['house_ids'].',';
$model = new StoreInform();
$result = $model->add($param);
Db::commit();
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if(!$result) {
$this->error('提交失败');
}
$this->success('提交成功');
}
/**
* 绑定新社区
* @ApiWeigh (25)
*
* @ApiTitle (绑定新社区)
* @ApiSummary (绑定新社区)
* @ApiMethod (POST)
* @ApiRoute (/api/store/store_new)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="house_ids", type="string", sample="店铺1id,店铺2id", required=true, description="绑定社区id")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功'
})
*/
public function store_new()
{
$param = (new StoreValidate())->goCheck('store_new');
$store = $this->get_store();
$order_sn = $param['order_sn'] = get_order_sn();
$pay_data = [];
if($this->auth->end_time > time()) {
$param['status'] = 2;
} else {
$param['status'] = 1;
// 获取小程序配置
$options = \config('miniprogram.basic');
$app = new Application($options);
$payment = $app->payment;
// 获取支付参数
$attributes = [
'body' => '发布招募合伙人',
'out_trade_no' => $order_sn,
'total_fee' => 1, // $param['money'] * 100
'spbill_create_ip' => request()->ip(), // 可选,如不传该参数,SDK 将会自动获取相应 IP 地址
'notify_url' => url('index/ajax/notify',[],true,true), // 支付结果通知网址,如果不设置则会使用配置里的默认地址
'trade_type' => 'JSAPI', // 请对应换成你的支付方式对应的值类型
'openid' => Db::name('third')->where('user_id',$this->auth->id)->value('openid'),
];
$order = new Order($attributes);
$order_result = $payment->pay($order);
if($order_result['return_code'] == 'SUCCESS' && $order_result['result_code'] == 'SUCCESS') {
$prepayId = $order_result->prepay_id;
} else {
$this->error($order_result['return_msg']);
}
}
$model = new StoreOrder();
Db::startTrans();
$result = false;
$result_invite = true;
try{
$param['store_id'] = $store['id'];
$param['user_id'] = $this->auth->id;
$result = $model->add($param);
$id = $model->id;
Db::commit();
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if(!$result || !$result_invite) {
$this->error('提交失败');
}
$this->success('提交成功',['id'=>$id,'status'=>$param['status'],'pay_data'=>$pay_data]);
}
/**
* 留言消息
* @ApiWeigh (80)
*
* @ApiTitle (留言消息)
* @ApiSummary (留言消息)
* @ApiMethod (POST)
* @ApiRoute (/api/store/comment_list)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="page", type="integer", required=true, description="页数")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功',
"data": {
"list": [
{
"id": 1,
"name": "行业名称",
"weigh": 0,
}
]
}
})
*/
public function store_list()
{
if($this->request->isPost()){
$param = (new StoreValidate())->goCheck('comment_reply');
$store = $this->get_store();
$page = $param['page'];
$where = [
'where' => ['store_id'=>$store['id']],
'with' => ['user_info']
];
$order = ['number'=>'DESC','createtime'=>'DESC'];
$model = new StoreComment();
$comment = $model->pageSelect($page,$where,'*',$order,config('option.num'));
$list = $comment->items();
$return = [
'list' => $list,
'this_page' => $comment->currentPage(),
'total_page' => $comment->lastPage()
];
$this->success('请求成功',$return);
}
}
/**
* 留言消息
* @ApiWeigh (50)
*
* @ApiTitle (留言消息)
* @ApiSummary (留言消息)
* @ApiMethod (POST)
* @ApiRoute (/api/store/comment_reply)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="comment_id", type="integer", required=true, description="留言id")
* @ApiParams (name="content", type="string", required=true, description="留言内容")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功'
})
*/
public function comment_reply()
{
$param = (new StoreValidate())->goCheck('comment_reply');
Db::startTrans();
$result = false;
try{
$param['user_id'] = $this->auth->id;
$model = new StoreComment();
$result = $model->add($param);
Db::commit();
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if(!$result) {
$this->error('提交失败');
}
$this->success('提交成功');
}
/**
* 板币充值列表
* @ApiWeigh (20)
*
* @ApiTitle (板币充值列表)
* @ApiSummary (板币充值列表)
* @ApiMethod (POST)
* @ApiRoute (/api/store/deposit)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功',
"data": {
"list": [
{
"id": 1,
"name": "行业名称",
"weigh": 0,
}
]
}
})
*/
public function deposit()
{
if($this->request->isPost()){
$keyword = $this->request->param('keyword','');
$where = [
'where' => []
];
if($keyword) {
$where['where'] = ['name'=>['like','%'.$keyword.'%']];
}
$indus = $this->industry_model->selectOrFail($where,false,'*','weigh');
$return = [
'list' => $indus,
];
$this->success('请求成功',$return);
}
}
/**
* 板币充值提交
* @ApiWeigh (15)
*
* @ApiTitle (板币充值提交)
* @ApiSummary (板币充值提交)
* @ApiMethod (POST)
* @ApiRoute (/api/store/deposit_order)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="deposit_id", type="integer", required=true, description="板币充值id")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功'
})
*/
public function deposit_order()
{
$param = (new StoreValidate())->goCheck('deposit_order');
$store = $this->get_store();
$deposit = $this->deposit_model->findOrFail(['id'=>$param['depost_id']]);
$order_sn = $param['order_sn'] = get_order_sn();
$pay_data = [];
if($this->auth->end_time > time()) {
$param['status'] = 2;
} else {
$param['status'] = 1;
// 获取小程序配置
$options = \config('miniprogram.basic');
$app = new Application($options);
$payment = $app->payment;
// 获取支付参数
$attributes = [
'body' => '板币充值',
'out_trade_no' => $order_sn,
'total_fee' => 1, // $param['money'] * 100
'spbill_create_ip' => request()->ip(), // 可选,如不传该参数,SDK 将会自动获取相应 IP 地址
'notify_url' => url('index/ajax/notify',[],true,true), // 支付结果通知网址,如果不设置则会使用配置里的默认地址
'trade_type' => 'JSAPI', // 请对应换成你的支付方式对应的值类型
'openid' => Db::name('third')->where('user_id',$this->auth->id)->value('openid'),
];
$order = new Order($attributes);
$order_result = $payment->pay($order);
if($order_result['return_code'] == 'SUCCESS' && $order_result['result_code'] == 'SUCCESS') {
$prepayId = $order_result->prepay_id;
} else {
$this->error($order_result['return_msg']);
}
}
$model = $this->deposit_order_model;
Db::startTrans();
$result = false;
$result_invite = true;
try{
$param['deposit_id'] = $store['id'];
$param['user_id'] = $this->auth->id;
$param['score'] = $deposit['score'];
$param['money'] = $deposit['money'];
$result = $model->add($param);
$id = $model->id;
Db::commit();
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if(!$result || !$result_invite) {
$this->error('提交失败');
}
$this->success('提交成功',['id'=>$id,'status'=>$param['status'],'pay_data'=>$pay_data]);
}
/**
* 获取店铺信息
* @param string $id 店铺id
*/
private function get_store($id = null)
{
$where_s = ['user_id'=>$this->user_id];
if($id) {
$where_s['id'] = $id;
}
$where = [
'where' => $where_s,
'with' => ['user_info']
];
$store = $this->store_model->findOrFail($where,false);
if(!$store) {
$this->error('请先提交商家入驻申请');
}
if($store['status'] == 4) {
$this->error('请先提交商家入驻申请');
}
if($store['status'] == 1) {
$this->error('未提交入驻申请');
}
if($store['status'] == 2) {
$this->error('商家申请仍在审核中');
}
return $store;
}
}
\ No newline at end of file
... ...
... ... @@ -44,6 +44,13 @@ class Base extends Model {
}
/**
* 构造关联社区文章查询
*/
public function store(){
return $this->hasOne("Store","sort_id","id")->field("id,store_name,store_icon,industry_id");
}
/**
* 单条查询
* @param array $where 查询条件
* @param string $field 查询field
... ...
<?php
namespace app\api\model;
class Deposit extends Base
{
}
\ No newline at end of file
... ...
<?php
namespace app\api\model;
class DepositOrder extends Base
{
}
\ No newline at end of file
... ...
... ... @@ -7,4 +7,19 @@ namespace app\api\model;
class Store extends Base
{
protected $append = [
'image_arr'
];
public function getImageArrAttr($value,$data)
{
$arr = [];
if($data['images']) {
$arr = explode(',',$data['images']);
foreach ($arr as &$v) {
$v = cdnurl($v);
}
}
return $arr;
}
}
\ No newline at end of file
... ...
<?php
namespace app\api\model;
class StoreComment extends Base
{
protected $updateTime = false;
public function getCreatetimeAttr($value)
{
return date('Y-m-d H:i:s',$value);
}
}
\ No newline at end of file
... ...
<?php
namespace app\api\model;
class StoreInform extends Base
{
}
\ No newline at end of file
... ...
<?php
namespace app\api\model;
class StoreInformGood extends Base
{
protected $updateTime = false;
}
\ No newline at end of file
... ...
<?php
namespace app\api\model;
class StoreOrder extends Base
{
}
\ No newline at end of file
... ...
<?php
namespace app\api\model;
class UserHouse extends Base
{
}
\ No newline at end of file
... ...
<?php
namespace app\api\validate;
class HotValidate extends BaseValidate
{
protected $rule = [
'page' => 'require|integer',
'store_id' => 'require',
'store_name' => 'require',
'mobile' => 'require|regex:^1\d{10}$',
'province' => 'require',
'city' => 'require',
'region' => 'require',
'images' => 'require',
'content' => 'require',
'house_ids' => 'require',
'type' => 'require|in:1,2',
'red_package' => 'require',
'number' => 'require',
'deposit_id' => 'require'
];
protected $message = [
'page.integer' =>'页数必须是整数',
'mobile.regex' =>'手机号格式错误'
];
protected $scene = [
'common' => ['page'], // 公共分页验证
'comment_add' => ['store_id','content'], // 留言提交
'store_apply' => ['store_name','province','city','region','name','mobile'], // 开通社区提交
'store_report' => ['content'], // 举报建议提交
'store_edit' => ['store_icon','store_name','mobile','province','city','region','images'], // 店铺信息修改
'store_inform_add' => ['content','images','house_ids','type'], // 发布信息
'red' => ['red_package','number'], // 发布信息红包
'house_new' => ['house_ids'], // 绑定社区
'deposit_order' => ['deposit_id'], // 板币充值提交
];
}
\ No newline at end of file
... ...
<?php
namespace app\api\validate;
class StoreValidate extends BaseValidate
{
protected $rule = [
'page' => 'require|integer',
'store_icon' => 'require',
'store_name' => 'require',
'mobile' => 'require|regex:^1\d{10}$',
'province' => 'require',
'city' => 'require',
'region' => 'require',
'images' => 'require',
'content' => 'require',
'house_ids' => 'require',
'type' => 'require|in:1,2',
'red_package' => 'require',
'number' => 'require',
'deposit_id' => 'require'
];
protected $message = [
'page.integer' =>'页数必须是整数',
'mobile.regex' =>'手机号格式错误'
];
protected $scene = [
'common' => ['page'], // 公共分页验证
'store_add' => ['store_name','house_ids','industry_id','name','mobile','license'], // 店铺申请
'store_apply' => ['store_name','province','city','region','name','mobile'], // 开通社区提交
'store_report' => ['content'], // 举报建议提交
'store_edit' => ['store_icon','store_name','mobile','province','city','region','images'], // 店铺信息修改
'store_inform_add' => ['content','images','house_ids','type'], // 发布信息
'red' => ['red_package','number'], // 发布信息红包
'house_new' => ['house_ids'], // 绑定社区
'comment_reply' => ['comment_id','content'], // 留言回复
'deposit_order' => ['deposit_id'], // 板币充值提交
];
}
\ No newline at end of file
... ...
... ... @@ -37,4 +37,5 @@ return array (
'mail_from' => '10000@qq.com',
'contact' => '联系我们联系我们022-12345678',
'settled' => '上架入驻协议',
'send_score' => '800',
);
\ No newline at end of file
... ...
此 diff 太大无法显示。