...
|
...
|
@@ -16,6 +16,7 @@ use app\api\model\StoreOrder; |
|
|
use app\api\model\UserScoreLog;
|
|
|
use app\api\validate\StoreValidate;
|
|
|
use app\common\controller\Api;
|
|
|
use app\common\library\Sms as Smslib;
|
|
|
use EasyWeChat\Foundation\Application;
|
|
|
use EasyWeChat\Payment\Order;
|
|
|
use think\Db;
|
...
|
...
|
@@ -193,6 +194,7 @@ class Store extends Api |
|
|
* @ApiParams (name="industry_id", type="string", required=true, description="行业/关键词")
|
|
|
* @ApiParams (name="name", type="string", required=true, description="联系人姓名")
|
|
|
* @ApiParams (name="mobile", type="string", required=true, description="联系人手机号")
|
|
|
* @ApiParams (name="code", type="string", required=true, description="验证码")
|
|
|
* @ApiParams (name="license", type="string", required=true, description="营业执照")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
...
|
...
|
@@ -220,6 +222,15 @@ class Store extends Api |
|
|
$this->error('商家申请已通过');
|
|
|
}
|
|
|
}
|
|
|
// 验证码验证
|
|
|
$mobile = $param['mobile'];
|
|
|
$captcha = $param['code'];
|
|
|
$event = 'test';
|
|
|
$ret = Smslib::check($mobile, $captcha, $event);
|
|
|
if (!$ret) {
|
|
|
$this->error(__('验证码不正确'));
|
|
|
}
|
|
|
unset($param['code']);
|
|
|
$order_sn = $param['order_sn'] = get_order_sn();
|
|
|
// 获取配置
|
|
|
$app = new Application(ConfigService::load());
|
...
|
...
|
@@ -282,6 +293,7 @@ class Store extends Api |
|
|
* @ApiParams (name="region", type="string", required=true, description="区")
|
|
|
* @ApiParams (name="name", type="string", required=true, description="联系人姓名")
|
|
|
* @ApiParams (name="mobile", type="string", required=true, description="联系人手机号")
|
|
|
* @ApiParams (name="code", type="string", required=true, description="验证码")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
|
|
* @ApiReturn ({
|
...
|
...
|
@@ -292,6 +304,15 @@ class Store extends Api |
|
|
public function store_apply()
|
|
|
{
|
|
|
$param = (new StoreValidate())->goCheck('store_apply');
|
|
|
// 验证码验证
|
|
|
$mobile = $param['mobile'];
|
|
|
$captcha = $param['code'];
|
|
|
$event = 'test';
|
|
|
$ret = Smslib::check($mobile, $captcha, $event);
|
|
|
if (!$ret) {
|
|
|
$this->error(__('验证码不正确'),$ret);
|
|
|
}
|
|
|
unset($param['code']);
|
|
|
Db::startTrans();
|
|
|
$result = false;
|
|
|
try{
|
...
|
...
|
|