details.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. {include file="layout/header" /}
  2. <style type="text/css">
  3. </style>
  4. <!-- banner -->
  5. <div class="product-details-banner">
  6. <div class="container">
  7. <div>
  8. <div class="">
  9. <ul class="rslides">
  10. <li>
  11. <div class="slider-info" style="text-align: left !important;">
  12. <p style="font-size: 2.8vw;">
  13. {$fatherProduct.product_name} ▪ {$product.product_name}
  14. </p>
  15. <p style="font-size: 1vw;">
  16. {$product.product_content}
  17. </p>
  18. <div style="text-align: right">
  19. <button onclick="goShopping()">立即选购</button>
  20. </div>
  21. </div>
  22. </li>
  23. </ul>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <section class="wthree-row" id="pricing">
  29. <div class="container" style="font-size: 18px; font-weight: 800; margin-top: 50px;">
  30. 产品介绍
  31. </div>
  32. {volist name="productInfo" id="value"}
  33. <div>
  34. <div class="container" style="margin-top: 5px;">
  35. <img src="{$Think.HOME_SITE_ROOT}/images/infoData.png">
  36. {$value.productInfo_title}
  37. </div>
  38. <div class="container" style="margin-top: 5px;">
  39. {$value.productInfo_content}
  40. </div>
  41. <div class="container" style="margin-top: 20px; margin-bottom: 50px">
  42. <img src="{$Think.UPLOADS_ROOT}{$value.productInfo_img}" width="100%">
  43. </div>
  44. </div>
  45. {/volist}
  46. <div class="container" style="font-size: 18px; font-weight: 800; margin-top: 50px;">
  47. 产品价格
  48. </div>
  49. </section>
  50. <section class="wthree-row" id="shopping">
  51. <div class="container" style="margin-top: 10px; margin-bottom: 50px;">
  52. <table class="gridtable">
  53. <tr>
  54. <td style="border-right: 0;">服务名称</td>
  55. <td style="border-right: 0; border-left: 0;">时长</td>
  56. <td style="border-right: 0; border-left: 0;">价格</td>
  57. <td style="border-left: 0;">选购</td>
  58. </tr>
  59. {volist name="renewal" id="value"}
  60. <tr>
  61. <td>{$fatherProduct.product_name} ▪ {$product.product_name}</td>
  62. <td>{$value.renewal_name}</td>
  63. <td>
  64. <?php
  65. switch($value->renewal_identity){
  66. case 1:
  67. echo $product->product_TypeOne;
  68. break;
  69. case 2:
  70. echo $product->product_TypeTwo;
  71. break;
  72. case 3:
  73. echo $product->product_TypeThree;
  74. break;
  75. case 4:
  76. echo $product->product_TypeFour;
  77. break;
  78. }
  79. ?>元
  80. </td>
  81. <td onclick="shopping('{$product.product_id}','{$value.renewal_identity}')" style="color: #0d93bf; cursor:pointer;">选购</td>
  82. </tr>
  83. {/volist}
  84. </table>
  85. </div>
  86. </section>
  87. <script>
  88. const myHost = "http://" + window.location.host;
  89. function shopping(product_id, renewal_identity) {
  90. $.ajax({
  91. url: myHost + "/home/index/isLogin.html",
  92. type: 'get',
  93. dataType: 'json',
  94. success: function(res){
  95. if (res['success']) {
  96. window.location.href = myHost + "/home/product/shopping.html?product_id=" + product_id + "&renewal_identity=" + renewal_identity;
  97. } else {
  98. window.location.href = myHost + "/User/login/index.html?login=0";
  99. }
  100. },
  101. error: function(){
  102. alert("服务器连接失败");
  103. }
  104. });
  105. }
  106. function goShopping(product_id, renewal_identity) {
  107. window.location.href = "#shopping";
  108. }
  109. </script>
  110. {include file="layout/footer" /}