lhl 2 semanas atrás
pai
commit
9d1ad6be4f

+ 12 - 0
api/user.js

@@ -480,4 +480,16 @@ export function confirmOrder(order_id) {
 		url: '/api/shop/confirmOrder?order_id=' + order_id,
 		method: 'get',
 	});
+}
+
+/**
+ * 获取荣誉
+ * @param {Number} uid
+ */
+export function getHonor(data) {
+	return request({
+		url: '/api/user/getUserHonor',
+		method: 'get',
+		data
+	})
 }

+ 11 - 5
pages/modelData/index.vue

@@ -1,15 +1,15 @@
 <template>
 	<view>
 		<model1 :shareNumber='shareNumber' @openImage='openImage' :isDefault='isDefault' v-if="modelId==3||modelId==1"
-			:templateDetail='templateData' :isShare='isShare' :isLook='isLook'></model1>
+			:templateDetail='templateData' :isShare='isShare' :isLook='isLook' :honorList="honorList"></model1>
 		<model2 :shareNumber='shareNumber' @openImage='openImage' :isDefault='isDefault' v-else-if="modelId==4" :templateDetail='templateData'
-			:isShare='isShare' :isLook='isLook'></model2>
+			:isShare='isShare' :isLook='isLook' :honorList="honorList"></model2>
 		<model3 :shareNumber='shareNumber' @openImage='openImage' :isDefault='isDefault' v-else-if="modelId==5"  :templateDetail='templateData'
-			:isShare='isShare' :isLook='isLook'></model3>
+			:isShare='isShare' :isLook='isLook' :honorList="honorList"></model3>
 		<model4 :shareNumber='shareNumber' @openImage='openImage' :isDefault='isDefault' v-else-if="modelId==6"  :templateDetail='templateData'
-			:isShare='isShare' :isLook='isLook'></model4>
+			:isShare='isShare' :isLook='isLook' :honorList="honorList"></model4>
 		<model5 :shareNumber='shareNumber' @openImage='openImage' :isDefault='isDefault' v-else-if="modelId==7"  :templateDetail='templateData'
-			:isShare='isShare' :isLook='isLook'></model5>
+			:isShare='isShare' :isLook='isLook' :honorList="honorList"></model5>
 		<template v-if="imageList.length>0">
 			<q-previewImage ref="previewImage" :urls="imageList" 
 				@close="close" @open="open"  @onLongpress="onLongpress"></q-previewImage>
