Commit 8feb1946 authored by huangyecong's avatar huangyecong

添加登陆接口

parent 9b00c080
......@@ -6,7 +6,7 @@ import req from './request'
let api = {}
// 登录接口:
api.userLogin = function (data) {
return req.post('/login/isValidUserInfo', data)
return req.post('/api/common/login', data)
}
//查询当前语言
api.getLanguageL = function (data) {
......
......@@ -65,11 +65,11 @@
</a-input>
</a-form-item>
<a-form-item>
<!-- :disabled="isSub" -->
<a-button
type="primary"
html-type="submit"
class="login-form-button"
:disabled="isSub"
>
登陆
</a-button>
......@@ -86,6 +86,7 @@
</template>
<script>
import api from '@/api/login';
export default {
name: "login",
components: {},
......@@ -109,6 +110,17 @@ export default {
e.preventDefault();
this.form.validateFields((err, values) => {
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);
}
});
......
......@@ -20,8 +20,8 @@ module.exports = {
devServer: {
proxy: {
"^/api": {
target: "http://eccs.run4wd.com/api", //测试
// target: "http://provider.medilink-global.com.cn/api/",//生产,需api
target: "http://lnh.run4wd.com/", //测试
// target: "http://lnh.ssish.com/api/",//生产,需api
ws: true,
changeOrigin: true,
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