Commit 8feb1946 authored by huangyecong's avatar huangyecong

添加登陆接口

parent 9b00c080
...@@ -6,7 +6,7 @@ import req from './request' ...@@ -6,7 +6,7 @@ import req from './request'
let api = {} let api = {}
// 登录接口: // 登录接口:
api.userLogin = function (data) { api.userLogin = function (data) {
return req.post('/login/isValidUserInfo', data) return req.post('/api/common/login', data)
} }
//查询当前语言 //查询当前语言
api.getLanguageL = function (data) { api.getLanguageL = function (data) {
......
...@@ -65,11 +65,11 @@ ...@@ -65,11 +65,11 @@
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<!-- :disabled="isSub" -->
<a-button <a-button
type="primary" type="primary"
html-type="submit" html-type="submit"
class="login-form-button" class="login-form-button"
:disabled="isSub"
> >
登陆 登陆
</a-button> </a-button>
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
</template> </template>
<script> <script>
import api from '@/api/login';
export default { export default {
name: "login", name: "login",
components: {}, components: {},
...@@ -109,6 +110,17 @@ export default { ...@@ -109,6 +110,17 @@ export default {
e.preventDefault(); e.preventDefault();
this.form.validateFields((err, values) => { this.form.validateFields((err, values) => {
if (!err) { if (!err) {
console.log('登陆')
const query = {
id: "1009",
fields:[
{fieldName: "卡号", value: "199009211233", field: "medical_test_word"},
{fieldName: "卡密", value: "0001", field: "job_num"}
]
}
api.userLogin(query).then((res)=>{
console.log(res);
})
console.log("Received values of form: ", values); console.log("Received values of form: ", values);
} }
}); });
......
...@@ -20,8 +20,8 @@ module.exports = { ...@@ -20,8 +20,8 @@ module.exports = {
devServer: { devServer: {
proxy: { proxy: {
"^/api": { "^/api": {
target: "http://eccs.run4wd.com/api", //测试 target: "http://lnh.run4wd.com/", //测试
// target: "http://provider.medilink-global.com.cn/api/",//生产,需api // target: "http://lnh.ssish.com/api/",//生产,需api
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment