dwh 2 år sedan
förälder
incheckning
b8306e5955

+ 86 - 87
App.vue

@@ -2,7 +2,6 @@
 	
 	export default {
 		onLaunch: function() {
-			const that=this;
 			// #ifdef MP
 			let sysInfo=uni.getSystemInfoSync(),menuInfo=uni.getMenuButtonBoundingClientRect();
 			let offsetBottom=menuInfo.top-sysInfo.statusBarHeight;
@@ -16,100 +15,100 @@
 			else{
 				this.$store.commit('setPlatform','other');
 			}
+			
 			this.$store.commit('setStatusBarHeight',sysInfo.statusBarHeight);
 			this.$store.commit('setTopbarOffsetHeight',sysInfo.statusBarHeight + offsetBottom*2 + menuInfo.height);
 			this.$store.commit('setTabBarHeight',(this.$util.hasSafeArea()?68:20)+106);
-			
-			return;//单元测试开关
-			if(uni.getStorageSync('autoLogin')==='false'){
-				return;
-			}
-			uni.login({//免密登录
-				success:(res)=>{
-					that.$api.login.wxLogin({
-						scene: "WxMPLogin",
-						miniProgramEncryUserInfoParam:{
-							jsCode:res.code
-						}
-					}).then(result=>{
-						if(result.status==='Succ'){
-							if(!result.data.succ){
-								if(result.data.wxLoginInfo){//新用户保存用户openid,unionId
-									uni.setStorageSync('openId',result.data.wxLoginInfo.openId);
-									uni.setStorageSync('unionId',result.data.wxLoginInfo.unionId);
+			var self = this
+			//全局分享
+			uni.onAppRoute(()=>{
+				const pages=getCurrentPages();
+				let page=pages[pages.length-1];
+				if(page.route!=='pages/friends/user'){
+					let inviteCode=uni.getStorageSync('userInfo')?JSON.parse(uni.getStorageSync('userInfo')).inviteCode:'';
+					uni.getImageInfo({
+						src:'https://zhenyanapp-gen.oss-cn-qingdao.aliyuncs.com/wechat-mini-pro/app-share.png',
+						success: (res) => {
+							page.onShareAppMessage=()=>{
+								return{
+									title:'我在糖果公园等你哟~',
+									path:`pages/friends/friends?invite=${inviteCode}`,
+									imageUrl:res.path
 								}
 							}
-							else{
-								uni.setStorageSync('LL_Ukn',result.data.userToken.ukn);
-								uni.setStorageSync('token',result.data.userToken.token);
-								uni.setStorageSync('userInfo',JSON.stringify(result.data));
-								uni.setStorageSync('user',JSON.stringify(result.data.userToken.user));
-								this.$api.public.aliossCdn({}).then(cdnRes=>{
-									this.$store.commit('setImageCdn',cdnRes.data.pictureCdn);
-									this.$store.commit('setVideoCdn',cdnRes.data.videoCdn);
-								})
-								this.$api.public.mineDetail({
-									getAlbum:true,
-									completeUser:result.data.userToken.user
-								}).then(res=>{
-									this.$store.commit('setUserInfo',res.data);
-									uni.setStorageSync('userInfo',JSON.stringify(res.data));
-									
-									if(result.data.isNew){
-										uni.reLaunch({
-											url:'/pages/info/sex'
-										})
-										return;
-									}
-									let step=result.data.regStepNew||result.data.regStep;
-									switch(step){
-										case 'Sex':
-											uni.reLaunch({
-												url:'/pages/info/sex'
-											})
-										break;
-										case 'SocialImage':
-											uni.reLaunch({
-												url:'/pages/info/figure'
-											})
-										break;
-										case 'SocialData':
-											uni.reLaunch({
-												url:'/pages/info/datum'
-											})
-										break;
-										case 'CityStay':
-											uni.reLaunch({
-												url:'/pages/info/city'
-											})
-										break;
-										case 'WxInfo':
-											uni.reLaunch({
-												url:'/pages/info/wechat'
-											})
-										break;
-										case 'Basic':
-										case 'Index':
-											uni.reLaunch({
-												url:'/pages/friends/friends'
-											})
-										break;
-									}
-									uni.reLaunch({
-										url:'/pages/friends/friends'
-									})
-								})
-								
-							}
 						}
-						
-						
 					})
-				},
-				fail: (err) => {
-					console.log(err)
+					
 				}
-			});
+				
+			})
+			// 获取小程序更新机制兼容
+			if (uni.canIUse('getUpdateManager')) {
+			    const updateManager = wx.getUpdateManager()
+			    //1. 检查小程序是否有新版本发布
+			    updateManager.onCheckForUpdate(function(res) {
+			        // 请求完新版本信息的回调
+			        if (res.hasUpdate) {
+			            //检测到新版本,需要更新,给出提示
+			            uni.showModal({
+			                title: '更新提示',
+			                content: '检测到新版本,是否下载新版本并重启小程序?',
+			                success: function(res) {
+			                    if (res.confirm) {
+			                        //2. 用户确定下载更新小程序,小程序下载及更新静默进行
+			                        uni.showLoading();
+			                        //静默下载更新小程序新版本
+			                        updateManager.onUpdateReady(function() {
+			                            uni.hideLoading()
+			                            //新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+			                            updateManager.applyUpdate()
+			                        })
+			                        updateManager.onUpdateFailed(function() {
+			                            // 新的版本下载失败
+			                            uni.showModal({
+			                                title: '已经有新版本了哟~',
+			                                content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
+			                            })
+			                        })
+			                    } else if (res.cancel) {
+			                        //用户点击取消按钮的处理,如果需要强制更新,则给出二次弹窗,如果不需要,则这里的代码都可以删掉了
+			                        uni.showModal({
+			                            title: '温馨提示~',
+			                            content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~',
+			                            showCancel: false, //隐藏取消按钮
+			                            confirmText: "确定更新", //只保留确定更新按钮
+			                            success: function(res) {
+			                                if (res.confirm) {
+			                                    //下载新版本,并重新应用
+			                                    uni.showLoading();
+			                                    //静默下载更新小程序新版本
+			                                    updateManager.onUpdateReady(function() {
+			                                        uni.hideLoading()
+			                                        //新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+			                                        updateManager.applyUpdate()
+			                                    })
+			                                    updateManager.onUpdateFailed(function() {
+			                                        // 新的版本下载失败
+			                                        uni.showModal({
+			                                            title: '已经有新版本了哟~',
+			                                            content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
+			                                        })
+			                                    })
+			                                }
+			                            }
+			                        })
+			                    }
+			                }
+			            })
+			        }
+			    })
+			} else {
+			    // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
+			    wx.showModal({
+			        title: '提示',
+			        content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+			    })
+			}
 			// #endif
 		},
 		onShow: function() {

+ 4 - 4
components/Popup/PayPopup.vue

@@ -1,6 +1,6 @@
 <template>
-	<cover-view class="container flex-center">
-		<cover-view class="popup flex-center">
+	<view class="container flex-center">
+		<view class="popup flex-center">
 			<image :src="`${assetsUrl}popup-close-white.png`"  mode="aspectFill" class="close" @click="close"></image>
 			<view class="top flex-start">
 				<image :src="`${assetsUrl}popup-vip.png`" mode="aspectFill" class="top-icon"></image>
@@ -50,8 +50,8 @@
 				成为会员即代表同意<text style="color:#ffffff">《增值服务协议》</text></br>
 				如果支付成功,但是没有开通VIP,请<text style="color:#ffffff">联系客服</text>。
 			</view>
-		</cover-view>
-	</cover-view>
+		</view>
+	</view>
 </template>
 
 <script>

+ 1 - 0
components/Status/Status.vue

@@ -61,6 +61,7 @@
 	height: 500rpx;
 	.no-pos{
 		flex-direction: column;
+		padding-top: 250rpx;
 		.no-pos-img{
 			width: 400rpx;
 			height: 400rpx;

+ 2 - 0
components/tui-chat/message-elements/custom-message/index.css

@@ -73,6 +73,8 @@
 	color: #ffffff;
 	font-size: 28rpx;
 	padding-top: 30rpx;
+	text-align: center;
+	padding: 30rpx 50rpx 0rpx 50rpx;
 }
 .err-line{
 	width: 70%;

+ 44 - 25
components/tui-chat/message-elements/custom-message/index.vue

@@ -13,7 +13,7 @@
 			</view>
 			<view class="err-line">
 				<text class="err-text">{{renderDom.context}}</text>
-				<text class="err-text" @click="toPath(renderDom.highlightLink)" :style="{'color':`${renderDom.highlightColor}`}">
+				<text class="err-text" @click="toPath(renderDom.link)" :style="{'color':`${renderDom.highlightColor}`}">
 					{{renderDom.highlightContext}}
 				</text>
 			</view>
@@ -56,6 +56,12 @@ export default {
 		}
 	},
 	methods: {
+		toPath(path){
+			console.log(path)
+			uni.navigateTo({
+				url:path
+			})
+		},
 		// 解析音视频通话消息
 		extractCallingInfoFromMessage(message) {
 			const callingmessage = JSON.parse(message.payload.data);
@@ -106,7 +112,7 @@ export default {
 		parseCustom(message) {
 			// 约定自定义消息的 data 字段作为区分,不解析的不进行展示
 			let data=JSON.parse(message.payload.data);
-			console.log(data)
+			console.log(message)
 			if(data.type===5){
 				const renderDom={
 					type:'image',
@@ -126,32 +132,45 @@ export default {
 				}
 				return renderDom;
 			}
-			if(data.type===99&&data.systemMsgType===10){
-				const renderDom={
-					type:'system',
-					name:'custom',
-					text:'该消息已被屏蔽',
-					flow:'out',
-					context:data.context.substring(0,data.context.indexOf(data.highlightContext)),
-					link:`/pages/webview/webview?url=${this.$util.protocal.behaviorStandar}`,
-					highlightColor:`#${data.highlightColor.substring(2)}`,
-					highlightContext:data.highlightContext
+			if(data.type===99){
+				if(data.systemMsgType===10){
+					const renderDom={
+						type:'system',
+						name:'custom',
+						text:data.context,
+						flow:'out',
+						context:data.context.substring(0,data.context.indexOf(data.highlightContext)),
+						link:`/pages/webview/webview?url=${this.$util.protocal.behaviorStandar}`,
+						highlightColor:`#${data.highlightColor.substring(2)}`,
+						highlightContext:data.highlightContext
+					}
+					return renderDom;
 				}
-				return renderDom;
-			}
-			if(data.type===99&&data.systemMsgType===4){
-				const renderDom={
-					type:'system',
-					name:'custom',
-					text:'',
-					flow:'out',
-					context:data.context.substring(data.context.indexOf(data.highlightContext),data.context.length),
-					link:`/pages/mine/album`,
-					highlightColor:`#${data.highlightColor.substring(2)}`,
-					highlightContext:data.highlightContext
+				if(data.systemMsgType===4){
+					const renderDom={
+						type:'system',
+						name:'custom',
+						text:'',
+						flow:'out',
+						context:data.context.substring(data.context.indexOf(data.highlightContext),data.context.length),
+						link:`/pages/mine/album`,
+						highlightColor:`#${data.highlightColor.substring(2)}`,
+						highlightContext:data.highlightContext
+					}
+					return renderDom;
+				}
+				if(data.systemMsgType===3){
+					const renderDom={
+						type:'system',
+						name:'custom',
+						text:'',
+						flow:'out',
+						context:data.context,
+					}
+					return renderDom;
 				}
-				return renderDom;
 			}
+			
 			return {type: 'notSupport',text: '[自定义消息]'};
 		},
 		previewImage() {

+ 33 - 2
components/tui-chat/message-list/index.vue

@@ -30,6 +30,7 @@
 								class="t-message-avatar"
 								v-if="(item.flow === 'in'&&item.type !== 'TIMCustomElem')||(item.flow === 'in'&&(item.payload.data&&JSON.parse(item.payload.data).type!==99))"
 								:src="item.avatar || 'https://sdk-web-1252463788.cos.ap-hongkong.myqcloud.com/component/TUIKit/assets/avatar_21.png'"
+								@click="toDetail(item.from)"
 							></image>
 							<view class="read-receipts" v-if="conversation.type === 'C2C' && item.flow === 'out'">
 								<view v-if="item.isPeerRead">已读</view>
@@ -173,7 +174,34 @@ export default {
 				this.scrollRefreshing = false;
 			}, 1000);
 		},
-
+		toDetail(id){
+			console.log(id)
+			uni.showLoading({})
+			let user=JSON.parse(uni.getStorageSync('user'));
+			this.$api.public.userDetail({getAlbum:true,completeUser:user,uponUserId:id}).then(res=>{
+				if(res.data.frozen){
+					uni.showToast({
+						title:'该用户已被冻结',
+						icon:'none'
+					});
+					return;
+				}
+				if(res.data.sex===user.sex){
+					uni.showToast({
+						title:'同性用户不能查看主页',
+						icon:'none'
+					})
+				}
+				else{
+					uni.setStorageSync('otherInfo',JSON.stringify(res.data));
+					uni.hideLoading();
+					uni.navigateTo({
+						url:`/pages/friends/user?id=${id}`
+					})
+				}
+			})
+			
+		},
 		getMessageList(conversation) {
 			if (!this.isCompleted) {
 				uni.$TUIKit
@@ -224,7 +252,10 @@ export default {
 		// 收到的消息
 		$onMessageReceived(value) {
 			this.isSend=true;
-			this.messageList.push(value.data[0]);
+			if(this.messageList.indexOf(value.data[0])===-1){
+				this.messageList.push(value.data[0]);
+			}
+			
 			this.scrollToButtom();
 		},
 

+ 21 - 1
pages.json

@@ -272,6 +272,16 @@
 					"navigationStyle":"custom"
 				}
             
+			}
+			,{
+				"path" : "setting/blacklist",
+				"style" :                                                                                    
+				{
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false,
+					"navigationStyle":"custom"
+				}
+			
 			}
 			,{
 			    "path" : "faceVideo/faceVideo",
@@ -283,7 +293,17 @@
 			    }
 			    
 			}
-		]
+		    ,{
+                "path" : "report/report",
+                "style" :                                                                                    
+                {
+                    "navigationBarTitleText": "",
+                    "enablePullDownRefresh": false,
+					"navigationStyle":"custom"
+                }
+                
+            }
+        ]
 	}],
 	"globalStyle": {
 		"navigationBarTextStyle": "white",

+ 107 - 99
pages/friends/friends.vue

@@ -500,29 +500,32 @@
 				return this.$store.state.userInfo||{};
 			}
 		},
-		mounted() {
+		onLoad(options) {
+			console.log(options)
+			if(options.invite){
+				uni.setStorageSync('invited',options.invite);
+			}
 			uni.showLoading({
 				mask:true,
 				title:'加载中'
 			})
+			this.$api.public.aliossCdn({}).then(cdnRes=>{
+				this.$store.commit('setImageCdn',cdnRes.data.pictureCdn);
+				this.$store.commit('setVideoCdn',cdnRes.data.videoCdn);
+				uni.setStorageSync('imageCdn',cdnRes.data.pictureCdn);
+				uni.setStorageSync('videoCdn',cdnRes.data.videoCdn);
+			});
+			this.login();
 			this.computedScollviewHeight();
-			if(!uni.getStorageSync('token')){
-				this.computedLocation();
-			}
-			else{
-				this.computedLocation();
-				this.getRecommendTopsMData();
-				this.getRecommendTopsHData();
-				setTimeout(()=>{
-					this.imInit();
-				},3000)
-				
-			}
-			
-			
-			
 			
 		},
+		onShow() {
+			if(uni.getStorageSync('needFreshList')==='1'){
+				this.recommendRefresh();
+				this.nearRefresh();
+				uni.setStorageSync('needFreshList','0');
+			}
+		},
 		// #ifdef MP
 		onShareAppMessage(){
 			return {
@@ -532,6 +535,65 @@
 		},
 		// #endif
 		methods: {
+			getMineData(){
+				let user=JSON.parse(uni.getStorageSync('user'));
+				this.$api.public.mineDetail({
+					getAlbum:true,
+					completeUser:user
+				}).then(res=>{
+					this.$store.commit('setUserInfo',res.data);
+					uni.setStorageSync('userInfo',JSON.stringify(res.data));
+					if(!res.data.regDone){
+						uni.reLaunch({
+							url:'/pages/info/sex'
+						})
+						return;
+					}
+				})
+			},
+			login(){
+				const that=this;
+				if(uni.getStorageSync('isLogin')==='yes'){
+					this.getMineData();
+					this.computedLocation();
+					return;
+				}
+				uni.login({//免密登录
+					success:(res)=>{
+						that.$api.login.wxLogin({
+							scene: "WxMPLogin",
+							miniProgramEncryUserInfoParam:{
+								jsCode:res.code
+							}
+						}).then(result=>{
+							if(result.status==='Succ'){
+								uni.setStorageSync('openId',result.data.wxLoginInfo.openId);
+								uni.setStorageSync('unionId',result.data.wxLoginInfo.unionId);
+								this.computedLocation();
+								this.getRecommendTopsMData();
+								this.getRecommendTopsHData();
+								uni.setStorageSync('LL_Ukn',result.data.userToken.ukn);
+								uni.setStorageSync('token',result.data.userToken.token);
+								uni.setStorageSync('userInfo',JSON.stringify(result.data));
+								uni.setStorageSync('user',JSON.stringify(result.data.userToken.user));
+								uni.setStorageSync('isLogin','yes');
+								this.$api.public.aliossCdn({}).then(cdnRes=>{
+									this.$store.commit('setImageCdn',cdnRes.data.pictureCdn);
+									this.$store.commit('setVideoCdn',cdnRes.data.videoCdn);
+								})
+							}
+							
+							
+						})
+					},
+					fail: (err) => {
+						console.log(err)
+					}
+				});
+			},
+			closePopup(){
+				this.$refs.popup.close();
+			},
 			imInit(){
 				/**
 				 * IM初始化
@@ -557,7 +619,10 @@
 				uni.$TUIKit.registerPlugin({ 'tim-upload-plugin':TIMUploadPlugin });
 			},
 			resetLoginData() {
-				let user=JSON.parse(uni.getStorageSync('userInfo'));	
+				if(!uni.getStorageSync('userInfo')){
+					return;
+				}
+				let user=JSON.parse(uni.getStorageSync('userInfo'));
 				this.$api.IM.loadSig({}).then(res=>{
 					this.$store.commit('setImLoadSig',res.data.sig);
 					uni.$TUIKit.login({
@@ -565,17 +630,16 @@
 						userSig:this.$store.state.IMloadSig
 					})
 				})
-				
-				uni.hideLoading();
 			},
-			onTIMError() {},
+			onTIMError(error) {
+			},
 			onSDKReady({name}) {
 				const isSDKReady = name === uni.$TUIKitEvent.SDK_READY ? true : false;
 				if(isSDKReady){
 					uni.$emit('isSDKReady', {
 						isSDKReady: true
 					});
-					
+					uni.hideLoading();
 				}
 				
 			},
@@ -625,6 +689,7 @@
 			recommendRestore() {this.recommendTriggered = true;},
 			recommendAbort() {},
 			recommendToBottom(){
+				if(!uni.getStorageSync('token')){return;}
 				if(this.recommendList.length>=this.recommendTotal){return;}
 				this.recommendListOptions.page.index++;
 				this.getRecommendList();
@@ -677,14 +742,9 @@
 			 * 计算列表定位距离
 			 */
 			computedLocation(){
-				// #ifdef MP
 					uni.getFuzzyLocation({
 						type:'gcj02',
 						success:res=>{
-							this.latitude=res.latitude;
-							this.longitude=res.longitude;
-							this.$store.commit('setLatitude',this.latitude);
-							this.$store.commit('setLongitude',this.longitude);
 							wxMapSdk.reverseGeocoder({
 								location:{
 									latitude:res.latitude,
@@ -692,29 +752,28 @@
 								},
 								success:result=>{
 									this.locationCity=result.result.ad_info.city;
+									this.latitude=result.result.location.lat;
+									this.longitude=result.result.location.lng;
+									this.$store.commit('setLatitude',result.result.location.lat);
+									this.$store.commit('setLongitude',result.result.location.lng);
+									uni.setStorageSync('latitude',result.result.location.lat);
+									uni.setStorageSync('longitude',result.result.location.lng);
+									uni.setStorageSync('city',this.locationCity);
 									this.locationCityCode=result.result.ad_info.city_code.split(result.result.ad_info.nation_code)[1];
-									this.getTempRecommendList();
 									if(!uni.getStorageSync('token')){
 										this.getTempRecommendList();
 									}
 									else{
-										this.$api.public.heartBeat({
-											city:this.locationCity,
-											cityCode:this.locationCityCode,
-											geo:{
-												lat:this.latitude,
-												lon:this.longitude,
-											}
-											
-										}).then(()=>{
-											this.getNearTopsMData();
-											this.getNearTopsHData();
-											this.getNearList();
-											this.getRecommendList();
-											this.showGetLocation=false;
-										}).catch(err=>{
-											this.getTempRecommendList();
-										})
+										this.getNearTopsMData();
+										this.getNearTopsHData();
+										this.getRecommendTopsMData();
+										this.getRecommendTopsHData();
+										this.getNearList();
+										this.getRecommendList();
+										this.showGetLocation=false;
+										setTimeout(()=>{
+											this.imInit();
+										},2000)
 									}
 									
 									
@@ -742,58 +801,6 @@
 							})
 						}
 					})
-				// #endif
-				// #ifdef H5
-				console.log('h5')
-					uni.getLocation({
-						type: 'wgs84',
-						success: (res) => {
-							console.log(res)
-							this.latitude=res.latitude;
-							this.longitude=res.longitude;
-							this.$store.commit('setLatitude',this.latitude);
-							this.$store.commit('setLongitude',this.longitude);
-							this.$jsonp('https://apis.map.qq.com/ws/geocoder/v1',{
-								key:'E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII',
-								output:'jsonp',
-								callbackName: 'QQmap',
-								location:`${this.latitude},${this.longitude}`
-							}).then(result=>{
-								console.log(result)
-								this.locationCity=result.result.ad_info.city;
-								this.locationCityCode=result.result.ad_info.city_code.split(result.result.ad_info.nation_code)[1];
-								this.getTempRecommendList();
-								if(!uni.getStorageSync('token')){
-									this.getTempRecommendList();
-								}
-								else{
-									this.$api.public.heartBeat({
-										city:this.locationCity,
-										cityCode:this.locationCityCode,
-										geo:{
-											lat:this.latitude,
-											lon:this.longitude,
-										}
-										
-									}).then(()=>{
-										this.getNearTopsMData();
-										this.getNearTopsHData();
-										this.getNearList();
-										this.getRecommendList();
-										this.showGetLocation=false;
-									}).catch(err=>{
-										this.getTempRecommendList();
-									})
-								}
-							}).catch(err=>{
-								console.log(err)
-							})
-						},
-						fail:err=>{
-							console.log(err);
-						}
-					})
-				// #endif
 					
 			},
 			toLogin(){
@@ -874,7 +881,7 @@
 				this.recommendListOptions.type='FamaleReco';
 				this.$api.public.friendsNoAuth(this.recommendListOptions).then(res=>{
 					if(res.status==='Succ'){
-						
+						uni.hideLoading();
 						this.recommendTotal=res.data.page.recordCount;
 						this.recommendListOptions.page.sortValues=res.data.sortValues;
 						
@@ -906,7 +913,6 @@
 									else{
 										this.recommendList=res.data.users;
 									}
-									uni.hideLoading();
 									this.$forceUpdate();
 								}
 								
@@ -957,6 +963,7 @@
 									else{
 										this.recommendList=res.data.users;
 									}
+									uni.hideLoading();
 									this.$forceUpdate();
 								}
 								
@@ -1005,6 +1012,7 @@
 									else{
 										this.nearList=res.data.users;
 									}
+									uni.hideLoading()
 									this.$forceUpdate();
 								}
 								
@@ -1046,7 +1054,7 @@
 						})
 					}
 					else{
-						this.otherInfo=res.data;
+						uni.setStorageSync('otherInfo',JSON.stringify(res.data));
 						uni.hideLoading();
 						uni.navigateTo({
 							url:`/pages/friends/user?id=${id}`

+ 228 - 18
pages/friends/user.vue

@@ -1,10 +1,16 @@
 <template>
 	<view class="container" ref="container">
 		<!-- @touchmove.stop.prevent="moveStop" -->
-		<view id="topnav" class="topnav flex-start" :style="{'height':`${topbarOffsetHeight-statusBarHeight}px`,'padding-top':`${statusBarHeight}px`,'background-color':`rgba(21, 17, 38,${topNavAlpha})`}" v-if="!cover.isFullScreen">
-			<view class="nav-item" @click="back">
+		<view id="topnav" class="topnav flex-between" :style="{'height':`${topbarOffsetHeight-statusBarHeight}px`,'padding-top':`${statusBarHeight}px`,'background-color':`rgba(21, 17, 38,${topNavAlpha})`}" v-if="!cover.isFullScreen">
+			<view class="nav-item" @click="back" v-if="backType==='back'">
 				<image :src="`${assetsUrl}back.png`" mode="widthFix" class="nav-img"></image>
 			</view>
+			<view class="nav-item" @click="toHome" v-if="backType==='home'">
+				<image :src="`${assetsUrl}home.png`" mode="widthFix" class="nav-img"></image>
+			</view>
+			<view class="report">
+				<image :src="`${assetsUrl}user-report.png`" mode="widthFix" class="report-img" @click="showSettingAction()"></image>
+			</view>
 		</view>
 		<uni-popup ref="popup" type="center">
 			<Popup :content1="popup.content1" :content2="popup.content2" :tip1="popup.tip1" :tip2="popup.tip2" :btntext="popup.btntext" @closePopup="closePopup"  @toService="toService" :btnEvent="'toService'"></Popup>
@@ -114,7 +120,7 @@
 					</view>
 				</view> -->
 			</view>
-			<view class="live-box flex-start">
+			<view class="live-box flex-start" v-if="userInfo.cities.length>0">
 				<view class="live-inner flex-start">
 					<image :src="`${assetsUrl}user-city.png`" mode="aspectFill" class="live-img"></image>
 					<span class="live font28 fw400">常驻:</span><span class="live font28 fw400" v-for="(item,index) in userInfo.cities" :key="index">{{item}}</span>
@@ -173,7 +179,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="photo-album">
+			<view class="photo-album" v-if="pics.length>0">
 				<view class="pics-box flex-center">
 					<image :src="currentPic.url" mode="widthFix" class="big-pic" v-if="currentPic.cate==='Img'" @click="preview"></image>
 					<video :src="currentPic.url" 
@@ -226,6 +232,7 @@
 				<text class="btn-text font32 fw600">喜欢TA</text>
 			</view>
 		</view>
+		<canvas type='2d' canvas-id="mycanvas" id="mycanvas" class="my-canvas"></canvas>
 	</view>
 </template>
 
@@ -278,7 +285,10 @@
 				},
 				payPopupIndex:-1,
 				vipPopupIndex:-1,
-				scrollTop:0
+				scrollTop:0,
+				shareImageUrl:'',
+				inviteCode:JSON.parse(uni.getStorageSync('userInfo')).inviteCode,
+				backType:'',//返回类型
 			};
 		},
 		computed: {
@@ -296,27 +306,36 @@
 			}
 		},
 		onLoad(options) {
-		
+			console.log(options)
+			if(options.invite){
+				uni.setStorageSync('invited',options.invite);
+				this.backType='home';
+			}
+			else{
+				this.backType='back'
+			}
+			if(options.token){
+				uni.setStorageSync('token',options.token);
+			}
 			this.getConfig();
 			this.id=options.id;
+			
 			this.getUserDetail();
 			this.likeInit();
 			this.getLikeData();
-			this.getMineDetail()
-		},
-		mounted() {
-			
-			
+			this.getMineDetail();
 		},
 		onPageScroll(e) {
 			this.topNavAlpha=e.scrollTop/250;
 			this.scrollTop=e.scrollTop;
 		},
-		onShareAppMessage(){
-			return {
-				title: '糖果公园',
-				path: `/pages/login/login?share=${this.userInfo.inviteCode}`,
+		onShareAppMessage() {
+			return{
+				title:this.userInfo.nick,
+				path:`pages/friends/user?id=${this.userInfo.id}&invite=${this.inviteCode}&token=${uni.getStorageSync('token')}`,
+				imageUrl:this.shareImageUrl
 			}
+			
 		},
 		methods:{
 			back(){
@@ -324,6 +343,64 @@
 					delta:1
 				})
 			},
+			toHome(){
+				console.log('首页')
+				uni.reLaunch({
+					url:'/pages/friends/friends'
+				})
+			},
+			showSettingAction(){
+				//this.$refs.settingPopup.open();
+				const that=this;
+				uni.showActionSheet({
+					itemList: ['举报', '拉黑'],
+					success: (res)=>{
+						if(res.tapIndex===0){
+							uni.navigateTo({
+								url:`/pagesSub/report/report?id=${this.userInfo.id}`
+							})
+						}
+						if(res.tapIndex===1){
+							uni.showModal({
+								cancelText:'取消拉黑',
+								confirmText:'确定拉黑',
+								title:'温馨提示',
+								content:'拉黑后将不会收到对方相关的内容,可在‘我的-设置-黑名单’中解除拉黑',
+								success: (actres) => {
+									if(actres.confirm){
+										let user=JSON.parse(uni.getStorageSync('user'));
+										that.$api.public.operUponUser({
+											completeUser:user,
+											direction:'Do',
+											operType:'Hate',
+											uponUserId:this.id
+										}).then(res=>{
+											if(res.data.succ){
+												uni.showToast({
+													title:'拉黑成功'
+												});
+												uni.setStorageSync('needFreshList','1');
+												uni.navigateBack();
+											}
+											else{
+												uni.showToast({
+													icon:'none',
+													title:res.data.msg
+												});
+												uni.navigateBack();
+											}
+										})
+									}
+								}
+							})
+							
+						}
+					},
+					fail: res=>{
+						console.log(res.errMsg);
+					}
+				});
+			},
 			moveStop(){
 				return false
 			},
@@ -376,6 +453,21 @@
 				 })
 			},
 			likeAction(){
+				if(uni.getStorageSync('isLogin')!=='yes'){
+					uni.showModal({
+						title:'提示',
+						content:'您当前未登录,请登录后开启点赞哦~',
+						confirmText:'去登录',
+						success: (res) => {
+							if(res.confirm){
+								uni.reLaunch({
+									url:'pages/login/login'
+								})
+							}
+						}
+					})
+					return;
+				}
 				let user=JSON.parse(uni.getStorageSync('user'));
 				this.$api.public.isLike({
 					completeUser:user,
@@ -391,6 +483,12 @@
 							this.likeNum--;
 						}
 					}
+					else{
+						uni.showToast({
+							icon:'none',
+							title:res.data.msg
+						})
+					}
 				})
 			},
 			preview(){
@@ -446,11 +544,90 @@
 					this.cover.isFullScreen=false;
 				}
 			},
+			drawCanvas(){
+				let that=this;
+				let rpx;
+				uni.getSystemInfo({
+					success: (res) => {
+						rpx=res.windowWidth/375;
+						const query=uni.createSelectorQuery();
+						query.select('#mycanvas').fields({node:true,size:false}).exec(res=>{
+							console.log(res)
+							const canvas=res[0].node;
+							const ctx=canvas.getContext('2d');
+							canvas.width=500*rpx;
+							canvas.height=400*rpx;
+							new Promise(resolve=>{
+								uni.getImageInfo({
+									src:that.userInfo.icon,
+									success: (res) => {
+										const img=canvas.createImage();
+										img.src=res.path;
+										img.onload=()=>{
+											ctx.drawImage(img,0,0,500*rpx,400*rpx);
+											resolve(true);
+										}
+									}
+								})
+							}).then(()=>{
+								return new Promise((resolve)=>{
+									ctx.font=`500 ${30*rpx}px Arial`;
+									ctx.fillStyle='#ffffff';
+									ctx.fillText(`${that.userInfo.ageInfo.age}岁|${that.userInfo.career}`,28*rpx,285*rpx);
+									resolve(true);
+								})
+							}).then(()=>{
+								return new Promise((resolve)=>{
+									ctx.font=`500 ${24*rpx}px Arial`;
+									ctx.fillStyle='#ffffff';
+									ctx.fillText(`${that.userInfo.height}cm · ${that.userInfo.weight}kg · ${that.userInfo.ageInfo.astro}`,28*rpx,339*rpx);
+									resolve(true);
+								})
+							}).then(()=>{
+								return new Promise((resolve)=>{
+									uni.getImageInfo({
+										src:'https://zhenyanapp-gen.oss-cn-qingdao.aliyuncs.com/wechat-mini-pro/share-talk.png',
+										success: (res) => {
+											const img=canvas.createImage();
+											img.src=res.path;
+											img.onload=()=>{
+												ctx.drawImage(img,324*rpx,286*rpx,148*rpx,56*rpx);
+												resolve(true);
+											}
+										}
+									})
+								})
+							}).then(()=>{
+								return new Promise((resolve)=>{
+									uni.canvasToTempFilePath({
+										canvas:canvas,
+										success:result=>{
+											that.shareImageUrl=result.tempFilePath;
+											uni.hideLoading();
+											resolve(true);
+										}
+									})
+								})
+							})
+							
+						})
+					}
+				});
+				
+				
+				
+				return;
+				
+			},
 			getUserDetail(){
+				uni.showLoading({
+					title:'加载中'
+				});
 				let pages = getCurrentPages();
 				let prevPage = pages[pages.length - 2];
 				let user=JSON.parse(uni.getStorageSync('user'));
-				this.userInfo=prevPage.$vm.otherInfo;
+				this.userInfo=JSON.parse(uni.getStorageSync('otherInfo'));
+				this.drawCanvas();
 				this.pics=this.userInfo.medias;
 				if(user.sex==='Male'){
 					this.$api.public.seeMaleDetail({completeUser:user,jsjf:this.id}).then(()=>{})
@@ -545,7 +722,21 @@
 				})
 			},
 			toTalk(){
-				console.log(this.userInfo,this.mineInfo);
+				if(uni.getStorageSync('isLogin')!=='yes'){
+					uni.showModal({
+						title:'提示',
+						content:'您当前未登录,请登录后开启聊天哦~',
+						confirmText:'去登录',
+						success: (res) => {
+							if(res.confirm){
+								uni.reLaunch({
+									url:'pages/login/login'
+								})
+							}
+						}
+					})
+					return;
+				}
 				if(this.mineInfo.sex==='Male'&&!this.mineInfo.vip){
 					if(this.platForm==='ios'){
 						this.vipPopupIndex=0;
@@ -593,7 +784,6 @@
 	background-color: $bgcolor1;
 	position: relative;
 	.topnav {
-		padding: 0 10rpx;
 		position: fixed;
 		top: 0;
 		left: 0;
@@ -610,6 +800,15 @@
 			}
 			
 		}
+		.report{
+			margin-right:200rpx;
+			width: 40rpx;
+			height: 40rpx;
+			.report-img{
+				width: 40rpx;
+				height: 40rpx;
+			}
+		}
 		.nav-edit{
 			width:120rpx;
 			height: 56rpx;
@@ -844,6 +1043,7 @@
 				margin-top: 26rpx;
 				position: relative;
 				margin-bottom: 30rpx;
+				max-height: 800rpx;
 				overflow: hidden;
 				
 				.self{
@@ -943,5 +1143,15 @@
 			margin-left: 8rpx;
 		}
 	}
+	.my-canvas{
+		width:500px;
+		height: 400px;
+		margin: 0;
+		padding: 0;
+		position: fixed;
+		top: -1000px;
+		left: 0;
+		
+	}
 }
 </style>

+ 7 - 6
pages/info/city.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container">
-		<TopBar id="topbar"></TopBar>
+		<TopBar id="topbar" :icon="type==='edit'?'back':''"></TopBar>
 		<view class="line-bar flex-between" id="linebar" v-if="type==='add'">
 			<view class="span active"></view>
 			<view class="span active"></view>
@@ -16,7 +16,7 @@
 		</view>
 		<view class="choose-list flex-start" id="chooselist">
 			<view class="choose-tag flex-center" v-for="(item,index) in chooseCitys" :key="index">
-				<text class="tag-text font28 fw600">{{item.name}}</text>
+				<text class="tag-text font28 fw600">{{item}}</text>
 				<image :src="`${assetsUrl}info-figure-close.png`" mode="aspectFill" class="tag-img" @click="deleteTag(index)"></image>
 			</view>
 		</view>
@@ -64,6 +64,7 @@
 				let pages = getCurrentPages();
 				let prevPage = pages[pages.length - 2];
 				this.chooseCitys=prevPage.$vm.myCitys;
+				console.log(this.chooseCitys)
 			}
 			this.computedScollviewHeight();
 			this.getHotCitys()
@@ -94,7 +95,7 @@
 						return;
 					}
 					for(let i=0;i<this.chooseCitys.length;i++){
-						this.saveOption.cities.push(`${this.chooseCitys[i].name}`);
+						this.saveOption.cities.push(`${this.chooseCitys[i]}`);
 					}
 					this.saveOption.completeUser=JSON.parse(uni.getStorageSync('user'));
 					uni.showLoading({
@@ -115,7 +116,7 @@
 					let prevPage = pages[pages.length - 2];
 					let arr=[];
 					for(let i=0;i<this.chooseCitys.length;i++){
-						arr.push(`${this.chooseCitys[i].name}`);
+						arr.push(`${this.chooseCitys[i]}`);
 					}
 					console.log(arr)
 					prevPage.$vm.myCitys=arr;
@@ -137,8 +138,8 @@
 			chooseTag(index,sindex){
 				if(this.chooseCitys.length>5){return;}
 				this.cityList[index].data[sindex].choose=!this.cityList[index].data[sindex].choose;
-				if(this.cityList[index].data[sindex].choose&&!this.chooseCitys.includes({name:this.cityList[index].data[sindex].name,code:this.cityList[index].data[sindex].code})){
-					this.chooseCitys.push({name:this.cityList[index].data[sindex].name,code:this.cityList[index].data[sindex].code})
+				if(this.cityList[index].data[sindex].choose&&!this.chooseCitys.includes(this.cityList[index].data[sindex].name)){
+					this.chooseCitys.push(this.cityList[index].data[sindex].name)
 				}
 				setTimeout(()=>{
 					this.computedScollviewHeight();

+ 1 - 1
pages/info/datum.vue

@@ -123,7 +123,7 @@
 				if(this.job==='选择职业'){uni.showToast({title:'请选择职业',icon:'none'});return;}
 				let user=JSON.parse(uni.getStorageSync('user'));
 				user.career=this.job;
-				user.height=Number(this.height.substring(0,2));
+				user.height=Number(this.height.split('cm')[0]);
 				user.weight=Number(this.weight.split('kg')[0]);
 				this.saveOption.completeUser=user;
 				this.saveOption.birthday=this.age;

+ 47 - 19
pages/info/editCenter.vue

@@ -156,7 +156,7 @@
 				</view>
 			</view>
 			<view class="input-box flex-between">
-				<input type="text" maxlength="10" placeholder="请填写真实正确的微信号" placeholder-style="color:#494667;font-size:28rpx;" class="input fw500 font32" v-model="wechat">
+				<input type="text" maxlength="10" placeholder="请填写真实正确的微信号" placeholder-style="color:#494667;font-size:28rpx;" class="input fw500 font32" :value="wechat" @input="wechatInput">
 			</view>
 			<view class="select-title font28 fw400">
 				设置查看权限
@@ -257,10 +257,7 @@
 				jobs:[],
 				careersData:[],
 				job:'选择职业',
-				auths:[
-					{key:'WxM2F5',value:'对VIP公开或使用颜豆、权益卡查看'},
-					{key:'WaitAuth',value:'经过我授权才能查看微信'},
-				],
+				auths:[],
 				auth:'经过我授权才能查看微信',
 				weiXinStatusEnum:'WaitAuth',
 				wechat:'',
@@ -293,10 +290,6 @@
 				return this.$store.state.topbarOffsetHeight;
 			}
 		},
-		onLoad(options) {
-			this.computedScollviewHeight();
-			this.getMineData();
-		},
 		mounted() {
 			let arr=[];
 			for(let i=150;i<210;i++){
@@ -309,12 +302,39 @@
 			}
 			this.weights=arr;
 			this.getCareersConfig();
-			
+			let user=JSON.parse(uni.getStorageSync('user'));
+			if(user.sex==='Famale'){
+				this.auths=[
+					{key:'WxM2F5',value:'对VIP公开或使用颜豆、权益卡查看'},
+					{key:'WaitAuth',value:'经过我授权才能查看微信'},
+				]
+				this.auth='对VIP公开或使用颜豆、权益卡查看';
+			}
+			else if(user.sex==='Male'){
+				this.auths=[
+					{key:'WxF2M7',value:'对完成真人认证的女士公开'},
+					{key:'WaitAuth',value:'经过我授权才能查看微信'},
+				]
+				this.auth='对完成真人认证的女士公开';
+			}
+			this.computedScollviewHeight();
+			this.getMineData();
 		},
 		onPageScroll(e) {
 			
 		},
 		methods:{
+			wechatInput(e){
+				let value=(e.detail.value||'').trim();
+				if(value){
+					const reg = /[\u4e00-\u9fa5]/ig;
+					if ((reg.test(value))) {
+						value = value.replace(reg, '');
+						return;
+					}
+				}
+				this.wechat=e.detail.value;
+			},
 			back(){
 				uni.navigateBack({
 					delta:1
@@ -434,10 +454,10 @@
 				})
 			},
 			heightsChange(e){
-				this.height=this.heights[e.detail.value];
+				this.height=parseInt(this.heights[e.detail.value].split('cm')[0]);
 			},
 			weightsChange(e){
-				this.weight=this.weights[e.detail.value];
+				this.weight=parseInt(this.weights[e.detail.value].split('kg')[0]);
 			},
 			agesChange(e){
 				this.age=e.detail.value;
@@ -483,13 +503,20 @@
 				this.weight=userInfo.weight;
 				this.age=userInfo.ageInfo.birthday;
 				this.job=userInfo.career;
-				this.wechat=userInfo.wxId
-				this.weiXinStatusEnum=userInfo.weixinStatus;
-				this.auths.forEach((item,index)=>{
-					if(item.key===this.weiXinStatusEnum){
-						this.auth=item.value;
-					}
-				});
+				this.wechat=userInfo.wxId;
+				
+				if(userInfo.weixinStatus==='NoWeiXin'){
+					this.auth='';
+				}
+				else{
+					this.weiXinStatusEnum=userInfo.weixinStatus;
+					this.auths.forEach((item,index)=>{
+						if(item.key===this.weiXinStatusEnum){
+							this.auth=item.value;
+						}
+					});
+				}
+				
 				this.myCitys=userInfo.cities||[];
 				this.myLabels=userInfo.myLabels||[];
 				this.myWants=userInfo.userWantedLabels||[];
@@ -529,6 +556,7 @@
 									icon:'success'
 								});
 							})
+							this.$api.public.wxConfig({status:this.weiXinStatusEnum}).then(res=>{})
 							this.getMineDetail();
 						}
 					})

+ 3 - 0
pages/info/figure.vue

@@ -129,6 +129,9 @@
 				
 			};
 		},
+		onLoad() {
+			this.code=uni.getStorageSync('invited')?uni.getStorageSync('invited'):'';
+		},
 		methods:{
 			sure(){
 				if(this.btnText==='从相册上传'){

+ 18 - 2
pages/info/wechat.vue

@@ -20,7 +20,7 @@
 			</view>
 		</view>
 		<view class="input-box flex-between">
-			<input type="text" maxlength="10" placeholder="请填写真实正确的微信号" placeholder-style="color:#494667;font-size:28rpx;" class="input fw500 font32" v-model="wechat">
+			<input type="text" maxlength="10" placeholder="请填写真实正确的微信号" placeholder-style="color:#494667;font-size:28rpx;" class="input fw500 font32" :value="wechat" @input="wechatInput">
 		</view>
 		<view class="select-title font28 fw400">
 			设置查看权限
@@ -76,8 +76,11 @@
 		},
 		methods:{
 			sure(){
-				if(this.wechat===''){uni.showToast({title:'请填写微信号',icon:'none'});return;}
+				
 				let user=JSON.parse(uni.getStorageSync('user'));
+				if(this.$util.checkChinese(this.wechat)){uni.showToast({title:'微信号格式有误,请重新输入',icon:'none'});return;}
+				
+				if(this.wechat===''&&user.sex==='Famale'){uni.showToast({title:'请填写微信号',icon:'none'});return;}
 				user.wxId=this.wechat;
 				this.saveOption.completeUser=user;
 				uni.showLoading({
@@ -93,12 +96,25 @@
 							icon:'success',
 							title:'保存成功'
 						});
+						this.$api.public.wxConfig({status:this.saveOption.weiXinStatusEnum}).then(res=>{})
 						this.getMineDetail();
 						uni.switchTab({
 							url:'/pages/friends/friends'
 						})
 					}
 				})
+				
+			},
+			wechatInput(e){
+				let value=(e.detail.value||'').trim();
+				if(value){
+					const reg = /[\u4e00-\u9fa5]/ig;
+					if ((reg.test(value))) {
+						value = value.replace(reg, '');
+						return;
+					}
+				}
+				this.wechat=e.detail.value;
 			},
 			authsChange(e){
 				this.auth=this.auths[e.detail.value].value;

+ 108 - 59
pages/login/login.vue

@@ -27,7 +27,6 @@
 		},
 		methods: {
 			toPhoneLogin(){
-				console.log('123')
 				uni.navigateTo({
 					url:'/pages/login/loginByPhone'
 				})
@@ -39,68 +38,117 @@
 					mask:true,
 					title:'正在登录'
 				})
-				if(e.detail.errMsg==='getPhoneNumber:ok'){
-					let appConfig=uni.getAccountInfoSync();
-					let deviceConfig=uni.getSystemInfoSync();
-					this.$api.login.wxLogin({
-						scene: "WxMPLogin",
-						miniProgramEncryUserInfoParam:{
-						    encryptedData:e.detail.encryptedData,
-							iv:e.detail.iv,
-							code:e.detail.code,
-							deviceCode:deviceConfig.deviceId,
-							pkgCate:"JyPark",
-							platform:"WechatMP",
-							appVersion:appConfig.miniProgram.version||'1.0.0',
-						},
-						wxLoginInfo:{
-							openId:uni.getStorageSync('openId')||null,
-							unionId:uni.getStorageSync('unionId')||null
-						}
-					}).then(res=>{
-						if(res.data.frozen){
-							uni.showToast({
-								icon:"none",
-								title:res.data.msg
-							});
-						}
-						else if(res.data.succ){
-							uni.setStorageSync('LL_Ukn',res.data.userToken.ukn);
-							uni.setStorageSync('token',res.data.userToken.token);
-							uni.setStorageSync('userInfo',JSON.stringify(res.data));
-							uni.setStorageSync('user',JSON.stringify(res.data.userToken.user));
-							this.$api.public.aliossCdn({}).then(cdnRes=>{
-								this.$store.commit('setImageCdn',cdnRes.data.pictureCdn);
-								this.$store.commit('setVideoCdn',cdnRes.data.videoCdn);
-							})
-							if(res.data.isNew){
-								uni.navigateTo({
-									url:'/pages/info/sex'
-								})
-								return;
+				uni.login({//免密登录
+					success:(res)=>{
+						this.$api.login.wxLogin({
+							scene: "WxMPLogin",
+							miniProgramEncryUserInfoParam:{
+								jsCode:res.code
+							}
+						}).then(result=>{
+							if(result.status==='Succ'){
+								if(result.data.wxLoginInfo){//新用户保存用户openid,unionId
+									uni.setStorageSync('openId',result.data.wxLoginInfo.openId);
+									uni.setStorageSync('unionId',result.data.wxLoginInfo.unionId);
+								}
+								if(e.detail.errMsg==='getPhoneNumber:ok'){
+									let appConfig=uni.getAccountInfoSync();
+									let deviceConfig=uni.getSystemInfoSync();
+									this.$api.login.wxLogin({
+										scene: "WxMPLogin",
+										miniProgramEncryUserInfoParam:{
+										    encryptedData:e.detail.encryptedData,
+											iv:e.detail.iv,
+											code:e.detail.code,
+											deviceCode:deviceConfig.deviceId,
+											pkgCate:"JyPark",
+											platform:"WechatMP",
+											appVersion:appConfig.miniProgram.version||'1.0.0',
+										},
+										wxLoginInfo:{
+											openId:uni.getStorageSync('openId')||null,
+											unionId:uni.getStorageSync('unionId')||null
+										},
+										androidMarket:'WechatMP',
+										model:deviceConfig.model
+									}).then(res=>{
+										if(res.data.frozen){
+											uni.showToast({
+												icon:"none",
+												title:res.data.msg
+											});
+										}
+										else if(res.data.succ){
+											uni.setStorageSync('LL_Ukn',res.data.userToken.ukn);
+											uni.setStorageSync('token',res.data.userToken.token);
+											uni.setStorageSync('userInfo',JSON.stringify(res.data));
+											uni.setStorageSync('user',JSON.stringify(res.data.userToken.user));
+											uni.setStorageSync('isLogin','yes');
+											this.$api.public.aliossCdn({}).then(cdnRes=>{
+												this.$store.commit('setImageCdn',cdnRes.data.pictureCdn);
+												this.$store.commit('setVideoCdn',cdnRes.data.videoCdn);
+												uni.setStorageSync('imageCdn',cdnRes.data.pictureCdn);
+												uni.setStorageSync('videoCdn',cdnRes.data.videoCdn);
+											});
+											if(res.data.isNew){
+												uni.navigateTo({
+													url:'/pages/info/sex'
+												})
+												return;
+											}
+											//全局分享
+											uni.onAppRoute(()=>{
+												const pages=getCurrentPages();
+												let page=pages[pages.length-1];
+												if(page.route!=='pages/friends/user'){
+													let inviteCode=JSON.parse(uni.getStorageSync('userInfo')).inviteCode
+													page.onShareAppMessage=()=>{
+														return{
+															title:'我在糖果公园等你哟~',
+															page:`pages/friends/friends?inviteCode=${inviteCode}`,
+															imageUrl:'https://zhenyanapp-gen.oss-cn-qingdao.aliyuncs.com/wechat-mini-pro/app-share.png'
+														}
+													}
+												}
+												
+											})
+											this.getMineDetail(res.data.regStepNew);
+											
+											
+										}
+										else{
+											uni.showToast({
+												title:res.data.msg,icon:'none'
+											})
+										}
+										uni.hideLoading();
+									}).catch(err=>{
+										uni.hideLoading();
+										console.log(err);
+									})
+								}else{
+									uni.hideLoading();
+									uni.showToast({
+										icon:'none',
+										mask:true,
+										title:'授权拒绝,请重试'
+									})
+								}
 							}
-							this.getMineDetail(res.data.regStepNew);
 							
 							
-						}
-						else{
-							uni.showToast({
-								title:res.data.msg,icon:'none'
-							})
-						}
-						uni.hideLoading();
-					}).catch(err=>{
+						})
+					},
+					fail: (err) => {
 						uni.hideLoading();
-						console.log(err);
-					})
-				}else{
-					uni.hideLoading();
-					uni.showToast({
-						icon:'none',
-						mask:true,
-						title:'授权拒绝,请重试'
-					})
-				}
+						uni.showToast({
+							icon:'none',
+							mask:true,
+							title:'授权拒绝,请重试'
+						})
+					}
+				});
+				
 			},
 			getMineDetail(regStepNew){
 				let step=uni.getStorageSync('regStep')||regStepNew;
@@ -172,6 +220,7 @@
 		width: 100vw;
 		height: 100vh;
 		position: relative;
+		z-index: 1;
 		.lv-logo{
 			position: absolute;
 			z-index: 10;

+ 90 - 35
pages/login/loginByCode.vue

@@ -38,7 +38,13 @@
 					verCodeLogin:{
 						phone: "",
 						verCode: ""
-					}
+					},
+					androidMarket:'WechatMP',
+					model:'',
+					wxLoginInfo:{
+						openId:null,
+						unionId:null
+					},
 				},
 			};
 		},
