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
8f2ac57a
Commit
8f2ac57a
authored
Nov 13, 2019
by
李晓兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'jpush'
parent
a96c6257
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
5 deletions
+45
-5
login.vue
src/pages/login.vue
+41
-0
hlsUtil.js
src/scripts/hlsUtil.js
+0
-1
jpushService.js
src/scripts/jpushService.js
+4
-4
No files found.
src/pages/login.vue
View file @
8f2ac57a
...
...
@@ -24,6 +24,7 @@
<div
class=
"pwd-forgotten"
@
click=
"pwdForgotten"
>
忘记密码?
</div>
</div>
<div
class=
"button submit"
@
click=
"access"
>
登录
</div>
<div
class=
"button submit"
@
click=
"test"
>
测试
</div>
</div>
</h-content>
<!--
<div
style=
"width: 100%;height: 100%;background-color: #007aff;display: flex;justify-content: center;align-items: center;"
>
...
...
@@ -119,6 +120,46 @@ export default {
clearPassword
:
function
()
{
this
.
password
=
''
},
test
(){
let
vm
=
this
hlsPopup
.
showActionSheet
({
titleText
:
'请选择照片'
,
buttonArray
:
[
'拍照'
,
'从相册取'
],
callback
:
index
=>
{
if
(
index
===
0
)
{
vm
.
imgUploadOpenCamera
()
}
else
{
vm
.
imgUploadTakePicture
()
}
},
})
},
imgUploadOpenCamera
()
{
let
vm
=
this
let
cameraoptions
=
{
quality
:
100
,
}
let
success
=
function
(
imgdata
)
{
alert
(
'imgdata'
+
imgdata
)
}
let
error
=
function
()
{
hlsPopup
.
showLongCenter
(
'请拍照'
)
}
hlsUtil
.
openCamera
(
cameraoptions
,
success
,
error
)
},
imgUploadTakePicture
()
{
let
vm
=
this
let
cameraoptions
=
{
quality
:
100
,
}
let
success
=
function
(
imgUrl
)
{
alert
(
'imgUrl[0]'
+
imgUrl
[
0
])
}
let
error
=
function
()
{
}
vm
.
hlsUtil
.
takePicture
(
cameraoptions
,
success
,
error
)
},
},
}
</
script
>
...
...
src/scripts/hlsUtil.js
View file @
8f2ac57a
...
...
@@ -371,7 +371,6 @@ export default {
* @param success
*/
fileUploadSvc
:
function
(
file
,
success
)
{
debugger
let
path
=
file
.
filePath
var
name
=
path
.
substr
(
path
.
lastIndexOf
(
'/'
)
+
1
)
let
url
=
encodeURI
(
process
.
env
.
rootPath
+
'/app/fileUploadSvc?sysName=XCMG_DEV&apiName=attachment_upload'
)
...
...
src/scripts/jpushService.js
View file @
8f2ac57a
...
...
@@ -6,13 +6,13 @@ export default {
onGetRegistrationID
:
function
(
data
)
{
let
vm
=
this
try
{
alert
(
"JPushPlugin:registrationID is "
+
JSON
.
stringify
(
data
));
//
alert("JPushPlugin:registrationID is " + JSON.stringify(data));
if
(
data
)
{
alert
(
'111'
)
//
alert('111')
window
.
localStorage
.
setItem
(
'registrationID'
,
data
)
}
if
(
!
data
)
{
alert
(
'222'
)
//
alert('222')
window
.
plugins
.
jPushPlugin
.
getRegistrationID
(
this
.
onGetRegistrationID
.
bind
(
vm
))
//window.setTimeout(() => this.getRegistrationID(),1000)
/* window.setTimeout(function () {
...
...
@@ -21,7 +21,7 @@ export default {
}
}
catch
(
exception
)
{
alert
(
'###'
+
exception
);
//
alert('###'+exception);
}
},
// 获取设备号
...
...
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