qinhouyu 1 rok temu
rodzic
commit
b5bf41f134

+ 10 - 1
api/me/me.js

@@ -13,4 +13,13 @@ export function getUserInfo(userId){
 		url: '/system/user/getWxUserInfo/'+userId,
 		method: 'get'
 	})
-}
+}
+
+// 获取我的付费知识
+export function myPayKnow(query) {
+  return request({
+    url: '/knowledge/base/knowledgePayList',
+    method: 'get',
+	data:query
+  })
+}

+ 8 - 1
pages/index/index.vue

@@ -68,7 +68,7 @@
 			<view class="zcTuijian">
 				<image :src="loadImgSrc('/zctj.png')"></image>
 				<ul>
-					<view v-for="(item, index) in governmentList" :key="index">
+					<view v-for="(item, index) in governmentList" :key="index" @click="goZcDetail(item)">
 						<li style="display: flex;">
 							<em class="iconfont icon-yuandianxiao"></em>
 							{{ item.titleName }}
@@ -375,6 +375,13 @@
 			}
 		},
 		methods: {
+			goZcDetail(e) {
+				let id = e.id || ''
+				let type = 10
+			    uni.navigateTo({
+			        url: `../informationDetail/informationDetail?id=${id}&type=${type}`
+			    });
+			},
 			//封面与轮播图
 			getCovers(){
 				getCovers().then(res=>{

+ 5 - 0
pages/me/me.vue

@@ -53,6 +53,11 @@ export default {
 					id: 'matters/matters',
 					name: '我的事项',
 					open: false,
+				},
+				{
+					id: 'myPayKnow/myPayKnow',
+					name: '我的付费知识',
+					open: false,
 				}
 			]
 		};

+ 161 - 0
pages/myPayKnow/informationDetail.css

@@ -0,0 +1,161 @@
+/* pages/wenbaxiangqing.wxss */
+.title {
+    font-size: 44rpx;
+    text-align: center;
+    line-height: 70rpx;
+    color: #333;
+    margin: 30rpx 0;
+}
+.wenzhangLy {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    border-bottom: solid 2rpx #e8e8e8;
+    padding: 0 0 14rpx 0;
+}
+.txTime {
+    display: flex;
+    flex-direction: row;
+}
+.txTime image {
+    width: 80rpx;
+    height: 80rpx;
+}
+.time {
+    display: flex;
+    flex-direction: column;
+    padding: 10rpx 0 0 8px;
+}
+.time p {
+    font-size: 28rpx;
+    color: #9c9c9c;
+}
+.time span {
+    font-size: 24rpx;
+    color: #c4c4c4;
+}
+
+.jf {
+    color: #07c160;
+    line-height: 80rpx;
+    font-size: 24rpx;
+}
+.icon-jifen {
+    font-size: 28rpx;
+    color: #07c160;
+    margin: 0 0 0 6rpx;
+}
+.ck {
+    color: #c4c4c4;
+    font-size: 28rpx;
+}
+.icon-pinglun,
+.icon-chakan,
+.ck .icon-shoucang {
+    font-size: 28rpx;
+    margin: 0 6rpx 0 20rpx;
+    color: #c4c4c4;
+    line-height: 0;
+}
+.wenzhangCont {
+	width: 100vw;
+    font-size: 34rpx;
+    margin: 30rpx 0;
+}
+.wenzhangCont image {
+    width: 100%;
+    height: 320rpx;
+    margin: 20rpx auto;
+}
+.pinglunTj {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    margin: 30rpx 0;
+}
+.pinglunTitle {
+    font-size: 34rpx;
+    color: #2e2e2e;
+    font-weight: 600;
+}
+.pinglunTitle em {
+    font-size: 34rpx;
+    color: #9b9b9b;
+    font-weight: normal;
+    margin: 0 0 0 10rpx;
+}
+.pinglunList {
+    width: 100%;
+    padding: 0 0 120rpx 0;
+}
+.pinglunList li {
+    margin: 20rpx 0;
+    border-bottom: solid 2rpx #e8e8e8;
+    padding: 0 0 20rpx 0;
+    display: flex;
+    flex-direction: column;
+}
+.plListcont {
+    font-size: 30rpx;
+    color: #696868;
+    margin: 20rpx 0;
+}
+.pinglunList li button {
+    width: 80%;
+    border-radius: 10rpx;
+    background: #07c160;
+    color: #fff;
+    font-size: 28rpx;
+    font-weight: normal;
+    margin: 16rpx auto;
+}
+.fabiaoPl {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    position: fixed;
+    left: 0;
+    bottom: 0;
+    height: 112rpx;
+    background: #e8e8e8;
+    box-shadow: 0rpx 0rpx 16rpx #999;
+}
+.shuRu {
+    width: 72%;
+    display: flex;
+    flex-direction: row;
+    height: 76rpx;
+    background: #e0e0e0;
+    border-radius: 60rpx;
+    margin: 20rpx 0 0 20rpx;
+}
+.shuRu input {
+    line-height: 38px;
+    height: 76rpx;
+    font-size: 30rpx;
+    width: 83%;
+}
+.icon-bianji {
+    font-size: 38rpx;
+    line-height: 76rpx;
+    margin: 0 10rpx 0 20rpx;
+    color: #828181;
+}
+.icon-shoucang {
+    font-size: 50rpx;
+    line-height: 112rpx;
+    color: #828181;
+}
+.fasong {
+    width: 58rpx;
+    height: 58rpx;
+    border-radius: 50rpx;
+    background: #07c160;
+    margin: 26rpx 20rpx 0 10rpx;
+    text-align: center;
+    line-height: 58rpx;
+}
+.icon-fasong {
+    font-size: 40rpx;
+    color: #fff;
+}

+ 233 - 0
pages/myPayKnow/informationDetail.vue

@@ -0,0 +1,233 @@
+<template>
+    <view>
+        <!-- pages/me.wxml -->
+        <view class="container">
+            <h1 class="title">{{ detailInfo.titleName }}</h1>
+            <view class="wenzhangLy">
+                <!-- 头像昵称 -->
+                <!-- <view class="txTime"> -->
+                    <!-- <image :src="loadImgSrc(detailInfo.headImg!=null?detailInfo.headImg:'/profile/upload/2024/03/05/abf969632ee94bd5a429c8c2dbb2f6b4 (1)_20240305092823A002.png')" style="border-radius: 50px;"></image> -->
+                    <!-- <view class="time">
+                        <p>{{detailInfo.nickName?detailInfo.nickName:'网友'}}</p>
+                        <span>{{ detailInfo.createTime }}</span>
+                    </view> -->
+                <!-- </view> -->
+                <!-- 积分 -->
+<!--                <span class="jf">100</span> -->
+            </view>
+            <view class="wenzhangCont article">
+                <span v-html="detailInfo.textDetails">
+                </span>
+
+                <view >
+                    <!-- 图片轮播 -->
+                    <swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="circular">
+                        <block v-for="(one, index) in detailInfo.urls" :key="index">
+                            <swiper-item><image :src="loadImgSrc(one)"  style="background-size: 100% 100%;"></image></swiper-item>
+                        </block>
+                    </swiper>
+                </view>
+            </view>
+
+
+        </view>
+	</view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+			anwserVal:'',
+			anwserList:[
+				{
+					deptName:'国家乡村振兴局',
+					updateTime:'2023-2-27 16:04',
+					desc:'用好政策效果评估成果,进一步优化巩固拓展脱贫攻坚成果同乡村振兴有效衔接政策供给,为推动工作提质增效提供有力支撑保障。',
+				}
+			],
+			isCollection:false,
+			isAdopt:false,
+			adoptTopSize:'115',
+			adoptIndex:null,
+			detailInfo:{},
+        };
+    },
+	methods: {
+		// 评论回答
+		answerFunc(){
+			this.anwserList.push({
+				deptName:'国家烟草局',
+				updateTime:new Date().getFullYear() + "-" + new Date().getMonth() + "-" + new Date().getDay() + " " + (new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours()) + ':' + (new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes()),
+				desc:this.anwserVal,
+			})
+			this.anwserVal = null
+		},
+		adoptFunc(idx){
+			this.adoptIndex = idx
+			this.isAdopt = true
+		},
+		// 标记喜欢
+		collectionFunc(){
+			this.isCollection = !this.isCollection
+		}
+	}
+    /**
+     * 生命周期函数--监听页面加载
+     */,
+    onLoad(options) {
+		 this.detailInfo = JSON.parse(options.obj)
+	  },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady(e) {
+	},
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {},
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {},
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {},
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {},
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {},
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {},
+};
+</script>
+<style lang="scss">
+@import './informationDetail.css';
+
+.collect{
+	.icon-shoucang:before{
+		color: red;
+	}
+}
+.not-collect{
+
+}
+.effectBix{
+	width: 56px;
+	height: 56px;
+	border-radius: 50px;
+	font-family: 'Bebas Neue', cursive;
+	background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
+	border: 0;
+	color: #fff;
+	text-align: center;
+	line-height: 56px;
+	outline: transparent;
+	position: absolute;
+	transform: rotate(-30deg);
+	right:3%;
+	top: -5%;
+}
+
+.effectBox, .effectBox::after {
+  width: 56px;
+  height: 56px;
+  border-radius: 50px;
+  font-size: 16px;
+  font-family: 'Bebas Neue', cursive;
+  background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
+  border: 0;
+  color: #fff;
+  opacity: 1;
+  letter-spacing: 3px;
+  text-align: center;
+  line-height: 56px;
+  outline: transparent;
+  position: relative;
+  left: 78%;
+  top: 113%;
+  transform: rotate(-30deg);
+  z-index: 1;
+}
+
+.effectBox::after {
+  --slice-0: inset(50% 50% 50% 50%);
+  --slice-1: inset(80% -6px 0 0);
+  --slice-2: inset(50% -6px 30% 0);
+  --slice-3: inset(10% -6px 85% 0);
+  --slice-4: inset(40% -6px 43% 0);
+  --slice-5: inset(80% -6px 5% 0);
+
+  content: 'AVAILABLE NOW';
+  display: block;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: linear-gradient(45deg, transparent 3%, #00E6F6 3%, #00E6F6 5%, #FF013C 5%);
+  text-shadow: -3px -3px 0px #F8F005, 3px 3px 0px #00E6F6;
+  clip-path: var(--slice-0);
+}
+
+.effectBox:hover::after {
+  animation: 1s glitch;
+  animation-timing-function: steps(2, end);
+}
+
+@keyframes glitch {
+  0% {
+    clip-path: var(--slice-1);
+    transform: translate(-20px, -10px);
+  }
+  10% {
+    clip-path: var(--slice-3);
+    transform: translate(10px, 10px);
+  }
+  20% {
+    clip-path: var(--slice-1);
+    transform: translate(-10px, 10px);
+  }
+  30% {
+    clip-path: var(--slice-3);
+    transform: translate(0px, 5px);
+  }
+  40% {
+    clip-path: var(--slice-2);
+    transform: translate(-5px, 0px);
+  }
+  50% {
+    clip-path: var(--slice-3);
+    transform: translate(5px, 0px);
+  }
+  60% {
+    clip-path: var(--slice-4);
+    transform: translate(5px, 10px);
+  }
+  70% {
+    clip-path: var(--slice-2);
+    transform: translate(-10px, 10px);
+  }
+  80% {
+    clip-path: var(--slice-5);
+    transform: translate(20px, -10px);
+  }
+  90% {
+    clip-path: var(--slice-1);
+    transform: translate(-10px, 0px);
+  }
+  100% {
+    clip-path: var(--slice-1);
+    transform: translate(0);
+  }
+}
+
+</style>

+ 103 - 0
pages/myPayKnow/myPayKnow.css

@@ -0,0 +1,103 @@
+/* pages/wenda/wenda.wxss */
+.wendaFL {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    margin: 30rpx 0 0 0;
+}
+.wendaFL li {
+    width: 48%;
+    height: 168rpx;
+    position: relative;
+}
+.lbBj {
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 0;
+    width: 100%;
+    height: 100%;
+}
+.wendaFL li h2 {
+    font-size: 36rpx;
+    position: absolute;
+    left: 30rpx;
+    top: 40rpx;
+    z-index: 1;
+    font-weight: bold;
+}
+.wendaFL li span {
+    font-size: 30rpx;
+    position: absolute;
+    left: 30rpx;
+    top: 88rpx;
+    z-index: 1;
+}
+.wendaFL li.sanNong {
+    color: #0d9970;
+}
+.wendaFL li.jiuYe {
+    color: #1e8fb4;
+}
+.wendaFL li.faLv {
+    color: #1e5dab;
+}
+.wendaFL li.jiuZhen {
+    color: #4a700d;
+}
+/* 列表 */
+.rnwdList {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    margin: 20rpx 0;
+}
+.list {
+    width: 79%;
+}
+.lb {
+    background: #0d9970;
+    color: #fff;
+    font-size: 24rpx;
+    width: 12%;
+    text-align: center;
+    padding: 2rpx 0;
+    line-height: 40rpx;
+    height: 40rpx;
+    border-radius: 10rpx;
+}
+.listTitle {
+    font-size: 32rpx;
+    color: #333;
+    line-height: 40rpx;
+}
+.jlSj {
+    height: 40rpx;
+    display: flex;
+    justify-content: space-between;
+    font-size: 24rpx;
+    margin: 20rpx 0 0 0;
+}
+.jf {
+    color: #07c160;
+}
+.icon-jifen {
+    font-size: 28rpx;
+    color: #07c160;
+    margin: 0 0 0 6rpx;
+}
+.ck {
+    color: #c4c4c4;
+}
+.icon-pinglun,
+.icon-chakan,
+.icon-shoucang {
+    font-size: 28rpx;
+    margin: 0 6rpx 0 20rpx;
+    color: #c4c4c4;
+}
+.icon-xiangyoujiantou {
+    font-size: 30rpx;
+    color: #c4c4c4;
+    line-height: 60rpx;
+}

+ 101 - 0
pages/myPayKnow/myPayKnow.vue

@@ -0,0 +1,101 @@
+<template>
+    <!-- pages/fuwu/fuwu.wxml -->
+    <view class="container">
+        <view class="rnwdList" @tap="goDetails(item)" v-for="(item, index) in wb" :key="index">
+            <span class="lb">{{ item.popular == '1' ? '热门' : '非热门' }}</span>
+
+            <view class="list">
+                <span class="listTitle">{{ item.titleName }}</span>
+                <view class="jlSj">
+                    <span class="jf">
+                        {{ item.integral }}
+                        <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.watchNum }}
+                        </span>
+                        <span>
+                            <em class="iconfont icon-shoucang"></em>
+                            {{ item.likeNum }}
+                        </span>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+	import {myPayKnow} from '@/api/me/me.js'
+	
+export default {
+    data() {
+        return {
+			query:{
+				pageSize:10,
+				pageNum:1,
+				createId:null
+			},
+            wb: [],
+			total:0
+        };
+    }
+    /**
+     * 生命周期函数--监听页面加载
+     */,
+	 onReachBottom(){
+	 	let pageNum = this.query.pageNum
+	 	let pageSize = this.query.pageSize
+	 	let total = this.total
+	 	if(pageNum*pageSize >= total){
+	 		uni.showToast({
+	 			title:'暂无更多数据'
+	 		})
+	 		return
+	 	} else {
+	 		this.query.pageNum += 1;
+	 		this.getlist()
+	 	}
+	 },
+	 onPullDownRefresh() {
+	   this.query.pageNum = 1;
+	   this.wb = [];
+	   this.getlist()
+	 },
+    onLoad(options) {
+		// this.query.createId = getApp().globalData.userId
+		this.query.createId = '1763382026214764546'
+		this.getlist()
+    },
+    methods: {
+		getlist(){
+			myPayKnow(this.query).then(res=>{
+				this.wb = [...this.wb,...res.rows]
+				this.total = res.total
+			})
+			uni.stopPullDownRefresh();
+		},
+        goSanNong() {
+            uni.navigateTo({
+                url: '/pages/sannong/sannong'
+            });
+        },
+
+        goDetails(item) {
+			if(item==null) return;
+            uni.navigateTo({
+                url: '/pages/myPayKnow/informationDetail?obj='+ JSON.stringify(item)
+            });
+        }
+    }
+};
+</script>
+<style>
+@import './myPayKnow.css';
+</style>

+ 13 - 6
pages/quotations/quotations.vue

@@ -91,12 +91,19 @@ export default {
     this.getList()
   },
   //上拉加载
-  onReachBottom() {
-    if (this.status === 'noMore') {
-      return;
-    }
-    this.queryParams.pageNum++;
-    this.getList();
+  onReachBottom(){
+  	let pageNum = this.queryParams.pageNum
+  	let pageSize = this.queryParams.pageSize
+  	let total = this.total
+  	if(pageNum*pageSize >= total){
+  		uni.showToast({
+  			title:'暂无更多数据'
+  		})
+  		return
+  	} else {
+  		this.queryParams.pageNum += 1;
+  		this.getList()
+  	}
   },
   onLoad() {
     this.getList();