12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
-
-
-
- $rewrite = [];
-
- $askTypeModel = new \weapp\Ask\model\AskTypeModel;
- $askConfData = $askTypeModel->getWeappData();
- $ask_seo_pseudo = 1;
- if (!empty($askConfData['data']['seo_pseudo'])) {
- $ask_seo_pseudo = intval($askConfData['data']['seo_pseudo']);
- }
-
- if (3 == $ask_seo_pseudo) {
- $weapp_id = \think\Db::name('weapp')->where(['code'=>'Ask'])->cache(true, null, "weapp")->getField('id');
- $rewrite = [
- 'ask/list_'.$weapp_id.'_<is_recom>_<type_id>_p<p>$' => array(
- 'plugins/Ask/index',
- array('method' => 'get', 'ext' => 'html'),
- array('is_recom' => '[\d]+','type_id' => '[\d]+', 'p' => '[\d]+'),
- 'cache'=>1
- ),
- 'ask/list_'.$weapp_id.'_<is_recom>_<type_id>$' => array(
- 'plugins/Ask/index',
- array('method' => 'get', 'ext' => 'html'),
- array('is_recom' => '[\d]+','type_id' => '[\d]+'),
- 'cache'=>1
- ),
- 'ask/list_'.$weapp_id.'_<type_id>_p<p>$' => array(
- 'plugins/Ask/index',
- array('method' => 'get', 'ext' => 'html'),
- array('type_id' => '[\d]+', 'p' => '[\d]+'),
- 'cache'=>1
- ),
- 'ask/list_'.$weapp_id.'_<type_id>$' => array(
- 'plugins/Ask/index',
- array('method' => 'get', 'ext' => 'html'),
- array('type_id' => '[\d]+'),
- 'cache'=>1
- ),
- 'ask$' => array('plugins/Ask/index',array('method' => 'get', 'ext' => 'html'), 'cache'=>1),
- 'ask/view_'.$weapp_id.'_<ask_id>$' => array(
- 'plugins/Ask/details',
- array('method' => 'get', 'ext' => 'html'),
- array('ask_id' => '[\d]+'),
- 'cache'=>1
- ),
- ];
- }
-
- return $rewrite;
|