Explorar el Código

新增评价页面

老狐\25396 hace 5 años
padre
commit
0aa6928dec
Se han modificado 3 ficheros con 360 adiciones y 11 borrados
  1. 8 1
      pages.json
  2. 17 10
      pages/index/index.vue
  3. 335 0
      pages/me_evaluate.vue

+ 8 - 1
pages.json

xqd xqd
@@ -166,6 +166,13 @@
 			"style": {
 				"navigationBarTitleText": "信息编辑"
 			}
+		},
+		/**************我的评价************/
+		{
+			"path": "pages/me_evaluate",
+			"style": {
+				"navigationBarTitleText": "我的评价"
+			}
 		}
 	],
 	"globalStyle": {
@@ -197,7 +204,7 @@
 		"current": 0, //当前激活的模式(list 的索引项)
 		"list": [{
 			"name": "test", //模式名称
-			"path": "pages/Scheduling", //启动页面,必选
+			"path": "pages/zixun/xiangqing", //启动页面,必选
 			"query": "" //启动参数,在页面的onLoad函数里面得到
 		}]
 	}

+ 17 - 10
pages/index/index.vue

xqd xqd xqd
@@ -117,15 +117,15 @@
 							 shape="circle"></u-image>
 							<view class="grid-text margin-top-xs">服务设置</view>
 						</u-grid-item>
-						<u-grid-item>
-							<u-image width="120rpx" height="120rpx" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/daiding.png"
+						<u-grid-item  @click="evaluate">
+							<u-image width="120rpx" height="120rpx" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/pj.png"
 							 shape="circle"></u-image>
-							<view class="grid-text margin-top-xs">待定模块</view>
+							<view class="grid-text margin-top-xs">我的评价</view>
 						</u-grid-item>
 						<u-grid-item>
-							<u-image width="120rpx" height="120rpx" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/daiding.png"
+							<u-image width="120rpx" height="120rpx" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/jqqd.png"
 							 shape="circle"></u-image>
-							<view class="grid-text margin-top-xs">待定模块</view>
+							<view class="grid-text margin-top-xs">敬请期待</view>
 						</u-grid-item>
 					</u-grid>
 				</view>
@@ -292,11 +292,11 @@
 					pageSize: 10
 				});
 				if (res.data === null) {
-					uni.showToast({
-						title: '到底了',
-						duration: 5000,
-						icon: 'none'
-					})
+					// uni.showToast({
+					// 	title: '到底了',
+					// 	duration: 5000,
+					// 	icon: 'none'
+					// })
 					return false;
 				}
 				this.docterMessageList = this.docterMessageList.concat(res.data)
@@ -579,6 +579,13 @@
 				this.rzModal = true
 				}
 			},
