|
@@ -0,0 +1,153 @@
|
|
|
+<template>
|
|
|
+ <!-- pages/me.wxml -->
|
|
|
+ <view class="container">
|
|
|
+ <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="search" @input="search"
|
|
|
+ style="width: 100%;"
|
|
|
+ @cancel="cancel">
|
|
|
+ </uni-search-bar>
|
|
|
+ <view class="rnwdList">
|
|
|
+ <view class="list" @tap="goDetails(item)" v-for="(item, index1) in qbwd" :key="index1">
|
|
|
+ <span class="listTitle">{{ item.titleName }}</span>
|
|
|
+
|
|
|
+ <view class="onePic" v-if="item.urls.length == 1">
|
|
|
+ <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view class="twoPic" v-if="item.urls.length == 2">
|
|
|
+ <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="threePic" v-if="item.urls.length == 3">
|
|
|
+ <image :src="loadImgSrc(item.urls[index2])" v-for="(v, index2) in item.urls" :key="index2">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- <view class="jlSj">
|
|
|
+ <span class="jf">
|
|
|
+ {{ item.jf }}
|
|
|
+ <em class="iconfont icon-jifen"></em>
|
|
|
+ </span>
|
|
|
+ <view class="ck">
|
|
|
+ <span>
|
|
|
+ <em class="iconfont icon-pinglun"></em>
|
|
|
+ {{ item.pl }}
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ <em class="iconfont icon-chakan"></em>
|
|
|
+ {{ item.ck }}
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ <em class="iconfont icon-shoucang"></em>
|
|
|
+ {{ item.dz }}
|
|
|
+ </span>
|
|
|
+ </view>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 新增资讯按钮 -->
|
|
|
+ <!-- <button class="addInfomarionBtn" @click="addInfomation()"></button> -->
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { listWxs ,listWx} from '@/api/information/information.js'
|
|
|
+// pages/me.js
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ qbwd:[],
|
|
|
+ listParams:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 7,
|
|
|
+ titleName: '',
|
|
|
+ type: 11,
|
|
|
+ flag:''
|
|
|
+ },
|
|
|
+ total:0,
|
|
|
+ searchValue:''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created(){
|
|
|
+ this.getList()
|
|
|
+ // 查置顶
|
|
|
+ listWx({}).then(e => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onReachBottom(){
|
|
|
+ let pageNum = this.listParams.pageNum
|
|
|
+ let pageSize = this.listParams.pageSize
|
|
|
+ let total = this.total
|
|
|
+ if(pageNum * pageSize >= total){
|
|
|
+ uni.showToast({
|
|
|
+ title:'暂无更多数据'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.listParams.pageNum += 1;
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ search(){
|
|
|
+ this.listParams.titleName = this.searchValue
|
|
|
+ this.qbwd = []
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ getList(){
|
|
|
+ listWxs(this.listParams).then(res => {
|
|
|
+ this.qbwd = [...this.qbwd,...res.rows]
|
|
|
+ this.total = res.total
|
|
|
+ })
|
|
|
+ },
|
|
|
+ goDetails(e) {
|
|
|
+ let id = e.id || ''
|
|
|
+ let type = 11
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `../informationDetail/informationDetail?id=${id}&type=${type}`
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 新增资讯
|
|
|
+ addInfomation(){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `../informationAdd/informationAdd`
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面加载
|
|
|
+ */
|
|
|
+ onLoad(options) {},
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面初次渲染完成
|
|
|
+ */
|
|
|
+ onReady() {},
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面显示
|
|
|
+ */
|
|
|
+ onShow() {},
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面隐藏
|
|
|
+ */
|
|
|
+ onHide() {},
|
|
|
+ /**
|
|
|
+ * 生命周期函数--监听页面卸载
|
|
|
+ */
|
|
|
+ onUnload() {},
|
|
|
+ /**
|
|
|
+ * 页面相关事件处理函数--监听用户下拉动作
|
|
|
+ */
|
|
|
+ onPullDownRefresh() {},
|
|
|
+ /**
|
|
|
+ * 用户点击右上角分享
|
|
|
+ */
|
|
|
+ onShareAppMessage() {},
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+@import './toLegal.css';
|
|
|
+.container{
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+</style>
|