assist_bargain_coupon_me.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. <extend name="Public:pinduoduobase" />
  2. <block name="content">
  3. <link rel="stylesheet" href="__PUBLIC__/pin/assets/css/react_boot_30305e74e4b4d863454d94cab029e844.css">
  4. <link rel="stylesheet" href="__PUBLIC__/pin/assets/css/react_common_e1852e5ddc660dd79bef5eb49d18af1d.css">
  5. <link rel="stylesheet" href="__PUBLIC__/pin/assets/css/react_commercial_bargain_list_1e198f619d9fd08875d2f633992f363b.css">
  6. <style>
  7. .cb-order-list .cb-order-item .order-right button{background-color: #ff6699;}
  8. .cb-order-list .cb-order-item .order-right .remain .remain-price{color:#ff6699;}
  9. </style>
  10. <div id="main">
  11. <section data-reactroot="" class="main-view container">
  12. <div style="">
  13. <div id="bargain-orders" class="react-base-list-wrapper bargain-orders" style="display: block;">
  14. <ul class="cb-order-list" id="tuan_list">
  15. <?php foreach($list as $goods){ ?>
  16. <li role="button" class="cb-order-item">
  17. <img class="scrollLoading" src="{$fan_ly_image}" data-echo="__UPLOAD__/<?php echo $goods['image']; ?>" alt="order" />
  18. <div class="order-right">
  19. <p class="goods-name"><?php echo $goods['name']; ?></p>
  20. <?php if($goods['state'] == 0 && $goods['end_time'] > time() ){ ?>
  21. <div class="bargain-order-item-countdown clock_div" endtime="<?php echo date('m/d/Y H:i:s', $goods['end_time']);?>">
  22. <span></span>
  23. </div>
  24. <?php } ?>
  25. <?php if($goods['state'] == 0 && $goods['end_time'] > time() ){ ?>
  26. <div class="remain">
  27. <p class="remain-desc">离免费领取</p>
  28. <p class="remain-price">
  29. 还差
  30. <i><?php echo $goods['deal_money']; ?></i>
  31. </p>
  32. </div>
  33. <button class="button" onclick="location.href='{:U('Subject/assist_bargain_coupon_detail', array('id' =>$goods[id] ) )}';">继续砍价</button>
  34. <?php }else if($goods['state'] == 1){ ?>
  35. <button class="button" onclick="location.href='{:U('Subject/assist_bargain_coupon_detail', array('id' =>$goods[id] ) )}';">砍价成功</button>
  36. <?php }else if( ($goods['state'] == 0 && $goods['end_time'] < time()) || $goods['state'] == 2 ){ ?>
  37. <div class="remain">
  38. <p class="remain-desc"></p>
  39. <p class="remain-price">
  40. 砍价失败
  41. </p>
  42. </div>
  43. <button class="button" onclick="location.href='{:U('Subject/assist_bargain_coupon')}';">重砍一个</button>
  44. <?php } ?>
  45. </div>
  46. </li>
  47. <?php } ?>
  48. </ul>
  49. <div class="cb-order-list-bottom" style="display:none;">
  50. 已经到底部了
  51. </div>
  52. </div>
  53. </div>
  54. <div class="cb-tab">
  55. <div class="tab-item" onclick="location.href='{:U('Subject/assist_bargain_coupon')}';">
  56. <span class="icon-bargain ">砍价商品</span>
  57. </div>
  58. <div class="tab-item">
  59. <span class="icon-bargain-group active">我的砍价</span>
  60. </div>
  61. <div class="tab-split"></div>
  62. </div>
  63. </section>
  64. </div>
  65. <script src="__PUBLIC__/pin/js/clocktime_coupon_free.js"></script>
  66. <div class="center" id="center_pullup" style="display:none;">
  67. <span><img class="img_rotate" src="__PUBLIC__/pin/assets/img/pull_loading_8eba142.png"/>
  68. </span><span class="orders_text"></span>
  69. </div>
  70. <div id="jsalert-assist_free_coupon_rules1516799938453" style="display:none;">
  71. <div class="bg-fill bg-fill2"></div>
  72. <div id="assist-free-coupon-rules-alert">
  73. <div class="content-wrapper">
  74. <div class="detail">
  75. <div class="title">助力享免单规则</div>
  76. <ul class="desc">
  77. <?php foreach($zan_notice_arr as $val){ ?>
  78. <li><?php echo $val; ?></li>
  79. <?php } ?>
  80. </ul>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="">
  86. <style>
  87. .pin-spinner-2 {
  88. display: none;
  89. position: fixed;
  90. width: .66rem;
  91. height: .66rem;
  92. top: 35%;
  93. margin: 0 auto;
  94. left: 0;
  95. right: 0;
  96. z-index: 999999999;
  97. }
  98. .ps-inner-box {
  99. width: 100%;
  100. height: 100%;
  101. }
  102. .ps-rotate-img {
  103. width: .25rem;
  104. height: .25rem;
  105. margin: auto;
  106. left: 0;
  107. right: 0;
  108. top: 0;
  109. bottom: 0;
  110. animation: rotateImg 2.5s linear infinite;
  111. -webkit-animation: rotateImg 2.5s linear infinite;
  112. z-index: 9999999999;
  113. position: absolute;
  114. }
  115. .ps-rotate-msg {
  116. width: 100%;
  117. font-size: .15rem;
  118. text-align: center;
  119. /*height: 11px;*/
  120. color: #ffffff;
  121. position: relative;
  122. bottom: .12rem;
  123. }
  124. .spinner-background {
  125. width: 100%;
  126. height: 100%;
  127. position: fixed;
  128. top: 0;
  129. bottom: 0;
  130. left: 0;
  131. right: 0;
  132. z-index: 9999999999;
  133. }
  134. #ps-background {
  135. display: none;
  136. position: absolute;
  137. width: 100%;
  138. height: 100%;
  139. opacity: 0.8;
  140. background-color: #000;
  141. border-radius: .06rem;
  142. }
  143. .pin-spinner-wrapper-no-message {
  144. display: block;
  145. top: 50%;
  146. margin-top: -.65rem;
  147. width: .66rem;
  148. height: .66rem;
  149. }
  150. .pin-spinner-wrapper-no-message .ps-rotate-msg {
  151. display: none;
  152. bottom: 0;
  153. }
  154. .pin-spinner-wrapper-no-message .ps-rotate-img {
  155. width: .25rem;
  156. height: .25rem;
  157. bottom: 0;
  158. top: 0;
  159. }
  160. .pin-spinner-wrapper-message {
  161. display: block;
  162. top: 50%;
  163. margin-top: -.82rem;
  164. width: 1rem;
  165. height: 1rem;
  166. }
  167. .pin-spinner-wrapper-message .ps-rotate-msg {
  168. display: block;
  169. bottom: .32rem;
  170. }
  171. .pin-spinner-wrapper-message .ps-rotate-img {
  172. width: .39rem;
  173. height: .39rem;
  174. bottom: .43rem;
  175. top: .18rem;
  176. }
  177. @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
  178. .pin-spinner-wrapper-no-message {
  179. margin-top: -.82rem;
  180. }
  181. .pin-spinner-wrapper-message {
  182. margin-top: -.99rem;
  183. }
  184. }
  185. @keyframes rotateImg {
  186. 0% {
  187. transform: rotateZ(0deg);
  188. }
  189. 50% {
  190. transform: rotateZ(180deg);
  191. }
  192. 100% {
  193. transform: rotateZ(360deg);
  194. }
  195. }
  196. @-webkit-keyframes rotateImg {
  197. 0% {
  198. -webkit-transform: rotateZ(0deg);
  199. }
  200. 50% {
  201. -webkit-transform: rotateZ(180deg);
  202. }
  203. 100% {
  204. -webkit-transform: rotateZ(360deg);
  205. }
  206. }
  207. </style>
  208. <div id="pin-spinner" class="pin-spinner-2">
  209. <div id="ps-background"></div>
  210. <div class="ps-inner-box">
  211. <img id="imgInit" class="ps-rotate-img" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAYAAAA6oTAqAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAAGwElEQVRo3u2af4wdVRXHP2/XLm1BTMCCtGNLEQS6nUoVEiIwUEkMDTGZBqq0JOrQSBSE4sMKhEMW5aQCtg0W6w9Qp4Gm/AGUMRL5IabJiKSgQnWEVi1gy0CXrcJCIuiybPnjztvO3jfv7XvPNwYSvskme879ce537o9z7rmvQskQkRnACcBOVd1Xpq2ekoksBXYDMbBHR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class="ps-rotate-msg"></div>
  214. </div>
  215. </div>
  216. <include file="Widget:pin_notify" />
  217. <include file="Public:foot_lazy" />
  218. <include file="Widget:pin_toast" />
  219. {~W('Share/common_bargain_index_share')}
  220. <style>
  221. .qrcode-share-title-0{
  222. line-height:36px;
  223. }
  224. .center {
  225. width: 170px;
  226. margin: 0 auto;
  227. text-align: center;
  228. }
  229. .img_rotate {
  230. width: 30px;
  231. height: 30px;
  232. margin-top: 7px;
  233. margin-right: 5px;
  234. -webkit-animation: loading 1s linear 0s infinite;
  235. }
  236. @-webkit-keyframes loading {
  237. 0% {
  238. -webkit-transform: rotate(0);
  239. }
  240. 100% {
  241. -webkit-transform: rotate(360deg);
  242. }
  243. }
  244. .orders_text {
  245. line-height: 45px;
  246. font-weight: 700;
  247. font-size: 15px;
  248. }
  249. .m-addr-main .m-addr-close:before{
  250. position: absolute;
  251. top: 3px;
  252. left: 10px;
  253. }
  254. </style>
  255. <script>
  256. var offset = 0;
  257. var _pa = 2;
  258. var is_can_next = 1;
  259. var cur_url = "{:U('Subject/assist_bargain_coupon_me')}";
  260. var req_step = 1;
  261. var goods_id = 0;
  262. var sku_arr_str = '';
  263. var address_id = 0;
  264. var need_optionc = [];
  265. var mult_sku_option = new Array();
  266. //$('.sku-specs').length
  267. var ajaxarea_url='{:U("/c_getarea")}';
  268. $(function(){
  269. $('#qrcode-share').click(function(){
  270. $('#qrcode-share').hide();
  271. });
  272. $("#qrcode_share_img").click(function(event){
  273. event.stopPropagation();
  274. });
  275. $('.afc-friendlist-close').click(function(){
  276. $('#afc-friendlist').hide();
  277. })
  278. $('.add-btn').click(function(){
  279. })
  280. $('.afc-rules-button').click(function(){
  281. $('#jsalert-assist_free_coupon_rules1516799938453').show();
  282. })
  283. $('#assist-free-coupon-rules-alert').click(function(){
  284. $('#jsalert-assist_free_coupon_rules1516799938453').hide();
  285. })
  286. lxfEndtime();
  287. })
  288. function get_free_order_info(obj)
  289. {
  290. var order_id = $(obj).attr('data-order-id');
  291. //获取订单的助力情况
  292. $.ajax({
  293. url:"{:U('subject/get_order_zhudetail')}",
  294. type:'get',
  295. dataType:'json',
  296. data:{order_id:order_id},
  297. success:function(ret){
  298. if(ret.code ==0)
  299. {
  300. $('#afc-friendlist-list').html(ret.html);
  301. $('#afc-friendlist-empty').hide();
  302. $('#afc-friendlist-list').show();
  303. }else if(ret.code == 1){
  304. $('#afc-friendlist-list').hide();
  305. $('#afc-friendlist-empty').show();
  306. }
  307. }
  308. })
  309. $('#afc-friendlist').show();
  310. //data-order-id
  311. }
  312. function get_free_coup(obj)
  313. {
  314. goods_id = $(obj).attr('data-goods-id');
  315. //get sku
  316. $.ajax({
  317. url:"{:U('Subject/get_option_sku')}",
  318. type:'get',
  319. data:{goods_id:goods_id},
  320. dataType:'json',
  321. success:function(res){
  322. //img
  323. $('#assist-num').html(res.need_person);
  324. $('#qrcode_share_img').attr('src', res.img);
  325. $('#qrcode-share').show();
  326. }
  327. })
  328. console.log(goods_id);
  329. }
  330. function loaddata()
  331. {
  332. var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); //浏览器的高度加上滚动条的高度
  333. if ($(document).height() <= totalheight+200) //当文档的高度小于或者等于总的高度的时候,开始动态加载数据
  334. {
  335. if(is_can_next == 1)//加载数据
  336. {
  337. is_can_next = 0;
  338. nextpage();
  339. }
  340. }
  341. }
  342. function nextpage()
  343. {
  344. $('#center_pullup').show();
  345. $.ajax(
  346. {
  347. url: cur_url,
  348. type:'post',
  349. data:{page:_pa},
  350. dataType: 'json',
  351. success: function(result){
  352. if(result.code == 1)
  353. {
  354. $('#tuan_list').append(result.html);
  355. $('#center_pullup').hide();
  356. _pa++;
  357. is_can_next = 1;
  358. bindImgEvent();
  359. lxfEndtime();
  360. } else if(result.code == 0) {
  361. $('#center_pullup').remove();
  362. $('.cb-order-list-bottom').show();
  363. }
  364. }
  365. }
  366. );
  367. }
  368. $(function(){
  369. $(window).scroll( function() {
  370. loaddata();
  371. });
  372. })
  373. </script>
  374. </block>