yanjie 4 år sedan
förälder
incheckning
efc88f36b8

+ 1 - 1
common/env.js

xqd
@@ -1,3 +1,3 @@
 export const envHost = 'https://t5.9026.com'; //开发环境
-// export const imgHost='https://www.juyinzhengxin.com/';
+//export const imgHost='https://www.juyinzhengxin.com/';
 export const imgHost = 'https://t5.9026.com/upload/';

+ 1 - 1
pages/doctor_related/doctor_info.vue

xqd
@@ -69,7 +69,7 @@
 				<view v-else class="text-lg margin-top-sm" style="color: rgb(238, 170, 63);border-bottom: 3rpx solid rgb(238, 170, 63); width: 530rpx;"
 				 @click="xuantime">
 					已选时间:{{daytime||'该医生暂未排班'}}
-					<u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' range-key="start_time_period"
+					<u-picker mode="multiSelector" @confirm="callbacktime" v-model="show"  range-key="start_time_period"
 					 :range="multiSelector"></u-picker>
 				</view>
 			</view>

+ 1 - 0
pages/doctor_related/info_write.vue

xqd
@@ -185,6 +185,7 @@
 	import store from '@/store'
 	export default {
 		onLoad(options) {
+			console.log(options)
 			this.phoneList[0].num = uni.getStorageSync('phone')
 			this.phonenum = this.phoneList[0].num
 			this.doctor = JSON.parse(options.doctor)

+ 23 - 18
pages/index/book.vue

xqd xqd xqd xqd
@@ -6,7 +6,7 @@
 		<view class="tltleStyle">
 			推荐文章
 		</view>
-		<u-card :show-head="false" :show-foot="false" :border="false">
+		<u-card :show-head="false" :show-foot="false" margin="0" :border="false">
 			<view class="" slot="body" v-for="(item,index) in list" :key="index" @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 justify-between">
@@ -29,11 +29,12 @@
 	export default {
 		onLoad(options) {
 			this.imghost = this.$imgHost
-		},
-		onShow() {
 			this.pageindex = 1
 			this.list = []
 			this.getbook()
+		},
+		onShow() {
+			this.ismaxbook = true
 			this.getconfigLsit()
 		},
 		mounted() {
@@ -44,7 +45,8 @@
 				list: [],
 				configInfo: {},
 				pageindex: 1,
-				imghost: ""
+				imghost: "",
+				ismaxbook: true
 			}
 		},
 		onReachBottom() {
@@ -52,20 +54,23 @@
 		},
 		methods: {
 			getbook: async function() {
-				let res = await this.$request.post("/api/v1/article/articleList", {
-					page: this.pageindex
-				}, false)
-				console.log(res)
-				let status = user.islogin(res)
-				if (status) {
-					if (this.pageindex > res.data.last_page) {
-						uni.showToast({
-							title: "没有更多了",
-							icon: "none"
-						})
-					} else {
-						this.list = this.list.concat(res.data.data)
-						this.pageindex++
+				if (this.ismaxbook) {
+					let res = await this.$request.post("/api/v1/article/articleList", {
+						page: this.pageindex
+					}, false)
+					let status = user.islogin(res)
+					if (status) {
+						if (this.pageindex > res.data.last_page) {
+							uni.showToast({
+								title: "没有更多了",
+								icon: "none"
+							})
+							this.ismaxbook = false
+							return false
+						} else {
+							this.list = this.list.concat(res.data.data)
+							this.pageindex++
+						}
 					}
 				}
 			},

+ 10 - 2
pages/index/index.vue

xqd xqd xqd
@@ -67,7 +67,7 @@
 		</view>
 		<view class="cu-card case" style="margin-top: 20rpx;background-color: transparent;border-radius: 16rpx;position: relative;">
 			<swiper @change="swiperChange" :indicator-dots="false" style="height: 426rpx;border-radius:16rpx;background-color: transparent;"
-				:autoplay="true" :interval="3000" :duration="1000" :current="itemcurrent">
+			 :autoplay="true" :interval="3000" :duration="1000" :current="itemcurrent">
 				<swiper-item style="background-color: transparent;" v-for="(item,index) in configInfo.banners" :key="index">
 					<view class="cu-item shadow" style="margin: 0;background-color: transparent;height: 100%;">
 						<view class="image">
@@ -243,6 +243,14 @@
 		onReachBottom() {
 			this.getDoctorList()
 		},
+		onShareAppMessage() {
+			return {
+				title: "熙宝健康",
+				success: res => {
+					console.log(res)
+				}
+			}
+		},
 		methods: {
 			swiperChange(e) {
 				this.itemcurrent = e.detail.current
@@ -307,7 +315,7 @@
 				if (status) {
 					// this.doctorList = res.data.data
 					if (this.pageindex > res.data.last_page) {
-						
+
 					} else {
 						this.doctorList = this.doctorList.concat(res.data.data)
 						this.pageindex++

+ 42 - 3
pages/index/message.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -1,8 +1,8 @@
 <template>
 	<view class="main">
 		<view class="padding-lr">
-			<view v-for="(item,index) in messageList" @click="gotoliaotian(item)" :key="index" class="padding-lr-sm padding-tb-sm bg-white margin-top-sm"
-			 style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
+			<view v-for="(item,index) in messageList" @click="gotoliaotian(item)" :key="index" class="padding-lr-sm padding-tb-sm bg-white margin-top-sm fade-in"
+			 :style="'border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);'+'opacity:'+opacity+';'+'transform: scale('+scale+');'">
 				<view class="flex justify-start align-center">
 					<u-icon name="order"></u-icon>
 					<text class="text-lg margin-left-xs">{{
@@ -33,6 +33,8 @@
 
 		},
 		onShow() {
+			this.pageindex = 1
+			this.messageList = []
 			this.getMessage()
 			// if (getApp().globalData.imService == null) {
 			// 	let user = uni.getStorageSync('user')
@@ -64,7 +66,9 @@
 			});
 		},
 		mounted() {
-
+			setTimeout(() => {
+				this.handleScroll()
+			}, 800)
 		},
 		data() {
 			return {
@@ -76,12 +80,27 @@
 					conversations: []
 				},
 				imService: null,
+				opacity: 0,
+				scale: 0.8
 			}
 		},
 		onReachBottom() {
 			this.getMessage()
 		},
 		methods: {
+			getNodes(item) {
+				return (item.top + 200) < uni.getSystemInfoSync().windowHeight && item.bottom >= 0
+			},
+			handleScroll() {
+				let query = uni.createSelectorQuery().selectAll('.fade-in').boundingClientRect((res) => {
+					res.forEach(item => {
+						if (this.getNodes(item)) {
+							this.opacity = 1
+							this.scale = 1
+						}
+					})
+				}).exec()
+			},
 			getMessage: async function() {
 				let res = await this.$request.post("/api/v1/user/userMessageList", {
 					page: this.pageindex
@@ -116,6 +135,8 @@
 				})
 			},
 			gotoliaotian(item) {
+				// this.getNodes()
+				console.log(item)
 				if (item.type == 1 || item.type == 4) {
 					uni.navigateTo({
 						url: "../common_tools/my_consulting/consultingInfo?id=" + item.relation_id
@@ -128,6 +149,19 @@
 					uni.navigateTo({
 						url: "../service_box/box_details"
 					})
+				} else if (item.type == 99) {
+					this.$request.post("/api/v1/docter/docterDetail", {
+						docter_id: item.docter_id
+					}).then(res => {
+						let obj = {
+							id: res.id,
+							name: res.name,
+							avatar: res.avatar
+						}
+						uni.navigateTo({
+							url: "../common_tools/my_consulting/conversation?doctor=" + JSON.stringify(obj) + "&doctorstatus=" + 3
+						})
+					})
 				}
 			}
 		}
@@ -136,4 +170,9 @@
 
 <style scoped lang="scss">
 	.main {}
+
+	.fade-in {
+		transition: 0.3s all ease-out;
+		box-sizing: border-box;
+	}
 </style>

+ 9 - 9
pages/order/order.vue

xqd
@@ -74,16 +74,16 @@
 				})
 			},
 			gotoservice() {
-				uni.requestSubscribeMessage({
-					tmplIds: ['3F_-_C-y0g8cdKhhf-3vR7eid_4cbTd9h6QKVW4EG3Q'],
-					success: (res) => {
-						console.log(res)
-						uni.navigateTo({
-							url: "../service_box/box_details"
-						})
-					}
+				// uni.requestSubscribeMessage({
+				// 	tmplIds: ['3F_-_C-y0g8cdKhhf-3vR7eid_4cbTd9h6QKVW4EG3Q'],
+				// 	success: (res) => {
+				// 		console.log(res)
+
+				// 	}
+				// })
+				uni.redirectTo({
+					url: "../service_box/box_details"
 				})
-
 			}
 		},
 		onShow() {