Finish the user register.

This commit is contained in:
zicla
2019-05-04 01:11:59 +08:00
parent bda9339299
commit a02eada324
12 changed files with 82 additions and 242 deletions

View File

@ -74,18 +74,11 @@ func GetHomePath() string {
//例如C:/Users/lishuang/AppData/Local/Temp/html
func GetHtmlPath() string {
homePath := GetHomePath()
filePath := homePath + "/html"
exists := PathExists(filePath)
if !exists {
err := os.MkdirAll(filePath, 0777)
if err != nil {
panic("创建上传文件夹时出错!")
}
//开发环境直接使用 build/html 下面的文件
if EnvWinDevelopment() || EnvMacDevelopment() {
return GetDevHomePath() + "/build/html"
}
return filePath
return GetHomePath() + "/html"
}
//如果文件夹存在就不管,不存在就创建。 例如:/var/www/matter