视多云商城批量转换二维码仿云宝教程(本教程只供学习,请自觉尊重原创。)
2539086634 2022-7-14

本次修改只需要修改前端两个文件即可,无涉及后端,可放心使用!

首先进入宝塔的网站目录下,找到如下图路径

/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

最后看效果图

最新回复 (2)
  • 还有一个路径是在哪里
    2022-7-14 收起回复
    2539086634: /www/wwwroot/网站地址/resources/views/common/card_batch_qr.blade.php
    2022-7-15回复
  • card_batch_qr.blade.php  

    <link rel="stylesheet" href="/static/css/waa.css" media="all">

    这行代码替换如下

    <style>
    
          .code_body{
            margin:5px;
          }
          .code_imagesqr{background-color: #F0F0F0;
            margin:5px;
            border-radius: 5px;
            padding: 10px;
            border: 1px double #999999;
          }
          .code_divs{
            background-color: #daf3ff;
            margin:5px;
            border-radius: 5px;
            padding: 10px;
    
    
          }
          .code_divs span{
            font-family: "微软雅黑";
            font-size: 14px;
          }
          .dengji_bg_lq{
            background: linear-gradient(top left, white, #cccccc);/*渐变从左上角到右下角*/
            background: -ms-linear-gradient(top left, white, #cccccc);
            background: -webkit-linear-gradient(top left, white, #cccccc);
            background: -moz-linear-gradient(top left, white, #cccccc);
            color: #000000;
            border: 1px double #999999;}
    
          .qr_bg_lq{
            background: linear-gradient(top left, white, #cccccc);/*渐变从左上角到右下角*/
            background: -ms-linear-gradient(top left, white, #cccccc);
            background: -webkit-linear-gradient(top left, white, #cccccc);
            background: -moz-linear-gradient(top left, white, #cccccc);
          color: #000000;
          border: 1px double #999999;}
          .imagesqr{ background-color: #00bb9c; margin:10px }
          .imagesqr .fl{ float: left; font-family: "微软雅黑"; font-size: 16px; height: 335px; width: 205px; border-radius: 5px; text-align: center; color: #000000; background-color: #daf3ff; margin:10px }
          .imagesqr .fl p{ font-family: "微软雅黑"; font-size: 12px; text-align: center; color: #000000; }
          .imagesqr .fl li{ list-style:none; height: 169px; width: 169px; border-radius: 5px; border: 10px double #ffffff; background-color: #ffffff; margin:10px; color: #000000; }
    
        </style></head>
      <body>
      <script type='text/javascript'>
        function qrcodes(ix, text) {
          var qrcode = new QRCode('qrcode' + ix + '', {
            text: '' + text + '',
            width: 168,
            height: 168,
            colorDark: '#001c35',
            colorLight: '#ffffff',
            correctLevel: QRCode.CorrectLevel.M
          });
        }
      </script>
    2022-7-22 回复
返回
2539086634