作者 Karson

前台采用RequireJS加载

修复压缩打包的BUG
移除无关的冗余数据
@@ -4,9 +4,7 @@ @@ -4,9 +4,7 @@
4 4
5 <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" /> 5 <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
6 <!-- Loading Bootstrap --> 6 <!-- Loading Bootstrap -->
7 -<link href="__CDN__/assets/build/backend.css?v={$Think.config.site.version}" rel="stylesheet">  
8 -  
9 -<link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico"> 7 +<link href="__CDN__/assets/{$Think.config.app_debug?'build/backend':'css/backend.min'}.css?v={$Think.config.site.version}" rel="stylesheet">
10 8
11 <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. --> 9 <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
12 <!--[if lt IE 9]> 10 <!--[if lt IE 9]>
1 -<script src="__CDN__/assets/js/require.js" data-main="__CDN__/assets/js/require-backend.js?v={$site.version}"></script>  
  1 +<script src="__CDN__/assets/js/require.js" data-main="__CDN__/assets/js/require-backend{$Think.config.app_debug?'':'.min'}.js?v={$site.version}"></script>
@@ -3,14 +3,17 @@ @@ -3,14 +3,17 @@
3 namespace app\common\controller; 3 namespace app\common\controller;
4 4
5 use app\common\library\Auth; 5 use app\common\library\Auth;
  6 +use app\common\model\Configvalue;
  7 +use think\Config;
6 use think\Controller; 8 use think\Controller;
  9 +use think\Lang;
7 10
8 class Frontend extends Controller 11 class Frontend extends Controller
9 { 12 {
10 13
11 /** 14 /**
12 * 15 *
13 - * @var \app\common\library\Auth 16 + * @var Auth
14 */ 17 */
15 protected $user = null; 18 protected $user = null;
16 19
@@ -44,6 +47,25 @@ class Frontend extends Controller @@ -44,6 +47,25 @@ class Frontend extends Controller
44 { 47 {
45 $this->view->engine->layout('layout/' . $this->layout); 48 $this->view->engine->layout('layout/' . $this->layout);
46 } 49 }
  50 +
  51 + // 语言检测
  52 + $lang = Lang::detect();
  53 +
  54 + // 配置信息
  55 + $config = [
  56 + 'site' => Config::get("site"),
  57 + 'upload' => Configvalue::upload(),
  58 + 'modulename' => $modulename,
  59 + 'controllername' => $controllername,
  60 + 'actionname' => $actionname,
  61 + 'jsname' => 'frontend/' . str_replace('.', '/', $controllername),
  62 + 'subdomain' => 0,
  63 + 'language' => $lang
  64 + ];
  65 + Lang::load(APP_PATH . $modulename . '/lang/' . $lang . '/' . str_replace('.', '/', $controllername) . '.php');
  66 +
  67 + $this->assign('site', Config::get("site"));
  68 + $this->assign('config', $config);
47 } 69 }
48 70
49 } 71 }
@@ -1643,147 +1643,4 @@ @@ -1643,147 +1643,4 @@
1643 </div> 1643 </div>
1644 </div> 1644 </div>
1645 1645
1646 -</div>  
1647 -  
1648 -<script type="text/javascript">  
1649 - $(function () {  
1650 - //Popover & Tooltip  
1651 - $('.bs-component [data-toggle="popover"]').popover();  
1652 - $('.bs-component [data-toggle="tooltip"]').tooltip();  
1653 -  
1654 - //Toastr  
1655 - var i = -1;  
1656 - var toastCount = 0;  
1657 - var $toastlast;  
1658 -  
1659 - var getMessage = function () {  
1660 - var msgs = ['My name is Inigo Montoya. You killed my father. Prepare to die!',  
1661 - '<div><input class="input-small" value="textbox"/>&nbsp;<a href="http://johnpapa.net" target="_blank">This is a hyperlink</a></div><div><button type="button" id="okBtn" class="btn btn-primary">Close me</button><button type="button" id="surpriseBtn" class="btn" style="margin: 0 8px 0 8px">Surprise me</button></div>',  
1662 - 'Are you the six fingered man?',  
1663 - 'Inconceivable!',  
1664 - 'I do not think that means what you think it means.',  
1665 - 'Have fun storming the castle!'  
1666 - ];  
1667 - i++;  
1668 - if (i === msgs.length) {  
1669 - i = 0;  
1670 - }  
1671 -  
1672 - return msgs[i];  
1673 - };  
1674 - $('#showtoast').click(function () {  
1675 - var shortCutFunction = $("#toastTypeGroup input:radio:checked").val();  
1676 - var msg = $('#message').val();  
1677 - var title = $('#title').val() || '';  
1678 - var $showDuration = $('#showDuration');  
1679 - var $hideDuration = $('#hideDuration');  
1680 - var $timeOut = $('#timeOut');  
1681 - var $extendedTimeOut = $('#extendedTimeOut');  
1682 - var $showEasing = $('#showEasing');  
1683 - var $hideEasing = $('#hideEasing');  
1684 - var $showMethod = $('#showMethod');  
1685 - var $hideMethod = $('#hideMethod');  
1686 - var toastIndex = toastCount++;  
1687 -  
1688 - toastr.options = {  
1689 - closeButton: $('#closeButton').prop('checked'),  
1690 - debug: $('#debugInfo').prop('checked'),  
1691 - positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right',  
1692 - onclick: null  
1693 - };  
1694 -  
1695 - if ($('#addBehaviorOnToastClick').prop('checked')) {  
1696 - toastr.options.onclick = function () {  
1697 - alert('You can perform some custom action after a toast goes away');  
1698 - };  
1699 - }  
1700 -  
1701 - if ($showDuration.val().length) {  
1702 - toastr.options.showDuration = $showDuration.val();  
1703 - }  
1704 -  
1705 - if ($hideDuration.val().length) {  
1706 - toastr.options.hideDuration = $hideDuration.val();  
1707 - }  
1708 -  
1709 - if ($timeOut.val().length) {  
1710 - toastr.options.timeOut = $timeOut.val();  
1711 - }  
1712 -  
1713 - if ($extendedTimeOut.val().length) {  
1714 - toastr.options.extendedTimeOut = $extendedTimeOut.val();  
1715 - }  
1716 -  
1717 - if ($showEasing.val().length) {  
1718 - toastr.options.showEasing = $showEasing.val();  
1719 - }  
1720 -  
1721 - if ($hideEasing.val().length) {  
1722 - toastr.options.hideEasing = $hideEasing.val();  
1723 - }  
1724 -  
1725 - if ($showMethod.val().length) {  
1726 - toastr.options.showMethod = $showMethod.val();  
1727 - }  
1728 -  
1729 - if ($hideMethod.val().length) {  
1730 - toastr.options.hideMethod = $hideMethod.val();  
1731 - }  
1732 -  
1733 - if (!msg) {  
1734 - msg = getMessage();  
1735 - }  
1736 -  
1737 - $("#toastrOptions").text("Command: toastr["  
1738 - + shortCutFunction  
1739 - + "](\""  
1740 - + msg  
1741 - + (title ? "\", \"" + title : '')  
1742 - + "\")\n\ntoastr.options = "  
1743 - + JSON.stringify(toastr.options, null, 2)  
1744 - );  
1745 -  
1746 - var $toast = toastr[shortCutFunction](msg, title); // Wire up an event handler to a button in the toast, if it exists  
1747 - $toastlast = $toast;  
1748 - if ($toast.find('#okBtn').length) {  
1749 - $toast.delegate('#okBtn', 'click', function () {  
1750 - alert('you clicked me. i was toast #' + toastIndex + '. goodbye!');  
1751 - $toast.remove();  
1752 - });  
1753 - }  
1754 - if ($toast.find('#surpriseBtn').length) {  
1755 - $toast.delegate('#surpriseBtn', 'click', function () {  
1756 - alert('Surprise! you clicked me. i was toast #' + toastIndex + '. You could perform an action here.');  
1757 - });  
1758 - }  
1759 - });  
1760 - function getLastToast() {  
1761 - return $toastlast;  
1762 - }  
1763 - $('#clearlasttoast').click(function () {  
1764 - toastr.clear(getLastToast());  
1765 - });  
1766 - $('#cleartoasts').click(function () {  
1767 - toastr.clear();  
1768 - });  
1769 - $(document).on("click", "#dialog-normal", function () {  
1770 - BootstrapDialog.show({  
1771 - title: 'Say-hello dialog',  
1772 - message: 'Hi Apple!'  
1773 - });  
1774 - });  
1775 - $(document).on("click", "#dialog-alert", function () {  
1776 - BootstrapDialog.alert('Hi Apple!');  
1777 - });  
1778 - $(document).on("click", "#dialog-confirm", function () {  
1779 - BootstrapDialog.confirm('Hi Apple, are you sure?', function (result) {  
1780 - if (result) {  
1781 - alert('Yup.');  
1782 - } else {  
1783 - alert('Nope.');  
1784 - }  
1785 - });  
1786 - });  
1787 -  
1788 - });  
1789 -</script>  
  1646 +</div>
