Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a34526f5
authored
May 26, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
新闻详情
parent
af6fa66e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
63 deletions
assets/css/mine/news.scss
pages/mine/news.vue
pages/mine/zqsx.vue
router/index.js
assets/css/mine/news.scss
View file @
a34526f5
.page-news
{
padding-top
:
1
60
rpx
;
padding-top
:
1
58
rpx
;
background
:
linear-gradient
(
200deg
,
#d6e8ff
0%
,
#f5f5f7
277px
);
.icon-search
{
font-size
:
44rpx
;
...
...
@@ -11,6 +11,7 @@
left
:
0
;
right
:
0
;
width
:
100%
;
height
:
73rpx
;
padding
:
16rpx
0
16rpx
24rpx
;
border-bottom
:
1px
solid
#f0f0f2
;
z-index
:
99
;
...
...
@@ -21,6 +22,11 @@
font-size
:
28rpx
;
color
:
#484b59
;
margin-right
:
35rpx
;
transition
:
all
0
.4s
ease
;
white-space
:
nowrap
;
&
.curr
{
font-weight
:
600
;
}
&.
curr
:
:
after
{
position
:
absolute
;
bottom
:
-4rpx
;
...
...
@@ -168,3 +174,15 @@
}
}
}
.no-data
{
image
{
width
:
356rpx
;
height
:
356rpx
;
}
.tt
{
margin-top
:
32rpx
;
font-size
:
28rpx
;
color
:
#292b33
;
}
}
pages/mine/news.vue
View file @
a34526f5
...
...
@@ -6,60 +6,27 @@
</
template
>
</navElement>
<view
class=
"tab"
>
<text
class=
"box curr"
>
行业热点
</text>
<text
class=
"box"
>
猎芯公告
</text>
<text
class=
"box"
>
猎芯活动
</text>
<text
class=
"box"
>
知识分享
</text>
<text
class=
"box"
v-for=
"(item, index) in cat_list"
:key=
"index"
:class=
"{ curr: curr == index }"
@
click
.
stop=
"tab(index)"
>
{{ item.cat_name }}
</text>
</view>
<view
class=
"list"
>
<navigator
class=
"box"
url=
"/article"
hover-class=
"none"
>
<view
class=
"pic"
><image
mode=
"aspectFill"
src=
"https://img.ichunt.com/images/ichunt/202305/20/ffa1060a38803d5b436b33259fe142d0.jpg"
></image></view>
</navigator>
<navigator
class=
"box"
url=
"/article"
hover-class=
"none"
>
<view
class=
"list"
v-if=
"content_list.length > 0"
>
<a
class=
"box"
:href=
"'/#/article/' + item.art_id"
v-for=
"(item, index) in content_list"
:key=
"index"
>
<view
class=
"pic"
>
<image
mode=
"aspectFill"
src=
"https://img.ichunt.com/images/ichunt/202305/20/ffa1060a38803d5b436b33259fe142d0.jpg
"
></image>
<image
mode=
"aspectFill"
:src=
"item.litpic || 'https://img.ichunt.com/images/ichunt/202305/26/e512c97ccd155a504e972c7c27d75a35.jpg'"
:mode=
"mode"
lazy-load=
"true
"
></image>
<view
class=
"uni-text"
>
<view
class=
"desc"
>
猎芯以数字化方式构建全新质检体系,保障企业猎芯以数字化方式构建全新质检体系,保障企业用…猎芯以数字化方式构建全新质检体系,保障企业
</view>
<view
class=
"desc"
>
{{ item.title }}
</view>
<view
class=
"desc-bar row bothSide"
>
<view
class=
"label row verCenter"
>
<view
class=
"label-box row rowCenter verCenter"
>
专用传感器
</view>
<view
class=
"label-box"
>
标签
</view>
<view
v-for=
"(v, i) in item.tag"
:key=
"i"
class=
"label-box row rowCenter verCenter"
>
{{ v.tag }}
</view>
</view>
<text
class=
"time"
>
2023-03-16 18:23:17
</text>
<text
class=
"time"
>
{{ item.publish_time | formatDate }}
</text>
</view>
</view>
</view>
</navigator>
<navigator
class=
"box"
url=
"/article"
hover-class=
"none"
>
<view
class=
"pic"
>
<image
mode=
"aspectFill"
src=
"https://img.ichunt.com/images/ichunt/202305/20/ffa1060a38803d5b436b33259fe142d0.jpg"
></image>
<view
class=
"uni-text"
>
<view
class=
"desc"
>
猎芯以数字化方式构建全新质检体系,保障企业猎芯以数字化方式构建全新质检体系,保障企业用…猎芯以数字化方式构建全新质检体系,保障企业
</view>
<view
class=
"desc-bar row bothSide"
>
<view
class=
"label row verCenter"
>
<view
class=
"label-box row rowCenter verCenter"
>
专用传感器
</view>
<view
class=
"label-box"
>
标签
</view>
</view>
<text
class=
"time"
>
2023-03-16 18:23:17
</text>
</view>
</view>
</view>
</navigator>
<navigator
class=
"box"
url=
"/article"
hover-class=
"none"
>
<view
class=
"pic"
>
<image
mode=
"aspectFill"
src=
"https://img.ichunt.com/images/ichunt/202305/20/ffa1060a38803d5b436b33259fe142d0.jpg"
></image>
<view
class=
"uni-text"
>
<view
class=
"desc"
>
猎芯以数字化方式构建全新质检体系,保障企业猎芯以数字化方式构建全新质检体系,保障企业用…猎芯以数字化方式构建全新质检体系,保障企业
</view>
<view
class=
"desc-bar row bothSide"
>
<view
class=
"label row verCenter"
>
<view
class=
"label-box row rowCenter verCenter"
>
专用传感器
</view>
<view
class=
"label-box"
>
标签
</view>
</view>
<text
class=
"time"
>
2023-03-16 18:23:17
</text>
</view>
</view>
</view>
</navigator>
</a>
</view>
<view
class=
"no-data column rowCenter verCenter"
v-else
>
<image
src=
"../../static/nodate.png"
></image>
<text
class=
"tt"
>
暂无新闻信息
</text>
</view>
</view>
</template>
...
...
@@ -72,10 +39,77 @@ export default {
navElement
},
data
()
{
return
{};
return
{
mode
:
'scaleToFill'
,
curr
:
0
,
cat_list
:
[],
content_list
:
[],
hasMoreData
:
true
,
//是否分页加载
p
:
1
,
limit
:
30
,
searchParams
:
{
cat_id
:
''
}
};
},
onShow
()
{
this
.
getData
();
},
onReachBottom
()
{
if
(
!
this
.
hasMoreData
)
{
return
;
}
this
.
p
++
;
this
.
getData
();
},
filters
:
{
formatDate
(
value
)
{
// 过滤器函数
const
date
=
new
Date
(
value
*
1000
);
const
year
=
date
.
getFullYear
();
const
month
=
(
'0'
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
);
const
day
=
(
'0'
+
date
.
getDate
()).
slice
(
-
2
);
const
hour
=
(
'0'
+
date
.
getHours
()).
slice
(
-
2
);
const
minute
=
(
'0'
+
date
.
getMinutes
()).
slice
(
-
2
);
const
second
=
(
'0'
+
date
.
getSeconds
()).
slice
(
-
2
);
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hour
}
:
${
minute
}
:
${
second
}
`
;
}
},
onShow
()
{},
methods
:
{}
methods
:
{
tab
(
index
)
{
this
.
curr
=
index
;
this
.
searchParams
.
cat_id
=
this
.
cat_list
[
index
].
cat_id
;
this
.
resetChange
();
this
.
getData
();
window
.
scrollTo
({
top
:
0
,
behavior
:
'smooth'
});
},
/**
* 重置
*/
resetChange
()
{
this
.
content_list
=
[];
this
.
p
=
1
;
},
getData
()
{
var
params
=
Object
.
assign
({},
this
.
searchParams
,
{
p
:
this
.
p
},
{
limit
:
this
.
limit
});
this
.
request
(
Api_Url
+
'/Article/Article/index'
,
'POST'
,
params
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
cat_list
=
res
.
data
.
cat_list
;
if
(
res
.
data
.
content_list
.
length
>
0
)
{
this
.
hasMoreData
=
true
;
this
.
content_list
=
this
.
content_list
.
concat
(
res
.
data
.
content_list
);
}
else
{
this
.
hasMoreData
=
false
;
}
}
else
{
this
.
hasMoreData
=
false
;
}
});
}
}
};
</
script
>
...
...
pages/mine/zqsx.vue
View file @
a34526f5
...
...
@@ -76,7 +76,7 @@
<text
class=
"t2"
>
正在为您安排专人对接,请注意接听预留电话
</text>
</view>
</view>
<view
class=
"btn row rowCenter verCenter"
>
确定
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"reload()"
>
确定
</view>
</view>
</uni-popup>
</view>
...
...
@@ -91,7 +91,7 @@ export default {
index
:
-
1
,
array
:
[{
name
:
'代理商'
,
value
:
3
},
{
name
:
'终端采购商'
,
value
:
1
},
{
name
:
'代工厂'
,
value
:
2
},
{
name
:
'学校、科研机构'
,
value
:
4
},
{
name
:
'贸易商'
,
value
:
5
},
{
name
:
'个人'
,
value
:
0
},
{
name
:
'其他'
,
value
:
6
}],
image_list
:
[],
//图片列表
maxNum
:
1
0
,
//最大上传图片数量
maxNum
:
1
,
//最大上传图片数量
formParams
:
{
com_name
:
''
,
linkman
:
''
,
...
...
@@ -162,9 +162,6 @@ export default {
url
:
Oss_Url
+
'/uploadFile?sys_type=4'
,
filePath
:
tempFilePaths
[
i
],
name
:
'file'
,
header
:
{
'Content-Type'
:
'multipart/form-data'
},
success
:
uploadFileRes
=>
{
uni
.
hideLoading
();
var
data
=
JSON
.
parse
(
uploadFileRes
.
data
);
...
...
@@ -185,6 +182,9 @@ export default {
}
});
},
reload
()
{
window
.
location
.
reload
();
},
submit
()
{
if
(
!
this
.
formParams
.
com_name
)
{
uni
.
showToast
({
...
...
@@ -222,16 +222,11 @@ export default {
return
false
;
}
this
.
formParams
.
business_license_src
=
this
.
image_list
[
0
];
this
.
request
(
Api_Url
+
'/help/help/addCreditApply'
,
'POST'
,
this
.
formParams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'提交成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
open
();
},
2000
);
this
.
open
();
}
else
{
uni
.
showModal
({
itle
:
'提示'
,
...
...
router/index.js
View file @
a34526f5
...
...
@@ -179,7 +179,7 @@ const router = new Router({
},
{
path
:
'/pages/mine/article'
,
aliasPath
:
'/article'
,
aliasPath
:
'/article
/:cat_id
'
,
meta
:
{
title
:
'新闻详情'
,
auth
:
true
...
...
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