Browse Source

修复若干bug

yanjie 4 years ago
parent
commit
b2ef167d53

+ 23 - 20
pages/doctor_related/doctor_info.vue

xqd xqd
@@ -73,21 +73,24 @@
 					 :range="multiSelector"></u-picker> -->
 				</view>
 			</view>
-			<view v-if="isjigou" @click="goAdrPostion" class="pr pt10 pb10 margin-lr-sm margin-top-sm m-bg-white" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
-				<view class="pr pt15 pb15">
-					<view class="f18 fb plr15">机构地址</view>
-					<view class="pr m-xcenter plr15 mt15">
-						<image class="dpb" mode="scaleToFill" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAABx0lEQVQoU2WSP2gTcRTHv+/dH4IdmkVcFAvSgihNLi1SRKE4uNhek4I6iNLY5AQnB93dpHNBMEltIbgUc5pUF0F0cDBIk2twKiJBBAWHVgOl5u5+TxrINeCbvnz5Pnh8vo8wMBPOE8NXx6YIcpKJfu74Ox/aa9n9foT6IrFYtVjjMkHOHO7TV6Ww6JVm3x94vXBy4fkombGPUMEwEW+oMPRY44QAs0TcDfzwUms1Xe+FrXztJURsIdz0inPPkgsv4t5aZjd5u3qDGGUiqjeK9nmauLo+rOLmDyJuNQr2VMrZWBJR90DacrMwc9/K1+qAmvQDjNB4rnJcg/aN2Kg2ClcyqTuvP0nYnWQ2vM3CjGU5tQpE5gPfP03T0+/036OdLwBinT19bCjmn2JCPoBa6SreHtJpWwTdzvf2WO/mRM7NaqQ/BeFN92949/Oe3z57xBgxTe0xgMuhCm9trWTKfXSUcmquKJUGUQBgF0AcIroQvfKKtg2QRJyt7PpRMmKbosITEWfW2vD3zzVXr/2KOEfFOO4FFu0tRJnE+h8odbFRmmv912DfSObcB8zGI5HgerOYqQy+Q3TGofmQE7nx9FZp3h0MHuh/o0mz0Kcr4U0AAAAASUVORK5CYII="
-						 style="width: 10px; height: 12px;"></image>
-						<view class="m-flex tl ml5">{{hospital||'无'}}</view>
-					</view>
-					<view class="pr m-xcenter plr15 mt10">
-						<view class="m-flex tl m-gray-small f12 pl15 mr5">地址:{{address||'无'}}</view>
-						<view class="pt2 pb2 plr10 f12 m-gray-small br-gray-letter bdr30" v-if="distance!='0'">
-							{{distance||'暂无距离'}}km
+			<view class="" v-if="isjigou">
+				<view @click="goAdrPostion(itm)" v-for="(itm,idx) in doctor.organization" :key="idx" class="pr pt10 pb10 margin-lr-sm margin-top-sm m-bg-white"
+				 style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
+					<view class="pr">
+						<view class="f18 fb plr15">机构地址</view>
+						<view class="pr m-xcenter plr15 mt15">
+							<image class="dpb" mode="scaleToFill" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAABx0lEQVQoU2WSP2gTcRTHv+/dH4IdmkVcFAvSgihNLi1SRKE4uNhek4I6iNLY5AQnB93dpHNBMEltIbgUc5pUF0F0cDBIk2twKiJBBAWHVgOl5u5+TxrINeCbvnz5Pnh8vo8wMBPOE8NXx6YIcpKJfu74Ox/aa9n9foT6IrFYtVjjMkHOHO7TV6Ww6JVm3x94vXBy4fkombGPUMEwEW+oMPRY44QAs0TcDfzwUms1Xe+FrXztJURsIdz0inPPkgsv4t5aZjd5u3qDGGUiqjeK9nmauLo+rOLmDyJuNQr2VMrZWBJR90DacrMwc9/K1+qAmvQDjNB4rnJcg/aN2Kg2ClcyqTuvP0nYnWQ2vM3CjGU5tQpE5gPfP03T0+/036OdLwBinT19bCjmn2JCPoBa6SreHtJpWwTdzvf2WO/mRM7NaqQ/BeFN92949/Oe3z57xBgxTe0xgMuhCm9trWTKfXSUcmquKJUGUQBgF0AcIroQvfKKtg2QRJyt7PpRMmKbosITEWfW2vD3zzVXr/2KOEfFOO4FFu0tRJnE+h8odbFRmmv912DfSObcB8zGI5HgerOYqQy+Q3TGofmQE7nx9FZp3h0MHuh/o0mz0Kcr4U0AAAAASUVORK5CYII="
+							 style="width: 10px; height: 12px;"></image>
+							<view class="m-flex tl ml5">{{itm.name||'无'}}</view>
+						</view>
+						<view class="pr m-xcenter plr15 mt10">
+							<view class="m-flex tl m-gray-small f12 pl15 mr5">地址:{{itm.address||'无'}}</view>
+							<view class="pt2 pb2 plr10 f12 m-gray-small br-gray-letter bdr30" v-if="itm.distance!='0'">
+								{{itm.distance/1000||'暂无距离'}}km
+							</view>
+							<view class="pt2 pb2 plr10 f12 m-gray-small br-gray-letter bdr30" wx:else>暂无距离</view>
+							<text class="dpb iconfont icon-arrow-right m-gray-letter f20"></text>
 						</view>
