添加设置密保、密保改密、版本提示 更新版本v2.2.0 版本号android 10 ios 11
diff --git a/pages/sub_medical/appointment.vue b/pages/sub_medical/appointment.vue
index cf7fd6a..a80132d 100644
--- a/pages/sub_medical/appointment.vue
+++ b/pages/sub_medical/appointment.vue
@@ -104,7 +104,7 @@
 						// #endif
 					},
 					fail(ret){
-						that.local = '获取位置失败'
+						that.local = '重新获取位置...'
 						console.log(ret)
 					}
 				})
diff --git a/pages/sub_medical/cashFlow.vue b/pages/sub_medical/cashFlow.vue
index 6f5091b..c1030de 100644
--- a/pages/sub_medical/cashFlow.vue
+++ b/pages/sub_medical/cashFlow.vue
@@ -9,7 +9,7 @@
 		<view v-if="leftOright">
 			<scroll-view scroll-y :enable-back-to-top="true" @scrolltolower="" class="scrollView">
 				<view class="cashFlow-ul">
-					<view class="cashFlow-ul-item" v-for = '(v,i) in unpay_list' :key='i' @click="toPath('/pages/sub_medical/pay?msg=' + JSON.stringify(v)+'&id=unpay')">
+					<view class="cashFlow-ul-item" v-for='(v,i) in unpay_list' :key='i' @click="toPath('/pages/sub_medical/pay?msg=' + JSON.stringify(v)+'&id=unpay')">
 						<view class="cashFlow-ul-item-left">
 							<view class="cashFlow-ul-item-left-top">
 								<u-image src="./images/pay.png" width="80" height="80"></u-image>
@@ -33,7 +33,7 @@
 		<view v-if="!leftOright">
 			<scroll-view scroll-y :enable-back-to-top="true" @scrolltolower="" class="scrollView">
 				<view class="cashFlow-ul">
-					<view class="cashFlow-ul-item" v-for = '(v,i) in payed_list' :key='i' @click="toPath('/pages/sub_medical/pay?msg=' + JSON.stringify(v) +'&id=payed')">
+					<view class="cashFlow-ul-item" v-for='(v,i) in payed_list' :key='i' @click="toPath('/pages/sub_medical/pay?msg=' + JSON.stringify(v) +'&id=payed')">
 						<view class="cashFlow-ul-item-left">
 							<view class="cashFlow-ul-item-left-top">
 								<u-image src="./images/pay.png" width="80" height="80"></u-image>
@@ -47,7 +47,7 @@
 						<view class="cashFlow-ul-item-right">
 							<text>¥{{v.mergingsubtotal}}</text>
 						</view>
-						<view class="cashFlow-ul-item-status" v-if="!v.notifyStatus">通知医院</view>
+						<view class="cashFlow-ul-item-nstatus" v-if="!v.notifyStatus">通知医院</view>
 					</view>
 				</view>
 			</scroll-view>
@@ -60,64 +60,72 @@
 		data() {
 			return {
 				leftOright: true,
-				unpay_list:[],
-				hospitalcode:'',
-				payed_list:[]
+				unpay_list: [],
+				hospitalcode: '',
+				payed_list: []
 			}
 		},
