迅睿開源框架是一款PHP8高性能·簡(jiǎn)單易用的PHP開源開發(fā)框架, 基于MIT開源許可協(xié)議發(fā)布,不限制商業(yè)使用,以多端互聯(lián)為設(shè)計(jì)理念, 支持的微信公眾號(hào)、小程序、APP客戶端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
業(yè)務(wù)經(jīng)理
微信掃描以上二維碼
028-61286886
技術(shù)咨詢
在前端發(fā)布完后,返回到剛發(fā)布文章頁(yè)面。這樣是如何實(shí)現(xiàn)的?
重寫模塊的用戶類控制器
/** * 回調(diào)處理結(jié)果 * $data * */ protected function _Call_Post($data) { if ($data[1]['status'] == 9) { $list = $html = ''; if ($this->module['category'][$data[1]['catid']]['setting']['html']) { // 生成權(quán)限文件 if (!dr_html_auth(1)) { return dr_return_data(0, dr_lang('/cache/html/ 無法寫入文件')); } $html = WEB_DIR.'index.php?s='.$this->module['dirname'].'&c=html&m=showfile&id='.$data[1]['id']; $list = WEB_DIR.'index.php?s='.$this->module['dirname'].'&c=html&m=categoryfile&id='.$data[1]['catid']; } $url = WEB_DIR.'index.php?s='.$this->module['dirname'].'&c=showid='.$data[1]['id']; return dr_return_data(1, dr_lang('操作成功'), ['url' => $url, 'id' => $data[1]['id'], 'catid' => $data[1]['catid'], 'htmlfile' => $html, 'htmllist' => $list]); } else { if (\Phpcmf\Service::L('input')->post('is_draft')) { return dr_return_data(1, dr_lang('操作成功,已存儲(chǔ)到草稿箱')); } else { return dr_return_data(1, dr_lang('操作成功,等待管理員審核'), ['id' => $data[1]['id'], 'catid' => $data[1]['catid']]); } } }
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@迅??蚣苈?lián)合創(chuàng)始人
$url = WEB_DIR.'index.php?s='.$this->module['dirname'].'&c=showid='.$data[1]['id'];
這行代碼寫漏了一個(gè)&符號(hào)。
應(yīng)該是:show&id
非常感謝,@迅睿框架聯(lián)合創(chuàng)始人 已經(jīng)解決
重寫模塊的用戶類控制器
/** * 回調(diào)處理結(jié)果 * $data * */ protected function _Call_Post($data) { if ($data[1]['status'] == 9) { $list = $html = ''; if ($this->module['category'][$data[1]['catid']]['setting']['html']) { // 生成權(quán)限文件 if (!dr_html_auth(1)) { return dr_return_data(0, dr_lang('/cache/html/ 無法寫入文件')); } $html = WEB_DIR.'index.php?s='.$this->module['dirname'].'&c=html&m=showfile&id='.$data[1]['id']; $list = WEB_DIR.'index.php?s='.$this->module['dirname'].'&c=html&m=categoryfile&id='.$data[1]['catid']; } $url = WEB_DIR.'index.php?s='.$this->module['dirname'].'&c=showid='.$data[1]['id']; return dr_return_data(1, dr_lang('操作成功'), ['url' => $url, 'id' => $data[1]['id'], 'catid' => $data[1]['catid'], 'htmlfile' => $html, 'htmllist' => $list]); } else { if (\Phpcmf\Service::L('input')->post('is_draft')) { return dr_return_data(1, dr_lang('操作成功,已存儲(chǔ)到草稿箱')); } else { return dr_return_data(1, dr_lang('操作成功,等待管理員審核'), ['id' => $data[1]['id'], 'catid' => $data[1]['catid']]); } } }開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@迅??蚣苈?lián)合創(chuàng)始人
這行代碼寫漏了一個(gè)&符號(hào)。
非常感謝,@迅睿框架聯(lián)合創(chuàng)始人 已經(jīng)解決