Commit 8ed27e36 authored by xinzhedeai's avatar xinzhedeai

add:应知应会样式优化

parent d91a4147
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
}
html, body, #app{
background: #fff;
} }
body { body {
background: #f5f5f5; background: #f5f5f5;
font-family: 'PingFang SC', sans-serif; font-family: 'PingFang SC', sans-serif;
...@@ -14,21 +17,37 @@ ...@@ -14,21 +17,37 @@
.info-section { .info-section {
padding: 0 0.3rem; padding: 0 0.3rem;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
margin-top: .3rem;
} }
.title-wrapper { .title-wrapper {
display: flex; /*
align-items: center; align-items: center;
gap: 0.15rem;
margin-bottom: 0.15rem; margin-bottom: 0.15rem; */
display: flex;
flex-direction: column;
align-items: start;
justify-content: center;
gap: 0.25rem;
width: 6.92rem; width: 6.92rem;
height: 1.96rem; height: 1.96rem;
background: #EAF5FF; background: #EAF5FF;
border-radius: 0.1rem; border-radius: 0.1rem;
padding: .2rem; padding: .2rem .35rem;
border: .01rem solid #7DC3FF; border: .01rem solid #7DC3FF;
} }
.title-wrapper h3{
font-weight: bold;
font-size: 0.3rem;
color: #000000;
}
.title-wrapper p{
font-weight: 500;
font-size: 0.28rem;
color: #656565;
}
.title-icon { .title-icon {
width: 0.4rem; width: 0.4rem;
height: 0.4rem; height: 0.4rem;
...@@ -38,7 +57,7 @@ ...@@ -38,7 +57,7 @@
/* 新增:附件区域样式 */ /* 新增:附件区域样式 */
.attachment-section { .attachment-section {
padding: 0 0.3rem 0.3rem; padding: 0 0.3rem 0.3rem;
background: #fff; /* background: #fff; */
margin-bottom: 0.2rem; margin-bottom: 0.2rem;
} }
...@@ -54,7 +73,7 @@ ...@@ -54,7 +73,7 @@
align-items: center; align-items: center;
gap: 0.1rem; gap: 0.1rem;
padding: 0.15rem; padding: 0.15rem;
background: #f8f9fa; /* background: #f8f9fa; */
border-radius: 6px; border-radius: 6px;
color: #1081E3; color: #1081E3;
font-size: 0.28rem; font-size: 0.28rem;
......
...@@ -14,9 +14,10 @@ ...@@ -14,9 +14,10 @@
<!-- 标题与日期 --> <!-- 标题与日期 -->
<div class="info-section"> <div class="info-section">
<div class="title-wrapper"> <div class="title-wrapper">
<h3 class="video-title">2024年安全生产常识培训视频:危险化学品存储规范</h3> <h3 class="video-title">{{detailInfo.name}}</h3>
<p class="video-date">日期:{{detailInfo.uploadsDate}}</p>
</div> </div>
<p class="video-date">日期:2024-05-20</p>
</div> </div>
<!-- 新增:附件链接区域 --> <!-- 新增:附件链接区域 -->
...@@ -24,13 +25,13 @@ ...@@ -24,13 +25,13 @@
<div class="attachment-list"> <div class="attachment-list">
<div class="attachment-link" @click="previewFile"> <div class="attachment-link" @click="previewFile">
<van-icon name="paperclip" size="0.32rem" /> <van-icon name="paperclip" size="0.32rem" />
<span>{{detailInfo.file}}</span> <span>{{detailInfo.fileName}}</span>
</div> </div>
</div> </div>
</div> </div>
<!-- 两列图文列表 --> <!-- 两列图文列表 -->
<div class="grid-list" v-html="detailInfo.content"> <div style="padding: .2rem .3rem;" v-html="detailInfo.content">
收快递费了时代峰峻 收快递费了时代峰峻
</div> </div>
</div> </div>
......
...@@ -132,6 +132,9 @@ window.addEventListener("load", function () { ...@@ -132,6 +132,9 @@ window.addEventListener("load", function () {
}) })
}, 0); }, 0);
this.detailInfo = JSON.parse(res).data this.detailInfo = JSON.parse(res).data
if(this.detailInfo.file){
this.detailInfo.fileName = this.detailInfo.file.split('/')[this.detailInfo.file.split('/').length-1]
}
console.log(this.detailInfo,'sssss') console.log(this.detailInfo,'sssss')
} }
...@@ -167,98 +170,8 @@ window.addEventListener("load", function () { ...@@ -167,98 +170,8 @@ window.addEventListener("load", function () {
vant.Toast.clear() vant.Toast.clear()
} }
}, },
// previewFile(){
// // location.href = "http://192.168.2.11:8848/gaoquyingjih5-asd-jpaas/src/test/testPdf.pdf"
// location.href = '_pdf_viewer.html'
// },
onSearch() {
console.log('xxxx', this.merName)
this.getList()
},
reset() {
this.page = 0
this.size = 6
this.total = 0
this.hazardList = []
},
getList() {
// 这里添加获取数据的逻辑
vant.Toast.loading({
message: '正在加载...',
forbidClick: true,
loadingType: 'spinner',
})
setTimeout(() => {
http2.post(
{
serviceId: API_KEY_MAP['page']['id'],
interfacePublicKey: API_KEY_MAP['page']['publicKey'],
interfacePrivateKey: API_KEY_MAP['page']['privateKey'],
reqParams: {
sign: 3,
// merId: this.merId ? this.merId : '',
merName: this.shanghuName,
pageNum: this.page++, // 每次请求增加下一页
pageSize: this.size,
},
},
(res) => {
if (!res) {
// 中台返回为undefined 重新请求
vant.Toast.clear()
this.page = this.page - 1 // 重新请求后,分页数恢复上一次请求的值
setTimeout(() => {
this.getList()
}, 0)
return
}
if (res) {
var result = JSON.parse(res)
console.log(result, 'result')
this.loading = false; // 加载状态结束
this.hazardList.push(...result.rows);
this.total = result.total
if (this.page * this.size >= this.total) {
this.finished = true; // 下滑不在刷新数据
}
}
this.loading = false
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
}
)
}, 0)
},
tabChange(title) {
console.log('tab 切换', title)
this.reset()
this.getList()
},
init() {
this.getList()
},
onSearch() {
this.reset()
this.getList()
},
// 新增选择确认方法
viewDetail(item, type) {
let param = {
id: item.id,
pageName: '_anquan_changshi',
}
let url = gemhoUtil.setParameter('_anquan_changshi-detail.html', param)
console.log(url)
gemhoUtil.navigatePage(url, '跳转中...')
},
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment