作者 wangzhi

修改

... ... @@ -95,8 +95,8 @@ class Index extends Api
{
$UserId = $this->IsToken($this->request->header());
$params = $this->request->param();
if(!empty(Db::name('stor')->where('name', $params['name'])->find()))$this->error('重复的店铺名称');
if(!empty(Db::name('stor')->where('mobile', $params['mobile'])->find()))$this->error('重复的手机号码');
if (!empty(Db::name('stor')->where('name', $params['name'])->find())) $this->error('重复的店铺名称');
if (!empty(Db::name('stor')->where('mobile', $params['mobile'])->find())) $this->error('重复的手机号码');
if ($params['type'] == 1) {
$data = [
... ... @@ -316,7 +316,8 @@ class Index extends Api
//订单号
$OrderSn = $this->order_sn();
//押金
$MoneyArr = Db::name('money_config')->where('battery_id', $params['battery_id'])->find();
$MoneyArr = Db::name('money_config')->where('battery_type_id', $params['battery_id'])->find();
if (empty($MoneyArr)) $this->error('电池类型没有设置押金', 0);
$res111 = Db::name('agreement')->where('user_id', $UserId)->where('seller_id', $params['seller_id'])->where('status', 'IN', '0,1')->where('pay', 'NEQ', 0)
->find();
if (!empty($res111)) {
... ...