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

                繼續編輯index方法: ~~~ public function index($ap=0){ } ~~~ 編輯界面: ![](https://box.kancloud.cn/2016-07-10_5781bda0503c5.png) 添加代碼如下: ~~~ if($this->request->method()=='POST') { $postdata = $this->request->only(['moderate','operation']); if($postdata['operation']=='delete'){ foreach($postdata['moderate'] as $aid) { $this->destroy($aid); } return $this->success('刪除成功'); }else if($postdata['operation']=='pay'){ foreach($postdata['moderate'] as $aid) { $this->updatepay($aid); } return $this->success('更新成功'); } else{ echo 'none'; } } ~~~ 添加編輯方法: ~~~ protected function destroy($aid=0) { AcctModel::destroy($aid); } protected function updatepay($aid=0) { $record = AcctModel::get($aid); // getData $record->pstatus = !$record->getData('pstatus'); if($record->save()){ return $this->success('更新成功'); }else{ return $this->error('更新失敗'); } } ~~~ 這里 ~~~ $record->pstatus = !$record->getData('pstatus'); ~~~ 沒有使用 ~~~ $record->pstatus = !$record->pstatus; ~~~ 是因為在結算模型中定義了獲取器 ~~~ protected function getPstatusAttr($value) { $status = [-1 => '刪除', 0 => '未支付', 1 => '已支付', 2 => '待定']; return $status[$value]; } ~~~ 直接使用會報錯。
                  <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>

                              哎呀哎呀视频在线观看