|
|
@@ -121,12 +121,15 @@ class WxOpenController extends PublicController
|
|
|
|
|
|
if ($id <= 0) {
|
|
|
$wxMiniBaseId = 0;
|
|
|
+ $msg = '未知状态';
|
|
|
if ($id == 0) {
|
|
|
//供货商
|
|
|
$wxMiniBaseId = $open['wxGhsMiniBaseId'] ?? 0;
|
|
|
+ $msg = '供货商小程序绑定成功';
|
|
|
} elseif ($id == -1) {
|
|
|
//零售店
|
|
|
$wxMiniBaseId = $open['wxMiniBaseId'] ?? 0;
|
|
|
+ $msg = '零售店小程序绑定成功';
|
|
|
}
|
|
|
if (empty($wxMiniBaseId)) {
|
|
|
util::stop('没有小程序信息...');
|
|
|
@@ -136,7 +139,7 @@ class WxOpenController extends PublicController
|
|
|
util::stop('没有小程序信息,请先配置:xhWxMiniBase表 和 xhWxOpen的相关字段');
|
|
|
}
|
|
|
WxMiniBaseClass::updateById($wxMiniBaseId, $miniData);
|
|
|
- util::stop('开放平台成功绑定小程序');
|
|
|
+ util::stop($msg);
|
|
|
} else {
|
|
|
xhMerchantExtendService::updateByMerchantId($id, $miniData);
|
|
|
MerchantService::updateById($id, ['miniAppId' => $authorizeAppId]);
|