123456789101112131415161718192021222324252627282930 |
- const Parse = require("parse/node");
- Parse.serverURL = "http://web2023.fmode.cn:9999/parse"; // 配置服务器地址
- Parse.initialize("dev"); // 配置应用名称
- async function login_user(usr) {
- if (!usr?.account) {
- throw "账户不存在"
- }
- try {
- let current = Parse.User.logIn(usr.account, usr.password);
- if (usr?.account) {
- // await this.route.navigate(['/home']);
- console.log(current)
- } else {
- throw "账号或者密码有误"
- }
- } catch (e) {
- throw e
- }
- }
- login_user({
- account: "1",
- password: "12",
- })
- module.exports.login_user = login_user
|