diff --git a/main.js b/main.js
index 3f0bca2..0402812 100644
--- a/main.js
+++ b/main.js
@@ -224,11 +224,7 @@ function req(url, data={}, method = 'POST', header={}) {
try{
var rdata = res.data;
if(rdata.code != CODE_SUCCESS) {
- if(rdata.code==CODE_LOGIN_EXIPRE && data.xcx_scource == Vue.prototype.USER_SOURCE_WX_H5 && url != getWxH5LoginConfigUri && data.repeat != 1){
- if(headerObj.Authorization) {
- console.log(headerObj.Authorization, url)
- return
- }
+ if((rdata.msg.indexOf('Signature verification failed')>-1 || rdata.msg.indexOf('身份认证信息未提供'))>-1 && rdata.code==CODE_LOGIN_EXIPRE && data.xcx_scource == Vue.prototype.USER_SOURCE_WX_H5 && url != getWxH5LoginConfigUri && data.repeat != 1){
removeLogin();
var logindatac = new Object();
@@ -249,17 +245,16 @@ function req(url, data={}, method = 'POST', header={}) {
showCancel: false,
content: rdata.msg ? rdata.msg : '网络错误,请重试|'+res.statusCode,
success: function (rs) {
- if (rs.confirm && rdata.code==CODE_LOGIN_EXIPRE) {
+ if (rs.confirm && rdata.code==CODE_LOGIN_EXIPRE && (rdata.msg.indexOf('Signature verification failed')>-1 || rdata.msg.indexOf('身份认证信息未提供')>-1)) {
removeLogin();
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
let pageUrl = '/'+currentPage.route;
if(data.xcx_scource == Vue.prototype.USER_SOURCE_WX_H5){
uni.navigateTo({
- url: '/pages/index/index?url='+encodeURIComponent(pageUrl)
+ url: '/pages/index/index'
});
}else{
-
}
return;
}
diff --git a/pages/modify_visitor/modify_visitor.vue b/pages/modify_visitor/modify_visitor.vue
index f7defce..a9512ed 100644
--- a/pages/modify_visitor/modify_visitor.vue
+++ b/pages/modify_visitor/modify_visitor.vue
@@ -28,19 +28,34 @@
idcardExtRule:false,
phone:'',
phoneRule:false,
+ type:1,
+ adding:false
}
},
components:{
InputBox
+ },
+ onLoad(option) {
+ if(option.type) this.type = option.type
},
methods: {
add() {
+ if(this.adding) return
+ this.adding = true
+ console.log(123)
var param = new Object()
param.real_name = this.name
param.id_no = this.idcardExt
param.mobile = this.phone
- this.$http.req('client/user/visit_user/', param, 'POST').then(data=>{
+ var that = this
+ var addtimer = setTimeout(function() {
+ that.adding = false
+ }, 5000);
+ this.$http.req('client/user/visit_user/', param, 'POST', true).then(data=>{
+ clearTimeout(addtimer)
+ this.adding = false
if(data == -1) return
+ this.$func.toPage('/pages/visitors/visitors?type='+this.type);
});
},
nameBlurEvent(value, res){
@@ -65,6 +80,7 @@
},
submit(){
this.checkSubmit()
+ this.canSubmit = true
if(!this.canSubmit) return
this.add()
}
diff --git a/pages/visitors/visitors.vue b/pages/visitors/visitors.vue
index 4f2e54e..154b17d 100644
--- a/pages/visitors/visitors.vue
+++ b/pages/visitors/visitors.vue
@@ -4,13 +4,13 @@
增加就诊人
-
+
- 张杨明
- 剩余3次
+ {{item.real_name}}
+ 剩余{{item.aam_times}}次
- 身份证尾号:0909备份
+ 身份证尾号:{{item.id_no}}
@@ -18,16 +18,16 @@
- 确认预约(已选1位)
+ 确认预约(已选{{selectCount}}位)
请确保预约就诊前在门诊先挂号
-
+
- 张杨明
- 身份证尾号:9000
+ {{item.name}}
+ 身份证尾号:{{item.id_no}}
@@ -80,7 +80,9 @@
res:true,
popContent:'删除张杨明后,就诊记录还可以查到,确定删除吗?',
popTitle:'确认删除',
- popShowCancel:true
+ popShowCancel:true,
+ visitUsers:false,
+ selectCount:0
}
},
components:{
@@ -91,12 +93,24 @@
this.getVisitors()
},
methods: {
+ chooseVisitor(info, key){
+ this.selectCount = 0
+ this.visitUsers[key].select = !this.visitUsers[key].select
+ this.$set(this.visitUsers, key, this.visitUsers[key])
+ for (let i = 0; i < this.visitUsers.length; i++) {
+ if(this.visitUsers[i].select) ++this.selectCount
+ }
+ },
getVisitors() {
var param = new Object()
param.page = 1
param.limit = 10000
this.$http.req('client/user/visit_user/', param, 'GET').then(data=>{
if(data == -1) return
+ this.visitUsers = data.data
+ for (var i = 0; i < this.visitUsers.length; i++) {
+ this.visitUsers[i].select = false
+ }
});
},
showPopCom() {
@@ -112,6 +126,10 @@
})
},
toPrebook(){
+ if(this.selectCount <= 0){
+ this.$pop.modelShow('请选择就诊人')
+ return
+ }
uni.navigateTo({
url:"/pages/prebook/prebook"
})
@@ -156,19 +174,20 @@
line-height: 50rpx;
height: 50rpx;
align-items: center;
- view:first-of-type{
+ .name{
font-size: 38rpx;
color: #333333;
letter-spacing: 3rpx;
}
- view:last-of-type{
- width: 134rpx;
+ .aam_times{
+ min-width: 134rpx;
color: #79624A;
text-align: center;
font-size: 28rpx;
background: rgba(254, 232, 198, 0.66);
border-radius: 6rpx;
height: 44rpx;
+ padding: 0 10rpx;
line-height: 44rpx;
margin-left: 56rpx;
}
@@ -181,11 +200,18 @@
img{
position: absolute;
}
+ &.active{
+ border: 2rpx solid #39D067;
+ .status{
+ display: block;
+ }
+ }
.status{
right: 0;
top: 0;
width: 98rpx;
height: 98rpx;
+ display: none;
}
.bg{
bottom: 0;