Нема описа
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.

article_index.htm 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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/bootstrap.min.css"/}
  11. {eyou:static file="users/skin/css/basic.css"/}
  12. {eyou:static file="users/skin/css/eyoucms.css"/}
  13. {eyou:static file="users/skin/css/shop.css"/}
  14. {eyou:include file="users/skin/css/diy_css.htm"/}
  15. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  16. {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  17. {eyou:static file="/public/static/common/js/tag_global.js"/}
  18. </head>
  19. <body class="centre shop">
  20. <!-- 头部 -->
  21. {eyou:include file="users/users_header.htm" /}
  22. <!-- 头部结束 -->
  23. <div class="member-profile ey-member">
  24. <div class="container">
  25. <div class="member-profile-content">
  26. <div class="row">
  27. <!-- 侧边 -->
  28. {eyou:include file="users/users_left.htm" /}
  29. <!-- 侧边结束 -->
  30. <!-- 中部 -->
  31. <div class="col-xs-12 col-sm-10 ey-member-safety" >
  32. <div class="panel m-b-0">
  33. <div class="panel-body ey-member-index ey-member-profile">
  34. <div class="panel panel-default m-b-0 basic">
  35. <!-- 订单导航栏 -->
  36. <div class="topsub">
  37. <!-- 查询栏 -->
  38. <form action="{$search.action}" method="get" class="serbox">
  39. {$search.hidden}
  40. <div class="shop-order-keyword m-y-20">
  41. <div class="form-group">
  42. <div class="input-search">
  43. <input type="text" class="form-control" name="order_code" value="{$Request.param.order_code}" placeholder="商品名称/订单号">
  44. <button type="submit" class="input-search-btn">
  45. <i class="icon wb-search" aria-hidden="true"></i>
  46. </button>
  47. </div>
  48. </div>
  49. </div>
  50. </form>
  51. <!-- 查询栏结束 -->
  52. <!-- 顶部导航栏 -->
  53. <ul class="nav nav-tabs nav-tabs-line m-b-0 shop-order -state" id='each'>
  54. <li class="nav-item">
  55. <a class="nav-link {empty name='$order_status'}active{/empty}" data-toggle="tab" href="{eyou:url link='user/Media/index'/}">
  56. 全部订单
  57. </a>
  58. </li>
  59. <li class="nav-item">
  60. <a class="nav-link {eq name='$order_status' value='-1'}active{/eq}" data-toggle="tab" href="{eyou:url link='user/Media/index' vars='order_status=-1'/}">
  61. 待付款
  62. {eyou:if condition="0 != $PendingPayment"}<em>{$PendingPayment}</em>{/eyou:if}
  63. </a>
  64. </li>
  65. <li class="nav-item">
  66. <a class="nav-link {eq name='$order_status' value='1'}active{/eq}" data-toggle="tab" href="{eyou:url link='user/Media/index' vars='order_status=1'/}">
  67. 已完成
  68. {eyou:if condition="0 != $Completed"}<em>{$Completed}</em>{/eyou:if}
  69. </a>
  70. </li>
  71. </ul>
  72. <!-- 顶部导航栏结束 -->
  73. </div>
  74. <!-- 订单导航栏结束 -->
  75. {eyou:empty name="$list"}
  76. <!-- 订单数据为空 -->
  77. <div class="panel p-y-50 text-xs-center cart-not">
  78. <div class="container">
  79. <div class="row">
  80. <div class="col-lg-4 text-lg-right iconbox"></div>
  81. <div class="col-lg-8 text-lg-left animation-fade txt">
  82. <p class="cart-not-title m-t-0 m-b-20 blue-grey-400">
  83. 没有查询到订单数据!
  84. </p>
  85. <a href="{eyou:global name='web_cmsurl' /}" class="btn btn-lg btn-squared btn-primary">马上去购物</a>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. {eyou:else/}
  91. <!-- 获取订单数据列表 -->
  92. {eyou:volist name="$list" id="vo"}
  93. <div class="shop-order-item page-1">
  94. <div class="shop-order-top">
  95. <div class="col-md-8 col-sm-8 ting">
  96. <h4>{$vo.OrderStatusName}</h4>
  97. <span class="info">订单号 : {$vo.order_code}</span>
  98. <span class="info">{$vo.add_time|date='Y-m-d H:i:s',###}</span>
  99. <span class="info">{$vo.pay_name}</span>
  100. </div>
  101. <div class="col-md-4 col-sm-4 ting text-sm-right">
  102. <span class="price">¥{$vo.order_amount}元</span><br>
  103. </div>
  104. <div class="clearfix"></div>
  105. </div>
  106. <div class="clearfix shop-order-bottom">
  107. <!-- 获取订单商品 -->
  108. <div class="col-sm-6 col-xl-7">
  109. <div class="media-xs m-t-10">
  110. <div class="media-left">
  111. <a href="{$vo.arcurl}" >
  112. <img class="media-object" src="{$vo.product_litpic}" alt="商品名称">
  113. </a>
  114. </div>
  115. <div class="media-body">
  116. <h4 class="media-heading">
  117. <a href="{$vo.arcurl}" >
  118. {$vo.product_name}
  119. </a>
  120. </h4>
  121. <p class="m-b-5"></p>
  122. </div>
  123. </div>
  124. </div>
  125. <!-- 获取订单商品结束 -->
  126. <div class="col-xl-5 text-xs-right">
  127. <!-- 订单状态判断,待付款 -->
  128. {eyou:eq name="$vo.order_status" value="0"}
  129. {eyou:eq name="is_wechat" value='2'}
  130. <a href="{$vo.PaymentUrl}" class="btn btn-primary btn-squared m-l-5 m-t-10">
  131. 立即付款
  132. </a>
  133. {eyou:else/}
  134. <a href="JavaScript:void(0);" class="btn btn-primary btn-squared m-l-5 m-t-10" onClick="UpdatePayMethod('{$vo.order_id}', '{$vo.order_code}', 2);">
  135. 立即付款
  136. </a>
  137. {/eyou:eq}
  138. {/eyou:eq}
  139. <!-- 待付款结束 -->
  140. </div>
  141. </div>
  142. </div>
  143. {/eyou:volist}
  144. <!-- 获取订单数据列表结束 -->
  145. </div>
  146. </div>
  147. </div>
  148. <!-- 分页输出 -->
  149. {$page}
  150. <!-- 分页输出结束 -->
  151. {/eyou:empty}
  152. </div>
  153. <!-- 中部结束 -->
  154. </div>
  155. </div>
  156. </div>
  157. <input type="hidden" id="unified_id">
  158. <input type="hidden" id="unified_number">
  159. <input type="hidden" id="transaction_type">
  160. </div>
  161. <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
  162. <script type="text/javascript">
  163. $(function(){
  164. wx.miniProgram.getEnv( function(res) {
  165. if(res.miniprogram) {
  166. // 小程序
  167. var i = 0;
  168. i = setInterval('AppletsPay()', 1000);
  169. }
  170. });
  171. });
  172. // 小程序查询
  173. function AppletsPay(){
  174. var unified_id = $('#unified_id').val();
  175. var unified_number = $('#unified_number').val();
  176. var transaction_type = $('#transaction_type').val();
  177. if (unified_id && unified_number && transaction_type) {
  178. $.ajax({
  179. url: "{eyou:url link='user/Pay/ajax_applets_pay'/}",
  180. data: {unified_id:unified_id, unified_number:unified_number, transaction_type:transaction_type},
  181. type:'post',
  182. dataType:'json',
  183. success:function(res){
  184. if (1 == res.code) {
  185. if (!res.data.mobile && !res.data.email) window.location.href = res.url;
  186. if (res.data.mobile) SendMobile(res.data.mobile);
  187. if (res.data.email) SendEmail(res.data.email);
  188. window.location.href = res.url;
  189. }
  190. }
  191. });
  192. }
  193. }
  194. // 判断支付类型是否一致并且更新支付方式
  195. function UpdatePayMethod(unified_id, unified_number, transaction_type){
  196. layer_loading('正在处理');
  197. $.ajax({
  198. url: "{eyou:url link='user/Pay/update_pay_method'/}",
  199. data: {unified_id:unified_id,unified_number:unified_number,pay_method:'WeChatInternal',transaction_type:transaction_type,order_source:2},
  200. type:'post',
  201. dataType:'json',
  202. success:function(res){
  203. layer.closeAll();
  204. if (0 == res.code) {
  205. showErrorAlert(res.msg);
  206. }else{
  207. if (1 == res.data.is_gourl) {
  208. window.location.href = res.url;
  209. }else{
  210. $('#unified_id').val(unified_id);
  211. $('#unified_number').val(unified_number);
  212. $('#transaction_type').val(transaction_type);
  213. WeChatInternal(unified_id, unified_number, transaction_type);
  214. }
  215. }
  216. }
  217. });
  218. }
  219. // 微信内部中进行支付
  220. function WeChatInternal(unified_id, unified_number, transaction_type)
  221. {
  222. wx.miniProgram.getEnv( function(res) {
  223. if(res.miniprogram) {
  224. // 小程序
  225. wx.miniProgram.navigateTo({
  226. url: '/pages/pay/pay?unified_id='+ unified_id +'&unified_number=' + unified_number + '&type=' + transaction_type
  227. });
  228. } else {
  229. // 微信端
  230. $.ajax({
  231. url: "{eyou:url link='user/Pay/wechat_pay'/}",
  232. data: {unified_id:unified_id,unified_number:unified_number,transaction_type:transaction_type},
  233. type:'post',
  234. dataType:'json',
  235. success:function(res){
  236. layer.closeAll();
  237. if (1 == res.code) {
  238. callpay(res.msg);
  239. }else{
  240. showErrorAlert(res.msg);
  241. }
  242. }
  243. });
  244. }
  245. });
  246. }
  247. //调用微信JS api 支付
  248. function jsApiCall(data)
  249. {
  250. WeixinJSBridge.invoke(
  251. 'getBrandWCPayRequest',data,
  252. function(res){
  253. if(res.err_msg == "get_brand_wcpay_request:ok"){
  254. layer.msg('微信支付完成!', {time: 1000}, function(){
  255. pay_deal_with();
  256. });
  257. }else if(res.err_msg == "get_brand_wcpay_request:cancel"){
  258. showErrorAlert('用户取消支付!');
  259. }else{
  260. showErrorAlert('支付失败,原因可能是订单号已支付!');
  261. }
  262. }
  263. );
  264. }
  265. // 微信内部支付时,先进行数据判断
  266. function callpay(data)
  267. {
  268. if (typeof WeixinJSBridge == "undefined"){
  269. if( document.addEventListener ){
  270. document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
  271. }else if (document.attachEvent){
  272. document.attachEvent('WeixinJSBridgeReady', jsApiCall);
  273. document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
  274. }
  275. }else{
  276. jsApiCall(data);
  277. }
  278. }
  279. function pay_deal_with(){
  280. var unified_number = $('#unified_number').val();
  281. var transaction_type = $('#transaction_type').val();
  282. $.ajax({
  283. url: "{eyou:url link='user/Pay/pay_deal_with'/}",
  284. data: {unified_number:unified_number,transaction_type:transaction_type},
  285. type:'post',
  286. dataType:'json',
  287. success:function(res){
  288. if (1 == res.data.status) {
  289. if (!res.data.mobile && !res.data.email) window.location.href = res.url;
  290. if (res.data.mobile) SendMobile(res.data.mobile);
  291. if (res.data.email) SendEmail(res.data.email);
  292. window.location.href = res.url;
  293. }
  294. }
  295. });
  296. }
  297. // 发送短信
  298. function SendMobile(result) {
  299. if (result) {
  300. $.ajax({
  301. url: result.url,
  302. data: result.data,
  303. type:'post',
  304. dataType:'json'
  305. });
  306. }
  307. }
  308. // 发送邮件
  309. function SendEmail(result) {
  310. if (result) {
  311. $.ajax({
  312. url: result.url,
  313. data: result.data,
  314. type:'post',
  315. dataType:'json'
  316. });
  317. }
  318. }
  319. </script>
  320. {eyou:include file="users/users_footer.htm" /}