| | |
| | | import md5 from 'js-md5' |
| | | import axios from 'axios' |
| | | |
| | | import websocket from "./websocket.js" |
| | | import positions from "./positions.js" |
| | | const actions = { |
| | | loging(store, data) { |
| | | var user = [{ |
| | |
| | | // // dataType: 'JSON', |
| | | success: (res) => { |
| | | if (res.statusCode == 200) { |
| | | if(res.data.error_code == "400"){ |
| | | if (res.data.error_code == "400") { |
| | | uni.hideNavigationBarLoading(); |
| | | uni.showToast({ |
| | | title: '密码错误,请重试', |
| | | icon:'none', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | return; |
| | | } |
| | | store.commit('getUserData',res.data) |
| | | store.commit('getUserData', res.data) |
| | | // console.log(res.data,123542); |
| | | data.isit = true; |
| | | data.userName = res.data.nick_name; //警袁姓名 |
| | |
| | | data.pass = data.pass; |
| | | // data.userPhon = res.user_id; |
| | | store.commit('login', data); |
| | | |
| | | } |
| | | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log('失去连接 请稍等'); |
| | |
| | | // store.commit('login', data); |
| | | // }, 2000) |
| | | |
| | | } |
| | | }, |
| | | ...websocket.actions, |
| | | ...positions.actions |
| | | } |
| | | |
| | | export default actions |