diff --git a/App.vue b/App.vue
index 9d7a82b..36ba049 100644
--- a/App.vue
+++ b/App.vue
@@ -4,6 +4,42 @@
doctorId:'',
doctoridStorageKey:'doctor_id'
},
+
+ onShow: function() {
+ var updateManager = uni.getUpdateManager();
+ updateManager.onCheckForUpdate(function(res) {
+ console.log("是否有最近版本", res.hasUpdate)
+ });
+
+ updateManager.onUpdateReady(function(res) {
+ uni.showModal({
+ title: '更新提示',
+ content: '新版本已经准备好,是否重启应用?',
+ showCancel: false,
+ success(res) {
+ if (res.confirm) {
+ updateManager.applyUpdate();
+ }
+ }
+ });
+ });
+
+ updateManager.onUpdateFailed(function(res) {
+ uni.showModal({
+ title: '提示',
+ content: '新版小程序下载失败\n请自行退出程序,手动卸载本程序,再运行',
+ confirmText: "知道了",
+ showCancel: false,
+ success(res) {
+ wx.exitMiniProgram({
+ success: () => {
+ console.log('退出小程序成功');
+ }
+ });
+ }
+ });
+ });
+ },
onLaunch: function(option) {
console.log(option, 'option====');
var did = false
@@ -82,7 +118,6 @@
}
},
- onShow: function() {},
onHide: function() {}
}
@@ -242,6 +277,7 @@
}
.btn{
text-align: center;
+ font-size: 32rpx;
}
.primary.btn{
background-color: #39D067;
diff --git a/components/bookBox.vue b/components/bookBox.vue
deleted file mode 100644
index 87f7190..0000000
--- a/components/bookBox.vue
+++ /dev/null
@@ -1,303 +0,0 @@
-
-
-
-
-
- {{item.month}}.{{ item.day }}
- {{item.week_desc}}
-
-
- {{item.work_desc}}
-
-
-
-
-
-
- 上午预约
-
-
- {{item.split('-')[0]}}
- {{time2remain[item]>0?("(名额余"+time2remain[item]+")"):(time2remainExpire[item]?'':'(名额已满)')}}
-
-
-
-
-
- 当前时间段不可预约
-
-
-
-
- 下午预约
-
-
- {{item.split('-')[0]}}
- {{time2remain[item]>0?("(名额余"+time2remain[item]+")"):(time2remainExpire[item]?'':'(名额已满)')}}
-
-
-
-
- 当前时间段不可预约
-
-
-
-
-
-
- {{timeList.type_text}}
- 请选择其他可预约日期
-
-
-
-
-
-
-
-
-
-
diff --git a/main.js b/main.js
index d3aa128..0e09e97 100644
--- a/main.js
+++ b/main.js
@@ -287,6 +287,12 @@ function req(url, data={}, method = 'POST', header={}) {
}
return;
}
+
+ if (rs.confirm && rdata.code!=CODE_LOGIN_EXIPRE && rdata.msg && rdata.msg.indexOf('用户信息不存在') > -1) {
+ removeLogin();
+ navToPath('/pages/index/index')
+ return;
+ }
}
});
diff --git a/pages/index/index.vue b/pages/index/index.vue
index c5c409f..df4aec0 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -3,55 +3,55 @@