statistic.jsx 862 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * @Author: Johnhong9527
  3. * @Date: 2019-05-26 17:21:24
  4. * @Last Modified by: Johnhong9527
  5. * @Last Modified time: 2019-05-26 17:26:30
  6. */
  7. import { post, get } from 'util/http.jsx';
  8. export default class Statistic {
  9. // 首页数据统计
  10. getHomeCount() {
  11. return get('/manage/statistic/base_count.do');
  12. }
  13. // 检查登陆接口的数据是不是合法
  14. checkLoginInfo(loginInfo) {
  15. let username = `${loginInfo.username}`,
  16. password = `${loginInfo.password}`;
  17. if (typeof username !== 'string' || username.length === 0) {
  18. return {
  19. status: false,
  20. msg: '用户名不能为空'
  21. };
  22. }
  23. if (typeof password !== 'string' || password.length === 0) {
  24. return {
  25. status: false,
  26. msg: '密码不能为空'
  27. };
  28. }
  29. return {
  30. status: true,
  31. msg: '验证通过'
  32. };
  33. }
  34. }