From 24327e8eb3dccfa7c6c750004e97e5a003166e33 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Tue, 08 Mar 2022 11:57:54 +0800
Subject: [PATCH] +人员查询基础页,屏蔽群众人员查询,巡查页面修复
---
store/actions.js | 192 ++++++++++++++++++++++++-----------------------
1 files changed, 97 insertions(+), 95 deletions(-)
diff --git a/store/actions.js b/store/actions.js
index 34509af..3e901a2 100644
--- a/store/actions.js
+++ b/store/actions.js
@@ -6,105 +6,107 @@
const actions = {
- loging (store, data) {
- var user = [{
- name: '1',
- password: '111111'
- },
- {
- name: '2',
- password: '222222'
- },
- {
- name: '3',
- password: '333333'
- },
- ],
- pasw = md5(data.pass),
- url = this.state.piAPI + '/blade-auth/oauth/token?tenantId=000000&username=' + data.name +
- ' &password=' + pasw + '&grant_type=password&scope=all&type=account'
- // url ='http://192.168.0.109:82/blade-auth/oauth/token';
- // url ='http://192.168.0.109:82/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password';
- // url ='http://web.byisf.com/api/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password&scope=all';
- // console.log(url);
- wx.request({ //uniapp 自带axios
- url: url, //仅为示例,并非真实接口地址。
- // data: d,
- // data: {
- // tenantId: '000000',
- // username: data.name,
- // password: pasw,
- // grant_type: 'password',
- // scope: 'all',
- // type: "account"
- // },
- header: {
- // "Content-Type":"",
- "Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
- "Tenant-Id": "000000"
+ loging(store, data) {
+ var user = [{
+ name: '1',
+ password: '111111'
+ },
+ {
+ name: '2',
+ password: '222222'
+ },
+ {
+ name: '3',
+ password: '333333'
+ },
+ ],
+ pasw = md5(data.pass),
+ url = this.state.piAPI + '/blade-auth/oauth/token?tenantId=000000&username=' + data.name +
+ ' &password=' + pasw + '&grant_type=password&scope=all&type=account'
+ // url ='http://192.168.0.109:82/blade-auth/oauth/token';
+ // url ='http://192.168.0.109:82/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password';
+ // url ='http://web.byisf.com/api/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password&scope=all';
+ // console.log(url);
+ wx.request({ //uniapp 自带axios
+ url: url, //仅为示例,并非真实接口地址。
+ // data: d,
+ // data: {
+ // tenantId: '000000',
+ // username: data.name,
+ // password: pasw,
+ // grant_type: 'password',
+ // scope: 'all',
+ // type: "account"
+ // },
+ header: {
+ // "Content-Type":"",
+ "Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+ "Tenant-Id": "000000"
- // "Cookie": "JSESSIONID=maOJY05vT2jj4nHwsQGSPgWWVFH1mY-TGWOLYCSh"
- },
- method: "post",
- // // dataType: 'JSON',
- success: (res) => {
- if (res.statusCode == 200) {
- if (res.data.error_code == "400") {
- uni.hideNavigationBarLoading()
- uni.showToast({
- title: '密码错误,请重试',
- icon: 'none',
- duration: 2000
- })
- return
- }
- store.commit('getUserData', res.data)
- // console.log(res.data,123542);
- data.isit = true
- data.userName = res.data.nick_name //警袁姓名
- data.userID = res.data.user_id //警袁id
- data.avatar = res.data.avatar //头像
- data.accounts = data.name
- data.pass = data.pass
- // data.userPhon = res.user_id;
- store.commit('login', data)
+ // "Cookie": "JSESSIONID=maOJY05vT2jj4nHwsQGSPgWWVFH1mY-TGWOLYCSh"
+ },
+ method: "post",
+ // // dataType: 'JSON',
+ success: (res) => {
+ if (res.statusCode == 200) {
+ if (res.data.error_code == "400") {
+ uni.hideNavigationBarLoading()
+ uni.showToast({
+ title: '密码错误,请重试',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ store.commit('getUserData', res.data)
+ console.log(res.data, 123542);
+ data.isit = true
+ store.state.roleid = res.data.role_id; //角色id
+ data.userName = res.data.nick_name //警袁姓名
+ data.userID = res.data.user_id //警袁id
+ data.avatar = res.data.avatar //头像
+ data.accounts = data.name
+ data.pass = data.pass
+ // data.userPhon = res.user_id;
+ store.commit('login', data)
- wx.request({
- url: "http://223.82.109.183:2080/api/userVip/getUserVipInfo?idCardNo=" + res
- .data.cardid,
- method: 'get',
- success: (result) => {
- if (JSON.stringify(result.data.data) != '{}') {
- store.state.billFlag = true
- }
- }
- })
+ wx.request({
+ url: "http://223.82.109.183:2080/api/userVip/getUserVipInfo?idCardNo=" +
+ res
+ .data.cardid,
+ method: 'get',
+ success: (result) => {
+ if (JSON.stringify(result.data.data) != '{}') {
+ store.state.billFlag = true
+ }
+ }
+ })
- }
- },
- fail: (res) => {
- console.log('失去连接 请稍等')
- // console.log(res);
- }
- })
- // var time = setTimeout(() => { //模拟请求时间
- // var ud = user,
- // isit = false;
- // for (var key in ud) {
- // if (ud[key].name == data.name && ud[key].password == data.pass) {
- // isit = true;
- // break;
- // } else {
- // isit = false;
- // }
- // }
- // data.isit = isit;
- // store.commit('login', data);
- // }, 2000)
+ }
+ },
+ fail: (res) => {
+ console.log('失去连接 请稍等')
+ // console.log(res);
+ }
+ })
+ // var time = setTimeout(() => { //模拟请求时间
+ // var ud = user,
+ // isit = false;
+ // for (var key in ud) {
+ // if (ud[key].name == data.name && ud[key].password == data.pass) {
+ // isit = true;
+ // break;
+ // } else {
+ // isit = false;
+ // }
+ // }
+ // data.isit = isit;
+ // store.commit('login', data);
+ // }, 2000)
- },
- ...websocket.actions,
- ...positions.actions
+ },
+ ...websocket.actions,
+ ...positions.actions
}
export default actions
--
Gitblit v1.9.3