@@ -146,13 +146,4 @@ @@ -146,13 +146,4 @@
146 </form> 146 </form>
147 </div> 147 </div>
148 <img src="" alt="" id='qrcodeimg' /> 148 <img src="" alt="" id='qrcodeimg' />
149 -</div>  
150 -<script>  
151 - $(function () {  
152 - $("form").submit(function () {  
153 - $("#qrcodeimg").prop("src", "{:url('demo/qrcode')}?" + $(this).serialize());  
154 - return false;  
155 - });  
156 - $("form").trigger('submit');  
157 - });  
158 -</script>  
  149 +</div>
@@ -6,29 +6,26 @@ @@ -6,29 +6,26 @@
6 <meta name="viewport" content="width=device-width, initial-scale=1"> 6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <meta name="description" content="基于ThinkPHP5和Bootstrap的极速后台开发系统"> 7 <meta name="description" content="基于ThinkPHP5和Bootstrap的极速后台开发系统">
8 <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" /> 8 <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
9 - <link href="__CDN__/assets/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>  
10 - <link href="__CDN__/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>  
11 - <link href="__CDN__/assets/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>  
12 - <link href="__CDN__/assets/libs/bootstrap3-dialog/dist/css/bootstrap-dialog.css" rel="stylesheet" type="text/css"/> 9 + <!-- Loading Bootstrap -->
  10 + <link href="__CDN__/assets/{$Think.config.app_debug?'build/frontend':'css/frontend.min'}.css?v={$Think.config.site.version}" rel="stylesheet">
13 11
14 <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> 12 <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
15 <!--[if lt IE 9]> 13 <!--[if lt IE 9]>
16 <script src="assets/js/html5shiv.js"></script> 14 <script src="assets/js/html5shiv.js"></script>
17 <script src="assets/js/respond.min.js"></script> 15 <script src="assets/js/respond.min.js"></script>
18 <![endif]--> 16 <![endif]-->
  17 + <script type="text/javascript">
  18 + var require = {
  19 + config: {
  20 + 'config': {$config|json_encode}
  21 + }
  22 + };
  23 + </script>
