rabin 5 years ago
parent
commit
c066828b2a
80 changed files with 1591 additions and 0 deletions
  1. 24 0
      buy/assets/mobile/auth.html
  2. 85 0
      buy/assets/mobile/codedetail.html
  3. 2 0
      buy/assets/mobile/css/auth.css
  4. 1 0
      buy/assets/mobile/css/auth.css.map
  5. 0 0
      buy/assets/mobile/css/codedetail.css
  6. 1 0
      buy/assets/mobile/css/codedetail.css.map
  7. 0 0
      buy/assets/mobile/css/global.css
  8. 1 0
      buy/assets/mobile/css/global.css.map
  9. 0 0
      buy/assets/mobile/css/index.css
  10. 1 0
      buy/assets/mobile/css/index.css.map
  11. 2 0
      buy/assets/mobile/css/list.css
  12. 1 0
      buy/assets/mobile/css/list.css.map
  13. BIN
      buy/assets/mobile/images/ico-close.png
  14. BIN
      buy/assets/mobile/images/ico-home-active.png
  15. BIN
      buy/assets/mobile/images/ico-home.png
  16. BIN
      buy/assets/mobile/images/qrcode.png
  17. BIN
      buy/assets/mobile/images/tabico-code-active.png
  18. BIN
      buy/assets/mobile/images/tabico-code.png
  19. 156 0
      buy/assets/mobile/index.html
  20. 2 0
      buy/assets/mobile/js/auth.js
  21. 1 0
      buy/assets/mobile/js/auth.js.map
  22. 2 0
      buy/assets/mobile/js/codedetail.js
  23. 1 0
      buy/assets/mobile/js/codedetail.js.map
  24. 3 0
      buy/assets/mobile/js/config.js
  25. 0 0
      buy/assets/mobile/js/global.js
  26. 0 0
      buy/assets/mobile/js/global.js.map
  27. 2 0
      buy/assets/mobile/js/index.js
  28. 1 0
      buy/assets/mobile/js/index.js.map
  29. 2 0
      buy/assets/mobile/js/list.js
  30. 1 0
      buy/assets/mobile/js/list.js.map
  31. 60 0
      buy/assets/mobile/list.html
  32. 66 0
      buy/assets/mobile/pay.html
  33. 20 0
      buy/assets/mobile_old/auth.html
  34. 114 0
      buy/assets/mobile_old/codedetail.html
  35. 2 0
      buy/assets/mobile_old/css/auth.css
  36. 1 0
      buy/assets/mobile_old/css/auth.css.map
  37. 2 0
      buy/assets/mobile_old/css/codedetail.css
  38. 1 0
      buy/assets/mobile_old/css/codedetail.css.map
  39. 0 0
      buy/assets/mobile_old/css/global.css
  40. 1 0
      buy/assets/mobile_old/css/global.css.map
  41. 0 0
      buy/assets/mobile_old/css/list.css
  42. 1 0
      buy/assets/mobile_old/css/list.css.map
  43. 0 0
      buy/assets/mobile_old/css/pay.css
  44. 1 0
      buy/assets/mobile_old/css/pay.css.map
  45. BIN
      buy/assets/mobile_old/images/ico-close.png
  46. BIN
      buy/assets/mobile_old/images/ico-code.png
  47. BIN
      buy/assets/mobile_old/images/ico-selected.png
  48. BIN
      buy/assets/mobile_old/images/ico-unselected.png
  49. BIN
      buy/assets/mobile_old/images/list.png
  50. BIN
      buy/assets/mobile_old/images/logo.jpg
  51. BIN
      buy/assets/mobile_old/images/mag.png
  52. BIN
      buy/assets/mobile_old/images/qrcode.png
  53. 20 0
      buy/assets/mobile_old/index.html
  54. 2 0
      buy/assets/mobile_old/js/auth.js
  55. 1 0
      buy/assets/mobile_old/js/auth.js.map
  56. 2 0
      buy/assets/mobile_old/js/codedetail.js
  57. 1 0
      buy/assets/mobile_old/js/codedetail.js.map
  58. 3 0
      buy/assets/mobile_old/js/config.js
  59. 0 0
      buy/assets/mobile_old/js/global.js
  60. 0 0
      buy/assets/mobile_old/js/global.js.map
  61. 2 0
      buy/assets/mobile_old/js/index.js
  62. 1 0
      buy/assets/mobile_old/js/index.js.map
  63. 2 0
      buy/assets/mobile_old/js/list.js
  64. 1 0
      buy/assets/mobile_old/js/list.js.map
  65. 2 0
      buy/assets/mobile_old/js/pay.js
  66. 1 0
      buy/assets/mobile_old/js/pay.js.map
  67. 88 0
      buy/assets/mobile_old/list.html
  68. 41 0
      buy/assets/mobile_old/my_code.html
  69. 95 0
      buy/assets/mobile_old/pay.html
  70. 11 0
      buy/index.php
  71. 131 0
      buy/src/Base.php
  72. 411 0
      buy/src/Buy.php
  73. 30 0
      buy/src/Data.php
  74. 21 0
      buy/template/mobile/auth.php
  75. 35 0
      buy/template/mobile/codedetail.php
  76. 44 0
      buy/template/mobile/home.php
  77. 14 0
      buy/template/mobile/inc/foot.php
  78. 10 0
      buy/template/mobile/inc/head.php
  79. 34 0
      buy/template/mobile/list.php
  80. 30 0
      buy/template/mobile/pay.php

+ 24 - 0
buy/assets/mobile/auth.html

@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
+    <title>JSTYLE精美</title>
+    <style>
+
+    </style>
+<link href="css/global.css?v=a54dd0df" rel="stylesheet"><link href="css/auth.css?v=a54dd0df" rel="stylesheet"></head>
+
+<body>
+    <div class='topcont'>
+        <div class='title'>欢迎使用<span>小程序名称</span></div>
+        <span class='msg'>使用小程序的全部功能 <br>
+            需要您授权以下微信权限:</span>
+    </div>
+    <div class="authinfo">获取您的公开信息(昵称、头像等)</div>
+    <a href="#" class='button' >授权用户信息</a>
+<script type="text/javascript" src="js/global.js?v=a54dd0df"></script><script type="text/javascript" src="js/auth.js?v=a54dd0df"></script></body>
+
+</html>

+ 85 - 0
buy/assets/mobile/codedetail.html

@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+
+    <meta name="divport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
+    <title>JSTYLE精美</title>
+<link href="css/global.css?v=a54dd0df" rel="stylesheet"><link href="css/codedetail.css?v=a54dd0df" rel="stylesheet"></head>
+
+<body>
+    <div class="maginfo">
+        <img src='http://7.jstyle.cn/1/2019/03/06/91e4fb0f002311e72cd285706e71d800.jpg' />
+        <div>
+            <span>兑换码只能被激活一次,当您购买成功后,可进入小程序使用兑换码查看,若您购买了多本,可将剩余兑换码赠送好友。</span>
+            <a href="#" node-act="read" class="button black">阅读</a>
+        </div>
+    </div>
+    <div class="code-list">
+        <div class='dl'>
+            <div class='dd'>
+                <div class='p'>
+                    <span class="ico-code"></span>兑换码:675386834</div>
+                <span class="span">未使用</span>
+            </div>
+            <div class='dt'>
+                <a href="javascript:;" class="button" node-id="copy" data-clipboard-text="675386834">复制</a>
+            </div>
+        </div>
+        <div class='dl'>
+            <div class='dd'>
+                <div class='p'>
+                    <span class="ico-code"></span>兑换码:675386834</div>
+                <span class="span used">已使用</span>
+            </div>
+            <div class='dt'>
+                <div class="button disabled">复制</div>
+            </div>
+        </div>
+        <div class='dl'>
+            <div class='dd'>
+                <div class='p'>
+                    <span class="ico-code"></span>兑换码:675386834</div>
+                <span class="span used">已作废</text>
+            </div>
+            <div class='dt'>
+                <div class="button disabled">复制</div>
+            </div>
+        </div>
+    </div>
+    <div class="success fn-hide" id="success">复制成功</div>
+    <div class="mask fn-hide" id="layer">
+        <div class="layer read-layer">
+            <div class="qrcode-wrap">
+                <img src="images/qrcode.png" alt="" class="default" id="code">
+                <p>长按识别小程序阅读电子刊</p>
+            </div>
+            <a href="javascript:;" class="btn-close" id="close"></a>
+        </div>
+    </div>
+<script type="text/javascript" src="js/global.js?v=a54dd0df"></script><script type="text/javascript" src="js/codedetail.js?v=a54dd0df"></script></body>
+<script src="https://cdn.bootcss.com/clipboard.js/2.0.4/clipboard.min.js"></script>
+<script>
+    var timer;
+    var clipboard = new ClipboardJS('[node-id="copy"]');
+
+    clipboard.on('success', function (e) {
+        $('#success').removeClass('fn-hide');
+        clearTimeout(timer);
+        timer = setTimeout(function () {
+            $('#success').addClass('fn-hide');
+        }, 3000)
+        e.clearSelection();
+    });
+
+    $('[node-act="read"]').on('click', function () {
+        $('#layer').show();
+    })
+
+    $('#close').on('click', function () {
+        $('#layer').hide();
+    });
+</script>
+
+</html>

