Commit f3755fc7 by 王岩

feat:脚步推送

parent b35df209
...@@ -58,14 +58,12 @@ getToken() { ...@@ -58,14 +58,12 @@ getToken() {
#获取所有在线用户的userId #获取所有在线用户的userId
getUserId() { getUserId() {
# echo '{"name": "ACGKAKA"}' | $jq -r URL="https://testapi.gzsle.com/auth/user/getAuthUsersList?role_id=101&biz_type=1&page_no=1&page_size=500"
data=($(curl -X GET "https://testapi.gzsle.com/auth/user/getAuthUsersList?page_size=1&page_no=1" \ response=$(curl -s -H "Authorization: Bearer $1" "$URL")
-H "Content-Type: text/plain;charset=UTF-8" \
-H "Authorization: Bearer $1" \ echo "$response" | $jq .data.user_base_info_list.[].id | $jq -s 'map(tostring)|map("test_" + .)' -c
--compressed))
echo $data | awk
} }
#发送消息通知 #发送消息通知
...@@ -74,7 +72,7 @@ jPush() { ...@@ -74,7 +72,7 @@ jPush() {
echo $(curl -s "https://api.jpush.cn/v3/push" \ echo $(curl -s "https://api.jpush.cn/v3/push" \
-H "Authorization: Basic YjhiNjcyZmY3MjkyNjM1MTkzZjFhNjgwOmJmYWExYTg3YTEwZTNlMTJjNTI0ZmI0OQ==" \ -H "Authorization: Basic YjhiNjcyZmY3MjkyNjM1MTkzZjFhNjgwOmJmYWExYTg3YTEwZTNlMTJjNTI0ZmI0OQ==" \
-H "Content-Type: text/plain;charset=UTF-8" \ -H "Content-Type: text/plain;charset=UTF-8" \
-d '{"platform":["android", "ios"],"audience":{"alias":["test_84192"]},"message":{"title":"Update","msg_content":"Update"}}' \ -d '{"platform":["android", "ios"],"audience":{"alias":'$1'},"message":{"title":"Update","msg_content":"Update"}}' \
--compressed) --compressed)
} }
...@@ -83,9 +81,11 @@ main() { ...@@ -83,9 +81,11 @@ main() {
DART_DEFINES=$(getToken) DART_DEFINES=$(getToken)
getUserId $DART_DEFINES USERLIST=$(getUserId $DART_DEFINES)
jPush $USERLIST
# echo "获取的token为:$DART_DEFINES" # echo "$USERLIST" 2>&1 | tee curl.log
# current_branch=$(get_current_branch) # current_branch=$(get_current_branch)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment