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
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
124 additions
and
20 deletions
+124
-20
list.vue
src/views/Home/comps/list.vue
+18
-4
index.vue
src/views/Home/index.vue
+26
-1
ECommerce.vue
src/views/News/ECommerce.vue
+26
-1
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
+8
-0
No files found.
src/views/Home/comps/list.vue
View file @
74e84621
...
@@ -24,18 +24,32 @@
...
@@ -24,18 +24,32 @@
export
default
{
export
default
{
props
:
[
"list"
],
props
:
[
"list"
],
methods
:
{
methods
:
{
handelMsg
(
obj
)
{
async
handelMsg
(
obj
)
{
if
(
obj
.
directpath
&&
obj
.
directpath
!=
''
){
const
params
=
{
window
.
open
(
obj
.
directpath
,
"_blank"
);
id
:
obj
.
id
,
}
else
{
token
:
this
.
$route
.
query
.
token
||
''
};
let
routeData
=
this
.
$router
.
resolve
({
let
routeData
=
this
.
$router
.
resolve
({
path
:
"/News/Msg"
,
path
:
"/News/Msg"
,
query
:
{
query
:
{
id
:
obj
.
id
,
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"
);
window
.
open
(
routeData
.
href
,
"_blank"
);
}
}
}
else
{
window
.
open
(
routeData
.
href
,
'_blank'
)
}
},
},
handelMore
()
{
handelMore
()
{
...
...
src/views/Home/index.vue
View file @
74e84621
...
@@ -1534,14 +1534,39 @@ export default {
...
@@ -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
({
let
routeData
=
this
.
$router
.
resolve
({
path
:
"/News/Msg"
,
path
:
"/News/Msg"
,
query
:
{
query
:
{
id
:
msg
.
id
,
id
:
msg
.
id
,
},
},
});
});
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"
);
window
.
open
(
routeData
.
href
,
"_blank"
);
}
}
else
{
window
.
open
(
routeData
.
href
,
'_blank'
)
}
},
},
// 专题聚焦列表点击
// 专题聚焦列表点击
ztjjReceive
(
msg
)
{
ztjjReceive
(
msg
)
{
...
...
src/views/News/ECommerce.vue
View file @
74e84621
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<ul
>
<ul
>
<li
v-for=
"(tmp, i) in tableResult.list"
:key=
"i"
@
click=
"getInfo(tmp.id,tmp.directpath)"
><span>
<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>
</ul>
</div>
</div>
...
@@ -252,7 +252,32 @@ export default {
...
@@ -252,7 +252,32 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
path
,
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 @@
...
@@ -23,7 +23,7 @@
<img
:src=
"tmp.picFile"
alt=
""
/>
<img
:src=
"tmp.picFile"
alt=
""
/>
</div>
</div>
<div
class=
"picNews-li-bt"
>
<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>
</div>
</li>
</li>
<li
style=
" height: 0;margin:0"
v-for=
"(i,a) in 4"
:key=
"'a'+a"
></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 @@
...
@@ -49,7 +49,7 @@
</p>
</p>
<ul>
<ul>
<li
v-for=
"(value, index) in item.list"
:key=
"index"
@
click=
"lookDetail(value.id, item.title)"
>
<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>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -316,6 +316,21 @@ export default {
...
@@ -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
(){
goRetailCode
(){
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/News/Retailcode'
,
path
:
'/News/Retailcode'
,
...
...
src/views/News/comps/list.vue
View file @
74e84621
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
v-for=
"(tmp, i) in list"
:key=
"i"
class=
"row"
@
click=
"giveId(tmp.id,tmp.directpath)"
>
<div
v-for=
"(tmp, i) in list"
:key=
"i"
class=
"row"
@
click=
"giveId(tmp.id,tmp.directpath)"
>
<div
class=
"col-lg-10 list-left"
>
<div
class=
"col-lg-10 list-left"
>
<span></span>
<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>
<div
class=
"col-lg-2 list-right"
>
{{
tmp
.
showtime
}}
</div>
<div
class=
"col-lg-2 list-right"
>
{{
tmp
.
showtime
}}
</div>
</div>
</div>
...
@@ -17,20 +17,16 @@ export default {
...
@@ -17,20 +17,16 @@ export default {
giveId
(
id
,
directpath
){
giveId
(
id
,
directpath
){
this
.
$emit
(
'getInfo'
,
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
=
{
const
params
=
{
id
:
id
,
id
:
id
,
token
:
this
.
$route
.
query
.
token
||
''
token
:
this
.
$route
.
query
.
token
||
''
};
};
let
listRes
=
{}
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
)
{
switch
(
this
.
$route
.
name
)
{
case
'DepthTopics'
:
case
'DepthTopics'
:
listRes
=
await
this
.
$api
.
news
.
newsTopicInfo
(
params
)
listRes
=
await
this
.
$api
.
news
.
newsTopicInfo
(
params
)
...
...
src/views/News/index.vue
View file @
74e84621
...
@@ -457,7 +457,7 @@ export default {
...
@@ -457,7 +457,7 @@ export default {
}
}
},
},
// 详情
// 详情
goInfo
(
id
,
directpath
,
name
){
async
goInfo
(
id
,
directpath
,
name
){
if
(
directpath
&&
directpath
!==
''
&&
directpath
.
length
>
0
){
if
(
directpath
&&
directpath
!==
''
&&
directpath
.
length
>
0
){
window
.
open
(
directpath
,
'_blank'
);
window
.
open
(
directpath
,
'_blank'
);
}
else
{
}
else
{
...
@@ -470,6 +470,12 @@ export default {
...
@@ -470,6 +470,12 @@ export default {
}
}
this
.
setMatche
(
matche
);
this
.
setMatche
(
matche
);
const
params
=
{
id
:
id
,
token
:
this
.
$route
.
query
.
token
||
''
};
let
listRes
=
{}
if
(
name
==
'医疗'
){
if
(
name
==
'医疗'
){
let
link
=
this
.
$router
.
resolve
({
let
link
=
this
.
$router
.
resolve
({
path
:
`/News/HealthDetail?id=
${
id
}
`
,
path
:
`/News/HealthDetail?id=
${
id
}
`
,
...
@@ -479,11 +485,17 @@ export default {
...
@@ -479,11 +485,17 @@ export default {
let
link
=
this
.
$router
.
resolve
({
let
link
=
this
.
$router
.
resolve
({
path
:
`/Sell/detail?id=
${
id
}
&preTitle=最新动态`
,
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'
)
window
.
open
(
link
.
href
,
'_blank'
)
}
else
{
}
else
{
let
link
=
this
.
$router
.
resolve
({
let
link
=
this
.
$router
.
resolve
({
path
:
`/News/msg?id=
${
id
}
`
,
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'
)
window
.
open
(
link
.
href
,
'_blank'
)
}
}
...
@@ -504,7 +516,7 @@ export default {
...
@@ -504,7 +516,7 @@ export default {
}
}
},
},
getVideoInfo
(
id
,
directpath
){
async
getVideoInfo
(
id
,
directpath
){
if
(
directpath
&&
directpath
!==
''
&&
directpath
.
length
>
0
){
if
(
directpath
&&
directpath
!==
''
&&
directpath
.
length
>
0
){
window
.
open
(
directpath
,
'_blank'
);
window
.
open
(
directpath
,
'_blank'
);
}
else
{
}
else
{
...
@@ -515,6 +527,15 @@ export default {
...
@@ -515,6 +527,15 @@ export default {
}
}
];
];
this
.
setMatche
(
matche
);
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
({
let
link
=
this
.
$router
.
resolve
({
path
:
`/News/msgVideo?id=
${
id
}
`
,
path
:
`/News/msgVideo?id=
${
id
}
`
,
});
});
...
...
src/views/Sell/detail.vue
View file @
74e84621
...
@@ -37,6 +37,10 @@ export default {
...
@@ -37,6 +37,10 @@ export default {
this
.
curPath
=
'/Sell/pictureList'
;
this
.
curPath
=
'/Sell/pictureList'
;
}
}
this
.
geDetailById
();
this
.
geDetailById
();
window
.
onbeforeunload
=
()
=>
{
localStorage
.
removeItem
(
'msg'
+
this
.
id
)
localStorage
.
removeItem
(
'isList'
+
this
.
id
)
}
},
},
methods
:
{
methods
:
{
// 列表
// 列表
...
@@ -45,6 +49,9 @@ export default {
...
@@ -45,6 +49,9 @@ export default {
id
:
this
.
id
,
id
:
this
.
id
,
};
};
let
listRes
=
null
;
let
listRes
=
null
;
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
{
if
(
this
.
preTitle
===
'商品条码在零售领域应用指南'
)
{
if
(
this
.
preTitle
===
'商品条码在零售领域应用指南'
)
{
console
.
log
(
111
)
console
.
log
(
111
)
listRes
=
await
this
.
$api
.
sell
.
geGuideDetailById
(
params
);
listRes
=
await
this
.
$api
.
sell
.
geGuideDetailById
(
params
);
...
@@ -61,6 +68,7 @@ export default {
...
@@ -61,6 +68,7 @@ export default {
console
.
log
(
222
);
console
.
log
(
222
);
listRes
=
await
this
.
$api
.
sell
.
geDetailById
(
params
);
listRes
=
await
this
.
$api
.
sell
.
geDetailById
(
params
);
}
}
}
const
{
returnCode
,
data
}
=
listRes
;
const
{
returnCode
,
data
}
=
listRes
;
if
(
returnCode
===
"0"
)
{
if
(
returnCode
===
"0"
)
{
...
...
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