蛋蛋星球 后台端
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.
 
 
 
 

19 lines
496 B

  1. package svc
  2. import (
  3. "applet/app/db"
  4. "applet/app/utils/cache"
  5. "code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
  6. "strings"
  7. )
  8. func GetOssUrl(img string) string {
  9. redisConn := cache.GetPool().Get()
  10. sysCfgDb := implement.NewSysCfgDb(db.Db, redisConn)
  11. sysCfg := sysCfgDb.SysCfgFindWithDb("file_bucket_scheme", "file_bucket_host")
  12. if strings.Contains(img, "http") == false && img != "" {
  13. img = sysCfg["file_bucket_scheme"] + "://" + sysCfg["file_bucket_host"] + img
  14. }
  15. return img
  16. }