thinkphp 5ライブラリ重要コード

18550 ワード

{include file="common/head"/}
class="admin-main layui-anim layui-anim-upbit">
class="layui-elem-field layui-field-title"> {$title}
class="layui-elem-quote"> href="{:url('add')}"class="layui-btn layui-btn-sm">{:lang('add')}
class="layui-table"> id="con"> {volist name="categorys" id="vo"} {if(!empty($vo['child']))} {volist name="vo['child']" id="vo"} {/volist} {/if} {/volist}
id="cateNameMsg">( ) {:lang('order')}
class="visible-lg visible-md">{$vo['id']} class="text-left">href="{:url($vo['cateUrl'],[' id'=>$vo['id'])}」class="green"title="コンテンツの ">{$vo['catname']}  class="visible-lg visible-md">{$vo['modulename']} class="visible-lg visible-md">color="green">{$vo['menu'] == '1'?' ':' '} type="text" size="10" data-id="1" value="{$vo['listorder']}" class="layui-input list_order"> class="orange"href="{:url($vo['cateUrl'],['id'=>$vo['id'])}"title=" ">class="icon icon-file-text 2"> {if($vo['moduleid'] !=1)} class="blue"title="サブ を "href="{:url('admin/Category/add',['parentid'=>$vo[' id'])}」>class="icon icon-plus"> {/if} class="green"href="{:url('admin/Category/edit',['id'=>$vo['id']])}"title=" ">class="icon icon-pencil 2"> class=「red」href=「javascript:del('{$vo['id']}')」title=「 」>class=「icon icon-bin」>
class="visible-lg visible-md">{$vo['id']} class="text-left">       └─ href="{:url($vo['cateUrl'],[' id'=>$vo['id'])}」class="green"title="コンテンツの ">{$vo['catname']}  class="visible-lg visible-md">{$vo['modulename']} class="visible-lg visible-md">color="green">{$vo['menu'] == '1'?' ':' '} type="text" size="10" data-id="15" value="{$vo['listorder']}" class="layui-input list_order"> class="orange"href="{:url($vo['cateUrl'],['id'=>$vo['id'])}"title=" ">class="icon icon-file-text 2"> class="green"href="{:url('admin/Category/edit',['id'=>$vo['id']])}"title=" ">class="icon icon-pencil 2"> class=「red」href=「javascript:del('{$vo['id']}')」title=「 」>class=「icon icon-bin」>
{include file="common/foot"/} <span style="color:#bababa;">src=</span><span style="color:#a5c261;">"__STATIC__/common/js/jquery.2.1.1.min.js"</span><span style="color:#e8bf6a;">> </span><span style="color:#e8bf6a;"> </span><span style="color:#9876aa;">layui</span>.use(<span style="color:#6a8759;">'table'</span><span style="color:#cc7832;">, </span><span style="color:#cc7832;"><strong>function </strong></span>() { <span style="color:#cc7832;"><strong>var </strong></span>$ = <span style="color:#9876aa;">layui</span>.<span style="color:#9876aa;">jquery</span><span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>$(<span style="color:#6a8759;">'body'</span>).<span style="color:#ffc66d;">on</span>(<span style="color:#6a8759;">'blur'</span><span style="color:#cc7832;">, </span><span style="color:#6a8759;">'.list_order'</span><span style="color:#cc7832;">, </span><span style="color:#cc7832;"><strong>function </strong></span>() { <span style="color:#cc7832;"><strong>var </strong></span>id = $(<span style="color:#cc7832;"><strong>this</strong></span>).<span style="color:#ffc66d;">attr</span>(<span style="color:#6a8759;">'data-id'</span>)<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span><span style="color:#cc7832;"><strong>var </strong></span>listorder = $(<span style="color:#cc7832;"><strong>this</strong></span>).<span style="color:#ffc66d;">val</span>()<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span><span style="color:#cc7832;"><strong>var </strong></span>loading = layer.<span style="color:#ffc66d;">load</span>(<span style="color:#6897bb;">1</span><span style="color:#cc7832;">, </span>{<span style="color:#9876aa;">shade</span>: [<span style="color:#6897bb;">0.1</span><span style="color:#cc7832;">, </span><span style="color:#6a8759;">'#fff'</span>]})<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>$.<span style="color:#ffc66d;">post</span>(<span style="color:#6a8759;">'{:url("cOrder")}'</span><span style="color:#cc7832;">, </span>{<span style="color:#9876aa;">id</span>: id<span style="color:#cc7832;">, </span><span style="color:#9876aa;">listorder</span>: listorder}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"><strong>function </strong></span>(res) { layer.<span style="color:#ffc66d;">close</span>(loading)<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span><span style="color:#cc7832;"><strong>if </strong></span>(res.<span style="color:#9876aa;">code </span>=== <span style="color:#6897bb;">1</span>) { layer.<span style="color:#ffc66d;">msg</span>(res.<span style="color:#ffc66d;">msg</span><span style="color:#cc7832;">, </span>{<span style="color:#9876aa;">time</span>: <span style="color:#6897bb;">1000</span><span style="color:#cc7832;">, </span><span style="color:#9876aa;">icon</span>: <span style="color:#6897bb;">1</span>}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"><strong>function </strong></span>() { location.href = res.<span style="color:#9876aa;">url</span><span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>})<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>} <span style="color:#cc7832;"><strong>else </strong></span>{ layer.<span style="color:#ffc66d;">msg</span>(res.<span style="color:#ffc66d;">msg</span><span style="color:#cc7832;">, </span>{<span style="color:#9876aa;">time</span>: <span style="color:#6897bb;">1000</span><span style="color:#cc7832;">, </span><span style="color:#9876aa;">icon</span>: <span style="color:#6897bb;">2</span>})<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>} }) })<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>})<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span><span style="color:#cc7832;"> </span><span style="color:#cc7832;"><strong>function </strong></span><span style="color:#ffc66d;">del</span>(id) { layer.<span style="color:#ffc66d;">confirm</span>(<span style="color:#6a8759;">' ?'</span><span style="color:#cc7832;">, </span>{<span style="color:#9876aa;">icon</span>: <span style="color:#6897bb;">3</span>}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"><strong>function </strong></span>(index) { <span style="color:#9876aa;">$</span>.<span style="color:#ffc66d;">post</span>(<span style="color:#6a8759;">'{:url("del")}'</span><span style="color:#cc7832;">, </span>{<span style="color:#9876aa;">id</span>: id}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"><strong>function </strong></span>(data) { <span style="color:#cc7832;"><strong>if </strong></span>(data.<span style="color:#9876aa;">status </span>=== <span style="color:#6897bb;">1</span>) { layer.<span style="color:#ffc66d;">alert</span>(data.<span style="color:#9876aa;">info</span><span style="color:#cc7832;">, </span>{<span style="color:#9876aa;">icon</span>: <span style="color:#6897bb;">6</span>}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"><strong>function </strong></span>(index) { layer.<span style="color:#ffc66d;">close</span>(index)<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>window.location.href = data.<span style="color:#9876aa;">url</span><span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>})<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>} <span style="color:#cc7832;"><strong>else </strong></span>{ layer.<span style="color:#ffc66d;">msg</span>(data.<span style="color:#9876aa;">info</span><span style="color:#cc7832;">, </span>{<span style="color:#9876aa;">icon</span>: <span style="color:#6897bb;">5</span>})<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>} })<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>layer.<span style="color:#ffc66d;">close</span>(index)<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>})<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>} <span style="color:#e8bf6a;">