131 lines
2.2 KiB
Vue
131 lines
2.2 KiB
Vue
<template>
|
|
<view class="page">
|
|
<u-navbar class="u-navbar" title="上传情况" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
|
<scroll-view class="content" scroll-y="true">
|
|
|
|
|
|
|
|
|
|
|
|
</scroll-view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import config from '@/config';
|
|
export default {
|
|
data() {
|
|
return {
|
|
proId:uni.getStorageSync('realNameUser').proId,
|
|
type:uni.getStorageSync('realNameUser').type ,
|
|
newsList:[],
|
|
active: -1,
|
|
}
|
|
},
|
|
onLoad() {
|
|
console.log(this.type)
|
|
this.getData()
|
|
},
|
|
methods: {
|
|
getData(){
|
|
let param={
|
|
id:this.proId
|
|
}
|
|
if(this.type.indexOf('3')>-1){//施工端
|
|
param.type="3"
|
|
}
|
|
if(this.type.indexOf('4')>-1){//施工端
|
|
param.type="4"
|
|
}
|
|
console.log(param)
|
|
uni.request({
|
|
url: config.realAppUrl + '/offLine/getNews',
|
|
method: 'post',
|
|
data: param,
|
|
header: {
|
|
'Content-Type': 'application/json',
|
|
Authorization: uni.getStorageSync('realNameToken')
|
|
},
|
|
success: res => {
|
|
console.log(res)
|
|
res = res.data;
|
|
if(res.code==200){
|
|
console.log(res)
|
|
this.newsList = res.data.map(item=>{
|
|
let obj={
|
|
title:item.acceptStation,
|
|
desc:item.acceptTime,
|
|
}
|
|
return obj
|
|
});
|
|
console.log(this.newsList)
|
|
}
|
|
},
|
|
fail: err => {
|
|
console.log(err)
|
|
}
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
// 返回
|
|
leftClick() {
|
|
console.log('返回')
|
|
uni.navigateBack({
|
|
delta: 1 // 返回
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.page {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background-color: #f8f8f8;
|
|
// box-sizing: border-box;
|
|
// padding: 15vh 8vw;
|
|
.content{
|
|
width: 100%;
|
|
height: 84vh;
|
|
margin-top: 20rpx;
|
|
background-color: #f8f8f8;
|
|
padding-bottom: 40rpx;
|
|
}
|
|
|
|
.view-box{
|
|
width: 100%;
|
|
padding: 20rpx 0;
|
|
margin-bottom: 30rpx;
|
|
height: auto;
|
|
background-color: #F2F6F9;
|
|
}
|
|
.view-item{
|
|
width: 100%;
|
|
padding: 20rpx 0;
|
|
margin-bottom: 30rpx;
|
|
height: auto;
|
|
background-color: #F2F6F9;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.imgBox{
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
margin: 0 40rpx;
|
|
}
|
|
.textBox{
|
|
width: 200rpx;
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
}
|
|
|
|
}
|
|
</style>
|