添加设置密保、密保改密、版本提示 更新版本v2.2.0 版本号android 10 ios 11
diff --git a/pages/sub_basic/forgetPwd/index.vue b/pages/sub_basic/forgetPwd/index.vue
index 523f916..0c5e66e 100644
--- a/pages/sub_basic/forgetPwd/index.vue
+++ b/pages/sub_basic/forgetPwd/index.vue
@@ -1,8 +1,8 @@
<template>
<view class="register" @touchmove.stop.prevent="moveHandle">
<!-- #ifndef MP-WEIXIN -->
- <u-navbar title="忘记密码" :border-bottom="false" :is-back="false"></u-navbar>
- <!-- #endif -->
+ <u-navbar title="忘记密码" :border-bottom="false" :is-back="false"></u-navbar>
+ <!-- #endif -->
<view class="register-con">
<view class="register-con-logo">
<u-image src="/static/images/login/logo.png" width="300rpx" mode="widthFix"></u-image>
@@ -17,6 +17,7 @@
</u-field>
<u-field v-model="pwd" icon="lock-fill" placeholder="请输入新的密码" label-width="50" icon-color="#999999" :password="true"
maxlength="12" type="number" clear-size="40"></u-field>
+ <view class="register-con-form-secret"><text @click="toUrl('/pages/sub_basic/forgetPwd/question')">密保改密</text></view>
</view>
<u-button @click="changePwd" :custom-style="registerConBtn">修改密码</u-button>
</view>
@@ -33,7 +34,7 @@
code: "",
isChecked: false,
timer: "",
- registerConBtn:{
+ registerConBtn: {
width: '600rpx',
backgroundColor: '#2FA8E1',
color: '#FFFFFF',
@@ -42,10 +43,10 @@
marginTop: '100rpx',
padding: '50rpx 0'
},
- btn:{
+ btn: {
color: '#2FA8E1',
backgroundColor: '#FFFFFF',
- borderColor:'#2FA8E1',
+ borderColor: '#2FA8E1',
borderWidth: '1rpx',
borderStyle: 'solid',
fontFamily: "PingFang-SC-Regular"
@@ -53,7 +54,7 @@
}
},
methods: {
- moveHandle(){
+ moveHandle() {
return
},
getCode() {
@@ -70,7 +71,7 @@
uni.removeStorageSync('token')
that.$u.post('/i/code', {
phone: tel,
- "type":"find"
+ "type": "find"
}).then(res => {
uni.showToast({
title: res.msg,
@@ -152,10 +153,10 @@
title: "密码重置成功",
icon: "none",
duration: 800,
- complete(res){
+ complete(res) {
setTimeout(() => {
uni.reLaunch({
- url:"/pages/sub_basic/login/index"
+ url: "/pages/sub_basic/login/index"
})
}, 1500)
}
@@ -208,6 +209,14 @@
&-form {
width: 650rpx;
margin: auto;
+
+ &-secret {
+ color: #999999;
+ font-size: 28rpx;
+ display: flex;
+ justify-content: flex-end;
+ margin-top: 30rpx;
+ }
}
&-btn {
diff --git a/pages/sub_basic/forgetPwd/question.vue b/pages/sub_basic/forgetPwd/question.vue
new file mode 100644
index 0000000..36b90e7
--- /dev/null
+++ b/pages/sub_basic/forgetPwd/question.vue
@@ -0,0 +1,266 @@
+<template>
+ <view>
+ <view class="setQuestion" v-if="show_question && !show_pwd">
+ <view class="setQuestion-container">
+ <view class="setQuestion-item" v-for="(v,i) in list_select" :key='i'>
+ <u-field :disabled="true" :label="v.q_title" :field-style="field_style" v-model="v.q_value" input-align='right'
+ @click="choose_list(i,'confirm'+i)"></u-field>
+ <u-field :label="v.a_title" :field-style="field_style" v-model="v.a_value" input-align='right' placeholder="请输入您的答案"
+ maxlength="20"></u-field>
+ <u-picker mode="selector" v-model="v.isShow" :default-selector="[i]" :range="list" range-key="question" @confirm="v.func"></u-picker>
+ </view>
+ </view>
+ <u-button @click="submit" :custom-style="submit_btn">验证密保</u-button>
+ </view>
+ <view class="setQuestion" v-if="!show_question && !show_pwd">
+ <view class="setQuestion-container">
+ <u-field label="手机号" :field-style="field_style" v-model="phone" input-align='right' placeholder="请输入您设置密保时关联的手机号"></u-field>
+ </view>
+ <u-button @click="check_phone" :custom-style="submit_btn">确认手机号</u-button>
+ </view>
+ <view class="setQuestion" v-if="show_pwd">
+ <view class="setQuestion-container">
+ <u-field label="新密码" :field-style="field_style" v-model="pwd" input-align='right' placeholder="请输入您的新密码" password></u-field>
+ </view>
+ <view class="setQuestion-container">
+ <u-field label="确认密码" :field-style="field_style" v-model="repwd" input-align='right' placeholder="请确认您的新密码"
+ password></u-field>
+ </view>
+ <u-button @click="change_pwd" :custom-style="submit_btn">修改密码</u-button>
+ </view>
+ </view>
+
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ phone: '',
+ field_style: {
+ 'font-size': '30rpx',
+ 'color': '#6a6a6a'
+ },
+ submit_btn: {
+ width: '600rpx',
+ backgroundColor: '#2FA8E1',
+ color: '#FFFFFF',
+ fontFamily: "PingFang-SC-Medium",
+ fontSize: '30rpx',
+ marginTop: '100rpx',
+ padding: '50rpx 0'
+ },
+ show_question: false,
+ show_pwd: false,
+ list: [],
+ list_select: [{
+ q_title: 'Q1:',
+ q_value: '请选择您的密保问题',
+ a_value: '',
+ a_title: 'A1:',
+ isShow: false,
+ func: null
+ },
+ {
+ q_title: 'Q2:',
+ q_value: '请选择您的密保问题',
+ a_value: '',
+ a_title: 'A2:',
+ isShow: false,
+ func: null
+ },
+ {
+ q_title: 'Q3:',
+ q_value: '请选择您的密保问题',
+ a_value: '',
+ a_title: 'A3:',
+ isShow: false,
+ func: null
+ },
+ ],
+ answers: [{
+ "ssid": "",
+ "answer": ""
+ },
+ {
+ "ssid": "",
+ "answer": ""
+ },
+ {
+ "ssid": "",
+ "answer": ""
+ }
+ ],
+ pass: false,
+ pwd: '',
+ repwd: ''
+ }
+ },
+ onLoad(optins) {
+ // this.get_list()
+ },
+ methods: {
+ choose_list(e, fun_name) {
+ this.list_select[e].isShow = true
+ this.list_select[e].func = this[fun_name]
+ },
+ check_phone() {
+ let that = this
+ let phone = that.phone
+ that.$u.get('/i/security/list?phone=' + phone).then(res => {
+ let list = res.data
+ if (list.length == 0) {
+ uni.showModal({
+ title: '提示',
+ content: '您还未设置过密保',
+ })
+ return
+ }
+ uni.setStorageSync("phone", phone)
+ that.list = list
+ that.show_question = true
+ })
+ },
+ confirm0(e) {
+ this.list_select[0].q_value = this.list[e[0]].question
+ this.list_select[0].ssid = this.list[e[0]].ssid
+ },
+ confirm1(e) {
+ this.list_select[1].q_value = this.list[e[0]].question
+ this.list_select[1].ssid = this.list[e[0]].ssid
+ },
+ confirm2(e) {
+ this.list_select[2].q_value = this.list[e[0]].question
+ this.list_select[2].ssid = this.list[e[0]].ssid
+ },
+ submit() {
+ let that = this
+ let list = that.list_select
+ let answer = that.answers
+ list.map((item, index, arr) => {
+ let ssid = item.ssid
+ let length = item.a_value.length
+ answer[index].ssid = ssid
+ answer[index].answer = item.a_value
+ })
+ let str = ''
+ answer.forEach(item => {
+ str = str + item.ssid
+ })
+ for (let i = 0; i < answer.length; i++) {
+ let item = answer[i]
+ let ssid = item.ssid
+ if (!ssid) {
+ uni.showModal({
+ title: '提示',
+ content: '请选择密保问题',
+ })
+ that.pass = false
+ break;
+ } else {
+ that.pass = true
+ }
+ let reg = new RegExp(item.ssid, "g")
+ let length = str.match(reg).length
+ if (length >= 2) {
+ uni.showModal({
+ title: '提示',
+ content: '请选择不同的密保问题',
+ })
+ that.pass = false
+ break;
+ } else {
+ that.pass = true
+ }
+
+ let value_length = item.answer.length
+ if (value_length < 2) {
+ uni.showModal({
+ title: '提示',
+ content: '未填写问题或问题答案长度小于2个字符',
+ })
+ that.pass = false
+ break;
+ } else {
+ that.pass = true
+ }
+ }
+ if (!that.pass) return
+ let phone = that.phone
+ let param = {
+ answers: answer,
+ phone
+ }
+ that.$u.post('/i/security/check', param).then(res => {
+ //console.log(res)
+ if (res.error == null) {
+ that.show_question = false
+ that.show_pwd = true
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '密保错误,请确认后重新验证'
+ })
+ }
+
+ })
+ },
+ change_pwd() {
+ let that = this
+ let pwd = that.pwd
+ let repwd = that.repwd
+ if (!!!pwd || !!!repwd) {
+ uni.showModal({
+ title: '提示',
+ content: '请输入密码'
+ })
+ return
+ }
+ if (pwd != repwd) {
+ uni.showModal({
+ title: '提示',
+ content: '两次密码不一致,请确认后重新输入'
+ })
+ return
+ }
+ let answers = that.answers
+ let phone = that.phone
+ //console.log(answers)
+ let params = {
+ pwd,
+ repwd,
+ answers,
+ phone
+ }
+ that.$u.post('/i/security/pwdset', params).then(res => {
+ uni.showToast({
+ title: "密码修改成功",
+ icon: "none",
+ duration: 800,
+ complete(res) {
+ setTimeout(() => {
+ uni.reLaunch({
+ url: "/pages/sub_basic/login/index"
+ })
+ }, 1500)
+ }
+ })
+ })
+ }
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .setQuestion {
+ margin-top: 30rpx;
+
+ &-container {
+ background-color: #FFFFFF;
+ }
+
+ &-item {
+ margin-bottom: 30rpx;
+ }
+ }
+</style>
diff --git a/pages/sub_basic/login/index.vue b/pages/sub_basic/login/index.vue
index 050f84c..716fc47 100644
--- a/pages/sub_basic/login/index.vue
+++ b/pages/sub_basic/login/index.vue
@@ -291,7 +291,12 @@
faceIn() {
let face = uni.getStorageSync("face")
if (face) {
-
+ uni.showToast({
+ title: "暂不支持面容登录,请使用其他方式登录",
+ duration: 1500,
+ icon: "none",
+ mask: true,
+ })
} else {
uni.showToast({
title: "未开启面容登录,请使用其他方式登录",
diff --git a/pages/sub_index/scanView/index.vue b/pages/sub_index/scanView/index.vue
index dbf9b26..fab08d2 100644
--- a/pages/sub_index/scanView/index.vue
+++ b/pages/sub_index/scanView/index.vue
@@ -23,37 +23,41 @@
let userid = uni.getStorageSync("userid")
//that.userid = userid
let url = option.url
- if (url.indexOf("?") > 0) {
- url = url + "&userid=" + userid
- } else {
- url = url + "?userid=" + userid
- }
+ // if (url.indexOf("?") > 0) {
+ // url = url + "&userid=" + userid
+ // } else {
+ // url = url + "?userid=" + userid
+ // }
console.log(url)
that.src = url
},
+ onBackPress(options) {
+ uni.reLaunch({
+ url: '/pages/sub_tabbar/index'
+ })
+ return true
+ },
onReady() {
- // let userid = uni.getStorageSync("userid")
- // var pages = getCurrentPages()
- // var page = pages[pages.length - 1]
- // var currentWebview = page.$getAppWebview()
- // var url = currentWebview.children()[0].getURL()
- // var wx = currentWebview.children()[0]
- // console.log('=== url ===', url);
- // wx.addEventListener('loaded', function(e) {
- // console.log('Loaded: ' + wx.getURL());
- // let newUrl = wx.getURL()
- // if (newUrl.indexOf("userid") > -1) {
- // //console.log(1)
- // return false
- // }
- // if (newUrl.indexOf("?") > 0) {
- // newUrl = newUrl + "&userid=" + userid
- // } else {
- // newUrl = newUrl + "?userid=" + userid
- // }
- // //console.log(newUrl)
- // wx.loadURL(newUrl)
- // }, false);
+ let that = this
+ let userid = uni.getStorageSync("userid")
+ var pages = getCurrentPages()
+ var page = pages[pages.length - 1]
+ var currentWebview = page.$getAppWebview()
+ var url = currentWebview.children()[0].getURL()
+ var wx = currentWebview.children()[0]
+ wx.addEventListener('loaded', function(e) {
+ let newUrl = wx.getURL()
+ if (newUrl.indexOf("userid") > -1) {
+ //console.log(1)
+ return false
+ }
+ if (newUrl.indexOf("?") > 0) {
+ newUrl = newUrl + "&userid=" + userid
+ } else {
+ newUrl = newUrl + "?userid=" + userid
+ }
+ that.src = newUrl
+ }, false);
},
}
</script>
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>
diff --git a/pages/sub_mine/accountSafe/index.vue b/pages/sub_mine/accountSafe/index.vue
index afec07c..8a536bd 100644
--- a/pages/sub_mine/accountSafe/index.vue
+++ b/pages/sub_mine/accountSafe/index.vue
@@ -26,6 +26,7 @@
{name:"支付(指纹)",icon:"finger",path:"/pages/sub_mine/otherPay/index"},
{name:"挂失",icon:"gs",path:"/pages/sub_mine/reportheLoss/index"},
{name:"设置邮箱",icon:"email",path:"/pages/sub_mine/bindEmail/index"},
+ {name:"设置密保",icon:"mibao",path:"/pages/sub_mine/question/index"},
]
}
},
diff --git a/pages/sub_mine/agreement/index.vue b/pages/sub_mine/agreement/index.vue
index dce0c57..7952c6a 100644
--- a/pages/sub_mine/agreement/index.vue
+++ b/pages/sub_mine/agreement/index.vue
@@ -59,7 +59,7 @@
}
},
onLoad() {
- this.getAgreement()
+ //this.getAgreement()
}
}
</script>
diff --git a/pages/sub_mine/bindEmail/index.vue b/pages/sub_mine/bindEmail/index.vue
index 4fcbd70..3bc50fe 100644
--- a/pages/sub_mine/bindEmail/index.vue
+++ b/pages/sub_mine/bindEmail/index.vue
@@ -76,6 +76,7 @@
icon: "none",
duration: 800,
complete(res) {
+ uni.setStorageSync('email', email)
setTimeout(() => {
uni.navigateBack({
delta: 1
diff --git a/pages/sub_mine/lock/index.vue b/pages/sub_mine/lock/index.vue
index a2345f5..547e5b0 100644
--- a/pages/sub_mine/lock/index.vue
+++ b/pages/sub_mine/lock/index.vue
@@ -107,10 +107,18 @@
if (pwd) {
if (pwd.join('') === data.join('')) {
let login = uni.getStorageSync("login")
- if(login){
+ if(login == 1){
that.text = '手势正确,即将进入首页'
uni.removeStorageSync("login")
that.login()
+ }else if(login ==2){
+ that.text = '手势正确'
+ uni.removeStorageSync("login")
+ setTimeout(() => {
+ uni.switchTab({
+ url: "/pages/sub_tabbar/index"
+ })
+ }, 1500)
}else{
that.text = '手势正确,关闭手势成功'
uni.removeStorageSync("hands")
diff --git a/pages/sub_mine/personalMsg/index.vue b/pages/sub_mine/personalMsg/index.vue
index 36960ea..8d6d620 100644
--- a/pages/sub_mine/personalMsg/index.vue
+++ b/pages/sub_mine/personalMsg/index.vue
@@ -7,12 +7,7 @@
<u-cell-item title="市民卡号" :arrow="false" :value="cardno"></u-cell-item>
<u-cell-item title="身份证号" :arrow="false" :value="idno"></u-cell-item>
<u-cell-item title="身份状态" :arrow="false" :value="signed"></u-cell-item>
- <!-- <u-field v-model="name" :disabled="true" label="姓名" :field-style="fieldStyle" clear-size="40" input-align="right"></u-field>
- <u-field v-model="tel" :disabled="true" label="手机号" :field-style="fieldStyle" clear-size="40" input-align="right"></u-field>
- <u-field v-model="bankcardno" :disabled="true" label="银行卡号" :field-style="fieldStyle" clear-size="40" input-align="right"></u-field>
- <u-field v-model="cardno" :disabled="true" label="市民卡号" :field-style="fieldStyle" clear-size="40" input-align="right"></u-field>
- <u-field v-model="idno" :disabled="true" label="身份证号" :field-style="fieldStyle" clear-size="40" input-align="right"></u-field>
- <u-field v-model="signed" :disabled="true" label="身份状态" :field-style="fieldStyle" clear-size="40" input-align="right"></u-field> -->
+ <u-cell-item title="邮箱号" :arrow="false" :value="email"></u-cell-item>
</view>
</view>
</template>
@@ -30,7 +25,8 @@
cardno:'',
idno:'',
signed:'',
- tel:''
+ tel:'',
+ email:''
}
},
methods: {
@@ -39,11 +35,12 @@
onLoad() {
let that = this
that.name = uni.getStorageSync('name')?uni.getStorageSync('name'):'佚名'
- that.bankcardno = uni.getStorageSync('bankcardno')?uni.getStorageSync('bankcardno'):'暂无银行卡信息'
- that.cardno = uni.getStorageSync('cardno')?uni.getStorageSync('cardno').substr(0,2) + '****' + uni.getStorageSync('cardno').substr(6,2):'暂无市民卡信息'
- that.idno = uni.getStorageSync('idno')?uni.getStorageSync('idno'):'暂无身份证信息'
- that.signed = uni.getStorageSync('signed') == 'yes' ? '已绑定签约':'未绑定'
- that.tel = uni.getStorageSync('phoneX') ? uni.getStorageSync('phoneX') : '暂无手机号'
+ that.bankcardno = uni.getStorageSync('bankcardno')?uni.getStorageSync('bankcardno'):'无银行卡信息'
+ that.cardno = uni.getStorageSync('cardno')?uni.getStorageSync('cardno').substr(0,2) + '****' + uni.getStorageSync('cardno').substr(6,2):'无市民卡信息'
+ that.idno = uni.getStorageSync('idno')?uni.getStorageSync('idno'):'无身份证信息'
+ that.signed = uni.getStorageSync('signed') == 'yes' ? '已绑定签约':'未绑定签约'
+ that.tel = uni.getStorageSync('phoneX') ? uni.getStorageSync('phoneX') : '无手机号'
+ that.email = uni.getStorageSync('email') ? uni.getStorageSync('email') : '未绑定邮箱'
}
}
</script>
diff --git a/pages/sub_mine/question/index.vue b/pages/sub_mine/question/index.vue
new file mode 100644
index 0000000..8fd7082
--- /dev/null
+++ b/pages/sub_mine/question/index.vue
@@ -0,0 +1,63 @@
+<template>
+ <view class="question">
+ <u-cell-group>
+ <u-cell-item title="开启\删除密保" :arrow="false">
+ <u-icon name="mibao" custom-prefix="custom-icon" size="32" slot="icon"></u-icon>
+ <u-switch slot="right-icon" v-model="question" @change="open"></u-switch>
+ </u-cell-item>
+ </u-cell-group>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ question: false
+ }
+ },
+ methods: {
+ open(e) {
+ if (e) {
+ uni.navigateTo({
+ url: '/pages/sub_mine/setQuestion/index'
+ })
+ } else {
+ uni.showModal({
+ title: "提示",
+ content: "该操作将删除您设置的密保问题,是否继续?",
+ success: (res) => {
+ if (res.confirm) {
+ this.delate_question()
+ } else if (res.cancel) {
+ this.question = true
+ }
+ }
+ })
+ }
+ },
+ delate_question() {
+ let that = this
+ that.$u.post('/v1/security/delete').then(res => {
+ uni.showToast({
+ title: '删除成功',
+ icon: 'none'
+ })
+ })
+ },
+ get_status() {
+ let that = this
+ that.$u.get('/i/security/list?phone=').then(res => {
+ let list = res.data
+ list.length ? that.question = true : that.question = false
+ })
+ }
+ },
+ onShow() {
+ this.get_status()
+ },
+ }
+</script>
+
+<style>
+</style>
diff --git a/pages/sub_mine/setQuestion/index.vue b/pages/sub_mine/setQuestion/index.vue
new file mode 100644
index 0000000..c746443
--- /dev/null
+++ b/pages/sub_mine/setQuestion/index.vue
@@ -0,0 +1,189 @@
+<template>
+ <view class="setQuestion">
+ <view class="setQuestion-container">
+ <view class="setQuestion-item" v-for="(v,i) in list_select" :key='i'>
+ <u-field :disabled="true" :label="v.q_title" :field-style="field_style" v-model="v.q_value" input-align='right'
+ @click="choose_list(i,'confirm'+i)"></u-field>
+ <u-field :label="v.a_title" :field-style="field_style" v-model="v.a_value" input-align='right' placeholder="请输入您的答案"
+ maxlength="20"></u-field>
+ <u-picker mode="selector" v-model="v.isShow" :default-selector="[i]" :range="list" range-key="question" @confirm="v.func"></u-picker>
+ </view>
+ </view>
+ <u-button @click="submit" :custom-style="submit_btn">保存密保</u-button>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ field_style: {
+ 'font-size': '30rpx',
+ 'color': '#6a6a6a'
+ },
+ submit_btn: {
+ width: '600rpx',
+ backgroundColor: '#2FA8E1',
+ color: '#FFFFFF',
+ fontFamily: "PingFang-SC-Medium",
+ fontSize: '30rpx',
+ marginTop: '100rpx',
+ padding: '50rpx 0'
+ },
+ show: false,
+ list: [],
+ list_select: [{
+ q_title: 'Q1:',
+ q_value: '请选择您的密保问题',
+ a_value: '',
+ a_title: 'A1:',
+ isShow: false,
+ func: null
+ },
+ {
+ q_title: 'Q2:',
+ q_value: '请选择您的密保问题',
+ a_value: '',
+ a_title: 'A2:',
+ isShow: false,
+ func: null
+ },
+ {
+ q_title: 'Q3:',
+ q_value: '请选择您的密保问题',
+ a_value: '',
+ a_title: 'A3:',
+ isShow: false,
+ func: null
+ },
+ ],
+ answers: [{
+ "ssid": "",
+ "answer": ""
+ },
+ {
+ "ssid": "",
+ "answer": ""
+ },
+ {
+ "ssid": "",
+ "answer": ""
+ }
+ ],
+ pass: false
+ }
+ },
+ onLoad(optins) {
+ this.get_list()
+ },
+ methods: {
+ choose_list(e, fun_name) {
+ this.list_select[e].isShow = true
+ this.list_select[e].func = this[fun_name]
+ },
+ get_list() {
+ let that = this
+ that.$u.get('/v1/security/all').then(res => {
+ let list = res.data
+ that.list = list
+ })
+ },
+ confirm0(e) {
+ this.list_select[0].q_value = this.list[e[0]].question
+ this.list_select[0].ssid = this.list[e[0]].ssid
+ },
+ confirm1(e) {
+ this.list_select[1].q_value = this.list[e[0]].question
+ this.list_select[1].ssid = this.list[e[0]].ssid
+ },
+ confirm2(e) {
+ this.list_select[2].q_value = this.list[e[0]].question
+ this.list_select[2].ssid = this.list[e[0]].ssid
+ },
+ submit() {
+ let that = this
+ let list = that.list_select
+ let answer = that.answers
+ list.map((item, index, arr) => {
+ let ssid = item.ssid
+ let length = item.a_value.length
+ answer[index].ssid = ssid
+ answer[index].answer = item.a_value
+ })
+ let str = ''
+ answer.forEach(item => {
+ str = str + item.ssid
+ })
+ for (let i = 0; i < answer.length; i++) {
+ let item = answer[i]
+ let ssid = item.ssid
+ if (!ssid) {
+ uni.showModal({
+ title: '提示',
+ content: '请选择密保问题',
+ })
+ that.pass = false
+ break;
+ } else {
+ that.pass = true
+ }
+ let reg = new RegExp(item.ssid, "g")
+ let length = str.match(reg).length
+ if (length >= 2) {
+ uni.showModal({
+ title: '提示',
+ content: '请选择不同的密保问题',
+ })
+ that.pass = false
+ break;
+ } else {
+ that.pass = true
+ }
+
+ let value_length = item.answer.length
+ if (value_length < 2) {
+ uni.showModal({
+ title: '提示',
+ content: '未填写问题或问题答案长度小于2个字符',
+ })
+ that.pass = false
+ break;
+ } else {
+ that.pass = true
+ }
+ }
+ if (!that.pass) return
+ let param = {
+ answers: answer
+ }
+ that.$u.post('/v1/security/save', param).then(res => {
+ uni.showToast({
+ title: "保存成功",
+ icon: 'none',
+ complete(res) {
+ setTimeout(() => {
+ uni.navigateBack({
+ delta: 1
+ })
+ }, 1500)
+ }
+ })
+ })
+ }
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .setQuestion {
+ margin-top: 30rpx;
+
+ &-container {
+ background-color: #FFFFFF;
+ }
+
+ &-item {
+ margin-bottom: 30rpx;
+ }
+ }
+</style>
diff --git a/pages/sub_tabbar/index.vue b/pages/sub_tabbar/index.vue
index 0851a76..7264790 100644
--- a/pages/sub_tabbar/index.vue
+++ b/pages/sub_tabbar/index.vue
@@ -14,7 +14,7 @@
<view class="img-box" @click="toPath('/pages/sub_index/qrcode/index')">
<u-image src="/static/images/index/money.png" width="40rpx" height="40rpx" mode="aspectFit"></u-image>
</view>
- <view class="img-box" @click="toPath('/pages/sub_medical/appointment')">
+ <view class="img-box" @click="toPath('')">
<u-image src="/static/images/index/square.png" width="40rpx" height="40rpx" mode="aspectFit"></u-image>
</view>
</view>
@@ -57,7 +57,7 @@
<text class="wrap-active-con-item-desc-desc">签到即可领积分</text>
</view>
</view>
- <view class="wrap-active-con-item" @click="toUrl('/pages/sub_index/activeDetails/index?id='+ activity.articleno + '&type=' + activity.code)">
+ <view class="wrap-active-con-item" @click="activity.length == 0?'':toUrl('/pages/sub_index/activeDetails/index?id='+ activity.articleno + '&type=' + activity.code)">
<u-image src="/static/images/index/smkhd.png" width="70rpx" height="70rpx"></u-image>
<view class="wrap-active-con-item-desc">
<text class="wrap-active-con-item-desc-title">{{activity.title?activity.title:''}}</text>
@@ -105,6 +105,7 @@
</template>
<script>
+ const app = getApp()
export default {
data() {
return {
@@ -141,8 +142,26 @@
}, ]
}
},
- onShow() {},
methods: {
+ get_prompt() {
+ //提示更新或通告
+ let vername = app.globalData.vername
+ let verno = app.globalData.verno
+ let params = {
+ vername,
+ verno
+ }
+ this.$u.get('/i/app/prompt', params).then(res => {
+ let is_have_content = res.prompt
+ if (!!is_have_content) {
+ uni.showModal({
+ title: '提示',
+ content: is_have_content
+ })
+ }
+
+ })
+ },
search(e) {
uni.showToast({
icon: "none",
@@ -175,46 +194,14 @@
}
//console.log(param.url)
that.$u.get('/v1/qrcode/auth', param).then(ret => {
- //console.log(ret.data.url)
+ // console.log(ret.data)
if (ret.data.permit) {
if (ret.data.action == 'water') {
- // setTimeout(() => {
- // uni.navigateTo({
- // url: "/pages/sub_index/scanView/index?url=" + ret.data.url
- // })
- // }, 1500)
- let userid = uni.getStorageSync("userid")
- let url = ret.data.url
- if (url.indexOf("?") > 0) {
- url = url + "&userid=" + userid
- } else {
- url = url + "?userid=" + userid
- }
- let wv = plus.webview.create(url, 'webview_water', {
- backButtonAutoControl: 'close',
- popGesture: 'close'
- })
setTimeout(() => {
- wv.show()
+ uni.navigateTo({
+ url: "/pages/sub_index/scanView/index?url=" + ret.data.url
+ })
}, 1500)
- wv.drag({
- direction: 'right',
- moveMode: 'followFinger'
- }, {
- view: 'webview_water',
- moveMode: 'follow'
- }, function(e) {
- wv.close()
- });
- wv.drag({
- direction: 'left',
- moveMode: 'followFinger'
- }, {
- view: 'webview_water',
- moveMode: 'follow'
- }, function(e) {
- wv.close()
- });
} else if (ret.data.action == 'dlsmkh5') {
let token = uni.getStorageSync('token')
let wv = plus.webview.create(ret.data.url, 'webview_pay', {
@@ -241,75 +228,6 @@
// #endif
},
-
- // scan() {
- // let that = this
- // // #ifndef H5
- // // 只允许通过相机扫码
- // uni.scanCode({
- // success: function(res) {
- // let url = res.result
- // console.log(url)
- // uni.showToast({
- // title: "扫描成功",
- // icon: "none",
- // duration: 800,
- // complete() {
- // let param = {
- // url: url
- // }
- // console.log(param.url)
- // that.$u.get('/v1/qrcode/auth', param).then(ret => {
- // console.log(ret.data.url)
- // if (ret.data.permit) {
- // if (ret.data.action == 'water') {
- // setTimeout(() => {
- // uni.navigateTo({
- // url: "/pages/sub_index/scanView/index?url=" + ret.data.url
- // })
- // }, 1500)
- // } else if (ret.data.action == 'dlsmkh5') {
- // // #ifdef APP-PLUS
- // let token = uni.getStorageSync('token')
- // let wv = plus.webview.create(ret.data.url, 'webview_pay', {
- // backButtonAutoControl:'close',
- // additionalHttpHeaders: {
- // Authorization: 'Bearer ' + token
- // }
- // })
- // setTimeout(() => {
- // wv.show()
- // }, 1500)
- // // #endif
- // // #ifndef APP-PLUS
- // uni.showToast({
- // icon: "none",
- // title: "只支持app端",
- // duration: 1500
- // })
- // // #endif
- // }
- // } else {
- // uni.showToast({
- // icon: "none",
- // title: "暂不支持此二维码",
- // duration: 1500
- // })
- // }
- // })
- // }
- // })
- // }
- // });
- // // #endif
- // // #ifdef H5
- // uni.showToast({
- // icon: "none",
- // title: "H5不支持此功能",
- // duration: 1500
- // })
- // // #endif
- // },
getActivityList() {
let that = this
let param = [{
@@ -356,6 +274,10 @@
},
onLoad() {
this.getBannarList()
+ setTimeout(() => {
+ this.get_prompt()
+ }, 5 * 1000)
+ this.getActivityList()
// #ifdef APP-PLUS
//引入插件
const KJJPush = uni.requireNativePlugin('KJ-JPush');