Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
crisis-event-miniprogram
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
liangyuhang
crisis-event-miniprogram
Commits
d0c0eb96
Commit
d0c0eb96
authored
Jul 22, 2022
by
liangyuhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
危机报告
parent
8effc804
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
241 additions
and
153 deletions
+241
-153
app.wxss
+2
-0
components/eventList/eventList.wxss
+2
-1
components/picture-layer/picture-layer.js
+0
-1
components/reportList/reportList.js
+6
-1
components/reportList/reportList.wxml
+14
-1
components/reportList/reportList.wxss
+42
-62
pages/library/library.js
+21
-10
pages/library/library.json
+5
-1
pages/library/library.wxml
+7
-19
pages/library/library.wxss
+9
-50
pages/report/report.js
+72
-3
pages/report/report.json
+5
-1
pages/report/report.wxml
+15
-1
pages/report/report.wxss
+33
-0
pages/search-page/search-page.wxml
+1
-1
pages/search-result/search-result.js
+1
-1
project.private.config.json
+6
-0
No files found.
app.wxss
View file @
d0c0eb96
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
padding: 0;
padding: 0;
box-sizing: border-box;
box-sizing: border-box;
font-family: Microsoft YaHei;
font-family: Microsoft YaHei;
height:100%;
overflow: scroll;
}
}
...
...
components/eventList/eventList.wxss
View file @
d0c0eb96
...
@@ -37,10 +37,11 @@
...
@@ -37,10 +37,11 @@
.r .brand{
.r .brand{
position: absolute;
position: absolute;
background-color: #E5EDFA;
background-color: #E5EDFA;
font-size: 2
8
rpx;
font-size: 2
6
rpx;
color: #0A63EA;
color: #0A63EA;
bottom: 15rpx;
bottom: 15rpx;
left: 0;
left: 0;
padding: 5rpx 10rpx;
}
}
.r .time{
.r .time{
position: absolute;
position: absolute;
...
...
components/picture-layer/picture-layer.js
View file @
d0c0eb96
...
@@ -21,7 +21,6 @@ Component({
...
@@ -21,7 +21,6 @@ Component({
methods
:
{
methods
:
{
//关闭遮罩层
//关闭遮罩层
closeLayer
(){
closeLayer
(){
console
.
log
(
"点了关闭遮罩层"
)
this
.
triggerEvent
(
'closePicture'
)
this
.
triggerEvent
(
'closePicture'
)
}
}
}
}
...
...
components/reportList/reportList.js
View file @
d0c0eb96
...
@@ -18,6 +18,11 @@ Component({
...
@@ -18,6 +18,11 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
toUrl
(
e
){
var
_url
=
e
.
currentTarget
.
dataset
.
url
wx
.
navigateTo
({
url
:
'/components/out/out?url='
+
_url
})
}
}
}
})
})
components/reportList/reportList.wxml
View file @
d0c0eb96
<!--components/reportList.wxml-->
<!--components/reportList.wxml-->
<text>等危机报告一起</text>
<block wx:for="{{reportList}}" wx:key="index">
<view class="list" bindtap="toUrl" data-url="https://crisis.zhiweidata.com/viewerpdf/{{item.id}}">
<view class="image-box">
<image src="https://crisis.zhiweidata.com/app/{{item.imgUrl}}" mode="aspectFill" lazy-load="true" />
</view>
<view class="r">
<rich-text nodes="{{item.reportName}}" class="title"></rich-text>
<text class="brand">{{item.priBrand}}</text>
<text class="time">{{dateUtil.dateFormat(item.startTime,'yyyy.MM.dd')}}</text>
</view>
</view>
</block>
<wxs module="dateUtil" src="../../wxs/timeUtil.wxs"></wxs>
components/reportList/reportList.wxss
View file @
d0c0eb96
/* components/reportList.wxss */
/* components/reportList.wxss */
.report-first{
/* 列表 */
position: relative;
.list{
width: 100%;
height: 324rpx;
background-color: #ffffff;
border-radius: 10px;
border: solid 2px #eeeeee;
overflow: hidden;
margin-bottom: 25rpx;
}
.report-first image{
width: 100%;
height: 100%;
}
.report-first .info{
position: absolute;
bottom: 0;
width: 100%;
height: 66rpx;
padding: 0 10rpx;
line-height: 66rpx;
background-color: rgba(0,0,0,0.4);
color: #ffffff;font-size: 28rpx;
}
.report-list{
width: 100%;
height: 180rpx;
margin-bottom: 25rpx;
display: flex;
display: flex;
}
height: 150rpx;
.report-list .imgBox {
margin: 20rpx;
height: 100%;
border-bottom: 1px solid #e3e4e4;
margin-right: 20rpx;
}
}
.list .image-box{
.report-list .imgBox image{
width: 150rpx;
text-align:center;
}
.list .image-box image{
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.r{
margin-left: 20rpx;
width: 100%;
width: 100%;
height: 100%;
}
.report-list .content{
position: relative;
position: relative;
height: 180rpx;
}
width: 100%;
.r .title{
}
font-weight: bold;
.content .report-name{
font-size: 30rpx;
position: absolute;
top: 0;
left: 0;
color: #333;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
white-space: nowrap;
width: 100%;
}
}
.r .score{
.content .report-introduction{
position: absolute;
position: absolute;
top: 60rpx;
font-size: 28rpx;
color: #A0A0A0;
top: 50rpx;
left: 0;
left: 0;
color: #999;
}
font-size: 24rpx;
.r .brand{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.content .report-time{
position: absolute;
position: absolute;
bottom: 0;
background-color: #E5EDFA;
font-size: 26rpx;
color: #0A63EA;
bottom: 15rpx;
left: 0;
left: 0;
color: #999;
padding: 5rpx 10rpx;
font-size: 24rpx;
}
}
.r .time{
\ No newline at end of file
position: absolute;
font-size: 28rpx;
color: #A0A0A0;
bottom: 15rpx;
right: 0;
}
\ No newline at end of file
pages/library/library.js
View file @
d0c0eb96
...
@@ -7,20 +7,20 @@ Page({
...
@@ -7,20 +7,20 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
eventList
:[],
tabIndex
:
0
,
conditions
:[
conditions
:[
{
"name"
:
"不限"
},
{
"name"
:
"不限"
},
{
"name"
:
"新消费"
},
{
"name"
:
"新消费"
},
{
"name"
:
"互联网"
},
{
"name"
:
"互联网"
},
{
"name"
:
"医疗"
},
{
"name"
:
"医疗"
},
{
"name"
:
"汽车"
}
//
{"name":"汽车"}
//
{"name":"全部"}
{
"name"
:
"全部"
}
],
],
tabIndex
:
0
,
eventList
:[],
page
:
1
,
page
:
1
,
size
:
10
,
size
:
10
,
total
:
0
,
industry
:
'不限'
,
industry
:
'不限'
,
total
:
-
1
,
isloading
:
false
isloading
:
false
},
},
...
@@ -28,7 +28,7 @@ Page({
...
@@ -28,7 +28,7 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
getE
e
ventList
();
this
.
getEventList
();
},
},
switchTap
(
e
){
switchTap
(
e
){
var
_index
=
e
.
currentTarget
.
dataset
.
index
;
var
_index
=
e
.
currentTarget
.
dataset
.
index
;
...
@@ -40,9 +40,9 @@ Page({
...
@@ -40,9 +40,9 @@ Page({
industry
:
_name
,
industry
:
_name
,
eventList
:[]
eventList
:[]
})
})
this
.
getE
e
ventList
();
this
.
getEventList
();
},
},
getE
e
ventList
(){
getEventList
(){
this
.
setData
({
this
.
setData
({
isloading
:
true
isloading
:
true
})
})
...
@@ -100,7 +100,18 @@ Page({
...
@@ -100,7 +100,18 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
// 重置关键数据
this
.
setData
({
eventList
:[],
page
:
1
,
total
:
0
,
})
// 重新发起请求
var
_this
=
this
;
setTimeout
(
function
()
{
_this
.
getEventList
()
wx
.
stopPullDownRefresh
()
//停止下拉刷新
},
100
);
},
},
/**
/**
...
@@ -119,7 +130,7 @@ Page({
...
@@ -119,7 +130,7 @@ Page({
this
.
setData
({
this
.
setData
({
page
:
this
.
data
.
page
+
1
page
:
this
.
data
.
page
+
1
})
})
this
.
getE
e
ventList
()
this
.
getEventList
()
},
},
/**
/**
...
...
pages/library/library.json
View file @
d0c0eb96
{
{
"usingComponents"
:
{
"usingComponents"
:
{
"eventList"
:
"/components/eventList/eventList"
"eventList"
:
"/components/eventList/eventList"
}
},
"enablePullDownRefresh"
:
true
,
"backgroundColor"
:
"#025FEA"
,
"backgroundTextStyle"
:
"dark"
}
}
\ No newline at end of file
pages/library/library.wxml
View file @
d0c0eb96
<!--pages/library/library.wxml-->
<!--pages/library/library.wxml-->
<view class="condition-con">
<view class="container">
<view class="condition-con">
<view class="condition-list">
<view class="condition-list">
<block wx:for="{{conditions}}" wx:key="index">
<block wx:for="{{conditions}}" wx:key="index">
<view class="condition {{tabIndex==index? 'active' : ''}}" data-index="{{index}}" data-name="{{item.name}}" bind:tap="switchTap" >
<view class="condition {{tabIndex==index? 'active' : ''}}" data-index="{{index}}" data-name="{{item.name}}" bind:tap="switchTap" >
...
@@ -7,23 +8,10 @@
...
@@ -7,23 +8,10 @@
</view>
</view>
</block>
</block>
</view>
</view>
</view>
<!-- <view>
<block wx:for="{{eventList}}" wx:key="index">
<view class="list">
<view class="image-box">
<image src="https://crisis.zhiweidata.com/app/{{item.imgUrl}}" mode="aspectFill" lazy-load="true" />
</view>
<view class="r">
<text class="title">{{item.eventName}}</text>
<view class="score">公关指数:<text style="color:#F7815A">{{item.interveneScore}}</text></view>
<text class="brand">{{item.priBrand}}</text>
<text class="time">{{dateUtil.dateFormat(item.startTime,'yyyy.MM.dd')}}</text>
</view>
</view>
</view>
</block>
</view> -->
<!-- 列表 -->
<!-- 列表 -->
<eventList eventList="{{eventList}}"></eventList>
<view class="list-con">
<eventList eventList="{{eventList}}"></eventList>
</view>
</view>
pages/library/library.wxss
View file @
d0c0eb96
/* pages/library/library.wxss */
/* pages/library/library.wxss */
/* 条件 */
/* 条件 */
.condition-con{
.condition-con{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 80rpx;
height: 80rpx;
background-color: #025FEA;
background-color: #025FEA;
z-index: 999;
}
}
.condition-list{
.condition-list{
display: flex;
display: flex;
...
@@ -20,7 +25,6 @@
...
@@ -20,7 +25,6 @@
font-size: 32rpx;
font-size: 32rpx;
color: #fff;
color: #fff;
}
}
.active::after {
.active::after {
position: absolute;
position: absolute;
content: '';
content: '';
...
@@ -33,53 +37,8 @@
...
@@ -33,53 +37,8 @@
border-radius: 4rpx;
border-radius: 4rpx;
}
}
/* 列表 */
.list{
.list-con{
display: flex;
margin-top: 100rpx;
height: 150rpx;
margin: 20rpx;
border-bottom: 1px solid #e3e4e4;
}
.list .image-box{
width: 150rpx;
text-align:center;
}
.list .image-box image{
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.r{
margin-left: 20rpx;
width: 100%;
position: relative;
}
.r .title{
font-weight: bold;
font-size: 30rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.r .score{
position: absolute;
font-size: 28rpx;
color: #A0A0A0;
top: 50rpx;
left: 0;
}
.r .brand{
position: absolute;
background-color: #E5EDFA;
font-size: 28rpx;
color: #0A63EA;
bottom: 15rpx;
left: 0;
}
.r .time{
position: absolute;
font-size: 28rpx;
color: #A0A0A0;
bottom: 15rpx;
right: 0;
}
}
pages/report/report.js
View file @
d0c0eb96
// pages/report/report.js
// pages/report/report.js
var
http
=
require
(
'../../utils/http'
)
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
conditions
:[
{
"name"
:
"不限"
},
{
"name"
:
"政治敏感"
},
{
"name"
:
"民族歧视"
},
{
"name"
:
"宗教歧视"
},
{
"name"
:
"全部"
}
],
tabIndex
:
0
,
reportList
:[],
page
:
1
,
size
:
10
,
total
:
0
,
category
:
'不限'
,
isloading
:
false
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
getReportList
();
},
switchTap
(
e
){
var
_index
=
e
.
currentTarget
.
dataset
.
index
;
var
_name
=
e
.
currentTarget
.
dataset
.
name
;
this
.
setData
({
tabIndex
:
_index
,
category
:
_name
,
reportList
:[]
})
this
.
getReportList
();
},
getReportList
(){
this
.
setData
({
isloading
:
true
})
wx
.
showLoading
({
title
:
'加载中...'
})
http
.
getRequest
(
'/reports?page='
+
this
.
data
.
page
+
'&size='
+
this
.
data
.
size
+
'&category='
+
this
.
data
.
category
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
this
.
setData
({
reportList
:
this
.
data
.
reportList
.
concat
(
res
.
data
.
data
.
list
),
total
:
res
.
data
.
data
.
total
})
}
wx
.
hideLoading
()
this
.
setData
({
isloading
:
false
})
})
},
},
/**
/**
...
@@ -47,14 +93,37 @@ Page({
...
@@ -47,14 +93,37 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
// 重置关键数据
this
.
setData
({
reportList
:[],
page
:
1
,
total
:
0
,
})
// 重新发起请求
var
_this
=
this
;
setTimeout
(
function
()
{
_this
.
getReportList
()
wx
.
stopPullDownRefresh
()
//停止下拉刷新
},
100
);
},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
if
(
this
.
data
.
page
*
this
.
data
.
size
>=
this
.
data
.
total
){
//下一页无数据
return
wx
.
showToast
({
title
:
'没有下一页了!'
,
icon
:
'none'
})
}
// 防止加载时刷新
if
(
this
.
data
.
isloading
)
return
this
.
setData
({
page
:
this
.
data
.
page
+
1
})
this
.
getReportList
()
},
},
/**
/**
...
...
pages/report/report.json
View file @
d0c0eb96
{
{
"usingComponents"
:
{
"usingComponents"
:
{
"reportList"
:
"/components/reportList/reportList"
"reportList"
:
"/components/reportList/reportList"
}
},
"enablePullDownRefresh"
:
true
,
"backgroundColor"
:
"#025FEA"
,
"backgroundTextStyle"
:
"dark"
}
}
\ No newline at end of file
pages/report/report.wxml
View file @
d0c0eb96
<!--pages/report/report.wxml-->
<!--pages/report/report.wxml-->
<reportList></reportList>
<view class="container">
<view class="condition-con">
<view class="condition-list">
<block wx:for="{{conditions}}" wx:key="index">
<view class="condition {{tabIndex==index? 'active' : ''}}" data-index="{{index}}" data-name="{{item.name}}" bind:tap="switchTap" >
{{item.name}}
</view>
</block>
</view>
</view>
<!-- 列表 -->
<reportList reportList="{{reportList}}"></reportList>
</view>
\ No newline at end of file
pages/report/report.wxss
View file @
d0c0eb96
/* pages/report/report.wxss */
/* pages/report/report.wxss */
/* 条件 */
.condition-con{
height: 80rpx;
background-color: #025FEA;
}
.condition-list{
display: flex;
padding: 0 30rpx;
line-height: 80rpx;
}
.condition{
width: 20vh;
text-align: center;
font-size: 30rpx;
color: rgba(255, 255, 255, 0.5);
}
.active{
position: relative;
font-size: 32rpx;
color: #fff;
}
.active::after {
position: absolute;
content: '';
height: 5rpx;
width: 50rpx;
left: 50%;
bottom: 5rpx;
background: #fff;
margin-left: -25rpx;
border-radius: 4rpx;
}
\ No newline at end of file
pages/search-page/search-page.wxml
View file @
d0c0eb96
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<image src='../../image/clear.png' bindtap='clearHistory'></image>
<image src='../../image/clear.png' bindtap='clearHistory'></image>
</view>
</view>
</view>
</view>
<block wx:for="{{historySearch}}" wx:key='
{{item}}
'>
<block wx:for="{{historySearch}}" wx:key='
item
'>
<view class='list'>
<view class='list'>
<text class='tags' bindtap='onHistorySearch' data-keyword="{{item}}">{{item}}</text>
<text class='tags' bindtap='onHistorySearch' data-keyword="{{item}}">{{item}}</text>
</view>
</view>
...
...
pages/search-result/search-result.js
View file @
d0c0eb96
...
@@ -103,7 +103,7 @@ Page({
...
@@ -103,7 +103,7 @@ Page({
},
},
//搜索
//搜索
search
(){
search
(){
this
.
getListByKeyword
(
e
);
this
.
getListByKeyword
();
},
},
/**
/**
...
...
project.private.config.json
View file @
d0c0eb96
...
@@ -53,6 +53,12 @@
...
@@ -53,6 +53,12 @@
"pathName"
:
"pages/event-detail/event-detail"
,
"pathName"
:
"pages/event-detail/event-detail"
,
"query"
:
"eventId=433"
,
"query"
:
"eventId=433"
,
"scene"
:
null
"scene"
:
null
},
{
"name"
:
"pages/report/report"
,
"pathName"
:
"pages/report/report"
,
"query"
:
""
,
"scene"
:
null
}
}
]
]
}
}
...
...
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