diff --git a/App.vue b/App.vue index d8ca554..4f21dca 100644 --- a/App.vue +++ b/App.vue @@ -12,14 +12,14 @@ content: "新版本已经准备好,是否重启应用?", success(res) { if (res.confirm) { - // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 updateManager.applyUpdate(); } } }); }); updateManager.onUpdateFailed(function() { - // 新的版本下载失败 + // 新的版本下载失败 uni.showModal({ title: "已经有新版本了哟~", content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~" @@ -29,8 +29,9 @@ }); updateManager.onUpdateFailed(function(res) { - // 新的版本下载失败 + // 新的版本下载失败 }); + }, onShow: function() { console.log('App Show') diff --git a/common/http.api.js b/common/http.api.js index d9c2ae7..2d2b500 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -15,6 +15,8 @@ let apiTask = { noticeList: "/api/nurse/notice-list", noticeDetail: "/api/nurse/notice-detail", statistic: "/api/nurse/statistic", + customerAndOrder: "/api/nurse/customer-and-order", + scheduleSave: "/api/nurse/schedule-save", }; // 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作 const install = (Vue, vm) => { @@ -32,6 +34,8 @@ const install = (Vue, vm) => { let noticeList = (params = {}) => vm.$u.get(apiTask.noticeList, params); let noticeDetail = (params = {}) => vm.$u.get(apiTask.noticeDetail, params); let statistic = (params = {}) => vm.$u.get(apiTask.statistic, params); + let customerAndOrder = (params = {}) => vm.$u.get(apiTask.customerAndOrder, params); + let scheduleSave = (data = {}) => vm.$u.post(apiTask.scheduleSave, data) // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 vm.$u.api = { login, @@ -45,7 +49,9 @@ const install = (Vue, vm) => { nurseCalendar, noticeList, noticeDetail, - statistic + statistic, + customerAndOrder, + scheduleSave }; }; diff --git a/components/privacy-popup/privacy-popup.vue b/components/privacy-popup/privacy-popup.vue new file mode 100644 index 0000000..f63bb85 --- /dev/null +++ b/components/privacy-popup/privacy-popup.vue @@ -0,0 +1,201 @@ + + + + + \ No newline at end of file diff --git a/manifest.json b/manifest.json index a0da06e..cdbae5c 100644 --- a/manifest.json +++ b/manifest.json @@ -63,7 +63,8 @@ "requiredPrivateInfos" : [ "getLocation" ], "optimization" : { "subPackages" : true - } + }, + "__usePrivacyCheck__" : true }, "mp-alipay" : { "usingComponents" : true diff --git a/pages/detailNursing/detailNursing.vue b/pages/detailNursing/detailNursing.vue index 9f62bc7..e030801 100644 --- a/pages/detailNursing/detailNursing.vue +++ b/pages/detailNursing/detailNursing.vue @@ -70,7 +70,7 @@ - + @@ -85,6 +85,12 @@ 分钟 + + {{ item.info.name }} + + {{item.info.time_lenth}}分钟 + + @@ -150,7 +156,7 @@ - + diff --git a/pages/order/order.vue b/pages/order/order.vue index 30f9382..3e4a5af 100644 --- a/pages/order/order.vue +++ b/pages/order/order.vue @@ -4,54 +4,66 @@ - - - - - - - - + + + + + + + + + - - - - {{item.customer.sex || '无'}} + {{ customerAddress(item.customer_address) }} - + 立即预约 + + + @@ -59,23 +71,50 @@ export default { data() { return { + isShowModal: false, inputStyle: { width: "600rpx", fontSize: "28rpx", fontWeight: "500" }, - customers: [{"id":11395,"no":"202312250933084cac20335","order_id":892,"admin_id":1,"department_id":null,"customer_id":768,"product_id":24,"date":"2023-12-25","start_time":"2023-12-25 09:31:13","end_time":"2023-12-25 11:31:20","nurse_id":90,"status":2,"address_id":1592,"created_at":"2023-12-25 09:33:08","updated_at":"2023-12-25 10:32:08","deleted_at":null,"sign_in":"2023-12-25 09:39:49","sign_in_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_in_loc":"31.26249,120.63212","sign_out":"2023-12-25 10:32:08","sign_out_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_out_loc":"31.26249,120.63212","is_error":0,"address":"金坛区直溪镇溪滨村村民委员会","month_count":"1","month_time":"0","distance":12878.6,"status_text":"已护理","customer":{"id":768,"name":"叶华","phone":"18861212210","idcard":"320124197907010227","sex":"女","birthday":"1979-07-01","contact_name":"耿志俊","contact_phone":"18861212210","idcard_address":"直溪镇溪滨村村委会大耿庄85","is_dead":0,"remark":null,"level_id":18,"created_at":"2023-11-20 13:58:47","updated_at":"2023-11-20 13:58:47","deleted_at":null,"city_id":"21","area_id":"15","street_id":"27","level_type":34,"status":1},"customer_address":{"id":1592,"name":null,"customer_id":768,"address":"金坛区直溪镇溪滨村村民委员会","comment":null,"lat":"31.868529","lng":"119.454772","created_at":"2023-11-20 13:58:47","updated_at":"2023-11-20 13:58:47","deleted_at":null,"default":1}},{"id":11396,"no":"20231225111421dc2e75816","order_id":891,"admin_id":1,"department_id":null,"customer_id":768,"product_id":17,"date":"2023-12-25","start_time":"2023-12-25 11:14:00","end_time":"2023-12-25 12:14:02","nurse_id":90,"status":2,"address_id":1592,"created_at":"2023-12-25 11:14:21","updated_at":"2023-12-25 11:19:02","deleted_at":null,"sign_in":"2023-12-25 11:14:51","sign_in_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_in_loc":"31.26249,120.63212","sign_out":"2023-12-25 11:19:01","sign_out_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_out_loc":"31.26249,120.63212","is_error":0,"address":"金坛区直溪镇溪滨村村民委员会","month_count":"1","month_time":"0","distance":12878.6,"status_text":"已护理","customer":{"id":768,"name":"叶华","phone":"18861212210","idcard":"320124197907010227","sex":"女","birthday":"1979-07-01","contact_name":"耿志俊","contact_phone":"18861212210","idcard_address":"直溪镇溪滨村村委会大耿庄85","is_dead":0,"remark":null,"level_id":18,"created_at":"2023-11-20 13:58:47","updated_at":"2023-11-20 13:58:47","deleted_at":null,"city_id":"21","area_id":"15","street_id":"27","level_type":34,"status":1},"customer_address":{"id":1592,"name":null,"customer_id":768,"address":"金坛区直溪镇溪滨村村民委员会","comment":null,"lat":"31.868529","lng":"119.454772","created_at":"2023-11-20 13:58:47","updated_at":"2023-11-20 13:58:47","deleted_at":null,"default":1}},{"id":11397,"no":"20231225112026a43896149","order_id":893,"admin_id":1,"department_id":null,"customer_id":767,"product_id":24,"date":"2023-12-25","start_time":"2023-12-25 11:20:19","end_time":"2023-12-25 12:20:20","nurse_id":90,"status":1,"address_id":1591,"created_at":"2023-12-25 11:20:26","updated_at":"2023-12-25 11:20:44","deleted_at":null,"sign_in":"2023-12-25 11:20:44","sign_in_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_in_loc":"31.26249,120.63212","sign_out":null,"sign_out_address":null,"sign_out_loc":null,"is_error":0,"address":"直溪镇新河村退役军人服务站","month_count":null,"month_time":null,"distance":12878.6,"status_text":"护理中","customer":{"id":767,"name":"吴浩","phone":"13813519467","idcard":"320482199412044619","sex":"男","birthday":"1994-12-04","contact_name":"吴冬兆","contact_phone":"13813519467","idcard_address":"直溪镇新河村村委会上新河村8号","is_dead":0,"remark":null,"level_id":19,"created_at":"2023-11-20 13:51:25","updated_at":"2023-11-20 13:51:25","deleted_at":null,"city_id":"21","area_id":"15","street_id":"27","level_type":35,"status":1},"customer_address":{"id":1591,"name":null,"customer_id":767,"address":"直溪镇新河村退役军人服务站","comment":null,"lat":"31.836242","lng":"119.508225","created_at":"2023-11-20 13:51:25","updated_at":"2023-11-20 13:51:25","deleted_at":null,"default":1}}] + customers: [], }; }, methods: { - toAddOrder () { + toAddOrder (item) { + if (((Number(item.all_worth)) - Number(item.total_worth)) <= 0) { + this.isShowModal = true; + return + } + this.$u.vuex('vuex_selected_customer', item) uni.$u.throttle(() => { uni.navigateTo({ url: `/pages/order/addOrder` }) }) + }, + + async getCustomer () { + const res = await this.$u.api.customerAndOrder() + console.log(res) + this.customers = res } - } + }, + computed: { + customerAddress () { + return function (addresses) { + return addresses.find(i => i.default)?.address || addresses[0]?.address || '无' + } + }, + hasFormat () { + return function (item) { + return (Number(item.all_worth)) - Number(item.total_worth) + } + } + }, + onShow() { + this.getCustomer() + }, } @@ -130,11 +169,19 @@ export default { padding-left: 24rpx; .name { - width: 270rpx; height: 48rpx; font-size: 32rpx; font-weight: 500; color: #333333; + display: flex; + align-items: center; + + .time { + color: #3877f6; + + margin-left: auto; + margin-right: 20rpx; + } } .tel { @@ -178,7 +225,7 @@ export default { justify-content: center; align-items: center; - margin-right: 20rpx; + margin-left: 20rpx; .sex-text { width: 28rpx; diff --git a/pages/todayNursing/todayNursing.vue b/pages/todayNursing/todayNursing.vue index 15cc8c0..285a188 100644 --- a/pages/todayNursing/todayNursing.vue +++ b/pages/todayNursing/todayNursing.vue @@ -2,17 +2,17 @@ - - - - 刷新 - - - 护理地图 - - - - + + + + 刷新 + + + 护理地图 + + + + @@ -94,15 +94,18 @@ +