diff --git a/application/admin/view/auth.apply.html b/application/admin/view/auth.apply.html index a8b1386f1..b63e4af4b 100644 --- a/application/admin/view/auth.apply.html +++ b/application/admin/view/auth.apply.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="content"} @@ -39,21 +39,14 @@ callback: { beforeClick: function (treeId, treeNode) { if (treeNode.children.length < 1) { - window.roleForm.ztree.checkNode(treeNode, !treeNode.checked, null, true); - } else { - window.roleForm.ztree.expandNode(treeNode); - } - return false; - } - } - }; - this.listen(); - } + window.roleForm.ztree.checkNode(treeNode, !treeNode.checked, null, true);} else { + window.roleForm.ztree.expandNode(treeNode);} + return false;}}}; + this.listen();} showTree.prototype = { constructor: showTree, listen: function () { - this.getData(this); - }, + this.getData(this);}, getData: function (self) { $.msg.loading(); jQuery.get('{:url()}?id={$vo.id}', {action: 'getNode'}, function (ret) { @@ -67,42 +60,28 @@ children.name = data[i].title || data[i].node; children.checked = data[i].checked || false; children.children = renderChildren(data[i]._sub_, level + 1); - childrenData.push(children); - } - return childrenData; - } + childrenData.push(children);} + return childrenData;} self.data = renderChildren(ret.data, 1); - self.showTree(); - }, 'JSON'); - }, + self.showTree();}, 'JSON');}, showTree: function () { this.ztree = jQuery.fn.zTree.init(jQuery("#zTree"), this.setting, this.data); while (true) { var reNodes = this.ztree.getNodesByFilter(function (node) { - return (!node.node && node.children.length < 1); - }); + return (!node.node && node.children.length < 1);}); if (reNodes.length < 1) { - break; - } + break;} for (var i in reNodes) { - this.ztree.removeNode(reNodes[i]); - } - } - }, + this.ztree.removeNode(reNodes[i]);}}}, submit: function () { var nodes = []; var data = this.ztree.getCheckedNodes(true); for (var i in data) { - (data[i].node) && nodes.push(data[i].node); - } - $.form.load('{:url()}?id={$vo.id}&action=save', {nodes: nodes}, 'POST'); - } - }; + (data[i].node) && nodes.push(data[i].node);} + $.form.load('{:url()}?id={$vo.id}&action=save', {nodes: nodes}, 'POST');}}; window.roleForm = new showTree(); $('[data-submit-role]').on('click', function () { - window.roleForm.submit(); - }); - }); + window.roleForm.submit();});}); {/block} \ No newline at end of file diff --git a/application/admin/view/auth.index.html b/application/admin/view/auth.index.html index 1e83eb9d7..c741f22e2 100644 --- a/application/admin/view/auth.index.html +++ b/application/admin/view/auth.index.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="button"}
diff --git a/application/admin/view/config.file.html b/application/admin/view/config.file.html index 36deb149a..b4318ae9f 100644 --- a/application/admin/view/config.file.html +++ b/application/admin/view/config.file.html @@ -11,7 +11,7 @@ {if sysconf('storage_type')!=='qiniu'} - {else/} + {else} {/if} @@ -30,24 +30,24 @@
@@ -62,7 +62,7 @@ {if sysconf('storage_qiniu_is_https')!=='1'} - {else/} + {else} {/if} @@ -127,8 +127,6 @@ {/block} \ No newline at end of file diff --git a/application/admin/view/index.index.html b/application/admin/view/index.index.html index 9ba212db4..d8f8064fa 100644 --- a/application/admin/view/index.index.html +++ b/application/admin/view/index.index.html @@ -1,4 +1,4 @@ -{extend name="extra@admin/main" /} +{extend name="extra@admin/main"} {block name='body'} {include file="extra@admin/main/top"} diff --git a/application/admin/view/index.main.html b/application/admin/view/index.main.html index 28871abb7..e702533f8 100644 --- a/application/admin/view/index.main.html +++ b/application/admin/view/index.main.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="content"}
diff --git a/application/admin/view/log.index.html b/application/admin/view/log.index.html index fd1780fd8..30d19493c 100644 --- a/application/admin/view/log.index.html +++ b/application/admin/view/log.index.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="button"}
diff --git a/application/admin/view/login.index.html b/application/admin/view/login.index.html index 19e787b76..18d2a2ea8 100644 --- a/application/admin/view/login.index.html +++ b/application/admin/view/login.index.html @@ -87,16 +87,12 @@ {block name="script"} {/block} \ No newline at end of file diff --git a/application/admin/view/menu.form.html b/application/admin/view/menu.form.html index 67f801d86..35bcbc760 100644 --- a/application/admin/view/menu.form.html +++ b/application/admin/view/menu.form.html @@ -6,7 +6,7 @@ - + @@ -44,7 +44,6 @@ diff --git a/application/admin/view/menu.index.html b/application/admin/view/menu.index.html index 384d524b4..367622f65 100644 --- a/application/admin/view/menu.index.html +++ b/application/admin/view/menu.index.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="button"}
diff --git a/application/admin/view/node.index.html b/application/admin/view/node.index.html index 3e90e3325..03cc39831 100644 --- a/application/admin/view/node.index.html +++ b/application/admin/view/node.index.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="content"} @@ -26,7 +26,7 @@ {if substr_count($vo['node'],'/')==2} {notempty name='vo.is_auth'} - {else /} + {else} {/notempty} 加入权限控制 @@ -37,7 +37,7 @@ {if substr_count($vo['node'],'/')==2} {notempty name='vo.is_menu'} - {else/} + {else} {/notempty} 可设为菜单 @@ -55,15 +55,10 @@ $(function () { $('input.title-input').on('blur', function () { $.form.load('{:url("save")}', {name: this.name, value: this.value}, 'POST', function (ret) { - return false; - }); - }); + return false;});}); $('input.check-box').on('click', function () { $.form.load('{:url("save")}', {name: this.name, value: this.checked ? 1 : 0}, 'POST', function (ret) { - return false; - }); - }); - }); + return false;});});}); {/if} {/block} \ No newline at end of file diff --git a/application/admin/view/plugs.icon.html b/application/admin/view/plugs.icon.html index b7a41de47..606e86609 100644 --- a/application/admin/view/plugs.icon.html +++ b/application/admin/view/plugs.icon.html @@ -9,11 +9,11 @@ @@ -1908,23 +1908,16 @@ /* global top */ if (document.all) { document.onselectstart = function () { - return false; - }; - } else { + return false;};} else { document.onmouseup = document.onmousedown = function () { - return false; - }; - } + return false;};} document.onselectstart = new Function('event.returnValue=false;'); $('li').on('click', function () { var className = $(this).find('span.glyphicon,span.fa').get(0).className; if (className) { top.$('[name="{$field}"]').val(className).trigger('change'); var index = top.layer.getFrameIndex(window.name); - top.layer.close(index); - } - }); - }); + top.layer.close(index);}});}); diff --git a/application/admin/view/plugs.upfile.html b/application/admin/view/plugs.upfile.html index 5c50e3f94..781bef798 100644 --- a/application/admin/view/plugs.upfile.html +++ b/application/admin/view/plugs.upfile.html @@ -45,13 +45,11 @@ $('#' + file.id).attr('data-md5', file.md5).attr('data-src', url); /* {if $mode === 'one'} */ top.$('[name="{$field}"]').map(function () { - top.$(this).attr('data-srcs', ret.url).attr('data-md5', file.md5).val(url).trigger('change'); - }); + top.$(this).attr('data-srcs', ret.url).attr('data-md5', file.md5).val(url).trigger('change');}); //top.$.msg.tips('文件上传成功!'); var index = top.layer.getFrameIndex(window.name); top.layer.close(index); - /* {/if} {$mode}*/ - } + /* {/if} {$mode}*/} function confirmSelected() { var srcs = new Array(); @@ -59,26 +57,19 @@ $('[data-md5] .success').map(function () { var $li = $(this).parents('[data-md5]'); md5s.push($li.attr('data-md5')); - srcs.push($li.attr('data-src')); - }); + srcs.push($li.attr('data-src'));}); if (srcs.length < 1) { - return top.$.msg.tips('还没有选择文件,请勾选需要使用的文件!'); - } + return top.$.msg.tips('还没有选择文件,请勾选需要使用的文件!');} top.$('[name="{$field}"]').map(function () { - top.$(this).attr('data-srcs', srcs.join('|')).attr('data-md5', md5s.join('|')).val(srcs.join('|')).trigger('change'); - }); + top.$(this).attr('data-srcs', srcs.join('|')).attr('data-md5', md5s.join('|')).val(srcs.join('|')).trigger('change');}); var index = top.layer.getFrameIndex(window.name); - top.layer.close(index); - } + top.layer.close(index);} function completed() { var btnHTML = '完成上传'; $('.uploadBtn').on('click', function () { if (this.innerHTML === btnHTML) { - confirmSelected.call(this); - } - }).html(btnHTML); - } + confirmSelected.call(this);}}).html(btnHTML);} // 当domReady的时候开始初始化 $(function () { @@ -113,33 +104,24 @@ var support = true; data.onload = data.onerror = function () { if (this.width != 1 || this.height != 1) { - support = false; - } - }; + support = false;}}; data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; - return support; - }.call(this)), + return support;}.call(this)), /*检测是否已经安装flash,检测flash的版本*/ flashVersion = (function () { var version; try { version = navigator.plugins[ 'Shockwave Flash' ]; - version = version.description; - } catch (ex) { + version = version.description;} catch (ex) { try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); - } catch (ex2) { - version = '0.0'; - } - } + version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');} catch (ex2) { + version = '0.0';}} version = version.match(/\d+/g); - return parseFloat(version[ 0 ] + '.' + version[ 1 ], 10); - })(), + return parseFloat(version[ 0 ] + '.' + version[ 1 ], 10);})(), supportTransition = (function () { var s = document.createElement('p').style, r = 'transition' in s || 'WebkitTransition' in s || 'MozTransition' in s || 'msTransition' in s || 'OTransition' in s; s = null; - return r; - })(), + return r;})(), uploader; if (!WebUploader.Uploader.support('flash') && WebUploader.browser.ie) { /*flash 安装了但是版本过低*/ @@ -155,36 +137,27 @@ break; default: alert('安装已成功,请刷新!'); - break; - } - delete window['expressinstallcallback']; - }; + break;} + delete window['expressinstallcallback'];}; var swf = '__PUBLIC__/static/plugs/uploader/expressInstall.swf'; var html = '' + '' + '' + ''; - container.html(html); - })($wrap); - } else { - $wrap.html('get flash player'); - } - return; - } else if (!WebUploader.Uploader.support()) { + container.html(html);})($wrap);} else { + $wrap.html('get flash player');} + return;} else if (!WebUploader.Uploader.support()) { alert('Web Uploader 不支持您的浏览器!'); - return; - } + return;} WebUploader.Uploader.register({'before-send-file': 'preupload'}, {preupload: function (file) { var me = this, owner = this.owner, deferred = WebUploader.Deferred(); owner.md5File(file.source).fail(function () { - deferred.reject(); - }).then(function (md5) { + deferred.reject();}).then(function (md5) { file.md5 = md5; var data = {id: file.id, md5: md5, uptype: '{$uptype}', filename: file.name}; $.ajax("{:url('admin/plugs/upstate')}", {dataType: 'json', method: 'post', data: data, success: function (ret) { @@ -193,38 +166,29 @@ uploaded.call(uploader, ret.data, file); percentages[file.id] = [file.size, 1]; updateTotalProgress(); - console.log('文件秒传成功 --> ' + file.name); - } else { + console.log('文件秒传成功 --> ' + file.name);} else { file.md5 = md5; file.token = ret.data.token; file.key = ret.data.file_url; - me.options.server = ret.data.server; - } - deferred.resolve(); - } - }); - }); - return deferred.promise(); - } - }); + me.options.server = ret.data.server;} + deferred.resolve();}});}); + return deferred.promise();}}); // 实例化 uploader = WebUploader.create({ pick: { id: '#filePicker', label: '点击选择文件', - multiple: false - }, + multiple: false}, accept: { title: '选择文件', extensions: '{$types}', //'gif,jpg,jpeg,bmp,png', - mimeTypes: '{$mimes}' - }, + mimeTypes: '{$mimes}'}, formData: {}, /*{if $mode === 'one'}*/ fileNumLimit: 1, auto: true, - /* {else /} */ + /* {else} */ auto: false, fileNumLimit: 300, /* {/if} */ @@ -237,8 +201,7 @@ server: '{:url("admin/plugs/upload")}', disableGlobalDnd: true, fileSizeLimit: 200 * 1024 * 1024, // 200 M - fileSingleSizeLimit: 200 * 1024 * 1024 // 200 M - }); + fileSingleSizeLimit: 200 * 1024 * 1024 // 200 M}); /** * 处理上传后的结果 @@ -248,10 +211,8 @@ uploader.on('uploadAccept', function (fieldata, ret) { if (ret.code === 'SUCCESS') { uploaded.call(uploader, ret.data, fieldata.file); - return true; - } - return false; - }); + return true;} + return false;}); // 拖拽时不接受 js, txt 文件。 uploader.on('dndAccept', function (items) { @@ -260,11 +221,8 @@ for (var i = 0; i < len; i++) { if (~unAllowed.indexOf(items[ i ].type)) { denied = true; - break; - } - } - return !denied; - }); + break;}} + return !denied;}); /* 上传开始前的处理 */ uploader.on('uploadBeforeSend', function (file, data, header) { @@ -272,18 +230,15 @@ data['allowed_types'] = this.options.accept[0].extensions.split(',').join('|'); data['md5'] = file.file.md5; data['key'] = file.file.key; - data['token'] = file.file.token; - }); + data['token'] = file.file.token;}); // 添加“添加文件”的按钮, uploader.addButton({ id: '#filePicker2', - label: '继续添加' - }); + label: '继续添加'}); uploader.on('ready', function () { - window.uploader = uploader; - }); + window.uploader = uploader;}); // 当有文件添加进来时执行,负责view的创建 function addFile(file) { @@ -309,72 +264,51 @@ break; default: text = '上传失败,请重试'; - break; - } - $info.text(text).appendTo($li); - }; + break;} + $info.text(text).appendTo($li);}; if (file.getStatus() === 'invalid') { - showError(file.statusText); - } else { + showError(file.statusText);} else { // @todo lazyload $wrap.text('预览中'); uploader.makeThumb(file, function (error, src) { var img; if (error) { $wrap.text('不能预览'); - return; - } + return;} if (isSupportBase64) { img = $(''); - $wrap.empty().append(img); - } else { + $wrap.empty().append(img);} else { $.ajax('{"plugs/file/preview"|url}', {method: 'POST', data: src, dataType: 'json'}).done(function (response) { if (response.result) { img = $(''); - $wrap.empty().append(img); - } else { - $wrap.text("预览出错"); - } - }); - } - }, thumbnailWidth, thumbnailHeight); + $wrap.empty().append(img);} else { + $wrap.text("预览出错");}});}}, thumbnailWidth, thumbnailHeight); percentages[ file.id ] = [file.size, 0]; file.rotation = 0; - $upload.html('开始上传'); - } + $upload.html('开始上传');} file.on('statuschange', function (cur, prev) { if (prev === 'progress') { - $prgress.hide().width(0); - } else if (prev === 'queued') { + $prgress.hide().width(0);} else if (prev === 'queued') { $li.off('mouseenter mouseleave'); - $btns.remove(); - } + $btns.remove();} // 成功 if (cur === 'error' || cur === 'invalid') { showError(file.statusText); - percentages[ file.id ][ 1 ] = 1; - } else if (cur === 'interrupt') { - showError('interrupt'); - } else if (cur === 'queued') { - percentages[ file.id ][ 1 ] = 0; - } else if (cur === 'progress') { + percentages[ file.id ][ 1 ] = 1;} else if (cur === 'interrupt') { + showError('interrupt');} else if (cur === 'queued') { + percentages[ file.id ][ 1 ] = 0;} else if (cur === 'progress') { $info.remove(); - $prgress.css('display', 'block'); - } else if (cur === 'complete') { - $li.append(''); - } + $prgress.css('display', 'block');} else if (cur === 'complete') { + $li.append('');} - $li.removeClass('state-' + prev).addClass('state-' + cur); - }); + $li.removeClass('state-' + prev).addClass('state-' + cur);}); $li.on('mouseenter', function () { - $btns.stop().animate({height: 30}); - }); + $btns.stop().animate({height: 30});}); $li.on('mouseleave', function () { - $btns.stop().animate({height: 0}); - }); + $btns.stop().animate({height: 0});}); $btns.on('click', 'span', function () { var index = $(this).index(), deg; @@ -387,62 +321,47 @@ break; case 2: file.rotation -= 90; - break; - } + break;} if (supportTransition) { deg = 'rotate(' + file.rotation + 'deg)'; - $wrap.css({'-webkit-transform': deg, '-mos-transform': deg, '-o-transform': deg, 'transform': deg}); - } else { - $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')'); - } - }); - $li.appendTo($queue); - } + $wrap.css({'-webkit-transform': deg, '-mos-transform': deg, '-o-transform': deg, 'transform': deg});} else { + $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')');}}); + $li.appendTo($queue);} // 负责view的销毁 function removeFile(file) { var $li = $('#' + file.id); delete percentages[ file.id ]; updateTotalProgress(); - $li.off().find('.file-panel').off().end().remove(); - } + $li.off().find('.file-panel').off().end().remove();} function updateTotalProgress() { var loaded = 0, total = 0, spans = $progress.children(), percent; $.each(percentages, function (k, v) { total += v[ 0 ]; - loaded += v[ 0 ] * v[ 1 ]; - }); + loaded += v[ 0 ] * v[ 1 ];}); percent = total ? loaded / total : 0; spans.eq(0).text(Math.round(percent * 100) + '%'); spans.eq(1).css('width', Math.round(percent * 100) + '%'); - updateStatus(); - } + updateStatus();} function updateStatus() { var text = '', stats; if (state === 'ready') { - text = '选中' + fileCount + '个文件,共' + WebUploader.formatSize(fileSize) + '。'; - } else if (state === 'confirm') { + text = '选中' + fileCount + '个文件,共' + WebUploader.formatSize(fileSize) + '。';} else if (state === 'confirm') { stats = uploader.getStats(); if (stats.uploadFailNum) { - text = '已成功上传' + stats.successNum + '个文件,' + stats.uploadFailNum + '个文件上传失败,重新上传失败文件' - } - } else { + text = '已成功上传' + stats.successNum + '个文件,' + stats.uploadFailNum + '个文件上传失败,重新上传失败文件'}} else { stats = uploader.getStats(); text = '共' + fileCount + '个(' + WebUploader.formatSize(fileSize) + '),已上传' + stats.successNum + '个'; if (stats.uploadFailNum) { - text += ',失败' + stats.uploadFailNum + '个'; - } - } - $info.html(text); - } + text += ',失败' + stats.uploadFailNum + '个';}} + $info.html(text);} function setState(val) { var file, stats; if (val === state) { - return; - } + return;} $upload.removeClass('state-' + state); $upload.addClass('state-' + val); state = val; @@ -476,51 +395,41 @@ stats = uploader.getStats(); if (stats.successNum && !stats.uploadFailNum) { setState('finish'); - return; - } + return;} break; case 'finish': stats = uploader.getStats(); if (stats.successNum) { - completed.call(this); - } else { + completed.call(this);} else { // 没有成功的文件,重设 state = 'done'; - location.reload(); - } - break; - } - updateStatus(); - } + location.reload();} + break;} + updateStatus();} uploader.onUploadProgress = function (file, percentage) { var $li = $('#' + file.id), $percent = $li.find('.progress span'); $percent.css('width', percentage * 100 + '%'); percentages[ file.id ][ 1 ] = percentage; - updateTotalProgress(); - }; + updateTotalProgress();}; uploader.onFileQueued = function (file) { fileCount++; fileSize += file.size; if (fileCount === 1) { $placeHolder.addClass('element-invisible'); - $statusBar.show(); - } + $statusBar.show();} addFile(file); setState('ready'); - updateTotalProgress(); - }; + updateTotalProgress();}; uploader.onfieldequeued = function (file) { fileCount--; fileSize -= file.size; if (!fileCount) { - setState('pedding'); - } + setState('pedding');} removeFile(file); - updateTotalProgress(); - }; + updateTotalProgress();}; uploader.on('all', function (type) { switch (type) { @@ -532,34 +441,24 @@ break; case 'stopUpload': setState('paused'); - break; - } - }); + break;}}); uploader.onError = function (code) { - //alert('Eroor: ' + code); - }; + //alert('Eroor: ' + code);}; $upload.on('click', function () { if ($(this).hasClass('disabled')) { - return false; - } + return false;} if (state === 'ready') { - uploader.upload(); - } else if (state === 'paused') { - uploader.upload(); - } else if (state === 'uploading') { - uploader.stop(); - } - }); + uploader.upload();} else if (state === 'paused') { + uploader.upload();} else if (state === 'uploading') { + uploader.stop();}}); $info.on('click', '.retry', function () { - uploader.retry(); - }); + uploader.retry();}); $upload.addClass('state-' + state); - updateTotalProgress(); - }); + updateTotalProgress();}); diff --git a/application/admin/view/user.auth.html b/application/admin/view/user.auth.html index 5f30b7283..ab47d7aea 100644 --- a/application/admin/view/user.auth.html +++ b/application/admin/view/user.auth.html @@ -5,7 +5,7 @@
{if $vo and $vo.username} - {else/} + {else} {/if}
@@ -17,7 +17,7 @@ {foreach $authorizes as $authorize} {if in_array($authorize['id'],$vo['authorize'])} - {else/} + {else} {/if} {/foreach} diff --git a/application/admin/view/user.form.html b/application/admin/view/user.form.html index b7a581233..d9345ae52 100644 --- a/application/admin/view/user.form.html +++ b/application/admin/view/user.form.html @@ -5,7 +5,7 @@
{if $vo and isset($vo.username)} - {else/} + {else} {/if}
@@ -32,7 +32,7 @@ {foreach $authorizes as $authorize} {if in_array($authorize['id'],$vo['authorize'])} - {else/} + {else} {/if} {/foreach} diff --git a/application/admin/view/user.index.html b/application/admin/view/user.index.html index cc3a0b7d6..07423278b 100644 --- a/application/admin/view/user.index.html +++ b/application/admin/view/user.index.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="button"}
diff --git a/application/admin/view/user.pass.html b/application/admin/view/user.pass.html index f2d0be21a..759e4f883 100644 --- a/application/admin/view/user.pass.html +++ b/application/admin/view/user.pass.html @@ -5,7 +5,7 @@
{if $vo and $vo.username} - {else/} + {else} {/if}
diff --git a/application/config.php b/application/config.php index 3c7b67c91..200dfed66 100644 --- a/application/config.php +++ b/application/config.php @@ -158,7 +158,7 @@ return [ // 日志保存目录 'path' => LOG_PATH, // 日志记录级别 log,error,info,sql,notice,alert,debug - 'level' => ['error','log','sql','notice','alert','debug'], + 'level' => ['error', 'log', 'sql', 'notice', 'alert', 'debug'], // error和sql日志单独记录 'apart_level' => ['error', 'sql'], ], diff --git a/application/extra/view/admin.main.top.html b/application/extra/view/admin.main.top.html index b4d4adf1f..c2f0fba57 100644 --- a/application/extra/view/admin.main.top.html +++ b/application/extra/view/admin.main.top.html @@ -12,7 +12,7 @@ class="topbar-home-link topbar-btn topbar-left"> {notempty name='$pmenu.icon'}{/notempty} {$pmenu.title} - {else/} + {else} {notempty name='$pmenu.icon'}{/notempty} {$pmenu.title} diff --git a/application/wechat/view/config.index.html b/application/wechat/view/config.index.html index bf748edae..c48cf4714 100644 --- a/application/wechat/view/config.index.html +++ b/application/wechat/view/config.index.html @@ -1,14 +1,12 @@ {extend name="extra@admin/content"} {block name="content"} -
+
- +

请复制此URL地址填写在公众号平台 [ 开发 >> 基本配置 ] 中 [ URL ( 服务器地址 ) ]
注意:URL主域名必需备案,微信服务接口只支持 80 端口 ( http ) 和 443 端口 ( https ) @@ -21,9 +19,8 @@

- +

公众号应用ID是所有接口必要参数,可以在公众号平台 [ 开发 >> 基本配置 ] 页面获取。

@@ -36,8 +33,7 @@
+ maxlength="32" pattern="^[0-9a-z]{32}$" class="layui-input">

公众号应用密钥是所有接口必要参数,可以在公众号平台 [ 开发 >> 基本配置 ] 页面授权后获取。

@@ -49,8 +45,7 @@
+ placeholder="Token(令牌)" value="{:sysconf('wechat_token')}" class="layui-input">

公众号平台与系统对接认证Token,请优先填写此参数并保存,然后再在微信公众号平台操作对接。

@@ -77,6 +72,7 @@
+ {/block} diff --git a/application/wechat/view/config.pay.html b/application/wechat/view/config.pay.html index fd93a7e6e..a6b2c7d58 100644 --- a/application/wechat/view/config.pay.html +++ b/application/wechat/view/config.pay.html @@ -5,13 +5,11 @@ .pay-qrc-test { height: 248px; width: 248px; - background: url('__PUBLIC__/static/plugs/layui/css/modules/layer/default/loading-2.gif') no-repeat center center - } + background: url('__PUBLIC__/static/plugs/layui/css/modules/layer/default/loading-2.gif') no-repeat center center} .refund-qrc-test { text-align: center; - padding: 8px - } + padding: 8px} {/block} @@ -55,7 +53,7 @@ type="button" class="layui-btn layui-btn-primary"> {if file_exists(sysconf('wechat_cert_key'))} 已上传 apiclient_key.pem - {else/} + {else} 请上传 apiclient_key.pem {/if} @@ -63,7 +61,7 @@ type="button" class="layui-btn layui-btn-primary"> {if file_exists(sysconf('wechat_cert_cert'))} 已上传 apiclient_cert.pem - {else/} + {else} 请上传 apiclient_cert.pem {/if} @@ -93,8 +91,7 @@ /*! 证书上传动作 */ $('[name="wechat_cert_key_md5"],[name="wechat_cert_cert_md5"]').on('change', function () { this.value = $(this).attr('data-md5'); - $('[data-field="' + this.name + '"]').html('已选择 ' + this.title); - }); + $('[data-field="' + this.name + '"]').html('已选择 ' + this.title);}); var isShow = false; var timer = null; @@ -105,11 +102,9 @@ if (ret.code === 1 || ret.code === 2) { if (ret.code === 2) { ret.url = '__PUBLIC__/static/theme/default/img/wechat/qrc_payed.jpg'; - timer && window.clearInterval(timer), timer = null; - } + timer && window.clearInterval(timer), timer = null;} if (isShow) { - $('.pay-qrc-test').attr('src', ret.url) - } else { + $('.pay-qrc-test').attr('src', ret.url)} else { layer.open({ type: 1, title: false, closeBtn: 1, shadeClose: true, content: '' @@ -117,19 +112,12 @@ + '

退款测试

', end: function () { timer && window.clearInterval(timer), timer = null; - isShow = false; - }, + isShow = false;}, success: function (layero, index) { isShow = true; layIndex = index; - timer = setInterval(payTest, 3000); - } - }); - } - } - return false; - }, !isShow); - } + timer = setInterval(payTest, 3000);}});}} + return false;}, !isShow);} $('[data-pay-test]').on('click', payTest); @@ -139,12 +127,7 @@ if (ret.code === 1) { timer && window.clearInterval(timer), timer = null; return $.msg.success(ret.msg, 3, function () { - layer.close(layIndex); - }), false; - } - }); - }); - }); + layer.close(layIndex);}), false;}});});}); {/block} diff --git a/application/wechat/view/fans.back.html b/application/wechat/view/fans.back.html index b9ff0e045..66f89b265 100644 --- a/application/wechat/view/fans.back.html +++ b/application/wechat/view/fans.back.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="button"} diff --git a/application/wechat/view/fans.index.html b/application/wechat/view/fans.index.html index abb39b554..62f058caa 100644 --- a/application/wechat/view/fans.index.html +++ b/application/wechat/view/fans.index.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="button"} @@ -141,7 +141,6 @@ $('body').on('click', '[data-add-tag]', function () { var fans_id = this.getAttribute('data-add-tag'); var used_id = this.getAttribute('data-used-id'); - alert(used_id); - }); + alert(used_id);}); {/block} diff --git a/application/wechat/view/keys.form.html b/application/wechat/view/keys.form.html index cd9aff29e..52ad24dbe 100644 --- a/application/wechat/view/keys.form.html +++ b/application/wechat/view/keys.form.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="style"} {/block} @@ -121,8 +121,7 @@ var menu = function () { this.version = '1.0'; this.$btn; - this.listen(); - }; + this.listen();}; /** * 控件默认事件 * @returns {undefined} @@ -131,17 +130,12 @@ var self = this; $('.mobile-footer').on('click', 'li a', function () { self.$btn = $(this); - self.$btn.parent('li').hasClass('menu-add') ? self.add() : self.checkShow(); - }).find('li:first a:first').trigger('click'); + self.$btn.parent('li').hasClass('menu-add') ? self.add() : self.checkShow();}).find('li:first a:first').trigger('click'); $('.menu-delete').on('click', function () { var index = $.msg.confirm('删除后菜单下设置的内容将被删除!', function () { - self.del(), $.msg.close(index); - }); - }); + self.del(), $.msg.close(index);});}); $('.menu-submit').on('click', function () { - self.submit(); - }); - }; + self.submit();});}; /** * 添加一个菜单 * @returns {undefined} @@ -151,12 +145,9 @@ if ($ul.hasClass('mobile-footer')) { /* 添加一级菜单 */ var $li = $('
  • 一级菜单
  • ').insertBefore($add); this.$btn = $li.find('a'); - $('').appendTo($li); - } else { /* 添加二级菜单 */ - this.$btn = $('
  • 二级菜单
  • ').prependTo($ul).find('a'); - } - this.checkShow(); - }; + $('').appendTo($li);} else { /* 添加二级菜单 */ + this.$btn = $('
  • 二级菜单
  • ').prependTo($ul).find('a');} + this.checkShow();}; /** * 数据校验显示 * @returns {unresolved} @@ -165,8 +156,7 @@ var $li = this.$btn.parent('li'), $ul = $li.parent('ul'); /* 选中一级菜单时显示二级菜单 */ if ($li.hasClass('parent-menu')) { - $('.parent-menu .sub-menu').not(this.$btn.parent('li').find('.sub-menu').removeClass('hide')).addClass('hide'); - } + $('.parent-menu .sub-menu').not(this.$btn.parent('li').find('.sub-menu').removeClass('hide')).addClass('hide');} /* 一级菜单添加按钮 */ var $add = $('li.parent-menu:last'); @@ -174,19 +164,16 @@ /* 二级菜单添加按钮 */ $add.siblings('li').map(function () { var $add = $(this).find('ul li:last'); - $add.siblings('li').size() >= 5 ? $add.addClass('hide') : $add.removeClass('hide'); - }); + $add.siblings('li').size() >= 5 ? $add.addClass('hide') : $add.removeClass('hide');}); /* 处理一级菜单 */ var parentWidth = 100 / $('li.parent-menu:visible').size() + '%'; $('li.parent-menu').map(function () { var $icon = $(this).find('.icon-sub'); - $(this).width(parentWidth).find('ul li').size() > 1 ? $icon.removeClass('hide') : $icon.addClass('hide'); - }); + $(this).width(parentWidth).find('ul li').size() > 1 ? $icon.removeClass('hide') : $icon.addClass('hide');}); /* 更新选择中状态 */ $('.mobile-footer a.active').not(this.$btn.addClass('active')).removeClass('active'); this.renderEdit(); - return $ul; - }; + return $ul;}; /** * 删除当前菜单 * @returns {undefined} @@ -195,20 +182,15 @@ var $li = this.$btn.parent('li'), $ul = $li.parent('ul'); var $default = function () { if ($li.prev('li').size() > 0) { - return $li.prev('li'); - } + return $li.prev('li');} if ($li.next('li').size() > 0 && !$li.next('li').hasClass('menu-add')) { - return $li.next('li'); - } + return $li.next('li');} if ($ul.parents('li.parent-menu').size() > 0) { - return $ul.parents('li.parent-menu'); - } - return $('null'); - }.call(this); + return $ul.parents('li.parent-menu');} + return $('null');}.call(this); $li.remove(); this.$btn = $default.find('a:first'); - this.checkShow(); - }; + this.checkShow();}; /** * 显示当前菜单的属性值 * @returns {undefined} @@ -219,14 +201,11 @@ if ($li.find('ul li').size() > 1) { /*父菜单*/ $html = $($('.menu-editor-parent-tpl').html()); $html.find('input[name="menu-name"]').val($span.text()).on('change keyup', function () { - $span.text(this.value || ' '); - }); - $('.menu-editor .menu-content').html($html); - } else { + $span.text(this.value || ' ');}); + $('.menu-editor .menu-content').html($html);} else { $html = $($('.menu-editor-content-tpl').html()); $html.find('input[name="menu-name"]').val($span.text()).on('change keyup', function () { - $span.text(this.value || ' '); - }); + $span.text(this.value || ' ');}); $('.menu-editor .menu-content').html($html); var type = $span.attr('data-type') || 'text'; $html.find('input[name="menu-type"]').on('click', function () { @@ -248,27 +227,18 @@ 'pic_sysphoto': '弹出系统拍照发图', 'pic_photo_or_album': '弹出拍照或者相册发图', 'pic_weixin': '弹出微信相册发图器', - 'location_select': '弹出地理位置选择器' - }; + 'location_select': '弹出地理位置选择器'}; var select = [], tpl = '
    '; if (!(options[content] || false)) { content = 'scancode_push'; - $span.data('content', content); - } + $span.data('content', content);} for (var i in options) { - select.push(tpl.replace('{value}', i).replace('{title}', options[i]).replace('{checked}', (i === content) ? 'checked' : '')); - } - return select.join(''); - } - }.call(this); + select.push(tpl.replace('{value}', i).replace('{title}', options[i]).replace('{checked}', (i === content) ? 'checked' : ''));} + return select.join('');}}.call(this); var $html = $(html), $input = $html.find('input,textarea'); $input.on('change keyup click', function () { - $span.data('content', $(this).val() || $(this).html()); - }); - $('.editor-content-input').html($html); - }).filter('input[value="{type}"]'.replace('{type}', type)).trigger('click'); - } - }; + $span.data('content', $(this).val() || $(this).html());}); + $('.editor-content-input').html($html);}).filter('input[value="{type}"]'.replace('{type}', type)).trigger('click');}}; /** * 提交数据 * @returns {undefined} @@ -281,8 +251,7 @@ menudata.name = $span.text(); menudata.type = $span.attr('data-type'); menudata.content = $span.data('content') || ''; - return menudata; - } + return menudata;} $('li.parent-menu').map(function (index, item) { if (!$(item).hasClass('menu-add')) { @@ -297,16 +266,11 @@ submenudata.index = (index + 1) + '' + (ii + 1); submenudata.pindex = menudata.index; submenudata.sort = ii; - data.push(submenudata); - }); - } - }); - $.form.load('{:url("$classuri/edit")}', {data: data}, 'POST'); - }; + data.push(submenudata);});}}); + $.form.load('{:url("$classuri/edit")}', {data: data}, 'POST');}; /** * 实例菜单控件 */ - new menu(); - }); + new menu();}); {/block} \ No newline at end of file diff --git a/application/wechat/view/news.form.html b/application/wechat/view/news.form.html index 2ad86e22f..89edf46f2 100644 --- a/application/wechat/view/news.form.html +++ b/application/wechat/view/news.form.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name='content'} @@ -115,13 +115,11 @@ var editDdata = {$vo.articles | default = [] | json_encode}; for (var i in editDdata) { - $('.news-item').eq(i).data('item', editDdata[i]); - } + $('.news-item').eq(i).data('item', editDdata[i]);} $('body').on('change', '.upload-image-box input', function () { $('.news-item.active').css('background-image', 'url(' + this.value + ')'); - $(this).parent('.upload-image-box').css('background-image', 'url(' + this.value + ')'); - }); + $(this).parent('.upload-image-box').css('background-image', 'url(' + this.value + ')');}); require(['ueditor'], function () { @@ -144,22 +142,17 @@ $form.submit(); if (!syncEditor($('.news-item.active'))) { editor.setContent('文章内容不能留空,请输入内容!'); - return false; - } + return false;} $('.news-item').map(function () { var item = $(this).data('item'); item.content = item.content || '文章内容不能留空,请输入内容!'; - data.push(item); - }); - $.form.load('__SELF__', {data: data}, "post"); - }); + data.push(item);}); + $.form.load('__SELF__', {data: data}, "post");}); /*! 输入标题显示 */ $form.find('[name="title"]').on('keyup', function () { if ($item) { - $item.find('.news-title').html(this.value).show(); - } - }); + $item.find('.news-title').html(this.value).show();}}); /*! 同步编辑器 */ function syncEditor($pItem) { @@ -176,11 +169,8 @@ if ($form.find('input.validate-error').size() > 0 || data.content.length < 1) { ((data.content || '').length < 1) && editor.setContent('文章内容不能留空,请输入内容!'); $pItem.addClass('active').siblings().removeClass('active'); - return false; - } - } - return true; - } + return false;}} + return true;} /*! 显示编辑器 */ function showEditor() { @@ -193,60 +183,46 @@ data.content = data.content || ''; data.author = data.author || ''; data.show_cover_pic = data.show_cover_pic || 0; - return data; - }; + return data;}; // 重置表单 $form.get(0).reset(); // 获取当前数据 var data = this.get(); for (var i in data) { if (i !== 'content' && i !== 'show_cover_pic') { - $form.find('[name="' + i + '"]').val(data[i]).trigger('change'); - } - } + $form.find('[name="' + i + '"]').val(data[i]).trigger('change');}} if (parseInt(data.show_cover_pic) === 1) { - $form.find('[name="show_cover_pic"]').get(0).checked = true; - } - editor.setContent(data.content); - } + $form.find('[name="show_cover_pic"]').get(0).checked = true;} + editor.setContent(data.content);} /*! 添加新图文 */ $body.off('click', '.news-box .article-add').on('click', '.news-box .article-add', function () { var $html = $('

    '); $html.insertBefore(this).trigger('click'); - $('.news-item').size() >= 7 && $(this).hide(); - }); + $('.news-item').size() >= 7 && $(this).hide();}); /*! 列表选择 */ $body.off('click', '.news-item').on('click', '.news-item', function () { if (syncEditor($('.news-item.active'))) { $(this).addClass('active').siblings().removeClass('active'); - showEditor($item); - } - }); + showEditor($item);}}); /*! 隐藏删除按钮 */ $body.off('mouseleave').on('mouseleave', '.news-item', function () { - $(this).find('.upload-multiple-close').addClass('hide'); - }); + $(this).find('.upload-multiple-close').addClass('hide');}); /*! 显示删除按钮 */ $body.off('mouseenter', '.news-item').on('mouseenter', '.news-item', function () { $('.upload-multiple-close').addClass('hide'); - $(this).find('.upload-multiple-close').removeClass('hide'); - }); + $(this).find('.upload-multiple-close').removeClass('hide');}); /*! 删除操作图文 */ $body.off('click', '.upload-multiple-close').on('click', '.upload-multiple-close', function () { $(this).parents('.news-item').remove(); - $('.news-item').size() < 7 && $('.news-box .article-add').show(); - }); + $('.news-item').size() < 7 && $('.news-box .article-add').show();}); /*! 默认显示第一个 */ - $('.news-box .news-item:first').trigger('click'); - }); - }); - }); + $('.news-box .news-item:first').trigger('click');});});}); {/block} diff --git a/application/wechat/view/news.index.html b/application/wechat/view/news.index.html index 88e007c9b..15d643445 100644 --- a/application/wechat/view/news.index.html +++ b/application/wechat/view/news.index.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="button"}
    @@ -42,10 +42,8 @@ {/block} diff --git a/application/wechat/view/news.push.html b/application/wechat/view/news.push.html index 1aacf1e83..a5e3d8311 100644 --- a/application/wechat/view/news.push.html +++ b/application/wechat/view/news.push.html @@ -27,7 +27,7 @@
    @@ -94,18 +84,18 @@ \ No newline at end of file diff --git a/application/wechat/view/review.index.html b/application/wechat/view/review.index.html index 3d13255b7..996255eca 100644 --- a/application/wechat/view/review.index.html +++ b/application/wechat/view/review.index.html @@ -170,9 +170,7 @@ {/if} diff --git a/application/wechat/view/tags.index.html b/application/wechat/view/tags.index.html index bd95993ff..ddf1026fd 100644 --- a/application/wechat/view/tags.index.html +++ b/application/wechat/view/tags.index.html @@ -1,4 +1,4 @@ -{extend name='extra@admin/content' /} +{extend name='extra@admin/content'} {block name="button"}