You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
342 B
18 lines
342 B
package sysCloud
|
|
|
|
import (
|
|
"GoClouds/cloud"
|
|
gocloud "github.com/mgr9525/go-cloud"
|
|
)
|
|
|
|
func Login(name, pass string) (int, string) {
|
|
pers := gocloud.GetNewMaps()
|
|
pers["name"] = name
|
|
pers["pass"] = pass
|
|
code, uid, err := cloud.SysCloudExec.ExecJSON("/user/login", &pers)
|
|
if err != nil {
|
|
return 0, "网络错误"
|
|
}
|
|
|
|
return code, uid
|
|
}
|