123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?php
- namespace app\index;
- class jiexi extends Base
- {
- function index()
- {
- ?>
- <!doctype html>
- <html lang="">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/>
- <meta name="keywords" content="<?php echo IN_KEYWORDS;?>"/>
- <meta name="description" content="<?php echo IN_DESCRIPTION;?> "/>
- <title>二维码解析 - <?php echo IN_NAME;?> - 免费应用内测托管平台|iOS应用Beta测试分发|Android应用内测分发</title>
- <link rel="stylesheet" href="/static/index/css/font.css"/>
- <link rel="stylesheet" type="text/css" href="/static/index/css/bootstrap.min.css"/>
- <link rel="stylesheet" type="text/css" href="/static/index/css/base.css"/>
- <link rel="stylesheet" type="text/css" href="/static/index/css/main.css"/>
- <link href="/jiexi/css/base.css" rel="stylesheet">
- <link href="/jiexi/css/app.css" rel="stylesheet">
- <link rel="stylesheet" href="/styles/index.css" />
- <script src="/static/index/js/jquery.min.js"></script>
- <script src="/static/index/js/bootstrap.min.js"></script>
- <script src="/static/index/js/vue.js"></script>
- <script src="/static/index/js/js.js"></script>
- <script src="/jiexi/js/jquery.min.js"></script>
- <script src="/jiexi/js/reqrcode.js"></script>
- <script>
- isHideFooter = false;
- </script>
- <style>
- .ms-badge12 {
- background-color: #ffffff;
- width: 50px;
- height: 25px;
- line-height: 26px;
- display: inline-block;
- color: #e60000;
- border-radius: 10%;
- font-size: 12px;
- text-align: center;
- position: relative;
- top: -3px;
- left: 0;
- }
- .container {
- width: 1325px;
- }
- .containerrr {
- width: 1140px;
- }
- .inner-content {
- background-color: #fff;
- border: 1px solid #eaeaea;
- border-radius: 3px;
- padding-top: 80px;
- padding-bottom: 690px;
- margin: 0px auto;
- margin-bottom: 66px;
- margin-top: 60px;
- }
- .qrcode {
- width:160px;
- height:160px;
- margin-top:15px;
- }
- .text{
- height: 23px;
- }
- .button{
- height: 29px;
- }
- .img{
- width: 200px;
- height: 200px;
- }
- </style>
- <style>
- #qrcode {
- width:160px;
- height:160px;
- margin-top:15px;
- }
- #text{
- height: 23px;
- }
- #button{
- height: 29px;
- }
- #img{
- width: 200px;
- height: 200px;
- }
- </style>
- </head>
- <body>
- <?php
- $this->header();
- ?>
- <div class="container generate_qrcode_box tab-content" style="height: 63rem;">
- <div class="row" id="decode_box">
- <div class="col-md-6 decode_upload_box clearfix">
- <div class="decode_upload_left">
- <lable class="decode_upload_btn_lable">上传二维码解码</lable>:
-
- </div>
- <div class="decode_upload_right" style="position: relative;">
-
- <input class="bg_default btn decode_upload_btn" type="file" id="newfile" onchange="changepic(this)"></br>
- <img src="/jiexi/jiexi.png" id="img" />
- <p class="tips"><span class="text_default">*</span>图片:jpg、jpeg、png </p>
- <p class="tips"><span class="text_default">*</span>大小:小于2M </p>
- <p class="tips"><span class="text_default">*</span>上传带二维码的图片</p>
- </div>
- </div>
- <div class="col-md-6 decode_results">
- <p class="fz_20">解析结果:</p>
- <textarea class="form-control decode_results_textarea" id="spantitle"></textarea>
- <br>
- </div>
- </div>
- <div class="col-md-12">
-
- </div>
- </div>
- <script type="text/javascript">
- // 解析
- var newfile = document.getElementById('newfile');
- var getObjectURL = function (file) {
- var url = null;
- if (window.createObjectURL != undefined) { // basic
- url = window.createObjectURL(file);
- } else if (window.URL != undefined) { // mozilla(firefox)
- url = window.URL.createObjectURL(file);
- } else if (window.webkitURL != undefined) { // webkit or chrome
- url = window.webkitURL.createObjectURL(file);
- }
- return url;
- }
- newfile.onchange = function () {
- // 显示图片
- var reads = new FileReader();
- f = document.getElementById('newfile').files[0];
- reads.readAsDataURL(f);
- reads.onload = function(e) {
- document.getElementById('img').src = this.result;
- $("#img").css("display", "block");
- };
- // console.log(newfile[0]);
- console.log(getObjectURL(this.files[0]));// newfile[0]是通过input file上传的二维码图片文件
- qrcode.decode(getObjectURL(this.files[0]));
- qrcode.callback = function (imgMsg) {
- // 获取地址传给span
- var divA = document.getElementById("spantitle");
- divA.innerHTML = divA.innerHTML+ imgMsg;
- }
- }
- </script>
-
- <?php
- $this->footer();
- ?> </body>
- </html>
- <?php
- }
- }
|