@@ -53,45 +59,94 @@
 			},
 			inputChange(e){
 				if(e.detail.value.length===6){
-					this.verCodeOption.verCodeLogin.phone=this.phone;
-					this.verCodeOption.verCodeLogin.verCode=this.code;
-					this.$api.login.login(this.verCodeOption).then(res=>{
-						if(res.data.frozen){
-							uni.showToast({
-								icon:"none",
-								title:res.data.msg
-							});
-						}
-						else if(res.data.succ){
-							uni.setStorageSync('LL_Ukn',res.data.userToken.ukn);
-							uni.setStorageSync('token',res.data.userToken.token);
-							uni.setStorageSync('userInfo',JSON.stringify(res.data));
-							uni.setStorageSync('user',JSON.stringify(res.data.userToken.user));
-							this.$api.public.aliossCdn({}).then(cdnRes=>{
-								this.$store.commit('setImageCdn',cdnRes.data.pictureCdn);
-								this.$store.commit('setVideoCdn',cdnRes.data.videoCdn);
-							})
-							if(res.data.isNew){
-								uni.navigateTo({
-									url:'/pages/info/sex'
+						const that=this;
+						uni.login({//免密登录
+							success:(res)=>{
+								that.$api.login.wxLogin({
+									scene: "WxMPLogin",
+									miniProgramEncryUserInfoParam:{
+										jsCode:res.code
+									}
+								}).then(result=>{
+									if(result.status==='Succ'){
+										uni.setStorageSync('openId',result.data.wxLoginInfo.openId);
+										uni.setStorageSync('unionId',result.data.wxLoginInfo.unionId);
+										let deviceConfig=uni.getSystemInfoSync();
+										this.verCodeOption.verCodeLogin.phone=this.phone;
+										this.verCodeOption.verCodeLogin.verCode=this.code;
+										this.verCodeOption.model=deviceConfig.model;
+										this.verCodeOption.wxLoginInfo.openId=result.data.wxLoginInfo.openId;
+										this.verCodeOption.wxLoginInfo.unionId=result.data.wxLoginInfo.unionId;
+										this.$api.login.login(this.verCodeOption).then(res=>{
+											if(res.data.frozen){
+												uni.showToast({
+													icon:"none",
+													title:res.data.msg
+												});
+												return;
+											}
+											if(res.data.succ){
+												uni.setStorageSync('LL_Ukn',res.data.userToken.ukn);
+												uni.setStorageSync('token',res.data.userToken.token);
+												uni.setStorageSync('userInfo',JSON.stringify(res.data));
+												uni.setStorageSync('user',JSON.stringify(res.data.userToken.user));
+												uni.setStorageSync('isLogin','yes');
+												this.$api.public.aliossCdn({}).then(cdnRes=>{
+													this.$store.commit('setImageCdn',cdnRes.data.pictureCdn);
+													this.$store.commit('setVideoCdn',cdnRes.data.videoCdn);
+												})
+												if(res.data.isNew){
+													uni.navigateTo({
+														url:'/pages/info/sex'
+													})
+													return;
+												}
+												this.getMineDetail(res.data.regStepNew);
+												//全局分享
+												uni.onAppRoute(()=>{
+													const pages=getCurrentPages();
+													let page=pages[pages.length-1];
+													if(page.route!=='pages/friends/user'){
+														let inviteCode=JSON.parse(uni.getStorageSync('userInfo')).inviteCode
+														page.onShareAppMessage=()=>{
+															return{
+																title:'我在糖果公园等你哟~',
+																page:`pages/friends/friends?inviteCode=${inviteCode}`,
+																imageUrl:'https://zhenyanapp-gen.oss-cn-qingdao.aliyuncs.com/wechat-mini-pro/app-share.png'
+															}
+														}
+													}
+													
+												})
+												
+											}
+											else{
+												uni.showToast({
+													title:res.data.msg,icon:'none'
+												})
+											}
+										})
+										this.$api.public.aliossCdn({}).then(cdnRes=>{
+											this.$store.commit('setImageCdn',cdnRes.data.pictureCdn);
+											this.$store.commit('setVideoCdn',cdnRes.data.videoCdn);
+										})
+									}
+									
+									
 								})
-								return;
+							},
+							fail: (err) => {
+								console.log(err)
 							}
-							this.getMineDetail(res.data.regStepNew);
-							
-							
-						}
-						else{
-							uni.showToast({
-								title:res.data.msg,icon:'none'
-							})
-						}
-					})
+						});
+					
 				}
 			},
 			reGetCode(){
 					this.time=60;
-					this.btnStr=`重新获取(${--this.time}s)`
+					this.btnStr=`重新获取(${--this.time}s)`;
+					clearInterval(this.timer);
+					this.timer=null;
 					this.timer=setInterval(()=>{
 						if(this.time<=1){
 							clearInterval(this.timer);
@@ -111,7 +166,7 @@
 				}).then(res=>{
 					this.$store.commit('setUserInfo',res.data);
 					uni.setStorageSync('userInfo',JSON.stringify(res.data));//正式环境删除
-					let step=uni.getStorageSync('regStep')||regStepNew;
+					let step=regStepNew||uni.getStorageSync('regStep');
 					switch(step){
 						case 'Sex':
 							uni.navigateTo({

+ 58 - 36
pages/messages/messages.vue

@@ -1,19 +1,16 @@
 <template>
 	<view class="container">
-		<TabBar :tabIndex="tabIndex"></TabBar>
-		<uni-popup ref="popup" type="center">
+		<TabBar :tabIndex="tabIndex" v-if="showTabbar"></TabBar>
+		<uni-popup ref="popup" @maskClick="closePopup" type="center">
 			<Popup :content1="popup.content1" :content2="popup.content2" :tip1="popup.tip1" :tip2="popup.tip2" :btntext="popup.btntext" @closePopup="closePopup"  @toService="toService" :btnEvent="'toService'"></Popup>
 		</uni-popup>
-		<uni-popup ref="paypopup" type="bottom" :safe-area="false">
+		<uni-popup ref="paypopup" type="bottom" :safe-area="false" @maskClick="closePayPopup">
 			<PayPopup :swiperIndex="payPopupIndex" @closePopup="closePayPopup"></PayPopup>
 		</uni-popup>
-		<uni-popup ref="vippopup" type="center">
+		<uni-popup ref="vippopup" type="center" @maskClick="closePayPopup">
 			<VipPopup :swiperIndex="vipPopupIndex" @closePopup="closeVipPopup"></VipPopup>
 		</uni-popup>
 		<view id="topnav" class="topnav flex-start" :style="{'height':`${topbarOffsetHeight-statusBarHeight}px`,'padding-top':`${statusBarHeight}px`}" >
-			<view class="nav-item font44 fw600">
-				消息
-			</view>
 			<image :src="`${assetsUrl}message-setting.png`" mode="aspectFill" class="nav-img" @click="openSetting"></image>
 		</view>
 		<scroll-view class="scroll-view"
@@ -43,11 +40,16 @@
 						</view>
 					</view>
 				</view> -->
-				<view class="message-item flex-between" v-for="(item,index) in messagesList" :key="index"  :data-index="index" @touchstart="touchStart" @touchend="touchEnd">
-					<image :src="item.userProfile.avatar" mode="aspectFill" class="left-img" :style="{'width':`${showDelIndex===index?'0rpx':'120rpx'}`}" @click="toTalk(item.userProfile.userID)"></image>
-					<view class="right-info" @click="toTalk(item.userProfile.userID)">
+				<view class="message-item flex-between" v-for="(item,index) in messagesList" :key="index"  :data-index="index" @longpress="showDelBtn" v-if="item.lastMessage.payload">
+					<image :src="item.userProfile.avatar" 
+					mode="aspectFill" 
+					class="left-img" 
+					:style="{'width':`${showDelIndex===index?'0rpx':'120rpx'}`}" 
+					@click="toTalk(item.userProfile.userID,index)"
+					></image>
+					<view class="right-info" @click="toTalk(item.userProfile.userID,index)">
 						<view class="ri-top flex-between">
-							<view class="rit-title fw600 font32">
+							<view class="rit-title fw600 font28 el">
 								{{item.userProfile.nick}}
 							</view>
 							<view class="rit-time font22 fw400">
@@ -55,7 +57,7 @@
 							</view>
 						</view>
 						<view class="ri-bottom flex-between">
-							<view class="rib-text font28 fw400">
+							<view class="rib-text font28 fw400 el">
 								{{item.lastMessage.payload.text}}
 							</view>
 							<view class="rib-num font20 fw400" v-if="item.unreadCount!==0">
@@ -109,6 +111,7 @@
 				userInfo:null,//会话消息用户信息
 				showNoMsg:false,
 				systemMsg:{},
+				showTabbar:true
 				
 			};
 		},
@@ -123,7 +126,7 @@
 				return this.$store.state.platform;
 			},
 			mineInfo(){
-				return this.$store.state.userInfo
+				return this.$store.state.userInfo;
 			}
 		},
 		onLoad() {
@@ -174,34 +177,43 @@
 			closePayPopup(){
 				this.payPopupIndex=-1;
 				this.$refs.paypopup.close();
+				this.showTabbar=true;
 			},
 			closeVipPopup(){
 				this.vipPopupIndex=-1;
 				this.$refs.vippopup.close();
 			},
-			touchStart(e){
-				this.startTime = Date.now()
-				this.startPosition = e.changedTouches[0].clientX;
-			},
-			touchEnd(e){
-				const endTime = Date.now()
-				if (endTime - this.startTime <100){
-					return;
-				}
-				if (Math.abs(this.endPosition - this.startPosition) > 100){
-					this.endPosition = e.changedTouches[0].clientX;
-					let elePosition = this.endPosition - this.startPosition < 0 ? "toLeft": "toRight";
-					console.log(elePosition)
-					if(elePosition==='toLeft'){
-						this.showDelIndex=e.currentTarget.dataset.index;
-					}
-					else{
-						this.showDelIndex=-1;
-					}
-				} else {
+			showDelBtn(e){
+				
+				if(this.showDelIndex===e.currentTarget.dataset.index){
+					this.showDelIndex=-1;
 					return;
 				}
+				uni.vibrateLong();
+				this.showDelIndex=e.currentTarget.dataset.index;
 			},
+			// touchStart(e){
+			// 	this.startTime = Date.now()
+			// 	this.startPosition = e.changedTouches[0].clientX;
+			// },
+			// touchEnd(e){
+			// 	const endTime = Date.now()
+			// 	if (endTime - this.startTime <50){
+			// 		return;
+			// 	}
+			// 	if (Math.abs(this.endPosition - this.startPosition) > 50){
+			// 		this.endPosition = e.changedTouches[0].clientX;
+			// 		let elePosition = this.endPosition - this.startPosition < 0 ? "toLeft": "toRight";
+			// 		if(elePosition==='toLeft'){
+			// 			this.showDelIndex=e.currentTarget.dataset.index;
+			// 		}
+			// 		else{
+			// 			this.showDelIndex=-1;
+			// 		}
+			// 	} else {
+			// 		return;
+			// 	}
+			// },
 			onConversationListUpdated(event){
 				if(event.data.length===0){
 					this.messagesList=[];
@@ -214,6 +226,7 @@
 				
 			},
 			delConversation(){
+				// this.messagesList.splice(this.showDelIndex-1,1);
 				uni.$TUIKit.deleteConversation(this.messagesList[this.showDelIndex].conversationID);
 				this.showDelIndex=-1;
 			},
@@ -274,7 +287,7 @@
 				uni.$TUIKit.getConversationList().then(res=>{
 					console.log(res.data.conversationList)
 					for(let i=0;i<res.data.conversationList.length;i++){
-						res.data.conversationList[i].lastMessage.lastTimeStr=this.$moment(res.data.conversationList[i].lastMessage.lastTime*1000).format('YYYY-MM-DD hh:mm:ss');
+						res.data.conversationList[i].lastMessage.lastTimeStr=this.$moment(res.data.conversationList[i].lastMessage.lastTime*1000).format('YYYY-MM-DD HH:mm:ss');
 						if(res.data.conversationList[i].lastMessage.type==='TIMImageElem'){
 							res.data.conversationList[i].lastMessage.payload.text="[图片消息]"
 						}
@@ -286,6 +299,10 @@
 						}
 						if(res.data.conversationList[i].lastMessage.type==='TIMCustomElem'){
 							let msg=JSON.parse(res.data.conversationList[i].lastMessage.payload.data);
+							if(msg.custom){//删除自定义消息
+								res.data.conversationList.splice(i,1);
+								i--;
+							}
 							if(msg.type===99)
 							{
 								res.data.conversationList[i].lastMessage.payload.text="[系统消息]"
@@ -315,11 +332,13 @@
 					}
 				})
 			},
-			toTalk(id){
+			toTalk(id,index){
 				uni.showLoading({
 					mask:true,
 					title:'加载中'
 				})
+				console.log(this.messagesList[index])
+				uni.vibrateShort();
 				let user=JSON.parse(uni.getStorageSync('user'));
 				this.$api.public.userDetail({getAlbum:true,completeUser:user,uponUserId:id}).then(res=>{
 					console.log(res);
@@ -351,6 +370,7 @@
 									else{
 										this.payPopupIndex=0;
 										this.$refs.paypopup.open();
+										this.showTabbar=false;
 										return;
 									}
 									
@@ -433,13 +453,14 @@
 				transition: all 0.3s;
 			}
 			.right-info{
-				flex: 1;
+				width: 532rpx;
 				height: 120rpx;
 				transition: all 0.3s;
 				.ri-top{
 					margin-top: 8rpx;
 					.rit-title{
 						color: $fontcolor5;
+						width: 307rpx;
 					}
 					.rit-time{
 						color: $fontcolor2;
@@ -449,6 +470,7 @@
 					margin-top: 20rpx;
 					.rib-text{
 						color: $fontcolor3;
+						flex: 1;
 					}
 					.rib-num{
 						width:36rpx;

+ 3 - 2
pages/mine/album.vue

@@ -12,7 +12,7 @@
 		<uni-popup ref="modalPopup" type="center">
 			<Popup :content1="popup.content1" :content2="popup.content2" :tip1="popup.tip1" :tip2="popup.tip2" :btntext="popup.btntext" @closePopup="closePopup" @toService="toService" :btnEvent="'toService'"></Popup>
 		</uni-popup>
-		<uni-popup ref="popup" type="bottom" @maskClick="popupMaskClick">
+		<uni-popup ref="popup" type="bottom" @maskClick="popupMaskClick" :safe-area="false">
 			<view class="popup" @touchmove.prevent>
 				<view class="p-title-box flex-between">
 					<view class="p-title font36 fw600">
@@ -461,6 +461,7 @@
 		}
 		.p-img-box{
 			margin-top: 80rpx;
+			padding-bottom: 100rpx;
 			.p-img{
 				.img{
 					width: 200rpx;
@@ -556,7 +557,7 @@
 	}
 	.btn-tip{
 		position: fixed;
-		z-index: 999;
+		z-index: 1;
 		left: 0;
 		right: 0;
 		bottom: 160rpx;

+ 1 - 2
pages/mine/guest.vue

@@ -200,7 +200,6 @@
 						obj.longitude=this.listData[i].geo.lon;
 						arr.push(obj)
 					}
-					console.log(arr)
 					wxMapSdk.calculateDistance({
 						mode:'straight',
 						from:{
@@ -213,7 +212,6 @@
 								for(let j=0;j<dists.result.elements.length;j++){
 									this.listData[j].distance=(dists.result.elements[j].distance>1000?`${Math.floor(dists.result.elements[j].distance/100)/10}km`:`${dists.result.elements[j].distance}m`)
 								}
-								console.log(this.listData)
 							}
 						},fail:err=>{
 							console.log(err)
@@ -233,6 +231,7 @@
 					}
 					else{
 						this.otherInfo=res.data;
+						uni.setStorageSync('otherInfo',JSON.stringify(res.data));
 						uni.hideLoading();
 						uni.navigateTo({
 							url:`/pages/friends/user?id=${id}`

+ 38 - 21
pages/mine/mine.vue

@@ -1,16 +1,16 @@
 <template>
 	<view class="container">
-		<TabBar :tabIndex="tabIndex" v-if="!cover.isFullScreen"></TabBar>
-		<uni-popup ref="popup" type="center">
+		<TabBar :tabIndex="tabIndex" v-if="!cover.isFullScreen&&showTabbar"></TabBar>
+		<uni-popup ref="popup" type="center" @maskClick="closePopup">
 			<Popup :content1="popup.content1" :content2="popup.content2" :tip1="popup.tip1" :tip2="popup.tip2" :btntext="popup.btntext" @closePopup="closePopup"  @toService="toService" :btnEvent="'toService'"></Popup>
 		</uni-popup>
-		<uni-popup ref="paypopup" type="bottom" :safe-area="false">
+		<uni-popup ref="paypopup" @maskClick="closePayPopup" type="bottom" :safe-area="false">
 			<PayPopup :swiperIndex="payPopupIndex" @closePopup="closePayPopup"></PayPopup>
 		</uni-popup>
-		<uni-popup ref="loginpopup" type="center">
+		<uni-popup ref="loginpopup" @maskClick="closeLoginPopup" type="center">
 			<Popup :content1="popup.content1" :content2="popup.content2" :tip1="popup.tip1" :tip2="popup.tip2" :btntext="popup.btntext" @closePopup="closeLoginPopup"  @toLogin="toLogin" :btnEvent="'toLogin'"></Popup>
 		</uni-popup>
-		<uni-popup ref="vippopup" type="center">
+		<uni-popup ref="vippopup" @maskClick="closeVipPopup" type="center">
 			<VipPopup :swiperIndex="vipPopupIndex" @closePopup="closeVipPopup"></VipPopup>
 		</uni-popup>
 		<view id="topnav" class="topnav flex-start" :style="{'height':`${topbarOffsetHeight-statusBarHeight}px`,'padding-top':`${statusBarHeight}px`,'background-color':`rgba(21, 17, 38,${topNavAlpha})`}" v-if="!cover.isFullScreen">
@@ -61,7 +61,7 @@
 					<view class="video-inner flex-center" v-if="!cover.isFullScreen">
 						<image :src="userInfo.iconThumbnail||defaulHead" mode="aspectFill" class="head-img" @click="toLogin"></image>
 						<view class="name-box flex-center">
-							<view class="name fw600 font44">
+							<view class="name fw600 font44"  @click="toLogin">
 								{{userInfo.nick||'未登录'}}
 							</view>
 							<image :src="`${assetsUrl}friends-vip.png`" mode="aspectFit" class="name-img" v-if="userInfo.vip"></image>
@@ -203,8 +203,8 @@
 				],
 				cards:[
 					// {title:'邀请好友',tip:'领取vip时长',bgImg:'mine-gift.png',class:"card1",path:"/pages/webView/webView?url=https://promote.sugarpark.cn"},
-					{title:'认证中心',tip:'提升人气秘密',bgImg:'mine-star.png',class:"card2",path:'/pages/auth/auth'},
-					{title:'我的钱包',tip:'充糖果、看收益',bgImg:'mine-money.png',class:"card3",path:'/pages/wallet/wallet'}
+					{title:'认证中心',tip:'提升人气秘密',bgImg:'mine-star1.png',class:"card2",path:'/pages/auth/auth'},
+					{title:'我的钱包',tip:'充糖果、看收益',bgImg:'mine-money1.png',class:"card3",path:'/pages/wallet/wallet'}
 				],
 				currentPic:null,
 				currentIndex:0,
@@ -223,7 +223,8 @@
 				},
 				vipPopupIndex:-1,
 				payPopupIndex:-1,
-				onshowIsNot:false
+				onshowIsNot:false,
+				showTabbar:true
 				
 			};
 		},
@@ -277,6 +278,7 @@
 			closePayPopup(){
 				this.payPopupIndex=-1;
 				this.$refs.paypopup.close();
+				this.showTabbar=true;
 			},
 			toCardsPath(path){
 				if(!uni.getStorageSync('token')){
@@ -475,19 +477,29 @@
 							}
 						}
 						else if(this.userInfo.sex==='Male'){
-							if(!this.userInfo.vip&&this.platform==='ios'){
-								this.vipPopupIndex=3;
-								this.$refs.vippopup.open();
-								return;
-								
+							if(this.platform==='ios'){
+								if(!this.userInfo.vip){
+									this.vipPopupIndex=3;
+									this.$refs.vippopup.open();
+									return;
+									
+								}
+								else{
+									this.$refs.paypopup.open();
+									this.showTabbar=false;
+									return;
+								}
 							}
 							else{
-								this.$refs.paypopup.open();
-								// uni.navigateTo({
-								// 	url:'/pages/vip/vip'
-								// })
-								return;
+								if(!this.userInfo.vip){
+									uni.navigateTo({
+										url:'../vip/vip'
+									})
+									return;
+									
+								}
 							}
+							
 						}
 						this.tabs[0].dotnum=0;
 					break;
@@ -623,6 +635,7 @@
 					pageHomeUserId:user.id,
 					personalPageHomeVideoOperateEnum:'NONE'
 				}).then(res=>{
+					
 				  if(res.status==='Succ'&&res.data.personalPageHomeVideoUrl){
 					  this.cover.url=res.data.personalPageHomeVideoUrl;
 					  this.cover.cate='video';
@@ -637,6 +650,7 @@
 				  	this.cover.cate='img';
 				  	this.cover.url=this.userInfo.bkg;
 				  }
+				  this.$forceUpdate();
 				})
 			},
 			picItemClick(index){
@@ -897,8 +911,8 @@
 					position: absolute;
 					right: 0;
 					bottom: 0;
-					width: 88rpx;
-					height: 118rpx;
+					width: 156rpx;
+					height: 139rpx;
 					z-index: 1;
 				}
 			}
@@ -927,6 +941,9 @@
 				margin-top: 26rpx;
 				position: relative;
 				margin-bottom: 30rpx;
+				height: 500rpx;
+				border-radius: 40rpx;
+				overflow: hidden;
 				.self{
 					position: absolute;
 					width: 72rpx;

+ 9 - 2
pages/search/search.vue

@@ -74,12 +74,14 @@
 			</view>
 		</view>
 		<view class="no-more font24 fw400" v-if="users!==null">没有更多了</view>
-		<Status type="noData" text="暂无数据" v-if="showNoData||!users||users===[]"></Status>
+		<Status type="noData" text="暂无数据" v-if="showNoData"></Status>
 	</view>
 </template>
 
 <script>
 	import Status from '@/components/Status/Status.vue';
+	import wxMap from '@/static/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.min.js';
+	const wxMapSdk=new wxMap({key:'E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII'});
 	export default {
 		components: {
 			Status
@@ -117,7 +119,7 @@
 				users:null,
 				searchs:[],
 				inputFocus:true,
-				showNoData:true
+				showNoData:false
 			};
 		},
 		onLoad() {
@@ -167,6 +169,10 @@
 				this.searchOptions.completeUser=user;
 				this.$api.public.search(this.searchOptions).then(res=>{
 					if(res.status==='Succ'){
+						for(let i=0;i<res.data.users.length;i++){
+							res.data.users[i].lastActiveTime=this.$moment(new Date()).diff(res.data.users[i].lastActive,'minutes');
+						}
+						console.log(res.data.users);
 						this.users=res.data.users;
 						this.showNoData=this.users.length===0?true:false;
 					}
@@ -211,6 +217,7 @@
 					}
 					else{
 						this.otherInfo=res.data;
+						uni.setStorageSync('otherInfo',JSON.stringify(res.data));
 						uni.hideLoading();
 						uni.navigateTo({
 							url:`/pages/friends/user?id=${id}`

+ 9 - 3
pagesSub/chatting/chatting.vue

@@ -20,7 +20,7 @@
 		</view>
 		<view class="talk-box" id="talk-box" @touchmove="prevent()">
 			<view class="input-box flex-between">
-				<input type="text" class="input" confirm-type="send" placeholder="请输入消息…" v-model="inputText" placeholder-style="color:#7D7DA4 ;font-size:24rpx" @confirm="sendTextMessage">
+				<input type="text" class="input" confirm-type="send" placeholder="请输入消息…" :adjust-position="false" v-model="inputText" placeholder-style="color:#7D7DA4 ;font-size:24rpx" @confirm="sendTextMessage">
 				<view class="input-btn font22 fw400" @click="sendTextMessage">
 					发送
 				</view>
@@ -143,6 +143,7 @@
 			uni.$TUIKit.getConversationProfile(this.conversationID).then(res => {
 				const { conversation } = res.data;
 				this.conversation = conversation;
+				console.log(this.conversation)
 			});
 			let pages=getCurrentPages();
 			let prePage=pages[pages.length-2];
@@ -175,6 +176,7 @@
 			prevent(){
 				return false;
 			},
+			
 			stopVideoHander() {
 				this.videoPlay = false;
 			},
@@ -388,11 +390,15 @@
 				this.$sendTIMMessage(message);
 			},
 			$sendTIMMessage(message) {
-				this.$EventBus.$emit('sendMessage', message)
+				
 				uni.$TUIKit.sendMessage(message).then((res) => {
+					this.$EventBus.$emit('sendMessage', message)
 					this.$refs.messageList.scrollToButtom();
 				}).catch((error) => {
-					console.log(error)
+					uni.showToast({
+						title:'发送消息失败',
+						icon:"none"
+					})
 				})
 			},
 			

+ 334 - 0
pagesSub/report/report.vue

@@ -0,0 +1,334 @@
+<template>
+	<view class="container" ref="container">
+		<view id="topnav" class="topnav flex-between" :style="{'height':`${topbarOffsetHeight-statusBarHeight}px`,'padding-top':`${statusBarHeight}px`,'background-color':`rgba(21, 17, 38,${topNavAlpha})`}" v-if="!cover.isFullScreen">
+			<view class="nav-item" @click="back">
+				<image :src="`${assetsUrl}back.png`" mode="widthFix" class="nav-img"></image>
+			</view>
+			<view class="nav-text font32 fw600">
+				{{topbarTitle}}
+			</view>
+			<view class="nav-item"></view>
+		</view>
+		<view class="tip-bar flex-between">
+			<view class="tip-text">
+				如果你在72小时内向她支付 解锁私聊/查看相册 费用,则核实举报属实后,系统将自动退回相关的费用。
+			</view>
+			<image :src="`${assetsUrl}report-close.png`" mode="widthFix" class="tip-close"></image>
+		</view>
+		<view class="choose-content">
+			<view class="choose-title">
+				请选择举报原因
+			</view>
+			<view class="choose-list">
+				<view class="choose-item flex-start" v-for="(item,index) in chooses" :key="index" @click="chooseItem(index)"> 
+					<view :class="chooseIndex===index?'choosed-icon':'choose-icon'"></view>
+					<view class="choose-text">
+						{{item}}
+					</view>
+				</view>
+			</view>
+			<view class="add-img-tip">
+				请提供相关截图,一遍我们跟进核实
+			</view>
+			<view class="img-box flex-start">
+				<image :src="item" v-for="(item,index) in imgs" :key="index" class="img" @click="previewImg(item,index)"></image>
+				<image :src="`${assetsUrl}report-add.png`" mode="widthFix" class="img" @click="chooseMedia"></image>
+			</view>
+			<view class="textarea-box">
+				<textarea placeholder="补充描述" class="textarea" v-model="textarea" @input="textareaInput"></textarea>
+				<view class="num-box">
+					{{inputCount}}/{{maxCount}}
+				</view>
+			</view>
+		</view>
+		<cover-view class="btn-box" @click="send">
+			确认举报
+		</cover-view>
+	</view>
+</template>
+
+<script>
+	import {getPolicy,computeSignature,getKey} from '@/util/oss.js';
+	import {encode} from '@/util/base64.js'
+	export default {
+		data() {
+			return {
+				topbarTitle:'匿名举报',
+				scrollHeight:0,
+				topNavAlpha:0,
+				assetsUrl:this.$util.assetsUrl,
+				id:null,
+				chooses:['发广告','骚扰/谩骂/不文明聊天','虚假照片','发布色情/低俗/不良内容','无法联系','TA是骗子','发布招嫖信息','未成年人'],
+				chooseIndex:0,
+				imgs:[],
+				textarea:'',
+				inputCount:0,
+				maxCount:200
+			};
+		},
+		computed: {
+			statusBarHeight() {
+				return this.$store.state.statusBarHeight;
+			},
+			topbarOffsetHeight() {
+				return this.$store.state.topbarOffsetHeight;
+			},
+			platForm(){
+				return this.$store.state.platform
+			},
+			mineInfo(){
+				return this.$store.state.userInfo||JSON.parse(uni.getStorageSync('userInfo'))
+			}
+		},
+		onLoad(options) {
+			this.id=options.id;
+			console.log(this.id)
+		},
+		mounted() {
+			
+			
+		},
+		onPageScroll(e) {
+			this.topNavAlpha=e.scrollTop/250;
+			this.scrollTop=e.scrollTop;
+		},
+		onShareAppMessage(){
+			return {
+				title: '糖果公园',
+				path: `/pages/login/login?share=${this.userInfo.inviteCode}`,
+			}
+		},
+		methods:{
+			back(){
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			chooseItem(index){
+				this.chooseIndex=index;
+			},
+			chooseMedia(){
+				const that=this;
+				uni.chooseMedia({
+					count: 1,
+				    mediaType: ['image'],
+				    sourceType: ['album', 'camera'],
+				    maxDuration: 30,
+				    camera: 'back',
+				    success:(res)=>{
+						console.log(res.tempFiles[0]);
+						uni.showLoading({
+							title:'正在上传',
+							mask:true
+						})
+						const policyText=getPolicy();
+						const policy=encode(JSON.stringify(policyText));
+						const key=getKey(0,res.tempFiles[0].tempFilePath.split('.')[1]);
+						that.$api.public.aliossToken({}).then(resuslt=>{
+							let formData={
+								key:key,
+								policy:policy,
+								OSSAccessKeyId:resuslt.data.accessKeyId,
+								signature:computeSignature(resuslt.data.accessKeySecret,policy),
+								'x-oss-security-token':resuslt.data.securityToken,
+								success_action_status:'200'
+							}
+							uni.uploadFile({
+								url: 'https://zhenyanapp-gen.oss-cn-qingdao.aliyuncs.com',
+								filePath:res.tempFiles[0].tempFilePath,
+								name: 'file',
+								header:{
+									"Content-Type": "multipart/form-data"
+								},
+								formData: formData,
+								success: (data) => {
+								    if (data.statusCode === 200) {
+									    uni.hideLoading();
+									    let imageUrl=`${that.$store.state.videoCdn}/${key}`;
+									    let user=JSON.parse(uni.getStorageSync('user'));
+										this.imgs.push(imageUrl);
+								    }
+								},
+								fail: err => {
+								    console.log(err);
+								  }
+							})
+						})
+					}
+				})
+			},
+			textareaInput(e){
+				this.inputCount=e.detail.value.length;
+			},
+			previewImg(item,index){
+				uni.previewImage({
+					urls:this.imgs,
+					current:this.imgs[index]
+				})
+			},
+			send(){
+				if(this.imgs.length===0){uni.showToast({icon:'none',title:'请上传截图'});return;}
+				// if(this.textarea===''){uni.showToast({icon:'none',title:'请填写描述'});return;}
+				this.$api.public.accuse({desc:this.textarea,imgs:this.imgs,reason:this.chooses[this.chooseIndex],uponUserId:this.id}).then(res=>{
+					if(res.data.succ){
+						uni.showToast({
+							icon:'success',
+							title:res.data.msg
+						})
+						uni.navigateBack();
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.container{
+	width: 100vw;
+	height: 100vh;
+	background-color: $bgcolor1;
+	position: relative;
+	padding-top: 216rpx;
+	padding-bottom: 60rpx;
+	.topnav {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: calc(100% - 20rpx);
+		z-index: 100;
+		margin-left: 10rpx;
+		backdrop-filter: blur(10px);
+		.nav-item {
+			width: 40rpx;
+			height: 40rpx;
+			margin-left: 16rpx;
+			.nav-img{
+				width: 40rpx;
+				height: 40rpx;
+			}
+			
+		}
+		.nav-text{
+			flex: 1;
+			color: $fontcolor5;
+			height: 40rpx;
+			text-align: center;
+		}
+	}
+	.tip-bar{
+		background: linear-gradient(133deg, #7F5CFA 0%, #654AFE 100%);
+		border-radius: 32rpx;
+		margin: 0rpx 32rpx 32rpx 32rpx;
+		padding: 16rpx 32rpx;
+		.tip-text{
+			font-size: 22rpx;
+			font-family: PingFangSC-Regular, PingFang SC;
+			font-weight: 400;
+			color: #FFFFFF;
+			line-height: 32rpx;
+			width: 550rpx;
+			height: 64rpx;
+		}
+		.tip-close{
+			width: 	32rpx;
+			height: 32rpx;
+			margin-left: 40rpx;
+			
+		}
+	}
+	.choose-content{
+		margin: 0 32rpx;
+		border-radius: 16rpx;
+		background-color: #1F1A30;
+		padding: 32rpx;
+		.choose-title{
+			font-size: 32rpx;
+			font-weight: 600;
+			color: #FFFFFF;
+			line-height: 44rpx;
+			margin-bottom: 40rpx;
+			text-align: center;
+		}
+		.choose-item{
+			margin-bottom: 32rpx;
+			.choose-icon{
+				width: 32rpx;
+				height: 32rpx;
+				background: #332D4C;
+				border-radius: 32rpx;
+			}
+			.choosed-icon{
+				background: #6C52F4;
+				border: 4rpx solid #FFFFFF;
+				width: 32rpx;
+				height: 32rpx;
+				border-radius: 32rpx;
+				box-sizing: border-box;
+			}
+			.choose-text{
+				font-size: 28rpx;
+				font-family: PingFangSC-Regular, PingFang SC;
+				font-weight: 400;
+				color: #FFFFFF;
+				line-height: 40rpx;
+				margin-left: 16rpx;
+			}
+		}
+	}
+	.btn-box{
+		width: 622rpx;
+		height: 104rpx;
+		line-height: 104rpx;
+		background: #6C52F4;
+		border-radius: 56rpx;
+		color: #ffffff;
+		text-align: center;
+		position: fixed;
+		left: 50%;
+		transform: translateX( -311rpx );
+		bottom: 44rpx;
+		z-index: 999;
+	}
+	.add-img-tip{
+		font-size: 22rpx;
+		font-weight: 400;
+		color: #7D7DA4;
+		line-height: 32rpx;
+		margin-top: 56rpx;
+		margin-bottom: 32rpx;
+	}
+	.img-box{
+		flex-wrap: wrap;
+		
+		.img{
+			width: 200rpx;
+			height: 200rpx;
+			border-radius: 16rpx;
+			margin-top: 7rpx;
+			margin-right: 7rpx;
+		}
+	}
+	.textarea-box{
+		margin-top: 32rpx;
+		padding: 32rpx;
+		background-color: #332D4C;
+		position: relative;
+		
+		.textarea{
+			background-color: #332D4C;
+			width: 100%;
+			color: #ffffff;
+		}
+		.num-box{
+			position: absolute;
+			right: 10rpx;
+			bottom: 10rpx;
+			font-size: 22rpx;
+			font-weight: 400;
+			color: #7D7DA4;
+			line-height: 32rpx;
+		}
+	}
+}
+</style>

+ 411 - 0
pagesSub/setting/blacklist.vue

@@ -0,0 +1,411 @@
+<template>
+	<view class="container">
+		<view id="topnav" class="topnav flex-between"  :style="{'height':`${topbarOffsetHeight-statusBarHeight}px`,'padding-top':`${statusBarHeight}px`}">
+			<view class="nav-item flex-center" @click="back">
+				<image :src="`${assetsUrl}back.png`" mode="widthFix" class="nav-img"></image>
+			</view>
+			<view class="nav-text font32 fw600">
+				{{pageName}}
+			</view>
+			<view class="nav-item"></view>
+		</view>
+		<scroll-view 
+		scroll-y="true" 
+		:style="{'height': `${scrollHeight}px`,'padding-top':`${topNavHeight}px`}"
+		v-if="scrollHeight>0"
+		lower-threshold="200"
+		refresher-enabled="true"
+		:refresher-triggered="scrollTriggered"
+		:refresher-threshold="45" 
+		refresher-default-style="white"
+		refresher-background="#151126" 
+		@refresherrefresh="scrollRefresh" 
+		@refresherpulling="scrollPulling"
+		@refresherrestore="scrollRestore" 
+		@refresherabort="scrollAbort"
+		@scrolltolower="scrollToBottom"
+		>
+			<view class="list-item flex-start" v-for="(item,index) in listData" :key="index" @click="toDetail(item.id,index)" >
+				<view class="list-head-box">
+					<image :src="item.iconThumbnail" mode="aspectFill" class="list-head-img"></image>
+					<view class="list-head-dot" style="background-color: #38E825;" v-if="item.lastActiveTime<=30"></view>
+					<view class="list-head-dot" style="background-color: #0ABDEF;" v-else-if="item.lastActiveTime>30&&item.lastActiveTime<=1440"></view>
+				</view>
+				<view class="list-info-box">
+					<view class="name-box flex-between">
+						<view class="name flex-start">
+							<view class="name-text font28 fw600">
+								{{item.nick}}
+							</view>
+							<image :src="`${assetsUrl}friends-vip.png`" mode="aspectFill" class="name-img" v-if="item.vip"></image>
+							<image :src="`${assetsUrl}friends-godness.png`" mode="aspectFill" class="name-img-godness" v-if="item.goddess"></image>
+							<image :src="`${assetsUrl}friends-real.png`" mode="aspectFill" class="name-img" v-else-if="item.realMan"></image>
+						</view>
+						<view class="distance font22 fw400" v-if="item.distance">
+							{{item.distance}}
+						</view>
+					</view>
+					<view class="sex-box flex-center">
+						<image :src="`${assetsUrl}friends-female.png`" mode="aspectFill" class="sex-img"></image>
+						<view class="el font20 fw500 sex-text">
+							{{item.ageInfo.age}}
+						</view>
+					</view>
+					<view class="tip-box font28 fw400 el" v-if="item.desc">
+						签名:{{item.desc}}
+					</view>
+					<view class="tip-box font28 fw400 el" v-else>
+						签名:暂无介绍
+					</view>
+				</view>
+				<view class="img-box flex-between" v-if="item.lastNews">
+					<image :src="item.lastNews.mediaUrls[0]" mode="aspectFill" class="ib1"></image>
+					<image :src="item.lastNews.mediaUrls[1]" mode="aspectFill" class="ib2"></image>
+					<image :src="item.lastNews.mediaUrls[2]" mode="aspectFill" class="ib3"></image>
+				</view>
+			</view>
+			<Status type="noData" text="暂无数据" v-if="showNoData"></Status>
+			<view class="no-more font24 fw400" v-if="listData.length!==0&&listData.length>=scrollTotal">没有更多了</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import wxMap from '@/static/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.min.js';
+	/**
+	 * 腾讯位置服务,手机账号:18996226740
+	 */
+	const wxMapSdk=new wxMap({key:'E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII'});
+	import Status from '@/components/Status/Status.vue';
+	export default {
+		components: {
+			Status
+		},
+		data() {
+			return {
+				assetsUrl:this.$util.assetsUrl,
+				pageName:'黑名单',
+				scrollHeight:0,
+				topNavHeight:0,
+				pageType:'',
+				getOptions:{
+					index:1,
+					size:20,
+					sortValues:[]
+				},
+				listData:[],
+				scrollTotal:0,
+				scrollRefreshing:false,
+				scrollTriggered:true,
+				showNoData:false,
+				user:null,
+				otherInfo:null
+			};
+		},
+		computed: {
+			statusBarHeight() {
+				return this.$store.state.statusBarHeight;
+			},
+			topbarOffsetHeight() {
+				return this.$store.state.topbarOffsetHeight;
+			},
+			latitude(){
+				return this.$store.state.latitude;
+			},
+			longitude(){
+				return this.$store.state.longitude;
+			},
+		},
+		onLoad(option) {
+			this.computedScollviewHeight();
+			this.getGuestData();
+		},
+		methods:{
+			back(){
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			/**
+			 * 计算scroll高度
+			 */
+			computedScollviewHeight() {
+				let query = uni.createSelectorQuery().in(this);
+				let heightLeaf =0;
+				query.select('#topnav').boundingClientRect(data => {
+					this.topNavHeight=data.height;
+					heightLeaf += data.height;
+				}).exec(() => {
+					let sysInfo = uni.getSystemInfoSync();
+					this.scrollHeight = sysInfo.windowHeight - heightLeaf;
+				});
+			
+			},
+			/**
+			 * 推荐下拉刷新、加载更多
+			 */
+			scrollRefresh(){
+				if (this.scrollRefreshing) 
+				{
+					return;
+				}
+				this.scrollRefreshing = true;
+				setTimeout(() => {
+					this.scrollTriggered = false;
+					this.scrollRefreshing = false;
+				}, 1000)
+				this.getOptions={
+					index:1,
+					size:20,
+					sortValues:[]
+				}
+				this.getGuestData();
+			},
+			scrollPulling(e) {},
+			scrollRestore() {this.scrollTriggered = true;},
+			scrollAbort() {},
+			scrollToBottom(){
+				if(this.listData.length>=this.scrollTotal){return;}
+				this.getOptions.index++;
+				this.getGuestData();
+			},
+			getGuestData(){
+				let user=JSON.parse(uni.getStorageSync('user'));
+				this.$api.public.guestor({
+					completeUser:user,
+					listType:'Black',
+					page:this.getOptions,
+					prefer:{
+						nick:null,
+						onlineIn24Hour:false
+					},
+					uponUserId:user.id
+				}).then(res=>{
+					if(res.data.users&&res.data.users.length===0){this.showNoData=true;}
+					if(this.getOptions.index>1){
+						this.listData=[...this.listData,...res.data.users];
+					}
+					else{
+						this.listData=res.data.users;
+					}
+					this.scrollTotal=res.data.page.recordCount;
+					let arr=[],obj={latitude:0,longitude:0};
+					for(let i=0;i<this.listData.length;i++){
+						this.listData[i].lastActiveTime=this.$moment(new Date()).diff(this.listData[i].lastActive,'minutes');
+						obj={latitude:0,longitude:0};
+						obj.latitude=this.listData[i].geo.lat;
+						obj.longitude=this.listData[i].geo.lon;
+						arr.push(obj)
+					}
+					wxMapSdk.calculateDistance({
+						mode:'straight',
+						from:{
+							latitude: this.$store.state.latitude,
+							longitude: this.$store.state.longitude
+						},
+						to:arr,
+						success:dists=>{
+							if(dists.message==="query ok"){
+								for(let j=0;j<dists.result.elements.length;j++){
+									this.listData[j].distance=(dists.result.elements[j].distance>1000?`${Math.floor(dists.result.elements[j].distance/100)/10}km`:`${dists.result.elements[j].distance}m`)
+								}
+							}
+						},fail:err=>{
+							console.log(err)
+						}
+					});
+				})
+			},
+			toDetail(id,index){
+				const that=this;
+				uni.showActionSheet({
+					itemList: ['取消拉黑', '查看主页'],
+					success:res=>{
+						if(res.tapIndex===0){
+							let user=JSON.parse(uni.getStorageSync('user'));
+							that.$api.public.operUponUser({
+								completeUser:user,
+								direction:'Cancel',
+								operType:'Hate',
+								uponUserId:id
+							}).then(res=>{
+								if(res.data.succ){
+									uni.showToast({
+										title:'操作成功'
+									});
+									that.listData.splice(index,1);
+									that.scrollRefresh()
+								}
+								else{
+									uni.showToast({
+										icon:'none',
+										title:res.data.msg
+									});
+									uni.navigateBack();
+								}
+							})
+						}
+						if(res.tapIndex===1){
+							uni.showLoading({})
+							let user=JSON.parse(uni.getStorageSync('user'));
+							this.$api.public.userDetail({getAlbum:true,completeUser:user,uponUserId:id}).then(res=>{
+								if(res.data.sex===user.sex){
+									uni.showToast({
+										title:'同性用户不能查看主页',
+										icon:'none'
+									})
+								}
+								else{
+									this.otherInfo=res.data;
+									uni.setStorageSync('otherInfo',JSON.stringify(res.data));
+									uni.hideLoading();
+									uni.navigateTo({
+										url:`/pages/friends/user?id=${id}`
+									})
+								}
+							})
+						}
+					}
+				})
+				
+				
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.container{
+	width: 100vw;
+	height: 100vh;
+	background-color: $bgcolor1;
+	position: relative;
+	overflow: hidden;
+	.topnav {
+		padding: 0 10rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100vw;
+		z-index: 100;
+		background-color: $bgcolor1;
+		.nav-item{
+			width: 40rpx;
+			height: 40rpx;
+			margin-left: 16rpx;
+			
+			.nav-img{
+				width: 40rpx;
+				height: 40rpx;
+			}
+		}
+		.nav-text{
+			flex: 1;
+			color: $fontcolor5;
+			height: 40rpx;
+			text-align: center;
+		}
+	}
+	.list-item{
+		flex-wrap: wrap;
+		padding: 40rpx 32rpx;
+		.list-head-box{
+			width: 136rpx;
+			height: 136rpx;
+			position: relative;
+			.list-head-img{
+				width: 136rpx;
+				height: 136rpx;
+				background-color: #ffffff;
+				border-radius: 136rpx;
+			}
+			.list-head-dot{
+				width: 24rpx;
+				height: 24rpx;
+				border-radius: 24rpx;
+				position: absolute;
+				background-color: aqua;
+				bottom: 2rpx;
+				right: 2rpx;
+				border: 2rpx solid $bgcolor2;
+			}
+		}
+		.list-info-box{
+			box-sizing: border-box;
+			width: 544rpx;
+			padding-left: 32rpx;
+			height: 136rpx;
+			flex-direction: column;
+			display: flex;
+			justify-content: flex-start;
+			align-items: flex-start;
+			.name-box{
+				width: 100%;
+				.name{
+					.name-text{
+						color: $fontcolor5;
+					}
+					.name-img{
+						width: 68rpx;
+						height: 32rpx;
+						margin-left: 8rpx;
+						
+					}
+					.name-img-godness{
+						width: 76rpx;
+						height: 40rpx;
+						margin-left: 8rpx;
+						transform: translateY(-5rpx);
+					}
+				}
+				.distance{
+					color: $fontcolor3;
+				}
+			}
+			.sex-box{
+				width: 74rpx;
+				height: 32rpx;
+				background: rgba(226, 53, 104, 0.2);
+				border-radius: 25rpx;
+				margin-top: 12rpx;
+				.sex-img{
+					width: 24rpx;
+					height: 24rpx;
+				}
+				.sex-text{
+					color:#E23568 ;
+				}
+			}
+			.tip-box{
+				color: $fontcolor3;
+				width: 100%;
+				margin-top: 10rpx;
+			}
+			
+		}
+		.img-box{
+			width: 544rpx;
+			height: 168rpx;
+			margin-left: 168rpx;
+			margin-top: 24rpx;
+			.ib1{
+				width: 168rpx;
+				height: 168rpx;
+				border-radius: 16rpx 0rpx 0rpx 16rpx;
+				background: $fontcolor5;
+			}
+			.ib2{
+				width: 168rpx;
+				height: 168rpx;
+				background: $fontcolor5;
+			}
+			.ib3{
+				width: 168rpx;
+				height: 168rpx;
+				border-radius: 0rpx 16rpx 16rpx 0rpx;
+				background: $fontcolor5;
+			}
+		}
+	}
+}
+</style>

+ 19 - 3
pagesSub/setting/setting.vue

@@ -10,6 +10,12 @@
 			<view class="nav-item"></view>
 		</view>
 		<view class="setting-box flex-between" :style="{'margin-top':`${topNavHeight+15}px`}">
+			<view class="setting-item flex-between" @click="toBlackList">
+				<view class="setting-text font28 fw600">
+					黑名单
+				</view>
+				<image :src="`${assetsUrl}setting-more.png`" mode="widthFix" class="setting-icon"></image>
+			</view>
 			<view class="setting-item flex-between" @click="loginOut">
 				<view class="setting-text font28 fw600">
 					退出登录
@@ -50,6 +56,11 @@
 					delta:1
 				})
 			},
+			toBlackList(){
+				uni.navigateTo({
+					url:'../setting/blacklist'
+				})
+			},
 			/**
 			 * 计算scroll高度
 			 */
@@ -77,7 +88,9 @@
 							uni.$TUIKit.destroy();
 							uni.setStorageSync('token','');
 							uni.setStorageSync('LL_Ukn','');
-							uni.setStorageSync('autoLogin','false');
+							uni.setStorageSync('userInfo','');
+							uni.setStorageSync('user','');
+							uni.setStorageSync('isLogin','no');
 							uni.reLaunch({
 								url:'/pages/login/login'
 							})
@@ -122,8 +135,8 @@
 	}
 	.setting-box{
 		margin: 16rpx;
-		border-radius: 8rpx;
-		background-color: $bgcolor3;
+		
+		
 		
 		flex-direction: column;
 		.setting-item{
@@ -131,6 +144,9 @@
 			height: 112rpx;
 			padding: 0rpx 32rpx;
 			box-sizing: border-box;
+			margin-bottom: 10rpx;
+			background-color: $bgcolor3;
+			border-radius: 8rpx;
 			.setting-text{
 				color: $fontcolor5;
 			}

+ 4 - 1
util/api.js

@@ -50,12 +50,15 @@ const req = {
 		loadSystemMsgs:(params) => request("/loadSystemMsgs",'POST', params),//系统消息列表
 		search:(params) => request("/loadUsersByIndex",'POST', params),//搜索
 		friendsNoAuth:(params) => request("/loadUsersByIndexFirstNoAuth",'POST', params),//无登录体验数据
+		operUponUser:(params)=>request("/operUponUser",'POST',params),//用户之间的拉黑,收藏,喜欢等操作
+		accuse:(params)=>request("/accuse",'POST',params),//举报
+		wxConfig:(params)=>request("/WXConfig",'POST',params),//微信隐私个人设置
 	},
 	pay:{
 		creatWxOrder:(params) => request("/createWxpayOrderByMiniProgram",'POST', params),//创建微信订单
 	},
 	IM:{
-		loadSig:(params) => request("/loadSig",'POST', params),//创建微信订单
+		loadSig:(params) => request("/loadSig",'POST', params),//im签名
 	},
 	/**
 	 * 提现

+ 28 - 16
util/index.js

@@ -101,9 +101,18 @@ const request = (url, method, data) => {
 			platform:"WechatMP",
 			resolution:{"h":2688,"s":3,"w":1242},
 			appId:15,
-			android:{market:'Unknown'}
+			android:{market:'Unknown'},
+			androidMarket:'WechatMP',
+			model:deviceConfig.model,
+			heartBeatParam:{
+				city:encodeURIComponent(uni.getStorageSync('city')),
+				geo:{
+					lat:String(uni.getStorageSync('latitude')),
+					lon:String(uni.getStorageSync('longitude'))
+				}
+			}
 		};
-		let token= uni.getStorageSync('token')||"88b99b11d3fc4cc3a71959b824678ce8";
+		let token= uni.getStorageSync('token');
 		uni.request({
 			url: `${apiHost}${url}`,
 			method: method,
@@ -120,7 +129,14 @@ const request = (url, method, data) => {
 			success: res => {
 				
 				if (res.data.status === 'Unauthorized') {
+					uni.$TUIKit.logout();
+					uni.$TUIKit.destroy();
 					uni.setStorageSync('token','');
+					uni.setStorageSync('LL_Ukn','');
+					uni.setStorageSync('userInfo','');
+					uni.setStorageSync('user','');
+					uni.setStorageSync('isLogin','no');
+					reject();
 				}
 				else if(res.data.status === 'FrozenUser'){
 						 // 用户异常
@@ -128,11 +144,6 @@ const request = (url, method, data) => {
 						icon:'none',
 						title:"用户已被冻结"
 					})	 
-					 setTimeout(()=>{
-						 uni.reLaunch({
-							url:'/pages/login/login'
-						 })
-					 },2000)
 					 
 				}
 				else if(res.data.status=== 'Fail'){
@@ -141,11 +152,6 @@ const request = (url, method, data) => {
 						 	icon:'none',
 						 	title:res.data.msg
 						 })
-						 setTimeout(()=>{
-							 uni.reLaunch({
-								url:'/pages/login/login'
-							 })
-						 },2000)
 						 
 				}
 				else if(res.data.status=== 'Exception'){
@@ -153,19 +159,25 @@ const request = (url, method, data) => {
 						 uni.showToast({
 						 	icon:'none',
 						 	title:res.data.msg
-						 })
-						 
-						 
+						 })	 
 				}
 				else if(res.data.status==='Succ'||res.data.code===0){
 					resolve(res.data)
 				}
 				else{
+					uni.showToast({
+						icon:'none',
+						title:res.data.msg
+					})
 					reject(res.data)
+					
 				}
 				
 			},
-			fail: res => reject(res.data),
+			fail: res => {
+				console.log(res);
+				reject(res.data)
+			},
 			complete: res => {}
 		});
 	});