-						<view class="pt2 pb2 plr10 f12 m-gray-small br-gray-letter bdr30" wx:else>暂无距离</view>
-						<text class="dpb iconfont icon-arrow-right m-gray-letter f20"></text>
 					</view>
 				</view>
 			</view>
@@ -347,16 +350,16 @@
 							item.year = nian[0].date
 						})
 						this.$refs.date.rightday = arr
-						
+						console.log(this.multiSelector)
 					}
 				}
 			},
-			goAdrPostion() {
+			goAdrPostion(itm) {
 				uni.openLocation({
-					latitude: Number(this.location.latitude),
-					longitude: Number(this.location.longitude),
-					name: this.location.name,
-					address: this.location.address,
+					latitude: Number(itm.latitude),
+					longitude: Number(itm.longitude),
+					name: itm.name,
+					address: itm.address,
 					success: (res) => {
 						console.log(res)
 					},

+ 9 - 2
pages/index/mine.vue

xqd
@@ -199,15 +199,22 @@
 					conversations: []
 				},
 				imService: null,
-				mseeage:""
+				mseeage: ""
 			}
 		},
 		methods: {
-			setUnreadAmount(){
+			setUnreadAmount() {
 				if (this.conversations.unreadTotal > 0) {
 					this.mseeage = this.conversations.unreadTotal.toString()
+					uni.setTabBarBadge({
+						index: 2,
+						text: this.conversations.unreadTotal.toString()
+					})
 				} else {
 					this.mseeage = ""
+					uni.hideTabBarRedDot({
+						index: 2
+					})
 				}
 			},
 			customer() {

+ 0 - 7
pages/order/order.vue

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

+ 31 - 3
pages/order/payment.vue

xqd xqd
@@ -359,6 +359,13 @@
 				}
 			},
 			confirmpay() {
+				if(this.paytype == 3&&this.serviceid==""){
+					uni.showToast({
+						title:"请选择服务包",
+						icon:"none"
+					})
+					return false
+				}
 				if (this.info.balance < this.infodata.total_amount * 100) {
 					uni.showModal({
 						title: "错误提示",
@@ -372,9 +379,30 @@
 							}
 						}
 					})
-				} else {
-					this.popupShow = true
-					this.show = true
+				} else if (this.infodata.product_type == 1 || this.infodata.product_type == 2) {
+					uni.requestSubscribeMessage({
+						tmplIds: ['M9b6PPKtD7PEqLsSnQ453iTIHtIZZpixOBjUjax8YXU', 'WCkfvW9NkV_oQgLsJJuwoVMF-G0ss9y4SkIgCObZwWA'],
+						success: (res) => {
+							this.popupShow = true
+							this.show = true
+						},
+						fail: (err) => {
+							this.popupShow = true
+							this.show = true
+						}
+					})
+				} else if (this.infodata.product_type == 3 || this.infodata.product_type == 4 || this.infodata.product_type == 5) {
+					uni.requestSubscribeMessage({
+						tmplIds: ['Sg0lKmOexTnxxDzy39E26aNvmc3w4qKUnxl21A9dWns'],
+						success: (res) => {
+							this.popupShow = true
+							this.show = true
+						},
+						fail: (err) => {
+							this.popupShow = true
+							this.show = true
+						}
+					})
 				}
 			},
 			getUserInfo: async function() {

+ 4 - 1
pages/personal/coupon/coupon_details.vue

xqd
@@ -21,9 +21,12 @@
 			<view class="title">
 				有效期
 			</view>
-			<view class="">
+			<view class="" v-if="datainfo.expire_type == 2">
 				{{formatDate(datainfo.start_time*1000)}} - {{formatDate(datainfo.end_time*1000)}}
 			</view>
+			<view class="" v-else>
+				有效期:{{formatDate(datainfo.expire_time*1000)}}
+			</view>
 			<view class="title">
 				使用规则
 			</view>

+ 3 - 3
pages/personal/personal_information.vue

xqd xqd xqd
@@ -6,7 +6,7 @@
 		<view class="pr" style="z-index:2">
 			<view class="plr15">
 				<view class="bdr4 bg-white" style="margin-top: 38rpx;">
-					<view class="m-dpflex flex-direction align-center justify-center" style="height: 210rpx;">
+					<view class="m-dpflex flex-direction align-center justify-center header-box" style="height: 350rpx;">
 						<view class="text-bold text-black" style="font-size: 68rpx;">
 							{{info.balance/100||'0'}}
 						</view>
@@ -14,7 +14,7 @@
 							账户余额(元)
 						</view>
 					</view>
-					<view class="pr m-xcenter plr20 header-box" style="padding: 40rpx 40rpx;background-color: #fff;border-radius: 16rpx;">
+					<!-- <view class="pr m-xcenter plr20 header-box" style="padding: 40rpx 40rpx;background-color: #fff;border-radius: 16rpx;">
 						<view class="m-flex tl f14 m-ycenter dpb">
 							<view class="m-gray-big f20 fb pr10">{{info.topup_balance/100||'0'}}</view>
 							<view class="m-gray-letter mt5 f12">充值金额(元)</view>
@@ -23,7 +23,7 @@
 							<view class="m-gray-big f20 fb">{{info.giving_balance/100||'0'}}</view>
 							<view class="m-gray-letter mt5 f12">赠送金额(元)</view>
 						</view>
-					</view>
+					</view> -->
 				</view>
 			</view>
 		</view>

+ 2 - 1
pages/service_packs/packs_details.vue

xqd
@@ -171,7 +171,8 @@
 				} else {
 					let obj = {
 						id: this.packs.id,
-						price: this.packs.price
+						price: this.packs.price,
+						is_need_insure:this.packs.is_need_insure
 					}
 					uni.navigateTo({
 						url: '/pages/service_packs/packs_information?data=' + JSON.stringify(obj)

+ 3 - 3
pages/service_packs/packs_information.vue

xqd xqd
@@ -135,10 +135,10 @@
 					</uni-list>
 				</view>
 			</view>
-			<view class="flex align-center padding bg-white">
+			<view class="flex align-center padding bg-white" v-if="packs.is_need_insure==1">
 				<u-switch v-model="checked" size="40"></u-switch>
 				<view class="margin-left-sm">
-					本服务包赠送一份保险服务,是否领取保险。如领取保险需要同意<text class="text-blue">《保单协议》</text>和<text class="text-blue">《保单条款》</text>
+					本服务包赠送一份保险服务,是否领取保险。如领取保险需要同意<text class="text-blue">《保单协议》</text>
 				</view>
 			</view>
 		</view>
@@ -342,7 +342,7 @@
 			},
 			//下一步
 			next(e) {
-				if (this.currentbaby.card_number == '') {
+				if (this.currentbaby.card_number == '' && this.checked) {
 					uni.showModal({
 						title: "提示",
 						content: "该宝贝尚未填写身份证,请前往填写",