yanjie пре 4 година
родитељ
комит
a3d76dd27c

+ 15 - 9
pages.json

xqd xqd xqd xqd xqd xqd
@@ -42,7 +42,13 @@
 		{
 			"path": "pages/archives/my_archives",
 			"style": {
-				"navigationBarTitleText": "档案编辑"
+				"navigationBarTitleText": "档案列表"
+			}
+		},
+		{
+			"path": "pages/archives/add_archives",
+			"style": {
+				"navigationBarTitleText": "添加档案"
 			}
 		},
 		{
@@ -51,7 +57,7 @@
 				"navigationBarTitleText": "登录/注册"
 			}
 		},
-/*		order文件夹	订单		*/
+		/*		order文件夹	订单		*/
 		//付款
 		{
 			"path": "pages/order/payment",
@@ -66,7 +72,7 @@
 				"navigationBarTitleText": "下单成功"
 			}
 		},
-/*		service_packs文件夹	服务包	*/
+		/*		service_packs文件夹	服务包	*/
 		//服务人信息
 		{
 			"path": "pages/service_packs/packs_information",
@@ -95,16 +101,16 @@
 				"navigationBarTitleText": "服务包"
 			}
 		},
-/*		personal文件夹		个人中心	*/
+		/*		personal文件夹		个人中心	*/
 		//个人信息
 		{
 			"path": "pages/personal/personal_information",
 			"style": {
 				"navigationBarTitleText": "个人信息"
 			}
-			
+
 		},
-	/*	coupon文件夹		优惠券*/
+		/*	coupon文件夹		优惠券*/
 		//优惠券
 		{
 			"path": "pages/personal/coupon/coupon",
@@ -119,8 +125,8 @@
 				"navigationBarTitleText": "优惠券详情"
 			}
 		}
