yanjie 4 vuotta sitten
vanhempi
commit
7deb1deda6

+ 7 - 0
pages.json

xqd
@@ -192,6 +192,13 @@
 			"style": {
 				"navigationBarTitleText": "我的评价"
 			}
+		},
+		//服务包订单
+		{
+			"path": "pages/service_box/box_details",
+			"style": {
+				"navigationBarTitleText": "我的服务包"
+			}
 		}
 
 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 2
pages/common_tools/collection/collection_details.vue


+ 48 - 31
pages/common_tools/home_doctor.vue

xqd xqd xqd
@@ -1,33 +1,33 @@
 <template>
 	<view style="height: 100%;width: 100%; padding: 20rpx 30rpx;">
-		<view class="list" v-for="item,index in tcTeam" :key='index' @click="clicklist" :data-index="index">
+		<view class="list" v-for="item,index in doctorList" :key='index' @click.stop="clicklist" :data-id="item.docter.id"
+		 :data-index="index">
 			<!-- 头像 -->
 			<view class="portrait">
 				<view style="padding-top: 20rpx;">
-					<image class="img" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png"></image>
-					<view class="bun_true" @click="follow"  v-if="!item.follow">关注</view>
-					<view class="bun_false" @click="follow" :data-index="index" v-else>已关注</view>
+					<image class="img" :src="item.docter.avatar"></image>
+					<view class="bun_true" @click.stop="follow" :data-index="index" :data-id="item.docter.id" v-if="item.docter.is_collect==0">关注</view>
+					<view class="bun_false" @click.stop="follow" :data-index="index" :data-id="item.docter.id" v-else>已关注</view>
 				</view>
 			</view>
 			<!-- 文字 -->
 			<view class="text">
 				<!-- 名字+标签 -->
 				<view class="name">
-					<view style="margin-right: 15rpx;">{{item.name}}</view>
-					<view class="label">{{item.label1}}</view>
-					<view class="label">{{item.label2}}</view>
+					<view style="margin-right: 15rpx;">{{item.docter.name}}</view>
+					<view class="label" v-for="(itm,idx) in item.docter.label" :key="index">{{itm}}</view>
 				</view>
 				<!-- 科室 -->
 				<view class="department">
 					<text>科室:</text>
-					<text style="color: #333333;">{{item.department1}}</text>
-					<text style="color: #333333;">{{item.department2}}</text>
+					<text style="color: #333333;">{{item.docter.office.name}}</text>
+					<text style="color: #333333;">{{item.docter.qualification.name}}</text>
 				</view>
 				<!-- 选项 -->
 				<view class="option">
-					<view>图文</view>
-					<view>电话</view>
-					<view>门诊</view>
+					<view v-if="item.docter.is_chat==1">图文</view>
+					<view v-if="item.docter.is_phone==1">电话</view>
+					<view v-if="item.docter.is_appoint==1">门诊</view>
 				</view>
 			</view>
 		</view>
@@ -36,6 +36,9 @@
 
 <script>
 	export default {
+		mounted() {
+			this.gethome_doctor()
+		},
 		data() {
 			return {
 				//关注
@@ -110,29 +113,43 @@
 					department2: '主任医师',
 					follow: false
 				}],
-				packs: {
-					id: '', //ID
-					name: '', //名称
-					intro: '', //简介
-					desc: '', //详细介绍
-					price: '', //价格(单位分)
-					team_id: '', //医生团队ID
-					phone_minutes: '', //电话分钟数
-					chat_num: '', //图文咨询次数
-					appoint_num: '', //门诊预约次数
-					vaccine_limit_amount: '', //疫苗总金额限制
-					nurses_limit_amount: '', //儿保总金额限制
-					effective_days: '', //有效天数
-					created_at: '', //创建时间
-					updated_at: '' //更新时间
-				}
+				doctorList: []
 			}
 		},
 		methods: {
 			//关注
-			follow(e) {
-				console.log(this.tcTeam[e.currentTarget.dataset.index])
-
+			follow: async function(e) {
+				let res = await this.$request.post("/api/v1/collection/submitCollect", {
+					type: 1,
+					relation_id: e.currentTarget.dataset.id
+				})
+				if (res.status == 0) {
+					if (res.data.is_collect == 0) {
+						uni.showToast({
+							title: "取消成功",
+							icon: "none"
+						})
+						this.doctorList[e.currentTarget.dataset.index].docter.is_collect = res.data.is_collect
+					} else {
+						uni.showToast({
+							title: "关注成功",
+							icon: "none"
+						})
+						this.doctorList[e.currentTarget.dataset.index].docter.is_collect = res.data.is_collect
+					}
+				}
+			},
+			gethome_doctor: async function() {
+				let res = await this.$request.post("/api/v1/user/familyDocterList")
+				console.log(res)
+				if (res.status == 0) {
+					this.doctorList = res.data.data
+				}
+			},
+			clicklist(e) {
+				uni.navigateTo({
+					url: "../doctor_related/doctor_info?id=" + e.currentTarget.dataset.id
+				})
 			}
 		}
 	}

