暫無描述
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 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta 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="/public/plugins/layer-v3.1.0/layer.js"/}
  18. {eyou:static file="/public/static/common/js/tag_global.js"/}
  19. {eyou:static file="/public/static/common/js/mobile_global.js"/}
  20. </head>
  21. <body class="centre">
  22. <!-- 头部信息 -->
  23. <div class="ey-header-status">
  24. <div class="header-status-l">
  25. <a href="javascript:history.go(-1)"><i class="el-icon-arrow-left"></i></a>
  26. </div>
  27. <div class="header-status-m">商品详情</div>
  28. <div class="header-status-r">
  29. <a href="{eyou:url link='user/Users/index' /}"><i class="el-icon-user"></i></a>
  30. </div>
  31. </div>
  32. <!-- 头部信息结束 -->
  33. <div class="h50"></div>
  34. <div class="ey-container gift_detail">
  35. <div class="ey-con">
  36. <div class="ey-row">
  37. <!-- 中部 -->
  38. <div class="b_img"><img src="{$field.litpic}" ></div>
  39. <div class="b_div mt20">
  40. <div class="flex-content">
  41. <div class="flex-title">名称:</div>
  42. <div class="flex-val">{$field.giftname}</div>
  43. </div>
  44. <div class="flex-content">
  45. <div class="flex-title">类型:</div>
  46. <div class="flex-val">
  47. {eyou:if condition="$field.type eq -1"}
  48. 实物
  49. {else /}
  50. 虚拟
  51. {/eyou:if}
  52. </div>
  53. </div>
  54. <div class="flex-content">
  55. <div class="flex-title">库存:</div>
  56. <div class="flex-val">{$field.stock}</div>
  57. </div>
  58. <div class="flex-content">
  59. <div class="flex-title">价格:</div>
  60. <div class="flex-val" style="color: #fe690f;">
  61. {$field.score}{$score_name}
  62. </div>
  63. </div>
  64. <div style="margin: 0 auto;">
  65. {eyou:if condition="$field.score elt $users.scores"}
  66. {eq name='$field.type' value='-1'}
  67. <a href="javascript:void(0)" class="okgo" data-url="{:url('user/Memgift/users_gift_shiwu',['gift_id'=>$field.gift_id])}" onclick="jumpInfo(this)">立即兑换</a>
  68. {else/}
  69. <a href="javascript:void(0)" class="okgo" data-url="{:url('user/Memgift/users_gift_vip',['gift_id'=>$field.gift_id])}" onclick="jumpVip(this)">立即兑换</a>
  70. {/eq}
  71. {else /}
  72. <a class="okgo nones">{$score_name}不足</a>
  73. {/eyou:if}
  74. </div>
  75. </div>
  76. <!-- END -->
  77. </div>
  78. </div>
  79. <div class="giftcontent">
  80. {$field.content|htmlspecialchars_decode}
  81. </div>
  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. skin: 'xin-demo-btn',
  105. title: false,
  106. closeBtn: 0,
  107. shadeClose: true
  108. }, function() {
  109. $.ajax({
  110. url: url,
  111. type: 'POST',
  112. dataType: 'JSON',
  113. data: {
  114. long: 0
  115. },
  116. success: function(res) {
  117. if (1 == res.code) {
  118. layer.msg(res.msg, {
  119. icon: 1,
  120. time: 1000
  121. }, function() {
  122. location.href = res.url;
  123. });
  124. } else if (res.code == 2) {
  125. layer.confirm(res.msg, {
  126. btn: ['继续兑换', '取消'] //按钮
  127. }, function() {
  128. $.ajax({
  129. url: url,
  130. type: 'POST',
  131. dataType: 'JSON',
  132. data: {
  133. long: 1
  134. },
  135. success: function(res) {
  136. if (1 == res.code) {
  137. layer.msg(res.msg, {
  138. icon: 1,
  139. time: 1000
  140. }, function() {
  141. location.href = res.url;
  142. });
  143. } else {
  144. layer.msg(res.msg, {
  145. icon: 2,
  146. time: 2000
  147. });
  148. }
  149. },
  150. error: function(e) {
  151. layer.closeAll();
  152. layer.alert(e.responseText, {
  153. icon: 5,
  154. title: false
  155. });
  156. }
  157. })
  158. });
  159. } else {
  160. layer.msg(res.msg, {
  161. icon: 2,
  162. time: 2000
  163. });
  164. }
  165. },
  166. error: function(e) {
  167. layer.closeAll();
  168. layer.alert(e.responseText, {
  169. icon: 5,
  170. title: false
  171. });
  172. }
  173. })
  174. }, function(index) {
  175. layer.closeAll(index);
  176. });
  177. }
  178. </script>
  179. <!-- END -->