merchant_id;//商户id if (!$merchantId) { $res = callBack(statusCode()['error'], '失败'); $this->ajaxReturn($res); } $wxconfigModel = new WxconfigModel(); $where = [ 'merchantid' => $merchantId, ]; $save = [ 'appid' => null, 'authorizer_appid' => null, 'type' => 0, ]; $data = $wxconfigModel->updateOrder($where, $save); if ($data === false) { $res = callBack(statusCode()['error'], '失败'); } else { $res = callBack(statusCode()['success'], '成功'); } $this->ajaxReturn($res); } /** * 门店后台改变小程序商城配送方式优先级 */ //获取配送设置 public function storeConfigInfo() { $storeId = $this->store_id;//门店id $storeConfigModel = new StoreConfigModel(); $where = [ 'store_id' => $storeId ]; $field = [ 'distribution_json' ]; $data = $storeConfigModel->getOrderFind($where, $field); if ($data === false) { $res = callBack(statusCode()['error'], '失败'); } else { $res = callBack(statusCode()['success'], '成功', $data); } $this->ajaxReturn($res); } //修改配送优先级 public function storeConfigSave() { $storeId = $this->store_id;//门店id $post = I('post.'); $param = [ 'distributionJson' ]; //参数验证 $plugVip = new CustomValidate(); $dataOne = $plugVip->validationParameters($param, $post); if ($dataOne !== true) { $this->ajaxReturn($dataOne); } //修改配送排序 $storeConfig = new StoreConfig(); $save = [ 'distribution_json' => $post['distributionJson'], ]; $data = $storeConfig->storeConfigSave($storeId, $save); if ($data === false) { $res = callBack(statusCode()['error'], '失败'); } else { $res = callBack(statusCode()['success'], '成功'); } $this->ajaxReturn($res); } }