Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lihuizhen
ec-report-refactor
Commits
09cd0288
Commit
09cd0288
authored
Dec 09, 2022
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: normal title add jump
parent
7bd2aa5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
5 deletions
+37
-5
NormalTitle.vue
components/NormalTitle/NormalTitle.vue
+14
-3
details.vue
pages/details/details.vue
+0
-1
common.js
utils/common.js
+23
-1
No files found.
components/NormalTitle/NormalTitle.vue
View file @
09cd0288
...
@@ -25,9 +25,20 @@
...
@@ -25,9 +25,20 @@
methods
:
{
methods
:
{
onClick
(
url
)
{
onClick
(
url
)
{
if
(
url
!=
''
)
{
if
(
url
!=
''
)
{
uni
.
navigateTo
({
const
num
=
url
.
indexOf
(
'?'
)
url
:
'../../pages/webView/webView?url='
+
encodeURIComponent
(
url
)
const
path
=
url
.
substr
(
0
,
num
)
})
const
query
=
this
.
$u
.
common
.
getQueryFromString
(
url
)
// 当url里面的路径包含viewer且query里面有id字段
if
(
path
.
indexOf
(
'viewer'
)
!=
-
1
&&
Object
.
keys
(
query
).
includes
(
'id'
))
{
const
likeUrl
=
"../../pages/details/details?id="
+
query
.
id
+
"&idList="
+
[
query
.
id
]
+
"&pageSize="
+
'1'
uni
.
navigateTo
({
url
:
likeUrl
})
}
else
{
uni
.
navigateTo
({
url
:
'../../pages/webView/webView?url='
+
encodeURIComponent
(
url
)
})
}
}
}
}
}
}
}
...
...
pages/details/details.vue
View file @
09cd0288
...
@@ -106,7 +106,6 @@
...
@@ -106,7 +106,6 @@
this
.
pageSize
=
option
.
pageSize
this
.
pageSize
=
option
.
pageSize
//如果是最后一个元素,需要提前加载后面列表数据
//如果是最后一个元素,需要提前加载后面列表数据
if
(
this
.
indexs
==
this
.
idList
.
length
-
1
)
{
if
(
this
.
indexs
==
this
.
idList
.
length
-
1
)
{
console
.
log
(
"xiayiye"
)
this
.
getReportIdList
()
this
.
getReportIdList
()
}
}
this
.
getReportCharts
()
this
.
getReportCharts
()
...
...
utils/common.js
View file @
09cd0288
...
@@ -98,6 +98,27 @@ const install = (Vue, vm) => {
...
@@ -98,6 +98,27 @@ const install = (Vue, vm) => {
}
}
return
result
return
result
}
}
/**
* 从string中提取参数
*/
const
getQueryFromString
=
(
string
)
=>
{
const
num
=
string
.
indexOf
(
"?"
)
const
qs
=
string
.
substr
(
num
+
1
)
// 获取url中"?"符后的字串
let
args
=
{}
// 保存参数数据的对象
const
items
=
qs
.
length
?
qs
.
split
(
"&"
)
:
[]
// 取得每一个参数项,
let
item
=
null
const
len
=
items
.
length
;
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
item
=
items
[
i
].
split
(
"="
);
var
name
=
decodeURIComponent
(
item
[
0
]),
value
=
decodeURIComponent
(
item
[
1
]);
if
(
name
)
{
args
[
name
]
=
value
;
}
}
return
args
;
}
vm
.
$u
.
common
=
{
vm
.
$u
.
common
=
{
converFunction
,
converFunction
,
...
@@ -106,7 +127,8 @@ const install = (Vue, vm) => {
...
@@ -106,7 +127,8 @@ const install = (Vue, vm) => {
dateFormat
,
dateFormat
,
pxToRpx
,
pxToRpx
,
rpxToPx
,
rpxToPx
,
chunk
chunk
,
getQueryFromString
}
}
}
}
...
...
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