19 <style> 24 <style>
20 html{height:100%;overflow:auto;-webkit-overflow-scrolling: touch;} 25 html{height:100%;overflow:auto;-webkit-overflow-scrolling: touch;}
21 body{padding:70px 0;} 26 body{padding:70px 0;}
22 </style> 27 </style>
23 - <script src="__CDN__/assets/libs/jquery/dist/jquery.min.js" type="text/javascript"></script>  
24 - <script src="__CDN__/assets/libs/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>  
25 - <script src="__CDN__/assets/libs/bootstrap3-dialog/dist/js/bootstrap-dialog.min.js" type="text/javascript"></script>  
26 28
27 - <!--script>  
28 - var less=less || {};  
29 - less.env='development';  
30 - </script-->  
31 - <script src="__CDN__/assets/libs/less/dist/less.min.js" type="text/javascript"></script>  
32 <script> 29 <script>
33 var _hmt = _hmt || []; 30 var _hmt = _hmt || [];
34 (function () { 31 (function () {
@@ -64,5 +61,6 @@ @@ -64,5 +61,6 @@
64 61
65 {__CONTENT__} 62 {__CONTENT__}
66 63
  64 + <script src="__CDN__/assets/js/require.js" data-main="__CDN__/assets/js/require-frontend{$Think.config.app_debug?'':'.min'}.js?v={$site.version}"></script>
67 </body> 65 </body>
68 </html> 66 </html>
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 optimize: 'none', 4 optimize: 'none',
5 removeCombined: false, 5 removeCombined: false,
6 name: "require-backend", 6 name: "require-backend",
7 - include: ['css', 'layer', 'toastr', 'frontend', 'table', 'form', 'dragsort', 'drag', 'drop', 'addtabs'], 7 + include: ['css', 'layer', 'toastr', 'backend', 'table', 'form', 'dragsort', 'drag', 'drop', 'addtabs'],
8 out: "../js/require-backend.min.js", 8 out: "../js/require-backend.min.js",
9 packages: [{ 9 packages: [{
10 name: 'moment', 10 name: 'moment',
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min', 52 'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min',
53 'validator': '../libs/nice-validator/dist/local/zh-CN', 53 'validator': '../libs/nice-validator/dist/local/zh-CN',
54 'plupload': '../libs/plupload/js/plupload.min', 54 'plupload': '../libs/plupload/js/plupload.min',
55 - 'toastr': '../libs/toastr/toastr.min', 55 + 'toastr': '../libs/toastr/toastr',
56 'jstree': '../libs/jstree/dist/jstree.min', 56 'jstree': '../libs/jstree/dist/jstree.min',
57 'layer': '../libs/layer/src/layer', 57 'layer': '../libs/layer/src/layer',
58 'echarts': '../libs/echarts/dist/echarts.min', 58 'echarts': '../libs/echarts/dist/echarts.min',
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min', 52 'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min',
53 'validator': '../libs/nice-validator/dist/local/zh-CN', 53 'validator': '../libs/nice-validator/dist/local/zh-CN',
54 'plupload': '../libs/plupload/js/plupload.min', 54 'plupload': '../libs/plupload/js/plupload.min',
55 - 'toastr': '../libs/toastr/toastr.min', 55 + 'toastr': '../libs/toastr/toastr',
56 'jstree': '../libs/jstree/dist/jstree.min', 56 'jstree': '../libs/jstree/dist/jstree.min',
57 'layer': '../libs/layer/src/layer', 57 'layer': '../libs/layer/src/layer',
58 'echarts': '../libs/echarts/dist/echarts.min', 58 'echarts': '../libs/echarts/dist/echarts.min',
1 -body {  
2 - background: #f1f4f6;  
3 -}  
4 -.selection {  
5 - position: absolute;  
6 - border: 1px solid #8B9;  
7 - background-color: #BEC;  
8 -}  
9 -.note-dialog .modal {  
10 - z-index: 1060;  
11 -}  
12 -.bootstrap-dialog .modal-dialog {  
13 - /*width: 70%;*/  
14 - max-width: 885px;  
15 -}  
16 -#header {  
17 - background: #fff;  
18 - box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(0, 0, 0, 0.05);  
19 -}  
20 -.content-wrapper {  
21 - position: relative;  
22 -}  
23 -.tab-addtabs {  
24 - overflow: hidden;  
25 -}  
26 -.tab-addtabs .tab-pane {  
27 - height: 100%;  
28 - width: 100%;  
29 -}  
30 -/*  
31 - * RIBBON  
32 - */  
33 -#ribbon {  
34 - overflow: hidden;  
35 - padding: 15px 15px 0 15px;  
36 - position: relative;  
37 -}  
38 -#ribbon a {  
39 - color: #777 !important;  
40 - text-decoration: none !important;  
41 -}  
42 -#ribbon .breadcrumb {  
43 - display: inline-block;  
44 - margin: 0;  
45 - padding: 0;  
46 - background: none;  
47 - vertical-align: top;  
48 -}  
49 -#ribbon .breadcrumb > .active,  
50 -#ribbon .breadcrumb li:last-child {  
51 - color: #aaa;  
52 -}  
53 -#ribbon .shortcut a {  
54 - margin-left: 10px;  
55 -}  
56 -.is-dialog #main {  
57 - background: #fff;  
58 -}  
59 -.is-dialog form label {  
60 - font-weight: normal;  
61 -}  
62 -/*panel扩展描述样式*/  
63 -.panel-intro {  
64 - margin-bottom: 0;  
65 - border: none;  
66 -}  
67 -.panel-intro .panel-heading {  
68 - padding: 15px;  
69 - padding-bottom: 0;  
70 - background: #e8edf0;  
71 - border-color: #e8edf0;  
72 - position: relative;  
73 -}  
74 -.panel-intro .panel-heading .panel-lead {  
75 - margin-bottom: 15px;  
76 -}  
77 -.panel-intro .panel-heading .panel-lead em {  
78 - display: block;  
79 - font-weight: bold;  
80 - font-style: normal;  
81 -}  
82 -.panel-intro .panel-heading .panel-title {  
83 - height: 25px;  
84 - font-weight: normal;  
85 - white-space: nowrap;  
86 - overflow: hidden;  
87 - text-overflow: ellipsis;  
88 -}  
89 -.panel-intro .panel-heading .panel-control {  
90 - height: 42px;  
91 - position: absolute;  
92 - top: 8px;  
93 - right: 8px;  
94 -}  
95 -.panel-intro .panel-heading .panel-control .fa {  
96 - font-size: 14px;  
97 -}  
98 -.panel-intro .panel-heading .nav-tabs {  
99 - border-bottom: 0;  
100 - margin-bottom: 0;  
101 -}  
102 -.panel-intro .panel-heading .nav-tabs > li > a {  
103 - margin-right: 4px;  
104 - color: #95a5a6;  
105 - background-color: #d8e0e6;  
106 - border: 1px solid #e8edf0;  
107 - border-bottom-color: transparent;  
108 -}  
109 -.panel-intro .panel-heading .nav-tabs > li > a:hover,  
110 -.panel-intro .panel-heading .nav-tabs > li > a:focus {  
111 - border: 1px solid #e8edf0;  
112 - color: #7b8a8b;  
113 - background-color: #c9d4dc;  
114 -}  
115 -.panel-intro .panel-heading .nav-tabs > li.active > a,  
116 -.panel-intro .panel-heading .nav-tabs > li.active > a:hover,  
117 -.panel-intro .panel-heading .nav-tabs > li.active > a:focus {  
118 - color: #7b8a8b;  
119 - background-color: #ffffff;  
120 - border-bottom-color: transparent;  
121 - cursor: default;  
122 -}  
123 -/*单表格*/  
124 -.panel-tabs .panel-heading {  
125 - padding: 12px 15px 12px 15px;  
126 -}  
127 -.panel-tabs .panel-heading .panel-lead {  
128 - margin-bottom: 0px;  
129 -}  
130 -/*选项卡*/  
131 -.panel-nav .panel-heading {  
132 - padding: 0px;  
133 - padding-bottom: 0;  
134 - background: #f1f4f6;  
135 - border-color: #f1f4f6;  
136 -}  
137 -.panel-nav .nav-tabs > li > a {  
138 - padding: 12px 15px;  
139 - background-color: #e8edf0;  
140 - border: 1px solid #f1f4f6;  
141 -}  
142 -.panel-nav .nav-tabs > li > a:hover,  
143 -.panel-nav .nav-tabs > li > a:focus {  
144 - border: 1px solid #e8edf0;  
145 - background-color: #e8edf0;  
146 -}  
147 -.panel-nav .nav-tabs > li.active > a,  
148 -.panel-nav .nav-tabs > li.active > a:hover,  
149 -.panel-nav .nav-tabs > li.active > a:focus {  
150 - border-color: #f1f4f6;  
151 - border-bottom-color: transparent;  
152 -}  
153 -/*顶栏addtabs*/  
154 -.nav-addtabs {  
155 - border: none;  
156 -}  
157 -.nav-addtabs > li {  
158 - margin: 0;  
159 -}  
160 -.nav-addtabs > li > a {  
161 - height: 49px;  
162 - line-height: 49px;  
163 - padding: 0 15px;  
164 - border-radius: 0;  
165 - border: none;  
166 - border-right: 1px solid rgba(0, 0, 0, 0.05);  
167 - margin: 0;  
168 - color: #95a5a6;  
169 -}  
170 -.nav-addtabs > li > a:hover,  
171 -.nav-addtabs > li > a:focus {  
172 - border: none;  
173 - color: #2c3e50;  
174 - border-right: 1px solid rgba(0, 0, 0, 0.05);  
175 -}  
176 -.nav-addtabs > li > a i {  
177 - margin-right: 3px;  
178 -}  
179 -.nav-addtabs > li.active > a {  
180 - height: 49px;  
181 - line-height: 49px;  
182 - padding: 0 15px;  
183 - border-radius: 0;  
184 - border: none;  
185 - border-right: 1px solid rgba(0, 0, 0, 0.05);  
186 - background: #f1f4f6;  
187 - color: #2c3e50;  
188 - overflow: hidden;  
189 -}  
190 -.nav-addtabs > li.active > a:hover,  
191 -.nav-addtabs > li.active > a:focus {  
192 - border: none;  
193 - color: #2c3e50;  
194 - border-right: 1px solid rgba(0, 0, 0, 0.05);  
195 - background: #f1f4f6;  
196 -}  
197 -.nav-addtabs > li .close-tab {  
198 - font-size: 10px;  
199 - position: absolute;  
200 - right: 5px;  
201 - top: 50%;  
202 - margin-top: -7px;  
203 - z-index: 100;  
204 - cursor: hand;  
205 - cursor: pointer;  
206 - color: #fff;  
207 - display: none;  
208 -}  
209 -.nav-addtabs .open > a:hover,  
210 -.nav-addtabs .open > a:focus {  
211 - border-right: 1px solid rgba(0, 0, 0, 0.05);  
212 -}  
213 -.nav-addtabs ul li {  
214 - position: relative;  
215 -}  
216 -.nav-addtabs li:hover > .close-tab {  
217 - display: block;  
218 -}  
219 -#treeview .jstree-container-ul .jstree-node {  
220 - display: block;  
221 - clear: both;  
222 -}  
223 -#treeview .jstree-leaf:not(:first-child) {  
224 - float: left;  
225 - background: none;  
226 - margin-left: 0;  
227 - width: 80px;  
228 - clear: none;  
229 - color: #BBBDC3;  
230 -}  
231 -#treeview .jstree-leaf {  
232 - float: left;  
233 - margin-left: 0;  
234 - padding-left: 24px;  
235 - width: 80px;  
236 - clear: none;  
237 - color: #ccc;  
238 -}  
239 -#treeview .jstree-leaf > .jstree-icon,  
240 -#treeview .jstree-leaf .jstree-themeicon {  
241 - display: none;  
242 -}  
243 -#treeview .jstree-last {  
244 - background-image: url("../img/32px.png");  
245 - background-position: -292px -4px;  
246 - background-repeat: repeat-y;  
247 -}  
248 -#treeview .jstree-children:before,  
249 -#treeview .jstree-children:after {  
250 - content: " ";  
251 - display: table;  
252 -}  
253 -#treeview .jstree-children:after {  
254 - clear: both;  
255 -}  
256 -#treeview .jstree-children:before,  
257 -#treeview .jstree-children:after {  
258 - content: " ";  
259 - display: table;  
260 -}  
261 -#treeview .jstree-children:after {  
262 - clear: both;  
263 -}  
264 -#treeview .jstree-themeicon {  
265 - display: none;  
266 -}  
267 -/*去除bootstrap-table的边框*/  
268 -.fixed-table-container {  
269 - border: none!important;  
270 -}  
271 -.pjax-loader-bar .progress {  
272 - position: fixed;  
273 - top: 0;  
274 - left: 0;  
275 - height: 2px;  
276 - background: #77b6ff;  
277 - box-shadow: 0 0 10px rgba(119, 182, 255, 0.7);  
278 - -webkit-transition: width 0.4s ease;  
279 - transition: width 0.4s ease;  
280 -}  
281 -.dropdown-menu.text-left a,  
282 -.dropdown-menu.text-left li {  
283 - text-align: left!important;  
284 -}  
285 -.bootstrap-table .fixed-table-toolbar .dropdown-menu {  
286 - overflow: visible;  
287 -}  
288 -.bootstrap-table table tbody tr:first-child td .bs-checkbox {  
289 - vertical-align: middle;  
290 -}  
291 -.dropdown-submenu {  
292 - position: relative;  
293 -}  
294 -.dropdown-submenu > .dropdown-menu {  
295 - overflow: auto;  
296 - top: 0;  
297 - left: 100%;  
298 - margin-top: -6px;  
299 - margin-left: -1px;  
300 - -webkit-border-radius: 0 6px 6px 6px;  
301 - -webkit-background-clip: padding-box;  
302 - -moz-border-radius: 0 6px 6px 6px;  
303 - -moz-background-clip: padding;  
304 - border-radius: 0 6px 6px 6px;  
305 - background-clip: padding-box;  
306 -}  
307 -.dropdown-submenu:hover > .dropdown-menu {  
308 - display: block;  
309 -}  
310 -.dropdown-submenu:hover > a:after {  
311 - border-left-color: #fff;  
312 -}  
313 -.dropdown-submenu > a:after {  
314 - display: block;  
315 - content: " ";  
316 - float: right;  
317 - width: 0;  
318 - height: 0;  
319 - border-color: transparent;  
320 - border-style: solid;  
321 - border-width: 5px 0 5px 5px;  
322 - border-left-color: #ccc;  
323 - margin-top: 5px;  
324 - margin-right: -10px;  
325 -}  
326 -.dropdown-submenu.pull-left {  
327 - float: none;  
328 -}  
329 -.dropdown-submenu.pull-left > .dropdown-menu {  
330 - left: -100%;  
331 - margin-left: 10px;  
332 - -webkit-border-radius: 6px 0 6px 6px;  
333 - -webkit-background-clip: padding-box;  
334 - -moz-border-radius: 6px 0 6px 6px;  
335 - -moz-background-clip: padding;  
336 - border-radius: 6px 0 6px 6px;  
337 - background-clip: padding-box;  
338 -}  
339 -/*重写toast的几个背景色*/  
340 -.toast-primary {  
341 - background-color: #48c9b0!important;  
342 -}  
343 -.toast-success {  
344 - background-color: #2ecc71!important;  
345 -}  
346 -.toast-error {  
347 - background-color: #e74c3c!important;  
348 -}  
349 -.toast-info {  
350 - background-color: #5dade2!important;  
351 -}  
352 -.toast-warning {  
353 - background-color: #f1c40f!important;  
354 -}  
355 -.toast-inverse {  
356 - background-color: #34495e!important;  
357 -}  
358 -.toast-default {  
359 - background-color: #bdc3c7!important;  
360 -}  
361 -.layui-layer-title {  
362 - background: #2c3e50!important;  
363 - color: #fff!important;  
364 -}  
365 -/*避免出现多滚动条*/  
366 -.layui-layer-noborder {  
367 - border: none!important;  
368 - box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important;  
369 -}  
370 -.layui-layer-moves {  
371 - -webkit-box-sizing: content-box;  
372 - -moz-box-sizing: content-box;  
373 - box-sizing: content-box;  
374 -}  
375 -.layui-layer-iframe {  
376 - overflow: hidden!important;  
377 -}  
378 -.layui-layer-iframe .layui-layer-content {  
379 - -webkit-overflow-scrolling: touch;  
380 - overflow-y: hidden!important;  
381 - overflow: hidden;  
382 -}  
383 -/*自定义底部灰色操作区*/  
384 -.layui-layer-btn {  
385 - text-align: center!important;  
386 - padding: 10px!important;  
387 - background: #ecf0f1;  
388 -}  
389 -.layui-layer-footer {  
390 - padding: 8px 20px;  
391 - background-color: #ecf0f1;  
392 - height: auto;  
393 - text-align: inherit!important;  
394 -}  
395 -.layui-layer-btn a {  
396 - background-color: #95a5a6!important;  
397 - border-color: #95a5a6!important;  
398 - color: #fff!important;  
399 -}  
400 -.layui-layer-btn .layui-layer-btn0 {  
401 - background-color: #18bc9c!important;  
402 - border-color: #18bc9c!important;  
403 -}  
404 -.layui-layer-setwin {  
405 - top: 10px!important;  
406 -}  
407 -.layui-layer-setwin > a {  
408 - background: none!important;  
409 -}  
410 -.layui-layer-setwin > a cite {  
411 - display: none;  
412 -}  
413 -.layui-layer-setwin > a:after {  
414 - content: "\e625";  
415 - font-family: iconfont;  
416 - font-style: normal;  
417 - font-weight: normal;  
418 - text-decoration: inherit;  
419 - position: absolute;  
420 - font-size: 18px;  
421 - color: #fff;  
422 - margin: 0;  
423 - z-index: 1;  
424 -}  
425 -.layui-layer-setwin > a:hover {  
426 - text-decoration: none!important;  
427 - background: none!important;  
428 -}  
429 -.layui-layer-setwin > a:focus {  
430 - text-decoration: none!important;  
431 -}  
432 -.layui-layer-setwin .layui-layer-min:after {  
433 - content: "\e625";  
434 -}  
435 -.layui-layer-setwin .layui-layer-max:after {  
436 - content: "\e623";  
437 -}  
438 -.layui-layer-setwin .layui-layer-maxmin:after {  
439 - content: "\e624";  
440 -}  
441 -.layui-layer-setwin .layui-layer-close1:after {  
442 - content: "\e626";  
443 -}  
444 -/*手机版样式*/  
445 -@media (max-width: 480px) {  
446 - .nav-addtabs {  
447 - display: none;  
448 - }  
449 -}  
450 -/*平板样式*/  
451 -/*# sourceMappingURL=frontend-func.css.map */  
1 -body {  
2 - background: #ecf0f5;  
3 -}  
4 -.info-box {  
5 - z-index: 2;  
6 -}  
7 -.tips .col-xs-12 {  
8 - position: relative;  
9 -}  
10 -.headline {  
11 - color: #fff;  
12 - position: absolute;  
13 - top: -115px;  
14 - right: 10px;  
15 - z-index: -1;  
16 - font-size: 120px;  
17 - font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;  
18 - /* transform: rotate(90deg);  
19 - -webkit-transform: rotate(90deg);*/  
20 -}  
21 -.error-content p {  
22 - margin-bottom: 0;  
23 -}  
24 -h3 {  
25 - margin-top: 10px;  
26 -}  
27 -.tips {  
28 - float: none;  
29 - display: block;  
30 - margin: 150px auto;  
31 - max-width: 500px;  
32 -}  
33 -.tips .box {  
34 - padding: 19px 25px;  
35 - -webkit-box-shadow: none;  
36 - box-shadow: none;  
37 -}  
38 -.tips .media-left > span {  
39 - line-height: 1.72222;  
40 -}  
41 -.tips .media-left span {  
42 - font-size: 80px;  
43 - margin: 0 10px 0 0;  
44 -}  
45 -.tips .media-left span.fa-info-circle {  
46 - color: #5dade2;  
47 -}  
48 -.tips .media-left span.fa-times-circle {  
49 - color: #ec7063;  
50 -}  
51 -.tips .media-left span.fa-check-circle {  
52 - color: #1abc9c;  
53 -}  
54 -.tips .media-body {  
55 - margin-top: 25px;  
56 -}  
57 -.tips .media-body p {  
58 - margin-bottom: 10px;  
59 -}  
60 -.tips .media-heading {  
61 - margin: 15px 0 15px 0;  
62 - line-height: 30px;  
63 - font-weight: 400;  
64 -}  
65 -/*# sourceMappingURL=tips.min.css.map */  
1 -define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config', 'validator', 'adminlte'], function ($, undefined, Toastr, Layer, Lang, Config, undefined, AdminLTE) { 1 +define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($, undefined, Toastr, Layer, Lang, Config) {
2 var Backend = { 2 var Backend = {
3 config: { 3 config: {
4 //toastr默认配置 4 //toastr默认配置
  1 +define(['jquery', 'bootstrap', 'frontend', 'config'], function ($, undefined, Frontend, Config) {
  2 +
  3 + var Controller = {
  4 + qrcode: function () {
  5 + $("form").submit(function () {
  6 + $("#qrcodeimg").prop("src", (Config.subdomain == "1" ? '' : '/index') + "/demo/qrcode?" + $(this).serialize());
  7 + return false;
  8 + });
  9 + $("form").trigger('submit');
  10 + },
  11 + bootstrap: function () {
  12 + //Popover & Tooltip
  13 + $('.bs-component [data-toggle="popover"]').popover();
  14 + $('.bs-component [data-toggle="tooltip"]').tooltip();
  15 +
  16 + //Toastr
  17 + var i = -1;
  18 + var toastCount = 0;
  19 + var $toastlast;
  20 +
  21 + var getMessage = function () {
  22 + var msgs = ['My name is Inigo Montoya. You killed my father. Prepare to die!',
  23 + '<div><input class="input-small" value="textbox"/>&nbsp;<a href="http://johnpapa.net" target="_blank">This is a hyperlink</a></div><div><button type="button" id="okBtn" class="btn btn-primary">Close me</button><button type="button" id="surpriseBtn" class="btn" style="margin: 0 8px 0 8px">Surprise me</button></div>',
  24 + 'Are you the six fingered man?',
  25 + 'Inconceivable!',
  26 + 'I do not think that means what you think it means.',
  27 + 'Have fun storming the castle!'
  28 + ];
  29 + i++;
  30 + if (i === msgs.length) {
  31 + i = 0;
  32 + }
  33 +
  34 + return msgs[i];
  35 + };
  36 + $('#showtoast').click(function () {
  37 + var shortCutFunction = $("#toastTypeGroup input:radio:checked").val();
  38 + var msg = $('#message').val();
  39 + var title = $('#title').val() || '';
  40 + var $showDuration = $('#showDuration');
  41 + var $hideDuration = $('#hideDuration');
  42 + var $timeOut = $('#timeOut');
  43 + var $extendedTimeOut = $('#extendedTimeOut');
  44 + var $showEasing = $('#showEasing');
  45 + var $hideEasing = $('#hideEasing');
  46 + var $showMethod = $('#showMethod');
  47 + var $hideMethod = $('#hideMethod');
  48 + var toastIndex = toastCount++;
  49 +
  50 + Toastr.options = {
  51 + closeButton: $('#closeButton').prop('checked'),
  52 + debug: $('#debugInfo').prop('checked'),
  53 + positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right',
  54 + onclick: null
  55 + };
  56 +
  57 + if ($('#addBehaviorOnToastClick').prop('checked')) {
  58 + Toastr.options.onclick = function () {
  59 + alert('You can perform some custom action after a toast goes away');
  60 + };
  61 + }
  62 +
  63 + if ($showDuration.val().length) {
  64 + Toastr.options.showDuration = $showDuration.val();
  65 + }
  66 +
  67 + if ($hideDuration.val().length) {
  68 + Toastr.options.hideDuration = $hideDuration.val();
  69 + }
  70 +
  71 + if ($timeOut.val().length) {
  72 + Toastr.options.timeOut = $timeOut.val();
  73 + }
  74 +
  75 + if ($extendedTimeOut.val().length) {
  76 + Toastr.options.extendedTimeOut = $extendedTimeOut.val();
  77 + }
  78 +
  79 + if ($showEasing.val().length) {
  80 + Toastr.options.showEasing = $showEasing.val();
  81 + }
  82 +
  83 + if ($hideEasing.val().length) {
  84 + Toastr.options.hideEasing = $hideEasing.val();
  85 + }
  86 +
  87 + if ($showMethod.val().length) {
  88 + Toastr.options.showMethod = $showMethod.val();
  89 + }
  90 +
  91 + if ($hideMethod.val().length) {
  92 + Toastr.options.hideMethod = $hideMethod.val();
  93 + }
  94 +
  95 + if (!msg) {
  96 + msg = getMessage();
  97 + }
  98 +
  99 + $("#toastrOptions").text("Command: toastr["
  100 + + shortCutFunction
  101 + + "](\""
  102 + + msg
  103 + + (title ? "\", \"" + title : '')
  104 + + "\")\n\nToastr.options = "
  105 + + JSON.stringify(Toastr.options, null, 2)
  106 + );
  107 +
  108 + var $toast = Toastr[shortCutFunction](msg, title); // Wire up an event handler to a button in the toast, if it exists
  109 + $toastlast = $toast;
  110 + if ($toast.find('#okBtn').length) {
  111 + $toast.delegate('#okBtn', 'click', function () {
  112 + alert('you clicked me. i was toast #' + toastIndex + '. goodbye!');
  113 + $toast.remove();
  114 + });
  115 + }
  116 + if ($toast.find('#surpriseBtn').length) {
  117 + $toast.delegate('#surpriseBtn', 'click', function () {
  118 + alert('Surprise! you clicked me. i was toast #' + toastIndex + '. You could perform an action here.');
  119 + });
  120 + }
  121 + });
  122 + function getLastToast() {
  123 + return $toastlast;
  124 + }
  125 + $('#clearlasttoast').click(function () {
  126 + Toastr.clear(getLastToast());
  127 + });
  128 + $('#cleartoasts').click(function () {
  129 + Toastr.clear();
  130 + });
  131 + $(document).on("click", "#dialog-normal", function () {
  132 + BootstrapDialog.show({
  133 + title: 'Say-hello dialog',
  134 + message: 'Hi Apple!'
  135 + });
  136 + });
  137 + $(document).on("click", "#dialog-alert", function () {
  138 + BootstrapDialog.alert('Hi Apple!');
  139 + });
  140 + $(document).on("click", "#dialog-confirm", function () {
  141 + BootstrapDialog.confirm('Hi Apple, are you sure?', function (result) {
  142 + if (result) {
  143 + alert('Yup.');
  144 + } else {
  145 + alert('Nope.');
  146 + }
  147 + });
  148 + });
  149 + },
  150 + };
  151 + return Controller;
  152 +});
1 -define(['jquery', 'bootstrap', 'frontend', 'frontend-ebook', 'layer', 'config'], function ($, undefined, Frontend, Ebook, Layer, Config) {  
2 -  
3 - Ebook.setupMonthNav();  
4 - Ebook.setupFunctionNav();  
5 - Ebook.setupPlayWXVideo();  
6 - var Controller = {  
7 - index: function () {  
8 -  
9 - },  
10 - buynow: function () {  
11 - var pagecount = parseInt($("#pageCount").text()) + 1;  
12 - var nums = Math.max(1, parseInt($('#nums').val()));  
13 - var amount = 0;  
14 -  
15 - var get_amount = function () {  
16 - if ($('#printtype').val() == 'fourcolor')  
17 - {  
18 - amount = pagecount * parseFloat(Config.product['printtype.fourcolor.price']);  
19 - } else if ($('#printtype').val() == 'sixcolor') {  
20 - amount = pagecount * parseFloat(Config.product['printtype.sixcolor.price']);  
21 - }  
22 - if ($('#bindtype').val() == 'paperback') {  
23 - amount += parseFloat(Config.product['bindtype.paperback.price']) * parseFloat(Config.product['sale.discount']);  
24 - } else if ($('#bindtype').val() == 'hardback') {  
25 - amount += parseFloat(Config.product['bindtype.hardback.price']) * parseFloat(Config.product['sale.discount']);  
26 - }  
27 - amount = Math.floor(amount);  
28 - amount *= nums;  
29 - return amount;  
30 - }  
31 - var get_sale_amount = function () {  
32 - return Math.floor(get_amount() * parseFloat(Config.product['sale.discount']));  
33 - }  
34 -  
35 - var refreshamount = function () {  
36 - $('#total_amount').text('¥' + get_amount());  
37 - $('#sale_amount').text('¥' + get_sale_amount());  
38 - $('#sale_desc').text('');  
39 - }  
40 -  
41 - $("#buynow_form").submit(function () {  
42 - if (parseInt($('#pageCount').text()) < 20) {  
43 - layer.msg('您的作品少于20页不能装订成书,请补充内容重新提交。', {time: 3000, icon: 5});  
44 - return false;  
45 - } else if ($('#address').val() == '' || $('#receiver').val() == '' || $('#mobile').val() == '') {  
46 - layer.msg('收货地址、收件人和联系方式不能为空。', {time: 3000, icon: 5});  
47 - return false;  
48 - } else {  
49 - return true;  
50 - }  
51 - });  
52 - refreshamount();  
53 - //增减数量  
54 - $(document).on('click', 'span[data-type]', function () {  
55 - var spinnums = Math.max(parseInt($('#spinnums').val()), 1);  
56 - $('#spinnums').val($(this).data("type") == 'plus' ? spinnums + 1 : Math.max(spinnums - 1, 1));  
57 - $("input[name=nums]").val($('#spinnums').val());  
58 - nums = Math.max(parseInt($('#spinnums').val()), 1);  
59 - refreshamount();  
60 - $('.spin_minus').toggleClass('minus_disabled', parseInt($('#spinnums').val()) > 1);  
61 - });  
62 - //类型选择  
63 - $(document).on('click', 'span[data-value]', function () {  
64 - var parent = $(this).parent();  
65 - $("input", parent).val($(this).data("value"));  
66 - refreshamount();  
67 - $("span[data-value]", parent).removeClass("selected");  
68 - $(this).addClass("selected");  
69 - });  
70 - if (Config.invokejson) {  
71 - var onBridgeReady = function () {  
72 - WeixinJSBridge.invoke('editAddress', Config.invokejson,  
73 - function (res) {  
74 - if (res.err_msg == "edit_address:ok") {  
75 - $("input[name=address]").val(res.proviceFirstStageName + res.addressCitySecondStageName + res.addressCountiesThirdStageName + res.addressDetailInfo);  
76 - $("input[name=receiver]").val(res.userName);  
77 - $("input[name=mobile]").val(res.telNumber);  
78 - $.post('service/save_address', {  
79 - address: $("input[name=address]").val(), receiver: $("input[name=receiver]").val(), mobile: $("input[name=mobile]").val()  
80 - });  
81 - }  
82 - }  
83 - );  
84 - }  
85 - if (typeof WeixinJSBridge == "undefined") {  
86 - if (document.addEventListener) {  
87 - document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);  
88 - } else if (document.attachEvent) {  
89 - document.attachEvent('WeixinJSBridgeReady', onBridgeReady);  
90 - document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);  
91 - }  
92 - } else {  
93 - onBridgeReady();  
94 - }  
95 - }  
96 - $(".nav_bar .r_bar").html('<a class="btn btn-danger btn-block btn-submit" href="javascript:;"><span class="fa fa-check"></span>&nbsp;提交</a>');  
97 - $(document).on('click', '.btn-submit', function(){  
98 - $("#buynow_form").trigger('submit');  
99 - });  
100 - },  
101 - preview: function () {  
102 - window.imageLoaded = Ebook.imageLoaded;  
103 - $(".ebook_container").on("load", "img", function () {  
104 - $(this).parent().removeClass('img_loading');  
105 - });  
106 - require(['angular', 'angular-app', 'ngcontrol/preface', 'ngcontrol/preview'], function (angular, app) {  
107 - angular.bootstrap(document, ["App"]);  
108 - });  
109 -  
110 - },  
111 - shelf: function () {  
112 - require(['angular', 'angular-app', 'ngcontrol/shelf'], function (angular, app) {  
113 - angular.bootstrap(document, ["App"]);  
114 - });  
115 - },  
116 - order: function () {  
117 - require(['angular', 'angular-app', 'ngcontrol/order'], function (angular, app) {  
118 - angular.bootstrap(document, ["App"]);  
119 - });  
120 - },  
121 - design: function () {  
122 - require(['angular', 'angular-app', 'ngcontrol/design'], function (angular, app) {  
123 - angular.bootstrap(document, ["App"]);  
124 - });  
125 - },  
126 - preface: function () {  
127 - require(['angular', 'angular-app', 'ngcontrol/preface'], function (angular, app) {  
128 - angular.bootstrap(document, ["App"]);  
129 - });  
130 - },  
131 - make: function () {  
132 - require(['angular', 'angular-app', 'ngcontrol/common'], function (angular, app) {  
133 - angular.bootstrap(document, ["App"]);  
134 - });  
135 - },  
136 - import: function () {  
137 - require(['angular', 'angular-app', 'ngcontrol/common'], function (angular, app) {  
138 - angular.bootstrap(document, ["App"]);  
139 - });  
140 - },  
141 - choosemonth: function () {  
142 - $(document).on("click", "a.month_item", function () {  
143 - var month = $(this).text().substr(0, 2);  
144 - var year = $(this).closest(".month_list").prev().find(".pull-left").text().substr(0, 4);  
145 - var that = $(this);  
146 - layer.load(1);  
147 - $.ajax({  
148 - type: "POST",  
149 - url: "/service/" + ($(this).hasClass("deleted") ? "recover_month" : "delete_month"),  
150 - data: {"year": year, "month": month, "id": bookId},  
151 - success: function (response) {  
152 - if (response == "success") {  
153 - layer.closeAll('loading');  
154 - that.toggleClass('deleted');  
155 - } else {  
156 - layer.msg("操作失败");  
157 - }  
158 - },  
159 - error: function () {  
160 - layer.closeAll('loading');  
161 - layer.msg("操作失败");  
162 - }  
163 - });  
164 - });  
165 - $(document).on("click", ".title_year a", function () {  
166 - var year = $(this).parents().prev().text().substr(0, 4);  
167 - var that = $(this);  
168 - layer.load(1);  
169 - $.ajax({  
170 - type: "POST",  
171 - url: "/service/" + ($(this).hasClass("deleted") ? "recover_year" : "delete_year"),  
172 - data: {"year": year, "id": bookId},  
173 - success: function (response) {  
174 - if (response == "success") {  
175 - var months = $(that).closest(".title_year").next().find("li a")  
176 - if ($(that).hasClass("deleted")) {  
177 - months.removeClass("deleted");  
178 - } else {  
179 - months.addClass("deleted");  
180 - }  
181 - layer.closeAll('loading');  
182 - that.toggleClass('deleted');  
183 - } else {  
184 - layer.msg("操作失败");  
185 - }  
186 - },  
187 - error: function () {  
188 - layer.closeAll('loading');  
189 - layer.msg("操作失败");  
190 - }  
191 - });  
192 - });  
193 - },  
194 - additem: function () {  
195 - if (Ebook.isSupportLocalStorage())  
196 - {  
197 - try {  
198 - oldContent = localStorage.getItem(backupContentKey);  
199 - if (oldContent != null)  
200 - $('#msg_content').val(oldContent);  
201 - } catch (e) {  
202 - }  
203 - Ebook.backupEditContent();  
204 - }  
205 -  
206 - $('a#save_message').click(function () {  
207 - $('a#save_message').text('保存中...').addClass('disabled');  
208 - $.ajax({  
209 - type: "POST",  
210 - url: '/service/add_item/' + bookId,  
211 - data: $('#add_message').serialize(),  
212 - success: function (data) {  
213 - if (data == "success")  
214 - {  
215 - $('a#save_message').text('保存').removeClass('disabled');  
216 - alert('添加信息成功,您可以继续编写下一条。');  
217 - if (Ebook.isSupportLocalStorage()) {  
218 - if (timer != null)  
219 - clearTimeout(timer);  
220 - localStorage.removeItem(backupContentKey);  
221 - }  
222 - location.reload();  
223 - } else {  
224 - $('a#save_message').text('保存').removeClass('disabled');  
225 - alert("操作失败,请稍后重试");  
226 - }  
227 - },  
228 - error: function (jqXHR, textStatus, errorThrown)  
229 - {  
230 - $('a#save_message').text('保存').removeClass('disabled');  
231 - alert("操作失败,请稍后重试");  
232 - }  
233 - });  
234 - });  
235 - require(["dropzone", "mobiscroll"], function (Dropzone, undefined) {  
236 - $('#msg_time').mobiscroll().calendar({  
237 - controls: ['calendar', 'date', 'time'],  
238 - dateFormat: 'yy-mm-dd',  
239 - timeFormat: 'HH:ii:ss',  
240 - lang: 'zh',  
241 - yearSuffix: '年',  
242 - monthSuffix: '月',  
243 - daySuffix: '日',  
244 - display: 'bubble',  
245 - });  
246 - Dropzone.autoDiscover = false;  
247 - $("#upload_photo").dropzone({  
248 - paramName: "file",  
249 - url: Config.upload.uploadurl,  
250 - clickable: true,  
251 - maxFiles: 1000,  
252 - maxFilesize: 1000,  
253 - acceptedFiles: "image/*",  
254 - previewsContainer: "#upload_preview_area",  
255 - parallelUploads: 1,  
256 - dictMaxFilesExceeded: "已超过10张照片",  
257 - dictFileTooBig: "照片大小不能超过10M",  
258 - headers: {  
259 - 'Cache-Control': null,  
260 - 'X-Requested-With': null  
261 - },  
262 - params: {  
263 - 'policy': Config.upload.multipart.policy,  
264 - 'signature': Config.upload.multipart.signature,  
265 - 'ext-param': '123'  
266 - },  
267 - init: function () {  
268 - $(this.element).addClass("dropzone");  
269 - this.on("maxfilesreached", function (file) {  
270 - //this.removeFile(file);  
271 - });  
272 - this.on("sending", function (file) {  
273 - $('a#save_message').text('正在上传图片...').addClass('disabled');  
274 - });  
275 - this.on("success", function (file, data) {  
276 - var r = $.parseJSON(data);  
277 - if (r.code == 200) {  
278 - $('#add_message').append("<input type='hidden' name='photos[" + r['sign'] + "][url]' value='" + r['url'] + "'>");  
279 - $('#add_message').append("<input type='hidden' name='photos[" + r['sign'] + "][width]' value='" + r['image-width'] + "'>");  
280 - $('#add_message').append("<input type='hidden' name='photos[" + r['sign'] + "][height]' value='" + r['image-height'] + "'>");  
281 - }  
282 - });  
283 - this.on("queuecomplete", function (file) {  
284 - $('a#save_message').text('保存').removeClass('disabled');  
285 - });  
286 - this.on("error", function (file, errorMessage) {  
287 - layer.msg(errorMessage);  
288 - });  
289 - }  
290 - });  
291 - });  
292 - },  
293 - edit: function () {  
294 - var editImage = null;  
295 - var imageWidth = 0;  
296 - var imageHeight = 0;  
297 - var layerWidth = 800;  
298 - var layerHeight = 600;  
299 - var weixinVideoHint = true;  
300 - var checkCanDelete = function (item, id, delete_func) {  
301 - layer.open({  
302 - type: 0, //page层  
303 - title: '确认',  
304 - closeBtn: 0,  
305 - content: '该信息为<strong style="color:green;">微信小视频</strong>内容,电子书中点击<strong style="color:green;">绿色二维码</strong>可以预览视频。手机扫描成品书中二维码可播放视频(<strong style="color:red;">依赖微信服务</strong>)。<br>确认要删除此信息嘛?',  
306 - area: '200px',  
307 - btn: ['删除', '保留'],  
308 - yes: function (index, layero) {  
309 - deleteItem(item, id);  
310 - layer.close(index);  
311 - },  
312 - btn2: function (index, layero) {  
313 - layer.close(index);  
314 - }  
315 - });  
316 - weixinVideoHint = false;//弹出提示框只出现一次  
317 - };  
318 - var deletePhoto = function (item, photo_id) {  
319 - var item_id = item.closest(".msg_item").attr("id");  
320 - $.ajax({  
321 - type: "POST",  
322 - url: '/service/delete_photo/' + bookId,  
323 - data: {id: bookId, action: "delete_photo", item_id: item_id, photo_id: photo_id},  
324 - success: function (data) {  
325 - item.parent().fadeTo(300, 0, function () {  
326 - item.parent().remove();  
327 - });  
328 - },  
329 - error: function (jqXHR, textStatus, errorThrown)  
330 - {  
331 - alert("操作失败,请稍后重试");  
332 - }  
333 - });  
334 - };  
335 - var deleteItem = function (item, item_id) {  
336 - $.ajax({  
337 - url: '/service/delete_item/' + bookId,  
338 - type: "POST",  
339 - data: {id: bookId, action: "delete_item", item_id: item_id},  
340 - success: function (response) {  
341 - var remove_item = item.parent().parent().parent();  
342 - remove_item.fadeTo(300, 0, function () {  
343 - remove_item.remove();  
344 - });  
345 - },  
346 - error: function (jqXHR, textStatus, errorThrown)  
347 - {  
348 - alert("操作失败,请稍后重试");  
349 - }  
350 - });  
351 - };  
352 - var initDropzone = function (obj) {  
353 - obj.dropzone({  
354 - paramName: "file",  
355 - //url: "/service/upload_photo/" + bookId,  
356 - url: Config.upload.uploadurl,  
357 - clickable: true,  
358 - maxFiles: 1000,  
359 - maxFilesize: 1000,  
360 - acceptedFiles: "image/*",  
361 - previewsContainer: false,  
362 - parallelUploads: 1,  
363 - dictMaxFilesExceeded: "已超过10张照片",  
364 - dictFileTooBig: "照片大小不能超过10M",  
365 - headers: {  
366 - 'Cache-Control': null,  
367 - 'X-Requested-With': null  
368 - },  
369 - params: {  
370 - 'policy': Config.upload.multipart.policy,  
371 - 'signature': Config.upload.multipart.signature,  
372 - 'ext-param': '123'  
373 - },  
374 - init: function () {  
375 - $(this.element).addClass("dropzone");  
376 - this.old_addedfile = this.defaultOptions.addedfile;  
377 - this.on("addedfile", function (file) {  
378 - e = document.createElement('div');  
379 - $(e).addClass('msg_photo').addClass('dropzone').addClass('dropzone-previews');  
380 - file.wzw = e;  
381 - $(this.element).parent().before(e);  
382 - this.previewsContainer = e;  
383 - this.old_addedfile(file);  
384 - this.previewsContainer = false;  
385 - });  
386 - //this.on("uploadprogress", function(file, progress, bytesSent) {  
387 - //$(file.wzw).html(bytesSent);  
388 - //});  
389 - this.on("success", function (file, data) {  
390 - var template = '<div class="msg_photo" id="id_value"><a id="a_id_value" href="path_value"><img class="msg_photo_edit msg_photo_item" src="path_value"></a><a href="javascript:;" class="delete_photo"><span class="fa fa-close"></span></a></div>';  
391 - var r = $.parseJSON(data);  
392 - if (r.code == 200) {  
393 - var item_id = obj.closest(".msg_item").attr("id");  
394 - $.ajax({  
395 - type: "POST",  
396 - url: '/service/append_photo/' + bookId,  
397 - data: {id: bookId, action: "append_photo", item_id: item_id, width: r['image-width'], height: r['image-height'], url: r['url']},  
398 - dataType: 'json',  
399 - success: function (data) {  
400 - $(file.wzw).replaceWith($(template.replace(/id_value/g, data.id).replace(/path_value/g, Config.upload.cdnurl + r.url).replace(/a_id_value/g, 'a_' + data.id)));  
401 - },  
402 - error: function ()  
403 - {  
404 - layer.msg("操作失败,请稍后重试");  
405 - }  
406 - });  
407 -  
408 - } else {  
409 - layer.msg("上传图片失败,请重试");  
410 - }  
411 - });  
412 - this.on("error", function (file, errorMessage) {  
413 - layer.msg(errorMessage);  
414 - });  
415 - this.on("maxfilesreached", function (file) {  
416 - //this.removeFile(file);  
417 - });  
418 - }  
419 - });  
420 - };  
421 - $(document).on('click', '.msg_photo_item', function () {  
422 - var this_item = $(this);  
423 - var item_id = this_item.closest(".msg_item").attr("id");  
424 - var photo_id = $(this).parent().parent().attr('id');  
425 - var imageSrc = $(this).attr("src").split('!')[0];  
426 - var rotate = $(this).attr("data-rotate");  
427 - if (rotate == null)  
428 - rotate = 0;  
429 - var originalRotate = rotate;  
430 - var html = '<div class="editImageBox">\  
431 - <image id="wangzw" onload="rotate(getRotate())" data-rotate=' + rotate + ' src="' + imageSrc + '" height = "' + layerHeight * 5 / 7 + '">\  
432 - <a class="rotate_left_button" href="javascript:void(0)" onclick="javascript:turnLeft();"><span class="fa fa-rotate-left"></span> 向左旋转</a>\  
433 - <a class="rotate_right_button" href="javascript:void(0)" onclick="javascript:turnRight();"><span class="fa fa-rotate-right"></span> 向右旋转</a>\  
434 - </div>';  
435 - layer.open({  
436 - type: 1, //page层  
437 - area: [layerWidth + 'px', layerHeight + 'px'],  
438 - title: '编辑照片',  
439 - shade: 0.6, //遮罩透明度  
440 - moveType: false,  
441 - shift: -1, //0-6的动画形式,-1不开启  
442 - closeBtn: false,  
443 - btn: ['确定', '取消'],  
444 - content: html,  
445 - yes: function (index, layero) {  
446 - var rotate = getRotate();  
447 - if (rotate != originalRotate) {  
448 - var style = new Object();  
449 - style.rotate = rotate;  
450 - $.ajax({  
451 - type: "POST",  
452 - url: '/service/rotate_photo',  
453 - data: {id: bookId, action: "rotate_photo", item_id: item_id, photo_id: photo_id, style: JSON.stringify(style)},  
454 - success: function (data) {  
455 - $('#' + photo_id + ' img').attr('src', data).attr("data-rotate", rotate);  
456 - layer.close(index);  
457 - editImage = null;  
458 - },  
459 - error: function (jqXHR, textStatus, errorThrown)  
460 - {  
461 - alert("操作失败,请稍后重试");  
462 - }  
463 - });  
464 - } else {  
465 - layer.close(index);  
466 - editImage = null;  
467 - }  
468 - },  
469 - btn2: function (index) {  
470 - editImage = null;  
471 - return true;  
472 - }  
473 - });  
474 - return false;  
475 - });  
476 - $(document).on('click', '.delete_item', function () {  
477 - var this_item = $(this);  
478 - var cur_item_id = $(this).parent().parent().parent().attr('id');  
479 - if (weixinVideoHint && $('.wx_video', this_item.parent().parent()).length > 0) {  
480 - checkCanDelete(this_item, cur_item_id, deleteItem);  
481 - } else {  
482 - deleteItem(this_item, cur_item_id);  
483 - }  
484 - });  
485 - $(document).on('click', '.delete_photo', function () {  
486 - var this_item = $(this);  
487 - var photo_id = $(this).parent().attr('id');  
488 - if (weixinVideoHint && $('.wx_video', this_item.parent().parent()).length > 0) {  
489 - checkCanDelete(this_item, photo_id, deletePhoto);  
490 - } else {  
491 - deletePhoto(this_item, photo_id);  
492 - }  
493 - });  
494 - require(["dropzone", "mobiscroll"], function (Dropzone, undefined) {  
495 - Dropzone.autoDiscover = false;  
496 - initDropzone($(".upload_photo_form"));  
497 - });  
498 - $(document).on('click', '.edit_text', function () {  
499 - var edit_item = $(this);  
500 - var edit_item_id = $(this).parent().attr('id');  
501 - var defaut_val = $(this).parent().find('.message_edit').text();  
502 - layer.myPrompt({title: "修改信息文字", formType: 2, maxlength: 100000, value: defaut_val}, function (value, index, elem) {  
503 - if (true) {  
504 - $.ajax({  
505 - url: '/service/edit_text/' + bookId,  
506 - type: "POST",  
507 - data: {id: bookId, action: "edit_text", item_id: edit_item_id, content: value},  
508 - success: function (response)  
509 - {  
510 - edit_item.parent().find('.message_edit').text(value);  
511 - },  
512 - error: function (jqXHR, textStatus, errorThrown)  
513 - {  
514 - alert("保存失败,请稍后重试");  
515 - }  
516 - });  
517 - layer.close(index);  
518 - }  
519 - });  
520 - });  
521 - load_more_res_selector = ".ebook .msg_item";  
522 - load_more_end_string = "没有更多内容了...";  
523 - load_more_res_callback = function (res) {  
524 - initDropzone(res.find(".upload_photo_form"));  
525 - };  
526 - scroll_height_to_load = 50;  
527 - scroll_each_selector = ".msg_item";  
528 - scroll_each_callback = function ($item) {  
529 - $('#nav_title_content').text($item.find('.page_header_title').text());  
530 -  
531 - };  
532 - Ebook.setupDimension();  
533 - Ebook.setupLoadMore();  
534 - Ebook.setupScrolling();  
535 - if (isMobile) {  
536 - layerWidth = page_width;  
537 - layerHeight = page_height;  
538 - }  
539 -  
540 - window.getRotate = function () {  
541 - if (editImage == null) {  
542 - editImage = $("#wangzw")[0];  
543 - imageWidth = editImage.width;  
544 - imageHeight = editImage.height;  
545 - $("#wangzw").css("display", "none");  
546 - }  
547 - return Number(editImage.getAttribute("data-rotate")) || 0;  
548 - }  
549 - window.turnLeft = function () {  
550 - var r = getRotate();  
551 - r -= 90;  
552 - if (r < 0)  
553 - r = 270;  
554 - rotate(r);  
555 - }  
556 -  
557 - window.turnRight = function () {  
558 - var r = getRotate();  
559 - r += 90;  
560 - if (r >= 360)  
561 - r = 0;  
562 - rotate(r);  
563 - }  
564 -  
565 - window.rotate = function (r) {  
566 - //canvas旋转  
567 - if (editImage == null) {  
568 - editImage = $("#wangzw")[0];  
569 - imageWidth = editImage.width;  
570 - imageHeight = editImage.height;  
571 - $("#wangzw").css("display", "none");  
572 - }  
573 - var canvas = $("#canvas_wangzw")[0] || document.createElement("canvas");  
574 - canvas.width = layerWidth * 23 / 25;  
575 - canvas.height = layerHeight - 140;  
576 - canvasRate = canvas.height / canvas.width;  
577 - canvas.id = "canvas_wangzw";  
578 - //img.style.position = "absolute";  
579 - //img.style.visibility = "hidden";  
580 - context = canvas.getContext("2d");  
581 - x = 0, y = 0;  
582 - switch (r) {  
583 - case 0:  
584 - if (imageHeight / imageWidth > canvasRate)  
585 - {  
586 - drawHeight = canvas.height;  
587 - drawWidth = imageWidth * (drawHeight / imageHeight);  
588 - x = (canvas.width - drawWidth) / 2;  
589 - y = 0;  
590 - } else  
591 - {  
592 - drawWidth = canvas.width;  
593 - drawHeight = imageHeight * (drawWidth / imageWidth);  
594 - x = 0;  
595 - y = (canvas.height - drawHeight) / 2;  
596 - }  
597 - break;  
598 - case 90:  
599 - if (imageWidth / imageHeight > canvasRate)  
600 - {  
601 - drawWidth = canvas.height;  
602 - drawHeight = imageHeight * (drawWidth / imageWidth);  
603 - x = 0;  
604 - y = -(drawHeight + canvas.width) / 2;  
605 - } else  
606 - {  
607 - drawHeight = canvas.width;  
608 - drawWidth = imageWidth * (drawHeight / imageHeight);  
609 - x = (canvas.height - drawWidth) / 2;  
610 - y = -drawHeight;  
611 - }  
612 - break;  
613 - case 180:  
614 - if (imageHeight / imageWidth > canvasRate)  
615 - {  
616 - drawHeight = canvas.height;  
617 - drawWidth = imageWidth * (drawHeight / imageHeight);  
618 - x = -(drawWidth + canvas.width) / 2;  
619 - y = -drawHeight;  
620 - } else  
621 - {  
622 - drawWidth = canvas.width;  
623 - drawHeight = imageHeight * (drawWidth / imageWidth);  
624 - x = -drawWidth;  
625 - y = -(drawHeight + canvas.height) / 2;  
626 - }  
627 - break;  
628 - case 270:  
629 - if (imageWidth / imageHeight > canvasRate)  
630 - {  
631 - drawWidth = canvas.height;  
632 - drawHeight = imageHeight * (drawWidth / imageWidth);  
633 - x = -drawWidth;  
634 - y = (canvas.width - drawHeight) / 2;  
635 - } else  
636 - {  
637 - drawHeight = canvas.width;  
638 - drawWidth = imageWidth * (drawHeight / imageHeight);  
639 - x = -(drawWidth + canvas.height) / 2;  
640 - y = 0;  
641 - }  
642 - break;  
643 - }  
644 -  
645 - context.clearRect(0, 0, canvas.width, canvas.height);  
646 - context.save();  
647 - context.rotate(r * Math.PI / 180);  
648 - context.drawImage(editImage, x, y, drawWidth, drawHeight);  
649 - context.restore();  
650 - editImage.parentNode.insertBefore(canvas, editImage.parentNode.childNodes[0]);  
651 - editImage.setAttribute("data-rotate", r);  
652 - };  
653 - layer.myPrompt = function (options, yes) {  
654 - options = options || {};  
655 - if (typeof options === 'function')  
656 - yes = options;  
657 - var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input">' + (options.value || '') + '</textarea>' : function () {  
658 - return '<input type="' + (options.formType == 1 ? 'password' : 'text') + '" class="layui-layer-input" value="' + (options.value || '') + '">';  
659 - }();  
660 - return layer.open($.extend({  
661 - btn: ['&#x786E;&#x5B9A;', '&#x53D6;&#x6D88;'],  
662 - content: content,  
663 - skin: 'layui-layer-prompt',  
664 - success: function (layero) {  
665 - prompt = layero.find('.layui-layer-input');  
666 - prompt.focus();  
667 - }, yes: function (index) {  
668 - var value = prompt.val();  
669 - if (value.length > (options.maxlength || 500)) {  
670 - layer.tips('&#x6700;&#x591A;&#x8F93;&#x5165;' + (options.maxlength || 500) + '&#x4E2A;&#x5B57;&#x6570;', prompt, {tips: 1});  
671 - } else {  
672 - yes && yes(value, index, prompt);  
673 - }  
674 - }  
675 - }, options));  
676 - };  
677 - },  
678 - recyclebin: function () {  
679 - $(document).on('click', '.recover_item', function () {  
680 - var this_item = $(this);  
681 - var item_id = $(this).parent().parent().parent().attr('id');  
682 - $.ajax({  
683 - url: '/service/recover_item/' + bookId,  
684 - type: "POST",  
685 - data: {id: bookId, action: "recover_item", item_id: item_id},  
686 - success: function (response) {  
687 - var remove_item = this_item.parent().parent().parent();  
688 - remove_item.fadeTo(300, 0, function () {  
689 - remove_item.remove();  
690 - });  
691 - }  
692 - });  
693 - });  
694 - $(document).on('click', '.recover_photo', function () {  
695 - var this_item = $(this);  
696 - var item_id = $(this).parent().parent().parent().attr('id');  
697 - var photo_id = $(this).parent().attr('id');  
698 - $.ajax({  
699 - url: '/service/recover_photo/' + bookId,  
700 - type: "POST",  
701 - data: {id: bookId, action: "recover_photo", item_id: item_id, photo_id: photo_id},  
702 - success: function (response) {  
703 - if (this_item.parent().parent().find('.msg_photo').length == 1) {  
704 - this_item.parent().parent().parent().fadeTo(300, 0, function () {  
705 - this_item.parent().parent().parent().remove();  
706 - });  
707 - } else {  
708 - this_item.parent().fadeTo(300, 0, function () {  
709 - this_item.parent().remove();  
710 - });  
711 - }  
712 - }  
713 - });  
714 - });  
715 - }  
716 - };  
717 - return Controller;  
718 -});  
1 -define(['jquery', 'bootstrap', 'frontend', 'frontend-ebook', 'layer', 'config'], function ($, undefined, Frontend, Ebook, Layer, Config) {  
2 -  
3 - var Controller = {  
4 - index: function () {  
5 -  
6 - },  
7 - pay: function () {  
8 - this.info();  
9 - },  
10 - info: function () {  
11 - console.log(1332);  
12 - $(document).on('click', '#payorder', function () {  
13 - if (Config.invokejson) {  
14 - WeixinJSBridge.invoke('getBrandWCPayRequest', Config.invokejson,  
15 - function (res) {  
16 - if (res.err_msg == "get_brand_wcpay_request:ok") {  
17 - layer.msg('支付成功!', {}, function () {  
18 - location.href = "/ebook/shelf";  
19 - });  
20 - }  
21 - }  
22 - );  
23 - } else {  
24 - Layer.msg("请使用微信扫描上方二维码支付!");  
25 - }  
26 - });  
27 - $(document).on('click', '#deleteorder', function () {  
28 - var that = this;  
29 - layer.confirm('确认取消订单?', {  
30 - btn: ['确定', '取消'] //按钮  
31 - }, function () {  
32 - Layer.load();  
33 - $.ajax({  
34 - url: 'service/delete_order',  
35 - data: {id: $(that).attr("book-id"), order_id: $(that).attr("order-id")},  
36 - type: 'post',  
37 - success: function (ret) {  
38 - Layer.closeAll('loading');  
39 - if (ret == 'success') {  
40 - Layer.msg("取消订单成功!", {icon: 1}, function () {  
41 - location.href = '/ebook/shelf';  
42 - });  
43 - } else {  
44 - Ebook.popMessage("取消订单失败!");  
45 - }  
46 - }, error: function () {  
47 - Layer.closeAll('loading');  
48 - Ebook.popMessage("操作失败!请重试!");  
49 - }  
50 - })  
51 - }, function () {  
52 -  
53 - });  
54 -  
55 - });  
56 - if (Config.invokejson) {  
57 - var onBridgeReady = function () {  
58 - if (Config.paynow == 1) {  
59 - $('#payorder').trigger('click');  
60 - }  
61 - }  
62 - if (typeof WeixinJSBridge == "undefined") {  
63 - if (document.addEventListener) {  
64 - document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);  
65 - } else if (document.attachEvent) {  
66 - document.attachEvent('WeixinJSBridgeReady', onBridgeReady);  
67 - document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);  
68 - }  
69 - } else {  
70 - onBridgeReady();  
71 - }  
72 - } else {  
73 - if (Config.paynow == 1) {  
74 - $('#payorder').trigger('click');  
75 - }  
76 - }  
77 - }  
78 - };  
79 - return Controller;  
80 -});  
@@ -45,7 +45,7 @@ require.config({ @@ -45,7 +45,7 @@ require.config({
45 'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min', 45 'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min',
46 'validator': '../libs/nice-validator/dist/local/zh-CN', 46 'validator': '../libs/nice-validator/dist/local/zh-CN',
47 'plupload': '../libs/plupload/js/plupload.min', 47 'plupload': '../libs/plupload/js/plupload.min',
48 - 'toastr': '../libs/toastr/toastr.min', 48 + 'toastr': '../libs/toastr/toastr',
49 'jstree': '../libs/jstree/dist/jstree.min', 49 'jstree': '../libs/jstree/dist/jstree.min',
50 'layer': '../libs/layer/src/layer', 50 'layer': '../libs/layer/src/layer',
51 'echarts': '../libs/echarts/dist/echarts.min', 51 'echarts': '../libs/echarts/dist/echarts.min',
此 diff 太大无法显示。
@@ -45,7 +45,7 @@ require.config({ @@ -45,7 +45,7 @@ require.config({
45 'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min', 45 'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min',
46 'validator': '../libs/nice-validator/dist/local/zh-CN', 46 'validator': '../libs/nice-validator/dist/local/zh-CN',
47 'plupload': '../libs/plupload/js/plupload.min', 47 'plupload': '../libs/plupload/js/plupload.min',
48 - 'toastr': '../libs/toastr/toastr.min', 48 + 'toastr': '../libs/toastr/toastr',
49 'jstree': '../libs/jstree/dist/jstree.min', 49 'jstree': '../libs/jstree/dist/jstree.min',
50 'layer': '../libs/layer/src/layer', 50 'layer': '../libs/layer/src/layer',
51 'echarts': '../libs/echarts/dist/echarts.min', 51 'echarts': '../libs/echarts/dist/echarts.min',
此 diff 太大无法显示。