Commit f9a011dd authored by 范雪寒's avatar 范雪寒

feat: 保存登陆信息

parent b571e077
...@@ -427,6 +427,45 @@ cc.Class({ ...@@ -427,6 +427,45 @@ cc.Class({
case 'PSQS_get_city': case 'PSQS_get_city':
callback(['北京市']); callback(['北京市']);
break; break;
case 'PSQS_check_login':
callback({
success: true,
userInfo: { // userInfo为空时弹出填写用户信息的页面
phone: 13812345678,
nickName: "小豆梓",
sex: "girl",
provice: "辽宁省",
city: "大连市",
age: '5~8岁',
grade: '一年级'
},
bookInfo: [{
name: "kind_A",
bookList: [{
id: 12334,
coverImg: "http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg",
duration: "21:33",
rate: "55%",
createDate: "2012-12-21"
}, {
id: 12231,
coverImg: "http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg",
duration: "21:33",
readTime: 2,
createDate: "2012-12-21"
}],
}, {
name: "kind_B",
bookList: [{
id: 12235,
coverImg: "http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg",
duration: "21:33",
readTime: 1,
createDate: "2012-12-21"
}],
}]
});
break;
default: default:
this.showLog('未定义接口: ' + apiName); this.showLog('未定义接口: ' + apiName);
break; break;
......
...@@ -187,9 +187,7 @@ PSQS_logout ...@@ -187,9 +187,7 @@ PSQS_logout
PSQS_get_province PSQS_get_province
``` ```
#### 参数 #### 参数
| 参数名 | 类型 | 说明 |
| -------- | ------ | ------ |
| province | string | 省份名 |
#### 返回: #### 返回:
```javascript ```javascript
...@@ -201,9 +199,59 @@ PSQS_get_province ...@@ -201,9 +199,59 @@ PSQS_get_province
PSQS_get_city PSQS_get_city
``` ```
#### 参数 #### 参数
| 参数名 | 类型 | 说明 |
| -------- | ------ | ------ |
| province | string | 省份名 |
#### 返回: #### 返回:
```javascript ```javascript
['北京市','上海市'] ['北京市','上海市']
``` ```
### 判断是否需要登陆
```
PSQS_check_login
```
#### 参数
#### 返回:(和登陆接口的返回信息一致)
```javascript
{
msg: '',
success: true,
userInfo: { // userInfo为空时弹出填写用户信息的页面
phone: 13812345678,
nickName: "小豆梓",
sex: "girl",
provice: "辽宁省",
city: "大连市",
age: '5~8岁',
grade: '一年级'
},
bookInfo: [{
name: "kind_A",
bookList: [{
id: 12334,
coverImg: "http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg",
duration: "21:33",
rate: "55%",
createDate: "2012-12-21"
}, {
id: 12231,
coverImg: "http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg",
duration: "21:33",
readTime: 2,
createDate: "2012-12-21"
}],
}, {
name: "kind_B",
bookList: [{
id: 12235,
coverImg: "http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg",
duration: "21:33",
readTime: 1,
createDate: "2012-12-21"
}],
}]}
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment