OSDN Git Service

add key
authorChengcheng Zhang <943420582@qq.com>
Tue, 15 Jan 2019 08:39:05 +0000 (16:39 +0800)
committerChengcheng Zhang <943420582@qq.com>
Tue, 15 Jan 2019 08:39:05 +0000 (16:39 +0800)
assets/main.js
key.html

index 8f46e92..4ee5655 100644 (file)
@@ -15,6 +15,7 @@ $(function(){
       $('#txtSeed').val(data.seed)
       $('#txtRootXprv').val(data.xprv)
       $('#txtRootXpub').val(data.xpub)
+      $('#qrcode').attr('src', 'data:image/jpg;base64,' + data.xprv_base64)
     }).fail(function(err){
       layer.alert('创建失败' + err);
     });
@@ -27,5 +28,6 @@ $(function(){
     $('#txtSeed').val('')
     $('#txtRootXprv').val('')
     $('#txtRootXpub').val('')
+    $('#qrcode').attr('src', 'data:image/jpg;base64,')
   })
 });
index 0b57f9a..71bebf6 100644 (file)
--- a/key.html
+++ b/key.html
             <input type="text" class="form-control" id="txtRootXpub" placeholder="64 Bytes root expanded public key, e.g. 8680afdf7c21f5315d6a40183653c8def35679f8bae870687bc786df54317863c976554fbd99c9f63c7fcefb089f65c5db6a1af4429600384b1d9f2751cef942">
           </div>
         </div>
-        <!-- 根扩展私钥二维码
+        <!-- 根扩展私钥二维码 -->
         <div class="form-group">
-          <label class="col-sm-2 control-label">Root Expanded Public Key</label>
-          <div class="col-sm-10">
-            <input type="img" class="form-control" id="" placeholder="64 Bytes root expanded public key, e.g. afa3a86bbec2f40bb32833fc6324593824c4fc7821ed32eac1f762b5893e56745f66a6c6f2588b3d627680aa4e0e50efd25065097b3daa8c6a19d606838fe7d4">
-          </div>
-        </div> -->
+          <label class="col-sm-2 control-label">Xprv QR Code</label>
+          <img id="qrcode" width="200"  src="" alt="">
+        </div>
         <div class="form-group">
           <div class="col-sm-offset-2 col-sm-10">
             <a id="btnCreateNewKey" class="btn btn-primary">Create New Key</a> 
       </form>
     </div>
   </div>
+  <div class="panel panel-default sc-bd">
+    <div class="panel-heading">
+      <h3 class="panel-title">Receiver </h3>
+    </div>
+    <div class="panel-body">
+      <form class="form-horizontal">
+        
+      </form>
+    </div>
+  </div>
 </body>
 
 </html>
\ No newline at end of file