diff --git a/api/index/indexApi.js b/api/index/indexApi.js index 06bbe24..2a7721e 100755 --- a/api/index/indexApi.js +++ b/api/index/indexApi.js @@ -119,6 +119,11 @@ export function getCategoryList() { name: "投票问卷", src: "/static/images/index_Voting.png", href: "/pages/questionAnswer/questionAnswer" + }, + { + name: "访客登记", + src: "/static/images/index_complaint.png", + href: "/pages/visit/addVisit" } ] diff --git a/components/uni-datetime-picker/keypress.js b/components/uni-datetime-picker/keypress.js new file mode 100644 index 0000000..9601aba --- /dev/null +++ b/components/uni-datetime-picker/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + this.$once('hook:beforeDestroy', () => { + document.removeEventListener('keyup', listener) + }) + }, + render: () => {} +} +// #endif \ No newline at end of file diff --git a/components/uni-datetime-picker/uni-datetime-picker.vue b/components/uni-datetime-picker/uni-datetime-picker.vue new file mode 100644 index 0000000..4a09b4b --- /dev/null +++ b/components/uni-datetime-picker/uni-datetime-picker.vue @@ -0,0 +1,903 @@ + + + + + diff --git a/constant/UrlConstant.js b/constant/UrlConstant.js index 5f928bc..8907330 100755 --- a/constant/UrlConstant.js +++ b/constant/UrlConstant.js @@ -163,6 +163,7 @@ const queryApplyRoomDiscountType = baseUrl + 'app/applyRoomDiscount/queryApplyRo const saveApplyRoomDiscount = baseUrl + 'app/applyRoomDiscount/saveApplyRoomDiscount'; const queryFeeDiscount = baseUrl + 'app/feeDiscount/queryFeeDiscount'; const saveRoomRenovation = baseUrl + 'app/roomRenovation/saveRoomRenovation'; +const saveAddVisit = baseUrl + "callComponent/addVisit/save"; @@ -262,4 +263,5 @@ module.exports = { saveApplyRoomDiscount: saveApplyRoomDiscount, queryFeeDiscount: queryFeeDiscount, saveRoomRenovation: saveRoomRenovation, + saveAddVisit: saveAddVisit, }; diff --git a/constant/url.js b/constant/url.js index 2dff09d..0e12a9d 100755 --- a/constant/url.js +++ b/constant/url.js @@ -144,6 +144,7 @@ export default { queryHousekeepingType: baseUrl + 'app/housekeepingType/queryHousekeepingType', queryMainCategory: baseUrl + "app/productCategory/queryMainCategoryAllGoods", queryShopCommunity: baseUrl + "app/shop/queryShopCommunity", + saveAddVisit: baseUrl + "callComponent/addVisit/save", NEED_NOT_LOGIN_PAGE: [ 'pages/login/login', diff --git a/pages.json b/pages.json index 1737678..83e77d8 100755 --- a/pages.json +++ b/pages.json @@ -652,6 +652,24 @@ "enablePullDownRefresh": false } + }, + { + "path" : "pages/visit/addVisit", + "style" : + { + "navigationBarTitleText": "访客登记", + "enablePullDownRefresh": false + } + + }, + { + "path" : "pages/visit/addVisitSuccess", + "style" : + { + "navigationBarTitleText": "登记成功", + "enablePullDownRefresh": false + } + } ], "tabBar": { diff --git a/pages/register/register.vue b/pages/register/register.vue index d51c34a..198f0f0 100755 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -18,9 +18,9 @@ - + diff --git a/pages/visit/addVisit.css b/pages/visit/addVisit.css new file mode 100644 index 0000000..d65e466 --- /dev/null +++ b/pages/visit/addVisit.css @@ -0,0 +1,10 @@ +.block__title { + margin: 0; + font-weight: 400; + font-size: 14px; + color: rgba(69, 90, 100, .6); + padding: 40rpx 30rpx 20rpx; +} +.button_up_blank { + height: 40rpx; +} \ No newline at end of file diff --git a/pages/visit/addVisit.vue b/pages/visit/addVisit.vue new file mode 100644 index 0000000..23895ac --- /dev/null +++ b/pages/visit/addVisit.vue @@ -0,0 +1,342 @@ + + + + diff --git a/pages/visit/addVisitSuccess.css b/pages/visit/addVisitSuccess.css new file mode 100644 index 0000000..f45996a --- /dev/null +++ b/pages/visit/addVisitSuccess.css @@ -0,0 +1,8 @@ +.scs-t{ + width: 100%; + text-align: center; + margin: 100rpx auto; + font-size: 40rpx; + font-weight: bold; + color: #39B54A; +} \ No newline at end of file diff --git a/pages/visit/addVisitSuccess.vue b/pages/visit/addVisitSuccess.vue new file mode 100644 index 0000000..ffd551b --- /dev/null +++ b/pages/visit/addVisitSuccess.vue @@ -0,0 +1,78 @@ + + + +