xhj 2 سال پیش
والد
کامیت
426219b6ff

+ 19 - 28
card/cardFound/cardFound.vue

@@ -4,7 +4,7 @@
 		<map class="map" id="map1" ref="map1" @regionchange="regionChange" :latitude="latitude" :longitude="longitude" :markers="covers" @markertap="clickMap" :scale="mapScale" :circles="circles"></map>
 		<!-- <view class="store" @click="showStore"><image src="../../static/images/sj_map_ico.png"></image></view>
 		<view class="ibn" @click="showCab"><image src="../../static/images/jg_map_ico.png"></image><view class="count ddflex">12</view></view> -->
-		<view class="nearby-box ddflex" @click="jumpUrl('/nearby/list/index?lat='+latitude+'&lng='+longitude)">
+		<view class="nearby-box ddflex">
 			<view class="nearby-yuan"></view>
 			<image src="../../static/images/fj_loca.png" class="loca"></image>
 			<view class="nearby">
@@ -94,30 +94,20 @@ export default {
 		// req.silenceLogin(options.userId, '');
 		this.map = uni.createMapContext("map1", this);
 		let locations = req.getStorage('loctionAddressMap');
-		if(locations){
-			this.latitude = locations.location.lat;
-			this.longitude = locations.location.lng;
-			let points = {
-				latitude: this.latitude,
-				longitude: this.longitude
-			}
-			this.map.moveToLocation(points,res=>{})
-			await this.getCabList();
-		}else{
-			QQMapWX.initMap();
-			req.getLocation(res => {
-				const to = {
-					latitude: res.latitude,
-					longitude: res.longitude
-				};
-				this.latitude = res.latitude;
-				this.longitude = res.longitude;
-				this.map.moveToLocation(to,res=>{})
-				QQMapWX.reverseGeocoder(to,async resp => {
-					await this.getCabList();
-				});
+		QQMapWX.initMap();
+		req.getLocation(res => {
+			const to = {
+				latitude: res.latitude,
+				longitude: res.longitude
+			};
+			req.setStorage('loctionAddressMap',to)
+			this.latitude = res.latitude;
+			this.longitude = res.longitude;
+			this.map.moveToLocation(to,res=>{})
+			QQMapWX.reverseGeocoder(to,async resp => {
+				await this.getCabList();
 			});
-		}
+		});
 	},
 	onShow() {
 		this.getConfig();
@@ -159,10 +149,11 @@ export default {
 			return cover;
 		},
 		async getLoca(){
-			this.covers = [];
-			this.latitude = req.getStorage('loctionAddressMap').location.lat;
-			this.longitude = req.getStorage('loctionAddressMap').location.lng;
-			await this.getCabList();
+			this.map.moveToLocation({latitude:this.latitude,longitude:this.longitude},res=>{})
+			// this.covers = [];
+			// this.latitude = req.getStorage('loctionAddressMap').location.lat;
+			// this.longitude = req.getStorage('loctionAddressMap').location.lng;
+			// await this.getCabList();
 		},
 		async regionChange(e){
 			// console.log('视野发生变化时触发',e)

+ 8 - 1
card/index/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view style="padding-bottom: 30rpx;">
+	<view style="padding-bottom: 30rpx;" v-if="!loading">
 		<view class="top-fixed" :style="'height: '+ systems.barHeight + 'rpx;'">
 			<view :class="'bgcolor' + (isTop == 1 ? ' opacity' : '')" :style="'height:' + systems.barHeight + 'rpx'">
 			</view>
@@ -270,6 +270,8 @@ import util from '../../utils/util.js';
 				fileName: '', //视频名称
 				
 				evaluateInfo:null,//评分
+				
+				loading:true
 			};
 		},
 		components:{ serviceContact },
@@ -278,6 +280,9 @@ import util from '../../utils/util.js';
 			this.cardId = options.cardId;
 			if (options.scene)
 				this.scene = options.scene
+			uni.showLoading({
+				title:'加载中'
+			})
 		},
 
 		async onShow() {
@@ -375,6 +380,8 @@ import util from '../../utils/util.js';
 							}
 						}
 						this.isFirst = false
+						uni.hideLoading()
+						this.loading = false
 					}
 					this.getEvaluate()
 				});

+ 7 - 0
mine/follow/index.css

@@ -0,0 +1,7 @@
+page{background: #fff;}
+.list{padding: 0 30rpx;}
+.list .li{padding: 30rpx 0;border-bottom: 1rpx solid #e9e9e9;}
+.userimg{width: 80rpx;height: 80rpx;border-radius: 50%;margin-right: 25rpx;}
+.name{font-size: 30rpx;color: var(--mina);font-weight: bold;margin-right: 20rpx;}
+.time{font-size: 24rpx;color: #999;}
+.rico{width: 16rpx;height: 27rpx;margin-left: 10rpx;}

+ 69 - 0
mine/follow/index.vue

@@ -0,0 +1,69 @@
+<template>
+	<view>
+		<view class="list" v-if="pageList.length>0">
+			<view class="li ddflex" v-for="(item,index) in pageList" :key="index" @click="jumpUrl(opt.isBusiness ? '/product/home/home?userId='+item.uid : '/topics/home/home?userId='+item.uid)">
+				<image :src="item.avatar" mode="aspectFill" class="userimg"></image>
+				<view class="name fflex">{{item.userName}}</view>
+				<view class="time">{{item.followDate}}</view>
+				<image src="../../static/pages/images/more.png" class="rico"></image>
+			</view>
+		</view>
+		<view class="nodata" v-else>
+			<image :src="picUrlss+'empty_jl.png'"></image>
+			<text>暂无记录</text>
+		</view>
+	</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require("../../utils/request.js");
+const api = require("../../utils/api.js");
+
+export default {
+	data() {
+		return {
+			picUrlss: req.public.picUrls,
+			opt: {},
+			form: {
+				page: 1,
+				limit: 10
+			},
+			isLoad: true,
+			pageList: [],
+		};
+	},
+	props: {},
+	onLoad: async function(options) {
+		this.opt = options;
+		this.getPageList();
+	},
+	onReachBottom() {
+		this.form.page++
+		this.getPageList();
+	},
+	methods: {
+		getPageList(){
+			if (!this.isLoad) return false;
+			this.isLoad = false;
+			let form = this.form;
+			form.behavior = 1;
+			form.type = 11;
+			if(this.opt.userId) form.uid = this.opt.userId;
+			req.getRequest(api.follow_user_list,form,data=>{
+				if ( data && data.length >= 10) this.isLoad = true;
+				if (this.form.page > 1) data = this.pageList.concat(data);
+				this.pageList = data;
+			})
+		},
+		jumpUrl(url){
+			uni.navigateTo({
+				url: url
+			})
+		}
+	}
+};
+</script>
+<style>
+	@import "./index.css";
+</style>

+ 5 - 0
pages.json

@@ -261,6 +261,11 @@
 					"style": {
 						"navigationBarTitleText": "绑定工号"
 					}
+				},{
+					"path": "follow/index",
+					"style": {
+						"navigationBarTitleText": "我的关注"
+					}
 				}
 			]
 		},

+ 3 - 1
pages/index/index.css

