Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-webapp-cli
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
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
heasy
hls-webapp-cli
Commits
7ff270b0
Commit
7ff270b0
authored
Jul 12, 2019
by
Nature
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wechat'
parents
a2c89978
66a6ae19
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
380 deletions
+81
-380
hlsPopup.js
template/src/scripts/hlsPopup.js
+44
-97
hlsUtil.js
template/src/scripts/hlsUtil.js
+37
-283
No files found.
template/src/scripts/hlsPopup.js
View file @
7ff270b0
...
...
@@ -34,14 +34,6 @@ export default {
if
(
vm
.
isLoading
)
{
Vue
.
$vux
.
loading
.
hide
()
vm
.
isLoading
=
false
// 弹出操作失败
/* Vue.$vux.toast.show({
text: '操作失败',
type: 'warn',
time: vm.SHOW_TIMES,
isShowMask: vm.IS_SHOW_MASK,
position: 'middle',
}) */
}
},
40000
)
},
...
...
@@ -60,19 +52,13 @@ export default {
showLongTop
:
function
(
content
)
{
let
vm
=
this
let
text
=
content
||
'操作失败'
if
(
!
process
.
env
.
isMobilePlatform
)
{
Vue
.
$vux
.
toast
.
show
({
text
:
text
,
type
:
'text'
,
time
:
vm
.
SHOW_TIMES
,
isShowMask
:
vm
.
IS_SHOW_MASK
,
position
:
'top'
,
})
}
else
{
window
.
plugins
.
toast
.
showLongTop
(
content
,
function
(
success
)
{
},
function
(
error
)
{
// eslint-disable-line
})
}
Vue
.
$vux
.
toast
.
show
({
text
:
text
,
type
:
'text'
,
time
:
vm
.
SHOW_TIMES
,
isShowMask
:
vm
.
IS_SHOW_MASK
,
position
:
'top'
,
})
},
/**
...
...
@@ -82,19 +68,13 @@ export default {
showLongCenter
:
function
(
content
)
{
let
vm
=
this
let
text
=
content
||
'操作失败'
if
(
!
process
.
env
.
isMobilePlatform
)
{
Vue
.
$vux
.
toast
.
show
({
text
:
text
,
type
:
'text'
,
time
:
vm
.
SHOW_TIMES
,
isShowMask
:
vm
.
IS_SHOW_MASK
,
position
:
'middle'
,
})
}
else
{
window
.
plugins
.
toast
.
showLongCenter
(
content
,
function
(
success
)
{
},
function
(
error
)
{
// eslint-disable-line
})
}
Vue
.
$vux
.
toast
.
show
({
text
:
text
,
type
:
'text'
,
time
:
vm
.
SHOW_TIMES
,
isShowMask
:
vm
.
IS_SHOW_MASK
,
position
:
'middle'
,
})
},
/**
* 长时间中部提示toast
...
...
@@ -103,19 +83,14 @@ export default {
showLongBottom
:
function
(
content
)
{
let
vm
=
this
let
text
=
content
||
'操作失败'
if
(
!
process
.
env
.
isMobilePlatform
)
{
Vue
.
$vux
.
toast
.
show
({
text
:
text
,
time
:
vm
.
SHOW_TIMES
,
type
:
'text'
,
isShowMask
:
vm
.
IS_SHOW_MASK
,
position
:
'bottom'
,
})
}
else
{
window
.
plugins
.
toast
.
showLongBottom
(
content
,
function
(
success
)
{
},
function
(
error
)
{
// eslint-disable-line
})
}
Vue
.
$vux
.
toast
.
show
({
text
:
text
,
time
:
vm
.
SHOW_TIMES
,
type
:
'text'
,
isShowMask
:
vm
.
IS_SHOW_MASK
,
position
:
'bottom'
,
})
},
/**
* 成功提示框
...
...
@@ -152,35 +127,19 @@ export default {
* @param confirmObject.onConfirm 确定函数
*/
showConfirm
:
function
(
confirmObject
)
{
if
(
!
process
.
env
.
isMobilePlatform
)
{
let
def
=
{
title
:
confirmObject
.
title
||
'提示'
,
content
:
confirmObject
.
content
||
''
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
confirmObject
.
onConfirm
(
1
)
},
onCancel
:
()
=>
{
confirmObject
.
onConfirm
(
0
)
},
}
Vue
.
$vux
.
confirm
.
show
(
def
)
}
else
{
let
message
=
confirmObject
.
content
||
''
let
onConfirm
=
function
(
index
)
{
confirmObject
.
onConfirm
(
index
)
}
let
title
=
confirmObject
.
title
navigator
.
notification
.
confirm
(
message
,
// message
function
(
index
)
{
onConfirm
(
index
-
1
)
},
title
,
// title
[
'取消'
,
'确定'
]
// buttonLabels
)
let
def
=
{
title
:
confirmObject
.
title
||
'提示'
,
content
:
confirmObject
.
content
||
''
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
confirmObject
.
onConfirm
(
1
)
},
onCancel
:
()
=>
{
confirmObject
.
onConfirm
(
0
)
},
}
Vue
.
$vux
.
confirm
.
show
(
def
)
},
/*
* 弹出确认的窗口
...
...
@@ -190,30 +149,16 @@ export default {
*
*/
showPopup
:
function
(
confirmObject
)
{
if
(
!
process
.
env
.
isMobilePlatform
)
{
let
def
=
{
title
:
confirmObject
.
title
||
'提示'
,
content
:
confirmObject
.
content
||
''
,
confirmText
:
'确定'
,
showCancelButton
:
false
,
onConfirm
:
()
=>
{
confirmObject
.
onConfirm
()
},
}
Vue
.
$vux
.
confirm
.
show
(
def
)
}
else
{
var
alertDismissed
=
function
(
index
)
{
let
def
=
{
title
:
confirmObject
.
title
||
'提示'
,
content
:
confirmObject
.
content
||
''
,
confirmText
:
'确定'
,
showCancelButton
:
false
,
onConfirm
:
()
=>
{
confirmObject
.
onConfirm
()
}
let
title
=
confirmObject
.
title
||
'提示'
var
message
=
confirmObject
.
content
||
''
navigator
.
notification
.
alert
(
message
,
// message
alertDismissed
,
// callback
title
||
'提示'
,
// title
'确定'
// buttonName
)
},
}
Vue
.
$vux
.
confirm
.
show
(
def
)
},
/**
* @param actionObject.titleText 弹出框的标题可空
...
...
@@ -298,6 +243,8 @@ export default {
ShowPicturePlugin
.
show
({
imgUrl
:
imgObject
.
imgUrl
,
width
:
imgObject
.
width
,
imgList
:
imgObject
.
imgList
,
startPosition
:
imgObject
.
startPosition
,
})
}
},
...
...
template/src/scripts/hlsUtil.js
View file @
7ff270b0
This diff is collapsed.
Click to expand it.
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