fix(workWechat): 修复产品Offer消息中的下载链接

- 将变量名从 $url 改为 $urls,以匹配消息内容中的链接变量
- 修复了消息内容中下载链接的变量引用错误
This commit is contained in:
mkm 2024-11-20 13:53:58 +08:00
parent 4d3135ed8c
commit b44ee6e9eb

View File

@ -19,7 +19,7 @@ class ProductOffer
$create_time = $data['create_time'];
$buyer_name = $data['buyer_name'];
$pay_type = $data['pay_type_name'];
$url=getenv('APP_URL')."/api/purchase_product_offer?date=".$data['create_time'];
$urls=getenv('APP_URL')."/api/purchase_product_offer?date=".$data['create_time'];
$arr = ["msgtype" => "markdown", "markdown" => ["content" => "有新的采购商品
>订单ID:<font color=\"comment\">$order_id</font>
>商品名称:<font color=\"comment\">$store_name</font>
@ -28,7 +28,7 @@ class ProductOffer
>采购金额:<font color=\"comment\">$price</font>
>采购时间:<font color=\"comment\">$create_time</font>
>支付方式:<font color=\"comment\">$pay_type</font>
[下载今日采购表格]($url)"]];
[下载今日采购表格]($urls)"]];
(new Curl())->postJson($url, json_encode($arr, true));
} catch (\Throwable $e) {
Log::error('推送商品信息保存:'.$e->getMessage());