Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
fcada8cf
Commit
fcada8cf
authored
Jun 16, 2021
by
Hello
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios闪退修复
parent
694f29f0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
login.vue
src/pages/login.vue
+1
-0
jpushService.js
src/scripts/jpushService.js
+9
-10
No files found.
src/pages/login.vue
View file @
fcada8cf
...
@@ -144,6 +144,7 @@ export default {
...
@@ -144,6 +144,7 @@ export default {
let
tagOption
=
{
let
tagOption
=
{
'username'
:
vm
.
username
,
'username'
:
vm
.
username
,
}
}
localStorage
.
setItem
(
'appUserId'
,
res
.
info
.
app_user_id
)
vm
.
Jpush
.
_jpush_config
(
tagOption
)
vm
.
Jpush
.
_jpush_config
(
tagOption
)
}
else
{
}
else
{
hlsPopup
.
hideLoading
()
hlsPopup
.
hideLoading
()
...
...
src/scripts/jpushService.js
View file @
fcada8cf
...
@@ -6,20 +6,19 @@ export default {
...
@@ -6,20 +6,19 @@ export default {
onGetRegistrationID
:
function
(
data
)
{
onGetRegistrationID
:
function
(
data
)
{
let
vm
=
this
let
vm
=
this
try
{
try
{
//
alert("JPushPlugin:registrationID is " + JSON.stringify(data));
//
alert("JPushPlugin:registrationID is " + JSON.stringify(data));
if
(
data
)
{
if
(
data
)
{
// alert('111')
// alert('111')
window
.
localStorage
.
setItem
(
'registrationID'
,
data
)
window
.
localStorage
.
setItem
(
'registrationID'
,
data
)
}
}
if
(
!
data
)
{
if
(
!
data
)
{
//alert('222')
//
alert('222')
window
.
plugins
.
jPushPlugin
.
getRegistrationID
(
this
.
onGetRegistrationID
.
bind
(
vm
))
window
.
plugins
.
jPushPlugin
.
getRegistrationID
(
this
.
onGetRegistrationID
.
bind
(
vm
))
//window.setTimeout(() => this.getRegistrationID(),1000)
//
window.setTimeout(() => this.getRegistrationID(),1000)
/* window.setTimeout(function () {
/* window.setTimeout(function () {
vm.getRegistrationID()
vm.getRegistrationID()
}, 1000)*/
}, 1000)
*/
}
}
}
catch
(
exception
)
{
}
catch
(
exception
)
{
// alert('###'+exception);
// alert('###'+exception);
}
}
...
@@ -190,7 +189,7 @@ export default {
...
@@ -190,7 +189,7 @@ export default {
// 极光推送
// 极光推送
_jpush_config
:
function
(
tagOption
)
{
_jpush_config
:
function
(
tagOption
)
{
if
(
process
.
env
.
isMobilePlatform
)
{
if
(
process
.
env
.
isMobilePlatform
)
{
let
phone
=
window
.
localStorage
.
user_phone
let
userId
=
window
.
localStorage
.
appUserId
// alert('phone'+phone)
// alert('phone'+phone)
let
tags
=
[]
let
tags
=
[]
for
(
let
key
in
tagOption
)
{
for
(
let
key
in
tagOption
)
{
...
@@ -199,7 +198,7 @@ export default {
...
@@ -199,7 +198,7 @@ export default {
/* if (userName) {
/* if (userName) {
tags.push(userName.toUpperCase())
tags.push(userName.toUpperCase())
} */
} */
window
.
plugins
.
jPushPlugin
.
setTags
({
sequence
:
Number
(
phone
),
tags
:
tags
},
window
.
plugins
.
jPushPlugin
.
setTags
({
sequence
:
Number
(
userId
),
tags
:
tags
},
function
(
result
)
{
function
(
result
)
{
// alert('11'+result.tags)
// alert('11'+result.tags)
},
function
(
error
)
{
},
function
(
error
)
{
...
...
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