1、已知bug修复
2、微信接口更新
This commit is contained in:
@@ -15,6 +15,16 @@ class Api {
|
||||
|
||||
public function __construct() {
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE");
|
||||
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept , token");
|
||||
$this->data = array('code' => 0, 'msg' => '', 'time' => time(), 'data' => '');
|
||||
if (!$this->checkToken()) {
|
||||
$this->data['code'] = '301';
|
||||
$this->data['data'] = '非法请求!';
|
||||
}
|
||||
}
|
||||
|
||||
protected function checkToken(){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,8 @@ class AuthRule extends Base{
|
||||
|
||||
public function uprule($data, $type){
|
||||
foreach ($data as $value) {
|
||||
$data = array(
|
||||
$id = $this->where(array('name' => $value['url']))->value('id');
|
||||
$save = array(
|
||||
'module' => $type,
|
||||
'type' => 2,
|
||||
'name' => $value['url'],
|
||||
@@ -40,14 +41,11 @@ class AuthRule extends Base{
|
||||
'group' => $value['group'],
|
||||
'status' => 1,
|
||||
);
|
||||
$id = $this->where(array('name' => $data['name']))->value('id');
|
||||
if ($id) {
|
||||
$data['id'] = $id;
|
||||
$this->save($data, array('id' => $id));
|
||||
} else {
|
||||
self::create($data);
|
||||
$save['id'] = $id;
|
||||
}
|
||||
$list[] = $save;
|
||||
}
|
||||
return true;
|
||||
return $this->saveAll($list);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | OneThink [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
/**
|
||||
* 分类模型
|
||||
*/
|
||||
class Page extends Content{
|
||||
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace app\common\validate;
|
||||
class Member extends Base{
|
||||
|
||||
protected $rule = array(
|
||||
'username' => 'require|unique:member|/^[a-zA-Z]\w{0,39}$/',
|
||||
'username' => 'require|unique:member',
|
||||
'email' => 'require|unique:member|email',
|
||||
'mobile' => 'unique:member',
|
||||
'password' => 'require',
|
||||
|
||||
Reference in New Issue
Block a user