<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                如下圖所示,后臺可以設置各種字段給用戶輸入。而這些字段其實也可以很方便隨意添加的。 ![](https://img.kancloud.cn/c1/d9/c1d970a364fe47c0731b1bc3092ac2a0_1508x589.png) 如下圖所示,找到文件`\application\extra\form.php`,打開后,找到一個類似的字段復制一個出來 ![](https://img.kancloud.cn/d3/ab/d3ab7a254003cb3d2ccddc618206da74_1324x950.png) 上面僅僅是配置文件。 下面再打開目錄 `\application\common\field` 如下圖所示,找到類似的那個字段,復制一個出來修改即可。 ![](https://img.kancloud.cn/66/53/66538ed8016556a7713c5bb387f8618e_856x486.png) 至此,新字段就開發設置完畢,后臺就可以使用了。 鑒于一個用戶訂做審核功能,給大家分享一下如何靈活的增加自定義字段 之前的審核員功能,當時是匆匆忙忙加功能,所以就勉強的湊合著用一維數組的字段,大家初次使用是很別扭的,不過管理員自己使用就問題不大。懂得什么意思就好了。 假如要給用戶使用的話,用戶就會摸不著頭腦是什么意思了。這僅僅是一個例子,在使用當中,大家可能會需要各種各樣的功能字段,現有的字段只能滿足通用的需求,個性需求的話,大家還是要個性化處理一下,更人性貨,用戶才能更好的理解其中的意思,才好知道怎么使用。 ![](https://img.kancloud.cn/ba/e1/bae1033bcc623d53130167ffc01b706f_897x462.gif) ![](https://img.kancloud.cn/86/52/8652813732c9e25ab421d24ce9a3e694_1671x659.png) ![](https://img.kancloud.cn/18/9e/189e7e28e3e3d595100ea11c6f27c8df_1404x803.png) 代碼如下,給大家參考一下 以下代碼是拿一維數組簡單修改的,冗余代碼在所難免。 ~~~ <?php function_exists('urls') || die('ERR'); $jscode = ''; $getuser_url = iurl('index/wxapp.member/getbyids'); if(fun('field@load_js',$field['type'])){ $jscode = <<<EOT <script type="text/javascript"> jQuery(document).ready(function() { $('.list_array').each(function () { var base = $(this); var basehtml = base.find('div.input-group:first').prop("outerHTML"); //base.append(basehtml); $(document).on("keypress", "input", function(event) { return event.keyCode != 13; //回車不能提交表單,請點擊提交按鈕! }); //統計數據 var count_value = function(){ var vals = []; base.find('input.wri').each(function(){ if($(this).val()!='')vals.push($(this).val()); }); //vals.join(',') base.find('textarea').val( JSON.stringify(vals) ); } //輸入框鼠標離開事件 var blur_act = function(){ base.find('input.wri').on('blur',function(){ count_value(); $.get('{$getuser_url}',{uids:$(this).val()},res=>{ let arr = []; if(res.code==0){ res.data.forEach(rs=>{ arr.push(rs.username+'('+rs.uid+')') }) } $(this).parent().find('.listuser').html(arr.join('、')); }) } ); base.find('input.wri').bind('keyup',function(e){ if (event.keyCode == "13") { layer.alert('請點擊底部的提交按鈕來提交表單!'); } }); } //下移 function down_act(){ base.find("span.down").click(function(){ var that = $(this).parent(); if(that.next().hasClass('input-group')){ that.next().after(that.clone()); that.remove(); init_act(); }else{ layer.alert('到盡頭了'); } }); } //上移 function up_act(){ base.find("span.up").click(function(){ var that = $(this).parent(); if(that.prev().hasClass('input-group')){ that.prev().before(that.clone()); that.remove(); init_act(); }else{ layer.alert('到盡頭了'); } }); } //添加按鈕事件 var add_act = function(){ base.find('.add').unbind('click').on('click', function(){ base.find('div.input-group:last').after(basehtml); base.find('div.input-group:last').find("input").val(''); base.find('div.input-group:last').find(".listuser").html(''); init_act(); } ); } //移除按鈕事件 var del_act = function(){ base.find('span.del').on('click', function(){ $(this).parent().remove(); count_value(); count_step(); } ); } var count_step = function(){ let j = 0; base.find('.step').each(function(){ j++; $(this).html(j+'審'); }); } var init_act = function(){ base.find('span').off('click'); base.find('input').off('blur'); add_act(); del_act(); blur_act(); down_act(); up_act(); count_value(); count_step(); } init_act(); }); }); </script> EOT; } $groups = ''; $array = json_decode($info[$name],true); if($array){ foreach($array AS $key=>$vo){ $j = $key+1; $listuser=[]; foreach(explode(',',$vo) AS $uid){ if($uid>0){ $user = get_user($uid); if($user)$listuser[] = $user['username'].'('.$uid.')'; } } $listuser = implode('、',$listuser); $groups .= "<div class='input-group'> <span class='input-group-addon step'>{$j}審</span> <input class='wri' type='text' value='{$vo}' placeholder='請輸入用戶UID' > <span class='input-group-addon del'><i class='fa fa-fw fa-close'></i></span> <span class='listuser'>{$listuser}</span> </div>"; } }else{ $groups="<div class='input-group'> <span class='input-group-addon step'>1審</span> <input class='wri' type='text' value='' placeholder='請輸入用戶UID' > <span class='input-group-addon del'><i class='fa fa-fw fa-close'></i></span> </div>"; } return <<<EOT <div class="list_array"> $groups <div style="margin:8px 20px;"> <button class="layui-btn layui-btn-sm layui-btn-normal add" style="color:#fff;" type="button">增加一級</button> </div> <textarea style="display:none;" id="{$name}" name="{$name}" >{$info[$name]}</textarea> </div> $jscode EOT; ; ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看