-		onLoad(options){
+		onLoad(options) {
 			let hospitalcode = options.hospitalcode
 			this.hospitalcode = hospitalcode
 			// this.get_unpay_list(hospitalcode)
 		},
 		methods: {
-			get_unpay_list(code){
+			get_unpay_list(code) {
 				let that = this
 				let param = {
-					hospitalcode : code
+					hospitalcode: code
 				}
-				that.$u.post('/medicalapi/unpayed/list',param).then(res=>{
+				that.$u.post('/medicalapi/unpayed/list', param).then(res => {
 					that.unpay_list = res.data
 				})
 			},
-			get_payed_list(code){
+			get_payed_list(code) {
 				let that = this
 				let param = {
-					hospitalcode : code,
-					pageno:1,
-					pagesize:100
+					hospitalcode: code,
+					pageno: 1,
+					pagesize: 100
 				}
-				that.$u.post('/medicalapi/payed/list',param).then(res=>{
+				that.$u.post('/medicalapi/payed/list', param).then(res => {
 					let list = res.data
-					list.forEach(item=>{
+					list.forEach(item => {
 						item.paytime = item.transdate.substr(0, 4) +
-							"-" + item.transdate.substr(4, 2) + "-" + item.transdate.substr(6, 2) + " " + item.transtime.substr(0, 2) + ":" +
-							item.transtime.substr(2, 2) + ":" + item.transtime.substr(4, 2) 
+							"-" + item.transdate.substr(4, 2) + "-" + item.transdate.substr(6, 2) + " " + item.transtime.substr(0, 2) +
+							":" +
+							item.transtime.substr(2, 2) + ":" + item.transtime.substr(4, 2)
 					})
 					that.payed_list = list
 				})
 			},
 			changeTurnoverList(e) {
 				this.leftOright = e
-				if(e){
+				if (e) {
 					this.get_unpay_list(this.hospitalcode)
-				}else{
+				} else {
 					this.get_payed_list(this.hospitalcode)
 				}
 			},
 		},
-		onShow(){
-			this.get_unpay_list(this.hospitalcode)
+		onShow() {
+			let e = this.leftOright
+			if (e) {
+				this.get_unpay_list(this.hospitalcode)
+			} else {
+				this.get_payed_list(this.hospitalcode)
+			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.scrollView{
+	.scrollView {
 		height: calc(100vh - 130rpx - 100rpx);
 	}
+
 	.cashFlow {
 		font-family: "PingFang-SC-Medium";
+
 		&-header {
 			width: 80%;
 			display: flex;
@@ -135,18 +143,19 @@
 				border-top: 2rpx solid #F1F1F1;
 				border-bottom: 2rpx solid #F1F1F1;
 			}
+
 			.left {
 				border-top-left-radius: 50rpx;
 				border-bottom-left-radius: 50rpx;
 				border-left: 2rpx solid #F1F1F1;
 			}
-			
+
 			.right {
 				border-top-right-radius: 50rpx;
 				border-bottom-right-radius: 50rpx;
 				border-right: 2rpx solid #F1F1F1;
 			}
-			
+
 			.color {
 				background-color: #3599fb;
 				color: #ffffff;
@@ -154,9 +163,11 @@
 				border: 2rpx solid transparent;
 			}
 		}
-		&-ul{
+
+		&-ul {
 			padding: 0 20rpx;
-			&-item{
+
+			&-item {
 				background-color: #FFFFFF;
 				display: flex;
 				justify-content: space-between;
@@ -165,22 +176,34 @@
 				border-radius: 10rpx;
 				margin-bottom: 30rpx;
 				position: relative;
-				&-status{
+
+				&-status {
 					position: absolute;
 					bottom: 20rpx;
 					right: 20rpx;
 					font-size: 26rpx;
 					color: #18B566;
 				}
-				&-left{
-					display:  flex;
+				
+				&-nstatus{
+					position: absolute;
+					bottom: 20rpx;
+					right: 20rpx;
+					font-size: 26rpx;
+					color: #FF6F6F;
+				}
+
+				&-left {
+					display: flex;
 					flex-direction: column;
 					justify-content: space-between;
 					width: 75%;
-					&-top{
+
+					&-top {
 						display: flex;
 						align-items: center;
-						text{
+
+						text {
 							overflow: hidden;
 							text-overflow: ellipsis;
 							white-space: nowrap;
@@ -189,24 +212,28 @@
 							font-weight: bold;
 						}
 					}
-					&-bottom{
+
+					&-bottom {
 						margin-top: 20rpx;
-						&-bold{
+
+						&-bold {
 							font-size: 32rpx;
 							font-weight: bold;
 						}
-						&-normal{
+
+						&-normal {
 							color: #a1a1a1;
 						}
 					}
 				}
-				&-right{
+
+				&-right {
 					font-size: 40rpx;
 					color: #FF6F6F;
 					font-weight: bold;
 				}
 			}
 		}
-		
+
 	}
 </style>
diff --git a/pages/sub_medical/pay.vue b/pages/sub_medical/pay.vue
index c763a23..5c9ebe5 100644
--- a/pages/sub_medical/pay.vue
+++ b/pages/sub_medical/pay.vue
@@ -11,10 +11,12 @@
 			<u-cell-item title="订单号" :arrow="false" :value="msg.billNo"></u-cell-item>
 			<u-cell-item title="就诊日期" :arrow="false" :value="msg.date"></u-cell-item>
 			<!-- <u-cell-item title="截止日期"  :arrow="false" value="2020/10/28 23:29:29"></u-cell-item> -->
-			<u-cell-item title="交易状态" :arrow="false" :value="msg.status_ok" :value-style="msg.status=='wip'?status_style:vstyle"></u-cell-item>
+			<u-cell-item title="交易状态" :arrow="false" :value="msg.status_ok" :value-style="msg.status=='wip'|| msg.status==undefined?status_style:vstyle"></u-cell-item>
+			<u-cell-item title="退款状态" :arrow="false" :value="msg.refundflag_ok" :value-style="msg.refundflag=='refund'?status_style:vstyle"
+			 v-if="msg.refundflag == 'wip' || msg.refundflag == 'refund'"></u-cell-item>
 		</u-cell-group>
 		<u-button @click="msg.status=='wip'?query():open()" :custom-style="payBtn" v-if="kind =='unpay'">{{msg.status=='wip'?'查询订单状态':'立即支付'}}</u-button>
-		<u-button @click="" :custom-style="payBtn" v-if="kind =='payed'&& msg.notifyStatus == false">通知医院</u-button>
+		<u-button @click="notify_hosiptal" :custom-style="payBtn" v-if="kind =='payed'&& msg.notifyStatus == false">通知医院</u-button>
 		<!-- 支付密码弹框 -->
 		<uni-popup ref="showPassword" class="pwd-wrapper">
 			<view class="uni-tip uni-pwd">
@@ -49,11 +51,11 @@
 				},
 				vstyle: {
 					color: '#FF6F6F',
-					fontSize:'30rpx'
+					fontSize: '30rpx'
 				},
 				status_style: {
 					color: '#18B566',
-					fontSize:'30rpx'
+					fontSize: '30rpx'
 				},
 				payBtn: {
 					backgroundColor: ' #2FA8E1',
@@ -65,7 +67,7 @@
 					marginTop: '50rpx'
 				},
 				msg: {},
-				kind:''
+				kind: ''
 			}
 		},
 		methods: {
@@ -123,12 +125,12 @@
 					let obj = that.msg
 					let date = res.transdate.substr(0, 4) +
 						"-" + res.transdate.substr(4, 2) + "-" + res.transdate.substr(6, 2) + " " + res.transtime.substr(0, 2) + ":" +
-						res.transtime.substr(2, 2) + ":" + res.transtime.substr(4, 2) 
-						setTimeout(()=>{
-							uni.navigateTo({
-								url: `/pages/sub_medical/payResult?status=${status}&msg=${JSON.stringify(obj)}&date=${date}`
-							})
-						},1500)
+						res.transtime.substr(2, 2) + ":" + res.transtime.substr(4, 2)
+					setTimeout(() => {
+						uni.navigateTo({
+							url: `/pages/sub_medical/payResult?status=${status}&msg=${JSON.stringify(obj)}&date=${date}`
+						})
+					}, 1500)
 				})
 			},
 			query() {
@@ -136,31 +138,49 @@
 				let billno = that.msg.billNo
 				that.$u.post('/medicalapi/pay/query/' + billno, {}).then(res => {
 					let status = res.status
-					if(status == 'wip'){
+					if (status == 'wip') {
 						uni.showToast({
-							icon:'none',
-							title:'订单正在支付中,请稍等...'
+							icon: 'none',
+							title: '订单正在支付中,请稍等...'
 						})
-					}else{
+					} else {
 						let status = res.status
 						let obj = that.msg
 						let date = res.transdate.substr(0, 4) +
 							"-" + res.transdate.substr(4, 2) + "-" + res.transdate.substr(6, 2) + " " + res.transtime.substr(0, 2) + ":" +
-							res.transtime.substr(2, 2) + ":" + res.transtime.substr(4, 2) 
-							setTimeout(()=>{
-								uni.navigateTo({
-									url: `/pages/sub_medical/payResult?status=${status}&msg=${JSON.stringify(obj)}&date=${date}`
-								})
-							},1500)
+							res.transtime.substr(2, 2) + ":" + res.transtime.substr(4, 2)
+						setTimeout(() => {
+							uni.navigateTo({
+								url: `/pages/sub_medical/payResult?status=${status}&msg=${JSON.stringify(obj)}&date=${date}`
+							})
+						}, 1500)
 					}
 				})
+			},
+			notify_hosiptal() {
+				let that = this
+				let billno = that.msg.billno
+				that.$u.post('/medicalapi/pay/notify/' + billno).then(res => {
+					uni.showToast({
+						title: res.msg,
+						icon: 'none',
+						duration:800,
+						success(ret) {
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 1
+								})
+							}, 1500)
+						}
+					})
+				})
 			}
 		},
 		onLoad(options) {
 			let msg = JSON.parse(options.msg)
 			let id = options.id
 			this.kind = id
-			if(id == 'unpay'){
+			if (id == 'unpay') {
 				msg.date = msg.medicalDate.substr(0, 4) + '-' + msg.medicalDate.substr(4, 2) + '-' + msg.medicalDate.substr(6, 2) +
 					' ' + msg.medicalDate.substr(8, 2) + ':' + msg.medicalDate.substr(10, 2) + ':' + msg.medicalDate.substr(12, 2)
 				switch (msg.status) {
@@ -172,14 +192,20 @@
 						break
 				}
 				this.msg = msg
-			}else if(id == 'payed'){
+			} else if (id == 'payed') {
 				msg.date = msg.medicaldate.substr(0, 4) + '-' + msg.medicaldate.substr(4, 2) + '-' + msg.medicaldate.substr(6, 2) +
 					' ' + msg.medicaldate.substr(8, 2) + ':' + msg.medicaldate.substr(10, 2) + ':' + msg.medicaldate.substr(12, 2)
-					msg.billNo = msg.billno
-					msg.mergingSubtotal = msg.mergingsubtotal
-					msg.mergingName = msg.mergingname
-					msg.status_ok = '已完成'
-					msg.hospitalName = msg.hospitalname
+				msg.billNo = msg.billno
+				msg.mergingSubtotal = msg.mergingsubtotal
+				msg.mergingName = msg.mergingname
+				msg.status_ok = '已完成'
+				switch (msg.refundflag) {
+					case 'wip':
+						msg.refundflag_ok = '退款处理中...';
+						break
+					case 'refund':
+						msg.refundflag_ok = '已退款';
+				}
 				this.msg = msg
 			}
 		}
diff --git a/pages/sub_medical/payResult.vue b/pages/sub_medical/payResult.vue
index e36fd54..08d8185 100644
--- a/pages/sub_medical/payResult.vue
+++ b/pages/sub_medical/payResult.vue
@@ -8,7 +8,11 @@
 			<icon type="warn" size="60"></icon>
 			<text class="payResult-status-text">支付失败</text>
 		</view>
-		<view class="payResult-money" v-if="msg.billstatus ==1"><text>-¥{{msg.mergingSubtotal?msg.mergingSubtotal:'0.00'}}</text></view>
+		<view class="payResult-status" v-if="msg.billstatus ==2">
+			<icon type="waiting" size="60"></icon>
+			<text class="payResult-status-text">交易处理中</text>
+		</view>
+		<view class="payResult-money" v-if="msg.billstatus ==1"><text>¥{{msg.mergingSubtotal?msg.mergingSubtotal:'0.00'}}</text></view>
 		<view class="payResult-msg">
 			<u-cell-group>
 				<u-cell-item title="医院名称" :value="msg.hospitalName?msg.hospitalName:'未知医院'" :arrow="false" bg-color="#FFFFFF"></u-cell-item>