pay_add_group.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>拼单详情</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
  10. <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
  11. <link rel="stylesheet" type="text/css" href="css/style.css" />
  12. <style>
  13. .share-dalog {
  14. background: rgba(0, 0, 0, .7);
  15. position: fixed;
  16. left: 0;
  17. top: 0;
  18. right: 0;
  19. bottom: 0;
  20. width: 100%;
  21. height: 100%;
  22. z-index: 99;
  23. display: none;
  24. }
  25. .share-dalog img {
  26. width: 100%;
  27. }
  28. .ping-h1 {
  29. text-align: center;
  30. font-size: 18px;
  31. padding: 10px 0 15px 0;
  32. }
  33. .ping-h1 .red {
  34. color: #ff5673;
  35. }
  36. .mui-content .btn-ping {
  37. border-radius: 50px;
  38. display: block;
  39. width: 70%;
  40. margin: 15px auto;
  41. font-size: 16px;
  42. background: #ff5673;
  43. color: #fff;
  44. border: 0;
  45. padding: 12px 12px;
  46. }
  47. .mui-content .btn-ping:active {
  48. background: #fc4e67 !important;
  49. }
  50. .btn-details {
  51. border-radius: 50px;
  52. display: block;
  53. width: 70%;
  54. margin: 15px auto;
  55. font-size: 16px;
  56. padding: 12px 12px;
  57. }
  58. .btn-details:active {
  59. background: #f0f0f0;
  60. }
  61. .userHeader {
  62. border-radius: 50%;
  63. }
  64. .myicon-pin {
  65. background: #eba85e;
  66. color: #fff;
  67. border-radius: 25px;
  68. font-size: 12px;
  69. position: absolute;
  70. left: 0;
  71. top: 2px;
  72. line-height: 1.2;
  73. display: block;
  74. padding: 2px 5px;
  75. }
  76. </style>
  77. <script>
  78. // 屏蔽分享
  79. //window.hiddenAllWechatMenu = true;
  80. </script>
  81. </head>
  82. <body style="background: #fff;">
  83. <div class="loading-bg">
  84. <div class="mui-loading">
  85. <div class="mui-spinner">
  86. </div>
  87. &nbsp;&nbsp;加载中...
  88. </div>
  89. </div>
  90. <!--<nav class="mui-bar mui-bar-tab" id="footer-bar">
  91. <a class="mui-tab-item" >
  92. <div class="iconfont icon-shouye"></div>
  93. <span class="mui-tab-label">首页</span>
  94. </a>
  95. <a class="mui-tab-item">
  96. <div class="iconfont icon-gouwuche"><span class="mui-badge">0</span></div>
  97. <span class="mui-tab-label">购物车</span>
  98. </a>
  99. <a class="mui-tab-item">
  100. <div class="iconfont icon-dingdan"></div>
  101. <span class="mui-tab-label">订单</span>
  102. </a>
  103. <a class="mui-tab-item">
  104. <div class="iconfont icon-wode"></div>
  105. <span class="mui-tab-label">我的</span>
  106. </a>
  107. </nav>-->
  108. <!--<header class="mui-bar mui-bar-nav header">
  109. <div class="go-index go_index">
  110. <img src="images/logo.png" />
  111. </div>
  112. </header>-->
  113. <div class="mui-content" style="background: #fff;">
  114. <div style="padding: 30px 0 10px 0;">
  115. <div class="mui-table">
  116. <div class="mui-table-cell mui-col-xs-3 table-middle">
  117. </div>
  118. <div class="mui-table-cell mui-col-xs-3 mui-text-left">
  119. <img class="userHeader" width="80%" src="images/2019072918.jpg" />
  120. <span class="myicon-pin">拼主</span>
  121. </div>
  122. <div class="mui-table-cell mui-col-xs-3 mui-text-right">
  123. <img width="80%" src="images/2019072918.jpg" />
  124. </div>
  125. <div class="mui-table-cell mui-col-xs-3 table-middle">
  126. </div>
  127. </div>
  128. </div>
  129. <div class="ping-h1">还差<span class="red" id="count">0</span>人,快邀请好友来拼单吧</div>
  130. <div>
  131. <button type="button" class="mui-btn btn-ping">邀请好友拼单</button>
  132. </div>
  133. <div>
  134. <button type="button" class="mui-btn btn-details">查看订单详情</button>
  135. </div>
  136. <br />
  137. <p class="mui-text-center">注:分享给越多好友,越容易成团哟!</p>
  138. </div>
  139. <div class="share-dalog">
  140. <img src="images/share.png" />
  141. </div>
  142. <script src="js/mui.min.js"></script>
  143. <script src="js/jquery-2.1.1.min.js"></script>
  144. <script src="js/main.js"></script>
  145. <script src="js/page/wechat-utils-1.0.js"></script>
  146. </body>
  147. <script>
  148. var isSpell = getParam('isSpell'),
  149. isSpellstr = '',
  150. openid = '',
  151. orderid = getParam('orderId'),
  152. productId = '',
  153. colorId = '',
  154. shareTit = '',
  155. shareDesc = '';
  156. if(isSpell == 1) {
  157. isSpellstr = '&isSpell=1';
  158. }
  159. var str = location.href; //取得整个地址栏
  160. var num = str.indexOf("?")
  161. str = str.substr(num + 1); //取得所有参数
  162. $(document).ready(function() {
  163. $.ajax(base_path + '/user/member?dates=' + new Date().getTime(), {
  164. dataType: 'json',
  165. type: 'post',
  166. timeout: 15000,
  167. xhrFields: {
  168. withCredentials: true
  169. },
  170. crossDomain: true,
  171. success: function(dt) {
  172. if(dt.isRedirect) {
  173. location.href = dt.redirectURL;
  174. } else {
  175. var data = dt.data;
  176. if(dt.status) {
  177. if(typeof(data.userHead) != "undefined") {
  178. if(data.userHead != null && data.userHead != '') {
  179. $(".userHeader").attr('src', data.userHead)
  180. }
  181. }
  182. openid = data.userOpenid;
  183. getOrderId();
  184. } else {
  185. }
  186. }
  187. },
  188. error: function(xhr, type, errorThrown) {
  189. console.log(xhr)
  190. }
  191. });
  192. document.querySelector('.loading-bg').style.display = 'none'
  193. });
  194. function getOrderId() {
  195. $.ajax(base_path + '/cart/getShopOrderByOrderId', {
  196. data: {
  197. orderId: orderid
  198. },
  199. dataType: 'json',
  200. type: 'get',
  201. timeout: 15000,
  202. xhrFields: {
  203. withCredentials: true
  204. },
  205. crossDomain: true,
  206. success: function(dt) {
  207. if(dt.isRedirect) {
  208. location.href = dt.redirectURL;
  209. } else {
  210. if(dt.status) {
  211. if(typeof(dt.data.salesSpellOrderId) != "undefined") {
  212. $("#count").text('0');
  213. } else {
  214. $("#count").text('1');
  215. }
  216. $.each(dt.data.orderItemList, function(index) {
  217. if(index == 0) {
  218. productId = this.itemProductId;
  219. colorId = this.itemColorId;
  220. shareTit = '【在线等】我拼了' + this.itemProductName + '(' + this.productColor + ')';
  221. fenxiang();
  222. }
  223. });
  224. }
  225. }
  226. },
  227. error: function(xhr, type, errorThrown) {
  228. console.log(xhr)
  229. }
  230. });
  231. };
  232. $(document).on('tap', '.btn-details', function() {
  233. location.href = 'order_details.html?' + str
  234. });
  235. //分享弹窗
  236. $(document).on('tap', '.btn-ping', function() {
  237. $(".share-dalog").show();
  238. });
  239. //关闭分享弹窗
  240. $(document).on('tap', '.share-dalog', function() {
  241. $(this).hide();
  242. });
  243. //分享
  244. function fenxiang() {
  245. var url = 'https://' + location.host + '/watero/wechat/pay_join_group.html?' + str + '&openid=' + openid;
  246. window.repleFlag = false;
  247. window.wxFriend = {
  248. "appId": "",
  249. "imgUrl": 'https://s.iamberry.com/watero/wechat/images/2019080701.jpg',
  250. "link": url,
  251. "desc": "快来和我一起拼团!",
  252. "title": shareTit,
  253. "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
  254. "shareTimeSuccess": "分享成功",
  255. "shareTimeCancel": "已取消分享",
  256. "shareAppSuccess": "分享成功!",
  257. "shareAppCancel": "已取消分享"
  258. };
  259. getConfig();
  260. }
  261. </script>
  262. </html>