Commit c9d68d6c authored by 罗超's avatar 罗超

1

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