-		
-		
+
+
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
@@ -130,7 +136,7 @@
 	},
 	"tabBar": {
 		"color": "#C0C4CC", //未选中的菜单文字颜色
-		"selectedColor": "#fab6b6", //选中时的菜单文字颜色
+		"selectedColor": "#0B73B9", //选中时的菜单文字颜色
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff", //背景
 		"list": [{

+ 44 - 3
pages/archives/my_archives.vue

xqd xqd
@@ -1,6 +1,30 @@
 <template>
 	<view class="main">
-		
+		<view class="cu-list menu-avatar margin-sm" v-for="(item,index) in patientList" :key="index" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
+			<view class="cu-item">
+				<view class="cu-avatar round lg" :style="'background-image:url('+item.avatar+');'"></view>
+				<view class="content">
+					<view class="text-grey">{{item.name}}</view>
+					<view class="text-gray text-sm flex">
+						<text class="text-cut">
+							{{item.sex==1?'男':'女'}}
+						</text>
+						<text class="text-cut margin-left-sm">
+							{{}}
+						</text>
+					</view>
+				</view>
+				<view class="action">
+					<text class="cuIcon-roundright lg text-gray"></text>
+				</view>
+			</view>
+		</view>
+		<u-empty text="暂无档案" :show="istrue" mode="list" margin-top="300"></u-empty>
+		<view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
+			<view class="submit" style="background-color: #0B73B9;color: white;" @click="addarchives">
+				添加健康档案
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -8,14 +32,31 @@
 	export default {
 		onLoad(options) {
 
+		},
+		onShow() {
+			this.getarchives()
 		},
 		data() {
 			return {
-
+				patientList: [],
+				istrue: false
 			}
 		},
 		methods: {
-			
+			getarchives: async function() {
+				let res = await this.$request.post("/api/v1/patient/patientList")
+				if (res.status == 0) {
+					this.patientList = res.data.data
+					if (this.patientList.length == 0) {
+						this.istrue = true
+					}
+				}
+			},
+			addarchives() {
+				uni.navigateTo({
+					url: "add_archives"
+				})
+			}
 		}
 	};
 </script>

+ 5 - 5
pages/doctor_related/doctor_info.vue

xqd xqd xqd xqd xqd
@@ -2,7 +2,7 @@
 	<view class="main">
 		<view>
 			<view class="pr det-body">
-				<image class="det-bg-img" mode="scaleToFill" src="http://file.supermm.me/miniProgram/images/det/det_bg_01.png"></image>
+				<image class="det-bg-img" mode="scaleToFill" src="../../static/img/doctorbanner.png"></image>
 				<view class="det-head pr plr15 bdr8 m-bg-white mlr15 pt25">
 					<view class="m-xstart pr m-bottom-line pb25 margin-bottom-sm">
 						<view class="m-flex overflow mr10">
@@ -87,7 +87,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="margin-lr-sm mt30 bg-white" style="border-radius: 16rpx; box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);"
+			<view class="margin-lr-sm mt15 bg-white" style="border-radius: 16rpx; box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);"
 			 v-if="doctor.evaluate.length!=0">
 				<view class="f18 fb flex align-center plr15 pt15">患者评价 <text class="f12 m-gray-letter margin-left-xs">({{doctor.evaluate.length}})</text>
 				</view>
@@ -217,7 +217,7 @@
 			},
 			phonezixun() {
 				uni.navigateTo({
-					url: "info_write"
+					url: "info_write?doctor=" + JSON.stringify(this.doctor)
 				})
 			},
 			xuantime() {
@@ -234,7 +234,7 @@
 		height: 340rpx;
 		background-color: #fff;
 		border-radius: 16rpx;
-		margin-top: 60rpx;
+		margin-top: 30rpx;
 		box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
 	}
 
@@ -251,7 +251,7 @@
 		z-index: 1;
 		display: block;
 		width: 100%;
-		height: 400rpx;
+		height: 267rpx;
 	}
 
 	.det-head {

+ 29 - 34
pages/doctor_related/info_write.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -2,12 +2,12 @@
 	<view class="main">
 		<view class="cu-list menu-avatar">
 			<view class="cu-item">
-				<view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg);"></view>
+				<view class="cu-avatar round lg" :style="'background-image:url('+doctor.avatar+');'"></view>
 				<view class="content">
-					<view class="text-grey">医生姓名</view>
+					<view class="text-grey">{{doctor.name}}</view>
 					<view class="text-gray text-sm flex">
 						<text class="text-cut">
-							科室名称 医生资质
+							{{doctor.office.name}} {{doctor.qualification.name}}
 						</text>
 					</view>
 				</view>
@@ -38,7 +38,7 @@
 					<text class="text-grey">咨询时间</text>
 				</view>
 				<view class="action">
-					<text class="text-grey text-sm">10分钟</text>
+					<text class="text-grey text-sm">{{doctor.phone_minutes}}分钟</text>
 				</view>
 			</view>
 			<view class="cu-item">
@@ -46,12 +46,12 @@
 					<text class="text-grey">咨询费用</text>
 				</view>
 				<view class="action">
-					<text class="text-grey text-sm">19.9元</text>
+					<text class="text-grey text-sm">{{doctor.phone_price}}元</text>
 				</view>
 			</view>
 		</view>
 		<view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
-			<view class="bg-green submit" @click="">
+			<view class="submit" style="background-color: #0B73B9;color: white;" @click="">
 				立即咨询
 			</view>
 		</view>
@@ -63,11 +63,11 @@
 				<view class="popup_title_text">选择就诊人</view>
 			</view>
 			<scroll-view style="height: 70%;" scroll-y="true">
-				<view class="popup_list" v-for="(item, index) in list" @click="value=item.name,showpeople=false">
+				<view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="value=item.name,showpeople=false">
 					<view class="popup_list_title">
 						<view class="title">{{item.name}}</view>
 						<view class="body">
-							男 18天
+							{{item.sex==1?'男':'女'}}
 						</view>
 					</view>
 					<view class="popup_list_button flex align-center">
@@ -80,7 +80,10 @@
 			</scroll-view>
 			<u-gap height="10" bg-color="#f9f9f9"></u-gap>
 			<view class="popup_button">
-				<text class="" @click="addPeople">添加就诊人</text>
+				<image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="../../static/img/addjiu.png" mode=""></image>
+				<view class="" @click="addPeople">
+					添加就诊人档案
+				</view>
 			</view>
 		</u-popup>
 
@@ -119,32 +122,16 @@
 	export default {
 		onLoad(options) {
 			this.phonenum = this.phoneList[0].num
+			this.doctor = JSON.parse(options.doctor)
+			console.log(this.doctor)
+		},
+		onShow() {
+			this.getarchives()
 		},
 		data() {
 			return {
 				/* 就诊人 */
 				showpeople: false,
-				list: [{
-						name: '测试1',
-						disabled: false
-					},
-					{
-						name: '测试2',
-						disabled: false
-					},
-					{
-						name: '测试3',
-						disabled: false
-					},
-					{
-						name: '测试4',
-						disabled: false
-					},
-					{
-						name: '测试5',
-						disabled: false
-					}
-				],
 				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
 				value: '',
 				/* 接听号码 */
@@ -165,7 +152,9 @@
 				phoneValue: '',
 				showinput: '其他手机号',
 				phonenum: "",
-				phonedata: ""
+				phonedata: "",
+				patientList: [],
+				doctor: {}
 			}
 		},
 		methods: {
@@ -186,7 +175,7 @@
 			},
 			phoneListchange(item) {
 				this.phoneValue = item
-				console.log(item)
+				console.log(this.phoneValue)
 			},
 			peopleListchange(item) {
 				this.value = item
@@ -205,7 +194,13 @@
 			confirmphone() {
 				this.phonenum = this.phonedata
 				this.showphone = !this.showphone
-			}
+			},
+			getarchives: async function() {
+				let res = await this.$request.post("/api/v1/patient/patientList")
+				if (res.status == 0) {
+					this.patientList = res.data.data
+				}
+			},
 
 		}
 	};
@@ -268,7 +263,7 @@
 		justify-content: center;
 		align-items: center;
 
-		text {
+		view {
 			color: #0b73ba;
 			font-weight: 500;
 		}

+ 1 - 1
pages/index/index.vue

xqd
@@ -13,7 +13,7 @@
 			<u-grid :col="3" :border="false">
 				<view @click="gotoxuanze" data-index="1">
 					<u-grid-item>
-						<u-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/example/fade.jpg" shape="circle"></u-image>
+						<u-image width="120rpx" height="120rpx" src="../static/toolimg/indexphone" shape="circle"></u-image>
 						<view class="grid-text">电话咨询</view>
 					</u-grid-item>
 				</view>

+ 29 - 27
pages/index/mine.vue

xqd xqd xqd xqd xqd
@@ -2,29 +2,28 @@
 	<view class="main">
 		<view class="pr">
 			<view class="header-content">
-				<image src="http://file.supermm.me/miniProgram/images/personal/bg.png" style="width:100%;height:260rpx;"></image>
+				<image src="../../static/img/mybanner.png" style="width:100%;height:260rpx;"></image>
 			</view>
 			<view class="pr" style="z-index:2">
 				<view class="plr15">
 					<view class="bdr4 pb20">
 						<view class="m-dpflex m-justify-start m-align-center" style="height: 165rpx;">
-							<image binderror="_binderror" mode="scaleToFill" src="https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg"
-							 style="width: 120rpx;height: 120rpx;border-radius: 50%;"></image>
-							<text class="line1 f20 fb plr15 text-white">落雨桐</text>
+							<image binderror="_binderror" mode="scaleToFill" :src="info.avatar" style="width: 120rpx;height: 120rpx;border-radius: 50%;"></image>
+							<text class="line1 f20 fb plr15 text-white">{{info.nickname}}</text>
 							<navigator hoverClass="none">
-								<image class="header-img" src="http://file.supermm.me/miniProgram/images/personal/edit.png"></image>
+								<image class="header-img" src="../../static/toolimg/myedit.png"></image>
 							</navigator>
 							<view class="pr tr m-flex">
 								<view class="tip msg" v-if="true"></view>
 								<navigator hoverClass="none">
-									<image class="header-img" src="http://file.supermm.me/miniProgram/images/personal/info.png"></image>
+									<image class="header-img" src="../../static/toolimg/myinfo.png"></image>
 								</navigator>
 							</view>
 						</view>
 						<view class="pr m-xcenter plr20 header-box" style="padding: 40rpx 40rpx;background-color: #fff;border-radius: 16rpx;">
 							<navigator class="m-flex tl f14 m-ycenter dpb" hoverClass="none">
-								<view class="m-gray-big f20 fb pr10">0</view>
-								<view class="m-gray-letter mt5 f12">代币(个)</view>
+								<view class="m-gray-big f20 fb pr10">{{info.balance}}</view>
+								<view class="m-gray-letter mt5 f12">余额(元)</view>
 							</navigator>
 							<view bindtap="" class="m-flex tl f14 m-ycenter">
 								<view class="m-gray-big f20 fb">0</view>
@@ -37,38 +36,34 @@
 			<view class="fb f18 plr20">我的订单</view>
 			<view class="margin-lr-sm m-dpflex m-justify-start m-align-center overflow bg-white margin-top-sm" style="padding-top: 40rpx;padding-bottom: 40rpx;border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
 				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-					<image style="width: 76rpx;height: 76rpx;" src="http://file.supermm.me/miniProgram/images/personal/menu_1.png"
-					 mode=""></image>
+					<image style="width: 76rpx;height: 76rpx;" src="../../static/img/myzixun.png" mode=""></image>
 					<view class="tip"></view>
 					<view class="f14 m-gray-small mt10 line1">我的咨询</view>
 				</navigator>
 				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-					<image style="width: 76rpx;height: 76rpx;" src="http://file.supermm.me/miniProgram/images/personal/menu_2.png"
-					 mode=""></image>
+					<image style="width: 76rpx;height: 76rpx;" src="../../static/img/myyuyue.png" mode=""></image>
 					<view class="tip"></view>
 					<view class="f14 m-gray-small mt10 line1">我的预约</view>
 				</navigator>
 				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-					<image style="width: 76rpx;height: 76rpx;" src="http://file.supermm.me/miniProgram/images/personal/menu_3.png"
-					 mode=""></image>
+					<image style="width: 76rpx;height: 76rpx;" src="../../static/img/myyijian.png" mode=""></image>
 					<view class="tip"></view>
 					<view class="f14 m-gray-small mt10 line1">我的意见单</view>
 				</navigator>
 				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-					<image style="width: 76rpx;height: 76rpx;" src="http://file.supermm.me/miniProgram/images/personal/menu_4.png"
-					 mode=""></image>
+					<image style="width: 76rpx;height: 76rpx;" src="../../static/img/myservice.png" mode=""></image>
 					<view class="tip"></view>
 					<view class="f14 m-gray-small mt10 line1">服务包订单</view>
 				</navigator>
 			</view>
-			<navigator class="pr m-xcenter plr20 pt20" hoverClass="none">
+			<navigator class="pr m-xcenter plr20 pt20" hoverClass="none" url="../archives/my_archives">
 				<view class="fb f18 pr m-flex tl">健康档案</view>
 				<view class="pr m-gray-small">档案列表</view>
 				<label class="m-gray-letter iconfont icon-arrow-right f18 dpb"></label>
 			</navigator>
-			<view class="mt20 pr pb40" style="margin-left: 20rpx;margin-right: 20rpx;">
+			<view class="mt20 pr pb40" style="margin-left: 20rpx;margin-right: 20rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
 				<swiper duration="500" @change="swiperChange" :current="itemcurrent" interval="5000" style="height:380rpx;" class="swiper-box">
-					<swiper-item class="swiper-wrapper" style="" v-for="(item,index) in 4" :key="index">
+					<swiper-item class="" style="box-sizing: border-box;" v-for="(item,index) in 4" :key="index">
 						<view class="bg-white" style="border-radius: 16rpx;height: 100%;">
 							<navigator class="m-ycenter pt40" hoverClass="none" url="" v-if="false">
 								<view class="bdr30 m-theme br-theme tc plr20 pt8 pb8 f14 width40">新增健康档案</view>
@@ -103,30 +98,34 @@
 			<view class="bg-white margin-lr-sm margin-top-sm" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
 				<view class="plr10 m-dpflex m-justify-start m-align-center overflow pt30 pb30">
 					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/images/personal/tool_1.png"></image>
+						<image style="width: 42rpx;height: 42rpx;" src="../../static/toolimg/mydoctor.png"></image>
 						<view class="f14 m-gray-small mt10 line1">家庭医生</view>
 					</navigator>
 					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/images/personal/tool_2.png"></image>
+						<image style="width: 42rpx;height: 42rpx;" src="../../static/toolimg/myguanzhu.png"></image>
 						<view class="f14 m-gray-small mt10 line1">我的关注</view>
 					</navigator>
 					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/personal/my-class/my_class.png"></image>
+						<image style="width: 42rpx;height: 42rpx;" src="../../static/toolimg/wenzhang.png"></image>
 						<view class="f14 m-gray-small mt10 line1">收藏文章</view>
 					</navigator>
 					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/personal/my-class/my_class.png"></image>
+						<image style="width: 42rpx;height: 42rpx;" src="../../static/toolimg/baodan.png"></image>
 						<view class="tip"></view>
 						<view class="f14 m-gray-small mt10 line1">我的保单</view>
 					</navigator>
 				</view>
 				<view class="plr10 m-dpflex m-justify-start m-align-center overflow pb30">
 					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
-						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/images/personal/tool_5.png"></image>
+						<image style="width: 42rpx;height: 42rpx;" src="../../static/toolimg/pinjia.png"></image>
+						<view class="f14 m-gray-small mt10 line1">我的评价</view>
+					</navigator>
+					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
+						<image style="width: 42rpx;height: 42rpx;" src="../../static/toolimg/myhple.png"></image>
 						<view class="f14 m-gray-small mt10 line1">帮助反馈</view>
 					</navigator>
 					<view bindtap="" class="width25 m-ycenter overflow pr">
-						<image style="width: 42rpx;height: 42rpx;" src="https://file.supermm.me/h5/wechat-h5/personal/kf.png"></image>
+						<image style="width: 42rpx;height: 42rpx;" src="../../static/toolimg/kefu.png"></image>
 						<view class="f14 m-gray-small mt10 line1">客服咨询</view>
 					</view>
 				</view>
@@ -147,7 +146,8 @@
 		},
 		data() {
 			return {
-				itemcurrent: 0
+				itemcurrent: 0,
+				info: {}
 			}
 		},
 		methods: {
@@ -156,7 +156,9 @@
 			},
 			getUserInfo: async function() {
 				let res = await this.$request.post('/api/v1/user/userInfo')
-				console.log(res)
+				if (res.status == 0) {
+					this.info = res.data
+				}
 			}
 		}
 	};