@@ -499,7 +499,8 @@ page{background: #fff;}
 /* 参与活动 */
 .map-ac{overflow: hidden;margin-top: 30rpx;}
 .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{display: inline-block;background: #fff;width: 270rpx;height: 260rpx;border-radius: 15rpx;font-size: 32rpx;color: #333;box-sizing: border-box;margin-right: 20rpx;    overflow: hidden;
+    position: relative;}
 .map-acs .li:last-child{margin-right: 30rpx;}
 .map-acs .li image{width: 270rpx;height: 174rpx;border-radius: 15rpx;}
 .ac-title{
@@ -642,6 +643,7 @@ page{background: #fff;}
 	display: inline-block;
 	margin-right: 20rpx;
 	position: relative;
+	overflow: hidden;
 }
 .lpgs-icon{
 	width: 230rpx;

+ 34 - 41
pages/index/index.vue

@@ -31,7 +31,7 @@
 						<view>{{recommendCard.realName}}的微页</view>
 						<image src="/static/images/rico2.png" class="rico"></image>
 					</view>
-					<view class="service-person-number">(工号:{{recommendCard.jobNumber}}) 欢迎您来到我的微页</view>
+					<view class="service-person-number">(工号:{{recommendCard.jobNumber}}) <text v-if="recommendCard&&userInfo.userType!=1">欢迎您来到我的微页</text></view>
 				</view>
 			</view>
 			<view style="margin: 20rpx 30rpx 0;justify-content: space-between;" class="ddflex">
@@ -85,10 +85,10 @@
 			<view class="index-box-title">热门活动</view>
 			<view class="ddflex" style="margin-top: 20rpx;">
 				<view style="margin-right: 20rpx;">
-					<image class="pic230" :src="hotActivityList[0].pic" @click="getUrl2(hotActivityList[0])"></image>
-					<image class="pic230" style="margin-top: 20rpx;" :src="hotActivityList[1].pic" @click="getUrl2(hotActivityList[1])"></image>
+					<image class="pic230" :src="hotActivityList[0].pic" @click="getUrlHot(hotActivityList[0])"></image>
+					<image class="pic230" style="margin-top: 20rpx;" :src="hotActivityList[1].pic" @click="getUrlHot(hotActivityList[1])"></image>
 				</view>
-				<image class="pic480" :src="hotActivityList[2].pic" @click="getUrl2(hotActivityList[2])"></image>
+				<image class="pic480" :src="hotActivityList[2].pic" @click="getUrlHot(hotActivityList[2])"></image>
 			</view>
 		</view>
 
@@ -122,24 +122,13 @@
 						<view class="tbal-nav-label" v-else-if="index==2">30-50岁</view>
 						<view class="tbal-nav-label" v-else-if="index==3">50-65岁</view>
 					</view>
-					<!-- <view class="tbal-nav-item">
-						<view>形成期</view>
-						<view class="tbal-nav-label">20~30岁</view>
-					</view>
-					<view class="tbal-nav-item">
-						<view>成长期</view>
-						<view class="tbal-nav-label">20~30岁</view>
-					</view>
-					<view class="tbal-nav-item">
-						<view>成熟期</view>
-						<view class="tbal-nav-label">20~30岁</view>
-					</view> -->
 				</view>
 
 				<block v-if="tbalList[tbalIndex].contentList&&tbalList[tbalIndex].contentList.length>0">
 					<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>
+						@click="jumpUrl('/topic/content/content?id='+it.id)">
+						<!-- @click="jumpUrl('/topic/alContent/alContent?id='+it.id)" -->
+						<image class="tbal-pic" :src="it.pic?it.pic:'/static/images/lj_img.png'" mode="aspectFill"></image>
 						<view class="flex">
 							<view class="tbal-title">{{it.title}}</view>
 							<view class="ddflex">
@@ -285,9 +274,9 @@
 		</view>
 		<!-- <footer-copyright v-if="logo"></footer-copyright> -->
 		<!-- <contact-button img-url="/static/pages/images/kfico1_1.png" class-name="contact_index" button-text="客服"></contact-button> -->
-		<!-- <view class="guide" @tap="hideGuide" v-if="first">
+		<view class="guide" @tap="hideGuide" v-if="first">
 			<image src="/static/pages/images/guide.png" mode="widthFix"></image>
-		</view> -->
+		</view>
 		<!-- <view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 115) + 'rpx'"></view> -->
 		<foot channel="home" :isUpdate="isUpdate"></foot>
 
@@ -308,14 +297,14 @@
 				复制微信号
 			</view>
 		</view>
-		<msgNumber :bottom="recommendCard?'350rpx':'230rpx'"></msgNumber>
+		<msgNumber :bottom="recommendCard&&userInfo.userType!=1?'350rpx':'230rpx'"></msgNumber>
 		<!-- <view class="chat-fixed" v-if="recommendCard">
 			<view class="chat-box ddflex" @click="jumpSingleChatRoom()">
 				<image :src="recommendCard.avatar?recommendCard.avatar:'../../static/pages/images/userimg.png'"></image>
 				<view class="chat-lyl">聊一聊</view>
 			</view>
 		</view> -->
-		<view :class="'chat-fixed '+(chatShow?'chat-fixed-long':'')" v-if="recommendCard">
+		<view :class="'chat-fixed '+(chatShow?'chat-fixed-long':'')" v-if="recommendCard&&userInfo.userType!=1">
 			<view class="chat-box ddflex" @click="jumpSingleChatRoom()">
 				<image :src="recommendCard.avatar?recommendCard.avatar:'../../static/pages/images/userimg.png'"></image>
 				<view v-if="chatShowText" class="fflex tover"
@@ -362,7 +351,7 @@
 				couponList: {}, //优惠券,
 				isUpdate: false,
 				// 是否更新消息
-				// first: true,
+				first: true,
 				//是否显示提示加入我的小程序
 				isLayerAd: true,
 				//广告
@@ -432,7 +421,9 @@
 				lpalCode: req.public.lpalCode,
 
 				chatShow: true,
-				chatShowText: true
+				chatShowText: true,
+				
+				userInfo:{}
 			};
 		},
 
@@ -488,6 +479,7 @@
 
 		async onShow() {
 			let _ts = this;
+			this.userInfo = req.getStorage('userInfo')
 			await this.getConfig().then(res => {});
 			await this.getHomeTemplateConfig();
 			uni.setNavigationBarColor({
@@ -513,15 +505,15 @@
 				this.getRecommendCard(to)
 			});
 			// console.log('this.freshen=='+this.freshen)
-			// let first = req.getStorage('first');
-			// if (first !== false)
-			// 	_ts.setData({
-			// 		first: true
-			// 	});
-			// else
-			// 	_ts.setData({
-			// 		first: false
-			// 	});
+			let first = req.getStorage('first');
+			if (first !== false)
+				_ts.setData({
+					first: true
+				});
+			else
+				_ts.setData({
+					first: false
+				});
 		},
 
 		onUnload() {
@@ -661,6 +653,7 @@
 				this.tbalIndex = index
 				this.tbalList[this.tbalIndex].contentList = await this.getContentPageList(this.tbalList[this.tbalIndex]
 					.code)
+				this.$forceUpdate()
 			},
 			// 发现tab切换
 			changeFxTab(index) {
@@ -910,13 +903,13 @@
 				}
 			},
 
-			// hideGuide() {
-			// 	//关闭提示加入我的小程序
-			// 	this.setData({
-			// 		first: false
-			// 	});
-			// 	req.setStorage('first', false);
-			// },
+			hideGuide() {
+				//关闭提示加入我的小程序
+				this.setData({
+					first: false
+				});
+				req.setStorage('first', false);
+			},
 
 			hideAd() {
 				//关闭广告
@@ -963,7 +956,7 @@
 				return utils.getAge(date)
 			},
 			// 热门活动
-			getUrl2(item) {
+			getUrlHot(item) {
 				console.log(item)
 				var dt = item
 				var url = "";

+ 1 - 1
pages/interactive/index.css

@@ -177,7 +177,7 @@ page{background: #fff;}
 .team-tit{font-size: 32rpx;color: #333;}
 .team-sta{margin-top: 8rpx;font-size: 24rpx;color: #999;}
 .team-sta text{margin-right: 20rpx;}
-.join-btn{width: 133rpx;height: 60rpx;border-radius: 37rpx;border: 2rpx solid rgba(235, 28, 36, .5);font-size: 28rpx;color: var(--main);text-align: center;line-height: 60rpx;margin-left: 20rpx;}
+.join-btn{width: 133rpx;height: 60rpx;border-radius: 37rpx;border: 2rpx solid var(--main);font-size: 28rpx;color: var(--main);text-align: center;line-height: 60rpx;margin-left: 20rpx;}
 
 
 .guanfang{

+ 5 - 4
pages/user/user.vue

@@ -31,12 +31,13 @@
 				<!-- </navigator> -->
 			</view>
 			<view class="datas dflex">
+				<!-- @click="jumpUrl('mine/coupons/coupons')" -->
 				<navigator url="" hover-class="none" class="li"
-					@click="jumpUrl('mine/coupons/coupons')">
+					>
 					<text>{{ userInfos.coupon ? userInfos.coupon : '0' }}</text>
 					我的收藏
 				</navigator>
-				<navigator url="" hover-class="none" class="li" @click="jumpUrl('integralshop/index/index')">
+				<navigator url="" hover-class="none" class="li" @click="jumpUrl('mine/follow/index')">
 					<text>{{ userInfos.integral ? userInfos.integral : '0' }}</text>
 					我的关注
 				</navigator>
@@ -135,9 +136,9 @@
 				</view>
 			</view>
 		</view>
-
+<!-- url="/promote/invite/invite" -->
 		<view class="box mlist" v-if="userInfos.userType!=1">
-			<navigator class="li ddflex" url="/promote/invite/invite" hover-class="none">
+			<navigator class="li ddflex"  hover-class="none">
 				<image src="/static/images/yqhy.png" class="mico"></image>
 				<view class="fflex">推荐好友</view>
 				<image src="../../static/pages/images/more.png" class="rico"></image>

+ 0 - 5
template/banner/banner.css

@@ -33,8 +33,3 @@
 .pdlr30{
 	margin: 30rpx;
 }
-
-.box-sh{
-	box-shadow: 0rpx 5rpx 0rpx 0rpx rgba(0, 0, 0, .2);
-}
-

+ 1 - 1
template/king_kong_district/king_kong_district.vue

@@ -144,7 +144,7 @@
 					url = "product/detail/detail?id=" + dt.content;
 				} else if (dt.type * 1 == 3) {
 					url = dt.content;
-					console.log('url===',url)
+					console.log('urlgetUrl2===',url)
 					if(!url){
 						req.msg('功能待接入')
 						return false

+ 25 - 3
topic/content/content.vue

@@ -41,7 +41,7 @@
 				</navigator>
 			</view>
 		</view>
-		<serviceContact></serviceContact>
+		<serviceContact v-if="userInfo.userType!=1"></serviceContact>
 	</view>
 </template>
 
@@ -68,10 +68,17 @@ export default {
 			contentList: [],
 			viewMore: false,
 			config: {},
+			userInfo:{},
+			query:{}
 		};
 	},
 
 	onLoad: async function(options) {
+		this.query = options
+		await  req.silenceLogin(options.userId, '');
+		setTimeout(()=>{
+			this.userInfo = req.getStorage('userInfo')
+		},500)
 		uni.showShareMenu({
 			withShareTicket: true,
 			menus: ['shareAppMessage', 'shareTimeline']
@@ -81,8 +88,8 @@ export default {
 		this.getContentList();
 		// await this.monitor();
 	},
-	onShow(){
-		this.config =  JSON.parse(req.getStorage('configRes'))
+	async onShow(){
+		this.getConfig()
 		this.getBrowse();
 	},
 
@@ -101,6 +108,21 @@ export default {
 		};
 	},
 	methods: {
+		getConfig() {
+			var _this = this;
+			return new Promise((res, rej) => {
+				req.g(
+					'/api/other/config',
+					data => {
+						req.setStorage('configRes', JSON.stringify(data));
+						this.config = data;
+						res(data);
+					},
+					true
+				);
+			});
+		},
+		
 		monitor() {
 			let that = this;
 			let system = uni.getSystemInfoSync();

+ 6 - 2
topics/home/home.vue

@@ -507,7 +507,9 @@ export default {
 			}
 			req.postRequest(api.behavior_save,params,data=>{
 				req.msg('已关注');
-				this.getFocusState();
+				setTimeout(()=>{
+					this.getFocusState();
+				},500)
 				this.getUserDetail();
 			})
 		},
@@ -519,7 +521,9 @@ export default {
 			}
 			req.postRequest(api.behavior_delete,params,data=>{
 				req.msg('已取消关注');
-				this.getFocusState();
+				setTimeout(()=>{
+					this.getFocusState();
+				},500)
 				this.getUserDetail();
 			})
 		},

+ 6 - 0
utils/api.js

@@ -318,6 +318,12 @@ module.exports = {
 	// 优惠券
 	coupon_exchange: '/api/v3/coupon/exchange',//兑换码兑换优惠券
 	
+	
+	// 用户行为操作
+	behavior_save: '/api/v3/behavior/save',//保存用户行为数据
+	behavior_get: '/api/v3/behavior/getBehavior',//是否存在用户行为数据
+	behavior_delete: '/api/v3/behavior/delete',//清空用户行为数据
 	//关注用户
 	follow_user_list: '/api/v3/behavior/getFollowUserList',//关注用户列表
+	fans_user_list: '/api/v3/other/getFansList',//用户粉丝列表
 };

+ 1 - 1
utils/request.js

@@ -46,7 +46,7 @@ const publics = {
 
 	// 文章栏目code
 	'fxCode': 'faxian', //发现
-	'xbrmCode': 'xiaobaorumen', //小白入门
+	'xbrmCode': 'xiaobairumen', //小白入门
 	'tbalCode': 'toubaoanli', //投保案例
 	'lpalCode': 'lipeianli', //理赔案例