| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- let count = 0; //接口完成数量
- function loginMsg(account_list, _Http) {
- uni.setStorageSync("account_list", account_list);
- console.log(account_list)
- if (account_list.length == 1) {
- uni.setStorageSync('userMsg', account_list[0])
- query_userauth(_Http);
- query_adspacelist(_Http);
- querySite_Parameter(_Http);
- } else {
- uni.navigateTo({
- url: '/pages/login/selectSite'
- })
- }
- }
- /* 获取用户权限 */
- function query_userauth(_Http) {
- _Http.basic({
- "classname": "sysmanage.develop.userauth.userauth",
- "method": "query_userauth",
- content: {
- nocache: true
- }
- }).then(res => {
- console.log("查询用户权限", res)
- if (res.msg != '成功') return uni.showToast({
- title: res.msg,
- icon: "none"
- });
- uni.setStorageSync('userauth', res.data);
- count += 1;
- toHome();
- });
- }
- /* 查询站点数据 */
- function querySite_Parameter(_Http) {
- _Http.basic({
- id: 20230608103802,
- "content": {}
- }).then(res => {
- console.log("查询站点数据", res)
- if (res.msg != '成功') return uni.showToast({
- title: res.msg,
- icon: "none"
- });
- uni.setStorageSync('siteP', res.data);
- count += 1;
- toHome();
- })
- }
- /* 查询轮播图 */
- function query_adspacelist(_Http) {
- _Http.basic({
- id: 20230608100802,
- "content": {}
- }).then(res => {
- console.log("查询轮播图", res)
- if (res.msg != '成功') return uni.showToast({
- title: res.msg,
- icon: "none"
- });
- uni.setStorageSync('banner_list', res.data)
- count += 1;
- toHome();
- })
- }
- function toHome() {
- if (count < 3) return;
- uni.reLaunch({
- url: '/pages/index/index',
- })
- }
- /* 站点数据查询 */
- module.exports = {
- loginMsg,
- query_userauth
- }
|