Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
app_push
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_server
app_push
Commits
ae2c88d9
Commit
ae2c88d9
authored
Dec 04, 2019
by
liangyuzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change new
parent
97beeb1d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
app/services/push/igetui_ios.rb
+0
-2
app/services/push_tool_client.rb
+12
-12
No files found.
app/services/push/igetui_ios.rb
View file @
ae2c88d9
...
...
@@ -14,8 +14,6 @@ module Push
@user_device_ids
=
user_device_ids
end
def
push
data_hash_opts
=
data_hash
(
@user_device_ids
,
@template_data
,
@igetui_opts
)
...
...
app/services/push_tool_client.rb
View file @
ae2c88d9
...
...
@@ -7,23 +7,23 @@ class PushToolClient
end
def
do_push
@push_
collections
||=
push
_collections
@push_
device_collections
||=
push_device
_collections
Push
::
IgetuiIos
.
new
(
@push_
collections
[
:igetui_ios
],
@opts
).
push
if
@push
_collections
[
:igetui_ios
].
present?
Push
::
IgetuiAndroid
.
new
(
@push_
collections
[
:igetui_android
],
@opts
).
push
if
@push
_collections
[
:igetui_android
].
present?
Push
::
IgetuiIos
.
new
(
@push_
device_collections
[
:igetui_ios
],
@opts
).
push
if
@push_device
_collections
[
:igetui_ios
].
present?
Push
::
IgetuiAndroid
.
new
(
@push_
device_collections
[
:igetui_android
],
@opts
).
push
if
@push_device
_collections
[
:igetui_android
].
present?
#现在好像不用了
# Push::IgetuiIos.push(@push_collections[:igetui_ios], @opts) if @push_collections[:apns].present?
# Push::IgetuiAndroid.push(@push_collections[:igetui_android], @opts) if @push_collections[:apns].present?
Push
::
Xiaomi
.
push
(
@push_
collections
[
:xiaomi
],
@opts
[
:message
])
if
@push
_collections
[
:xiaomi
].
present?
Push
::
Huawei
.
push
(
@push_
collections
[
:huawei
],
@opts
[
:message
])
if
@push
_collections
[
:huawei
].
present?
Push
::
Xiaomi
.
push
(
@push_
device_collections
[
:xiaomi
],
@opts
[
:message
])
if
@push_device
_collections
[
:xiaomi
].
present?
Push
::
Huawei
.
push
(
@push_
device_collections
[
:huawei
],
@opts
[
:message
])
if
@push_device
_collections
[
:huawei
].
present?
end
private
def
push_collections
_push_
collection
=
{
def
push_
device_
collections
_push_
device_collections
=
{
igetui_ios:
[],
igetui_android:
[],
apns:
[],
...
...
@@ -39,16 +39,16 @@ class PushToolClient
case
user_device
.
platform
when
'igetui'
if
user_device
.
device_platform
==
'ios'
_push_
collection
[
:igetui_ios
]
<<
client_id
_push_
device_collections
[
:igetui_ios
]
<<
client_id
else
_push_
collection
[
:igetui_ios
]
<<
client_id
_push_
device_collections
[
:igetui_ios
]
<<
client_id
end
when
'apns'
_push_
collection
[
:apns
]
<<
client_id
_push_
device_collections
[
:apns
]
<<
client_id
when
'xiaomi'
_push_
collection
[
:xiaomi
]
<<
client_id
_push_
device_collections
[
:xiaomi
]
<<
client_id
when
'huawei'
_push_
collection
[
:huawei
]
<<
client_id
_push_
device_collections
[
:huawei
]
<<
client_id
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment