Explorar o código

小程序背景图分成两个字段

ziwen hai 1 ano
pai
achega
b84ed3cfb9

+ 2 - 1
controllers/cygx/yanxuan_special.go

@@ -61,7 +61,8 @@ func (this *YanxuanSpecialController) Add() {
 		CreateTime: time.Now(),
 		ModifyTime: time.Now(),
 		HeadImg:    utils.CYGX_YANXUAN_SPECIAL_HEAD_IMG_URL + strconv.Itoa(rnd) + ".png",
-		BgImg:      utils.CYGX_YANXUAN_SPECIAL_BG_IMG_URL + strconv.Itoa(rnd) + ".png",
+		BgImg:      utils.CYGX_YANXUAN_SPECIAL_BG_IMG_URL + strconv.Itoa(rnd) + "a.png",
+		BgImgDown:      utils.CYGX_YANXUAN_SPECIAL_BG_IMG_URL + strconv.Itoa(rnd) + "b.png",
 		BgImgPc:    utils.CYGX_YANXUAN_SPECIAL_BG_IMG_URL_PC + strconv.Itoa(rnd) + ".png",
 		Status:     1,
 	}

+ 2 - 1
models/cygx/cygx_yanxuan_special_user.go

@@ -17,7 +17,8 @@ type CygxYanxuanSpecialAuthor struct {
 	CreateTime   time.Time // 创建时间
 	ModifyTime   time.Time // 修改时间
 	HeadImg      string    // 头像
-	BgImg        string    // 背景图
+	BgImg        string    // 背景图上部分
+	BgImgDown    string    // 背景图下部分
 	BgImgPc      string    // pc背景图
 	Status       int       // 1启用2禁用
 }

+ 1 - 1
utils/constants.go

@@ -518,6 +518,6 @@ const (
 // 查研观向 研选专栏 作者头像和背景
 const (
 	CYGX_YANXUAN_SPECIAL_HEAD_IMG_URL = "https://hzstatic.hzinsights.com/cygx/yanxuan_special/head_img/Mask%20group-"
-	CYGX_YANXUAN_SPECIAL_BG_IMG_URL = "https://hzstatic.hzinsights.com/cygx/yanxuan_special/bg_img/Mask%20group-"
+	CYGX_YANXUAN_SPECIAL_BG_IMG_URL = "https://hzstatic.hzinsights.com/cygx/yanxuan_special/bg_img/"
 	CYGX_YANXUAN_SPECIAL_BG_IMG_URL_PC = "https://hzstatic.hzinsights.com/cygx/yanxuan_special/bg_img/pc/"
 )