Ver código fonte

update

order_statistics
dengbiao 6 meses atrás
pai
commit
043c03264e
1 arquivos alterados com 8 adições e 2 exclusões
  1. +8
    -2
      app/lib/flexible_employment/pupiao.go

+ 8
- 2
app/lib/flexible_employment/pupiao.go Ver arquivo

@@ -3,6 +3,7 @@ package flexible_employment
import (
"bytes"
"crypto/md5"
"crypto/tls"
"encoding/hex"
"encoding/json"
"fmt"
@@ -22,7 +23,7 @@ type PuPiao struct {
AppSecret string
}

const urlForPrd = "http://admin.linglong.net.cn"
const urlForPrd = "https://admin.linglong.net.cn"
const urlForDev = "http://api.testlg.cn"

func NewPuPiao(appId, appSecret string) *PuPiao {
@@ -106,7 +107,12 @@ func (gm *PuPiao) mergeMaps(map1, map2 map[string]interface{}) map[string]interf
}

func (gm *PuPiao) httpPostBody(url string, msg []byte) ([]byte, error) {
resp, err := http.Post(url, "application/json;charset=utf-8", bytes.NewBuffer(msg))
client := &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},
}
resp, err := client.Post(url, "application/json;charset=utf-8", bytes.NewBuffer(msg))
if err != nil {
return []byte(""), err
}


Carregando…
Cancelar
Salvar