1
This commit is contained in:
@@ -182,6 +182,7 @@ func pushMsgByUniApp(storeId int, storeName string, cID []string, msg string, bo
|
||||
var (
|
||||
errs []error
|
||||
options = make(map[string]interface{}, 0)
|
||||
offMsg MsgContext
|
||||
)
|
||||
if flag == FlagOrder {
|
||||
options = map[string]interface{}{
|
||||
@@ -214,6 +215,9 @@ func pushMsgByUniApp(storeId int, storeName string, cID []string, msg string, bo
|
||||
},
|
||||
}
|
||||
}
|
||||
if err := json.Unmarshal([]byte(body), &offMsg); err != nil {
|
||||
globals.SugarLogger.Debugf("pushMsgByUniApp marshal err")
|
||||
}
|
||||
for _, v := range cID {
|
||||
param := map[string]interface{}{
|
||||
"request_id": utils.Int64ToStr(time.Now().Unix()) + "_" + utils.Int2Str(storeId),
|
||||
@@ -231,10 +235,9 @@ func pushMsgByUniApp(storeId int, storeName string, cID []string, msg string, bo
|
||||
"ups": map[string]interface{}{
|
||||
"notification": map[string]interface{}{
|
||||
"title": storeName,
|
||||
"body": msg,
|
||||
"body": offMsg.Context + "(" + offMsg.VendorName + offMsg.OrderSqs + "号订单)",
|
||||
"click_type": "startapp",
|
||||
//"notify_id": rand.Intn(1000000000),
|
||||
"notify_id": time.Now().Unix(), // 每次通知需要不一样 范围:0-2147483647
|
||||
"notify_id": time.Now().Unix(), // 每次通知需要不一样 范围:0-2147483647
|
||||
},
|
||||
"options": options,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user