12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
-
-
- namespace app\admin\model;
-
- use think\Db;
- use think\Model;
-
-
-
- class Weapp extends Model
- {
- public $weappLogic;
-
-
- protected function initialize()
- {
-
- parent::initialize();
-
- }
-
-
-
- public function getList($where = array()){
- $result = Db::name('weapp')->where($where)->getAllWithIndex('code');
- foreach ($result as $key => $val) {
- $config = include WEAPP_PATH.$val['code'].DS.'config.php';
- $val['config'] = json_encode($config);
- $result[$key] = $val;
- }
- return $result;
- }
-
-
-
- public function clearWeappCache()
- {
- \think\Cache::clear('weapp');
- cache('common_weapp_getWeappList', null);
- $weappM = new \app\common\model\Weapp;
- $weappM->getWeappList();
- }
-
-
-
- public function getWeappList($code = '')
- {
- $weappM = new \app\common\model\Weapp;
- return $weappM->getWeappList($code);
- }
- }
|