+ 43 - 31
pages/login/login.vue

xqd xqd xqd
@@ -67,13 +67,10 @@
 				showAgree: true, //协议是否选择
 				isRotate: false, //是否加载旋转
 				istrue: false,
-				imgarr: [
-					"../../static/img/xieyi.png",
-					"../../static/img/xieyi.png"
-				],
+				num: 1,
 				imgitem: {
 					istrue: false,
-					name: ""
+					name: "../../static/img/xieyi.png"
 				}
 			}
 		},
@@ -159,36 +156,43 @@
 				}, 3000)
 			},
 			wxLogin: async function(e) {
-				_this.istrue = true
-				if (e.detail.errMsg == "getUserInfo:fail auth deny") {
-					uni.showToast({
-						title: '微信登录失败',
-						icon: "none"
-					});
-					return;
-				}
-				user.loginByWeixin(e.detail.userInfo)
-					.then(res => {
-						if (res.status == 0) {
-							uni.showToast({
-								title: "登录成功",
-								icon: "none",
-								duration: 2000
-							})
-						}
-						setTimeout(function() {
-							_this.istrue = false
-							uni.navigateBack({
-								delta: 1
-							})
-						}, 2000)
-					})
-					.catch(res => {
+				if (this.imgitem.istrue) {
+					_this.istrue = true
+					if (e.detail.errMsg == "getUserInfo:fail auth deny") {
 						uni.showToast({
 							title: '微信登录失败',
 							icon: "none"
 						});
-					});
+						return;
+					}
+					user.loginByWeixin(e.detail.userInfo)
+						.then(res => {
+							if (res.status == 0) {
+								uni.showToast({
+									title: "登录成功",
+									icon: "none",
+									duration: 2000
+								})
+							}
+							setTimeout(function() {
+								_this.istrue = false
+								uni.navigateBack({
+									delta: 1
+								})
+							}, 2000)
+						})
+						.catch(res => {
+							uni.showToast({
+								title: '微信登录失败',
+								icon: "none"
+							});
+						});
+				}else{
+					uni.showToast({
+						title:"请先同意协议",
+						icon:"none"
+					})
+				}
 			},
 			toindex() {
 				uni.switchTab({
@@ -196,7 +200,15 @@
 				})
 			},
 			isqueren() {
+				this.num++
+				if (this.num % 2 == 0) {
+					this.imgitem.name = "../../static/img/xieyixuan.png"
+					this.imgitem.istrue = true
 
+				} else {
+					this.imgitem.name = "../../static/img/xieyi.png"
+					this.imgitem.istrue = false
+				}
 			}
 		}
 	}