+ 1 - 1
pages/common_tools/me_evaluate.vue

xqd
@@ -258,7 +258,7 @@
 		}
 
 		.score {
-			margin: 30rpx 30rpx 30rpx 100rpx;
+			margin: 30rpx 30rpx 30rpx 78rpx;
 			width: 100%;
 			display: flex;
 			background-color: #FFFFFF;

+ 3 - 1
pages/doctor_related/info_write.vue

xqd
@@ -261,7 +261,9 @@
 			},
 			//添加就诊人
 			addPeople(e) {
-				
+				uni.navigateTo({
+					url:"../archives/add_archives"
+				})
 			},
 			confirmphone() {
 				if(this.phoneValue=="其他手机号"){

+ 15 - 3
pages/doctor_related/select_doctor.vue

xqd xqd xqd xqd
@@ -100,12 +100,20 @@
 	} from 'vuex';
 	export default {
 		onLoad(options) {
+			let date = new Date();
+			let nian = date.getFullYear()
+			let yue = date.getMonth() + 1
+			let ri = date.getDate()
 			if (options.index) {
 				this.value1 = options.index
 				if (this.value1 == 3) {
 					this.istime = true
+					this.timehour = 1,
+					this.timeday = nian + "-" + yue + "-" + ri
 				} else {
-					this.istime = false
+					this.istime = false,
+					this.timehour = "",
+					this.timeday = ""
 				}
 			}
 			if (options.value != "") {
@@ -185,7 +193,7 @@
 				show: false,
 				istime: false,
 				showtime: "",
-				pageindex: 1
+				pageindex: 1,
 			}
 		},
 		watch: {
@@ -275,6 +283,7 @@
 					schedule_date: this.timeday,
 					time_period_id: this.timehour
 				}, )
+				console.log(res, this.value1)
 				if (res.status == 0) {
 					if (this.pageindex > res.data.last_page) {
 						uni.showToast({
@@ -311,7 +320,10 @@
 			},
 			//返回时间
 			callbacktime(arr) {
-				this.timeday = this.multiSelector[0][arr[0]]
+				let date = new Date()
+				let year = date.getFullYear()
+				this.timeday = year + "-" + this.multiSelector[0][arr[0]]
+				console.log(this.timeday)
 				this.timehour = this.multiSelector[1][arr[1]].id
 				this.showtime = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
 				this.pageindex = 1

+ 24 - 16
pages/index/book.vue

xqd xqd
@@ -1,28 +1,19 @@
 <template>
 	<view class="main">
 		<view class="indexswiper" style="margin-top: 10rpx;">
-			<u-swiper :list="list" mode="none"></u-swiper>
+			<u-swiper :list="lunbolist" mode="none"></u-swiper>
 		</view>
 		<view class="tltleStyle">
 			推荐文章
 		</view>
 		<u-card :show-head="false" :show-foot="false" :border="false">
-			<view class="" slot="body">
+			<view class="" slot="body" v-for="(item,index) in list" @click="bookinfo(item.id,item.title)">
 				<view class="u-border-bottom padding-bottom-sm">
 					<view class="u-body-item u-flex u-col-between u-p-t-0">
-						<view class="u-body-item-title u-line-2">瓶身描绘的牡丹一如你初妆,冉冉檀香透过窗心事我了然,宣纸上走笔至此搁一半</view>
-						<image src="https://img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg"
-						 mode="aspectFill"></image>
+						<view class="u-body-item-title u-line-2">{{item.title}}</view>
+						<image :src="item.banner_url"></image>
 					</view>
-					<u-tag text="情感咨询" size="mini" shape="circle" mode="dark" type="info" />
-				</view>
-				<view class="padding-bottom-sm margin-top-sm">
-					<view class="u-body-item u-flex u-col-between u-p-t-0">
-						<view class="u-body-item-title u-line-2">瓶身描绘的牡丹一如你初妆,冉冉檀香透过窗心事我了然,宣纸上走笔至此搁一半</view>
-						<image src="https://img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg"
-						 mode="aspectFill"></image>
-					</view>
-					<u-tag text="情感咨询" size="mini" shape="circle" mode="dark" type="info" />
+					<!-- <u-tag text="情感咨询" size="mini" shape="circle" mode="dark" type="info" /> -->
 				</view>
 			</view>
 		</u-card>
@@ -36,23 +27,40 @@
 	export default {
 		onLoad(options) {
 
+		},
+		mounted() {
+			this.getbook()
 		},
 		data() {
 			return {
-				list: [{
+				list: [],
+				lunbolist: [{
 						image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
+						title: '昨夜星辰昨夜风,画楼西畔桂堂东'
 					},
 					{
 						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
+						title: '身无彩凤双飞翼,心有灵犀一点通'
 					},
 					{
 						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
+						title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
 					}
 				],
 			}
 		},
 		methods: {
-
+			getbook: async function() {
+				let res = await this.$request.post("/api/v1/article/articleList")
+				if (res.status == 0) {
+					this.list = res.data.data
+				}
+			},
+			bookinfo(id, title) {
+				uni.navigateTo({
+					url: "../common_tools/collection/collection_details?id=" + id + "&title=" + title
+				})
+			}
 		}
 	};
 </script>

+ 1 - 1
pages/index/mine.vue

xqd
@@ -53,7 +53,7 @@
 					<view class="tip"></view>
 					<view class="f14 m-gray-small mt10 line1">我的意见单</view>
 				</navigator>
-				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
+				<navigator class="width25 m-ycenter overflow pr" hoverClass="none" url="../service_box/box_details">
 					<image style="width: 76rpx;height: 76rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/myservice.png"
 					 mode=""></image>
 					<view class="tip"></view>

+ 1 - 1
pages/order/order.vue

xqd
@@ -19,7 +19,7 @@
 				<text v-else-if="product_type=='2'">您已发起图文咨询</text>
 				<text v-else-if="product_type=='3'">您已发起门诊预约</text>
 				<text v-else-if="product_type=='4'||product_type=='5'">您已提交预约申请!</text>
-				<text v-else-if="product_type=='6'">您已充值成功</text>
+				<text v-else-if="product_type=='7'">您已充值成功</text>
 				<text v-else>您已成功购买服务包</text>
 			</view>
 			<!-- 灰字 -->

+ 26 - 0
pages/order/payment.vue

xqd xqd xqd
@@ -91,6 +91,7 @@
 		onLoad(op) {
 			this.infodata = JSON.parse(op.data)
 			this.norderAmount = this.infodata.total_amount
+			console.log(this.infodata)
 		},
 		mounted() {
 			this.getUserInfo()
@@ -142,6 +143,29 @@
 					console.log(this.info)
 				}
 			},
+			paypacks: async function() {
+				let res = await this.$request.post("/api/v1/order/packPlaceOrder", {
+					patient_id: this.infodata.patient_id,
+					total_amount: this.infodata.total_amount * 100,
+					service_pack_id: this.infodata.service_pack_id,
+					is_security: this.infodata.is_security,
+					guardian_name: this.infodata.guardian_name,
+					relationship_type: this.infodata.relationship_type,
+					payment_type: this.infodata.payment_type
+				})
+				if (res.status == 0) {
+					this.popupShow = false
+					uni.showToast({
+						title: "支付成功!",
+						duration: 1500
+					})
+					setTimeout(() => {
+						uni.redirectTo({
+							url: "order?type=" + this.infodata.product_type
+						})
+					}, 1500)
+				}
+			},
 			payphone: async function() {
 				let res = await this.$request.post("/api/v1/order/consultPlaceOrder", {
 					product_type: this.infodata.product_type,
@@ -195,6 +219,8 @@
 					this.payphone()
 				} else if (this.infodata.product_type == 2) {
 					this.paychat()
+				} else if (this.infodata.product_type == 6) {
+					this.paypacks()
 				}
 			}
 		},

+ 117 - 1
pages/service_box/box_details.vue

xqd
@@ -1,8 +1,124 @@
 <template>
+	<view class="container">
+		<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
+		<view style="width: 100vw;height: auto;margin: 15rpx 20rpx;background-color: #f6f6f6;">
+			<view style="width: 100%;height: 100%;">
+				<view v-for="(item,index) in serviceList" :key="index">
+					<view class="card" v-for="itm,idx in item.order_pack" :key="idx">
+						<view class="taocan" :data-id="item.id" @click="details">
+							<view class="tc_left">
+								<text>{{itm.pack_name}}</text>
+							</view>
+							<view class="tc_right">
+								<view style="width: 100%;">
+									<view class="text">{{itm.pack_intro}}</view>
+									<!-- <view class="text">{{item.desc}}</view> -->
+									<view class="text">
+										<text style="text-align: left;">时长:{{itm.effective_days}}天</text>
+										<text style="float: right;color: #FF4F61;font-weight: bold;">¥{{itm.pack_price/100}}</text>
+									</view>
+								</view>
+								<view class="margin-top-xs">
+									剩余时长:<u-count-down v-if="true" color="#EEAA3F" separator="zh" :timestamp="itm.end_time-miao"></u-count-down><text v-else>已结束</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
+	export default {
+		onLoad() {
+			this.getserviceList()
+		},
+		onShow() {
+			this.miao = parseInt(new Date().getTime() / 1000)
+		},
+		data() {
+			return {
+				list: [{
+					name: '服务中服务包'
+				}, {
+					name: '历史服务包'
+				}, ],
+				current: 0,
+				serviceList: [],
+				miao: ""
+			}
+		},
+		methods: {
+			change(index) {
+				this.current = index;
+			},
+			getserviceList: async function() {
+				let res = await this.$request.post("/api/v1/order/orderList", {
+					list_type: 1,
+					product_type: 6
+				})
+				if (res.status == 0) {
+					this.serviceList = res.data.data
+					console.log(this.serviceList)
+				}
+			}
+		}
+	}
 </script>
 
-<style>
+<style lang="scss">
+	.container {
+		width: 100%;
+		height: 100%;
+		background-color: #F6F6F6;
+	}
+
+	.card {
+		width: 100%;
+		height: auto;
+		margin-top: 20rpx;
+
+		// background-image: url(../../static/服务包.png);
+		.taocan {
+			width: 710rpx;
+			height: 230rpx;
+			position: relative;
+			display: flex;
+			border-radius: 10rpx;
+			background: radial-gradient(circle at right top, transparent 15rpx, #ffffff 0) top left / 152rpx 51% no-repeat,
+				radial-gradient(circle at right bottom, transparent 15rpx, #ffffff 0) bottom left /152rpx 51% no-repeat,
+				radial-gradient(circle at left top, transparent 15rpx, #ffffff 0) top right /560rpx 51% no-repeat,
+				radial-gradient(circle at left bottom, transparent 15rpx, #ffffff 0) bottom right /560rpx 51% no-repeat;
+			filter: drop-shadow(0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.04));
+		}
+	}
+
+	.tc_left {
+		display: flex;
+
+		justify-content: center;
+		align-items: center;
+		width: 152rpx;
+
+		text {
+			font-size: 30rpx;
+			font-weight: bold;
+		}
+	}
+
+	.tc_right {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		width: 550rpx;
+		padding: 0 20rpx;
+		font-size: 26rpx;
+
+		.text {
+			padding: 10rpx 0rpx;
+			width: 100%;
+		}
+	}
 </style>

+ 3 - 2
pages/service_packs/packs_details.vue

xqd xqd xqd
@@ -18,7 +18,7 @@
 						<view style="padding: 12rpx 0;">{{packs.desc}}</view>
 					</view>
 					<view style="font-size: 28rpx;font-weight: bold;padding-top: 48rpx;">{{packs.team.name}}</view>
-					<view class="list" v-for="(item,index) in packs.team.docter" :key='index'>
+					<view class="list" v-for="(item,index) in packs.team.docter" :key="index">
 						<!-- 头像 -->
 						<view class="portrait">
 							<view style="padding-top: 20rpx;">
@@ -128,6 +128,7 @@
 				let res = await this.$request.post("/api/v1/ServicePack/servicePackDetail", {
 					service_pack_id: this.serviceid
 				})
+				console.log(res)
 				if (res.status == 0) {
 					this.packs = res.data
 				}
@@ -152,7 +153,7 @@
 					});
 				} else {
 					uni.navigateTo({
-						url: '/pages/service_packs/packs_information'
+						url: '/pages/service_packs/packs_information?data=' + JSON.stringify(this.packs)
 					})
 				}
 			}

+ 88 - 24
pages/service_packs/packs_information.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -3,8 +3,8 @@
 		<view style="height: 100%;">
 
 			<!-- 列选择器 -->
-			<u-select v-model="choiceName" :list="choicelist" @confirm="confirm1"></u-select>
-			<u-select v-model="relationship" :list="relationshipList" @confirm="confirm2"></u-select>
+			<u-select v-model="choiceName" :list="babyList" value-name="id" label-name="name" @confirm="confirm1"></u-select>
+			<u-select v-model="relationship" :list="guanxilist" @confirm="confirm2"></u-select>
 
 			<!-- 步骤条 -->
 			<view class="steps">
@@ -29,7 +29,7 @@
 								<text style="font-size: 28rpx;">宝贝姓名</text>
 							</view>
 							<view slot="footer">
-								<text style="font-size: 30rpx;">{{babyNmae}}</text>
+								<text style="font-size: 30rpx;">{{babyNmae.label}}</text>
 							</view>
 						</uni-list-item>
 
@@ -55,7 +55,7 @@
 							</view>
 							<view slot="footer">
 								<u-radio-group v-model="guarantee" @change="radioGroupChange">
-									<u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
+									<u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
 										{{item.name}}
 									</u-radio>
 								</u-radio-group>
@@ -100,8 +100,8 @@
 								<text style="font-size: 28rpx;">与宝贝的关系</text>
 							</view>
 							<view slot="footer">
-								<view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view>
-								<view style="color: #AAAAAA;" v-else>{{nRelationship}}</view>
+								<!-- <view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view> -->
+								<view style="color: #AAAAAA;">{{nRelationship.label}}</view>
 							</view>
 						</uni-list-item>
 
@@ -119,6 +119,12 @@
 
 <script>
 	export default {
+		onLoad(op) {
+			this.packs = JSON.parse(op.data)
+		},
+		mounted() {
+			this.getarchives()
+		},
 		data() {
 			return {
 				//当前处于第几步
@@ -151,22 +157,33 @@
 						label: '测试2'
 					}
 				],
-				relationshipList: [{
+				guanxilist: [{
 						value: '1',
-						label: '父'
+						label: '父'
 					},
 					{
 						value: '2',
-						label: '祖父母'
+						label: '母'
 					},
 					{
 						value: '3',
-						label: '亲属'
+						label: '祖父'
 					},
 					{
 						value: '4',
-						label: '其他'
-
+						label: '祖母'
+					},
+					{
+						value: '5',
+						label: '外祖父'
+					},
+					{
+						value: '6',
+						label: '外祖母'
+					},
+					{
+						value: '7',
+						label: '叔侄'
 					}
 				],
 				/**
@@ -176,35 +193,82 @@
 				 * 社保 值为  是  否
 				 * 监护人姓名
 				 * */
-				babyNmae: '测试',
+				babyNmae: {
+					label: "请选择",
+					value: ""
+				},
 				babyID: '',
 				guarantee: '',
 				guardianName: '',
-				nRelationship: ''
+				nRelationship: {
+					value: "",
+					label: "请选择"
+				},
+				babyList: [],
+				isindex: "",
+				packs: {}
+
 
 			}
 		},
 		methods: {
-			// 选中某个单选框时,由radio时触发
-			radioChange(e) {
-				console.log(e);
+			getarchives: async function() {
+				let res = await this.$request.post("/api/v1/patient/patientList")
+				if (res.status == 0) {
+					this.babyList = res.data.data
+				}
 			},
 			// 选中任一radio时,由radio-group触发
 			radioGroupChange(e) {
-				console.log(e);
+				if (e == "是") {
+					this.isindex = 1
+				} else {
+					this.isindex = 0
+				}
+				console.log(this.isindex)
 			},
 			confirm1(e) {
-				this.babyNmae = e[0].label
+				console.log(e)
+				this.babyNmae = e[0]
 			},
 			confirm2(e) {
-				this.nRelationship = e[0].label
+				this.nRelationship = e[0]
 			},
 			//下一步
 			next(e) {
-				console.log(123123)
-				uni.navigateTo({
-					url: '/pages/order/payment'
-				});
+				if (this.babyNmae.value != "" && this.guardian_name != "") {
+					let obj = {
+						product_type: 6,
+						patient_id: this.babyNmae.value,
+						total_amount: this.packs.price / 100,
+						service_pack_id: this.packs.id,
+						is_security: this.isindex,
+						guardian_name: this.guardianName,
+						relationship_type: this.nRelationship.value,
+						payment_type: 2
+					}
+					console.log(obj)
+					uni.navigateTo({
+						url: "../order/payment?data=" + JSON.stringify(obj)
+					})
+				} else {
+					uni.showToast({
+						title: "请填写完整",
+						icon: "none"
+					})
+				}
+				let obj = {
+					product_type: 6,
+					patient_id: this.babyNmae.value,
+					total_amount: this.packs.price / 100,
+					service_pack_id: this.packs.id,
+					is_security: this.isindex,
+					guardian_name: this.guardianName,
+					relationship_type: this.nRelationship.value,
+					payment_type: 2
+				}
+				console.log(obj)
+
 			}
 		}
 	}

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä