Browse Source

update

order_statistics
dengbiao 6 months ago
parent
commit
043c03264e
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      app/lib/flexible_employment/pupiao.go

+ 8
- 2
app/lib/flexible_employment/pupiao.go View File

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


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


func NewPuPiao(appId, appSecret string) *PuPiao { 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) { 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 { if err != nil {
return []byte(""), err return []byte(""), err
} }


Loading…
Cancel
Save