setName('shopro_wechat_trade:init-path') ->setDescription('Configure WeChat mini program order detail path'); } protected function execute(Input $input, Output $output) { try { $result = (new WxOrderPathService())->updatePath(); $output->writeln('Order detail path configured. errcode=0'); if (!empty($result['path'])) { $output->writeln('path=' . $result['path']); } } catch (\Exception $e) { $output->writeln('Failed: ' . $e->getMessage()); $output->writeln(''); $output->writeln('若 errcode=10060035:请先发布含 pages/order/detail 的小程序到微信线上/提审版,再重试。'); $output->writeln('发货同步(upload_shipping_info)不依赖本接口,可先配置发货管理并测试发货。'); $output->writeln('诊断: php think shopro_wechat_trade:probe-path'); } } }