Commit 00c05b7d by LJM

css

parent 85c56cd8
......@@ -274,3 +274,16 @@
color: #fff;
}
}
.no-data {
padding-bottom: 24rpx;
image {
width: 356rpx;
height: 356rpx;
}
.tt {
margin-top: 32rpx;
font-size: 28rpx;
color: #292b33;
}
}
......@@ -5,14 +5,14 @@
<text class="iconfont icon-arrleft" v-back></text>
<view class="input-box row verCenter">
<text class="iconfont icon-search"></text>
<input type="text" placeholder="请输入文章关键字查找" class="uni-input" v-model="searchParams.title" />
<input type="text" placeholder="请输入文章关键字查找" class="uni-input" v-model="searchParams.title" @input="handleInput()" />
</view>
</view>
<view class="btn">搜索</view>
<view class="btn" @click="handleInput()">搜索</view>
</view>
<view class="uni-swiper-wrap">
<view class="uni-swiper-wrap" v-if="ad.length > 0">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
<swiper-item v-for="(item, index) in ad" :key="index"><image mode="aspectFill" :src="item" lazy-load="true"></image></swiper-item>
<swiper-item v-for="(item, index) in ad" :key="index"><image mode="aspectFill" :src="item.images" lazy-load="true"></image></swiper-item>
</swiper>
</view>
<view class="content">
......@@ -41,14 +41,15 @@
</view>
</view>
</view>
<view class="btn row rowCenter verCenter">下载</view>
<view class="btn row rowCenter verCenter" v-if="is_login">下载</view>
<navigator class="btn row rowCenter verCenter" url="/login?referer=/download" v-else>下载</navigator>
</view>
</view>
<view class="no-data column rowCenter verCenter" v-else>
<image src="../../static/nodate.png"></image>
<text class="tt">暂无相关数据</text>
<text class="tt">暂无相关类目数据</text>
</view>
<view class="more row rowCenter verCenter">
<view class="more row rowCenter verCenter" @click="more()" v-if="flag">
<text class="t1">查看更多</text>
<text class="iconfont icon-arrbot"></text>
</view>
......@@ -63,36 +64,36 @@
<text class="t1" @click="open()">写留言</text>
</view>
</view>
<view class="list">
<view class="box row" v-for="(item, index) in 3" :key="index">
<view class="pic"><image src="https://img.ichunt.com/images/ichunt/202305/27/58c2e7a3d42ed265a2c763bf704d807a.jpg" mode="aspectFill"></image></view>
<view class="message-content">
<view class="t1" style="margin-bottom: 12rpx;">匿名用户</view>
<view class="t2" style="margin-bottom: 13rpx;">如果你既不热爱你的工作,也不对之嗤之以鼻,那说明你做的还不够多</view>
<view class="list" v-if="message.length > 0">
<view class="box row" v-for="(item, index) in message" :key="index">
<view class="pic"><image :src="item.user_pic" mode="aspectFill"></image></view>
<view class="message-content" style="width: 600rpx;">
<view class="t1" style="margin-bottom: 12rpx;">{{ item.user_account }}</view>
<view class="t2" style="margin-bottom: 13rpx;">{{ item.user_content }}</view>
<view class="row bothSide verCenter">
<view class="time">2023-04-19 11:30:30 广东</view>
<view class="time">{{ item.user_time }} {{ item.user_area }}</view>
<view class="row verCenter dianzan curr">
<text class="iconfont icon-a-juxing11"></text>
<text class="t3">9</text>
<text class="t3">{{ item.user_good_num || 0 }}</text>
</view>
</view>
<view class="row" style="margin-top: 26rpx;">
<view class="pic"><image src="https://img.ichunt.com/images/ichunt/202305/27/58c2e7a3d42ed265a2c763bf704d807a.jpg" mode="aspectFill"></image></view>
<view class="pic"><image src="http://order.ichunt.net/assets/images/logo1.png" mode="aspectFill"></image></view>
<view class="message-content">
<view class="t1" style="margin-bottom: 12rpx;">管理员</view>
<view class="t2" style="margin-bottom: 13rpx;">如果你既不热爱你的工作,也不对之嗤之以鼻,那说明你做的还不够多</view>
<view class="row bothSide verCenter">
<view class="time">2023-04-19 11:30:30 广东</view>
<view class="row verCenter dianzan curr">
<text class="iconfont icon-a-juxing11"></text>
<text class="t3">9</text>
</view>
<view class="t1" style="margin-bottom: 12rpx;">{{ item.reply_account }}</view>
<view class="t2" style="margin-bottom: 13rpx;">{{ item.reply_content }}</view>
<view class="row verCenter">
<view class="time">{{ item.reply_time }} {{ item.reply_area }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="no-data column rowCenter verCenter" v-else>
<image src="../../static/nodate.png"></image>
<text class="tt">暂无相关类目数据</text>
</view>
</view>
<!-- 留言 -->
<uni-popup ref="popup" type="bottom">
......@@ -113,20 +114,25 @@
<script>
import { Ichunt_Api, Api_Url, Api_MUrl } from '@/util/api.js';
import debounce from 'lodash/debounce';
import { setCookie, delCookie, getCookie } from '@/util/util.js';
export default {
data() {
return {
is_login: getCookie('Yo4teW_uid') == 0 ? false : true,
flag: true,
curr: 0,
indicatorDots: true,
autoplay: true,
interval: 2000,
duration: 500,
ad: [],
show_class: [],
list: [],
daily_download_count: '',
remain_download_count: '',
ad: [], //广告
show_class: [], //资料类目
list: [], //下载list数据
daily_download_count: '', //每日下载次数
remain_download_count: '', //当前剩下下载数量
message: [], //留言列表
searchParams: {
title: '',
class_id: '',
......@@ -149,23 +155,59 @@ export default {
this.searchParams.class_id = class_id;
this.getShowData();
},
/**
* 搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.getShowData();
}, 500),
/**
* 查看更多数据
*/
more() {
this.searchParams.limit = 10000;
this.getShowData();
},
getData() {
//获取资料类目
this.request(Api_Url + '/article/show_class', 'POST', {}, true, true).then(res => {
if (res.err_code === 0) {
this.show_class = res.data;
this.getShowData();
}
});
//获取广告
this.request(Ichunt_Api + '/m/News/getfileuploadbanner', 'POST', {}, true, true).then(res => {
if (res.err_code === 0) {
this.ad = res.data.data;
}
});
},
getShowData() {
this.request(Api_Url + '/article/showData', 'POST', this.searchParams, true, true).then(res => {
if (res.err_code === 0) {
this.daily_download_count = res.data.daily_download_count;
this.remain_download_count = res.data.remain_download_count;
this.list = res.data.result;
if (res.data.total == 0) {
this.flag = false;
this.list = [];
} else {
this.flag = true;
this.list = res.data.result;
}
}
});
this.request(Api_Url + '/article/articleMessageList', 'GET', { page: 1, limit: 10000 }, true, true).then(res => {
if (res.err_code === 0) {
this.message = res.data.result;
}
});
}
},
/**
* 提交留言
*/
createArticleMessage() {}
}
};
</script>
......
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 sign in to comment