codeToFile.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>商品资料页</title>
  6. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  7. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  8. <style>
  9. .img-margin{
  10. margin: 60pt 0 30pt 30pt;
  11. }
  12. .title-div{
  13. width:100%;
  14. height:50px;
  15. margin:0 0 20pt 30pt
  16. }
  17. .title-font{
  18. font-size: 40pt;
  19. height:50px;
  20. line-height: 50px;
  21. vertical-align: auto;
  22. text-align: left;
  23. color: #333333;
  24. font-weight: bold
  25. }
  26. .margin-style{
  27. margin:0 30pt 20pt 30pt
  28. }
  29. .div-border{
  30. width: 100%;
  31. height: 150px;
  32. border-radius: 8pt;
  33. border: #cccccc solid 1px;
  34. display: flex;
  35. justify-content: left;
  36. }
  37. .img-style{
  38. width: 90px;
  39. height: 90px;
  40. margin: 28px 0 0 20px;
  41. }
  42. .content-style{
  43. font-size: 30px;
  44. color: #333333;
  45. margin: 30px 20px 0 20px;
  46. }
  47. </style>
  48. </head>
  49. <body>
  50. <img src="./img/bnBag.png" width="85%" height="180px" class="img-margin">
  51. <div class="title-div">
  52. <div class="title-font" >产品技术资料</div>
  53. </div>
  54. <div class="margin-style">
  55. <div class="div-border">
  56. <img src="./img/word.svg" class="img-style">
  57. <div class="content-style">BLGX支耳式蜗轮型中线蝶阀DN50-600 PN16送审图(自制整轴)</div>
  58. </div>
  59. </div>
  60. <div class="margin-style" id="boxContainer"></div>
  61. <script>
  62. window.onload = async function(){
  63. var loc=location.href;
  64. var n1=loc.length;
  65. var n2=loc.indexOf('=');
  66. var code=loc.slice(n2+1,n1)
  67. let that = this
  68. console.log(code)
  69. let param = {
  70. "id": 2025082515112802,
  71. "content": {
  72. "code": code
  73. },
  74. }
  75. axios.post('http://61.164.207.46:8000/yos/rest/index', param)
  76. .then(function (response) {
  77. console.log(response)
  78. console.log(response.data.data.length)
  79. for (var i=0;i<response.data.data.length -1;i++){
  80. a='<div class="div-border">';
  81. a += '<img src="./img/word.svg" class="img-style">';
  82. a += '<div class="content-style">'+response.data.data[i].remarks+'</div>';
  83. a+='</div>';
  84. $(".boxContainer").append(a);
  85. }
  86. })
  87. .catch(function (error) {
  88. console.log(error);
  89. });
  90. }
  91. </script>
  92. </body>
  93. </html>