Ver a proveniência

update

order_statistics
dengbiao há 5 meses
ascendente
cometimento
043c03264e
1 ficheiros alterados com 8 adições e 2 eliminações
  1. +8
    -2
      app/lib/flexible_employment/pupiao.go

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

@@ -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
Guardar