fix: 小程序订单收货 修改设置路劲逻辑

This commit is contained in:
Gosowong 2023-05-23 17:08:31 +08:00
parent b9294aa436
commit 5898eef8ff
3 changed files with 27 additions and 5 deletions

View File

@ -14,6 +14,7 @@ use app\adminapi\controller\AuthController;
use app\Request;
use app\services\system\config\SystemConfigServices;
use app\services\system\config\SystemConfigTabServices;
use crmeb\services\easywechat\orderShipping\MiniOrderService;
use think\facade\App;
/**
@ -327,8 +328,12 @@ class SystemConfig extends AuthController
@copy($from, $toHome);
@copy($from, $toPublic);
}
if(isset($post['reward_integral']) || isset($post['reward_money'])) {
if($post['reward_integral'] < 0 || $post['reward_money'] < 0) return app('json')->fail(400558);
if (isset($post['reward_integral']) || isset($post['reward_money'])) {
if ($post['reward_integral'] < 0 || $post['reward_money'] < 0) return app('json')->fail(400558);
}
if (isset($post['order_shipping_open']) && $post['order_shipping_open'] == 1 && isset($post['order_shipping_url']) && $post['order_shipping_url'] !== "") {
MiniOrderService::setMesJumpPathAndCheck($post['order_shipping_url']);
}
foreach ($post as $k => $v) {
$config_one = $this->services->getOne(['menu_name' => $k]);

View File

@ -124,9 +124,9 @@ class MiniOrderService
* @date 2023/05/10
* @author yyw
*/
public static function setMesJumpPath($path)
public static function setMesJumpPathAndCheck($path)
{
return self::order()->setMesJumpPath($path);
return self::order()->setMesJumpPathAndCheck($path);
}

View File

@ -102,7 +102,7 @@ class OrderClient extends BaseOrder
];
}
// 跳转路径
$this->setMesJumpPath($path);
// $this->setMesJumpPath($path);
return $this->shipping($params);
}
@ -185,6 +185,23 @@ class OrderClient extends BaseOrder
return $this->notifyConfirm($params);
}
/**
* 设置跳转连接
* @param $path
* @return array
* @throws \EasyWeChat\Core\Exceptions\HttpException
*
* @date 2023/05/10
* @author yyw
*/
public function setMesJumpPathAndCheck($path)
{
if (!$this->checkManaged()) {
throw new AdminException('开通小程序订单管理服务后重试');
}
return $this->setMesJumpPath($path);
}
/**
* 设置小程序管理服务开通状态
* @return bool