本次修改只需要修改前端两个文件即可,无涉及后端,可放心使用!
首先进入宝塔的网站目录下,找到如下图路径
/www/wwwroot/网站地址/resources/views/common/card_batch_qr.blade.php
点进去把里面的内容替换为如下代码即可
@extends('layouts.head')
{{--此处设置网站标题--}}
@section('title')
订单号码:{{$order_info->ddid}}
@endsection
@section('body')
<?php $url= $_SERVER['HTTP_HOST']; ?>
<?php
function replace_unicode_escape_sequence($match) {
return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
}
$name = '\u004d\u004c\u0057\u004c\u004b\u004a\u63d0\u4f9b\u4e91\u670d\u52a1';
$name = preg_replace_callback('/\\\\u([0-9a-f]{4})/i', 'replace_unicode_escape_sequence', $name);
?>
<script type="text/javascript" src="http://wx.walo888.com/Public/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="http://wx.walo888.com/Public/images/template/js/qrcode.js"></script>
<link rel="stylesheet" href="/static/css/waa.css" media="all">
<div class="code_body">
<div class="code_divs dengji_bg_lq">
<span style="color:#f60000;">温馨提示:卡密内容仅保留24小时,请自行备份。</span><br />
产品名称:{{$order_info->name}}
<br/>
<span style="color:#000cff;">购买数量:{{$order_info->count}} 个</span>【
<span style="color:#f07100;">实发:{{count($card_info)}}个</span>】
</div>
<div class="imagesqr">
@for($i=0;$i<count($card_info);$i++)
<div class="qr_bg_lq fl">
<p>
<span style="color: #000000;font-size: 32px">NO.{{$i+1}}</span>
</p>
<p>手机扫码,或者保存到相册识别</p>
<li>
<img class="w-100" src="{{$qrcode_api}}{{urlencode($card_info[$i]['kano'])}}&w=168" style="width: 168px; text-align:center";>
</li>
<p style="font-size: 12px; color: #999999" >{{ $name }}</p>
<p style="font-size: 12px; color: #999999" id="title">{{ $url }}</p>
</div>
@endfor
</div>
</div>
@endsection
接着继续找到如下图路径
接着点进去把里面的内容替换为如下代码即可
@extends('layouts.index')
{{--此处设置网站标题--}}
@section('title')
订单详情|{{ $siteinfo->sitename }}
@endsection
@section('style')
@endsection
{{--此处设置网站主体--}}
@section('body')
<div class="layui-card layui-anim layui-anim-scale">
<div class="layui-card-header" style="font-size: 15px">订单编号:{{$orderinfo->ddid}}</div>
<div class="layui-card-body">
<p style="font-size: 15px;">商品名称:{{$orderinfo->name}}</p>
<p style="font-size: 15px;">支付价格:{{$orderinfo->price}}</p>
<p style="font-size: 15px;">购买数量:{{$orderinfo->count}}</p>
<p style="font-size: 15px;">联系方式:{{$orderinfo->email}}</p>
<p style="font-size: 15px;">订单状态:{!!$orderinfo->statustr!!}</p>
<p style="font-size: 15px;">支付方式:{!!$orderinfo->typetr!!}</p>
</div>
<div class="layui-btn-group" style="padding: 10px;">
@if ($orderinfo->goodtype!='d' && $orderinfo->status)
<button class="layui-btn" onclick="window.open('{{route("CARD_INFO")}}?order_id={{$orderinfo->ddid}}&act=detail', '_blank', 'height=502, width=644,location=no,toolbar=no,scrollbars=no,menubar=no,status=no');">查看卡密</button>
<a class="layui-btn" onclick="tiqu('{{route("CARD_INFO")}}?order_id={{$orderinfo->ddid}}&act=qr')">批量二维码</a>
<a class="layui-btn" href="/Export?orderId={{$orderinfo->ddid}}" target="_blank">导出卡密</a>
@endif
@if ($orderinfo->goodtype=='d' && $orderinfo->status)
<button class="layui-btn" onclick="window.open('{{route("RECHARGE_INFO")}}?order_id={{$orderinfo->ddid}}', '_blank', 'height=502, width=644,location=no,toolbar=no,scrollbars=no,menubar=no,status=no');">查看充值信息</button>
@endif
@if($wo_sys)
<a class="layui-btn" href="{{route('SUBMIT_WO')}}?order_id={{$orderinfo->ddid}}#bottom" target="_blank">发起工单</a>
@endif
@if($orderinfo->is_api && $orderinfo->goodtype=='d')
<button class="layui-btn" onclick="return update_api_status()">更新处理进度</button>
@endif
</div>
</div>
<script type="text/javascript" src="http://wx.walo888.com/Public/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="http://wx.walo888.com/Public/images/template/js/qrcode.js"></script>
<link rel="stylesheet" href="/static/css/waa.css" media="all">
<script>
function tiqu(url){
layer.open({
type: 2,
skin: 'layui-layer-lan',
title: '卡密提取',
shadeClose: false,
scrollbar: false,
maxmin: true,
shade: 0.0,
area: ['750px', '600px'],
content: [url, 'yes']
});
}
function update_api_status(){
$.ajax({
type: "GET",
url: "{{route('update_api_status')}}",
data: 'order_id={{$orderinfo->ddid}}',
success: function (data) {
layer.msg(data.msg);
}
});
}
</script>
@endsection
最后看效果图