dispose.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. let count = 0; //接口完成数量
  2. function loginMsg(account_list, _Http) {
  3. uni.setStorageSync("account_list", account_list);
  4. console.log(account_list)
  5. if (account_list.length == 1) {
  6. uni.setStorageSync('userMsg', account_list[0])
  7. query_userauth(_Http);
  8. query_adspacelist(_Http);
  9. querySite_Parameter(_Http);
  10. } else {
  11. uni.navigateTo({
  12. url: '/pages/login/selectSite'
  13. })
  14. }
  15. }
  16. /* 获取用户权限 */
  17. function query_userauth(_Http) {
  18. _Http.basic({
  19. "classname": "sysmanage.develop.userauth.userauth",
  20. "method": "query_userauth",
  21. content: {
  22. nocache: true
  23. }
  24. }).then(res => {
  25. console.log("查询用户权限", res)
  26. if (res.msg != '成功') return uni.showToast({
  27. title: res.msg,
  28. icon: "none"
  29. });
  30. uni.setStorageSync('userauth', res.data);
  31. count += 1;
  32. toHome();
  33. });
  34. }
  35. /* 查询站点数据 */
  36. function querySite_Parameter(_Http) {
  37. _Http.basic({
  38. id: 20230608103802,
  39. "content": {}
  40. }).then(res => {
  41. console.log("查询站点数据", res)
  42. if (res.msg != '成功') return uni.showToast({
  43. title: res.msg,
  44. icon: "none"
  45. });
  46. uni.setStorageSync('siteP', res.data);
  47. count += 1;
  48. toHome();
  49. })
  50. }
  51. /* 查询轮播图 */
  52. function query_adspacelist(_Http) {
  53. _Http.basic({
  54. id: 20230608100802,
  55. "content": {}
  56. }).then(res => {
  57. console.log("查询轮播图", res)
  58. if (res.msg != '成功') return uni.showToast({
  59. title: res.msg,
  60. icon: "none"
  61. });
  62. uni.setStorageSync('banner_list', res.data)
  63. count += 1;
  64. toHome();
  65. })
  66. }
  67. function toHome() {
  68. if (count < 3) return;
  69. uni.reLaunch({
  70. url: '/pages/index/index',
  71. })
  72. }
  73. /* 站点数据查询 */
  74. module.exports = {
  75. loginMsg,
  76. query_userauth
  77. }