Skip to content

Commit

Permalink
api接口支持多网盘模式
Browse files Browse the repository at this point in the history
  • Loading branch information
libsgh committed Mar 1, 2021
1 parent 8807584 commit 0f8315e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,23 @@ func GetTotalPage(totalCount, pageSize int) int {
//刷新目录缓存
func UpdateFolderCache() {
model.SqliteDb.Delete(entity.FileNode{})
Util.Cloud189GetFiles(config.GloablConfig.RootId, config.GloablConfig.RootId)
if config.GloablConfig.Mode == "cloud189" {
Util.Cloud189GetFiles(config.GloablConfig.RootId, config.GloablConfig.RootId)
} else if config.GloablConfig.Mode == "teambition" {
Util.TeambitionGetFiles(config.GloablConfig.RootId, config.GloablConfig.RootId, "/")
} else if config.GloablConfig.Mode == "native" {
}
}

//刷新登录cookie
func RefreshCookie() {
Util.Cloud189Login(config.GloablConfig.User, config.GloablConfig.Password)
if config.GloablConfig.Mode == "cloud189" {
Util.Cloud189Login(config.GloablConfig.User, config.GloablConfig.Password)
} else if config.GloablConfig.Mode == "teambition" {
Util.TeambitionLogin(config.GloablConfig.User, config.GloablConfig.Password)
} else if config.GloablConfig.Mode == "native" {
}

}
func IsDirectory(filename string) bool {
info, err := os.Stat(filename)
Expand Down

0 comments on commit 0f8315e

Please sign in to comment.