+ 2 - 0
buy/assets/mobile/css/auth.css

@@ -0,0 +1,2 @@
+.button{background:#000;width:7.06667rem;height:1.06667rem;line-height:1.06667rem;font-size:.4rem;color:#fff;border-radius:.06667rem;border:0;margin-left:1.46667rem}.button.disabled{background:#ccc;border-color:#ccc}.topcont{padding:1.28rem 0 0 1.46667rem}.topcont .title{font-size:.66667rem;line-height:.96rem}.topcont .title span{display:block}.topcont .msg{display:block;margin-top:.66667rem;font-size:.34667rem;line-height:.53333rem}.authinfo{font-size:.34667rem;margin:1.13333rem 0 1.33333rem 1.46667rem;color:#666}
+/*# sourceMappingURL=auth.css.map?v=a54dd0df*/

+ 1 - 0
buy/assets/mobile/css/auth.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/auth.css?v=a54dd0df","sourceRoot":""}

File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile/css/codedetail.css


+ 1 - 0
buy/assets/mobile/css/codedetail.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/codedetail.css?v=a54dd0df","sourceRoot":""}

File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile/css/global.css


+ 1 - 0
buy/assets/mobile/css/global.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/global.css?v=a54dd0df","sourceRoot":""}

File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile/css/index.css


+ 1 - 0
buy/assets/mobile/css/index.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/index.css?v=a54dd0df","sourceRoot":""}

+ 2 - 0
buy/assets/mobile/css/list.css

@@ -0,0 +1,2 @@
+.orderlist{padding:.16rem .33333rem 0}.orderlist .order{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-bottom:.01333rem solid #ddd;padding:.53333rem 0}.orderlist .order:last-child{border-bottom:0}.orderlist .order img{width:2rem;height:2.82667rem;display:block;margin-right:.48rem;box-shadow:0 .16rem .21333rem rgba(0,0,0,.3);-ms-flex-negative:0;flex-shrink:0}.orderlist .order .info{-ms-flex:1;flex:1;padding-right:.4rem}.orderlist .order .info .name{font-size:.4rem;margin-bottom:.46667rem}.orderlist .order .info .count{font-size:.4rem;margin-bottom:.66667rem}.orderlist .order .info .order-time{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;font-size:.32rem;color:#666}.orderlist .order .info .order-time .btn{width:2.66667rem;height:.8rem;line-height:.8rem;background-color:#000;color:#fff;font-size:.4rem;border-radius:.06667rem;text-align:center}
+/*# sourceMappingURL=list.css.map?v=a54dd0df*/

+ 1 - 0
buy/assets/mobile/css/list.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/list.css?v=a54dd0df","sourceRoot":""}

BIN
buy/assets/mobile/images/ico-close.png


BIN
buy/assets/mobile/images/ico-home-active.png


BIN
buy/assets/mobile/images/ico-home.png


BIN
buy/assets/mobile/images/qrcode.png


BIN
buy/assets/mobile/images/tabico-code-active.png


BIN
buy/assets/mobile/images/tabico-code.png


+ 156 - 0
buy/assets/mobile/index.html

@@ -0,0 +1,156 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport"
+        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+    <title>精美时尚</title>
+<link href="css/global.css?v=a54dd0df" rel="stylesheet"><link href="css/index.css?v=a54dd0df" rel="stylesheet"></head>
+
+<body>
+    <div class='orderlist'>
+        <div class='order'>
+            <img src='http://7.jstyle.cn/1/2019/03/06/91e4fb0f002311e72cd285706e71d800.jpg' />
+            <div class='info'>
+                <div class='journal-no'>100本 ¥798.00</div>
+                <div class='name'>欢乐阳光BOY王鹤棣</div>
+                <div class='price'>
+                    <span>2019.6.30 15:20</span>
+                    <a href='javascript:;' node-act="subscribe" class='button'>订阅</a>
+                </div>
+            </div>
+        </div>
+        <div class='order'>
+            <img src='http://7.jstyle.cn/1/2019/03/06/91e4fb0f002311e72cd285706e71d800.jpg' />
+            <div class='info'>
+                <div class='journal-no'>100本 ¥798.00</div>
+                <div class='name'>欢乐阳光BOY王鹤棣</div>
+                <div class='price'>
+                    <span>2019.6.30 15:20</span>
+                    <a href='javascript:;' node-act="read" class='button read'>阅读</a>
+                </div>
+            </div>
+        </div>
+        <div class='order'>
+            <img src='http://7.jstyle.cn/1/2019/03/06/91e4fb0f002311e72cd285706e71d800.jpg' />
+            <div class='info'>
+                <div class='journal-no'>100本 ¥798.00</div>
+                <div class='name'>欢乐阳光BOY王鹤棣</div>
+                <div class='price'>
+                    <span>2019.6.30 15:20</span>
+                    <a href='javascript:;' node-act="subscribe" class='button'>订阅</a>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class='footer'>
+        <a href="index.html" class='tab tab-home active'>首页</a>
+        <a href="list.html" class='tab tab-code'>兑换码</a>
+    </div>
+    <div class="mask fn-hide" id="buylayermask"></div>
+    <div class="buy-layer" id="buylayer">
+        <form bindsubmit='doBuy'>
+            <div class="tit ">正在购买</div>
+            <div class='msg' node-act="buytip">查看购买说明</div>
+            <div class="list">
+                <div class="item active" data-id="1">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="2">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="3">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="4">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="5">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="6">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+            </div>
+            <div class="btn-wrapper ">
+                <div class="button cancel" node-act="hideBuy">取消</div>
+                <div class="button primary " node-act="doBuy">确认</div>
+            </div>
+        </form>
+    </div>
+    <div class="mask fn-hide" id="buytip">
+        <div class="buytip-layer layer ">
+            <div class='buy-tit'>购买说明</div>
+            <div class="p">
+                1、购买成功后可直接点击【开始阅读】
+                查看阅读内容; <br>
+                2、虚拟商品,如无系统问题,购买后不
+                可退换; <br>
+                3、每购买一本,可增加20积分; <br>
+                4、如有其他使用问题可咨询在线客服。
+            </div>
+            <div class="btn-wrapper">
+                <div class="button" node-act="hideTip">我知道了</div>
+            </div>
+        </div>
+    </div>
+
+    <div class="mask fn-hide" id="layer">
+        <div class="layer read-layer">
+            <div class="qrcode-wrap">
+                <img src="images/qrcode.png" alt="" class="default" id="code">
+                <p>长按识别小程序阅读电子刊</p>
+            </div>
+            <a href="javascript:;" class="btn-close" id="close"></a>
+        </div>
+    </div>
+    <div id="pay"></div>
+<script type="text/javascript" src="js/global.js?v=a54dd0df"></script><script type="text/javascript" src="js/index.js?v=a54dd0df"></script></body>
+<script>
+
+    let buyid = 1;
+    var payStatus = false;
+    $('[node-act="read"]').on('click', function () {
+        $('#code').attr('src',$(this).data('src'));
+        $('#layer').show();
+    })
+
+    $('#close').on('click', function () {
+        $('#layer').hide();
+    });
+
+    $('[node-act="subscribe"]').on('click', function () {
+        var url = $(this).data('src');
+        $('#buylayer').html('加载中...');
+        $('#buylayermask').show();
+        $.get(url, function(t)
+        {
+            $('#buylayer').html(t);
+            $('#buylayer').addClass('slidein')
+        })
+        
+    })
+    $('#buylayer').on('click','.list .item',function(){
+        $(this).addClass('active').siblings().removeClass('active');
+        buyid = $(this).data('id');
+    })
+
+    
+    function pay(url)
+    {
+        $.get(url, function(t) {
+            $("#pay").html(t);
+            payStatus = false;
+            $('[node-act="doBuy"]').html('确认');
+        })
+    }
+</script>
+
+</html>

+ 2 - 0
buy/assets/mobile/js/auth.js

@@ -0,0 +1,2 @@
+webpackJsonp([3],{1:function(n,t,c){"use strict";c(0),c(7)},12:function(n,t,c){n.exports=c(1)},7:function(n,t){}},[12]);
+//# sourceMappingURL=auth.js.map?v=a54dd0df

+ 1 - 0
buy/assets/mobile/js/auth.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js/auth.js","webpack:///./mobile/src/router/auth.js"],"names":["webpackJsonp","1","module","exports","__webpack_require__","12","7"],"mappings":"AAAAA,cAAc,IAERC,EACA,SAAUC,EAAQC,EAASC,GAEjC,YCLAA,GAAA,GACAA,EAAA,IDaMC,GACA,SAAUH,EAAQC,EAASC,GAEjCF,EAAOC,QAAUC,EAAoB,IAK/BE,EACA,SAAUJ,EAAQC,OAMrB","file":"js/auth.js?v=a54dd0df","sourcesContent":["webpackJsonp([3],{\n\n/***/ 1:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(7);\n\n/***/ }),\n\n/***/ 12:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n\n},[12]);\n\n\n// WEBPACK FOOTER //\n// js/auth.js?v=a54dd0df","import './global';\r\nimport '../css/auth.css';\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/auth.js"],"sourceRoot":""}

+ 2 - 0
buy/assets/mobile/js/codedetail.js

@@ -0,0 +1,2 @@
+webpackJsonp([2],{13:function(n,t,c){n.exports=c(2)},2:function(n,t,c){"use strict";c(0),c(9)},9:function(n,t){}},[13]);
+//# sourceMappingURL=codedetail.js.map?v=a54dd0df

+ 1 - 0
buy/assets/mobile/js/codedetail.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js/codedetail.js","webpack:///./mobile/src/router/codedetail.js"],"names":["webpackJsonp","13","module","exports","__webpack_require__","2","9"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,EAASC,GAEjCF,EAAOC,QAAUC,EAAoB,IAK/BC,EACA,SAAUH,EAAQC,EAASC,GAEjC,YCbAA,GAAA,GAEAA,EAAA,IDoBME,EACA,SAAUJ,EAAQC,OAMrB","file":"js/codedetail.js?v=a54dd0df","sourcesContent":["webpackJsonp([2],{\n\n/***/ 13:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(2);\n\n\n/***/ }),\n\n/***/ 2:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(9);\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n\n},[13]);\n\n\n// WEBPACK FOOTER //\n// js/codedetail.js?v=a54dd0df","import './global';\r\n// import '../js/clipboard.js';\r\nimport '../css/codedetail.css';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/codedetail.js"],"sourceRoot":""}

+ 3 - 0
buy/assets/mobile/js/config.js

@@ -0,0 +1,3 @@
+//定义瀑布流
+Dever.Page().name = '#page';
+//Dever.Page().loading = '.loadding';

File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile/js/global.js


File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile/js/global.js.map


+ 2 - 0
buy/assets/mobile/js/index.js

@@ -0,0 +1,2 @@
+webpackJsonp([1],{10:function(n,t){},15:function(n,t,c){n.exports=c(3)},3:function(n,t,c){"use strict";c(0),c(10)}},[15]);
+//# sourceMappingURL=index.js.map?v=a54dd0df

+ 1 - 0
buy/assets/mobile/js/index.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js","webpack:///./mobile/src/router/index.js"],"names":["webpackJsonp","10","module","exports","15","__webpack_require__","3"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,OD4BG","file":"js/index.js?v=a54dd0df","sourcesContent":["webpackJsonp([1],{\n\n/***/ 10:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 15:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(3);\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(10);\n\n/***/ })\n\n},[15]);\n\n\n// WEBPACK FOOTER //\n// js?v=a54dd0df","import './global';\r\nimport '../css/index.css';\r\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/index.js"],"sourceRoot":""}

+ 2 - 0
buy/assets/mobile/js/list.js

@@ -0,0 +1,2 @@
+webpackJsonp([0],{11:function(n,t){},16:function(n,t,c){n.exports=c(4)},4:function(n,t,c){"use strict";c(0),c(11)}},[16]);
+//# sourceMappingURL=list.js.map?v=a54dd0df

+ 1 - 0
buy/assets/mobile/js/list.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js/list.js","webpack:///./mobile/src/router/list.js"],"names":["webpackJsonp","11","module","exports","16","__webpack_require__","4"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,OD4BG","file":"js/list.js?v=a54dd0df","sourcesContent":["webpackJsonp([0],{\n\n/***/ 11:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 16:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(4);\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(11);\n\n/***/ })\n\n},[16]);\n\n\n// WEBPACK FOOTER //\n// js/list.js?v=a54dd0df","import './global';\r\nimport '../css/list.css';\r\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/list.js"],"sourceRoot":""}

+ 60 - 0
buy/assets/mobile/list.html

@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport"
+        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+    <title>精美时尚</title>
+<link href="css/global.css?v=a54dd0df" rel="stylesheet"><link href="css/list.css?v=a54dd0df" rel="stylesheet"></head>
+
+<body>
+    <div class='orderlist'>
+        <div class='order'>
+            <img src='http://7.jstyle.cn/1/2019/03/06/91e4fb0f002311e72cd285706e71d800.jpg' />
+            <div class='info'>
+                <div class='name'>欢乐阳光BOY王鹤棣</div>
+                <div class='count'>100本 ¥798.00</div>
+                <div class='order-time'>
+                    <span>2019.6.30 15:20</span>
+                    <a href='codedetail.html'
+                        class='button'>查看</a>
+                </div>
+            </div>
+        </div>
+        <div class='order'>
+            <img src='http://7.jstyle.cn/1/2019/03/06/91e4fb0f002311e72cd285706e71d800.jpg' />
+            <div class='info'>
+                <div class='name'>欢乐阳光BOY王鹤棣</div>
+                <div class='count'>100本 ¥798.00</div>
+                <div class='order-time'>
+                    <span>2019.6.30 15:20</span>
+                    <a href='codedetail.html'
+                        class='button'>查看</a>
+                </div>
+            </div>
+        </div>
+        <div class='order'>
+            <img src='http://7.jstyle.cn/1/2019/03/06/91e4fb0f002311e72cd285706e71d800.jpg' />
+            <div class='info'>
+                <div class='name'>欢乐阳光BOY王鹤棣</div>
+                <div class='count'>100本 ¥798.00</div>
+                <div class='order-time'>
+                    <span>2019.6.30 15:20</span>
+                    <a href='codedetail.html'
+                        class='button'>查看</a>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class='footer'>
+            <a href="index.html" class='tab tab-home '>首页</a>
+            <a href="list.html" class='tab tab-code active'>兑换码</a>
+        </div>
+<script type="text/javascript" src="js/global.js?v=a54dd0df"></script><script type="text/javascript" src="js/list.js?v=a54dd0df"></script></body>
+<script>
+
+
+</script>
+
+</html>

+ 66 - 0
buy/assets/mobile/pay.html

@@ -0,0 +1,66 @@
+<form bindsubmit='doBuy'>
+            <div class="tit ">正在购买</div>
+            <div class='msg' node-act="buytip">查看购买说明</div>
+            <div id="tips" style="display: none;">查看购买说明</div>
+            <div class="list">
+                <div class="item active" data-id="1">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="2">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="3">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="4">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="5">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+                <div class="item" data-id="6">
+                    <span class='name'>购买1本</span>
+                    <span>¥8.00</span>
+                </div>
+            </div>
+            <div class="btn-wrapper ">
+                <div class="button cancel" node-act="hideBuy">取消</div>
+                <div class="button primary " node-act="doBuy">确认</div>
+            </div>
+        </form>
+
+<script>
+	$('[node-act="hideBuy"]').on('click',function(){
+        $('#buylayer').removeClass('slidein')
+        $('#buylayermask').hide();
+    })
+
+    $('[node-act="doBuy"]').on('click',function(){
+        if (payStatus == false) {
+            
+            console.info($('.active'));
+            var url = $('.list .active').attr('data-pay');
+            if (!url) {
+            	alert('错误的信息');
+            	location.reload();
+            	return;
+            }
+            $(this).html('支付中...');
+            $('#buytip .p').html($('#tips').html());
+            payStatus = true;
+            pay(url);
+        }
+    })
+
+    $('[node-act="buytip"]').on('click', function () {
+        $('#buytip').show()
+    })
+    $('[node-act="hideTip"]').on('click', function () {
+        $('#buytip').hide()
+    })
+</script>

+ 20 - 0
buy/assets/mobile_old/auth.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
+    <title>JSTYLE精美</title>
+    <style>
+
+    </style>
+<link href="css/global.css?v=3f8cf811" rel="stylesheet"><link href="css/auth.css?v=3f8cf811" rel="stylesheet"></head>
+
+<body>
+    <img class="logo" src="http://www.huoxingkandiqiu.com/files/img/ico-auth.png" alt="">
+    <div class='txt'><span>授权后才可以使用精美时尚服务<br>感谢您的支持</span></div>
+    <a href="#" class='button'>授权登录</a>
+<script type="text/javascript" src="js/global.js?v=3f8cf811"></script><script type="text/javascript" src="js/auth.js?v=3f8cf811"></script></body>
+
+</html>

+ 114 - 0
buy/assets/mobile_old/codedetail.html

@@ -0,0 +1,114 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
+    <title>JSTYLE精美</title>
+<link href="css/global.css?v=3f8cf811" rel="stylesheet"><link href="css/codedetail.css?v=3f8cf811" rel="stylesheet"></head>
+
+<body>
+    <div class="tips">
+        <p>温馨提示:</p>
+        <p>兑换码只能被激活一次,当您购买成功后,可进入<span id="product_name">小程序</span>使用兑换码查看电子刊,若您购买了多本,可将剩余兑换码赠送好友。</p>
+    </div>
+    <div class="btn-wrap">
+        <a href="javascript:;" node-act="read" class="button black">阅读电子刊</a>
+    </div>
+    <div class="code-list pages">
+        <dl>
+            <dd>
+                <p><i class="ico-code"></i>兑换码:675386834</p>
+                <span class="used">已使用</span>
+            </dd>
+            <dt>
+                <a href="javascript:;" class="button disabled">复制</a>
+            </dt>
+        </dl>
+        <dl>
+            <dd>
+                <p><i class="ico-code"></i>兑换码:675386834</p>
+                <span>未使用</span>
+            </dd>
+            <dt>
+                <a href="javascript:;" class="button" node-id="copy" data-clipboard-text="675386834">复制</a>
+            </dt>
+        </dl>
+        <dl>
+            <dd>
+                <p><i class="ico-code"></i>兑换码:675386834</p>
+                <span class="used">已使用</span>
+            </dd>
+            <dt>
+                <a href="javascript:;" class="button disabled">复制</a>
+            </dt>
+        </dl>
+        <dl>
+            <dd>
+                <p><i class="ico-code"></i>兑换码:675386834</p>
+                <span>未使用</span>
+            </dd>
+            <dt>
+                <a href="javascript:;" class="button" node-id="copy" data-clipboard-text="675386833">复制</a>
+            </dt>
+        </dl>
+        <dl>
+            <dd>
+                <p><i class="ico-code"></i>兑换码:675386834</p>
+                <span class="used">已使用</span>
+            </dd>
+            <dt>
+                <a href="javascript:;" class="button disabled">复制</a>
+            </dt>
+        </dl>
+        <dl>
+            <dd>
+                <p><i class="ico-code"></i>兑换码:675386834</p>
+                <span>未使用</span>
+            </dd>
+            <dt>
+                <a href="javascript:;" class="button" node-id="copy" data-clipboard-text="675386832">复制</a>
+            </dt>
+        </dl>
+    </div>
+    <div class="success fn-hide" id="success">复制成功</div>
+    <div class="mask fn-hide" id="layer">
+        <div class="layer read-layer">
+            <div class="qrcode-wrap">
+                <img src="images/qrcode.png" alt="" class="default" id="code">
+                <p>长按识别<span id="product_name">小程序</span>阅读电子刊</p>
+            </div>
+            <a href="javascript:;" class="btn-close" id="close"></a>
+        </div>
+    </div>
+<script type="text/javascript" src="js/global.js?v=3f8cf811"></script><script type="text/javascript" src="js/codedetail.js?v=3f8cf811"></script></body>
+<script src="https://cdn.bootcss.com/clipboard.js/2.0.4/clipboard.min.js"></script>
+<script>
+    function init(){
+        var timer;
+        var clipboard = new ClipboardJS('[node-id="copy"]');
+
+        clipboard.on('success', function (e) {
+            $('#success').removeClass('fn-hide');
+            clearTimeout(timer);
+            timer = setTimeout(function () {
+                $('#success').addClass('fn-hide');
+            }, 3000)
+
+            console.log(e.trigger)
+
+            e.clearSelection();
+        });
+
+        $('[node-act="read"]').on('click',function(){
+            $('#layer').show();
+        })
+
+        $('#close').on('click',function(){
+            $('#layer').hide();
+        });
+    }
+    init();
+</script>
+</html>

+ 2 - 0
buy/assets/mobile_old/css/auth.css

@@ -0,0 +1,2 @@
+.logo{margin:3.13333rem auto .6rem;width:2.66667rem;height:2.66667rem;display:block}.txt{margin-bottom:.73333rem;color:#000;line-height:1.6;text-align:center}.button,.txt{font-size:.4rem}.button{margin:0 auto;background:#cc1619;width:7.06667rem;height:1.06667rem;line-height:1.06667rem;color:#fff}
+/*# sourceMappingURL=auth.css.map?v=4b099281*/

+ 1 - 0
buy/assets/mobile_old/css/auth.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/auth.css?v=4b099281","sourceRoot":""}

+ 2 - 0
buy/assets/mobile_old/css/codedetail.css

@@ -0,0 +1,2 @@
+.tips{width:8.66667rem;margin:.58667rem auto .26667rem;line-height:.53333rem}.button,.tips{font-size:.32rem}.button{margin:0;width:2.4rem;line-height:.86667rem;height:.86667rem}.button.black{background-color:#000}.button.disabled{background-color:#ccc}.btn-wrap{width:8.66667rem;margin:0 auto .54667rem}.code-list{border-top:1px solid #ccc;width:8.66667rem;margin:0 auto}.code-list dl{-ms-flex-pack:justify;justify-content:space-between;padding:.53333rem 0;border-bottom:1px solid #ccc}.code-list dl,.code-list dl dd p{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.code-list dl dd p{font-size:.37333rem;line-height:.56rem;margin-bottom:.2rem}.code-list dl dd p .ico-code{display:block;width:.45333rem;height:.4rem;background:url(../images/ico-code.png) no-repeat;background-size:.45333rem .4rem;margin-right:.13333rem}.code-list dl dd p b{font-weight:400}.code-list dl dd span{font-size:.32rem}.code-list dl dd span.used{color:#d1171a}.success{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.75);border-radius:.2rem;width:6.6667rem;height:1.0667rem;line-height:1.0667rem;font-size:.4rem;text-align:center;color:#fff}
+/*# sourceMappingURL=codedetail.css.map?v=4b099281*/

+ 1 - 0
buy/assets/mobile_old/css/codedetail.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/codedetail.css?v=4b099281","sourceRoot":""}

File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile_old/css/global.css


+ 1 - 0
buy/assets/mobile_old/css/global.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/global.css?v=4b099281","sourceRoot":""}

File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile_old/css/list.css


+ 1 - 0
buy/assets/mobile_old/css/list.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/list.css?v=4b099281","sourceRoot":""}

File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile_old/css/pay.css


+ 1 - 0
buy/assets/mobile_old/css/pay.css.map

@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","file":"css/pay.css?v=4b099281","sourceRoot":""}

BIN
buy/assets/mobile_old/images/ico-close.png


BIN
buy/assets/mobile_old/images/ico-code.png


BIN
buy/assets/mobile_old/images/ico-selected.png


BIN
buy/assets/mobile_old/images/ico-unselected.png


BIN
buy/assets/mobile_old/images/list.png


BIN
buy/assets/mobile_old/images/logo.jpg


BIN
buy/assets/mobile_old/images/mag.png


BIN
buy/assets/mobile_old/images/qrcode.png


+ 20 - 0
buy/assets/mobile_old/index.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8">
+
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
+    <title>JSTYLE精美</title>
+    <style>
+
+    </style>
+<link href="css/global.css?v=3f8cf811" rel="stylesheet"><link href="css/auth.css?v=3f8cf811" rel="stylesheet"></head>
+
+<body>
+    <img class="logo" src="http://www.huoxingkandiqiu.com/files/img/ico-auth.png" alt="">
+    <div class='txt'><span>授权后才可以使用精美时尚服务<br>感谢您的支持</span></div>
+    <a href="#" class='button'>授权登录</a>
+<script type="text/javascript" src="js/global.js?v=3f8cf811"></script><script type="text/javascript" src="js/auth.js?v=3f8cf811"></script></body>
+
+</html>

+ 2 - 0
buy/assets/mobile_old/js/auth.js

@@ -0,0 +1,2 @@
+webpackJsonp([3],{1:function(n,t,c){"use strict";c(0),c(7)},12:function(n,t,c){n.exports=c(1)},7:function(n,t){}},[12]);
+//# sourceMappingURL=auth.js.map?v=4b099281

+ 1 - 0
buy/assets/mobile_old/js/auth.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js/auth.js","webpack:///./mobile/src/router/auth.js"],"names":["webpackJsonp","1","module","exports","__webpack_require__","12","7"],"mappings":"AAAAA,cAAc,IAERC,EACA,SAAUC,EAAQC,EAASC,GAEjC,YCLAA,GAAA,GACAA,EAAA,IDaMC,GACA,SAAUH,EAAQC,EAASC,GAEjCF,EAAOC,QAAUC,EAAoB,IAK/BE,EACA,SAAUJ,EAAQC,OAMrB","file":"js/auth.js?v=4b099281","sourcesContent":["webpackJsonp([3],{\n\n/***/ 1:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(7);\n\n/***/ }),\n\n/***/ 12:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n\n},[12]);\n\n\n// WEBPACK FOOTER //\n// js/auth.js?v=4b099281","import './global';\r\nimport '../css/auth.css';\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/auth.js"],"sourceRoot":""}

+ 2 - 0
buy/assets/mobile_old/js/codedetail.js

@@ -0,0 +1,2 @@
+webpackJsonp([2],{13:function(n,t,c){n.exports=c(2)},2:function(n,t,c){"use strict";c(0),c(9)},9:function(n,t){}},[13]);
+//# sourceMappingURL=codedetail.js.map?v=4b099281

+ 1 - 0
buy/assets/mobile_old/js/codedetail.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js/codedetail.js","webpack:///./mobile/src/router/codedetail.js"],"names":["webpackJsonp","13","module","exports","__webpack_require__","2","9"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,EAASC,GAEjCF,EAAOC,QAAUC,EAAoB,IAK/BC,EACA,SAAUH,EAAQC,EAASC,GAEjC,YCbAA,GAAA,GAEAA,EAAA,IDoBME,EACA,SAAUJ,EAAQC,OAMrB","file":"js/codedetail.js?v=4b099281","sourcesContent":["webpackJsonp([2],{\n\n/***/ 13:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(2);\n\n\n/***/ }),\n\n/***/ 2:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(9);\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n\n},[13]);\n\n\n// WEBPACK FOOTER //\n// js/codedetail.js?v=4b099281","import './global';\r\n// import '../js/clipboard.js';\r\nimport '../css/codedetail.css';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/codedetail.js"],"sourceRoot":""}

+ 3 - 0
buy/assets/mobile_old/js/config.js

@@ -0,0 +1,3 @@
+//定义瀑布流
+Dever.Page().name = '#page';
+//Dever.Page().loading = '.loadding';

File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile_old/js/global.js


File diff suppressed because it is too large
+ 0 - 0
buy/assets/mobile_old/js/global.js.map


+ 2 - 0
buy/assets/mobile_old/js/index.js

@@ -0,0 +1,2 @@
+webpackJsonp([2],{11:function(n,t){},17:function(n,t,c){n.exports=c(3)},3:function(n,t,c){"use strict";c(0),c(11)}},[17]);
+//# sourceMappingURL=index.js.map?v=d6fd028b

+ 1 - 0
buy/assets/mobile_old/js/index.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js","webpack:///./mobile/src/router/index.js"],"names":["webpackJsonp","11","module","exports","17","__webpack_require__","3"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,OD4BG","file":"js/index.js?v=d6fd028b","sourcesContent":["webpackJsonp([2],{\n\n/***/ 11:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 17:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(3);\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(11);\n\n/***/ })\n\n},[17]);\n\n\n// WEBPACK FOOTER //\n// js?v=d6fd028b","import './global';\nimport '../css/index.css';\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/index.js"],"sourceRoot":""}

+ 2 - 0
buy/assets/mobile_old/js/list.js

@@ -0,0 +1,2 @@
+webpackJsonp([1],{10:function(n,t){},15:function(n,t,c){n.exports=c(3)},3:function(n,t,c){"use strict";c(0),c(10)}},[15]);
+//# sourceMappingURL=list.js.map?v=4b099281

+ 1 - 0
buy/assets/mobile_old/js/list.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js/list.js","webpack:///./mobile/src/router/list.js"],"names":["webpackJsonp","10","module","exports","15","__webpack_require__","3"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,OD4BG","file":"js/list.js?v=4b099281","sourcesContent":["webpackJsonp([1],{\n\n/***/ 10:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 15:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(3);\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(10);\n\n/***/ })\n\n},[15]);\n\n\n// WEBPACK FOOTER //\n// js/list.js?v=4b099281","import './global';\nimport '../css/list.css';\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/list.js"],"sourceRoot":""}

+ 2 - 0
buy/assets/mobile_old/js/pay.js

@@ -0,0 +1,2 @@
+webpackJsonp([0],{11:function(n,t){},16:function(n,t,c){n.exports=c(4)},4:function(n,t,c){"use strict";c(0),c(11)}},[16]);
+//# sourceMappingURL=pay.js.map?v=4b099281

+ 1 - 0
buy/assets/mobile_old/js/pay.js.map

@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///js/pay.js","webpack:///./mobile/src/router/pay.js"],"names":["webpackJsonp","11","module","exports","16","__webpack_require__","4"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,KAMlBC,GACA,SAAUF,EAAQC,EAASE,GAEjCH,EAAOC,QAAUE,EAAoB,IAK/BC,EACA,SAAUJ,EAAQC,EAASE,GAEjC,YCpBAA,GAAA,GACAA,EAAA,OD4BG","file":"js/pay.js?v=4b099281","sourcesContent":["webpackJsonp([0],{\n\n/***/ 11:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 16:\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(4);\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n__webpack_require__(0);\n\n__webpack_require__(11);\n\n/***/ })\n\n},[16]);\n\n\n// WEBPACK FOOTER //\n// js/pay.js?v=4b099281","import './global';\nimport '../css/pay.css';\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/pay.js"],"sourceRoot":""}

+ 88 - 0
buy/assets/mobile_old/list.html

@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+    <title>精美时尚</title>
+<link href="css/global.css?v=3f8cf811" rel="stylesheet"><link href="css/list.css?v=3f8cf811" rel="stylesheet"></head>
+
+<body>
+    <div class="logo"><img src="images/logo.jpg" />精品购物指南</div>
+    <div class="info-txt">这里加一行简介</div>
+    <div class="tab" node-id="tab">
+        <a class="li active"><span>预购杂志</span></a>
+        <a class="li"><span>兑换码</span></a>
+    </div>
+    <div class="list pages" node-id="list">
+        <div class="item">
+            <img src="images/mag.png" class="default" />
+            <div class="info">
+                <h2>段宜恩电子刊段宜恩电子刊段宜恩电子刊</h2>
+            </div>
+            <div class="ctrls-cont">
+                <p class="clearfix">
+                    <span class="price">免费</span>
+                </p>
+                <button class="button" node-act="read" data-src="images/qrcode.png">阅读</button>
+            </div>
+        </div>
+        <div class="item">
+            <img src="images/mag.png" class="default" />
+            <div class="info">
+                <h2>Yamy魔幻星际女战士的异度空间</h2>
+            </div>
+            <div class="ctrls-cont">
+                 <p class="clearfix">
+                    <span class="price">¥6.00</span>
+                </p>
+                <button class="button">订阅</button>
+            </div>
+        </div>
+    </div>
+
+    <div class="mask fn-hide" id="layer">
+        <div class="layer read-layer">
+            <div class="qrcode-wrap">
+                <img src="images/qrcode.png" alt="" class="default" id="code">
+                <p>长按识别<span id="product_name">小程序</span>阅读电子刊</p>
+            </div>
+            <a href="javascript:;" class="btn-close" id="close"></a>
+        </div>
+    </div>
+
+<script type="text/javascript" src="js/global.js?v=3f8cf811"></script><script type="text/javascript" src="js/list.js?v=3f8cf811"></script></body>
+<script>
+
+    function init(){
+        /*
+        var tabIndex = 0;
+        $('[node-id="tab"]').on('click','.li',function(){
+            tabIndex = $(this).index();
+            $(this).addClass('active').siblings('.li').removeClass('active');
+            $('[node-id="list"]').hide().eq(tabIndex).show();
+        });
+*/
+
+        $('[node-act="read"]').on('click',function(){
+            $('#code').attr('src',$(this).data('src'));
+            $('#layer').show();
+        })
+
+        $('[node-act="pay"]').on('click',function(){
+            pay($(this).data('src'));
+        })
+
+        $('#close').on('click',function(){
+            $('#layer').hide();
+        });
+
+    }
+    
+    init();
+    function pay(url)
+    {
+        location.href = url;
+    }
+</script>
+</html>

+ 41 - 0
buy/assets/mobile_old/my_code.html

@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+    <title>精美时尚</title>
+<link href="css/global.css?v=3f8cf811" rel="stylesheet"><link href="css/list.css?v=3f8cf811" rel="stylesheet"></head>
+
+<body>
+    <div class="logo"><img src="images/logo.jpg" />精品购物指南</div>
+    <div class="info-txt">这里加一行简介</div>
+    <div class="tab" node-id="tab">
+        <a class="li "><span>预购杂志</span></a>
+        <a class="li active"><span>兑换码</span></a>
+    </div>
+
+    <div class="list pages" node-id="list">
+        <div class="item2 clearfix">
+            <div class="order-info">
+                <p>2019年4月30日  15:20</p>
+                <a href="#">查看>></a>
+            </div>
+            <div class="mag-info">
+                <p>《段宜恩电子刊段宜恩电子刊段宜恩电子刊》</p>
+                <span>100本  ¥798.00</span>
+            </div>
+        </div>
+        <div class="item2 clearfix">
+            <div class="order-info">
+                <p>2019年4月30日  15:20</p>
+                <a href="#">查看>></a>
+            </div>
+            <div class="mag-info">
+                <p>《段宜恩电子刊段宜恩电子刊段宜恩电子刊》</p>
+                <span>100本  ¥798.00</span>
+            </div>
+        </div>
+    </div>
+
+<script type="text/javascript" src="js/global.js?v=3f8cf811"></script><script type="text/javascript" src="js/list.js?v=3f8cf811"></script></body>

+ 95 - 0
buy/assets/mobile_old/pay.html

@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport"
+        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+    <title>精美时尚</title>
+<link href="css/global.css?v=3f8cf811" rel="stylesheet"><link href="css/pay.css?v=3f8cf811" rel="stylesheet"></head>
+
+<body>
+    <div class="container">
+        <div>
+            <div class="h1">正在购买《xxxx》</div>
+            <div class='buytip' id="open">
+                <p>查看购买说明</p>
+            </div>
+            <div class="list">
+                <a class="item active" bind-id="item" href="#">
+                    <p>购买10本</p>
+                    <p>¥6</p>
+                </a>
+                <a class="item" bind-id="item" href="#">
+                    <p>购买10本</p>
+                    <p>¥6</p>
+                </a>
+                <a class="item" bind-id="item" href="#">
+                    <p>购买10本</p>
+                    <p>¥6</p>
+                </a>
+            </div>
+        </div>
+        <div class='fix-footer'>
+            <a href="javascript:history.go(-1)" class='back-btn'>返回</a>
+            <a href="javascript:;" id="dopay" class="fix-button">确认购买</a>
+        </div>
+    </div>
+    <div class="mask fn-hide" id="layer">
+        <div class="layer ">
+            <h3 class="title">购买说明</h3>
+            <div class="richtext">asdfsdf</div>
+            <div class="btn-wrapper">
+                <div class="button opposite" node-act="close">我知道了</div>
+            </div>
+        </div>
+    </div>
+
+    <div class="mask fn-hide" id="pay-layer">
+        <div class="layer buy-result">
+            <h3 class="title">购买提示</h3>
+            <div class="res" id="buyyes">您已成功购买1000本电子刊</div>
+            <div class="btn-wrapper">
+                <a href="codedetail.html" class="button" id="viewcode">查看兑换码</a>
+                <div class="button" node-act="close">继续购买</div>
+            </div>
+        </div>
+    </div>
+    <div id="pay"></div>
+<script type="text/javascript" src="js/global.js?v=3f8cf811"></script><script type="text/javascript" src="js/pay.js?v=3f8cf811"></script></body>
+<script>
+    
+    var payStatus = false;
+    $(document).on('click', '[bind-id="item"]', function(){
+        $(this).addClass('active').siblings('.item').removeClass('active');
+        //$('#pay-layer').show();
+    });
+
+    $('#dopay').on('click',function(){
+        if (payStatus == false) {
+            $(this).html('支付中...');
+            var url = $('.active').attr('data-pay');
+            payStatus = true;
+            pay(url);
+        }
+    });
+
+    $('#open').on('click',function(){
+        $('#layer').show();
+    });
+
+    $('[node-act="close"]').on('click',function(){
+        $(this).closest('.mask').hide();
+    });
+
+    function pay(url)
+    {
+        $.get(url, function(t) {
+            $("#pay").html(t);
+            payStatus = false;
+            $('#dopay').html('确认购买');
+        })
+    }
+
+</script>
+</html>

+ 11 - 0
buy/index.php

@@ -0,0 +1,11 @@
+<?php
+
+# 取代service
+# 启动session,用以记录用户信息
+define('DEVER_SESSION', 1);
+define('DEVER_APP_NAME', 'buy');
+define('DEVER_APP_LANG', '公众号支付');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 1);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-dollar');
+include(DEVER_APP_PATH . '../boot.php');

+ 131 - 0
buy/src/Base.php

@@ -0,0 +1,131 @@
+<?php namespace Buy\Src;
+
+use Dever;
+
+class Base
+{
+    public $key = 'jmbuybuybuyv1';
+
+	public function __construct()
+    {
+        $p = Dever::input('p');
+        if ($p) {
+            $this->config = Dever::json_decode(Dever::decode($p, $this->key));
+        }
+        # 第三方账户
+        $this->account = $this->getConfig('account', 1);
+        # 小刊分类
+        $this->cate = $this->getConfig('cate', 1);
+        # 渠道
+        $this->source = $this->getConfig('source', 1);
+        # 销售商
+        $this->seller = $this->getConfig('seller', 1);
+
+        $this->signature = Dever::input('signature');
+        $this->source_type = Dever::input('source_type');
+
+        $this->user = Dever::load('passport/user')->data();
+        # 用户信息
+        if (!$this->user && $this->signature) {
+            $uid = Dever::load('passport/applet')->check();
+            $this->user = Dever::db('passport/user')->one($uid);
+        } elseif ($this->source_type) {
+            $this->user = array();
+            $this->user['id'] = -1;
+            $this->user['username'] = '未登录用户';
+            $this->user['mobile'] = '';
+        }
+    }
+
+    # 创建url
+    public function createUrl()
+    {
+        # 第三方账户
+        $this->account = Dever::input('account', 1);
+        # 分类
+        $this->cate = Dever::input('cate', 1);
+        # 渠道
+        $this->source = Dever::input('source', 1);
+        # 销售商
+        $this->seller = Dever::input('seller', 1);
+        
+        $url = $this->url('home');
+
+        return $url;
+    }
+
+    private function getConfig($key, $value)
+    {
+        if (isset($this->config[$key]) && $this->config[$key]) {
+            return $this->config[$key];
+        }
+        $value = Dever::input($key, $value);
+        return $value;
+    }
+
+    # 获取基本配置
+    public function config()
+    {
+        $key = 'buy_config_' . $this->cate . '_' . $this->account . '_' . $this->source;
+
+        $cate = Dever::cache($key);
+
+        if (!$cate) {
+            $cate = Dever::db('journal/cate')->one($this->cate);
+
+            //$cate['login_title'] = '<span>授权后才可以使用' . $cate['name'] . '服务<br>感谢您的支持</span>';
+            $cate['login_title'] = '<div class="title">欢迎使用<span>' . $cate['name'] . '</span></div>
+        <span class="msg">使用' . $cate['name'] . '的全部功能 <br>
+            需要您授权以下微信权限:</span>';
+
+            $cate['bglogo'] = 'background-image:url('.$cate['logo'].');';
+
+            $cate['logotxt'] = '<img src="'.$cate['logo'].'" />' . $cate['name'];
+
+            $url = urlencode($this->url('list'));
+            $cate['login'] = 'location.href=\'' . Dever::url('request.auth?account='.$this->account.'&source='.$this->source.'&refer=' . $url, 'oauth') . '\'';
+
+            $info = Dever::db('journal/info')->getOne($cate['journal_id']);
+
+            if ($info && $info['pic_gd']) {
+                $cate['cover'] = $info['pic_gd'];
+            }
+
+            $cate['list_link'] = $this->url('home');
+            $cate['my_link'] = $this->url('list');
+
+            Dever::cache($key, $cate);
+        }
+        
+        return $cate;
+    }
+
+    # 生成url
+    protected function url($uri, $param = array(), $project = 'buy')
+    {
+    	$send['cate'] = $this->cate;
+    	$send['source'] = $this->source;
+        $send['seller'] = $this->seller;
+        $param['p'] = Dever::encode(Dever::json_encode($send), $this->key);
+        if ($this->signature) {
+            $param['signature'] = $this->signature;
+        }
+        if ($this->source_type) {
+            $param['source_type'] = $this->source_type;
+        }
+    	$param = http_build_query($param);
+    	$url = Dever::url($uri . '?' . $param, $project);
+
+    	return $url;
+    }
+
+    protected function location($uri, $param = array(), $project = 'buy')
+    {
+    	return Dever::location($this->url($uri, $param, $project));
+    }
+
+    protected function createOrder($prefix = 'JP')
+    {
+        return Dever::load('act/order')->createOrder($prefix);
+    }
+}

+ 411 - 0
buy/src/Buy.php

@@ -0,0 +1,411 @@
+<?php namespace Buy\Src;
+
+use Dever;
+
+# 必须登录才能购买小刊
+class Buy extends Base
+{
+    public function __construct()
+    {
+        parent::__construct();
+    }
+    
+    # 列表页
+    public function lists()
+    {
+        # 记录列表页渠道pv、uv数
+        /*
+        if (Dever::project('source')) {
+            Dever::load('source/lib/core')->save($this->user['id'], 'list', $this->source);
+        }
+        */
+        $where['cate_id'] = $this->cate;
+        //$where['buy'] = 1;
+        $data = Dever::db('journal/info')->getAllByPage($where);
+
+        if ($data) {
+            $num = 100;
+            foreach ($data as $k => $v) {
+                if ($v['buy'] == 1 && $v['cash'] > 0) {
+
+                    $data[$k]['price'] = $num . '本 ¥' . number_format(($v['cash'] * 100), 2);
+                } else {
+                    $data[$k]['price'] = '免费';
+                }
+
+                //$data[$k]['ding'] = '销量:' . $v['num_ding'];
+
+                $data[$k]['pic_gd'] .= '?imageView2/2/w/375';
+
+                if ($v['buy'] == 1) {
+                    $data[$k]['button'] = '订阅';
+                    $data[$k]['act'] = 'subscribe';
+                    $data[$k]['code'] = $this->url('pay', array('id' => $v['id']));
+                } else {
+                    $data[$k]['act'] = 'read';
+                    # 小刊阅读码
+                    $data[$k]['code'] = $this->create_code($v['id']);
+                    $data[$k]['button'] = '阅读';
+                }
+                $data[$k]['pdate'] = $data[$k]['pdate'] > 0 ? date('Y-m-d H:i', $data[$k]['pdate']) : date('Y-m-d H:i', $data[$k]['cdate']);
+            }
+        }
+
+        return $data;
+    }
+
+    public function product_name()
+    {
+        $html = '小程序';
+        if ($this->cate == 4) {
+            $html = '安装APP';
+        }
+        return $html;
+    }
+
+    # 列表页 我已购买的兑换码
+    public function lists_code()
+    {
+        $where['cate_id'] = $this->cate;
+        $where['uid'] = $this->user['id'];
+        $where['status'] = 2;
+        $where['type'] = 3;
+        $data = Dever::db('act/order')->getMyAll($where);
+
+        if ($data) {
+            foreach ($data as $k => $v) {
+                $data[$k]['cdate'] = date('Y年m月d日 H:i', $v['cdate']);
+                if (!$v['order_id']) {
+                    $v['order_id'] = $v['id'];
+                }
+                $data[$k]['link'] = $this->url('codedetail', array('order_id' => $v['order_id'], 'id' => $v['product_id']));
+                if (isset($v['buy_num']) && $v['buy_num'] <= 0 && $v['buy_id']) {
+                    $buy = Dever::load('act/order')->getBuy($v['buy_id']);
+                    $data[$k]['buy_num'] = $v['buy_num'] = $buy['num']; 
+                }
+                $data[$k]['desc'] = $v['buy_num'] . '本 ¥' . number_format($v['cash'], 2);
+                $name = explode('-', $v['name']);
+                $data[$k]['name'] = $name[0];
+            }
+        }
+
+        return $data;
+    }
+
+    # 列表页 我已购买的兑换码
+    public function code_detail()
+    {
+        $where['cate_id'] = $this->cate;
+        $where['create_uid'] = $this->user['id'];
+        $where['order_id'] = Dever::input('order_id');
+        if (!$where['order_id']) {
+            Dever::alert('错误的订单');
+        }
+        $where['type'] = 4;
+        $order = Dever::load('act/order')->getOrder($where['order_id']);
+        Dever::setInput('set_product_id', $order['product_id']);
+        $where['order_id'] = $order['order_id'];
+        $data = Dever::db('code/info')->getAll($where);
+
+        if ($data) {
+            foreach ($data as $k => $v) {
+                $code = Dever::load('code/lib/core')->view($v['id'], $v['create_uid']);
+                $data[$k]['code'] = '<span class="ico-code"></span>兑换码:'.$code;
+                if ($v['type'] == 1) {
+                    $data[$k]['txt'] = '未使用';
+                    $data[$k]['class'] = 'span';
+                    $data[$k]['copy'] = '<a href="javascript:;" class="button" node-id="copy" data-clipboard-text="'.$code.'">复制</a>';
+                } elseif ($v['type'] == 4) {
+                    $data[$k]['txt'] = '已作废';
+                    $data[$k]['class'] = 'span used';
+                    $data[$k]['copy'] = '<div class="button disabled">复制</div>';
+                } else {
+                    $data[$k]['txt'] = '已使用';
+                    $data[$k]['class'] = 'span used';
+                    $data[$k]['copy'] = '<div class="button disabled">复制</div>';
+                }
+            }
+        }
+
+        return $data;
+    }
+
+    # 详细信息
+    public function info()
+    {
+        $id = Dever::input('id');
+
+        # 记录购买页渠道pv、uv数
+        if (Dever::project('source')) {
+            Dever::load('source/lib/core')->save($this->user['id'], 'buy', $this->source, array('journal_id' => $id));
+        }
+
+        $info = Dever::db('journal/info')->one($id);
+
+        $info['buy'] = '正在购买《' . $info['name'] . '》';
+
+        $buy = Dever::db('journal/buy')->one(array('id' => $id));
+
+        $info['buy_desc'] = '';
+        $info['buy_notice'] = '一次购买多本将生成一个兑换码用于兑换,如需多个兑换码,请多次购买。';
+        $info['buy_notices'] = '购买兑换码赠送好友:点击下方购买后,将生成多个兑换码。
+积分规则:使用兑换码兑换后,使用人获得积分,购买人不增加积分。';
+        if ($buy) {
+            $info['buy_desc'] = $buy['buy_content'];
+            if ($buy['buy_notice']) {
+                $info['buy_notice'] = $buy['buy_notice'];
+            }
+            if ($buy['buy_notices']) {
+                $info['buy_notices'] = $buy['buy_notices'];
+            }
+        }
+
+        $info['buy_notices'] = str_replace("\n", '<br />', $info['buy_notices']);
+
+        
+        $buy_num = Dever::input('buy_num');
+        if ($buy_num > 0) {
+            $info += $this->success();
+        } else {
+            $info['buy_class'] = 'mask fn-hide';
+            $info['buy_code'] = '';
+            $info['buy_yes'] = '';
+        }
+        
+        return $info;
+    }
+
+    # 生成二维码
+    public function code()
+    {
+        $id = Dever::input('id');
+
+        return $this->create_code($id);
+    }
+
+    private function create_code($id)
+    {
+        $type = 4;
+        $uid = $this->user['id'];
+        
+        $scene = $uid . ',' . $type . ',' . $id;
+
+        if ($this->cate == 4) {
+            return 'https://7.jstyle.cn/1/2019/09/11/bc6ecfb8ccadc4e252ac23f2a3de3ad2.png';
+        }
+        $path = Dever::config('base')->applet_index;
+        $send['project'] = Dever::input('project', $this->cate);
+        $send['send'] = $scene;
+        $send['width'] = 152;
+        $send['path'] = $path; 
+        $code = Dever::load('wechat_applet/code.get', $send);
+
+        return $code;
+    }
+
+    # 小刊购买成功
+    public function success()
+    {
+        $id = Dever::input('id');
+        $buy_id = Dever::input('buy');
+        
+        $order_id = Dever::input('order_id');
+        $create = Dever::input('create');
+        if ($order_id && $create == 1) {
+            $order = Dever::load('act/order')->getOrder($order_id);
+
+            if ($order['uid'] != $this->user['id']) {
+                $this->location('list');
+            }
+
+            $uid = $this->user['id'];
+
+            $code = Dever::load('code/lib/core')->createCodeByOrder($order, -1);
+            if ($code) {
+                $update['where_id'] = $order['id'];
+                $update['code'] = $code;
+                Dever::db('act/order')->update($update);
+            }
+        }
+
+        $result['buy_code'] = $this->url('codedetail', array('order_id' => $order_id, 'id' => $id));
+        $result['buy_yes'] = '您已成功购买' . Dever::input('buy_num') . '本电子刊';
+        $result['buy_class'] = 'mask';
+        return $result;
+    }
+
+    # 小刊购买 一个兑换码的
+    public function buy()
+    {
+        $id = Dever::input('id');
+        $data = Dever::db('journal/buy_num')->getAllCode(array('info_id' => $id));
+        $info = Dever::db('journal/info')->one($id);
+
+        if ($data) {
+            foreach ($data as $k => $v) {
+                if ($v['price'] > 0) {
+                    $data[$k]['price'] = '¥' . number_format($v['price'], 2);
+                } elseif ($info['cash'] > 0) {
+                    $data[$k]['price'] = '¥' . number_format($info['cash'] * $v['num'], 2);
+                } else {
+                    $data[$k]['price'] = '免费';
+                }
+
+                if (!$v['name']) {
+                    $data[$k]['name'] = '购买' . $v['num'] . '本';
+                }
+                $data[$k]['cate'] = $info['cate_id'];
+
+                $data[$k]['pay_url'] = $this->url('buy.pay', array('buy_id' => $v['id'], 'journal_id' => $v['info_id']));
+            }
+        }
+        return $data;
+    }
+
+    public function buys_page()
+    {
+        $data = $this->buys();
+
+        Dever::render('pay', $data);
+    }
+
+    # 小刊购买 多个兑换码的
+    public function buys()
+    {
+        $id = Dever::input('id');
+        $data = Dever::db('journal/buy_num')->getAllCodes(array('info_id' => $id));
+        $info = Dever::db('journal/info')->one($id);
+
+        if ($data) {
+            foreach ($data as $k => $v) {
+                $data[$k]['class'] = 'item';
+                if ($k == 0) {
+                    $data[$k]['class'] .= ' active';
+                }
+                if ($v['price'] > 0) {
+                    $data[$k]['price'] = '¥' . number_format($v['price'], 2);
+                } elseif ($info['cash'] > 0) {
+                    $data[$k]['price'] = '¥' . number_format($info['cash'] * $v['num'], 2);
+                } else {
+                    $data[$k]['price'] = '免费';
+                }
+
+                if (!$v['name']) {
+                    $data[$k]['name'] = '购买' . $v['num'] . '本';
+                }
+                $data[$k]['cate'] = $info['cate_id'];
+
+                $data[$k]['pay_url'] = $this->url('buy.pay', array('buy_id' => $v['id'], 'journal_id' => $v['info_id']));
+            }
+        }
+        return $data;
+    }
+
+    # 小刊购买
+    public function pay()
+    {
+        if (!$this->user) {
+            //return $this->location('home');
+        }
+        $uid = $this->user['id'];
+
+        $buy_id = Dever::input('buy_id');
+        $journal_id = Dever::input('journal_id');
+
+        if (!$buy_id) {
+            Dever::alert('请传入正确的支付ID');
+        }
+        if (!$journal_id) {
+            Dever::alert('请传入正确的小刊ID');
+        }
+
+        $info = Dever::load('act/order')->getJournal($journal_id);
+        $buy = Dever::load('act/order')->getBuy($buy_id);
+
+        if (!$buy || !$info) {
+            Dever::alert('请传入正确的小刊ID');
+        }
+
+        $star = false;
+        if (Dever::input('star_id')) {
+            $star = $this->getStar();
+        }
+
+        $user = Dever::db('passport/user')->one($uid);
+        $wechat = Dever::db('passport/wechat')->one(array('uid' => $uid, 'type' => 2));
+
+        //$order_id = $this->createOrder('JP');
+        $order_data['cate_id'] = $this->cate;
+        //$order_data['order_id'] = $order_id;
+        $order_data['product_id'] = $journal_id;
+        if ($star) {
+            $order_data['star_id'] = $star['id'];
+        }
+        $order_data['buy_id'] = $buy_id;
+        $order_data['uid'] = $uid;
+
+        $order_data['type'] = 3;
+        $order_data['status'] = 1;
+        $order_data['name'] = $info['name'] . '-' . $buy['name'];
+        $order_data['buy_num'] = $buy['num'];
+
+        if (isset($buy['price']) && $buy['price'] && $buy['price'] > 0) {
+            $order_data['cash'] = $buy['price'];
+        } else {
+            $order_data['cash'] = $info['cash'] * $order_data['buy_num'];
+        }
+
+        $order_data['system'] = 2;
+        if ($this->source) {
+            $order_data['source'] = $this->source;
+        }
+
+        if ($this->seller) {
+            $order_data['seller_id'] = $this->seller;
+        }
+
+        $id = Dever::db('act/order_temp')->insert($order_data);
+
+        if (!$id) {
+            Dever::alert('支付失败');
+        }
+
+        $order_id = Dever::load('act/order')->createOrderId($order_data, $id);
+
+        //$param参数
+        $param['id'] = $journal_id;
+        $parma['buy'] = $buy_id;
+        $param['buy_num'] = $order_data['buy_num'];
+        $param['order_id'] = $id;
+        # 立刻创建兑换码
+        //$param['create'] = 1;
+        $refer = $this->url('pay', $param);
+        $refer = $this->url('codedetail', array('order_id' => $id, 'id' => $order_data['product_id']));
+        //$refer = 'callback.success';
+        $param = array
+        (
+            'account_id' => 2,
+            'project_id' => 2,
+            'uid' => $uid,
+            'username' => $user['username'],
+            'name' => $order_data['name'],
+            'cash' => $order_data['cash'],
+            //'cash' => '0.01',
+            'openid' => $wechat['openid'],
+            'product_id' => $journal_id . '-' . $buy_id,
+            'order_id' => $order_id,
+            'refer' => $refer
+        );
+
+        $result = array();
+        //$result = Dever::load('pay/api.page', $param);
+
+        # 直接支付成功
+        $send['pay_order_id'] = $order_id;
+        $send['pay_status'] = 2;
+        $send['pay_msg'] = 'yes';
+        Dever::load('act/lib/pay')->act_action($send);
+
+        return $result;
+    }
+}

+ 30 - 0
buy/src/Data.php

@@ -0,0 +1,30 @@
+<?php namespace Buy\Src;
+
+use Dever;
+
+# 未登录
+class Data extends Base
+{
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+    public function checkLogin()
+    {
+        //return $this->location('list');
+        if ($this->user) {
+            return $this->location('list');
+        } else {
+            return $this->location('auth');
+        }
+    }
+
+    public function checkLoginAuth()
+    {
+        //return $this->location('list');
+        if ($this->user) {
+            return $this->location('list');
+        }
+    }
+}

+ 21 - 0
buy/template/mobile/auth.php

@@ -0,0 +1,21 @@
+<?php
+
+$view
+
+->set('name', 'auth')
+
+->import('inc/head')
+
+//->fetch('.logo@src',    'buy/base.config#logo')
+
+->fetch('.topcont@check', 'buy/data.checkLoginAuth')
+
+->fetch('.topcont', 'buy/base.config#login_title')
+
+//->fetch('.ellipsis', 'buy/base.config#title')
+
+->fetch('.button@onclick', 'buy/base.config#login')
+
+->import('inc/foot')
+
+->display();

+ 35 - 0
buy/template/mobile/codedetail.php

@@ -0,0 +1,35 @@
+<?php
+
+$view
+
+->set('name', 'codedetail')
+
+->import('inc/head')
+
+->fetch('body@check', 'buy/data.checkLogin')
+
+->fetch('#code@src', 'buy/buy.code')
+->fetch('#product_name', 'buy/buy.product_name')
+
+->loop
+(
+    '.code-list .dl',
+    'buy/buy.code_detail',
+    array
+    (
+        '.p' => '$v.code',
+        '.span' => array
+        (
+            'class' => '$v.class',
+            'html' => '$v.txt',
+        ),
+        '.dt' => '$v.copy',
+    )
+)
+
+# 暂无记录
+->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".pages" dever-page-call="init()"></div>') 
+
+->import('inc/foot')
+
+->display();

+ 44 - 0
buy/template/mobile/home.php

@@ -0,0 +1,44 @@
+<?php
+
+$view
+
+->set('name', 'index') 
+
+->import('inc/head')
+->fetch('body@check', 'buy/data.checkLogin')
+->fetch(array('.tab@href', 0), 'buy/base.config#list_link')
+->fetch(array('.tab@href', 1), 'buy/base.config#my_link')
+
+# 循环
+->loop
+(
+    '.order',
+    'buy/buy.lists',
+    array
+    (
+        '.name' => '$v.name',
+        '.journal-no' => '$v.price',
+        'span' => '$v.pdate',
+
+        'img' => array
+        (
+            'src' => '$v.pic_gd',
+        ),
+
+        '.button' => array
+        (
+            'node-act' => '$v.act',
+            'data-src' => '$v.code',
+            'data-id' => '$v.id',
+            'html' => '$v.button'
+        )
+        
+    )
+)
+
+# 暂无记录
+->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".pages" dever-page-call="init()"></div>') 
+
+->import('inc/foot')
+
+->display();

+ 14 - 0
buy/template/mobile/inc/foot.php

@@ -0,0 +1,14 @@
+<?php
+
+$view
+
+->fetch(array('script@src', 0),     Dever::assets('global.js'))
+->fetch(array('script@src', 1),     Dever::assets('<{(isset($name) ? $name : "index")}>.js', 'js'))
+
+
+->append('body',    '<script src="'.Dever::assets('lib/jquery/jquery.min.js', 'script').'"></script>')
+->append('body',    '<script src="'.Dever::assets('dever/core.js', 'script').'"></script>')
+->append('body',    '<script src="'.Dever::assets('config.js').'"></script>')
+->append('body',    '<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>')
+
+;

+ 10 - 0
buy/template/mobile/inc/head.php

@@ -0,0 +1,10 @@
+<?php
+
+$view
+->fetch('title',                    '<{isset($title) ? $title . "_" . Dever::load("buy/base.config#title") : Dever::load("buy/base.config#title")}>')
+
+->fetch(array('link@href', 0),      Dever::assets("global.css"))
+->fetch(array('link@href', 1),      Dever::assets('<{(isset($name) ? $name : "index")}>.css', "css"))
+
+
+->append('head',    '<script><{Dever::script()}>config.uid=<{Dever::load("passport/user.data") ? Dever::load("passport/user.data#id") : -1}></script>');

+ 34 - 0
buy/template/mobile/list.php

@@ -0,0 +1,34 @@
+<?php
+
+$view
+
+->set('name', 'list')
+
+->import('inc/head')
+->fetch('body@check', 'buy/data.checkLogin')
+->fetch(array('.tab@href', 0), 'buy/base.config#list_link')
+->fetch(array('.tab@href', 1), 'buy/base.config#my_link')
+
+->loop
+(
+    '.order',
+    'buy/buy.lists_code',
+    array
+    (
+        '.order-time span' => '$v.cdate',
+        'a|0' => array
+        (
+            'href' => '$v.link',
+        ),
+        '.name' => '$v.name',
+        '.count' => '$v.desc',
+        
+    )
+)
+
+# 暂无记录
+->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".pages"></div>')
+
+->import('inc/foot')
+ 
+->display();

+ 30 - 0
buy/template/mobile/pay.php

@@ -0,0 +1,30 @@
+<?php
+
+$view
+
+->fetch('.tit', 'buy/buy.info#buy')
+
+->fetch('#tips', 'buy/buy.info#buy_desc')
+
+
+# 循环
+->loop
+(
+    '.item',
+    'buy/buy.buys',
+    array
+    (
+        'span|0' => '$v.name',
+        'span|1' => '$v.price',
+
+        'self' => array
+        (
+            'href' => 'javascript:;',
+            'class' => '$v.class', 
+            'data-pay' => '$v.pay_url',
+            'data-click' => 'pay(\'<{$v.pay_url}>\')',
+        ),
+    )
+)
+
+->display();

Some files were not shown because too many files changed in this diff