|
|
@ -3,14 +3,14 @@ |
|
|
|
<!-- 顶部类型 --> |
|
|
|
<!-- 顶部类型 --> |
|
|
|
<scroll-view scroll-x='true' class="srollview width100" :style="{top:headerTop}" scroll-with-animation> |
|
|
|
<scroll-view scroll-x='true' class="srollview width100" :style="{top:headerTop}" scroll-with-animation> |
|
|
|
<view class="conent" :class="[newstypeid == item.codeValue ? 'activeconent' : 'frontconent']" |
|
|
|
<view class="conent" :class="[newstypeid == item.codeValue ? 'activeconent' : 'frontconent']" |
|
|
|
v-for="(item,index) in newsTyplist" :key="index" @click="queryMsgByList(item.codeValue)"> |
|
|
|
v-for="(item,index) in newsTyplist" :key="index" @click="changeValue(item.codeValue)"> |
|
|
|
{{item.codeName}}</view> |
|
|
|
{{item.codeName}} |
|
|
|
|
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</scroll-view> |
|
|
|
<view class="mart10 height70"></view> |
|
|
|
<view class="mart10 height70"></view> |
|
|
|
<!-- 内容 --> |
|
|
|
<!-- 内容 --> |
|
|
|
|
|
|
|
|
|
|
|
<view v-if="newsList == ''" |
|
|
|
<view v-if="newsList == ''" class="mart60 fotct font14 fcor666"> |
|
|
|
class="mart60 fotct font14 fcor666"> |
|
|
|
|
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> |
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="newscont width90 border-8r backcorfff mart20" v-for="(item,index) in newsList" :key="index"> |
|
|
|
<view class="newscont width90 border-8r backcorfff mart20" v-for="(item,index) in newsList" :key="index"> |
|
|
@ -35,7 +35,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!-- 交易信息 --> |
|
|
|
<!-- 交易信息 --> |
|
|
|
<view class="width90 mart20" v-if="item.type == 2"> |
|
|
|
<view class="width90 mart20" v-if="item.type == 2"> |
|
|
|
<view class="font18 fcor333" >{{item.title}}</view> |
|
|
|
<view class="font18 fcor333">{{item.title}}</view> |
|
|
|
<view class="mart10 border-r backcor9"> |
|
|
|
<view class="mart10 border-r backcor9"> |
|
|
|
<view class="font20 colore95 fontwig6 paddtop10 fotct">¥{{item.content | msgFormat('price')}}</view> |
|
|
|
<view class="font20 colore95 fontwig6 paddtop10 fotct">¥{{item.content | msgFormat('price')}}</view> |
|
|
|
<view class="width94 mart10 alijusstart font14"> |
|
|
|
<view class="width94 mart10 alijusstart font14"> |
|
|
@ -73,7 +73,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { |
|
|
|
import { |
|
|
|
queryMsgByList, |
|
|
|
getMsgByList, |
|
|
|
getDictionaryByCodeType |
|
|
|
getDictionaryByCodeType |
|
|
|
} from '../../../Utils/Api.js'; |
|
|
|
} from '../../../Utils/Api.js'; |
|
|
|
let app = getApp(); |
|
|
|
let app = getApp(); |
|
|
@ -86,13 +86,16 @@ |
|
|
|
newsTyplist: [], //消息类型 |
|
|
|
newsTyplist: [], //消息类型 |
|
|
|
newsList: [], // 信内容 |
|
|
|
newsList: [], // 信内容 |
|
|
|
newstypeid: 1, //类型id |
|
|
|
newstypeid: 1, //类型id |
|
|
|
headerTop: '0px' |
|
|
|
headerTop: '0px', |
|
|
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
|
|
isNoMoreData: false, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
filters: { |
|
|
|
//过滤器 用于格式化时间 |
|
|
|
//过滤器 用于格式化时间 |
|
|
|
msgFormat: function(value,value1) { |
|
|
|
msgFormat: function(value, value1) { |
|
|
|
let a = JSON.parse(value); |
|
|
|
let a = JSON.parse(value); |
|
|
|
return a[value1]; |
|
|
|
return a[value1]; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -104,6 +107,9 @@ |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
this.getDictionaryByCodeType(); |
|
|
|
this.getDictionaryByCodeType(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
onReachBottom() { |
|
|
|
|
|
|
|
this.getMsgByList(); |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
//查询类型 |
|
|
|
//查询类型 |
|
|
|
getDictionaryByCodeType() { |
|
|
|
getDictionaryByCodeType() { |
|
|
@ -114,21 +120,41 @@ |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
this.newsTyplist = res.return_data; |
|
|
|
this.newsTyplist = res.return_data; |
|
|
|
this.newstypeid = res.return_data[0].codeValue; |
|
|
|
this.newstypeid = res.return_data[0].codeValue; |
|
|
|
this.queryMsgByList(res.return_data[0].codeValue); |
|
|
|
this.getMsgByList(res.return_data[0].codeValue); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//切换 |
|
|
|
|
|
|
|
changeValue(item) { |
|
|
|
|
|
|
|
this.pageNum = 1; |
|
|
|
|
|
|
|
this.newsList = []; |
|
|
|
|
|
|
|
this.isNoMoreData = false; |
|
|
|
|
|
|
|
this.getMsgByList(item); |
|
|
|
|
|
|
|
}, |
|
|
|
//查询列表 |
|
|
|
//查询列表 |
|
|
|
queryMsgByList(item) { |
|
|
|
getMsgByList(item) { |
|
|
|
this.newstypeid = item; |
|
|
|
this.newstypeid = item; |
|
|
|
|
|
|
|
if (this.isNoMoreData) { |
|
|
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let pagenum = this.pageNum; |
|
|
|
let datas = { |
|
|
|
let datas = { |
|
|
|
companyId: app.globalData.companyId, |
|
|
|
companyId: app.globalData.companyId, |
|
|
|
type: item |
|
|
|
type: item, |
|
|
|
|
|
|
|
pageNum: this.pageNum, |
|
|
|
|
|
|
|
pageSize: this.pageSize |
|
|
|
} |
|
|
|
} |
|
|
|
queryMsgByList(datas).then(res => { |
|
|
|
getMsgByList(datas).then(res => { |
|
|
|
if (res.return_code == '000000' && res.return_data) { |
|
|
|
if (res.return_code == '000000' && res.return_data.list != '') { |
|
|
|
this.newsList = res.return_data; |
|
|
|
this.newsList = res.return_data.list; |
|
|
|
}else{ |
|
|
|
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; |
|
|
|
|
|
|
|
if (res.return_data.total == (this.pageNum * this.pageSize)) { |
|
|
|
|
|
|
|
this.isNoMoreData = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.newsList = this.newsList.concat(res.return_data.list); |
|
|
|
|
|
|
|
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; |
|
|
|
|
|
|
|
} else { |
|
|
|
this.newsList = []; |
|
|
|
this.newsList = []; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|