@@ -25,6 +25,12 @@
 	import model5 from './modeltemplate/model_5.vue'
 	export default {
 		props: {
+			honorList: {
+				type: Array,
+				default:()=>{
+					return []
+				}
+			},
 			// 浏览数量
 			shareNumber: {
 				type: Number,

+ 15 - 0
pages/modelData/modeltemplate/model_1.vue

@@ -61,6 +61,15 @@
 							<view class="info-item-b">
 								服务次数: {{cardInfo.service_count || '0'}}
 							</view>
+							<view class="info-item-q flex" style="align-items: flex-start;" v-if="honorList.length > 0">
+								<text style="flex-shrink: 0;">荣誉信息:</text>
+								<view class="fwdz flex" >
+									<view v-for="(fwitem,fwindex) in honorList" :key="fwindex">
+										{{fwitem.name}}{{fwindex ==(honorList.length -1) ?'': '、'  }}
+									</view>
+								</view>
+								
+							</view>
 							<view class="info-item-q flex" style="align-items: flex-start;">
 								<text style="flex-shrink: 0;">服务地区:</text>
 								<view class="fwdz flex" v-if="cardInfo.is_china == 1">
@@ -154,6 +163,12 @@
 	} from 'vuex';
 	export default {
 		props: {
+			honorList: {
+				type: Array,
+				default:()=>{
+					return []
+				}
+			},
 			// 浏览数量
 			shareNumber: {
 				type: Number,

+ 14 - 0
pages/modelData/modeltemplate/model_2.vue

@@ -82,6 +82,14 @@
 									</view>
 								</view>
 							</view>
+							<view class="info-item-q flex" style="align-items: flex-start;" v-if="honorList.length > 0">
+								<text style="flex-shrink: 0;">荣誉信息:</text>
+								<view class="fwdz flex" >
+									<view :key='fwindex' v-for="(fwitem,fwindex) in honorList">
+										{{fwitem.name}}{{fwindex ==(honorList.length -1) ?'': '、'  }}
+									</view>
+								</view>
+							</view>
 							<view class="info-item-q flex" style="align-items: flex-start;height: 110rpx;">
 								<text style="flex-shrink: 0;">服务价格: </text>
 								<view class="gzt">
@@ -172,6 +180,12 @@
 	} from 'vuex';
 	export default {
 		props: {
+			honorList: {
+				type: Array,
+				default:()=>{
+					return []
+				}
+			},
 			// 浏览数量
 			shareNumber: {
 				type: Number,

+ 18 - 0
pages/modelData/modeltemplate/model_3.vue

@@ -95,6 +95,18 @@
 					</view>
 				</view>
 			</view>
+			<view class="list-item padding-l-30 margin-b-30 flex-start" v-if="honorList.length > 0">
+				<view class="fwdqTop">
+					荣誉信息:
+				</view>
+				<view>
+					<view class="fwdq" >
+						<view :key='fwindex' v-for="(fwitem,fwindex) in honorList">
+							{{fwitem.name}}{{fwindex ==(honorList.length -1) ?'': '、'  }}
+						</view>
+					</view>
+				</view>
+			</view>
 			<view class="info-item-q flex-start ">
 				<text class="flex-shrink-false">服务价格: </text>
 				<view class="gzt">
@@ -194,6 +206,12 @@
 	} from 'vuex';
 	export default {
 		props: {
+			honorList: {
+				type: Array,
+				default:()=>{
+					return []
+				}
+			},
 			// 浏览数量
 			shareNumber: {
 				type: Number,

+ 34 - 0
pages/modelData/modeltemplate/model_5.vue

@@ -63,7 +63,21 @@
 						</view>
 					</view>
 				</view>
+				
 				<view class="position-relative">
+					<view class="typeTitleImg flex-center" v-if="honorList.length > 0">
+						<image :src="`${baseURL}/resource/model/model5/honor.png`" mode="scaleToFill" class="typeImage">
+						</image>
+					</view>
+					<view class="" style="padding: 30rpx 0;">
+						<view class="honor flex" v-for="item in honorList">
+							<image :src="item.icon" mode="" class="honor-icon"></image>
+							<view class="honor-name">
+								{{item.name}}
+							</view>
+						</view>
+					</view>
+					
 					<view class="typeTitleImg flex-center">
 						<image :src="`${baseURL}/resource/user/user5/text1.png`" mode="scaleToFill" class="typeImage">
 						</image>
@@ -112,6 +126,12 @@
 	} from 'vuex';
 	export default {
 		props: {
+			honorList: {
+				type: Array,
+				default:()=>{
+					return []
+				}
+			},
 			// 浏览数量
 			shareNumber: {
 				type: Number,
@@ -373,4 +393,18 @@
 			height: 1000rpx;
 		}
 	}
+	.honor {
+		justify-content: center;
+		margin-bottom: 20rpx;
+		&-icon {
+			width: 40rpx;
+			height: 40rpx;
+			margin-right: 15rpx;
+		}
+		&-name {
+			color: #0DF6F3;
+			font-size: 30rpx;
+			
+		}
+	}
 </style>

+ 1 - 2
pages/user/forum/detail.vue

@@ -43,9 +43,8 @@
 				</view>
 			</view>
 		</view>
-
 		<view class="comment-input">
-			<input placeholder="发表评论" v-model="commentText" class="input" />
+			<input placeholder="发表评论" v-model="commentText" class="input" :maxlength="-1"/>
 			<view class="submit-btn" @click="submitComment">
 				<text>发表评论</text>
 			</view>

+ 24 - 2
pages/user/model/model.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content mone" v-if="baseURL">
 		<model :modelId='mtype' :templateData='userTemplate' :isShare='isShare' :isLook='isLook' :isDefault='isDefault'
-			:share-number='shareNumber'></model>
+			:share-number='shareNumber' :honorList="honor_list"></model>
 		<view class="fxmp flex bottom" v-if="type==2">
 			<button class="share" type="default" open-type="share">
 				分享名片
@@ -84,10 +84,18 @@
 			<view class="Sc" @click="goPl">
 				<uni-icons class="icon" color="#FFF" size='80rpx' type="chat-filled"></uni-icons>
 			</view>
+			<!-- calendar-filled -->
 			<view class="ScNum">
 				{{userTemplate.comment_num||0}}
 			</view>
 			<!--  -->
+			<view class="Dz" @click="showDk(userTemplate.check_num)">
+				<uni-icons class="icon" color="#FFF" size='80rpx'
+					type="calendar-filled"></uni-icons>
+			</view>
+			<view class="ScNum">
+				{{userTemplate.check_num||0}}
+			</view>
 		</view>
 		<image src="/static/image/qy.png" mode="widthFix" class="qianyue" @click="goQy"
 			v-if="!userInfo.uid || (userInfo.uid && userInfo.uid != uid)"></image>
@@ -107,7 +115,8 @@
 		likeAndBookmark
 	} from '@/api/model.js'
 	import {
-		getUser
+		getUser,
+		getHonor
 	} from '@/api/user.js';
 	import {
 		saveUrl,
@@ -120,6 +129,7 @@
 		},
 		data() {
 			return {
+				honor_list: [],
 				mtype: 1, //modelid
 				shareId: '', //保存分享uid
 				// 默认显示数据
@@ -139,6 +149,7 @@
 		},
 		onLoad(opt) {
 			const that = this;
+			that.getHonor(opt.uid)
 			// #ifndef MP
 			if (opt.spread) {
 				// 存储其他邀请人
@@ -282,6 +293,17 @@
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
+			showDk(num=0) {
+				this.$api.msg('总打卡' + num + '次')
+			},
+			getHonor(uid) {
+				getHonor({
+					uid
+				}).then(res => {
+					console.log(res,'res');
+					this.honor_list = res.data.honor_list
+				})
+			},
 			goQy() {
 				getUser().then(res => {
 					uni.navigateTo({