No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

users_gift_detail.htm 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>积分商品详情-{eyou:global name='web_name' /}</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  9. <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  10. {eyou:static file="users/skin/css/basic.css" /}
  11. {eyou:static file="users/skin/css/eyoucms.css" /}
  12. <!-- 新样式 2020-11-25 -->
  13. {eyou:static file="users/skin/css/element/index.css" /}
  14. {eyou:static file="users/skin/css/e-user.css" /}
  15. {eyou:include file="users/skin/css/diy_css.htm" /}
  16. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  17. {eyou:static file="users/skin/js/global.js"/}
  18. {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  19. <style>
  20. .b_box{display: flex;justify-content: left;margin: 20px;color: #666666;padding: 20px 0 30px 0;border-bottom: 1px solid #e8e8e8;}
  21. .b_img{ display: table-cell;position: relative;width: 150px;height: 150px;margin-right: 20px;overflow: hidden;text-align: center;vertical-align: middle;border: 1px solid #eee;}
  22. .b_img img{position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);max-width: 100%;max-height: 100%;}
  23. .b_div{display: flex;flex-flow: column; justify-content: space-around;}
  24. .flex-content{display: flex;flex-direction: row;align-items: center;justify-content: left;font-size: 16px;}
  25. .flex-title{margin-right: 10px;}
  26. .flex-val{}
  27. a.okgo{display: flex;flex-direction: row;align-items: center;justify-content: center;text-align: center;margin-top: 8px;height: 30px;width: 110px;color: #fe690f;font-size: 14px;border: solid 1px #fe690f;cursor: pointer;}
  28. a.okgo:hover{ background:#fe690f; color:#fff; }
  29. a.nones{color: #ccc;border: solid 1px #ccc; cursor:default;}
  30. .giftcontent{
  31. margin-bottom: 20px;
  32. padding: 30px;
  33. }
  34. .giftcontent img {
  35. max-width:100%!important;
  36. }
  37. </style>
  38. </head>
  39. <body>
  40. <div class="b_box">
  41. <div class="b_img"><img src="{$field.litpic}" ></div>
  42. <div class="b_div">
  43. <div class="flex-content">
  44. <div class="flex-title">名称:</div>
  45. <div class="flex-val">{$field.giftname}</div>
  46. </div>
  47. <div class="flex-content">
  48. <div class="flex-title">类型:</div>
  49. <div class="flex-val">
  50. {eyou:if condition="$field.type eq -1"}
  51. 实物
  52. {else /}
  53. 虚拟
  54. {/eyou:if}
  55. </div>
  56. </div>
  57. <div class="flex-content">
  58. <div class="flex-title">库存:</div>
  59. <div class="flex-val">{$field.stock}</div>
  60. </div>
  61. <div class="flex-content">
  62. <div class="flex-title">价格:</div>
  63. <div class="flex-val" style="color: #fe690f;">
  64. {$field.score}{$score_name}
  65. </div>
  66. </div>
  67. <div>
  68. {eyou:if condition="$field.score elt $users.scores"}
  69. {eq name='$field.type' value='-1'}
  70. <a href="javascript:void(0)" class="okgo" data-url="{:url('user/Memgift/users_gift_shiwu',['gift_id'=>$field.gift_id])}" onclick="jumpInfo(this)">立即兑换</a>
  71. {else/}
  72. <a href="javascript:void(0)" class="okgo" data-url="{:url('user/Memgift/users_gift_vip',['gift_id'=>$field.gift_id])}" onclick="jumpVip(this)">立即兑换</a>
  73. {/eq}
  74. {else /}
  75. <a class="okgo nones">{$score_name}不足</a>
  76. {/eyou:if}
  77. </div>
  78. </div>
  79. </div>
  80. <div class="giftcontent">
  81. {$field.content|htmlspecialchars_decode}
  82. </div>
  83. <script type="text/javascript">
  84. //兑换实物
  85. function jumpInfo(obj){
  86. var url = $(obj).data('url');
  87. var index = layer.open({
  88. type: 2,
  89. id: 'iframe_goinfo',
  90. title: '填写收货信息',
  91. fixed: true, //不固定
  92. shadeClose: false,
  93. shade: [0.3,'#000'],
  94. maxmin: false, //开启最大化最小化按钮
  95. closeBtn: 1,
  96. area: ['388px','288px'],
  97. content: url
  98. });
  99. }
  100. //兑换会员
  101. function jumpVip(obj) {
  102. var url = $(obj).data('url');
  103. layer.confirm('确定要兑换商品?', {
  104. title: false,
  105. closeBtn: false
  106. }, function() {
  107. $.ajax({
  108. url: url,
  109. type: 'POST',
  110. dataType: 'JSON',
  111. data: {
  112. long: 0
  113. },
  114. success: function(res) {
  115. if (1 == res.code) {
  116. layer.msg(res.msg, {
  117. icon: 1,
  118. time: 1000
  119. }, function() {
  120. location.href = res.url;
  121. });
  122. } else if (res.code == 2) {
  123. layer.confirm(res.msg, {
  124. btn: ['继续兑换', '取消'] //按钮
  125. }, function() {
  126. $.ajax({
  127. url: url,
  128. type: 'POST',
  129. dataType: 'JSON',
  130. data: {
  131. long: 1
  132. },
  133. success: function(res) {
  134. if (1 == res.code) {
  135. layer.msg(res.msg, {
  136. icon: 1,
  137. time: 1000
  138. }, function() {
  139. location.href = res.url;
  140. });
  141. } else {
  142. layer.msg(res.msg, {
  143. icon: 2,
  144. time: 2000
  145. });
  146. }
  147. },
  148. error: function(e) {
  149. layer.closeAll();
  150. layer.alert(e.responseText, {
  151. icon: 5,
  152. title: false
  153. });
  154. }
  155. })
  156. });
  157. } else {
  158. layer.msg(res.msg, {
  159. icon: 2,
  160. time: 2000
  161. });
  162. }
  163. },
  164. error: function(e) {
  165. layer.closeAll();
  166. layer.alert(e.responseText, {
  167. icon: 5,
  168. title: false
  169. });
  170. }
  171. })
  172. }, function(index) {
  173. layer.closeAll(index);
  174. });
  175. }
  176. </script>
  177. </body>
  178. </html>