Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
74e84621
Commit
74e84621
authored
Apr 26, 2024
by
田爽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
闪动优化
parent
8dc17740
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
146 additions
and
42 deletions
+146
-42
list.vue
src/views/Home/comps/list.vue
+24
-10
index.vue
src/views/Home/index.vue
+27
-2
ECommerce.vue
src/views/News/ECommerce.vue
+27
-2
PicNews.vue
src/views/News/PicNews.vue
+1
-1
Retail.vue
src/views/News/Retail.vue
+16
-1
list.vue
src/views/News/comps/list.vue
+6
-10
index.vue
src/views/News/index.vue
+23
-2
detail.vue
src/views/Sell/detail.vue
+22
-14
No files found.
src/views/Home/comps/list.vue
View file @
74e84621
...
...
@@ -24,17 +24,31 @@
export
default
{
props
:
[
"list"
],
methods
:
{
handelMsg
(
obj
)
{
if
(
obj
.
directpath
&&
obj
.
directpath
!=
''
){
window
.
open
(
obj
.
directpath
,
"_blank"
);
async
handelMsg
(
obj
)
{
const
params
=
{
id
:
obj
.
id
,
token
:
this
.
$route
.
query
.
token
||
''
};
let
routeData
=
this
.
$router
.
resolve
({
path
:
"/News/Msg"
,
query
:
{
id
:
obj
.
id
,
},
});
let
listRes
=
await
this
.
$api
.
news
.
newsInfo
(
params
)
const
{
returnCode
,
data
,
returnMsg
}
=
listRes
;
if
(
returnCode
===
"0"
&&
data
!=
null
)
{
localStorage
.
setItem
(
"msg"
+
obj
.
id
,
JSON
.
stringify
(
listRes
));
localStorage
.
setItem
(
"isList"
+
obj
.
id
,
1
);
if
(
data
.
directpath
&&
data
.
directpath
!==
""
&&
data
.
directpath
.
length
>
0
)
{
window
.
open
(
data
.
directpath
,
"_blank"
);
localStorage
.
removeItem
(
'msg'
+
obj
.
id
)
localStorage
.
removeItem
(
'isList'
+
obj
.
id
)
}
else
{
window
.
open
(
routeData
.
href
,
"_blank"
);
}
}
else
{
let
routeData
=
this
.
$router
.
resolve
({
path
:
"/News/Msg"
,
query
:
{
id
:
obj
.
id
,
},
});
window
.
open
(
routeData
.
href
,
"_blank"
);
window
.
open
(
routeData
.
href
,
'_blank'
)
}
},
...
...
src/views/Home/index.vue
View file @
74e84621
...
...
@@ -1534,14 +1534,39 @@ export default {
}
},
// 党建文化列表点击
djwhReceive
(
msg
)
{
async
djwhReceive
(
msg
)
{
// let routeData = this.$router.resolve({
// path: "/News/Msg",
// query: {
// id: msg.id,
// },
// });
// window.open(routeData.href, "_blank");
const
params
=
{
id
:
msg
.
id
,
token
:
this
.
$route
.
query
.
token
||
''
};
let
routeData
=
this
.
$router
.
resolve
({
path
:
"/News/Msg"
,
query
:
{
id
:
msg
.
id
,
},
});
window
.
open
(
routeData
.
href
,
"_blank"
);
let
listRes
=
await
this
.
$api
.
news
.
newsInfo
(
params
)
const
{
returnCode
,
data
,
returnMsg
}
=
listRes
;
if
(
returnCode
===
"0"
&&
data
!=
null
)
{
localStorage
.
setItem
(
"msg"
+
msg
.
id
,
JSON
.
stringify
(
listRes
));
localStorage
.
setItem
(
"isList"
+
msg
.
id
,
1
);
if
(
data
.
directpath
&&
data
.
directpath
!==
""
&&
data
.
directpath
.
length
>
0
)
{
window
.
open
(
data
.
directpath
,
"_blank"
);
localStorage
.
removeItem
(
'msg'
+
msg
.
id
)
localStorage
.
removeItem
(
'isList'
+
msg
.
id
)
}
else
{
window
.
open
(
routeData
.
href
,
"_blank"
);
}
}
else
{
window
.
open
(
routeData
.
href
,
'_blank'
)
}
},
// 专题聚焦列表点击
ztjjReceive
(
msg
)
{
...
...
src/views/News/ECommerce.vue
View file @
74e84621
...
...
@@ -40,7 +40,7 @@
<ul
>
<li
v-for=
"(tmp, i) in tableResult.list"
:key=
"i"
@
click=
"getInfo(tmp.id,tmp.directpath)"
><span>
<a
:href=
"tmp.href"
v-html=
"tmp.title"
target=
"_blank"
></a></span></li>
<a
:href=
"tmp.href"
@
click
.
prevent=
"InfoFn(tmp.id, tmp.href)"
v-html=
"tmp.title"
target=
"_blank"
></a></span></li>
</ul>
</div>
...
...
@@ -252,7 +252,32 @@ export default {
this
.
$router
.
push
({
path
:
path
,
});
}
},
async
InfoFn
(
id
,
href
)
{
const
params
=
{
id
:
id
,
token
:
this
.
$route
.
query
.
token
||
''
};
const
listRes
=
await
this
.
$api
.
news
.
newsInfo
(
params
);
const
{
returnCode
,
data
,
returnMsg
}
=
listRes
;
if
(
returnCode
===
"0"
&&
data
!=
null
)
{
localStorage
.
setItem
(
"msg"
+
id
,
JSON
.
stringify
(
listRes
));
localStorage
.
setItem
(
"isList"
+
id
,
1
);
// let link = this.$router.resolve({
// path: `/News/msg?id=${id}`,
// });
// window.open(link.href,'_blank')
if
(
data
.
directpath
&&
data
.
directpath
!==
""
&&
data
.
directpath
.
length
>
0
)
{
window
.
open
(
data
.
directpath
,
"_blank"
);
localStorage
.
removeItem
(
'msg'
+
this
.
id
)
localStorage
.
removeItem
(
'isList'
+
this
.
id
)
}
else
{
window
.
open
(
href
,
'_blank'
)
}
}
else
{
window
.
open
(
href
,
'_blank'
)
}
},
},
};
...
...
src/views/News/PicNews.vue
View file @
74e84621
...
...
@@ -23,7 +23,7 @@
<img
:src=
"tmp.picFile"
alt=
""
/>
</div>
<div
class=
"picNews-li-bt"
>
<a
:href=
"tmp.href"
v-html=
"tmp.title"
target=
"_blank"
></a>
<a
:href=
"tmp.href"
@
click
.
prevent=
"InfoFn(tmp.articleId, tmp.href)"
v-html=
"tmp.title"
target=
"_blank"
></a>
</div>
</li>
<li
style=
" height: 0;margin:0"
v-for=
"(i,a) in 4"
:key=
"'a'+a"
></li>
...
...
src/views/News/Retail.vue
View file @
74e84621
...
...
@@ -49,7 +49,7 @@
</p>
<ul>
<li
v-for=
"(value, index) in item.list"
:key=
"index"
@
click=
"lookDetail(value.id, item.title)"
>
<a
:href=
"value.href"
v-html=
"value.title"
target=
"_blank"
></a>
<a
:href=
"value.href"
@
click=
"goInfo(value.id, value.href, item.title)"
v-html=
"value.title"
target=
"_blank"
></a>
</li>
</ul>
</div>
...
...
@@ -316,6 +316,21 @@ export default {
}
});
},
async
goInfo
(
id
,
href
,
title
)
{
const
params
=
{
id
:
id
};
let
listRes
=
{}
if
(
title
===
'商品条码在零售领域应用指南'
)
{
listRes
=
await
this
.
$api
.
sell
.
geGuideDetailById
(
params
);
}
else
{
console
.
log
(
222
);
listRes
=
await
this
.
$api
.
sell
.
geDetailById
(
params
);
}
localStorage
.
setItem
(
"msgRetail"
+
id
,
JSON
.
stringify
(
listRes
));
localStorage
.
setItem
(
"isRetailList"
+
id
,
1
);
window
.
open
(
href
,
'_blank'
)
},
goRetailCode
(){
this
.
$router
.
push
({
path
:
'/News/Retailcode'
,
...
...
src/views/News/comps/list.vue
View file @
74e84621
...
...
@@ -3,7 +3,7 @@
<div
v-for=
"(tmp, i) in list"
:key=
"i"
class=
"row"
@
click=
"giveId(tmp.id,tmp.directpath)"
>
<div
class=
"col-lg-10 list-left"
>
<span></span>
<span><a
:href=
"tmp.href"
@
click
.
prevent=
"InfoFn(tmp.id, tmp.href)"
v-html=
"tmp.title"
target=
"_blank"
></a></span>
<span><a
:href=
"tmp.href"
@
click
.
prevent=
"InfoFn(tmp.id, tmp.href
, tmp.directpath
)"
v-html=
"tmp.title"
target=
"_blank"
></a></span>
</div>
<div
class=
"col-lg-2 list-right"
>
{{
tmp
.
showtime
}}
</div>
</div>
...
...
@@ -17,20 +17,16 @@ export default {
giveId
(
id
,
directpath
){
this
.
$emit
(
'getInfo'
,
id
,
directpath
)
},
async
InfoFn
(
id
,
href
)
{
async
InfoFn
(
id
,
href
,
directpath
)
{
if
(
id
===
undefined
&&
href
)
{
window
.
open
(
directpath
,
"_blank"
);
return
}
const
params
=
{
id
:
id
,
token
:
this
.
$route
.
query
.
token
||
''
};
let
listRes
=
{}
console
.
log
(
'看看路由'
,
this
.
$route
)
if
(
this
.
$route
.
name
===
'DepthTopics'
)
{
listRes
=
await
this
.
$api
.
news
.
newsTopicInfo
(
params
);
}
else
if
(
this
.
$route
.
name
===
'Video'
){
listRes
=
await
this
.
$api
.
news
.
jcspiInfo
(
params
);
}
else
{
listRes
=
await
this
.
$api
.
news
.
newsInfo
(
params
);
}
switch
(
this
.
$route
.
name
)
{
case
'DepthTopics'
:
listRes
=
await
this
.
$api
.
news
.
newsTopicInfo
(
params
)
...
...
src/views/News/index.vue
View file @
74e84621
...
...
@@ -457,7 +457,7 @@ export default {
}
},
// 详情
goInfo
(
id
,
directpath
,
name
){
async
goInfo
(
id
,
directpath
,
name
){
if
(
directpath
&&
directpath
!==
''
&&
directpath
.
length
>
0
){
window
.
open
(
directpath
,
'_blank'
);
}
else
{
...
...
@@ -470,6 +470,12 @@ export default {
}
this
.
setMatche
(
matche
);
const
params
=
{
id
:
id
,
token
:
this
.
$route
.
query
.
token
||
''
};
let
listRes
=
{}
if
(
name
==
'医疗'
){
let
link
=
this
.
$router
.
resolve
({
path
:
`/News/HealthDetail?id=
${
id
}
`
,
...
...
@@ -479,11 +485,17 @@ export default {
let
link
=
this
.
$router
.
resolve
({
path
:
`/Sell/detail?id=
${
id
}
&preTitle=最新动态`
,
});
listRes
=
await
this
.
$api
.
sell
.
geDetailById
(
params
)
localStorage
.
setItem
(
"msgRetail"
+
id
,
JSON
.
stringify
(
listRes
));
localStorage
.
setItem
(
"isRetailList"
+
id
,
1
);
window
.
open
(
link
.
href
,
'_blank'
)
}
else
{
let
link
=
this
.
$router
.
resolve
({
path
:
`/News/msg?id=
${
id
}
`
,
});
listRes
=
await
this
.
$api
.
news
.
newsInfo
(
params
)
localStorage
.
setItem
(
"msg"
+
id
,
JSON
.
stringify
(
listRes
));
localStorage
.
setItem
(
"isList"
+
id
,
1
);
window
.
open
(
link
.
href
,
'_blank'
)
}
...
...
@@ -504,7 +516,7 @@ export default {
}
},
getVideoInfo
(
id
,
directpath
){
async
getVideoInfo
(
id
,
directpath
){
if
(
directpath
&&
directpath
!==
''
&&
directpath
.
length
>
0
){
window
.
open
(
directpath
,
'_blank'
);
}
else
{
...
...
@@ -515,6 +527,15 @@ export default {
}
];
this
.
setMatche
(
matche
);
const
params
=
{
id
:
id
,
token
:
this
.
$route
.
query
.
token
||
''
};
let
listRes
=
{}
listRes
=
await
this
.
$api
.
news
.
jcspiInfo
(
params
)
const
{
returnCode
,
data
,
returnMsg
}
=
listRes
;
localStorage
.
setItem
(
"msg"
+
id
,
JSON
.
stringify
(
listRes
));
localStorage
.
setItem
(
"isList"
+
id
,
1
);
let
link
=
this
.
$router
.
resolve
({
path
:
`/News/msgVideo?id=
${
id
}
`
,
});
...
...
src/views/Sell/detail.vue
View file @
74e84621
...
...
@@ -37,6 +37,10 @@ export default {
this
.
curPath
=
'/Sell/pictureList'
;
}
this
.
geDetailById
();
window
.
onbeforeunload
=
()
=>
{
localStorage
.
removeItem
(
'msg'
+
this
.
id
)
localStorage
.
removeItem
(
'isList'
+
this
.
id
)
}
},
methods
:
{
// 列表
...
...
@@ -45,21 +49,25 @@ export default {
id
:
this
.
id
,
};
let
listRes
=
null
;
if
(
this
.
preTitle
===
'商品条码在零售领域应用指南'
)
{
console
.
log
(
111
)
listRes
=
await
this
.
$api
.
sell
.
geGuideDetailById
(
params
);
}
else
if
(
this
.
preTitle
===
'图片集'
)
{
console
.
log
(
333
);
let
flag
=
this
.
$route
.
query
&&
this
.
$route
.
query
.
flag
?
this
.
$route
.
query
.
flag
:
''
;
if
(
flag
==
2
){
listRes
=
await
this
.
$api
.
sell
.
getPictureById2
(
params
);
}
else
{
listRes
=
await
this
.
$api
.
sell
.
getPictureById
(
params
);
}
if
(
JSON
.
parse
(
localStorage
.
getItem
(
'msgRetail'
+
this
.
id
))
&&
JSON
.
parse
(
localStorage
.
getItem
(
'isRetailList'
+
this
.
id
))
==
1
){
listRes
=
localStorage
.
getItem
(
'msgRetail'
+
this
.
id
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'msgRetail'
+
this
.
id
))
:
null
}
else
{
console
.
log
(
222
);
listRes
=
await
this
.
$api
.
sell
.
geDetailById
(
params
);
if
(
this
.
preTitle
===
'商品条码在零售领域应用指南'
)
{
console
.
log
(
111
)
listRes
=
await
this
.
$api
.
sell
.
geGuideDetailById
(
params
);
}
else
if
(
this
.
preTitle
===
'图片集'
)
{
console
.
log
(
333
);
let
flag
=
this
.
$route
.
query
&&
this
.
$route
.
query
.
flag
?
this
.
$route
.
query
.
flag
:
''
;
if
(
flag
==
2
){
listRes
=
await
this
.
$api
.
sell
.
getPictureById2
(
params
);
}
else
{
listRes
=
await
this
.
$api
.
sell
.
getPictureById
(
params
);
}
}
else
{
console
.
log
(
222
);
listRes
=
await
this
.
$api
.
sell
.
geDetailById
(
params
);
}
}
const
{
returnCode
,
data
}
=
listRes
;
...
...
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