setToken([$pushToken]); // $fastAppPushCommon->subscribeTopic(PushConst::TOPIC_ALL, [$pushToken]); // $fastAppPushCommon->unSubscribeTopic(PushConst::TOPIC_ALL, [$pushToken]); // $result = $fastAppPushCommon->subscribeList($pushToken); // $result = $fastAppPushCommon->queryPushToken($pushToken); $result = $fastAppPushCommon->sendPushMessage('我是标题', '我是内容', '/'); dd($result); // $testPushMsgSample = new PushMsgCommon(); // $testPushMsgSample->sendPushMsgMessageByMsgType(Constants::PUSHMSG_FASTAPP_MSG_TYPE); // $message = '{ // "data": "{\"pushtype\":1,\"pushbody\":{\"messageId\":\"111110001\",\"data\":\"test pass-through msg\"}}", // "ssss":"{k1:v1}", // "android": { // "collapse_key": -1, // "urgency": "HIGH", // "ttl": "1448s", // "bi_tag": "Trump", // "fast_app_target": 1 // }, // "token": [ // *push_token* // ] //}'; // // // $message = str_ireplace("*push_token*", '"' . $testPushMsgSample->fast_push_token . '"', $message); // $testPushMsgSample->sendPushMsgRealMessage(json_decode($message), Constants::PUSHMSG_FASTAPP_MSG_TYPE); } }