作者 王智

修复生成订单号 失败

@@ -274,6 +274,35 @@ class Index extends Api @@ -274,6 +274,35 @@ class Index extends Api
274 274
275 /** 275 /**
276 * 首页接口 276 * 首页接口
  277 + * @ApiTitle (检查是否重复签订)
  278 + * @ApiSummary (检查是否重复签订)
  279 + * @ApiMethod (POST)
  280 + * @ApiRoute (/api/Index/IsDobelAgreement)
  281 + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
  282 + * @ApiParams (name="seller_id", type="string", required=true, description="服务商ID")
  283 + * @ApiReturnParams (name="code", type="integer", required=true, sample="0")
  284 + * @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
  285 + * @ApiReturn ({
  286 + 'code':'1',
  287 + 'msg':'返回成功',
  288 + "data": 1=已经签订过,0=未签订协议
  289 + })
  290 + */
  291 + public function IsDobelAgreement()
  292 + {
  293 + $UserId = $this->IsToken($this->request->header());
  294 + $params = $this->request->param();
  295 + $res111 = Db::name('agreement')->where('user_id', $UserId)->where('seller_id', $params['seller_id'])->where('status', 'IN', '0,1')->find();
  296 + if (!empty($res111)) {
  297 + $this->success('成功', 1);
  298 + } else {
  299 + $this->success('成功', 0);
  300 + }
  301 + }
  302 +
  303 +
  304 + /**
  305 + * 首页接口
277 * @ApiTitle (签订协议) 306 * @ApiTitle (签订协议)
278 * @ApiSummary (签订协议) 307 * @ApiSummary (签订协议)
279 * @ApiMethod (POST) 308 * @ApiMethod (POST)