+			evaluate(){
+				if(this.judgerenzheng()){
+				uni.navigateTo({
+					url: '/pages/me_evaluate'
+				})
+				}
+			},
 			qdrz() {
 				if(this.judgerenzheng()){
 				uni.navigateTo({

+ 335 - 0
pages/me_evaluate.vue

xqd
@@ -0,0 +1,335 @@
+<template>
+	<view style="height: 100%;width: 100%;">
+		<view class="v" v-for="item,index in tcTeam" :key='index' :data-index="index">
+			<view class="list_view">
+				<view class="flex justify-between" style="margin: 20rpx 0 20rpx 0;">
+					<text class="title">{{item.user}}</text>
+					<view>
+						<text style="font-size: 26rpx;color: #bcbcbc;margin-right: 5rpx;">订单号:</text>
+						<text style="font-size: 26rpx;color: #c1c1c1;">{{item.order_id}}</text>
+					</view>
+				</view>
+				<view class="flex justify-between" style="margin: 0 0rpx 20rpx 0rpx;">
+					<u-rate :count="count" :disabled="true" v-model="item.lv" size="35" inactive-color="#ececec"></u-rate>
+					<view>
+						<text style="font-size: 26rpx;color: #bcbcbc;margin-right: 5rpx;">时间:</text>
+						<text style="font-size: 26rpx;color: #c1c1c1;">{{item.time}}</text>
+					</view>
+				</view>
+				<u-line color="#ececec" />
+				<view class="" style="padding: 0 20rpx;color: #666666;margin-top: 20rpx;">
+					{{item.evaluate}}
+				</view>
+			</view>
+
+			<!-- <view class="list">
+				<view style="width: 100%;">
+					<view class="flex justify-between align-center bg-white" style="padding: 28rpx;border-radius: 16rpx;">
+						<view class="jinxing">
+							<text style="display: inline-block;width: 12rpx;height: 12rpx;border-radius: 50%;background-color:#EEAA3F;margin-right: 8rpx;"></text>
+							<text v-if="item.status==1">待审核</text>
+							<text v-else-if="item.status==2">审核通过</text>
+							<text v-else-if="item.status==3">审核拒绝</text>
+						</view>
+						<text class="phonezi">我的评价</text>
+					</view>
+				</view>
+			</view>
+			
+			<view style="width: 100%;height: 100%;;border-radius: 15rpx;">
+				<view class="flex align-center margin-top-sm">
+					<view class="text-lg text-bold margin-left-sm">
+						{{item.order.docter.name}}
+					</view>
+					<view class="text-gray margin-left-sm">
+						{{item.order.product_type==1?'电话咨询':'图文咨询'}}
+					</view>
+					<view class="margin-left-sm">
+						<u-rate :count="count" :disabled="true" v-model="item.score"></u-rate>
+					</view>
+				</view>
+				<view style="margin: 30rpx 28rpx 30rpx 28rpx;">
+					<text class="evaluate">{{item.content}}</text>
+				</view>
+				<u-line color="#EFEFEF" />
+				<view style="padding: 24rpx 28rpx;font-size: 26rpx;coloepicr: #666666;display: flex;justify-content: space-between;align-items: center;">
+					<text style="margin-right: 50rpx;">{{item.order.order_sn}}</text>
+					<text>{{item.created_at}}</text>
+				</view>
+			</view> -->
+		</view>
+		<u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
+		<u-no-network></u-no-network>
+		<view class="cu-tabbar-height"></view>
+		<view class="cu-tabbar-height"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				tcTeam: [{
+					user: '张三',
+					lv: 2,
+					evaluate: '这个医生技术好,很不错,这个医生技术好,很不错这个医生技术好,很不错这个医生技术好,很不错这个医生技术好,很不错',
+					order_id: 123456789,
+					time: '2020-11-16'
+				}, {
+					user: '张三',
+					lv: 3,
+					evaluate: '这个医生技术好,很不错,这个医生技术好,很不错这个医生技术好,很不错这个医生技术好,很不错这个医生技术好,很不错',
+					order_id: 123456789,
+					time: '2020-11-16'
+				}, {
+					user: '张三',
+					lv: 4,
+					evaluate: '这个医生技术好,很不错,这个医生技术好,很不错这个医生技术好,很不错这个医生技术好,很不错这个医生技术好,很不错',
+					order_id: 123456789,
+					time: '2020-11-16'
+				}],
+				pageindex: 1,
+				count: 5,
+				show: false
+			}
+		},
+		mounted() {
+			this.getevaluateList()
+		},
+		onReachBottom() {
+			this.getevaluateList()
+		},
+		methods: {
+			getevaluateList: async function() {
+				// let res = await this.$request.post("/api/v1/evaluate/evaluateList", {
+				// 	page: this.pageindex
+				// })
+				console.log(res)
+				if (res.status == 0) {
+					if (this.pageindex > res.data.last_page) {
+						uni.showToast({
+							title: "没有更多了",
+							icon: "none"
+						})
+					} else {
+						this.tcTeam = this.tcTeam.concat(res.data.data)
+						this.pageindex++
+					}
+				}
+				if (this.tcTeam.length == 0) {
+					this.show = true
+				} else {
+					this.show = false
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.list_view {
+
+		// width: 100%;
+
+		margin: 20rpx 25rpx 0 25rpx;
+		padding: 30rpx 28rpx;
+		background-color: #FFF;
+		border-radius: 12rpx;
+		box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
+
+		//标题 用户名
+		.title {
+			margin-left: 20rpx;
+			font-size: 30rpx;
+			font-weight: bold;
+
+		}
+	}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+	// .text_style {
+	// 	font-weight: 400;
+	// 	margin-left: 15rpx;
+	// 	background-color: #E5F5FF;
+	// 	color: #0B73B9;
+	// 	width: 100rpx;
+	// 	height: 28rpx;
+	// 	font-size: 20rpx;
+	// 	border-radius: 10rpx;
+	// 	text-align: center;
+	// 	align-items: center;
+	// }
+
+	// .nametaile {
+	// 	font-size: 30rpx;
+	// 	font-weight: 500;
+	// 	color: #333333;
+	// }
+
+	// .textstyle {
+	// 	font-size: 26rpx;
+	// 	color: #666666;
+	// 	font-weight: 400;
+	// }
+
+	// .phonezi {
+	// 	width: 160rpx;
+	// 	height: 54rpx;
+	// 	background: #F6F6F6;
+	// 	border-radius: 27rpx;
+	// 	font-size: 28rpx;
+	// 	font-family: PingFangSC-Regular, PingFang SC;
+	// 	font-weight: 400;
+	// 	color: #666666;
+	// 	display: flex;
+	// 	align-items: center;
+	// 	justify-content: center;
+	// }
+
+	// .jinxing {
+	// 	height: 30rpx;
+	// 	font-size: 30rpx;
+	// 	font-family: PingFangSC-Medium, PingFang SC;
+	// 	font-weight: 500;
+	// 	color: #EEAA3F;
+	// 	display: flex;
+	// 	align-items: center;
+	// }
+
+	// .v {
+	// 	margin: 20rpx 28rpx 0rpx 28rpx;
+	// 	border-radius: 15rpx;
+	// 	box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
+	// 	width: auto;
+	// 	height: auto;
+	// 	background-color: #fbfbfb;
+	// }
+
+	// .list {
+	// 	border-radius: 15rpx;
+	// 	display: flex;
+	// 	width: auto;
+	// 	height: auto;
+	// 	background-color: #FFFFFF;
+
+	// 	.title {
+	// 		width: 100%;
+	// 		display: flex;
+	// 		// justify-content: center;
+	// 		// align-items: center;
+
+	// 		.img {
+	// 			width: 68rpx;
+	// 			height: 68rpx;
+	// 			border-radius: 50%;
+	// 			margin-right: 20rpx;
+	// 		}
+
+	// 		//文字
+	// 		.text {
+	// 			height: auto;
+
+	// 			//名字+标签
+	// 			.name {
+	// 				font-size: 25rpx;
+	// 				font-weight: bold;
+	// 				display: flex;
+	// 				align-items: center;
+	// 				margin-bottom: 14rpx;
+
+	// 				.label {
+	// 					font-weight: 400;
+	// 					margin-right: 15rpx;
+	// 					background-color: #E5F5FF;
+	// 					color: #0B73B9;
+	// 					width: 100rpx;
+	// 					height: 28rpx;
+	// 					font-size: 20rpx;
+	// 					border-radius: 10rpx;
+	// 					display: flex;
+	// 					justify-content: center;
+	// 					align-items: center;
+	// 				}
+	// 			}
+
+	// 			//科室
+	// 			.department {
+	// 				font-size: 18rpx;
+	// 				color: #666666;
+
+	// 				text {
+	// 					margin-right: 15rpx;
+	// 				}
+	// 			}
+
+	// 			// // 选项 图文电话门诊
+	// 			// .option {
+	// 			// 	display: flex;
+
+	// 			// 	view {
+	// 			// 		background-color: #E4E4E4;
+	// 			// 		width: 100rpx;
+	// 			// 		height: 48rpx;
+	// 			// 		border-radius: 12px;
+	// 			// 		margin-right: 15rpx;
+	// 			// 		display: flex;
+	// 			// 		justify-content: center;
+	// 			// 		align-items: center;
+	// 			// 	}
+	// 			// }
+	// 		}
+	// 	}
+
+	// 	.score {
+	// 		margin: 30rpx 30rpx 30rpx 78rpx;
+	// 		width: 100%;
+	// 		display: flex;
+	// 		background-color: #FFFFFF;
+	// 	}
+
+
+
+	// }
+
+	// .evaluate {
+	// 	font-size: 26rpx;
+	// 	color: #666666;
+	// }
+</style>