From 1e7763a240d07893954a7d03e99afb7deaf1d057 Mon Sep 17 00:00:00 2001
From: zq <136432190602163.com>
Date: Fri, 29 Nov 2024 17:58:00 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95=E5=8F=8A?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA=E3=80=81=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 3 +-
components/bookBox.vue | 114 ++++++----
components/preBookList.vue | 56 ++---
main.js | 264 +++++++++++-----------
pages.json | 6 +-
pages/book_detail/book_detail.vue | 102 +++++----
pages/index/index.vue | 142 +++++++++---
pages/modify_visitor/modify_visitor.vue | 110 ++++++---
pages/prebook/prebook.vue | 262 +++++++++-------------
pages/prebook_list/prebook_list.vue | 384 ++++++++------------------------
pages/user_modify/user_modify.vue | 80 ++++---
pages/usercenter/usercenter.vue | 44 ++--
pages/visitors/visitors.vue | 167 ++++++++------
13 files changed, 832 insertions(+), 902 deletions(-)
diff --git a/App.vue b/App.vue
index 14f3f86..63f625f 100644
--- a/App.vue
+++ b/App.vue
@@ -5,6 +5,7 @@
doctoridStorageKey:'doctor_id'
},
onLaunch: function(option) {
+ console.log(option,'option====');
if(!(option.query && option.query.did)){
var doctor_id = uni.getStorageSync(this.globalData.doctoridStorageKey)
if(doctor_id){
@@ -234,4 +235,4 @@
line-height: 40rpx !important;
height: 40rpx !important;
}
-
+
diff --git a/components/bookBox.vue b/components/bookBox.vue
index 4348faf..1408261 100644
--- a/components/bookBox.vue
+++ b/components/bookBox.vue
@@ -1,14 +1,17 @@
-
+
-
-
- {{item.date.date.substring(8,10)}}
- {{item.date.weekday}}
-
-
- {{item.date.type_text}}
-
+
+
+ {{item.month}}.{{ item.day }}
+ {{item.week_desc}}
+
+
+ {{item.work_desc}}
+
+
@@ -16,9 +19,9 @@
上午预约
-
- {{item.start}}-{{item.end}}
- ({{item.bed_count>0?item.bed_count:'满'}})
+
+ {{item}}
+ ({{time2remain[item]>0?time2remain[item]:'满'}})
@@ -31,9 +34,9 @@
下午预约
-
- {{item.start}}-{{item.end}}
- ({{item.bed_count?item.bed_count:'满'}})
+
+ {{item}}
+ ({{time2remain[item]?time2remain[item]:'满'}})
@@ -51,54 +54,69 @@
-
-
-
-
+
diff --git a/components/preBookList.vue b/components/preBookList.vue
index c9df6f7..b869381 100644
--- a/components/preBookList.vue
+++ b/components/preBookList.vue
@@ -1,52 +1,54 @@
-
+
- {{item.visitor_name}}无
- {{item.visit_date}} {{getDayOfWeek(item.visit_date)}} {{item.visit_time}}
- {{item.h_name}} {{item.depart_name}}
+ {{item.name}}无
+ {{item.date}} {{item.week_desc}} {{item.time_interval}}
+
+ {{item.hospital_name}}
+
+
- {{statusDescList[item.status]}}
- 前方{{item.wait_visit_count}}人
+ {{item.status_desc}}
+ 前方{{item.wait_visit_count}}人
-
-
-
-
+
diff --git a/main.js b/main.js
index b8e093e..896c89a 100644
--- a/main.js
+++ b/main.js
@@ -13,14 +13,14 @@ const app = new Vue({
Vue.prototype.platform = "";
Vue.prototype.isIos = "";
Vue.prototype.isIphoneXr = false;
-
-String.prototype.trim=function(){
+
+String.prototype.trim=function(){
return this.replace(/(^s*)|(s*$)/g, "");
}
const NODE_ENV = 'development';
// const NODE_ENV = 'production';
-if(NODE_ENV == 'development'){
+if(NODE_ENV == 'development'){
Vue.prototype.cssUrl = '/static/images/frontend/';
Vue.prototype.request_domain = "http://jasonyizherenxin.checkcopy.com/";
}else{
@@ -28,20 +28,20 @@ if(NODE_ENV == 'development'){
Vue.prototype.request_domain = "http://api.yizherenxin.cn/";
}
-try{
- var res = uni.getSystemInfoSync(),
- platform = res.platform.toLowerCase(),
- system = res.system.toLowerCase(),
- model = res.model.toLowerCase();
- if(system.indexOf('mac') > -1 || model.indexOf('mac') > -1 || model.indexOf('iphone 12/13 mini') > -1) platform = 'ios';
- if(system.indexOf('ios') > -1 || model.indexOf('ipad') > -1) platform = 'ios';
- Vue.prototype.platform = platform;
- Vue.prototype.isIos = platform == 'ios' ? true : false;
- Vue.prototype.isIphoneXr = (platform == "ios") && (res.model.toLowerCase().indexOf("iphone x")>-1);
- if(NODE_ENV == 'development') Vue.prototype.isIos = '';
- if(platform.indexOf('windows') > -1) Vue.prototype.isPc = true
- if(model == 'pc') Vue.prototype.isPc = true
-}catch(e){
+try{
+ var res = uni.getSystemInfoSync(),
+ platform = res.platform.toLowerCase(),
+ system = res.system.toLowerCase(),
+ model = res.model.toLowerCase();
+ if(system.indexOf('mac') > -1 || model.indexOf('mac') > -1 || model.indexOf('iphone 12/13 mini') > -1) platform = 'ios';
+ if(system.indexOf('ios') > -1 || model.indexOf('ipad') > -1) platform = 'ios';
+ Vue.prototype.platform = platform;
+ Vue.prototype.isIos = platform == 'ios' ? true : false;
+ Vue.prototype.isIphoneXr = (platform == "ios") && (res.model.toLowerCase().indexOf("iphone x")>-1);
+ if(NODE_ENV == 'development') Vue.prototype.isIos = '';
+ if(platform.indexOf('windows') > -1) Vue.prototype.isPc = true
+ if(model == 'pc') Vue.prototype.isPc = true
+}catch(e){
}
Vue.prototype.env_val = 'xcx';
@@ -71,8 +71,8 @@ function isMobile() {
}
return mobile_flag;
-}
-
+}
+
function trim(str, type = 'both') {
if (type == 'both') {
@@ -89,7 +89,7 @@ function trim(str, type = 'both') {
return str.replace(/\s+/g, '');
} else {
return str;
- }
+ }
}
function isOpenMode() {
@@ -105,10 +105,10 @@ function isOpenMode() {
system.xll = (p == "X11") || (p.indexOf("Linux") == 0);
system.ipad = (navigator.userAgent.match(/iPad/i) != null) ? true : false;
if ((system.win || system.mac || system.xll || system.ipad) && !Vue.prototype.isMobile) {
- var ua = navigator.userAgent.toLowerCase();
+ var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
// "在PC端微信上打开的"
- Vue.prototype.env_val = 'pc_weixin';
+ Vue.prototype.env_val = 'pc_weixin';
} else {
// "在PC端非微信上打开的"
Vue.prototype.env_val = 'pc';
@@ -148,7 +148,7 @@ try{
Vue.prototype.provider = Vue.prototype.provider_alipay;
}
- if(Vue.prototype.xcxtype == -1){
+ if(Vue.prototype.xcxtype == -1){
Vue.prototype.isMobile = isMobile();
isOpenMode();
}else{
@@ -172,51 +172,51 @@ if(Vue.prototype.provider == Vue.prototype.provider_weixin) {
const pagesView = getCurrentPages();
const currentPageView = pagesView[pagesView.length - 1];
Vue.prototype.View = currentPageView+'New';
-}
-
-const CODE_SUCCESS = 0;
-const CODE_ERROR = 40001;
-const CODE_LOGIN_EXIPRE = 40002;
-
-Vue.prototype.user_preview = 1;
-Vue.prototype.edit_preview = 2;
-Vue.prototype.add_preview = 3;
-Vue.prototype.edit_album = 4;
-
-// function removeLogin() {
-// uni.removeStorageSync('token');
-// }
-
+}
+
+const CODE_SUCCESS = 0;
+const CODE_ERROR = 40001;
+const CODE_LOGIN_EXIPRE = 40002;
+
+Vue.prototype.user_preview = 1;
+Vue.prototype.edit_preview = 2;
+Vue.prototype.add_preview = 3;
+Vue.prototype.edit_album = 4;
+
+// function removeLogin() {
+// uni.removeStorageSync('token');
+// }
+
function removeLogin() {
- uni.removeStorageSync("token");
- uni.removeStorageSync("uinfo");
-}
-
-function req(url, data={}, method = 'POST', header={}) {
- var domain = Vue.prototype.request_domain;
- if(Vue.prototype.appid != '') {
- data.appid = Vue.prototype.appid;
- data.xcx_scource = Vue.prototype.USER_SOURCE_WX_XCX;
- }else{
- domain = '/api/';
- if(Vue.prototype.isMobile){
- data.xcx_scource = Vue.prototype.USER_SOURCE_H5;
- if(Vue.prototype.env_val.indexOf('weixin') > -1) data.xcx_scource = Vue.prototype.USER_SOURCE_WX_H5;
- }else{
- data.xcx_scource = Vue.prototype.USER_SOURCE_PC;
- }
- }
-
- var getWxH5LoginConfigUri = 'common/wxh5_login'
- var noNeedLoginFunc = [
- getWxH5LoginConfigUri,
- 'client/user/login'
- ]
- var isNeedLogin = !noNeedLoginFunc.includes(url);
-
- var headerObj = {'content-type': 'application/x-www-form-urlencoded'};
- var token = uni.getStorageSync('token');
- if(token) headerObj.AUTH = token
+ uni.removeStorageSync("token");
+ uni.removeStorageSync("uinfo");
+}
+
+function req(url, data={}, method = 'POST', header={}) {
+ var domain = Vue.prototype.request_domain;
+ if(Vue.prototype.appid != '') {
+ data.appid = Vue.prototype.appid;
+ data.xcx_scource = Vue.prototype.USER_SOURCE_WX_XCX;
+ }else{
+ domain = '/api/';
+ if(Vue.prototype.isMobile){
+ data.xcx_scource = Vue.prototype.USER_SOURCE_H5;
+ if(Vue.prototype.env_val.indexOf('weixin') > -1) data.xcx_scource = Vue.prototype.USER_SOURCE_WX_H5;
+ }else{
+ data.xcx_scource = Vue.prototype.USER_SOURCE_PC;
+ }
+ }
+
+ var getWxH5LoginConfigUri = 'common/wxh5_login'
+ var noNeedLoginFunc = [
+ getWxH5LoginConfigUri,
+ 'client/user/login'
+ ]
+ var isNeedLogin = !noNeedLoginFunc.includes(url);
+
+ var headerObj = {'content-type': 'application/x-www-form-urlencoded'};
+ var token = uni.getStorageSync('token');
+ if(token) headerObj.AUTH = token
return new Promise((resolve, reject) => {
uni.request({
@@ -226,28 +226,28 @@ function req(url, data={}, method = 'POST', header={}) {
header: headerObj,
async: false,
success(res) {
- 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){
- removeLogin();
-
+ 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){
+ removeLogin();
+
var logindatac = new Object();
- logindatac.redirect_uri = location.origin;
- logindatac.state = 'user';
+ logindatac.redirect_uri = location.origin;
+ logindatac.state = 'user';
const pagesc = getCurrentPages();
const currentPagec = pagesc[pagesc.length - 1];
- var pageUrlc = '/'+currentPagec.route;
- uni.setStorageSync('rebackPagePath', pageUrlc);
-
- var doctor_id = uni.getStorageSync('doctor_id');
- req(getWxH5LoginConfigUri+'/?did='+doctor_id, logindatac, 'POST').then(data=>{
- if(data == -1 || !data.authurl) return;
+ var pageUrlc = '/'+currentPagec.route;
+ uni.setStorageSync('rebackPagePath', pageUrlc);
+
+ var doctor_id = uni.getStorageSync('doctor_id');
+ req(getWxH5LoginConfigUri+'/?did='+doctor_id, logindatac, 'POST').then(data=>{
+ if(data == -1 || !data.authurl) return;
location.href = data.authurl;
- });
+ });
return;
- }
+ }
uni.showModal({
title: '提示',
@@ -255,23 +255,23 @@ function req(url, data={}, method = 'POST', header={}) {
content: rdata.msg ? rdata.msg+'|'+rdata.code : '网络错误,请重试|'+res.statusCode,
success: function (rs) {
if (rs.confirm && rdata.code==CODE_LOGIN_EXIPRE) {
- 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'
- });
- }else{
+ 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'
+ });
+ }else{
}
- return;
+ return;
}
}
- });
-
+ });
+
return resolve("-1");
- }else{
+ }else{
return resolve(res.data.data);
}
}catch(e){
@@ -297,26 +297,26 @@ function req(url, data={}, method = 'POST', header={}) {
}
});
});
-}
-
+}
+
function xcx_login(url, eqdata={}, method = 'POST') {
- return new Promise((resolve, reject) => {
- wx.login({
- success (res) {
- if (res.code) {
- var pdata = new Object();
- pdata.code = res.code;
- req('client/user/login', pdata, 'POST').then(data=>{
- uni.setStorageSync('token', data.token);
- eqdata.repeat = 1;
+ return new Promise((resolve, reject) => {
+ wx.login({
+ success (res) {
+ if (res.code) {
+ var pdata = new Object();
+ pdata.code = res.code;
+ req('client/user/login', pdata, 'POST').then(data=>{
+ uni.setStorageSync('token', data.token);
+ eqdata.repeat = 1;
req(url, eqdata, method).then(data=>{
- return resolve(data);
- });
- });
- }
- }
+ return resolve(data);
+ });
+ });
+ }
+ }
});
- })
+ })
}
function toPage(path){
@@ -343,25 +343,31 @@ function toPage(path){
}
}
-}
-
-function modelShow(content, path="",title="提示") {
- uni.showModal({
- title: title,
- showCancel: false,
- content: content,
- success: function (rs) {
- if(rs.confirm && path != ""){
- toPage(path);
- }
- }
- });
-}
+}
+function modelShow(content, path="",title="提示") {
+ uni.showModal({
+ title: title,
+ showCancel: false,
+ content: content,
+ success: function (rs) {
+ if(rs.confirm && path != ""){
+ toPage(path);
+ }
+ }
+ });
+}
+//设置页main标题
+function setTitlefFunc(title) {
+ uni.setNavigationBarTitle({
+ title: title || ''
+ });
+ };
+Vue.prototype.$setTitle = {setTitlefFunc}
Vue.prototype.$pop = {modelShow}
Vue.prototype.$func = {toPage}
-Vue.prototype.$http = {req}
-Vue.prototype.$trim = {trim}
+Vue.prototype.$http = {req}
+Vue.prototype.$trim = {trim}
app.$mount()
// #endif
diff --git a/pages.json b/pages.json
index c118540..05f59bf 100644
--- a/pages.json
+++ b/pages.json
@@ -1,11 +1,11 @@
{
"pages": [
- {
+ {
"path": "pages/index/index",
"style": {
- "navigationBarTitleText": "预约就诊"
}
},
+
{
"path" : "pages/prebook_list/prebook_list",
"style" :
@@ -14,6 +14,7 @@
"enablePullDownRefresh": false
}
},
+
{
"path" : "pages/book_detail/book_detail",
"style" :
@@ -29,7 +30,6 @@
"navigationBarTitleText": "修改资料",
"enablePullDownRefresh": false
}
-
},
{
"path" : "pages/usercenter/usercenter",
diff --git a/pages/book_detail/book_detail.vue b/pages/book_detail/book_detail.vue
index b085ef0..53540ec 100644
--- a/pages/book_detail/book_detail.vue
+++ b/pages/book_detail/book_detail.vue
@@ -1,4 +1,4 @@
-
+
@@ -19,21 +19,22 @@
-
-
-
+
+
+
-
+ }
+ }
+ }
+
+
+}
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 7ac6449..b0b84de 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -3,19 +3,18 @@
+
-
+ }
+ }
+ }
+
+
+ .fixedBot{
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 124rpx;
+ background: #FFFFFF;
+ box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(181,181,181,0.13);
+ backdrop-filter: blur(20rpx);
+ display: flex;
+ .submit{
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ column-gap: 50rpx;
+ }
+ }
+ }
+
+
diff --git a/pages/prebook/prebook.vue b/pages/prebook/prebook.vue
index 2114723..39e397d 100644
--- a/pages/prebook/prebook.vue
+++ b/pages/prebook/prebook.vue
@@ -1,19 +1,19 @@
-
-
+
+
- {{depart.h_name}} {{depart.depart_name}}
+ {{depart.hospital_name}} {{depart.depart_name}}
-
+
预约信息确认
- 当前时段余号不足,只能预约{{times.remain_num}}人
+ 当前时段余号不足,只能预约{{times.remain}}人
- {{item.visitor_name}}
+ {{item.name}}
@@ -21,39 +21,39 @@
就诊人:
- {{nums[key]}}n.{{item.visitor_name}}
+ {{nums[key]}}n.{{item.name}}
医生姓名:
- {{doctorInfo.doctor_info.name}}
+ {{doctorInfo.doctor_info.doctor_name}}
就诊医院:
- {{depart.h_name}} {{depart.depart_name}}
+ {{depart.hospital_name}} {{depart.depart_name}}
看诊时间:
- {{times.date}} {{times.time_desc}} {{times.start_time}}-{{times.end_time}}
+ {{times.date}} {{times.time_desc}} {{times.time_interval}}
我再想想
确认预约
-
-
-
-
+
+
+
+
-
-
+ }
+
diff --git a/pages/prebook_list/prebook_list.vue b/pages/prebook_list/prebook_list.vue
index e0bf99b..1465e76 100644
--- a/pages/prebook_list/prebook_list.vue
+++ b/pages/prebook_list/prebook_list.vue
@@ -1,311 +1,115 @@
-
- 全部
- {{item.visitor_name}}
-
-
+
+ 全部
+ {{item.name}}
+
+
-
diff --git a/pages/user_modify/user_modify.vue b/pages/user_modify/user_modify.vue
index 5ecf4f0..8b4182a 100644
--- a/pages/user_modify/user_modify.vue
+++ b/pages/user_modify/user_modify.vue
@@ -1,12 +1,12 @@
-
+
-
+
头像
-
-
+
+
点击上传照片
@@ -28,27 +28,30 @@
保存
-
-
-
-
-
-
+ }
+ }
+ }
+
+
+ }
+
diff --git a/pages/usercenter/usercenter.vue b/pages/usercenter/usercenter.vue
index af736e0..0db3ef5 100644
--- a/pages/usercenter/usercenter.vue
+++ b/pages/usercenter/usercenter.vue
@@ -1,9 +1,9 @@
-
+
-
+
- {{uinfo.uid}}
+ {{uinfo.user_nick}}
-
-
-
-
+
+
+
+
-
-
+ }
+
diff --git a/pages/visitors/visitors.vue b/pages/visitors/visitors.vue
index 1c914b7..62c2bdb 100644
--- a/pages/visitors/visitors.vue
+++ b/pages/visitors/visitors.vue
@@ -1,16 +1,16 @@
-
-
+
+
- {{item.visitor_name}}
- {{item.remain_desc}}
+ {{item.name}}
+ 剩余{{item.remain_num}}次
- 身份证尾号:{{item.idcard_ext}}
+ 身份证尾号:{{item.idcard}}
@@ -26,19 +26,32 @@
- {{item.visitor_name}}
- 身份证尾号:{{item.idcard_ext}}
+ {{item.name}}
+ 身份证尾号:{{item.idcard}}
-
-
+
+
+
+
+
+ {{ item.hospital}}
+
+ {{item.depart }}
+ {{ item.doctor_status }}
+ {{ item.weeks }}周未看病
+
+ 剩余{{item.remain_num}}次
+ 超{{-item.remain_num}}次
@@ -53,15 +66,15 @@
@confirm="popConfirm"
@cancel="popCancel"
>
-
-
-
+
+
+
-
-
+}
+