diff --git a/App.vue b/App.vue index 493643a..bb32f46 100644 --- a/App.vue +++ b/App.vue @@ -1,7 +1,25 @@ diff --git a/api/confirmCompletion/index.js b/api/confirmCompletion/index.js new file mode 100644 index 0000000..1094867 --- /dev/null +++ b/api/confirmCompletion/index.js @@ -0,0 +1,9 @@ +import request from "../request.js" + +export function orderConfirm(data) { + return request({ + url: `/nurseApp/personLogin/orderConfirm`, + method: 'POST', + data + }) +} diff --git a/components/v-sign/utils.js b/components/v-sign/utils.js new file mode 100644 index 0000000..a5a9ab7 --- /dev/null +++ b/components/v-sign/utils.js @@ -0,0 +1,15 @@ +/** + * 判断是否未数值 + * @param {Object} val + */ +export function isNumber(val) { + return !isNaN(Number(val)) +} + +/** + * 处理大小单位 + * @param {Object} val + */ +export function formatSize(val) { + return isNumber(val) ? `${val}rpx` : val +} diff --git a/components/v-sign/v-sign-action.vue b/components/v-sign/v-sign-action.vue new file mode 100644 index 0000000..65d11d1 --- /dev/null +++ b/components/v-sign/v-sign-action.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/components/v-sign/v-sign-pen.vue b/components/v-sign/v-sign-pen.vue new file mode 100644 index 0000000..9c26a66 --- /dev/null +++ b/components/v-sign/v-sign-pen.vue @@ -0,0 +1,211 @@ + + + + + diff --git a/components/v-sign/v-sign.vue b/components/v-sign/v-sign.vue new file mode 100644 index 0000000..afb3020 --- /dev/null +++ b/components/v-sign/v-sign.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/pages.json b/pages.json index 8fb5f94..d1b28c0 100644 --- a/pages.json +++ b/pages.json @@ -4,13 +4,26 @@ }, "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { + "path": "pages/startup/startup", + "style": { + "navigationBarTitleText": "启动页", + "navigationStyle": "custom" + } + }, + { + "path": "pages/confirmCompletion/confirmCompletion", + "style": { + "navigationBarTitleText": "完成确认", + "navigationBarBackgroundColor": "#ffffff" //背景颜色 + } + }, { "path": "pages/login/login", "style": { "navigationBarTitleText": "登录", - "navigationBarBackgroundColor": "#ffffff" ,//背景颜色 + "navigationBarBackgroundColor": "#ffffff", //背景颜色 "navigationStyle": "custom" } - },{ + }, { "path": "pages/personal/personal", "style": { "navigationBarTitleText": "个人信息", @@ -24,13 +37,13 @@ "navigationBarTitleText": "忘记密码", "navigationBarBackgroundColor": "#ffffff" //背景颜色 } - },{ + }, { "path": "pages/register/register", "style": { "navigationBarTitleText": "注册账号", "navigationBarBackgroundColor": "#ffffff" //背景颜色 } - },{ + }, { "path": "pages/homepage/homepage", "style": { "navigationBarTitleText": "泉医到家", @@ -38,38 +51,30 @@ } }, { - "path": "pages/confirmCompletion/confirmCompletion", + "path": "pages/taskReturn/taskReturn", "style": { - "navigationBarTitleText": "完成确认", - "navigationBarBackgroundColor": "#ffffff" //背景颜色 - } - },{ - "path" : "pages/taskReturn/taskReturn", - "style" : - { - "navigationBarTitleText": "任务退回", - "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#ffffff" //背景颜色 - } - - },{ - "path": "pages/Mymission/Mymission", - "style": { - "navigationBarTitleText": "我的任务", - + "navigationBarTitleText": "任务退回", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#ffffff" //背景颜色 } - - },{ - "path" : "pages/taskDetails/taskDetails", - "style" : - { - "navigationBarTitleText": "任务详情", - "enablePullDownRefresh": false, + + }, { + "path": "pages/Mymission/Mymission", + "style": { + "navigationBarTitleText": "我的任务", + + "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#ffffff" //背景颜色 - } - + } + + }, { + "path": "pages/taskDetails/taskDetails", + "style": { + "navigationBarTitleText": "任务详情", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#ffffff" //背景颜色 + } + }, { "path": "pages/Modifyinformation/Modifyinformation", @@ -79,24 +84,15 @@ "navigationBarBackgroundColor": "#ffffff" //背景颜色 // "navigationBarTextStyle": "white" } - }, - { - "path": "pages/startup/startup", + }, { + "path": "pages/signature/signature", "style": { - "navigationBarTitleText": "启动页" + "navigationBarTitleText": "", + "enablePullDownRefresh": false } + } - - ,{ - "path" : "pages/confirmCompletion/confirmCompletion", - "style" : - { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - - } - ], + ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", diff --git a/pages/Modifyinformation/Modifyinformation.vue b/pages/Modifyinformation/Modifyinformation.vue index 419db06..2c36b1a 100644 --- a/pages/Modifyinformation/Modifyinformation.vue +++ b/pages/Modifyinformation/Modifyinformation.vue @@ -58,10 +58,12 @@ return data => data?.nurseStationSysUserVOList?. [0]?.nurseStationName || '' }, }, - onLoad(options) { - this.info(); - this.baseurl = baseurl; - const that = this + onShow() { + let that = this + // try { + // const value = uni.getStorageSync('nursePersonId'); + // if (value) {} else {} + // } catch (e) {} try { const value = uni.getStorageSync('phonenumber'); if (value) { @@ -75,7 +77,10 @@ } } catch (e) {} this.myInfo() + this.info(); + this.baseurl = baseurl; }, + onLoad(options) {}, methods: { //上传头像 uploadImag() { @@ -98,11 +103,11 @@ gofinish() { var that = this uni.uploadFile({ - url: baseurl + '/nurseApp/personLogin/updateHeadAvatarHead', + url: baseurl + '/nurseApplet/uploadFile/uploadHeadPictureUrl', filePath: that.appPersonallist.avatar, //file: 二进制(filePath) name: 'file', formData: { //多余值 - 'userId': that.appPersonallist.userId, + 'nursePersonId': that.appPersonallist.nursePersonId, }, timeout: 5000, success(res) { @@ -112,9 +117,13 @@ that.$refs.uToast.show({ title: '修改成功', type: 'success', - url: '/pages/personal/personal', - duration: '1500' + duration: '1500', }) + setTimeout(e => { + uni.navigateBack({ + delta: 1 + }) + }, 1500) } else { that.$refs.uToast.show({ title: res.msg, diff --git a/pages/Mymission/Mymission.vue b/pages/Mymission/Mymission.vue index c1b7a5b..39e1d3e 100644 --- a/pages/Mymission/Mymission.vue +++ b/pages/Mymission/Mymission.vue @@ -2,7 +2,7 @@ - + 详情 - 去完成 + 去完成 @@ -70,22 +70,36 @@ }, { name: "已完成" }, ], - nursePersonId: 2, //护理员id + nursePersonId: '', //护理员id orderStatus: 'NOT_FINISH', // orderStatus:订单状态 未完成:NOT_FINISH,服务完成:COMPLETE pageNum: 1, pageSize: 10, //未完成任务 list: [], total: 0, + nurseItemName: '', + } + }, + watch: { + nurseItemName() { + this.selectMissioninfo() } }, methods: { + //去完成 + goconfirmCompletion(item) { + console.log(item) + uni.navigateTo({ + url: `/pages/confirmCompletion/confirmCompletion?orderDetailsId=${item.id}&orderNo=${item.orderNo}` + }) + }, //任务list selectMissioninfo() { - selectMission(this.nursePersonId, this.orderStatus, this.pageNum, this.pageSize).then(res => { - this.list = res.rows - this.total = res.total - }) + selectMission(this.nursePersonId, this.orderStatus, this.pageNum, this.pageSize, this.nurseItemName).then( + res => { + this.list = res.rows + this.total = res.total + }) }, //跳转详情页 gotask(item) { @@ -104,10 +118,11 @@ } else { this.orderStatus = 'COMPLETE' } - selectMission(this.nursePersonId, this.orderStatus, this.pageNum, this.pageSize).then(res => { - this.list = res.rows - this.total = res.total - }) + selectMission(this.nursePersonId, this.orderStatus, this.pageNum, this.pageSize, this.nurseItemName).then( + res => { + this.list = res.rows + this.total = res.total + }) }, // goorderdetails() { // uni.navigateTo({ @@ -115,26 +130,35 @@ // }) // }, }, - onLoad() { //开局调用 + onShow() { //加载的时候执行(没有次数限制) this.baseurl = baseurl - this.selectMissioninfo(); + var that = this + try { + const value = uni.getStorageSync('nursePersonId'); + if (value) { + that.nursePersonId = value + this.selectMissioninfo(); + } + } catch (e) {} }, onReachBottom() { //下滑加载 if (this.list.length >= this.total) {} else { this.pageNum++ - selectMission(this.nursePersonId, this.orderStatus, this.pageNum, this.pageSize).then(res => { - res.rows.forEach(e => { - this.list.push(e) + selectMission(this.nursePersonId, this.orderStatus, this.pageNum, this.pageSize, this.nurseItemName).then( + res => { + res.rows.forEach(e => { + this.list.push(e) + }) }) - }) } }, onPullDownRefresh() { //下拉刷新 this.pageNum = 1; - selectMission(this.nursePersonId, this.orderStatus, this.PageNum, this.PageSize).then(res => { - this.list = res.rows - this.total = res.total - }) + selectMission(this.nursePersonId, this.orderStatus, this.PageNum, this.PageSize, this.nurseItemName).then( + res => { + this.list = res.rows + this.total = res.total + }) setTimeout(function() { uni.stopPullDownRefresh(); }, 1000); diff --git a/pages/confirmCompletion/confirmCompletion.vue b/pages/confirmCompletion/confirmCompletion.vue index 470cc36..bcdb29a 100644 --- a/pages/confirmCompletion/confirmCompletion.vue +++ b/pages/confirmCompletion/confirmCompletion.vue @@ -4,31 +4,37 @@ 护理员到岗照片 - - + + + 选择图片 + + + - - + 服务结束照片 - - + + + 选择图片 + + + - @@ -37,39 +43,170 @@ 我确认已接受服务 - - - 点此签名 + + + + 点此签名 + - - + 去完成 + + + + diff --git a/pages/login/login.vue b/pages/login/login.vue index 97c07e2..c6788c6 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -49,14 +49,7 @@ if (res.code == 200) { uni.setStorageSync("phonenumber", that.phonenumber) uni.setStorageSync("password", that.password) - // uni.setStorage({ - // key: 'phonenumber', - // data: that.phonenumber - // }) - // uni.setStorage({ - // key: 'password', - // data: that.password - // }) + uni.setStorageSync("nursePersonId", res.data.nursePersonId) this.$refs.uToast.show({ title: '登录成功', type: 'success', @@ -74,7 +67,6 @@ type: 'error' }) } - }) }, //跳转注册页 diff --git a/pages/personal/personal.vue b/pages/personal/personal.vue index efe92ed..74d57d2 100644 --- a/pages/personal/personal.vue +++ b/pages/personal/personal.vue @@ -36,18 +36,14 @@ 我的设备 - - - + @@ -120,13 +116,6 @@ border-radius: 20rpx; position: relative; - .righttext { - position: absolute; - right: 12%; - top: 50%; - color: #969394; - transform: translateY(-50%); - } image { width: 18rpx; @@ -137,8 +126,7 @@ transform: translateY(-50%); } - .lefttext, - .righttext { + .lefttext { display: inline-block; } } diff --git a/pages/signature/signature.vue b/pages/signature/signature.vue new file mode 100644 index 0000000..d8d66d8 --- /dev/null +++ b/pages/signature/signature.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/pages/startup/startup.vue b/pages/startup/startup.vue index 22d79db..8cb8f42 100644 --- a/pages/startup/startup.vue +++ b/pages/startup/startup.vue @@ -14,18 +14,32 @@ }; }, - created() { - this.info(); - }, - methods: { - info() { + onShow() { + let that = this + try { + const value = uni.getStorageSync('nursePersonId'); + if (value) { + setTimeout(() => { + uni.reLaunch({ + url: '/pages/homepage/homepage' + }); + }, 2000); + } else { + setTimeout(() => { + uni.reLaunch({ + url: '/pages/login/login' + }); + }, 2000); + } + } catch (e) { setTimeout(() => { uni.reLaunch({ url: '/pages/login/login' }); }, 2000); - }, + } }, + methods: {}, } diff --git a/static/v-sign/clear.png b/static/v-sign/clear.png new file mode 100644 index 0000000..032e7aa Binary files /dev/null and b/static/v-sign/clear.png differ diff --git a/static/v-sign/next.png b/static/v-sign/next.png new file mode 100644 index 0000000..20cbf6c Binary files /dev/null and b/static/v-sign/next.png differ diff --git a/static/v-sign/prev.png b/static/v-sign/prev.png new file mode 100644 index 0000000..e81d3b9 Binary files /dev/null and b/static/v-sign/prev.png differ diff --git a/static/v-sign/save.png b/static/v-sign/save.png new file mode 100644 index 0000000..5269210 Binary files /dev/null and b/static/v-sign/save.png differ