<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>

                # 服務層的應用 >[info] 現在后臺應用程序需要對多平臺進行支持,比如說APP端接口,Web端,手機H5數據,微信小程序,微信平臺等第三方數據接口支持. >[danger] 為了兼容多個平臺,同時增加代碼的通用性,系統的統一性/兼容性,減少系統維護成本和效率,那么一個能統一處理程序邏輯的需求就呼之欲出. >我暫且把解決這個需求的代碼叫做服務層.控制器中只負責接收數據,判斷權限,然后把所有的邏輯處理統一丟給服務層. > ### 通過DateEite類將控制器引導到服務層 ~~~ /** * @title 設備簽到 * @description * @author Mikkle * @url /api/app.terminal/sign * @method POST * @param_send name:terminal_mac type:string require:1 default:40字符以內 other: desc: * @param_return park_list:站點列表 */ public function sign(){ try{ $operate = DataEdit::instance(); $result = $operate->setParameter([ OptionsCenter::$fieldTerminalMac =>"terminal_mac", ])->setValidate(false) ->setModel("base/app/terminal") ->setModelType("service") ->execModelAction("terminalSign"); if ($result===false){ throw new Exception($operate->getError()); } return $result; }catch (Exception $e){ Log::error($e->getMessage()); return ShowCode::jsonCodeWithoutData(1008,$e->getMessage()); } } ~~~ 更多示例 參見 DataEdit快捷操作類庫 http://www.hmoore.net/mikkle/thinkphp5_study/462704 感謝大家關注 交流請加QQ群 321449759 ![](https://box.kancloud.cn/3499008a08e64306c68873288092a057_286x340.png)
                  <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>

                              哎呀哎呀视频在线观看