更改扫码api、添加邮箱绑定功能
diff --git a/pages/sub_medical/addPatient.vue b/pages/sub_medical/addPatient.vue
index 94cfda8..332bb0c 100644
--- a/pages/sub_medical/addPatient.vue
+++ b/pages/sub_medical/addPatient.vue
@@ -57,7 +57,7 @@
name,sex,cardno,mobile,
hospitalcode:''
}
- that.$u.post('/medicineapi/medicalcard/add',params).then(res=>{
+ that.$u.post('/medicalapi/medicalcard/add',params).then(res=>{
console.log(res.data)
})
}
diff --git a/pages/sub_medical/appointment.vue b/pages/sub_medical/appointment.vue
index 5de78b7..cf7fd6a 100644
--- a/pages/sub_medical/appointment.vue
+++ b/pages/sub_medical/appointment.vue
@@ -7,7 +7,7 @@
<view class="appointment-search">
<u-search placeholder="搜索医院名称" v-model="hospial" :show-action="false" bg-color="#ffffff" @focus="toPath('/pages/sub_medical/hospital')"></u-search>
</view>
- <view class="appointment-record">
+ <!-- <view class="appointment-record">
<u-cell-group>
<u-cell-item title="我的挂号记录" value="查看更多" @click="toPath('/pages/sub_medical/record')"></u-cell-item>
</u-cell-group>
@@ -40,18 +40,18 @@
<view class="appointment-record-nomsg" v-else>
<text>暂无挂号记录</text>
</view>
- <!-- <view class="appointment-record-btn">
+ <view class="appointment-record-btn">
<u-button :plain="true" size="mini" type="primary" shape="circle">取消预约</u-button>
- </view> -->
- </view>
+ </view>
+ </view> -->
<view class="appointment-hospital">
<u-cell-group>
<u-cell-item title="本地医院" value="查看更多" @click="toPath('/pages/sub_medical/hospital')"></u-cell-item>
</u-cell-group>
<view class="appointment-hospital-msg" v-if="hospital_list.length != 0">
- <view class="appointment-hospital-msg-box" @click="toPath('/pages/sub_medical/outpatient')" v-for="(v,i) in hospital_list" :key="i">
+ <view class="appointment-hospital-msg-box" @click="toPath('/pages/sub_medical/cashFlow?hospitalcode=' + v.hospitalcode)" v-for="(v,i) in hospital_list" :key="i">
<view class="appointment-hospital-msg-left">
- <u-image :src="v.src" width="100" mode="widthFix"></u-image>
+ <u-image :src="v.icon" width="100" mode="widthFix"></u-image>
</view>
<view class="appointment-hospital-msg-right">
<view class="appointment-hospital-msg-right-item">
@@ -87,6 +87,7 @@
}
},
onLoad() {
+ uni.setNavigationBarTitle({title:'医院查询'})
this.get_hospital_list()
this.getLocal()
},
@@ -115,9 +116,14 @@
pagesize:3,
name:''
}
- that.$u.get('/medicineapi/hospital/list',params).then(res=>{
- that.hospital_list = res.data.list
- console.log(res.data.list)
+ that.$u.get('/medicalapi/hospital/list',params).then(res=>{
+ let url = uni.getStorageSync('imageurl')
+ let list = res.data.list
+ list.forEach(item=>{
+ item.icon = url + '/' + item.picid
+ })
+ that.hospital_list = list
+ console.log(list)
})
}
}
diff --git a/pages/sub_medical/cashFlow.vue b/pages/sub_medical/cashFlow.vue
index efe1ff2..6f5091b 100644
--- a/pages/sub_medical/cashFlow.vue
+++ b/pages/sub_medical/cashFlow.vue
@@ -9,20 +9,23 @@
<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">
+ <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>
- <text>挂号费</text>
+ <text>{{v.mergingName}}</text>
</view>
<view class="cashFlow-ul-item-left-bottom">
- <text class="cashFlow-ul-item-left-bottom-bold">01</text>
- <text class="cashFlow-ul-item-left-bottom-normal">天内缴费,截止日期2020/10/28 23:59:59</text>
+ <!-- <text class="cashFlow-ul-item-left-bottom-bold">科类:</text> -->
+ <text class="cashFlow-ul-item-left-bottom-normal" style="margin-right: 50rpx;">科类:{{v.subjectName}}</text>
+ <!-- <text class="cashFlow-ul-item-left-bottom-bold"></text> -->
+ <text class="cashFlow-ul-item-left-bottom-normal">医生:{{v.doctorName}}</text>
</view>
</view>
<view class="cashFlow-ul-item-right">
- <text>¥23.5</text>
+ <text>¥{{v.mergingSubtotal}}</text>
</view>
+ <view class="cashFlow-ul-item-status" v-if="v.status == 'wip'">订单支付中</view>
</view>
</view>
</scroll-view>
@@ -30,20 +33,21 @@
<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">
+ <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>
- <text>挂号费</text>
+ <text>{{v.mergingname}}</text>
</view>
<view class="cashFlow-ul-item-left-bottom">
<text class="cashFlow-ul-item-left-bottom-normal">缴费日期:</text>
- <text class="cashFlow-ul-item-left-bottom-normal">2020-10-28 12:30:59</text>
+ <text class="cashFlow-ul-item-left-bottom-normal">{{v.paytime}}</text>
</view>
</view>
<view class="cashFlow-ul-item-right">
- <text>¥23.5</text>
+ <text>¥{{v.mergingsubtotal}}</text>
</view>
+ <view class="cashFlow-ul-item-status" v-if="!v.notifyStatus">通知医院</view>
</view>
</view>
</scroll-view>
@@ -55,13 +59,55 @@
export default {
data() {
return {
- leftOright: true
+ leftOright: true,
+ unpay_list:[],
+ hospitalcode:'',
+ payed_list:[]
}
},
+ onLoad(options){
+ let hospitalcode = options.hospitalcode
+ this.hospitalcode = hospitalcode
+ // this.get_unpay_list(hospitalcode)
+ },
methods: {
+ get_unpay_list(code){
+ let that = this
+ let param = {
+ hospitalcode : code
+ }
+ that.$u.post('/medicalapi/unpayed/list',param).then(res=>{
+ that.unpay_list = res.data
+ })
+ },
+ get_payed_list(code){
+ let that = this
+ let param = {
+ hospitalcode : code,
+ pageno:1,
+ pagesize:100
+ }
+ that.$u.post('/medicalapi/payed/list',param).then(res=>{
+ let list = res.data
+ 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)
+ })
+ that.payed_list = list
+ })
+ },
changeTurnoverList(e) {
this.leftOright = e
+ if(e){
+ this.get_unpay_list(this.hospitalcode)
+ }else{
+ this.get_payed_list(this.hospitalcode)
+ }
},
+ },
+ onShow(){
+ this.get_unpay_list(this.hospitalcode)
}
}
</script>
@@ -117,14 +163,27 @@
align-items: center;
padding: 30rpx 20rpx;
border-radius: 10rpx;
+ margin-bottom: 30rpx;
+ position: relative;
+ &-status{
+ position: absolute;
+ bottom: 20rpx;
+ right: 20rpx;
+ font-size: 26rpx;
+ color: #18B566;
+ }
&-left{
display: flex;
flex-direction: column;
justify-content: space-between;
+ width: 75%;
&-top{
display: flex;
align-items: center;
text{
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
font-size: 36rpx;
margin-left: 10rpx;
font-weight: bold;
diff --git a/pages/sub_medical/hospital.vue b/pages/sub_medical/hospital.vue
index 1b66fc1..7cf850d 100644
--- a/pages/sub_medical/hospital.vue
+++ b/pages/sub_medical/hospital.vue
@@ -67,7 +67,7 @@
pagesize: 10,
name: name
}
- that.$u.get('/medicineapi/hospital/list', params).then(res => {
+ that.$u.get('/medicalapi/hospital/list', params).then(res => {
that.hospital_list = res.data.list
that.notice = '没有搜索到此关键词'
console.log(res.data.list)
diff --git a/pages/sub_medical/patient.vue b/pages/sub_medical/patient.vue
index f6d549c..094a73b 100644
--- a/pages/sub_medical/patient.vue
+++ b/pages/sub_medical/patient.vue
@@ -62,7 +62,7 @@
deleteMenber(){
let that = this
let cardid = '123'
- that.$u.post('/medicineapi/medicalcard/delete/' + cardid).then(res=>{
+ that.$u.post('/medicalapi/medicalcard/delete/' + cardid).then(res=>{
console.log(res.data)
})
}
diff --git a/pages/sub_medical/pay.vue b/pages/sub_medical/pay.vue
index 751d7d3..c763a23 100644
--- a/pages/sub_medical/pay.vue
+++ b/pages/sub_medical/pay.vue
@@ -1,30 +1,59 @@
<template>
<view class="pay">
<u-cell-group>
- <u-cell-item title="挂号费" :title-style="tstyle" :arrow="false">
+ <u-cell-item :title="msg.mergingName" :title-style="tstyle" :arrow="false">
<u-image slot="icon" src="./images/cush.png" width="60" height="60" mode="aspectFit"></u-image>
</u-cell-item>
- <u-cell-item title="缴费金额" :arrow="false" value="23.50元" :value-style="vstyle"></u-cell-item>
+ <u-cell-item title="缴费金额" :arrow="false" :value="msg.mergingSubtotal+'元'" :value-style="vstyle"></u-cell-item>
</u-cell-group>
<u-cell-group>
- <u-cell-item title="商户名称" :arrow="false" value="大理市第一人民医院"></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="未支付"></u-cell-item>
+ <u-cell-item title="医院名称" :arrow="false" :value="msg.hospitalName"></u-cell-item>
+ <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-group>
- <u-button @click="" :custom-style="payBtn">立即支付</u-button>
+ <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>
+ <!-- 支付密码弹框 -->
+ <uni-popup ref="showPassword" class="pwd-wrapper">
+ <view class="uni-tip uni-pwd">
+ <text class="uni-tip-title">请输入支付密码</text>
+ <view class="pwd-text-wrap">
+ <password-input @tap="openKeyBoard('number')" :length="length" :gutter="0" :list="numberList"></password-input>
+ </view>
+ </view>
+ </uni-popup>
+ <keyboard-package ref="number" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm" :disableDot="true" />
</view>
</template>
<script>
- export default{
- data(){
- return{
+ import keyboardPackage from "./z_components/keyboard-package/keyboard-package.vue"
+ import passwordInput from "./z_components/password-input/password-input.vue"
+ import uniPopup from './z_components/uni-popup/uni-popup.vue'
+ export default {
+ components: {
+ uniPopup,
+ keyboardPackage,
+ passwordInput
+ },
+ data() {
+ return {
+ numberList: [],
+ length: 6,
+ type: 'number',
tstyle: {
marginLeft: '10rpx',
fontWeight: 'bold'
},
vstyle: {
- color: '#FF6F6F'
+ color: '#FF6F6F',
+ fontSize:'30rpx'
+ },
+ status_style: {
+ color: '#18B566',
+ fontSize:'30rpx'
},
payBtn: {
backgroundColor: ' #2FA8E1',
@@ -35,23 +64,191 @@
border: '1px solid #2FA8E1',
marginTop: '50rpx'
},
+ msg: {},
+ kind:''
}
},
- methods:{
-
+ methods: {
+ // 呼起键盘
+ openKeyBoard(key) {
+ this.type = key;
+ this.$refs[key].open();
+ },
+ // 输入密码
+ onInput(val) {
+ this.numberList.push(val)
+ if (this.numberList.length == this.length) {
+ this.$refs.showPassword.close()
+ this.$refs[this.type].close()
+ this.pay()
+ }
+ },
+ //完成输入点击完成
+ onConfirm() {
+ let length = this.numberList.length
+ if (length == this.length) {
+ this.$refs.showPassword.close()
+ this.$refs[this.type].close()
+ } else {
+ this.numberList = []
+ uni.showToast({
+ title: '密码错误',
+ icon: 'none'
+ })
+ }
+ },
+ //删除密码
+ onDelete(val) {
+ this.numberList.pop(val)
+ },
+ //打开密码输入框
+ open() {
+ this.numberList = []
+ this.$refs.showPassword.open()
+ this.openKeyBoard('number')
+ },
+ pay() {
+ let that = this
+ let pwd = ''
+ let billno = that.msg.billNo
+ that.numberList.forEach(item => {
+ pwd += item + ''
+ })
+ let param = {
+ paypwd: pwd,
+ billno
+ }
+ that.$u.post('/medicalapi/pay', param).then(res => {
+ 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)
+ })
+ },
+ query() {
+ let that = this
+ let billno = that.msg.billNo
+ that.$u.post('/medicalapi/pay/query/' + billno, {}).then(res => {
+ let status = res.status
+ if(status == 'wip'){
+ uni.showToast({
+ icon:'none',
+ title:'订单正在支付中,请稍等...'
+ })
+ }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)
+ }
+ })
+ }
},
- onLoad(){
-
+ onLoad(options) {
+ let msg = JSON.parse(options.msg)
+ let id = options.id
+ this.kind = id
+ 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) {
+ case 'init':
+ msg.status_ok = '未支付';
+ break
+ case 'wip':
+ msg.status_ok = '订单正在支付中...'
+ break
+ }
+ this.msg = msg
+ }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
+ this.msg = msg
+ }
}
}
</script>
<style lang="scss" scoped>
- .u-cell-box{
+ .u-cell-box {
margin-bottom: 30rpx;
}
- .pay{
+
+ .pay {
font-family: "PingFang-SC-Medium";
}
-
+
+ .pwd-wrapper {
+ background: rgba(0, 0, 0, .4);
+ z-index: 1;
+
+ /deep/.uni-popup__wrapper.uni-custom.center {
+ .uni-popup__wrapper-box {
+ position: unset;
+ max-width: none;
+ max-height: none;
+ overflow-y: hidden;
+ background: none;
+ margin-top: -70rpx;
+ padding: 60rpx 30rpx 30rpx;
+ }
+
+ .pwd-text-wrap {
+ width: 100%;
+ padding: 50rpx 43rpx 60rpx;
+ box-sizing: border-box;
+ }
+ }
+
+ .uni-tip {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ flex-direction: column;
+ /* #endif */
+ margin-top: -60rpx;
+ width: 570rpx;
+ background-color: #fff;
+ border-radius: 12rpx;
+ position: relative;
+ }
+
+ .uni-pwd {
+ width: 630rpx;
+ }
+
+ .uni-tip-icon-wrap {
+ text-align: center;
+ }
+
+ .uni-tip-content {
+ padding: 31rpx 40rpx 60rpx;
+ font-size: 30rpx;
+ color: #6F737A;
+ }
+ }
+
+ .uni-tip-title {
+ margin-top: 30rpx;
+ text-align: center;
+ font-weight: 500;
+ font-size: 34rpx;
+ color: $uni-text-color;
+ }
</style>
diff --git a/pages/sub_medical/payResult.vue b/pages/sub_medical/payResult.vue
index bd09b48..e36fd54 100644
--- a/pages/sub_medical/payResult.vue
+++ b/pages/sub_medical/payResult.vue
@@ -1,23 +1,23 @@
<template>
<view class="payResult">
- <view class="payResult-status" v-if="msg.billstatus ==2">
+ <view class="payResult-status" v-if="msg.billstatus ==1">
<icon type="success" size="60" color="#3599FB"></icon>
<text class="payResult-status-text">支付成功</text>
</view>
- <view class="payResult-status" v-if="msg.billstatus !=2">
+ <view class="payResult-status" v-if="msg.billstatus ==0">
<icon type="warn" size="60"></icon>
<text class="payResult-status-text">支付失败</text>
</view>
- <view class="payResult-money" v-if="msg.billstatus ==2"><text>-¥{{msg.amount?msg.amount:'0.00'}}</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.shopname?msg.shopname:'未知商户'" :arrow="false" bg-color="#FFFFFF"></u-cell-item>
- <u-cell-item title="交易方式" :value="msg.billname?msg.billname:'未知方式'" :arrow="false" bg-color="#FFFFFF"></u-cell-item>
+ <u-cell-item title="医院名称" :value="msg.hospitalName?msg.hospitalName:'未知医院'" :arrow="false" bg-color="#FFFFFF"></u-cell-item>
+ <u-cell-item title="交易方式" value="大理市民卡" :arrow="false" bg-color="#FFFFFF"></u-cell-item>
<u-cell-item title="交易时间" :value="msg.paytime?msg.paytime:'未知时间'" :arrow="false" bg-color="#FFFFFF"></u-cell-item>
- <u-cell-item title="订单号" :value="msg.refno?msg.refno:'未知订单号'" :arrow="false" bg-color="#FFFFFF"></u-cell-item>
+ <u-cell-item title="订单号" :value="msg.billNo?msg.billNo:'未知订单号'" :arrow="false" bg-color="#FFFFFF"></u-cell-item>
</u-cell-group>
</view>
- <u-button class="btn":custom-style="btn" @tap="goBack">返回首页</u-button>
+ <u-button class="btn":custom-style="btn" @tap="goBack">返回待缴费列表</u-button>
</view>
</template>
@@ -39,17 +39,28 @@
},
onLoad(options) {
let that = this;
- if (options.data) {
- let msg = JSON.parse(options.data);
- msg.amount = msg.amount.toFixed(2);
- that.msg = msg
+ let msg = JSON.parse(options.msg)
+ let status = options.status
+ let date = options.date
+ switch(status){
+ case 'fail':
+ msg.billstatus = 0;
+ break
+ case 'success':
+ msg.billstatus = 1;
+ break
+ case 'wip': //订单状态等待中 需查询
+ msg.billstatus = 2;
+ break
}
+ msg.paytime = date
+ that.msg = msg
},
methods: {
goBack() {
- uni.switchTab({
- url: '/pages/sub_tabbar/index'
- });
+ uni.navigateBack({
+ delta:2
+ })
}
}
}
@@ -73,6 +84,12 @@
margin-top: 30rpx;
}
}
+ &-money{
+ padding: 30rpx;
+ font-size: 50rpx;
+ text-align: right;
+ color: #2FA8E1;
+ }
&-msg{
margin-top: 50rpx;
}
diff --git a/pages/sub_medical/z_components/keyboard-package/keyboard-package.vue b/pages/sub_medical/z_components/keyboard-package/keyboard-package.vue
new file mode 100644
index 0000000..0d92542
--- /dev/null
+++ b/pages/sub_medical/z_components/keyboard-package/keyboard-package.vue
@@ -0,0 +1,299 @@
+<template>
+ <uni-popup :custom="true" type="bottom" ref="keyboardPackage">
+ <view class="keyboardbox">
+ <view class="numkeyboard" v-if="type==='number'">
+ <view class="num-area">
+ <view class="row" v-for="(item,index) in numKeybordList" :key="index">
+ <view :class="['item',ite===0?'z':'',(disableDot && ite==='.')?'disabled':'']" v-for="(ite,idx) in item"
+ hover-class="active" :hover-start-time="0" :hover-stay-time="5" :key="idx" @tap="input(ite)">{{ite}}</view>
+ </view>
+ </view>
+ <view class="btn-area">
+ <view :class="['item','del']" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="deleteVal">
+ 删除
+ </view>
+ <view class="confirem item" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="confirm">
+ 完成
+ </view>
+ </view>
+ </view>
+
+ <view class="numkeyboard" v-if="type==='idCard'">
+ <view class="num-area">
+ <view class="row" v-for="(item,index) in idCardList" :key="index">
+ <view :class="['item',ite===0?'z':'',(disableDot && ite==='.')?'disabled':'']" v-for="(ite,idx) in item"
+ hover-class="active" :hover-start-time="0" :hover-stay-time="5" :key="idx" @tap="input(ite)">{{ite}}</view>
+ </view>
+ </view>
+ <view class="btn-area">
+ <view :class="['item','del']" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="deleteVal">
+ 删除
+ </view>
+ <view class="confirem item" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="confirm">
+ 完成
+ </view>
+ </view>
+ </view>
+
+ <view class="platenumber" v-if="type==='plateNumber'">
+ <view class="header">
+ <view @tap="active=active===1?2:1" hover-class="active" :hover-start-time="0" :hover-stay-time="5">{{active===1?'地区':'车牌号'}}</view>
+ <view hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="confirm">完成</view>
+ </view>
+ <view class="main">
+ <view class="normal" v-if="active===1">
+ <view class="row" v-for="(item,index) in EngKeyBoardList" :key="index">
+ <view class="item" v-for="(ite,idx) in item" :key="idx" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="input(ite)">
+ {{ite}}
+ </view>
+ <view class="item img" v-if="index===EngKeyBoardList.length-1" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="deleteVal">
+ <image src="/static/delete.png" mode=""></image>
+ </view>
+ </view>
+ </view>
+ <view class="area" v-if="active===2">
+ <view class="row" v-for="(item,index) in areaList" :key="index">
+ <view class="item" v-for="(ite,idx) in item" :key="idx" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="input(ite)">
+ {{ite}}
+ </view>
+ <view class="item img" v-if="index===EngKeyBoardList.length-1" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="deleteVal">
+ <image src="/static/delete.png" mode=""></image>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="safe-area" v-if="safeAreaInsetBottom"></view>
+ </uni-popup>
+</template>
+
+<script>
+ import uniPopup from "../uni-popup/uni-popup.vue"
+ export default {
+ components: {
+ uniPopup
+ },
+ props: {
+ type: {
+ type: String,
+ default: 'number'
+ },
+ safeAreaInsetBottom: { //是否设置安全区
+ type: Boolean,
+ default: false
+ },
+ disableDot: { //数字键盘是否禁止点击.仅type为number生效
+ type: Boolean,
+ default: false
+ }
+ },
+ data() {
+ return {
+ numKeybordList: [
+ [1, 2, 3],
+ [4, 5, 6],
+ [7, 8, 9],
+ [0, '.']
+ ],
+ idCardList: [
+ [1, 2, 3],
+ [4, 5, 6],
+ [7, 8, 9],
+ [0, 'X']
+ ],
+ areaList: [
+ ['京', '沪', '粤', '津', '冀', '豫', '云', '辽', '黑', '湘'],
+ ['皖', '鲁', '苏', '浙', '赣', '鄂', '桂', '甘', '晋', '陕'],
+ ['蒙', '吉', '闽', '贵', '渝', '川', '青', '琼', '宁'],
+ ['藏', '新', '使', '港', '澳', '学']
+ ],
+ EngKeyBoardList: [
+ [1, 2, 3, 4, 5, 6, 7, 8, 9, 0],
+ ['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'],
+ ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'],
+ ['Z', 'X', 'C', 'V', 'B', 'N', 'M']
+ ],
+ active: 1
+ };
+ },
+ methods: {
+ open() {
+ this.$refs.keyboardPackage.open();
+ },
+ confirm() {
+ this.$emit('onConfirm');
+ },
+ deleteVal() {
+ this.$emit('onDelete');
+ },
+ input(val) {
+ if (val === '.' && this.disableDot) return;
+ this.$emit('onInput', val);
+ },
+ close() {
+ this.$refs.keyboardPackage.close();
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .keyboardbox {
+ background-color: #FFFFFF;
+
+ .numkeyboard {
+ height: 432rpx;
+ display: flex;
+ background-color: #ebedf0;
+
+ .btn-area {
+ width: 180rpx;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+
+ .item {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-grow: 1;
+ }
+
+ .del {
+ background-color: #ebedf0;
+ color: #333;
+
+ &.active {
+ background-color: #f1f3f5;
+ }
+ }
+
+ .confirem {
+ background-color: #1989fa;
+ color: #FFFFFF;
+
+ &.active {
+ background-color: #0570db;
+ }
+ }
+ }
+
+ .num-area {
+ flex-grow: 1;
+ display: flex;
+ flex-wrap: wrap;
+
+ .row {
+ width: 100%;
+ height: 25%;
+ display: flex;
+ margin-top: 1px;
+
+ .item {
+ flex-grow: 1;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #FFFFFF;
+ border-right: 1px solid #ebedf0;
+ width: 33.33%;
+
+ &.active {
+ background-color: #ebedf0;
+ }
+
+ &.z {
+ flex-grow: 2;
+ width: 66.66%;
+ }
+
+ &.disabled {
+ background: #FFFFFF;
+ color: #B9B9B9;
+ }
+ }
+ }
+
+ }
+ }
+ }
+
+ .safe-area {
+ padding-bottom: 0rpx;
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
+ }
+
+ .platenumber {
+ background-color: #f5f5f5;
+
+ .header {
+ height: 76rpx;
+ background-color: #FFFFFF;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 28rpx;
+ border-top: 1px solid #f5f5f5;
+
+ &>view {
+ padding: 0 45rpx;
+ color: #00a7ea;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ &.active {
+ background-color: #ebedf0;
+ }
+ }
+ }
+
+ .main {
+ height: 435rpx;
+
+ .row {
+ margin: 13rpx 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .item {
+ width: 56rpx;
+ height: 94rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #FFFFFF;
+ border-radius: 6rpx;
+ margin: 0 7rpx;
+ font-size: 24rpx;
+ &.active {
+ background-color: #ebedf0;
+ }
+
+ &.img {
+ background-color: #c2cacc;
+ width: 94rpx;
+
+ &.active {
+ background-color: #ddd;
+ }
+
+ &>image {
+ width: 49rpx;
+ height: 48rpx;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ // /deep/.uni-popup__mask.uni-bottom {
+ // background:rgba(0, 0, 0, .4);
+ // }
+</style>
diff --git a/pages/sub_medical/z_components/password-input/password-input.vue b/pages/sub_medical/z_components/password-input/password-input.vue
new file mode 100644
index 0000000..f02de6c
--- /dev/null
+++ b/pages/sub_medical/z_components/password-input/password-input.vue
@@ -0,0 +1,103 @@
+<template>
+ <view class="box">
+ <view :class="['item',list.length===index?'fakecursor':'']" v-for="(item,index) in length" :key="item" :style="{margin:formatMargin(gutter)}">
+ <view :class="['circle',(index<list.length)?'dot':'']"></view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ props:{
+ length:{//长度只允许为6和4
+ type:Number,
+ default:6,
+ validator(val){
+ if(val!==6 && val !==4){
+ return false;
+ }
+ return true;
+ }
+ },
+ gutter:{
+ type:Number,
+ default:0
+ },
+ list:{
+ type:Array,
+ default:function(){
+ return [];
+ }
+ }
+ },
+ data() {
+ return {
+ };
+ },
+ computed:{
+
+ },
+ methods:{
+ formatMargin(gutter){
+ return 0 + ' ' + gutter+'rpx';
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .box {
+ display: flex;
+ .item{
+ position: relative;
+ background-color: #FFFFFF;
+ height: 90upx;
+ width: 90upx;
+ flex-grow: 1;
+ flex-shrink: 0;
+ border: 1px solid #D9DCE0;
+ border-right: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ &:nth-child(6) {
+ border-right: 1px solid #D9DCE0;
+ }
+ .circle{
+ width: 18rpx;
+ height: 18rpx;
+ border-radius: 50%;
+ background-color: #fff;
+ &.dot{
+ background-color: #000;
+ }
+ }
+ }
+ }
+
+ .fakecursor::after {
+ content: '';
+ display: block;
+ width: 1px;
+ height: 32rpx;
+ animation: blink 1s infinite steps(1, start);
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ margin-top: -16rpx;
+ }
+
+ @keyframes blink {
+ 0% {
+ background-color: white;
+ }
+
+ 50% {
+ background-color: black;
+ }
+
+ 100% {
+ background-color: white;
+ }
+ }
+</style>
diff --git a/pages/sub_medical/z_components/uni-popup/message.js b/pages/sub_medical/z_components/uni-popup/message.js
new file mode 100644
index 0000000..6688e84
--- /dev/null
+++ b/pages/sub_medical/z_components/uni-popup/message.js
@@ -0,0 +1,29 @@
+export default {
+ created() {
+ if (this.type === 'message') {
+ // 获取自组件对象
+ this.maskShow = false
+ this.children = null
+ }
+ },
+ created() {
+ if (this.type === 'message') {
+ // 不显示遮罩
+ this.maskShow = false
+ // 获取子组件对象
+ this.childrenMsg = null
+ }
+ },
+ methods: {
+ customOpen() {
+ if (this.childrenMsg) {
+ this.childrenMsg.open()
+ }
+ },
+ customClose() {
+ if (this.childrenMsg) {
+ this.childrenMsg.close()
+ }
+ }
+ }
+}
diff --git a/pages/sub_medical/z_components/uni-popup/popup.js b/pages/sub_medical/z_components/uni-popup/popup.js
new file mode 100644
index 0000000..2a7f22f
--- /dev/null
+++ b/pages/sub_medical/z_components/uni-popup/popup.js
@@ -0,0 +1,25 @@
+import message from './message.js';
+// 定义 type 类型:弹出类型:top/bottom/center
+const config = {
+ // 顶部弹出
+ top:'top',
+ // 底部弹出
+ bottom:'bottom',
+ // 居中弹出
+ center:'center',
+ // 消息提示
+ message:'top',
+ // 对话框
+ dialog:'center',
+ // 分享
+ share:'bottom',
+}
+
+export default {
+ data(){
+ return {
+ config:config
+ }
+ },
+ mixins: [message],
+}
diff --git a/pages/sub_medical/z_components/uni-popup/popup.vue b/pages/sub_medical/z_components/uni-popup/popup.vue
new file mode 100644
index 0000000..26b166b
--- /dev/null
+++ b/pages/sub_medical/z_components/uni-popup/popup.vue
@@ -0,0 +1,112 @@
+<template>
+ <uni-popup ref="showtip" :mask-click="false" >
+ <view class="uni-tip">
+ <view class="uni-tip-icon-wrap"><img class="uni-tip-icon" src="~@/static/tip.svg"></view>
+ <text class="uni-tip-title">{{title}}</text>
+ <text class="uni-tip-content">{{content}}</text>
+ <view class="uni-tip-group-button">
+ <text class="uni-tip-button" @click="cancel">取消</text>
+ <text class="uni-tip-button uni-tip-button-confirm" @click="confirm">确定</text>
+ </view>
+ </view>
+ </uni-popup>
+</template>
+
+<script>
+import uniPopup from "@/components/uni-popup/uni-popup.vue"
+export default {
+ components: {uniPopup},
+ props:{
+ title:{
+ type: String,
+ default:''
+ },
+ content:{
+ type: String,
+ default:''
+ },
+ isShowPopup: {
+ type: Boolean,
+ default: false
+ }
+ },
+ data() {
+ return {
+
+ }
+ },
+ onLoad() {
+ console.log('测试',this.isShowPopup)
+ },
+ watch:{
+ isShowPopup(val) {
+ val ? this.$refs.showtip.open() : this.$refs.showtip.close()
+ console.log('显示',val)
+ }
+ },
+ methods:{
+ cancel() {
+ this.$refs.showtip.close()
+ },
+ confirm() {
+ this.$emit('confirm')
+ this.$refs.showtip.close()
+ },
+ }
+}
+</script>
+
+<style scoped lang="scss">
+.uni-tip {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ flex-direction: column;
+ /* #endif */
+ width: 570upx;
+ background-color: #fff;
+ border-radius: 12upx;
+ border: 1upx solid #D9DCE0;
+}
+.uni-pwd {
+ width: 630upx;
+}
+.uni-tip-icon-wrap {
+ text-align: center;
+}
+.uni-tip-icon {
+ text-align: center;
+ margin-top: 60upx;
+ width: 90upx;
+ height: 90upx;
+}
+.uni-tip-title {
+ margin-top: 30upx;
+ text-align: center;
+ font-weight: 500;
+ font-size: 34upx;
+ color: $uni-text-color;
+}
+.uni-tip-content {
+ padding: 31upx 40upx 60upx;
+ font-size: 30upx;
+ color: #6F737A;
+}
+.uni-tip-group-button {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ border-top: 1upx solid #D9DCE0;
+}
+.uni-tip-button {
+ flex: 1;
+ text-align: center;
+ font-size: 32upx;
+ color: #3b4144;
+ padding: 29upx 0;
+}
+.uni-tip-button-confirm {
+ border-left: 1upx solid #D9DCE0;
+ color: #1574DF;
+}
+</style>
diff --git a/pages/sub_medical/z_components/uni-popup/uni-popup-dialog.vue b/pages/sub_medical/z_components/uni-popup/uni-popup-dialog.vue
new file mode 100644
index 0000000..c91123c
--- /dev/null
+++ b/pages/sub_medical/z_components/uni-popup/uni-popup-dialog.vue
@@ -0,0 +1,243 @@
+<template>
+ <view class="uni-popup-dialog">
+ <view class="uni-dialog-title">
+ <text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{title}}</text>
+ </view>
+ <view class="uni-dialog-content">
+ <text class="uni-dialog-content-text" v-if="mode === 'base'">{{content}}</text>
+ <input v-else class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholder" :focus="focus" >
+ </view>
+ <view class="uni-dialog-button-group">
+ <view class="uni-dialog-button" @click="close">
+ <text class="uni-dialog-button-text">取消</text>
+ </view>
+ <view class="uni-dialog-button uni-border-left" @click="onOk">
+ <text class="uni-dialog-button-text uni-button-color">确定</text>
+ </view>
+ </view>
+
+ </view>
+</template>
+
+<script>
+ /**
+ * PopUp 弹出层-对话框样式
+ * @description 弹出层-对话框样式
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+ * @property {String} value input 模式下的默认值
+ * @property {String} placeholder input 模式下输入提示
+ * @property {String} type = [success|warning|info|error] 主题样式
+ * @value success 成功
+ * @value warning 提示
+ * @value info 消息
+ * @value error 错误
+ * @property {String} mode = [base|input] 模式、
+ * @value base 基础对话框
+ * @value input 可输入对话框
+ * @property {String} content 对话框内容
+ * @property {Boolean} beforeClose 是否拦截取消事件
+ * @event {Function} confirm 点击确认按钮触发
+ * @event {Function} close 点击取消按钮触发
+ */
+
+ export default {
+ name: "uniPopupDialog",
+ props: {
+ value: {
+ type: [String, Number],
+ default: ''
+ },
+ placeholder: {
+ type: [String, Number],
+ default: '请输入内容'
+ },
+ /**
+ * 对话框主题 success/warning/info/error 默认 success
+ */
+ type: {
+ type: String,
+ default: 'error'
+ },
+ /**
+ * 对话框模式 base/input
+ */
+ mode: {
+ type: String,
+ default: 'base'
+ },
+ /**
+ * 对话框标题
+ */
+ title: {
+ type: String,
+ default: '提示'
+ },
+ /**
+ * 对话框内容
+ */
+ content: {
+ type: String,
+ default: ''
+ },
+ /**
+ * 拦截取消事件 ,如果拦截取消事件,必须监听close事件,执行 done()
+ */
+ beforeClose: {
+ type: Boolean,
+ default: false
+ }
+ },
+ data() {
+ return {
+ dialogType: 'error',
+ focus: false,
+ val: ""
+ }
+ },
+ inject: ['popup'],
+ watch: {
+ type(val) {
+ this.dialogType = val
+ },
+ mode(val) {
+ if (val === 'input') {
+ this.dialogType = 'info'
+ }
+ },
+ value(val) {
+ this.val = val
+ }
+ },
+ created() {
+ // 对话框遮罩不可点击
+ this.popup.mkclick = false
+ if (this.mode === 'input') {
+ this.dialogType = 'info'
+ this.val = this.value
+ } else {
+ this.dialogType = this.type
+ }
+ },
+ mounted() {
+ this.focus = true
+ },
+ methods: {
+ /**
+ * 点击确认按钮
+ */
+ onOk() {
+ this.$emit('confirm', () => {
+ this.popup.close()
+ if (this.mode === 'input') this.val = this.value
+ }, this.mode === 'input' ? this.val : '')
+ },
+ /**
+ * 点击取消按钮
+ */
+ close() {
+ if (this.beforeClose) {
+ this.$emit('close', () => {
+ this.popup.close()
+ })
+ return
+ }
+ this.popup.close()
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .uni-popup-dialog {
+ width: 300px;
+ border-radius: 15px;
+ background-color: #fff;
+ }
+
+ .uni-dialog-title {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ justify-content: center;
+ padding-top: 15px;
+ padding-bottom: 5px;
+ }
+
+ .uni-dialog-title-text {
+ font-size: 16px;
+ font-weight: 500;
+ }
+
+ .uni-dialog-content {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ padding: 5px 15px 15px 15px;
+ }
+
+ .uni-dialog-content-text {
+ font-size: 14px;
+ color: #6e6e6e;
+ }
+
+ .uni-dialog-button-group {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ border-top-color: #f5f5f5;
+ border-top-style: solid;
+ border-top-width: 1px;
+ }
+
+ .uni-dialog-button {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+
+ flex: 1;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ height: 45px;
+ }
+
+ .uni-border-left {
+ border-left-color: #f0f0f0;
+ border-left-style: solid;
+ border-left-width: 1px;
+ }
+
+ .uni-dialog-button-text {
+ font-size: 14px;
+ }
+
+ .uni-button-color {
+ color: $uni-color-primary;
+ }
+
+ .uni-dialog-input {
+ flex: 1;
+ font-size: 14px;
+ }
+
+ .uni-popup__success {
+ color: $uni-color-success;
+ }
+
+ .uni-popup__warn {
+ color: $uni-color-warning;
+ }
+
+ .uni-popup__error {
+ color: $uni-color-error;
+ }
+
+ .uni-popup__info {
+ color: #909399;
+ }
+</style>
diff --git a/pages/sub_medical/z_components/uni-popup/uni-popup-message.vue b/pages/sub_medical/z_components/uni-popup/uni-popup-message.vue
new file mode 100644
index 0000000..a32bd00
--- /dev/null
+++ b/pages/sub_medical/z_components/uni-popup/uni-popup-message.vue
@@ -0,0 +1,116 @@
+<template>
+ <view class="uni-popup-message" :class="'uni-popup__'+[type]">
+ <text class="uni-popup-message-text" :class="'uni-popup__'+[type]+'-text'">{{message}}</text>
+ </view>
+</template>
+
+<script>
+
+ /**
+ * PopUp 弹出层-消息提示
+ * @description 弹出层-消息提示
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+ * @property {String} type = [success|warning|info|error] 主题样式
+ * @value success 成功
+ * @value warning 提示
+ * @value info 消息
+ * @value error 错误
+ * @property {String} message 消息提示文字
+ * @property {String} duration 显示时间,设置为 0 则不会自动关闭
+ */
+
+ export default {
+ name: 'UniPopupMessage',
+ props: {
+ /**
+ * 主题 success/warning/info/error 默认 success
+ */
+ type: {
+ type: String,
+ default: 'success'
+ },
+ /**
+ * 消息文字
+ */
+ message: {
+ type: String,
+ default: ''
+ },
+ /**
+ * 显示时间,设置为 0 则不会自动关闭
+ */
+ duration: {
+ type: Number,
+ default: 3000
+ }
+ },
+ inject: ['popup'],
+ data() {
+ return {}
+ },
+ created() {
+ this.popup.childrenMsg = this
+ },
+ methods: {
+ open() {
+ if (this.duration === 0) return
+ clearTimeout(this.popuptimer)
+ this.popuptimer = setTimeout(() => {
+ this.popup.close()
+ }, this.duration)
+ },
+ close() {
+ clearTimeout(this.popuptimer)
+ }
+ }
+ }
+</script>
+<style lang="scss" scoped>
+ .uni-popup-message {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ background-color: #e1f3d8;
+ padding: 10px 15px;
+ border-color: #eee;
+ border-style: solid;
+ border-width: 1px;
+ }
+ .uni-popup-message-text {
+ font-size: 14px;
+ padding: 0;
+ }
+
+ .uni-popup__success {
+ background-color: #e1f3d8;
+ }
+
+ .uni-popup__success-text {
+ color: #67C23A;
+ }
+
+ .uni-popup__warn {
+ background-color: #faecd8;
+ }
+
+ .uni-popup__warn-text {
+ color: #E6A23C;
+ }
+
+ .uni-popup__error {
+ background-color: #fde2e2;
+ }
+
+ .uni-popup__error-text {
+ color: #F56C6C;
+ }
+
+ .uni-popup__info {
+ background-color: #F2F6FC;
+ }
+
+ .uni-popup__info-text {
+ color: #909399;
+ }
+</style>
diff --git a/pages/sub_medical/z_components/uni-popup/uni-popup-share.vue b/pages/sub_medical/z_components/uni-popup/uni-popup-share.vue
new file mode 100644
index 0000000..4c11a13
--- /dev/null
+++ b/pages/sub_medical/z_components/uni-popup/uni-popup-share.vue
@@ -0,0 +1,165 @@
+<template>
+ <view class="uni-popup-share">
+ <view class="uni-share-title"><text class="uni-share-title-text">{{title}}</text></view>
+ <view class="uni-share-content">
+ <view class="uni-share-content-box">
+ <view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
+ <image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+ <text class="uni-share-text">{{item.text}}</text>
+ </view>
+
+ </view>
+ </view>
+ <view class="uni-share-button-box">
+ <button class="uni-share-button" @click="close">取消</button>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ name: 'UniPopupShare',
+ props: {
+ title: {
+ type: String,
+ default: '分享到'
+ }
+ },
+ inject: ['popup'],
+ data() {
+ return {
+ bottomData: [{
+ text: '微信',
+ icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-2.png',
+ name: 'wx'
+ },
+ {
+ text: '支付宝',
+ icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-8.png',
+ name: 'wx'
+ },
+ {
+ text: 'QQ',
+ icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/gird-3.png',
+ name: 'qq'
+ },
+ {
+ text: '新浪',
+ icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-1.png',
+ name: 'sina'
+ },
+ {
+ text: '百度',
+ icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-7.png',
+ name: 'copy'
+ },
+ {
+ text: '其他',
+ icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-5.png',
+ name: 'more'
+ }
+ ]
+ }
+ },
+ created() {},
+ methods: {
+ /**
+ * 选择内容
+ */
+ select(item, index) {
+ this.$emit('select', {
+ item,
+ index
+ }, () => {
+ this.popup.close()
+ })
+ },
+ /**
+ * 关闭窗口
+ */
+ close() {
+ this.popup.close()
+ }
+ }
+ }
+</script>
+<style lang="scss" scoped>
+ .uni-popup-share {
+ background-color: #fff;
+ }
+ .uni-share-title {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ height: 40px;
+ }
+ .uni-share-title-text {
+ font-size: 14px;
+ color: #666;
+ }
+ .uni-share-content {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ justify-content: center;
+ padding-top: 10px;
+ }
+
+ .uni-share-content-box {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ flex-wrap: wrap;
+ width: 360px;
+ }
+
+ .uni-share-content-item {
+ width: 90px;
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: column;
+ justify-content: center;
+ padding: 10px 0;
+ align-items: center;
+ }
+
+ .uni-share-content-item:active {
+ background-color: #f5f5f5;
+ }
+
+ .uni-share-image {
+ width: 30px;
+ height: 30px;
+ }
+
+ .uni-share-text {
+ margin-top: 10px;
+ font-size: 14px;
+ color: #3B4144;
+ }
+
+ .uni-share-button-box {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ padding: 10px 15px;
+ }
+
+ .uni-share-button {
+ flex: 1;
+ border-radius: 50px;
+ color: #666;
+ font-size: 16px;
+ }
+
+ .uni-share-button::after {
+ border-radius: 50px;
+ }
+</style>
diff --git a/pages/sub_medical/z_components/uni-popup/uni-popup.vue b/pages/sub_medical/z_components/uni-popup/uni-popup.vue
new file mode 100644
index 0000000..50434e6
--- /dev/null
+++ b/pages/sub_medical/z_components/uni-popup/uni-popup.vue
@@ -0,0 +1,187 @@
+<template>
+ <view v-if="showPopup" class="uni-popup">
+ <view :class="[ani, animation ? 'ani' : '', !custom ? 'uni-custom' : '']" class="uni-popup__mask" @click="close(true)" />
+ <view :class="[type, ani, animation ? 'ani' : '', !custom ? 'uni-custom' : '']" class="uni-popup__wrapper" @click="close(true)">
+ <view class="uni-popup__wrapper-box" @click.stop="clear">
+ <slot />
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ name: 'UniPopup',
+ props: {
+ // 开启动画
+ animation: {
+ type: Boolean,
+ default: true
+ },
+ // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+ type: {
+ type: String,
+ default: 'center'
+ },
+ // 是否开启自定义
+ custom: {
+ type: Boolean,
+ default: false
+ },
+ // maskClick
+ maskClick: {
+ type: Boolean,
+ default: true
+ },
+ show: {
+ type: Boolean,
+ default: true
+ }
+ },
+ data() {
+ return {
+ ani: '',
+ showPopup: false
+ }
+ },
+ watch: {
+ show(newValue) {
+ if (newValue) {
+ this.open()
+ } else {
+ this.close()
+ }
+ }
+ },
+ created() {},
+ methods: {
+ clear() {},
+ open() {
+ this.$emit('change', {
+ show: true
+ })
+ this.showPopup = true
+ this.$nextTick(() => {
+ setTimeout(() => {
+ this.ani = 'uni-' + this.type
+ }, 30)
+ })
+ },
+ close(type) {
+ if (!this.maskClick && type) return
+ this.$emit('change', {
+ show: false
+ })
+ this.ani = ''
+ this.$nextTick(() => {
+ setTimeout(() => {
+ this.showPopup = false
+ }, 300)
+ })
+ }
+ }
+ }
+</script>
+<style>
+ @charset "UTF-8";
+
+ .uni-popup {
+ position: fixed;
+ top: 0;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ z-index: 99999;
+ overflow: hidden
+ }
+
+ .uni-popup__mask {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ z-index: 998;
+ /* background: rgba(0, 0, 0, .4); */
+ opacity: 0
+ }
+
+ .uni-popup__mask.ani {
+ transition: all .3s
+ }
+
+ .uni-popup__mask.uni-bottom,
+ .uni-popup__mask.uni-center,
+ .uni-popup__mask.uni-top {
+ opacity: 1
+ }
+
+ .uni-popup__wrapper {
+ position: absolute;
+ z-index: 999;
+ box-sizing: border-box
+ }
+
+ .uni-popup__wrapper.ani {
+ transition: all .3s
+ }
+
+ .uni-popup__wrapper.top {
+ top: 0;
+ left: 0;
+ width: 100%;
+ transform: translateY(-100%)
+ }
+
+ .uni-popup__wrapper.bottom {
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ transform: translateY(100%)
+ }
+
+ .uni-popup__wrapper.center {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ transform: scale(1.2);
+ opacity: 0
+ }
+
+ .uni-popup__wrapper-box {
+ position: relative;
+ box-sizing: border-box
+ }
+
+ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
+ padding: 30upx;
+ background: #fff
+ }
+
+ .uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box {
+ position: relative;
+ max-width: 80%;
+ max-height: 80%;
+ overflow-y: scroll
+ }
+
+ .uni-popup__wrapper.uni-custom.bottom .uni-popup__wrapper-box,
+ .uni-popup__wrapper.uni-custom.top .uni-popup__wrapper-box {
+ width: 100%;
+ max-height: 500px;
+ overflow-y: scroll
+ }
+
+ .uni-popup__wrapper.uni-bottom,
+ .uni-popup__wrapper.uni-top {
+ transform: translateY(0)
+ }
+
+ .uni-popup__wrapper.uni-center {
+ transform: scale(1);
+ opacity: 1
+ }
+</style>
\ No newline at end of file