wangfei hace 6 años
padre
commit
78b2149913
Se han modificado 3 ficheros con 4 adiciones y 2 borrados
  1. 2
    0
      conf/app.conf
  2. 1
    2
      controllers/wechatimg/wechatimt.go
  3. 1
    0
      controllers/wechatmenu/wechatmenu.go

+ 2
- 0
conf/app.conf Ver fichero

@@ -7,6 +7,8 @@ EnableDocs = true
7 7
 excelpath = ./
8 8
 sessionon = true
9 9
 
10
+host = http://wechatconfig.ycjcjy.com/upload/
11
+
10 12
 [cros]
11 13
 allowMode = dev
12 14
 allowCredentials = true

+ 1
- 2
controllers/wechatimg/wechatimt.go Ver fichero

@@ -151,10 +151,9 @@ func (c *WechatImgController) AddNewImg() {
151 151
 	}
152 152
 
153 153
 	id, err := UploaImage(client.GetToken(), imgurl)
154
-
155 154
 	var img = model.TaWechatImg{
156 155
 		MediaId:    id,
157
-		Url:        imgurl,
156
+		Url:        beego.AppConfig.String("host") + head.Filename,
158 157
 		Name:       head.Filename,
159 158
 		UpdateTime: time.Now(),
160 159
 		OrgId:      user.OrgId,

+ 1
- 0
controllers/wechatmenu/wechatmenu.go Ver fichero

@@ -68,6 +68,7 @@ func (c *MenuController) GetMenuList() {
68 68
 		c.ResponseError(err)
69 69
 	}
70 70
 	menu, err := client.GetMenu()
71
+
71 72
 	wechatmenu := menu["button"].([]WechatMenuDetail)
72 73
 	beego.Error("___________wechatmenulist____________")
73 74
 	beego.Error(wechatmenu)