Explorar el Código

文章+海报+发现

xhj hace 2 años
padre
commit
f90e86a4ba

+ 75 - 0
components/service-contact/index.css

@@ -0,0 +1,75 @@
+.sc-box{
+	height: 136rpx;
+	background: #FFFFFF;
+	box-shadow: 0rpx 3rpx 15rpx 1rpx rgba(0,0,0,0.16);
+	border-radius: 0rpx 0rpx 0rpx 0rpx;
+	opacity: 1;
+	padding: 25rpx 20rpx;
+	box-sizing: border-box;
+	position: fixed;
+	bottom:0;
+	left: 0;
+	right: 0;
+	z-index: 5;
+}
+.sc-header{
+	width: 86rpx;
+	height: 86rpx;
+	background: #FFFFFF;
+	border-radius: 100%;
+	margin-right: 16rpx;
+}
+.sc-name{
+	line-height: 45rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC-Bold, PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.sc-tag{
+	padding: 0 10rpx;
+	line-height: 29rpx;
+	background: linear-gradient(319deg, #E6BB82 0%, #FAE4CD 100%);
+	border-radius: 3rpx 3rpx 3rpx 3rpx;
+	opacity: 1;
+	margin-top: 10rpx;
+	font-size: 20rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #84600A;
+}
+.sc-line{
+	width: 2rpx;
+	height: 86rpx;
+	opacity: 1;
+	background-color: #DEDEDE;
+	margin: auto 40rpx auto 21rpx;
+}
+.sc-contact{
+	line-height: 40rpx;
+	font-size: 28rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #7A7B7F;
+	margin-top: 4rpx;
+	text-align: center;
+}
+.sc-contact image{
+	width: 42rpx;
+	height: 42rpx;
+	margin: auto;
+}
+.sc-btn{
+	width: 280rpx;
+	height: 76rpx;
+	line-height: 76rpx;
+	background: #02A76D;
+	border-radius: 38rpx 38rpx 38rpx 38rpx;
+	opacity: 1;
+	text-align: center;
+	font-size: 28rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #FFFFFF;
+	margin-left: 50rpx;
+}

+ 44 - 0
components/service-contact/index.vue

@@ -0,0 +1,44 @@
+<template>
+	<view>
+		<view style="height: 136rpx;"></view>
+		<view class="sc-box ddflex">
+			<image class="sc-header" src="../../static/images/userimg.png"></image>
+			<view class="sc-name">
+				<view>杜平</view>
+				<view class="sc-tag">高级组经理</view>
+			</view>
+			<view class="sc-line"></view>
+			<view class="sc-contact">
+				<image src="/static/images/wxChat.png"></image>
+				<view>聊一聊</view>
+			</view>
+			<view class="sc-btn flex">进入我的微页</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request.js");
+
+	export default {
+		data() {
+			return {
+			};
+		},
+
+		components: {},
+		props: {
+		},
+		watch: {},
+
+		mounted() {
+		},
+
+		methods: {
+		}
+	};
+</script>
+<style>
+	@import "./index.css";
+</style>

+ 120 - 0
library/poster/index.css

@@ -0,0 +1,120 @@
+page{
+	background-color: #fff;
+}
+.top-sort{
+	position: fixed;
+	top: 0;
+	left: 0;
+	right: 0;
+	background-color: #fff;
+	z-index: 5;
+}
+.top-sort-item{
+	text-align: center;
+	line-height: 45rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #666666;
+	padding:21rpx 0 16rpx;
+}
+.top-sort-item-active{
+	color: var(--main);
+	position: relative;
+}
+.top-sort-item-active::after{
+	position: absolute;
+	bottom: 0;
+	left: 50%;
+	transform: translateX(-50%);
+	content: '';
+	width: 58rpx;
+	height: 4rpx;
+	opacity: 1;
+	background-color:var(--main) ;
+}
+
+.search-box{
+	padding: 30rpx;
+	background-color: #fff;
+}
+
+.search-text{
+	color: #999999;
+}
+
+
+.search-input{
+	height: 76rpx;
+	line-height: 76rpx;;
+	background: #F5F5F5;
+	border-radius: 70rpx;
+	padding: 0 26rpx;
+	font-size: 24rpx;
+}
+.search-input input{
+	font-size: 24rpx;
+}
+.search-input image{
+	width: 34rpx;
+	height: 34rpx;
+	margin-right: 26rpx;
+}
+.search-all{
+	color: #2a82fd;
+	font-size: 30rpx;
+	margin-left: 46rpx;
+}
+
+
+.search-tag{
+	padding: 0 14rpx;
+	height: 61rpx;
+	line-height: 61rpx;
+	background: #F6F7F9;
+	border-radius: 4rpx 4rpx 4rpx 4rpx;
+	opacity: 1;
+	text-align: center;
+	margin-right: 10rpx;
+	margin-bottom: 10rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #919191;
+}
+.search-tag-active{
+	background: #3B8DFF;
+	color: #fff;
+}
+
+
+.poster-item{
+	width: 208rpx;
+	margin-right: 30rpx;
+	margin-bottom: 40rpx;
+}
+.poster-item:nth-child(3n){
+	margin-right: 0rpx;
+}
+.poster-item-pic{
+	width: 208rpx;
+	height: 378rpx;
+}
+.poster-item-title{
+	line-height: 37rpx;
+	font-size: 26rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #000000;
+	margin-top: 15rpx;
+	padding: 0 10rpx;
+}
+.poster-item-use{
+	line-height: 30rpx;
+	font-size: 22rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+	margin-top: 12rpx;
+	padding: 0 10rpx;
+}

+ 76 - 0
library/poster/index.vue

@@ -0,0 +1,76 @@
+<template>
+	<view>
+		<view class="top-sort ddflex">
+			<view class="top-sort-item flex top-sort-item-active">海报</view>
+			<view class="top-sort-item flex">产品宣传</view>
+		</view>
+		<view style="height: 85rpx;"></view>
+		<view style="border-top: 20rpx solid #F4F5F9;">
+			<view class="search-box ddflex">
+				<view class="search-input ddflex fflex">
+					<image src="/static/images/ssico.png"></image>
+					<input @confirm="searchFn" confirm-type="search" @input="searchFn" v-model="searchVal" class="fflex"
+						placeholder="请输入关键词" />
+				</view>
+			</view>
+			<view class="ddflex" style="padding: 0 30rpx;">
+				<view class="search-tag search-tag-active">全部</view>
+				<view class="search-tag" v-for="item in 12">问候日签</view>
+			</view>
+			<view class="ddflex" style="padding: 30rpx;">
+				<view class="poster-item" v-for="item in 6">
+					<image class="poster-item-pic" src="/static/images/lj_img.png"></image>
+					<view class="poster-item-title tover">海报名称</view>
+					<view class="poster-item-use">2056 人正在使用</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request.js");
+
+	export default {
+		components: {},
+		props: {},
+		data() {
+			return {
+				systems: {},
+				isTop:0,
+			}
+		},
+		onLoad(options) {
+
+		},
+		onShow() {
+			
+		},
+		methods: {
+			
+		},
+		mounted() {
+			const systemInfo = uni.getSystemInfoSync();
+			// px转换到rpx的比例
+			let pxToRpxScale = 750 / systemInfo.windowWidth;
+			let systems = {
+				ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
+				navigationHeight: 44 * pxToRpxScale // 导航栏的高度
+			};
+			systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
+			this.systems = systems;
+		},
+		onPageScroll: function(e) {
+			if (e.scrollTop > this.systems.barHeight) {
+				this.isTop = 1;
+			} else {
+				this.isTop = 0;
+			}
+		}
+	}
+</script>
+
+<style>
+	@import "./index.css";
+</style>

+ 1 - 1
match/activityDetail/activityDetail.vue

@@ -208,7 +208,7 @@ export default {
 		getConfig() {
 			var _this = this;
 			return new Promise((resolve, reject) => {
-				req.getRequest('/api/config', {}, function(res) {
+				req.getRequest('/api/other/config', {}, function(res) {
 					_this.about = res;
 					_this.getSystem();
 					resolve();

+ 16 - 0
pages.json

@@ -913,6 +913,12 @@
 					}
 				},
 				{
+					"path": "alContent/alContent",
+					"style": {
+						"navigationBarTitleText": "投保案例"
+					}
+				},
+				{
 					"path": "shop/shop",
 					"style": {
 						"navigationStyle": "custom",
@@ -1270,6 +1276,16 @@
 					}
 				}
 			]
+		},
+		{
+			"root": "library",
+			"pages": [{
+					"path": "poster/index",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				}
+			]
 		}
 	]
 }

+ 46 - 85
pages/found/found.vue

@@ -15,29 +15,29 @@
 			</view>
 			<view class="map-ac">
 				<scroll-view scroll-x="true" class="map-acs ddflex" style="height: 70rpx;">
-					<view :class="'fx-nav '+(index==0?'fx-nav-active':'')" v-for="item,index in 10">健康生活</view>
+					<view :class="'fx-nav '+(fxIndex==index?'fx-nav-active':'')" v-for="item,index in fxList" @click="changeFxTab(index)">{{item.name}}</view>
 				</scroll-view>
 			</view>
 		</view>
 		<view style="height: 400rpx;"></view>
 		<view class="list">
-			<view class="video-box" v-if="videoList&&videoList.length > 0">
-				<view class="video-card" v-for="(item, index) in (videoList.length%2==0||videoList.length==1?videoList:videoList.slice(0,videoList.length-1))" :key="index">
+			<view class="video-box" v-if="fxContentList&&fxContentList.length > 0">
+				<view class="video-card" v-for="(item, index) in fxContentList" :key="index" @click="jumpUrl('/topic/content/content?id='+item.id)">
 					<view class="video-cover">
 						<view class="video">
-							<image mode="aspectFill" style="max-width: 100%;max-height: 100%;" src="/static/images/lj_img.png"></image>
+							<image mode="aspectFill" style="max-width: 100%;max-height: 100%;" :src="item.pic"></image>
 						</view>
 						<image v-if="index==1" class="video-play" src="/static/images/video_play.png"></image>
 					</view>
 					<view class="video-info">
-						<view class="video-name tovers">3·15|手把手教你读懂“食品标签”,拒绝...</view>
+						<view class="video-name tovers">{{item.title}}</view>
 						<view class="video-info-desc">
 							<view class="ddflex" style="overflow: hidden;">
-								2023-03-13
+								{{formatTime(item.createDate)}}
 							</view>
 							<view class="ddflex">
 								<image style="width: 27rpx;height: 20rpx;margin-right: 10rpx" src="/static/images/eyes.png"></image>
-								<view>2.2万</view>
+								<view>{{unitFormat(item.browse)}}</view>
 							</view>
 						</view>
 					</view>
@@ -76,7 +76,11 @@
 				config:{},
 				isFullScreen:false,//是否正在全屏播放
 				
-				swiperPlayIndex:0
+				swiperPlayIndex:0,
+				
+				fxList:[],
+				fxContentList:[],
+				fxIndex:0
 			};
 		},
 
@@ -87,18 +91,10 @@
 
 		async onLoad() { // this.getList()
 			await this.getConfig()
-			// 为了小程序过审判断,是否屏蔽审核不通过页面
-			console.log("this.config.PASS_REVIEW",this.config.PASS_REVIEW)
-			if(this.config.PASS_REVIEW==0){
-				uni.setNavigationBarTitle({
-					title:'视频'
-				})
-			}
+			this.getFx()
 		},
 
 		onShow() {
-			this.getList();
-			this.getDataList()
 			this.setData({
 				isUpdate: !this.isUpdate
 			});
@@ -106,13 +102,13 @@
 
 		onReachBottom() {
 			this.page++;
-			this.getList();
+			this.getFxContenteList();
 		},
 
 		methods: {
 			getConfig() {
 				return new Promise((resolve, reject) => {
-					req.getRequest('/api/config', {}, (res)=> {
+					req.getRequest('/api/other/config', {}, (res)=> {
 						this.config = res;
 						resolve(res)
 					});
@@ -126,54 +122,29 @@
 					url: url
 				});
 			},
-			// 获取视频列表
-			getDataList() {
-				let form = {
-					page: 1,
-					limit: 6,
-					state: 2,
-					rootCode : 'video',
-					sortRules:'top'
-				}
-				req.getRequest('/api/v3/material/library', form, data => {
-					if(data){
-						data.list.map(item=>{
-							item.createDate = this.captureTime(item.createDate)
-							item.isControls = false
-							item.isShowPlayBtn = true
-						})
-					}
-						// this.videoList = data.list?data.list:[]
-						this.videoList = [{},{}]
-				})
+			// 获取发现
+			async getFx(){
+				this.fxList = await this.getContentList(req.public.fxCode)
+				this.getFxContenteList()
 			},
-			//视频全屏事件
-			fullscreenchange (e,index){
-				console.log(e)
-			   if(!e.detail.fullScreen){
-				   this.isFullScreen = false
-				  if (this.videoCurrent != null) {
-				  	var videoContextPrev = uni.createVideoContext('myVideo' + this.videoCurrent)
-				  	this.videoList[this.videoCurrent].isControls = false
-				  	this.videoList[this.videoCurrent].isShowPlayBtn = true
-				  	
-				  	videoContextPrev.stop()
-				  }
-			   }else{
-				   this.isFullScreen = true
-			   }
+			// 获取文章栏目列表
+			getContentList(code){
+				return new Promise((r,j)=>{
+					req.getRequest('/api/content/category/list',{parentCode:code},res=>{
+						r(res?res:[])
+					})
+				})
 			},
-			// 视频暂停结束事件
-			videoPause(index){
-				if(this.isFullScreen){
-					this.videoList[index].isControls = true
-					this.videoList[index].isShowPlayBtn = true
-				}else{
-					this.videoList[index].isControls = false
-					this.videoList[index].isShowPlayBtn = true
-				}
+			// 发现tab切换
+			changeFxTab(index){
+				if(this.fxIndex==index) return false;
+				this.fxIndex = index
+				this.isLoad = true
+				this.page = 1
+				this.getFxContenteList(this.fxList[this.fxIndex].code)
 			},
-			getList() {
+			// 获取发现文章列表
+			getFxContenteList() {
 				let that = this;
 				let isShowLoading = false;
 				// console.log(that.isLoad);
@@ -181,7 +152,8 @@
 				that.isLoad = false;
 				let form = {
 					page: that.page,
-					limit: 10
+					limit: 10,
+					code:that.fxList[that.fxIndex].code
 				};
 
 				if (form.page == 1 && !isShowLoading) {
@@ -189,8 +161,7 @@
 					isShowLoading = true;
 				}
 
-				req.getRequest('/api/live/list', form, data => {
-					// if (!data) return req.msg('还没有直播');
+				req.getRequest('/api/content/list', form, data => {
 					if (data && data.length == 10) that.isLoad = true;
 					if (that.page > 1) data = that.pageList.concat(data);
 
@@ -212,7 +183,7 @@
 
 					// console.log(data);
 					that.setData({
-						pageList: data
+						fxContentList: data
 					});
 
 					if (!this.pageList) {
@@ -224,23 +195,6 @@
 							ishow: false
 						});
 					}
-					// this.pageList = [{
-					// 	roomid: 111,
-					// 	share_img: 'https://img.tongyu99.com/IMAGE-185/20221019/9fb2b253b1de4f65950c3c7ec4d28ba0.png',
-					// 	name: 'ceshi',
-					// 	live_status: 101
-					// },{
-					// 	roomid: 111,
-					// 	share_img: 'https://img.tongyu99.com/IMAGE-185/20221019/9fb2b253b1de4f65950c3c7ec4d28ba0.png',
-					// 	name: 'ceshi',
-					// 	time:'2022-10-19 12:15:22',
-					// 	live_status: 102
-					// },{
-					// 	roomid: 111,
-					// 	share_img: 'https://img.tongyu99.com/IMAGE-185/20221019/9fb2b253b1de4f65950c3c7ec4d28ba0.png',
-					// 	name: 'ceshi',
-					// 	live_status: 103
-					// }]
 					if (isShowLoading) {
 						uni.hideLoading();
 						isShowLoading = false;
@@ -267,6 +221,13 @@
 				if (second.toString().length == 1) second = `0${second}`;
 				return `${minute}:${second}`;
 			},
+			unitFormat(data){
+				return req.unitConverter(data).text
+			},
+			formatTime(date){
+				date = new Date(date.replace(/-/g, '/'))
+				return util.formatTime(date).t3
+			}
 
 		}
 	};

+ 2 - 2
pages/index/index.css

@@ -497,7 +497,7 @@ page{background: #fff;}
 
 /* 参与活动 */
 .map-ac{overflow: hidden;margin-top: 30rpx;}
-.map-acs{white-space: nowrap;height: 312rpx;}
+.map-acs{white-space: nowrap;height: 270rpx;}
 .map-acs .li{display: inline-block;background: #fff;width: 270rpx;height: 260rpx;border-radius: 15rpx;font-size: 32rpx;color: #333;box-sizing: border-box;margin-right: 20rpx;}
 .map-acs .li:last-child{margin-right: 30rpx;}
 .map-acs .li image{width: 270rpx;height: 174rpx;border-radius: 15rpx;}
@@ -593,7 +593,7 @@ page{background: #fff;}
 	width: 335rpx;
 	height: 228rpx;
 	border-radius: 10rpx 10rpx 10rpx 10rpx;
-	margin-right: 41rpx;
+	margin-right: 30rpx;
 }
 .tbal-title{
 	font-size: 31rpx;

+ 87 - 183
pages/index/index.vue

@@ -99,15 +99,15 @@
 		</view>
 		
 		<!-- 投保案例 -->
-		<view class="index-box" style="margin:0;padding: 30rpx;background-color: #f5f5f5;" v-if="matchList.length>0">
+		<view class="index-box" style="margin:0;padding: 30rpx;background-color: #f5f5f5;" v-if="tbalList.length>0">
 			<view class="index-box-title">投保案例</view>
 			<view>
 				<view class="tbal-nav ddflex">
-					<view class="tbal-nav-item tbal-nav-item-active">
-						<view>单身期</view>
+					<view :class="'tbal-nav-item '+(tbalIndex==index?'tbal-nav-item-active':'' )" v-for="item,index in tbalList" @click="changeTbalTab(index)">
+						<view>{{item.name}}</view>
 						<view class="tbal-nav-label">20~30岁</view>
 					</view>
-					<view class="tbal-nav-item">
+					<!-- <view class="tbal-nav-item">
 						<view>形成期</view>
 						<view class="tbal-nav-label">20~30岁</view>
 					</view>
@@ -118,28 +118,30 @@
 					<view class="tbal-nav-item">
 						<view>成熟期</view>
 						<view class="tbal-nav-label">20~30岁</view>
-					</view>
+					</view> -->
 				</view>
 				
-				<view class="tbal-item ddflex" v-for="item in 2">
-					<image class="tbal-pic" src="/static/images/lj_img.png"></image>
-					<view class="flex">
-						<view class="tbal-title">单身青年</view>
-						<view class="ddflex">
-							<view class="ddflex flex">
-								<view class="tbal-price">8633元</view>
-								<view class="tbal-price-text">年缴费</view>
-							</view>
-							<view class="tbal-line"></view>
-							<view class="ddflex flex">
-								<view class="tbal-price">130万</view>
-								<view class="tbal-price-text">总保额 </view>
+				<block v-if="tbalList[tbalIndex].contentList">
+					<view class="tbal-item ddflex" v-for="it in tbalList[tbalIndex].contentList" @click="jumpUrl('/topic/alContent/alContent?id='+it.id)">
+						<image class="tbal-pic" :src="it.pic?it.pic:'/static/images/lj_img.png'"></image>
+						<view class="flex">
+							<view class="tbal-title">{{it.title}}</view>
+							<view class="ddflex">
+								<view class="ddflex flex">
+									<view class="tbal-price" >{{it.fieldValues&&it.fieldValues.yearMoney?it.fieldValues.yearMoney:'0'}}</view>
+									<view class="tbal-price-text">年缴费</view>
+								</view>
+								<view class="tbal-line"></view>
+								<view class="ddflex flex">
+									<view class="tbal-price" >{{it.fieldValues&&it.fieldValues.allMoney?it.fieldValues.allMoney:'0'}}</view>
+									<view class="tbal-price-text">总保额 </view>
+								</view>
 							</view>
+							<view class="tbal-btn">去看看</view>
 						</view>
-						<view class="tbal-btn">去看看</view>
+						<view class="tbal-tag" v-if="it.fieldValues&&it.fieldValues.version">{{it.fieldValues.version}}</view>
 					</view>
-					<view class="tbal-tag">清洁版</view>
-				</view>
+				</block>
 			</view>
 		</view>
 		
@@ -154,12 +156,12 @@
 							<view>{{items.name}}</view>
 						</view>
 						<view class="lpgs-content">
-							<view class="lpgs-item-content ddflex" v-for="item in items.contentList">
+							<view class="lpgs-item-content ddflex" v-for="item in items.contentList" @click="jumpUrl('/topic/content/content?id='+item.id)">
 								<view class="flex" style="min-width: 0;">
 									<view class="lpgs-item-content-title tovers">{{item.title}}</view>
 									<view class="lpgs-item-content-look ddflex">
 										<image src="/static/images/eyes.png"></image>
-										<view>1.2万</view>
+										<view>{{unitFormat(item.browse)}}</view>
 									</view>
 								</view>
 								<image class="lpgs-item-content-pic" :src="item.pic?item.pic:'/static/images/lj_img.png'"></image>
@@ -171,36 +173,36 @@
 		</view>
 		
 		<!-- 发现 -->
-		<view class="index-box" style="margin:0;padding: 30rpx;background-color: #f5f5f5;" v-if="matchList.length>0">
+		<view class="index-box" style="margin:0;padding: 30rpx;background-color: #f5f5f5;" v-if="fxList.length>0">
 			<view class="map-ac">
 				<scroll-view scroll-x="true" class="map-acs ddflex" style="height: 70rpx;">
-					<view :class="'fx-nav '+(index==0?'fx-nav-active':'')" v-for="item,index in 10">健康生活</view>
+					<view :class="'fx-nav '+(fxIndex==index?'fx-nav-active':'')" v-for="item,index in fxList" @click="changeFxTab(index)">{{item.name}}</view>
 				</scroll-view>
 			</view>
 			<view class="fx-bar">
 				<view class="fx-header ddflex">
 					<view class="ddflex">
-						<view class="fx-header-title">健康生活</view>
+						<view class="fx-header-title">{{fxList[fxIndex].name}}</view>
 						<view class="fx-header-more">2.2万人转发</view>
 					</view>
-					<view class="fx-header-more ddflex">
+					<view class="fx-header-more ddflex" @click="jumpUrl('/topic/contentList/contentList?code='+fxList[fxIndex].code+'&title='+fxList[fxIndex].name)">
 						更多
 						<image src="/static/pages/images/more.png"></image>
 					</view>
 				</view>
 				<view>
-					<view class="fx-item ddflex" v-for="item in 10">
+					<view class="fx-item ddflex" v-for="item in fxContentList" @click="jumpUrl('/topic/content/content?id='+item.id)">
 						<view class="flex" style="min-width: 0;">
-							<view class="fx-item-title tovers">3·15|手把手教你读懂“食品标签”,拒绝被“坑”3·15|手把手教你读懂“食品标签”,拒绝被“坑”</view>
+							<view class="fx-item-title tovers">{{item.title}}</view>
 							<view class="ddflex" style="margin-top: 24rpx;">
-								<view class="fx-item-time">2023-03-13</view>
+								<view class="fx-item-time">{{formatTime(item.createDate)}}</view>
 								<view class="fx-item-look ddflex">
 									<image src="/static/images/eyes.png"></image>
-									<view>2.2万</view>
+									<view>{{unitFormat(item.browse)}}</view>
 								</view>
 							</view>
 						</view>
-						<image class="fx-item-pic" src="../../static/images/lj_img.png"></image>
+						<image class="fx-item-pic" :src="item.pic?item.pic:'../../static/images/lj_img.png'"></image>
 					</view>
 				</view>
 			</view>
@@ -283,26 +285,15 @@ export default {
 			systems: {},
 			header: req.header,
 			bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
-			swiperCurrent: 0,
-			swiperGrid: 0,
 			bannerList: [],
-			categoryList: [],
 			//产品分类列表
 			page: 1,
-			boutiqueList: {},
-			//精品榜单
-			arrivalsList: {},
-			hotList: {},
-			pageList: {},
 			//产品列表
-			isLoad: true,
-			hasmore: true,
 			merchant: {},
 			activityGroup: {
 				products: []
 			},
 			couponList: {},//优惠券,
-			isRemind: false,
 			isUpdate: false,
 			// 是否更新消息
 			first: true,
@@ -318,86 +309,9 @@ export default {
 				//广告
 				module_type_district: 'type_district',
 				//分类导航
-				module_p_list: 'p_list',
-				//品类专区
-				module_group: 'group',
-				//团购
-				module_live: 'live',
-				//直播
-				module_sou: 'sou',
-				//搜索
-				module_special: 'special',
-				//专题
-				module_chosen: 'chosen',
-				//精选
-				module_new_arrivals: 'new_arrivals',
-				//新品上架
-				module_hot_money: 'hot_money',
-				//热门爆款
-				module_recommend: 'recommend',
-				//推荐产品
-				module_store_options: 'store_options',
-				//多门店选择
-				module_home_pop_up_ads: 'home_pop_up_ads',
-				//首页弹窗广告
-				module_joingroup: 'joingroup',
-				//拼团
-				module_seckill: 'seckill',
-				//秒杀
-				module_bargain: 'bargain',
-				//砍价
-				module_customers: 'New_customers',
-				//新客
-				module_homecolumn: 'homecolumn',
-				//首页专区
-				module_Timely_delivery_open: 'Timely_delivery_open',
-				//及时达页面
-				module_supplier_premium: 'supplier_premium', //供应商模块
-				module_red_envelopes: 'red_envelopes', //优惠券
 				module_king_kong_district: 'king_kong_district', //金刚区
-				module_sup_recommend: 'sup_recommend', //供应商推荐
-				module_single_product: 'single_product' //供应商推荐
 			},
-			buyOrderMarqueeList: [],
-			listI: -1,
 			isNotice: false,
-			TabList: [
-				{
-					//秒杀时间
-					label: '今天',
-					active: true,
-					state: '抢购中',
-					dayType: 1,
-					time: ''
-				},
-				{
-					label: '明天',
-					state: '预热中',
-					active: false,
-					time: '',
-					dayType: 2
-				},
-				{
-					label: '后天',
-					state: '预热中',
-					dayType: 3,
-					time: ''
-				},
-				{
-					label: '',
-					state: '预热中',
-					dayType: 4,
-					active: false,
-					time: ''
-				},
-				{
-					label: '',
-					state: '预热中',
-					dayType: 5,
-					active: false,
-					time: ''
-				}
-			],
 			joingroupList: {
 				products: []
 			},
@@ -411,33 +325,10 @@ export default {
 			},
 			//新客
 			freshen: true,
-			swiperHeight: 0,
 			url: '',
 			web: '',
 			site: '',
-			internet: '',
-			storeTemplate: {},
-			typeDistrictTemplate: {},
-			sousuoTemplate: {},
-			popAdTemplate: {},
 			districtTemplate: {},
-			Timelyimg: '',
-			timelyTemplate: {},
-			homecolumnimg: [],
-			customersTemplate: {},
-			joingroupTemplate: {},
-			supplierTemplate: {},
-			seckillTemplate: {},
-			bargainTemplate: {},
-			specialTemplate: {},
-			chosenTemplate: {},
-			arrivalsTemplate: {},
-			hotTemplate: {},
-			groupTemplate: {},
-			recommendTemplate: {},
-			supRecommendTemplate: {},
-			singleTemplate: {},
-			specialList: [],
 			contact: [],
 			seckillList: {
 				products: []
@@ -445,47 +336,29 @@ export default {
 			about: {},
 			Is_Store_Price_Stock: '',
 			guarantee: [],
-			current: '',
 			animationData: '',
 			content: '',
 			popAdList: {},
-			supplierList: {},
-			supRecommendList: {},
-			singlePage: 1,
-			isLoadSingle: true,
-			hasmoreSingle: true,
-			singleList: {},
 			iscouponAd: false,
-			couponAd: {},
 			logo: false,
 			top: Boolean,
 			top_type: Boolean,
 			switchStoreShow: Boolean,
-			bargainShow: Boolean,
 			contactShow: true,
-			seckillShow: false,
-			joingroupShow: false,
-			activityGroupShow: false,
-			customersShow: false,
 			districtShow: false,
-			recommendShow: false,
-			boutiqueShow: false,
-			arrivalsShow: false,
-			hotShow: false,
-			supplierShow: false,
-			supRecommendShow: false,
-			singleShow: false,
-			pCategorShow: false,
 			bannerShow: false,
-			List: [],
-			marqueeOrderItemIndex: 0,
-			marqueeOrderItem: '',
-			// isShowTime: false
 			officeList: [],//互动
 			hotActivityList:[],//热门活动
 			matchList:[],//活动列表
 			
+			tbalList:[],//投保案例
+			tbalIndex:0,//投保案例tab
+			
 			lpalList:[],//理赔案例
+			
+			fxList:[],//发现
+			fxIndex:0,
+			fxContentList:[]
 		};
 	},
 
@@ -572,7 +445,9 @@ export default {
 		
 		this.getHotActivity()
 		this.getMatchList()
+		this.getTbal()
 		this.getLpal()
+		this.getFx()
 
 		// console.log('this.freshen=='+this.freshen)
 		let first = req.getStorage('first');
@@ -630,18 +505,30 @@ export default {
 				this.matchList = res
 			})
 		},
+		// 获取投保案例
+		async getTbal(){
+			this.tbalList = await this.getContentList('toubaoanli')
+			this.tbalList[this.tbalIndex].contentList = await this.getContentPageList(this.tbalList[this.tbalIndex].code)
+			this.$forceUpdate()
+		},
 		// 获取理赔案例
 		async getLpal(){
 			this.lpalList = await this.getContentList('lipeianli')
 			this.lpalList.map(async item=>{
 				item.contentList = await this.getContentPageList(item.code)
+				this.$forceUpdate()
 			})
 		},
+		// 获取发现
+		async getFx(){
+			this.fxList = await this.getContentList('faxian')
+			this.getFxContenteList(this.fxList[this.fxIndex].code)
+		},
 		
 		// 获取文章栏目列表
 		getContentList(code){
 			return new Promise((r,j)=>{
-				req.getRequest('/api/content/category/list',{parentCode:code,limit:1,page:2},res=>{
+				req.getRequest('/api/content/category/list',{parentCode:code},res=>{
 					r(res?res:[])
 				})
 			})
@@ -650,11 +537,33 @@ export default {
 		// 获取文章列表
 		getContentPageList(code){
 			return new Promise((r,j)=>{
-				req.getRequest('/api/content/page',{code:code},res=>{
-					r(res?res.list:[])
+				req.getRequest('/api/content/list',{code:code,page:1,limit:2},res=>{
+					r(res?res:[])
+				})
+			})
+		},
+		
+		// 获取发现文章列表
+		getFxContenteList(code){
+			return new Promise((r,j)=>{
+				req.getRequest('/api/content/list',{code:code,page:1,limit:10},res=>{
+					this.fxContentList = res?res:[]
+					r(res?res:[])
 				})
 			})
 		},
+		// 投保案例tab切换
+		async changeTbalTab(index){
+			if(this.tbalIndex==index) return false;
+			this.tbalIndex = index
+			this.tbalList[this.tbalIndex].contentList = await this.getContentPageList(this.tbalList[this.tbalIndex].code)
+		},
+		// 发现tab切换
+		changeFxTab(index){
+			if(this.fxIndex==index) return false;
+			this.fxIndex = index
+			this.getFxContenteList(this.fxList[this.fxIndex].code)
+		},
 		
 		async getRqeDatas() {
 			console.log('getRqeDatas');
@@ -679,7 +588,6 @@ export default {
 				}
 			} 
 			that.logo = true;
-			await this.getBuyOrderMarquee(!this.isShowTime);
 		},
 
 		getUrl2(e) {
@@ -882,17 +790,6 @@ export default {
 			}, 500000);
 		},
 
-		getListInfo() {
-			if (this.listI >= this.contentList.length - 1) {
-				this.listI = -1;
-				this.getListInfo();
-			} else {
-				this.listI++;
-			}
-
-			return this.contentList[this.listI];
-		},
-
 		loadCodeParams() {
 			let _ts = this;
 
@@ -989,6 +886,13 @@ export default {
 			let url = event.currentTarget.dataset.url;
 			app.globalData.openPage(url);
 		},
+		unitFormat(data){
+			return req.unitConverter(data).text
+		},
+		formatTime(date){
+			date = new Date(date.replace(/-/g, '/'))
+			return utils.formatTime(date).t3
+		}
 	},
 	mounted() {
 		const systemInfo = uni.getSystemInfoSync();

+ 1 - 1
pages/interactive/index.vue

@@ -552,7 +552,7 @@
 				})
 			},
 			getConfig(){
-				req.getRequest('/api/config',{},data=>{
+				req.getRequest('/api/other/config',{},data=>{
 					this.config = data;
 				})
 			},

BIN
static/images/share1.png


BIN
static/images/wxChat.png


+ 62 - 0
topic/alContent/alContent.css

@@ -0,0 +1,62 @@
+/* content.css */
+page{background: #fff;padding: 30rpx 0;box-sizing: border-box;}
+.title{font-size: 40rpx;color: #282828;font-weight: bold;line-height: 60rpx;padding: 0 30rpx;}
+.det-sta{padding: 0 30rpx;margin-top: 20rpx;font-size: 24rpx;}
+.sitename{color: var(--mina);}
+.time{color: #999;margin-left: 15rpx;}
+.time text{font-size: 28rpx;color: #333;margin-right: 23rpx;}
+.content{font-size: 34rpx;color: #333;padding: 30rpx 0;line-height: 1.7;}
+.con-vheight{max-height: 120vh;position: relative;overflow: hidden;}
+.con-vheight::after{content: '';display: block;position: absolute;left: 0;right: 0;bottom: 0;height: 15vh;background: linear-gradient(rgba(255, 255, 255, 0), #fff);z-index: 5;}
+.content video{width: 100%;height: 400rpx;object-fit:fill; margin-bottom: 20rpx;}
+.content image{width: 100%;margin: 30rpx auto;}
+._p{padding: 0 30rpx;}
+.view-more{width: 230rpx;height: 70rpx;font-size: 30rpx;color: #999;margin: 30rpx auto 0;text-align: center;line-height: 70rpx;}
+.bot{padding: 40rpx 35rpx 0;}
+.sbanner{overflow: hidden;position: relative;}
+.sbanner .swiper,.sbanner .swiper image{width: 100%;height: 160rpx;border-radius: 12rpx;overflow: hidden;}
+.dots{position: absolute;left: 0;right: 0;bottom: 20rpx;align-items: center;justify-content: center;}
+.dot{background: rgba(0,0,0,.5);width: 12rpx;height: 12rpx;border-radius: 6rpx;margin: 0 4rpx;}
+.dot.active{width: 30rpx;background: #fff;}
+.tits{font-size: 36rpx;color: #333;font-weight: bold;margin: 30rpx 0 0;}
+.zxlist .li{padding: 40rpx 0;border-bottom: 1rpx solid #EBEBEB;}
+.zximg{width: 230rpx;height: 150rpx;border-radius: 12rpx;margin-right: 23rpx;}
+.zxtit{font-size: 30rpx;color: #333;line-height: 41rpx;height: 82rpx;}
+.datas{font-size: 24rpx;color: #999;margin-top: 30rpx;}
+.adContainer{margin: 30rpx 0 0;border-radius: 10rpx;overflow: hidden;}
+.operate{padding: 30rpx 30rpx 50rpx;justify-content: space-between;font-size: 28rpx;color: #666;}
+.zan image{width: 30rpx;height: 30rpx;margin-right: 15rpx;}
+.zan.active{color: #108FFF;}
+.share{font-size: 28rpx;color: #666;}
+.share image{width: 30rpx;height: 30rpx;margin-right: 15rpx;}
+.box{padding: 40rpx 30rpx 0;border-top: 20rpx solid #f9f9f9;}
+.tit{font-size: 32rpx;color: #333;font-weight: bold;align-items: center;}
+.pro{padding-bottom: 10rpx;}
+.pro .li{padding: 30rpx 0;border-bottom: 1rpx solid #e5e5e5;}
+.pro .li:last-child{border-bottom: none;}
+.proimg{box-sizing: border-box;width: 210rpx;height: 210rpx;border-radius: 10rpx;margin-right: 20rpx;border: 2rpx solid #E5E5E5;}
+.proname{font-size: 28rpx;color: #333;overflow : hidden;line-height: 36rpx;height: 72rpx;}
+.infos {font-size: 24rpx;color: #999;margin: 10rpx 0 20rpx;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+.Ninfos{padding: 16rpx 0;}
+.ope{justify-content: space-between;align-items: center;}
+.price{font-size: 25rpx;color: #FE0419;align-items: center;}
+.price text{font-size: 36rpx;font-weight: bold;}
+.price text.del{font-size: 24rpx !important;color: #999;text-decoration: line-through;margin-left: 15rpx;font-weight: normal !important;}
+.price .vip{margin-left: 12rpx;color: var(--vip);border: 1rpx solid;padding: 0 8rpx 2rpx 8rpx;border-radius: 5px;}
+.price .vip text{font-size: 24rpx;font-weight: normal;}
+.btn{width: 150rpx;height: 50rpx;background: linear-gradient(90deg, rgba(254, 147, 76, 1) 0%, rgba(253, 58, 49, 1) 100%);font-size: 24rpx;color: #fff;text-align: center;line-height: 50rpx;border-radius: 25rpx;}
+.rec .li{padding: 30rpx 0;border-bottom: 1rpx solid #EDEDED;align-items: center;}
+.rec .li:last-child{border-bottom: none;}
+.rec-tit{font-size: 34rpx;color: #333;font-weight: bold;line-height: 48rpx;height: 96rpx;margin-bottom: 25rpx;}
+.author{font-size: 28rpx;color: #999;margin-right: 24rpx;}
+.author image{width: 32rpx;height: 32rpx;border-radius: 2rpx;margin-right: 10rpx;}
+.rec-time{font-size: 28rpx;color: #999;}
+.rec-img{width: 218rpx;height: 152rpx;margin-left: 55rpx;}
+
+/* 广告 */
+.banner{height: 200rpx;position: relative;padding: 30rpx;border-top: 20rpx solid #f9f9f9;}
+.swiper{width: 100%;height: 200rpx;border-radius: 10rpx;}
+.swiper image{width: 100%;height: 100%;border-radius: 10rpx;}
+.dots{position: absolute;left: 50%;transform: translateX(-50%);bottom: 50rpx;z-index: 3;justify-content: center;}
+.dot{width: 46rpx;height: 4rpx;background: rgba(255,255,255,.5);margin: 0 3rpx;}
+.dot.active{background: #fff;}

+ 159 - 0
topic/alContent/alContent.vue

@@ -0,0 +1,159 @@
+<template>
+	<view v-if="detaile">
+		<image mode="widthFix" style="width: 100%;margin-bottom: 40rpx;" v-if="detaile.fieldValues&&detaile.fieldValues.pic" :src="detaile.fieldValues.pic"></image>
+		<block v-else>
+			
+		</block>
+		<view class="content">
+			<view class="viewMore">
+				<mp-html :content="detaile.text" :lazy-load="true" @imgtap="choose"></mp-html>
+			</view>
+		</view>
+		
+		<serviceContact></serviceContact>
+	</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require('../../utils/request.js');
+const api = require('../../utils/api.js');
+const util = require('../../utils/util.js');
+import mpHtml from "../../components/mp-html/components/mp-html/mp-html";
+import serviceContact from "../../components/service-contact/index.vue";
+export default {
+	components: {
+		mpHtml,
+		serviceContact
+	},
+	data() {
+		return {
+			detaile: '',
+			type: 2, //详情类型:1 普通内容 2 自定义页面内容
+			config: {},
+		};
+	},
+
+	onLoad: async function(options) {
+		uni.showShareMenu({
+			withShareTicket: true,
+			menus: ['shareAppMessage', 'shareTimeline']
+		});
+		this.id = options.id;
+		await this.getDetail();
+		this.getContentList();
+		// await this.monitor();
+	},
+	onShow(){
+		this.config =  JSON.parse(req.getStorage('configRes'))
+		this.getBrowse();
+	},
+
+	onShareAppMessage() {
+		return {
+			title: this.detaile.title,
+			imageUrl: this.detaile.pic,
+			path: '/topic/content/content?id=' + this.id +'&isShare=' + true
+		};
+	},
+	onShareTimeline() {
+		return {
+			title: this.detaile.title,
+			imageUrl: this.detaile.pic,
+			path: '/topic/content/content?id=' + this.id +'&isShareTimeline=' + true
+		};
+	},
+	methods: {
+		monitor() {
+			let that = this;
+			let system = uni.getSystemInfoSync();
+			let query = uni.createSelectorQuery();
+			query.select('.viewMore').boundingClientRect(data=>{
+				let height = data.height;
+				if(height > system.screenHeight) {
+					this.viewMore = true
+				}
+			}).exec();
+		},
+		
+		choose: function () {
+		  let freshen = false;
+		  this.$emit('freshen', {
+		    detail: freshen
+		  });
+		},
+		toIndex(){
+			uni.switchTab({
+				url: '/pages/index/index'
+			})
+		},
+		getDateTimeStamp(dateStr){
+		 return util.getDateDiff(Date.parse(dateStr.replace(/-/gi,"/")));
+		},
+		getDetail() {
+			let that = this;
+			let apiUrl = '/api/content/detail';
+			return new Promise((resolve,reject)=>{
+				req.getRequest(apiUrl,{ id: that.id },async res => {
+					if(res.productCategory){
+						res.productCategory = res.productCategory.split(',')
+					}
+					that.detaile = res;
+					let arr = [];
+					if(res.productCategory && res.productCategory.length > 0){
+						for (var i = 0; i < res.productCategory.length; i++) {
+							await that.getProductList(res.productCategory[i], i).then(res=>{
+								arr = arr.concat(res);
+								that.productList = arr;
+								console.log('相关产品=='+JSON.stringify(arr),arr.length)
+							});
+						}
+					}
+					resolve();
+				},true);
+			})
+		},
+		getBrowse(){
+			let params={
+				bindId: this.id,
+				type: 2
+			}
+			req.postRequest('/api/browse', params, data => {});
+		},
+		
+	},
+	filters: {
+		/**
+		 * 处理富文本里的图片宽度自适应
+		 * 1.去掉img标签里的style、width、height属性
+		 * 2.img标签添加style属性:max-width:100%;height:auto
+		 * 3.修改所有style里的width属性为max-width:100%
+		 * 4.去掉<br/>标签
+		 * @param html
+		 * @returns {void|string|*}
+		 */
+		formatRichText(html) {
+			//控制小程序中图片大小
+			let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+				match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
+				match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+				match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+				return match;
+			});
+			newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+				match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+				return match;
+			});
+			// newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+			newContent = newContent.replace(/<br[^>]*\/>/gi, '<p style="margin: 10px 0;"></p>');
+			newContent = newContent.replace(/<br[^>]*\>/gi, '<p style="margin: 10px 0;"></p>');
+			newContent = newContent.replace(/font-size:[^;]+;?/g,'');
+			newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:inline-block;margin:12rpx auto;"');
+			return newContent;
+		}
+	}
+};
+</script>
+<style>
+@import './alContent.css';
+</style>

+ 14 - 4
topic/content/content.css

@@ -24,13 +24,23 @@ page{background: #fff;padding: 30rpx 0;box-sizing: border-box;}
 .zxtit{font-size: 30rpx;color: #333;line-height: 41rpx;height: 82rpx;}
 .datas{font-size: 24rpx;color: #999;margin-top: 30rpx;}
 .adContainer{margin: 30rpx 0 0;border-radius: 10rpx;overflow: hidden;}
-.operate{padding: 30rpx 30rpx 50rpx;justify-content: space-between;font-size: 28rpx;color: #666;}
+.operate{padding: 30rpx 30rpx 50rpx;justify-content: space-between;font-size: 24rpx;color: #999;}
 .zan image{width: 30rpx;height: 30rpx;margin-right: 15rpx;}
 .zan.active{color: #108FFF;}
-.share{font-size: 28rpx;color: #666;}
+.share{font-size: 24rpx;color: #999;}
 .share image{width: 30rpx;height: 30rpx;margin-right: 15rpx;}
 .box{padding: 40rpx 30rpx 0;border-top: 20rpx solid #f9f9f9;}
-.tit{font-size: 32rpx;color: #333;font-weight: bold;align-items: center;}
+.tit{font-size: 32rpx;color: #333;font-weight: bold;align-items: center;position: relative;padding-left: 18rpx;}
+.tit::before{
+	position: absolute;
+	content: '';
+	width: 8rpx;
+	height: 36rpx;
+	background: #27D699;
+	border-radius: 50rpx 50rpx 50rpx 50rpx;
+	opacity: 1;
+	left: 0;
+}
 .pro{padding-bottom: 10rpx;}
 .pro .li{padding: 30rpx 0;border-bottom: 1rpx solid #e5e5e5;}
 .pro .li:last-child{border-bottom: none;}
@@ -51,7 +61,7 @@ page{background: #fff;padding: 30rpx 0;box-sizing: border-box;}
 .author{font-size: 28rpx;color: #999;margin-right: 24rpx;}
 .author image{width: 32rpx;height: 32rpx;border-radius: 2rpx;margin-right: 10rpx;}
 .rec-time{font-size: 28rpx;color: #999;}
-.rec-img{width: 218rpx;height: 152rpx;margin-left: 55rpx;}
+.rec-img{width: 218rpx;height: 152rpx;margin-left: 55rpx;border-radius: 10rpx;}
 
 /* 广告 */
 .banner{height: 200rpx;position: relative;padding: 30rpx;border-top: 20rpx solid #f9f9f9;}

+ 12 - 5
topic/content/content.vue

@@ -2,18 +2,22 @@
 	<view v-if="detaile">
 		<view class="title">{{ detaile.title }}</view>
 		<view class="det-sta dflex">
+			<image style="width: 48rpx;height: 48rpx;margin-right: 10rpx;" src="config.CONFIG_PROJECT_LOGO"></image>
 			<view class="sitename" @click="toIndex('')">{{config.CONFIG_PROJECT_TITLE}}</view>
 			<view class="time">{{getDateTimeStamp(detaile.time)}}</view>
 		</view>
 		<view class="content">
-			<view :class="'viewMore' + (viewMore?'':' con-vheight')">
+			<view class="viewMore">
 				<mp-html :content="detaile.text" :lazy-load="true" @imgtap="choose"></mp-html>
 			</view>
-			<view class="view-more" @tap="viewMores()" v-if="!viewMore">查看全文</view>
+		</view>
+		<view style="font-size: 24rpx;color: #999999;line-height: 36rpx;padding: 0 30rpx;">
+			本文仅代表作者观点,版权归原创者所有,如需转载请在文中注明来源及作者名字。
 		</view>
 		<view class="operate dflex">
-			<view class="zan dflex"><image src="../static/images/view.png"></image>{{detaile.browse}}</view>
-			<button class="share dflex" hover-class="none" open-type="share"><image src="../static/images/share.png"></image>分享</button>
+			<view class="zan dflex">
+				共{{detaile.browse}}次浏览</view>
+			<button class="share ddflex" hover-class="none" open-type="share"><image src="/static/images/share.png"></image>分享</button>
 		</view>
 		<view class="box" v-if="contentList && contentList.length > 0">
 			<view class="tit dflex">为您推荐</view>
@@ -30,6 +34,7 @@
 				</navigator>
 			</view>
 		</view>
+		<serviceContact></serviceContact>
 	</view>
 </template>
 
@@ -39,9 +44,11 @@ const req = require('../../utils/request.js');
 const api = require('../../utils/api.js');
 const util = require('../../utils/util.js');
 import mpHtml from "../../components/mp-html/components/mp-html/mp-html";
+import serviceContact from "../../components/service-contact/index.vue";
 export default {
 	components: {
 		mpHtml,
+		serviceContact
 	},
 	data() {
 		return {
@@ -147,7 +154,7 @@ export default {
 		},
 		getContentList() {
 			let form = this.form;
-			form.code = req.public.marketCode;
+			form.code = this.detaile.PCode;
 			req.getRequest('/api/content/list',form,res => {
 				this.contentList = res;
 				for (var i = 0; i < this.contentList.length; i++) {

+ 1 - 0
topic/contentList/contentList.vue

@@ -83,6 +83,7 @@ export default {
 			let form = this.form;
 			form.code = this.code;
 			req.getRequest('/api/content/list', form,res => {
+				res = res?res.list:null
 				if (res && res.length == 10) {
 					this.isLoad = true;
 				}

+ 22 - 0
utils/request.js

@@ -42,6 +42,10 @@ const publics = {
 	'iconSrc': 'red/',
 	'titleTopBgColor': '#FFF',
 	// 小程序ID  wxe7bec198ecfe1162
+	
+	
+	// 文章栏目code
+	'fxCode':'faxian'
 
 }
 /*
@@ -1049,6 +1053,23 @@ const excludeSpecial = (s) => {
 	return s;
 }
 
+// 数字单位格式化
+function unitConverter (num) {
+	// text 数字+单位 number格式化后的数字 unit单位
+	console.log(num)
+  if (!num || isNaN(num)) {
+    return {text:0,number:0,unit:''}
+  }
+  num = Number(num)
+  if (Math.abs(num) > 100000000) {
+    return {text:(num / 100000000).toFixed(2) + '亿',number:(num / 100000000).toFixed(2),unit:'亿'}
+  } else if (Math.abs(num) > 10000) {
+    return {text:(num / 10000).toFixed(2) + '万',number:(num / 10000).toFixed(2),unit:'万'}
+  } else {
+    return {text:num,number:num,unit:''}
+  }
+}
+
 // 行为操作
 const saveBehavior = (params, success) => {
 	//用户行为:behavior 1、关注 2、收藏 3、点赞 4、浏览 5、确认 6、海报
@@ -1174,6 +1195,7 @@ module.exports = {
 	updataWxInfos: updataWxInfos,
 	saveBehavior: saveBehavior,
 	getBehavior: getBehavior,
+	unitConverter:unitConverter,
 	getIMToken: getIMToken,
 	jumpConversation: jumpConversation
 }

+ 3 - 1
utils/util.js

@@ -8,9 +8,11 @@ const formatTime = date => {
 	var t1 = [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(
 		':');
 	var t2 = [year, month, day].map(formatNumber).join('-');
+	var t3 = [year, month, day].map(formatNumber).join('-');
 	var time = {
 		t1: t1,
-		t2: t2
+		t2: t2,
+		t3: t3
 	};
 	return time;
 };