Commit c9d68d6c authored by 罗超's avatar 罗超

1

parent ceef09d3
...@@ -61,10 +61,11 @@ import { ...@@ -61,10 +61,11 @@ import {
import { login,phoneLogin,parsePhone } from "../../api/index"; import { login,phoneLogin,parsePhone } from "../../api/index";
export default { export default {
setup(props, context) { setup(props, context) {
let { proxy } = getCurrentInstance();
let Toast = inject("$toast"); let Toast = inject("$toast");
let msg = reactive({ let msg = reactive({
Account: "", Account: "13551126755",
Password: "", Password: "123456",
}); });
let data =reactive({ let data =reactive({
phoneNum: "", phoneNum: "",
...@@ -98,7 +99,10 @@ export default { ...@@ -98,7 +99,10 @@ export default {
Toast.fail("请输入密码"); Toast.fail("请输入密码");
return; return;
} }
let res = await login(msg); // let res = await login(msg);
console.log(103,this.$request)
let res=await this.$request('/AppletLogin/Login',msg)
console.log(104,res)
if (res) { if (res) {
res.Data.Account = msg.Account; res.Data.Account = msg.Account;
try { try {
......
import { isLogin } from './index' import {
isLogin
} from './index'
import request from './request.js' import request from './request.js'
export default { export default {
install: (app, options) => { install: (app, options) => {
app.config.globalProperties.$isLogin = isLogin app.config.globalProperties.$isLogin = isLogin
app.config.globalProperties.$request = (url,data,method)=>{ app.config.globalProperties.$request = async (url, data, method) => {
return request({ const res = await request({
url, url,
data, data,
method, method,
}) })
return res
} }
} }
} }
\ No newline at end of file
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