designDrawing.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <meta name="format-detection" content="telephone=no">
  10. <meta http-equiv="X-UA-Compatible" content="chrome=1" >
  11. <style>
  12. *{
  13. outline: 0;
  14. padding: 0;
  15. margin: 0;
  16. border: none;
  17. box-sizing: border-box;
  18. background-size: contain;
  19. background-position: center;
  20. background-repeat: no-repeat;
  21. }
  22. ul,ol{
  23. list-style: none outside none;
  24. }
  25. ul.product-info {
  26. padding: 20px;
  27. }
  28. ul.product-info > li {
  29. line-height: 30px;
  30. font-size: 14px;
  31. }
  32. </style>
  33. </head>
  34. <body>
  35. <ul class="product-info">
  36. <li>
  37. <label for="">名&emsp;称:</label>
  38. <span id="name">-</span>
  39. </li>
  40. <li>
  41. <label for="">编&emsp;码:</label>
  42. <span id="code">-</span>
  43. </li>
  44. <li>
  45. <label for="">统一信用代码:</label>
  46. <span id="unifiedSocialCreditCode">-</span>
  47. </li>
  48. <li>
  49. <label for="">客户代号:</label>
  50. <span id="serialNo">-</span>
  51. </li>
  52. </ul>
  53. </body>
  54. <script>
  55. function str_to_obj(str){
  56. var obj = {};
  57. var temp = str.split('&');
  58. for(var i = 0; i < temp .length;i++) {
  59. var t = temp[i].split('=');
  60. obj[t[0]]=t[1];
  61. }
  62. return obj
  63. }
  64. var queryObj = str_to_obj(window.location.search.substring(1));
  65. let ids=['name','code','unifiedSocialCreditCode','serialNo']
  66. ids.forEach(id=>{
  67. if(queryObj[id]){
  68. document.querySelector('#'+id).innerHTML = decodeURIComponent(queryObj[id]);
  69. }
  70. })
  71. </script>
  72. </html>