wangfei 6 years ago
parent
commit
78b2149913
3 changed files with 4 additions and 2 deletions
  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 View File

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

+ 1
- 2
controllers/wechatimg/wechatimt.go View File

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

+ 1
- 0
controllers/wechatmenu/wechatmenu.go View File

68
 		c.ResponseError(err)
68
 		c.ResponseError(err)
69
 	}
69
 	}
70
 	menu, err := client.GetMenu()
70
 	menu, err := client.GetMenu()
71
+
71
 	wechatmenu := menu["button"].([]WechatMenuDetail)
72
 	wechatmenu := menu["button"].([]WechatMenuDetail)
72
 	beego.Error("___________wechatmenulist____________")
73
 	beego.Error("___________wechatmenulist____________")
73
 	beego.Error(wechatmenu)
74
 	beego.Error(wechatmenu)