fix(JsBarcode): 用 ShopXO 自带本地文件替代 CDN(修复条形码不显示)
- ticket_wallet.html: cdn.jsdelivr.net → {{}}static/common/lib/JsBarcode/JsBarcode.all.min.js
- Index.php: 控制器显式传递 public_host(插件不继承 Common 基类)
- ShopXO 自带 JsBarcode v3.11.5,比原 CDN 的 3.11.0 还新
feat/phase-b-verification
parent
7cd07f63af
commit
a673c09746
|
|
@ -51,8 +51,11 @@ class Index
|
|||
}
|
||||
|
||||
// 渲染票夹页面
|
||||
// 注意:插件不继承 index/Common,故 $public_host 不会自动赋值
|
||||
// 使用 Config('shopxo.host_url') 或显式传递均可,这里用 Config() 保持一致
|
||||
return MyView('../../../plugins/vr_ticket/view/goods/ticket_wallet', [
|
||||
'user' => $user,
|
||||
'public_host' => \think\facade\Config::get('shopxo.host_url'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<!-- VR票务样式 -->
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="<?php echo Config('shopxo.host_url'); ?>plugins/vr_ticket/static/css/ticket.css?v=<?php echo time(); ?>" />
|
||||
href="{{$public_host}}plugins/vr_ticket/static/css/ticket.css?v=<?php echo time(); ?>" />
|
||||
|
||||
<!-- 左上角返回按钮(ShopXO AmazeUI 风格) -->
|
||||
<a href="javascript:history.go(-1);" class="vr-wallet-back-btn" title="返回">
|
||||
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
<!-- 引入票卡片组件样式和JS -->
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="<?php echo Config('shopxo.host_url'); ?>plugins/vr_ticket/static/css/ticket_card.css?v=<?php echo time(); ?>" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/jsbarcode@3.11.0/dist/JsBarcode.all.min.js"></script>
|
||||
<script src="<?php echo Config('shopxo.host_url'); ?>plugins/vr_ticket/static/js/ticket_card.js?v=<?php echo time(); ?>"></script>
|
||||
href="{{$public_host}}plugins/vr_ticket/static/css/ticket_card.css?v=<?php echo time(); ?>" />
|
||||
<script src="{{$public_host}}static/common/lib/JsBarcode/JsBarcode.all.min.js"></script>
|
||||
<script src="{{$public_host}}plugins/vr_ticket/static/js/ticket_card.js?v=<?php echo time(); ?>"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue