dever 6 vuotta sitten
vanhempi
commit
567092fbb6
44 muutettua tiedostoa jossa 1125 lisäystä ja 0 poistoa
  1. 20 0
      buy/assets/mobile/auth.html
  2. 111 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. 2 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/list.css
  10. 1 0
      buy/assets/mobile/css/list.css.map
  11. 2 0
      buy/assets/mobile/css/pay.css
  12. 1 0
      buy/assets/mobile/css/pay.css.map
  13. BIN
      buy/assets/mobile/images/ico-close.png
  14. BIN
      buy/assets/mobile/images/ico-code.png
  15. BIN
      buy/assets/mobile/images/list.png
  16. BIN
      buy/assets/mobile/images/logo.jpg
  17. BIN
      buy/assets/mobile/images/mag.png
  18. BIN
      buy/assets/mobile/images/qrcode.png
  19. 2 0
      buy/assets/mobile/js/auth.js
  20. 1 0
      buy/assets/mobile/js/auth.js.map
  21. 2 0
      buy/assets/mobile/js/codedetail.js
  22. 1 0
      buy/assets/mobile/js/codedetail.js.map
  23. 0 0
      buy/assets/mobile/js/global.js
  24. 0 0
      buy/assets/mobile/js/global.js.map
  25. 2 0
      buy/assets/mobile/js/index.js
  26. 1 0
      buy/assets/mobile/js/index.js.map
  27. 2 0
      buy/assets/mobile/js/list.js
  28. 1 0
      buy/assets/mobile/js/list.js.map
  29. 2 0
      buy/assets/mobile/js/pay.js
  30. 1 0
      buy/assets/mobile/js/pay.js.map
  31. 101 0
      buy/assets/mobile/list.html
  32. 71 0
      buy/assets/mobile/pay.html
  33. 10 0
      buy/index.php
  34. 134 0
      buy/src/Base.php
  35. 354 0
      buy/src/Buy.php
  36. 20 0
      buy/src/Data.php
  37. 19 0
      buy/template/mobile/home.php
  38. 14 0
      buy/template/mobile/inc/foot.php
  39. 10 0
      buy/template/mobile/inc/head.php
  40. 42 0
      buy/template/mobile/list.php
  41. 52 0
      buy/template/mobile/list_code.php
  42. 49 0
      buy/template/mobile/my_code.php
  43. 60 0
      buy/template/mobile/pay.php
  44. 32 0
      buy/template/mobile/success.php

+ 20 - 0
buy/assets/mobile/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>

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

@@ -0,0 +1,111 @@
+<!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>兑换码只能被激活一次,当您购买成功后,可进入小程序使用兑换码查看电子刊,若您购买了多本,可将剩余兑换码赠送好友。</p>
+    </div>
+    <div class="btn-wrap">
+        <a href="javascript:;" node-act="read" class="button black">阅读电子刊</a>
+    </div>
+    <div class="code-list">
+        <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>长按识别小程序阅读电子刊</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>
+    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();
+    });
+</script>
+</html>

+ 2 - 0
buy/assets/mobile/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=3f8cf811*/

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

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

+ 2 - 0
buy/assets/mobile/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=3f8cf811*/

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

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

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 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=3f8cf811","sourceRoot":""}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
buy/assets/mobile/css/list.css


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

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

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

@@ -0,0 +1,2 @@
+.container{padding:0 .4rem;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}.h1{font-size:.4rem;line-height:.64rem;padding:.53333rem 0 .4rem}.list .item{height:1.3333rem;border-radius:.1333rem;border:.0267rem solid #000;margin-bottom:.4rem;box-sizing:border-box;padding:0 .4rem;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;font-size:.4rem;color:#000}.list .item.active,.list .item:active{background-color:#cc1619;border-color:#cc1619;color:#fff}.buytip{font-size:.32rem;color:#999;text-decoration:underline;padding-bottom:.53333rem}.p{text-align:justify;display:block;box-sizing:border-box}.layer .title,.p{font-size:.4rem;line-height:.64rem;margin-bottom:.4rem}.layer .title{text-align:center}.layer .richtext{margin-bottom:.5333rem}.layer .richtext img{max-width:100%}.layer .button{width:4rem}.layer.buy-result{padding:0;padding-top:.9333rem}.layer.buy-result h3{margin-bottom:.69333rem}.layer.buy-result .res{text-align:center;margin-bottom:1.10667rem}.layer.buy-result .btn-wrapper{display:-ms-flexbox;display:flex}.layer.buy-result .btn-wrapper .button{border-radius:0}.layer.buy-result .btn-wrapper .button:first-child{border-top:1px solid #ccc;background-color:#fff;color:#000;box-sizing:border-box;border-radius:0 0 0 .06667rem}.layer.buy-result .btn-wrapper .button:last-child{border-radius:0 0 .06667rem 0}
+/*# sourceMappingURL=pay.css.map?v=3f8cf811*/

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

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

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


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


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


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


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


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


+ 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=3f8cf811

+ 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=3f8cf811","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=3f8cf811","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=3f8cf811

+ 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=3f8cf811","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=3f8cf811","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":""}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
buy/assets/mobile/js/global.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
buy/assets/mobile/js/global.js.map


+ 2 - 0
buy/assets/mobile/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/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/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=3f8cf811

+ 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","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=3f8cf811","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=3f8cf811","import './global';\nimport '../css/list.css';\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/list.js"],"sourceRoot":""}

+ 2 - 0
buy/assets/mobile/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=3f8cf811

+ 1 - 0
buy/assets/mobile/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=3f8cf811","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=3f8cf811","import './global';\nimport '../css/pay.css';\n\n\n\n// WEBPACK FOOTER //\n// ./mobile/src/router/pay.js"],"sourceRoot":""}

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

@@ -0,0 +1,101 @@
+<!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">
+        <div class="li active"><span>预购杂志</span></div>
+        <div class="li"><span>兑换码</span></div>
+    </div>
+    <div class="list" 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="list pages  fn-hide" 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>
+
+    <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=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();
+        })
+
+        $('#close').on('click',function(){
+            $('#layer').hide();
+        });
+
+    }
+    init();
+</script>
+</html>

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

@@ -0,0 +1,71 @@
+<!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" 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>
+    <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">您已成功购买1000本电子刊</div>
+            <div class="btn-wrapper">
+                <a href="codedetail.html" class="button">查看兑换码</a>
+                <div class="button" node-act="close">继续购买</div>
+            </div>
+        </div>
+    </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>
+    
+    $(document).on('click', '[bind-id="item"]', function(){
+        $(this).addClass('active').siblings('.item').removeClass('active');
+        $('#pay-layer').show();
+    });
+
+    $('#open').on('click',function(){
+        $('#layer').show();
+    });
+
+    $('[node-act="close"]').on('click',function(){
+        $(this).closest('.mask').hide();
+    });
+
+</script>
+</html>

+ 10 - 0
buy/index.php

@@ -0,0 +1,10 @@
+<?php
+
+# 启动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');

+ 134 - 0
buy/src/Base.php

@@ -0,0 +1,134 @@
+<?php namespace Service\Src;
+
+use Dever;
+
+class Base
+{
+    public $key = 'jmbuybuybuy';
+
+	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);
+        # 类型 1为直接购买 2为购买兑换码
+        $this->type = $this->getConfig('type', 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);
+        # 类型 1为直接购买 2为购买兑换码
+        $this->type = Dever::input('type', 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];
+        }
+        return $value;
+    }
+
+    # 获取基本配置
+    public function config()
+    {
+        $cate = Dever::db('journal/cate')->one($this->cate);
+
+        $cate['login_title'] = '登录后才可以使用' . $cate['name'] . '服务';
+
+        $cate['bglogo'] = 'background-image:url('.$cate['logo'].');';
+
+        $url = urlencode($this->url('list_code'));
+        $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('list_code');
+        $cate['my_link'] = $this->url('my_code');
+        return $cate;
+    }
+
+    # 生成url
+    protected function url($uri, $param = array(), $project = 'service')
+    {
+        if ($uri == 'list' && $this->type == 2) {
+            $uri = 'list_code';
+        }
+    	$send['cate'] = $this->cate;
+    	$send['source'] = $this->source;
+        $send['type'] = $this->type;
+        $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 = 'service')
+    {
+    	return Dever::location($this->url($uri, $param, $project));
+    }
+
+    protected function createOrder($prefix = 'JC')
+    {
+        $order = Dever::order($prefix);
+
+        //$order = Dever::rand(2, 2) . Dever::rand(6, 0);
+
+        $info = Dever::db('journal/order')->one(array('order_id' => $order));
+
+        if ($info) {
+            return $this->createOrder($prefix);
+        }
+
+        return $order;
+    }
+}

+ 354 - 0
buy/src/Buy.php

@@ -0,0 +1,354 @@
+<?php namespace Service\Src;
+
+use Dever;
+
+# 必须登录才能购买小刊
+class Buy extends Base
+{
+	public function __construct()
+    {
+    	parent::__construct();
+
+    	if (!$this->user) {
+    		return $this->location('home');
+    	}
+
+        if ($this->type == 1) {
+            $this->type = 2;
+            return $this->location('list');
+        }
+    }
+    
+    # 列表页
+    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) {
+            foreach ($data as $k => $v) {
+                if ($v['cash'] > 0) {
+                    $data[$k]['price'] = '¥' . number_format($v['cash'], 2);
+                } else {
+                    $data[$k]['price'] = '免费';
+                }
+
+                $data[$k]['ding'] = '销量:' . $v['num_ding'];
+
+                $data[$k]['pay_url'] = $this->url('pay', array('id' => $v['id']));
+
+                $data[$k]['pic_gd'] .= '?imageView2/2/w/375';
+            }
+        }
+
+        return $data;
+    }
+
+    # 列表页 我已购买的兑换码
+    public function lists_code()
+    {
+        $where['cate_id'] = $this->cate;
+        $where['create_uid'] = $this->user['id'];
+        //$where['type'] = 3;
+        $where['type'] = 4;
+        $data = Dever::db('code/info')->getAll($where);
+
+        if ($data) {
+            foreach ($data as $k => $v) {
+                $info = Dever::db('journal/info')->one($v['product_id']);
+
+                $data[$k]['code'] = str_replace("\n", '', trim($v['code']));
+
+                $data[$k]['code_string'] = '阅读码:' . trim($v['code']);
+
+                if ($v['type'] == 3) {
+                    $data[$k]['code_string'] .= ' 已兑换';
+                } else {
+                    $data[$k]['code_string'] .= ' <font style="color:red">未兑换</font>';
+                }
+
+                $data[$k]['name'] = $info['name'];
+
+                $data[$k]['pic_gd'] = $info['pic_gd'] ? $info['pic_gd'] : $info['pic_view_cover'];
+
+                $data[$k]['pic_gd'] .= '?imageView2/2/w/375';
+
+                //$data[$k]['code_pic'] = '';
+                $data[$k]['code_pic'] = $this->create_code($info['id']);
+            }
+        }
+
+        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']);
+        
+        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;
+
+        $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()
+    {
+        $config = Dever::db('main/config')->one(1);
+
+        $id = Dever::input('id');
+        $buy_id = Dever::input('buy');
+        $config['list'] = $this->url('list');
+        $config['buy'] = $this->url('pay', array('id' => $id));
+
+        $order_id = Dever::input('order_id');
+        $order = Dever::db('journal/order')->one($order_id);
+
+        if ($order['uid'] != $this->user['id']) {
+            $this->location('list');
+        }
+
+        $uid = $this->user['id'];
+
+        $code = Dever::load('code/lib/core')->createCodeByOrder($order);
+        if ($code) {
+            $update['where_id'] = $order['id'];
+            $order['code'] = $update['code'] = $code;
+            Dever::db('journal/order')->update($update);
+        }
+
+        $config['code_show'] = 'display:none;';
+        $config['button'] = '继续购买';
+        $config['button_node'] = '';
+        $config['button_span'] = '';
+        $config['reload'] = 1;
+        if ($order && $order['type'] == 3) {
+            $config['code_show'] = '';
+            $config['button_node'] = 'copy';
+            $order['code'] = str_replace("\n", '', trim($order['code']));
+            $config['button_span'] = $order['code'];
+            if (!$order['code']) {
+                $order['code'] = '生成中...';
+                $config['reload'] = 2;
+                $config['button_node'] = 'refresh';
+                $config['button_span'] = '';
+                $config['button'] = '刷新';
+                //$this->location('success', array('id' => $id, 'buy' => $buy_id, 'order_id' => $order_id));
+            } else {
+                $config['button'] = '继续购买<span>'.$order['code'].'</span>';
+            }
+            
+            $config['code'] = '<p class="single"><span>'.$order['code'].'</span></p>';
+            $buy = Dever::db('journal/buy_num')->one($buy_id);
+            if ($buy && $buy['code'] > 1) {
+                $uid = $this->user['id'];
+                $code = Dever::db('code/info')->state(array('create_uid' => $uid, 'order_id' => $order['order_id']));
+                $config['code'] = '<p>';
+                foreach ($code as $k => $v) {
+                    $config['code'] .= '<span>'.$v['code'].'</span>';
+                }
+                $config['code'] .= '</p>';
+            }
+        }
+
+        return $config;
+    }
+
+    # 小刊购买 一个兑换码的
+    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()
+    {
+        $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) {
+                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()
+    {
+        $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::db('journal/info')->one($journal_id);
+        $buy = Dever::db('journal/buy_num')->one($buy_id);
+
+        if (!$buy || !$info) {
+            Dever::alert('请传入正确的小刊ID');
+        }
+
+        if (!$buy['name']) {
+            $buy['name'] = '购买' . $buy['num'] . '本';
+        }
+
+        $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;
+        $order_data['buy_id'] = $buy_id;
+        $order_data['uid'] = $uid;
+
+        $order_data['type'] = 1;
+        $order_data['status'] = 1;
+        $order_data['name'] = $info['name'] . '-' . $buy['name'];
+        //$order_data['num'] = Dever::input('num', 1);
+        $order_data['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['num'];
+        }
+
+        $order_data['system'] = 2;
+        if ($this->source) {
+        	$order_data['source'] = $this->source;
+        }
+
+        if ($this->seller) {
+            $order_data['seller_id'] = $this->seller;
+        }
+
+        if ($this->type == 2) {
+            # 购买兑换码
+            $order_data['type'] = 3;
+        }
+
+        $id = Dever::db('journal/order')->insert($order_data);
+
+        if (!$id) {
+            Dever::alert('支付失败');
+        }
+
+        //$param参数
+        $refer = $this->url('success', array('id' => $journal_id, 'buy' => $buy_id, 'order_id' => $id));
+        $param = array
+        (
+            'account_id' => 2,
+            'project_id' => 1,
+            '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
+        );
+
+        return Dever::load('pay/api.page', $param);
+    }
+}

+ 20 - 0
buy/src/Data.php

@@ -0,0 +1,20 @@
+<?php namespace Service\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');
+        }
+    }
+}

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

@@ -0,0 +1,19 @@
+<?php
+
+$view
+
+->import('inc/head')
+
+->fetch('img@src',    'service/base.config#cover')
+
+->fetch('.txt@check', 'service/data.checkLogin')
+
+->fetch('.txt', 'service/base.config#login_title')
+
+->fetch('.ellipsis', 'service/base.config#title')
+
+->fetch('.button@onclick', 'service/base.config#login')
+
+->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("service/base.config#title") : Dever::load("service/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>');

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

@@ -0,0 +1,42 @@
+<?php
+
+$view
+
+->set('name', 'list')
+
+->import('inc/head')
+
+->fetch('.title', 'service/base.config#title')
+
+->fetch('.logo@style', 'service/base.config#bglogo')
+
+->fetch('.info-txt', 'service/base.config#desc')
+
+# 循环
+->loop
+(
+    '.item',
+    'service/buy.lists',
+    array
+    (
+        'h2' => '$v.name',
+        '.price' => '$v.price',
+
+        '.num' => '$v.ding',
+
+        'img' => array
+        (
+            'src' => '$v.pic_gd',
+        ),
+
+        '.button' => array
+        (
+            'onclick' => 'pay(\'<{$v.pay_url}>\')',
+        )
+        
+    )
+)
+
+->import('inc/foot')
+
+->display();

+ 52 - 0
buy/template/mobile/list_code.php

@@ -0,0 +1,52 @@
+<?php
+
+$view
+
+->set('name', 'list')
+
+->import('inc/head')
+
+->fetch(array('.title', 0), 'service/base.config#title')
+
+->fetch('.logo@style', 'service/base.config#bglogo')
+
+->fetch('.logo', 'service/base.config#name')
+
+->fetch('.info-txt', 'service/base.config#desc')
+
+//->fetch('.richtext', 'service/base.config#code_desc')
+
+->fetch(array('.tab .li@href', 0), 'service/base.config#list_link')
+->fetch(array('.tab .li@href', 1), 'service/base.config#my_link')
+
+# 循环
+->loop
+(
+    '.item',
+    'service/buy.lists',
+    array
+    (
+        'h2' => '$v.name',
+        '.price' => '$v.price',
+
+        '.num' => '$v.ding',
+
+        'img' => array
+        (
+            'src' => '$v.pic_gd',
+        ),
+
+        '.button' => array
+        (
+            'onclick' => 'pay(\'<{$v.pay_url}>\')',
+        )
+        
+    )
+)
+
+# 暂无记录
+->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".pages"></div>')
+
+->import('inc/foot')
+
+->display();

+ 49 - 0
buy/template/mobile/my_code.php

@@ -0,0 +1,49 @@
+<?php
+
+$view
+
+->set('name', 'list')
+
+->import('inc/head')
+
+->fetch(array('.title', 0), 'service/base.config#title')
+
+->fetch('.logo@style', 'service/base.config#bglogo')
+
+->fetch('.logo', 'service/base.config#name')
+
+->fetch('.info-txt', 'service/base.config#desc')
+
+//->fetch('.richtext', 'service/base.config#code_desc')
+->fetch(array('.tab .li@href', 0), 'service/base.config#list_link')
+->fetch(array('.tab .li@href', 1), 'service/base.config#my_link')
+
+->loop
+(
+    '.item2',
+    'service/buy.lists_code',
+    array
+    (
+        'img' => array
+        (
+            'src' => '$v.pic_gd',
+        ),
+        'h2' => '$v.name',
+        '.code' => '$v.code_string',
+
+        '.opposite' => array
+        (
+            'node-pic' => '$v.code_pic',
+        ),
+
+        'span' => '$v.code',
+        
+    )
+)
+
+# 暂无记录
+->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".pages"></div>')
+
+->import('inc/foot')
+
+->display();

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

@@ -0,0 +1,60 @@
+<?php
+
+$view
+
+->set('name', 'pay')
+
+->import('inc/head')
+
+->fetch('.h1', 'service/buy.info#buy')
+
+->fetch('.richtext', 'service/buy.info#buy_desc')
+
+->fetch('#notice', 'service/buy.info#buy_notice')
+->fetch('#notices', 'service/buy.info#buy_notices')
+
+# 循环
+->loop
+(
+    '.code',
+    'service/buy.buy',
+    array
+    (
+        'p|0' => '$v.name',
+        'p|1' => '$v.price',
+
+        'self' => array
+        (
+            'href' => 'javascript:;',
+            'onclick' => 'pay(\'<{$v.pay_url}>\')',
+        ),
+    )
+)
+
+# 循环
+->loop
+(
+    '.codes',
+    'service/buy.buys',
+    array
+    (
+        'p|0' => '$v.name',
+        'p|1' => '$v.price',
+
+        'self' => array
+        (
+            'href' => 'javascript:;',
+            'onclick' => 'pay(\'<{$v.pay_url}>\')',
+        ),
+    )
+)
+
+->fetch(array('script@src', 0),     Dever::assets('global.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>')
+
+->display();

+ 32 - 0
buy/template/mobile/success.php

@@ -0,0 +1,32 @@
+<?php
+
+$view
+
+->set('name', 'success')
+
+->import('inc/head')
+
+->fetch('.default@src', 'service/buy.code')
+
+->fetch(array('span', 0), 'service/base.config#name')
+
+->fetch(array('p', 0), 'service/base.config#name')
+
+->fetch('.opposite@href', 'service/buy.success#list')
+
+->fetch(array('.button@href', 1), 'service/buy.success#buy')
+
+->fetch('#code@style', 'service/buy.success#code_show')
+
+->fetch('#code .read', 'service/buy.success#code')
+
+->fetch(array('.button', 1), 'service/buy.success#button')
+
+//->fetch(array('.button@node-id', 1), 'service/buy.success#button_node')
+
+//->fetch(array('span', 1), 'service/buy.success#button_span')
+
+
+->import('inc/foot')
+
+->display();

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä