diff --git a/app.json b/app.json index ea4109c..908904b 100644 --- a/app.json +++ b/app.json @@ -3,9 +3,8 @@ "pages/index/index", "pages/message/message", "pages/life/life", + "pages/serve/serve", "pages/mine/mine" - - ], "subPackages": [ { @@ -36,6 +35,10 @@ "text":"消息", "pagePath": "pages/message/message", "iconPath": "images/icon/home.png" + },{ + "text":"服务", + "pagePath": "pages/serve/serve", + "iconPath": "images/icon/home.png" }, { "text":"生活圈", diff --git a/app.wxss b/app.wxss index c1927ea..61e222e 100644 --- a/app.wxss +++ b/app.wxss @@ -112,10 +112,18 @@ page{ width: 56rpx; height: 56rpx; } + .icon-80{ + width: 80rpx; + height: 80rpx; + } .icon-100{ width: 100rpx; height: 100rpx; } + .icon-68{ + width: 68rpx; + height: 68rpx; + } .radius{ border-radius: 100%; } @@ -179,4 +187,13 @@ page{ } .flex-col{ flex-direction: column; +} +.w-full{ + width: 100%; +} +.h-full{ + height: 100%; +} +.mr-30{ + margin-right: 30rpx; } \ No newline at end of file diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index 944965d..2af32dd 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -22,6 +22,14 @@ Component({ selectedIconPath: "/images/icon/message-a.png", text: "消息", }, + { + pagePath: "/pages/serve/serve", + iconPath: "/images/icon/serve.png", + selectedIconPath: "/images/icon/serve.png", + bulge:true, + text: "服务", + }, + { pagePath: "/pages/life/life", iconPath: "/images/icon/life.png", diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml index f03e677..cde1fca 100644 --- a/custom-tab-bar/index.wxml +++ b/custom-tab-bar/index.wxml @@ -1,5 +1,6 @@ - + + {{item.text}} diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss index 05450bb..214fd60 100644 --- a/custom-tab-bar/index.wxss +++ b/custom-tab-bar/index.wxss @@ -27,3 +27,26 @@ font-size: 12px; margin-top: 4px; } +.bulge { + background-color: #FFF; +} +.bulge .tab-bar-bulge{ + position: absolute; + z-index: -1; + width: 64px; + height: 64px; + top: -24px; + border-radius: 50%; + background-color: #FFF; +} +.bulge .image{ + position: absolute; + width: 50px; + height: 50px; + top: -20px; +} +.bulge .tab-bar-view{ + position: relative; + bottom: -16px; + margin-top: 4px; +} \ No newline at end of file diff --git a/images/icon/000.png b/images/icon/000.png new file mode 100644 index 0000000..6a30a61 Binary files /dev/null and b/images/icon/000.png differ diff --git a/images/icon/111.png b/images/icon/111.png new file mode 100644 index 0000000..29bbe18 Binary files /dev/null and b/images/icon/111.png differ diff --git a/images/icon/333.png b/images/icon/333.png new file mode 100644 index 0000000..68dafb3 Binary files /dev/null and b/images/icon/333.png differ diff --git a/images/icon/444.png b/images/icon/444.png new file mode 100644 index 0000000..ddd65a2 Binary files /dev/null and b/images/icon/444.png differ diff --git a/images/icon/555.png b/images/icon/555.png new file mode 100644 index 0000000..3ec99c1 Binary files /dev/null and b/images/icon/555.png differ diff --git a/images/icon/3.png b/images/icon/serve.png similarity index 100% rename from images/icon/3.png rename to images/icon/serve.png diff --git a/pages/serve/serve.js b/pages/serve/serve.js new file mode 100644 index 0000000..18b40ad --- /dev/null +++ b/pages/serve/serve.js @@ -0,0 +1,71 @@ +// pages/serve/serve.js +const app = getApp() + +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData({ + statusHeight: app.globalData.deviceInfo.statusHeight, + navigationHeight: app.globalData.deviceInfo.navigationHeight, + }); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/serve/serve.json b/pages/serve/serve.json new file mode 100644 index 0000000..88bc1bc --- /dev/null +++ b/pages/serve/serve.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "van-button": "@vant/weapp/button/index" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/serve/serve.wxml b/pages/serve/serve.wxml new file mode 100644 index 0000000..eff2da7 --- /dev/null +++ b/pages/serve/serve.wxml @@ -0,0 +1,41 @@ + + + + 服务 + + + + + + 您还未办理入住 + 在线合同签订、履约保证金等 + + + + 入住办理 + + + + 入住评价 + + + + + 其他服务 + + + 故障报修 + 去处理 + + + + 报事儿 + 去处理 + + + + 共享空间 + 去处理 + + + \ No newline at end of file diff --git a/pages/serve/serve.wxss b/pages/serve/serve.wxss new file mode 100644 index 0000000..bfe0d44 --- /dev/null +++ b/pages/serve/serve.wxss @@ -0,0 +1,32 @@ +/* pages/serve/serve.wxss */ +.navigation { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + color: #333333; + font-size: 30rpx; + position: relative; + z-index: 100; + } + .header { + width: 100%; + background: linear-gradient(to right, #befeed 0%, #d5eefe 50%, #ebe9fb 100%); + height: 428rpx; + } + .body{ + position: relative; + top: -245rpx; + } + .header-card{ + background: linear-gradient(180deg, rgba(83,185,232,1) 0%,rgba(85,213,220,1) 56%,rgba(99,222,214,1) 100%); + width: calc(100vw - 40rpx); + margin: 0 auto; + top: 25px; + color: #ffffff; + } + .list{ + width: calc(100vw - 40rpx); + margin: 80rpx auto 0; + background: linear-gradient(180deg, rgba(227,244,255,1) 0%,rgba(245,249,252,1) 100%); + } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index a33ef6a..7f7cfe3 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -10,5 +10,18 @@ "autoAudits": false, "showShadowRootInWxmlPanel": true, "compileHotReLoad": true + }, + "condition": { + "miniprogram": { + "list": [ + { + "name": "身份证识别", + "pathName": "/subpages/OCRCard/pages/index/index", + "query": "", + "scene": null, + "launchMode": "default" + } + ] + } } } \ No newline at end of file diff --git a/subpages/OCRCard/image/card.png b/subpages/OCRCard/image/card.png new file mode 100644 index 0000000..21ebd92 Binary files /dev/null and b/subpages/OCRCard/image/card.png differ diff --git a/subpages/OCRCard/image/headerBg.png b/subpages/OCRCard/image/headerBg.png index ff11137..5e3c030 100644 Binary files a/subpages/OCRCard/image/headerBg.png and b/subpages/OCRCard/image/headerBg.png differ diff --git a/subpages/OCRCard/image/sm.png b/subpages/OCRCard/image/sm.png new file mode 100644 index 0000000..13ca842 Binary files /dev/null and b/subpages/OCRCard/image/sm.png differ diff --git a/subpages/OCRCard/pages/index/index.js b/subpages/OCRCard/pages/index/index.js index 449166b..257cc19 100644 --- a/subpages/OCRCard/pages/index/index.js +++ b/subpages/OCRCard/pages/index/index.js @@ -1,13 +1,12 @@ // subpages/OCRCard/pages/index/index.js const app = getApp() -import {getResidentBaseInfo} from "../../../../utils/api" Page({ /** * 页面的初始数据 */ data: { - + scanAnimation: null, }, /** @@ -24,6 +23,7 @@ Page({ * 生命周期函数--监听页面初次渲染完成 */ onReady() { + this.startScanAnimation(); }, @@ -68,52 +68,50 @@ Page({ onShareAppMessage() { }, - getTable: async function (type){ - - let parm ={ - searchKey:this.data.keyWord, - pageSize:10, - pageNo:1 - } - let {data,code,msg} = await getResidentBaseInfo(parm) - if(code == 0){ - this.setData({ - tableData: this.data.tableData.concat(data.list), - }) - }else{ - - } - }, + cardSuccess: async function(e){ console.log(e.detail); - this.setData({ - keyWord:e.detail.id.text, - tableData:[] - }) - // 跳转至居民详情页 - await this.getTable('card') - if(this.data.tableData.length != 0){ - wx.navigateTo({ - url: `/subpages/searchResult/pages/resiInfo/resiInfo?resiId=${this.data.tableData[0].resiId}`, - }) - }else{ - wx.showToast({ - title: '未查询到该居民,请录入居民信息', - duration:3000, - icon:'none', - success:function(){ - setTimeout(()=>{ - wx.navigateTo({ - url: `/subpages/addResi/pages/addResi/addResi?type=add&name=${e.detail.name.text}&idCard=${e.detail.id.text}&gender=${e.detail.gender.text}&birth=${e.detail.birth.text}`, - }) - },3000) - } - }) - } + }, back(){ wx.navigateBack({ delta: 1 }) - } + }, + startScanAnimation() { + const that = this; + const maxY = 220; // 卡片高度 - 扫描线高度,具体看视觉需求 + + function loopScan() { + // 从顶部到底部动画 + const downAnim = wx.createAnimation({ + duration: 2000, + timingFunction: 'linear', + }); + downAnim.translateY(maxY).step(); + + that.setData({ + scanAnimation: downAnim.export() + }); + + // 动画结束后,停一下然后回顶 + setTimeout(() => { + const resetAnim = wx.createAnimation({ + duration: 0, + timingFunction: 'step-start', + }); + resetAnim.translateY(0).step(); + + that.setData({ + scanAnimation: resetAnim.export() + }); + + // 再次循环 + setTimeout(loopScan, 100); + }, 2000); // 等扫完后回顶 + } + + loopScan(); // 启动动画 + } + }) \ No newline at end of file diff --git a/subpages/OCRCard/pages/index/index.wxml b/subpages/OCRCard/pages/index/index.wxml index 4603fc0..df57875 100644 --- a/subpages/OCRCard/pages/index/index.wxml +++ b/subpages/OCRCard/pages/index/index.wxml @@ -1,17 +1,24 @@ - + 身份证识别 - - - 身份识别:是在居民出示身份证原件或图片的场合下,通过OCR技术拍摄识别身份证信息。 +

+ Hi +

+ 您需要先进行身份核验。 + + + + + + 温馨提示:请先拍照或上传身份证照片进行身份识别。 - - + +
\ No newline at end of file diff --git a/subpages/OCRCard/pages/index/index.wxss b/subpages/OCRCard/pages/index/index.wxss index 68d0642..80a607b 100644 --- a/subpages/OCRCard/pages/index/index.wxss +++ b/subpages/OCRCard/pages/index/index.wxss @@ -4,21 +4,26 @@ page { min-height: 100vh; overflow-y: scroll; background-color: #f7f7f7; - } -.top20{ - margin-top: 20rpx; - } +} + +.top20 { + margin-top: 20rpx; +} + .header { width: 100%; height: 550rpx; overflow: hidden; } -.blue{ - color: #3A80E7 ; + +.blue { + color: #3A80E7; } -.red{ + +.red { color: #FF502E; } + .header .header-bg { width: 100%; height: 444rpx; @@ -26,6 +31,7 @@ page { height: 100%; z-index: -997; } + .header .navigation { width: 100%; display: flex; @@ -36,33 +42,37 @@ page { position: relative; z-index: 100; } -.gray{ - color:#999 ; + +.gray { + color: #999; font-size: 28rpx; } -.font32{ + +.font32 { font-size: 32rpx; } -.back{ + +.back { width: 30rpx; - height: 30rpx; - margin-left: 20rpx; - position: absolute; - margin-top: 20rpx; - border-radius: 0rpx; - z-index: 101; + height: 30rpx; + margin-left: 20rpx; + position: absolute; + margin-top: 20rpx; + border-radius: 0rpx; + z-index: 101; } -.body{ +.body { position: relative; - top: -200rpx; + top: -414rpx; display: flex; flex-direction: column; justify-content: center; padding: 0 70rpx; align-items: center; } -button{ + +button { height: 84rpx; line-height: 84rpx; width: 100% !important; @@ -71,12 +81,38 @@ button{ color: #fff; font-size: 33rpx; border-radius: 84rpx; - background: linear-gradient(to right, #82b4fd, #3e93fe); - margin: 160rpx 0 0!important; + background: linear-gradient(to right, #82f1f1, #08b3b3); + margin: 160rpx 0 0 !important; } -.ocr{ + +.ocr { width: 100%; } -.color{ + +.color { color: #fff; +} + +.card-image { + width: 100%; + height: 100%; +} + + +.card-container { + position: relative; + width: 440rpx; + height: 280rpx; + overflow: hidden; +} + +.scan-line { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 60rpx; + z-index: 10; + background: linear-gradient(to bottom, #b1e7e7, rgba(177, 231, 231, 0)); + pointer-events: none; } \ No newline at end of file