| | |
| | | created() { |
| | | this.getSysTitle() |
| | | }, |
| | | mounted() { |
| | | const _that = this |
| | | $.ajax({ |
| | | type: 'get', |
| | | url: 'http://127.0.0.1:15211/LocalUnique', |
| | | /* headers: { |
| | | 'Content-Type': 'text/xml;charset=utf-8' |
| | | }, */ |
| | | // data: requireData, |
| | | success: function(response) { |
| | | const resultData = JSON.parse( |
| | | response |
| | | .replace(/\r/g, '') |
| | | .replace(/\n/g, '') |
| | | .replace(/\s*/g, '') |
| | | ) |
| | | const username = resultData[0].ID |
| | | const password = resultData[0].Unique |
| | | _that.$store |
| | | .dispatch('LoginByMSL', { username: username, password: password }) |
| | | .then(() => { |
| | | _that.$router.push({ path: _that.tagWel.value }) |
| | | }) |
| | | }, |
| | | error: function(XMLHttpRequest, textStatus, errorThrown) { |
| | | console.error('访问马上聊出错') |
| | | } |
| | | }) |
| | | }, |
| | | // mounted() { |
| | | // const _that = this |
| | | // $.ajax({ |
| | | // type: 'get', |
| | | // url: 'http://127.0.0.1:15211/LocalUnique', |
| | | // /* headers: { |
| | | // 'Content-Type': 'text/xml;charset=utf-8' |
| | | // }, */ |
| | | // // data: requireData, |
| | | // success: function(response) { |
| | | // const resultData = JSON.parse( |
| | | // response |
| | | // .replace(/\r/g, '') |
| | | // .replace(/\n/g, '') |
| | | // .replace(/\s*/g, '') |
| | | // ) |
| | | // const username = resultData[0].ID |
| | | // const password = resultData[0].Unique |
| | | // _that.$store |
| | | // .dispatch('LoginByMSL', { username: username, password: password }) |
| | | // .then(() => { |
| | | // _that.$router.push({ path: _that.tagWel.value }) |
| | | // }) |
| | | // }, |
| | | // error: function(XMLHttpRequest, textStatus, errorThrown) { |
| | | // console.error('访问马上聊出错') |
| | | // } |
| | | // }) |
| | | // }, |
| | | computed: { |
| | | ...mapGetters(['website', 'tagWel']) |
| | | }, |