diff --git a/epdc-resident-mp-yushan/app.json b/epdc-resident-mp-yushan/app.json index 84ae98a..a4d2eed 100644 --- a/epdc-resident-mp-yushan/app.json +++ b/epdc-resident-mp-yushan/app.json @@ -144,6 +144,13 @@ "pages/class/class", "pages/classDetail/classDetail" ] + }, + { + "root": "subpages/extend", + "name": "extend", + "pages": [ + "pages/vaccines/vaccines" + ] } ], "preloadRule": { diff --git a/epdc-resident-mp-yushan/components/moveButton/moveButton.js b/epdc-resident-mp-yushan/components/moveButton/moveButton.js new file mode 100644 index 0000000..51cf38f --- /dev/null +++ b/epdc-resident-mp-yushan/components/moveButton/moveButton.js @@ -0,0 +1,47 @@ +Component({ + data: { + }, + properties: { + areaTop: { + type: Number, + value: 0 + }, + areaLeft: { + type: Number, + value: 0 + }, + areaWidth: { + type: String, + value: '100%' + }, + areaHeight: { + type: String, + value: '100%' + }, + buttonWidth: { + type: Number, + value: 178 + }, + buttonHeight: { + type: Number, + value: 178 + }, + buttonTop: { + type: Number, + value: 1000 + }, + buttonLeft: { + type: Number, + value: 580 + }, + imgUrl: { + type: String, + value: '' + } + }, + methods: { + onClickButton () { + this.triggerEvent('movebtnCallBack') + } + } +}) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/components/moveButton/moveButton.json b/epdc-resident-mp-yushan/components/moveButton/moveButton.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/epdc-resident-mp-yushan/components/moveButton/moveButton.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/components/moveButton/moveButton.wxml b/epdc-resident-mp-yushan/components/moveButton/moveButton.wxml new file mode 100644 index 0000000..10c5065 --- /dev/null +++ b/epdc-resident-mp-yushan/components/moveButton/moveButton.wxml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/components/moveButton/moveButton.wxss b/epdc-resident-mp-yushan/components/moveButton/moveButton.wxss new file mode 100644 index 0000000..0f29c00 --- /dev/null +++ b/epdc-resident-mp-yushan/components/moveButton/moveButton.wxss @@ -0,0 +1,34 @@ + +/* 悬浮按钮 -start- */ +.movable-area{ + pointer-events:none; + z-index: 999; + width: 100%; + height: 90%; + position: fixed; + top: 60px; + left: 0; + right: 0; + bottom: 0; +} +.movable-view{ + pointer-events:auto; + width: 178rpx; + height: 178rpx; + transform: translateX(0rpx) translateY(0rpx) translateZ(0rpx) scale(1); + transform-origin: center center; + will-change: auto; + position: absolute; + top: 0rpx; + left: 0rpx; +} +.img-box { + width: 100%; + height: 100%; +} +.img-box image { + width: 100%; + height: 100%; + object-fit: cover; +} +/* 悬浮按钮 -end- */ \ No newline at end of file diff --git a/epdc-resident-mp-yushan/images/vaccines.png b/epdc-resident-mp-yushan/images/vaccines.png new file mode 100644 index 0000000..87e4da4 Binary files /dev/null and b/epdc-resident-mp-yushan/images/vaccines.png differ diff --git a/epdc-resident-mp-yushan/pages/index/index.js b/epdc-resident-mp-yushan/pages/index/index.js index 3b80e1c..f92b0d0 100644 --- a/epdc-resident-mp-yushan/pages/index/index.js +++ b/epdc-resident-mp-yushan/pages/index/index.js @@ -26,7 +26,8 @@ Page({ completeInfoDialogVisible: false, // 完善信息弹框显隐 gridId: '', // 网格id departmentName: '', // 所在网格 - isCarryLoad: false + isCarryLoad: false, + vaccinationSwitch: false, // 疫苗入口开关 }, onLoad (options) { if (options.scene) { @@ -52,6 +53,7 @@ Page({ } this.getUserState() this.data.isCarryLoad = true + this.getResidentConfig() }, onTabItemTap () { this.getUserState() @@ -173,7 +175,7 @@ Page({ projectList: res.data, }) }).catch(() => { - console.log('获取项目列表失败', res) + console.log('获取项目列表失败') this.setData({ projectList: [] }) @@ -383,5 +385,27 @@ Page({ wx.navigateTo({ url: '/subpages/education/pages/healthyLife/healthyLife?page=zhfw' }) + }, + // 获取疫苗配置 + getResidentConfig () { + homeApi.getResidentConfig().then(res => { + if (res.code === 0 && res.msg === "success") { + res.data.forEach(item => { + if (item.residentType === "vaccination_config" && item.residentCode === "vaccination_switch") { + this.setData({ + vaccinationSwitch:item.residentValue === 'on' + }) + } + }) + } + }).catch(err => { + console.log(err) + }) + }, + //疫苗接种 + toVaccines () { + wx.navigateTo({ + url: '/subpages/extend/pages/vaccines/vaccines' + }) } }) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/index/index.json b/epdc-resident-mp-yushan/pages/index/index.json index 18d52c5..ac0e809 100644 --- a/epdc-resident-mp-yushan/pages/index/index.json +++ b/epdc-resident-mp-yushan/pages/index/index.json @@ -9,6 +9,7 @@ "project": "./components/project/project", "news-list":"./components/newsList/newsList", "load-more": "../../components/loadMore/loadMore", - "complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog" + "complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog", + "move-btn": "/components/moveButton/moveButton" } } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/index/index.wxml b/epdc-resident-mp-yushan/pages/index/index.wxml index d748e7a..096dc9a 100644 --- a/epdc-resident-mp-yushan/pages/index/index.wxml +++ b/epdc-resident-mp-yushan/pages/index/index.wxml @@ -63,4 +63,14 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/toRegister/toRegister.js b/epdc-resident-mp-yushan/pages/toRegister/toRegister.js index d1fb224..7ddffaf 100644 --- a/epdc-resident-mp-yushan/pages/toRegister/toRegister.js +++ b/epdc-resident-mp-yushan/pages/toRegister/toRegister.js @@ -21,7 +21,7 @@ Page({ } }) let that = this - const versionNum = '1.2.5' + const versionNum = '1.2.8' api.getScanSwitch(versionNum).then(function (res) { console.log(res.data) let state = res.data.scanFlag diff --git a/epdc-resident-mp-yushan/project.config.json b/epdc-resident-mp-yushan/project.config.json index b592780..75e2a9d 100644 --- a/epdc-resident-mp-yushan/project.config.json +++ b/epdc-resident-mp-yushan/project.config.json @@ -41,28 +41,16 @@ "simulatorType": "wechat", "simulatorPluginLibVersion": {}, "condition": { - "search": { - "current": -1, - "list": [] - }, - "conversation": { - "current": -1, - "list": [] - }, "plugin": { - "current": -1, "list": [] }, "game": { - "currentL": -1, "list": [] }, "gamePlugin": { - "current": -1, "list": [] }, "miniprogram": { - "current": -1, "list": [ { "id": 0, @@ -84,6 +72,12 @@ "pathName": "pages/complete/complete", "query": "", "scene": null + }, + { + "name": "网格注册", + "pathName": "pages/formid/formid", + "query": "gid=1258691044142047233", + "scene": null } ] } diff --git a/epdc-resident-mp-yushan/subpages/extend/images/no-data.png b/epdc-resident-mp-yushan/subpages/extend/images/no-data.png new file mode 100644 index 0000000..dc21c26 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/no-data.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/images/top.png b/epdc-resident-mp-yushan/subpages/extend/images/top.png new file mode 100644 index 0000000..e97bd50 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/top.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.js b/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.js new file mode 100644 index 0000000..e055c71 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.js @@ -0,0 +1,79 @@ +// subpages/extend/pages/vaccines/vaccines.js +const api = require('../../utils/api') +Page({ + /** + * 页面的初始数据 + */ + data: { + userName: '', + idCard: '', + infoObj: {} + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + inputUserName (e) { + this.setData({ + userName: e.detail.value + }) + }, + inputIdCard (e) { + this.setData({ + idCard: e.detail.value + }) + }, + queryInfo () { + // console.log(this.data.userName, this.data.idCard) + this.getPrecautionList() + }, + getPrecautionList () { + if (!this.data.userName.trim('')) { + this.Toast('姓名不能为空') + return + } + if (!this.data.idCard.trim('')) { + this.Toast('身份证号不能为空') + return + } + if (this.data.idCard.length < 15) { + this.Toast('请输入正确的身份证号') + return + } + wx.showLoading({ + title: '查询中...' + }) + let param = { + userName: this.data.userName.trim(''), + idCard: this.data.idCard.trim('') + } + api.getPrecautionList(param).then(res => { + wx.hideLoading() + console.log(res.data) + this.setData({ + infoObj: res.data + }) + }).catch(err => { + wx.hideLoading() + console.log(err) + }) + }, + // 简化 toast + Toast (title, sec=2500) { + wx.showToast({ + title: title, + icon: 'none', + duration: sec + }) + } +}) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.json b/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.json new file mode 100644 index 0000000..c8a0051 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "疫苗接种", + "navigationBarBackgroundColor": "#CE0805", + "navigationBarTextStyle": "white", + "usingComponents": {} +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.wxml b/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.wxml new file mode 100644 index 0000000..a89a231 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.wxml @@ -0,0 +1,32 @@ + + + + + + + + + + + + 未查到该用户的接种记录 + + + 基本信息 + + 姓名: {{infoObj.userName}} + 身份证号: {{infoObj.idCard}} + 是否接种完成: {{infoObj.vaccinationState == '1' ? '接种中' : infoObj.vaccinationState == '2' ? '接种完成' : '未接种'}} + + + 接种信息 + + 生产企业: {{item.vaccinationCompany}} + 剂次: {{item.vaccinationNum == 1 ? '第一针' : item.vaccinationNum == 2 ? '第二针' : item.vaccinationNum == 3 ? '第三针' : '无'}} + 接种地点: {{item.vaccinationSite}} + 接种时间: {{item.vaccinationTime}} + + + + + diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.wxss b/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.wxss new file mode 100644 index 0000000..3a71588 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/vaccines/vaccines.wxss @@ -0,0 +1,89 @@ +/* subpages/extend/pages/vaccines/vaccines.wxss */ +.topbk { + width: 100%; + height: 192rpx; +} +.vacciness { + position: absolute; + top: 30rpx; + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; +} +.vacciness .query-card { + width: 690rpx; + height: 432rpx; + background: #FFFFFF; + box-shadow: 0px 5rpx 32rpx 0px rgba(184, 184, 184, 0.25); + border-radius: 14rpx; + display: flex; + flex-direction: column; + align-items: center; + padding: 50rpx 0; + box-sizing: border-box; +} +.query-card .query-input { + width: 630rpx; + height: 80rpx; + background: #F0F0F0; + border-radius: 40rpx; + margin-bottom: 30rpx; + padding-left: 32rpx; + box-sizing: border-box; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; +} +.query-card .query-button { + width: 440rpx; + height: 80rpx; + line-height: 80rpx; + color: #FFFFFF; + background: linear-gradient(90deg, #DB1A1F, #E95027); + box-shadow: 0rpx 4rpx 27rpx 0rpx rgba(220, 28, 31, 0.29); + border-radius: 40rpx; + margin-top: 30rpx; +} +.query-list { + margin-bottom: 60rpx; +} +.query-list .no-data { + margin-top: 150rpx; +} +.query-list .no-data .no-image { + width: 534rpx; + height: 250rpx; +} +.query-list .no-data .no-text { + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 500; + color: #BCBCBC; + text-align: center; +} +.query-list .list { + width: 690rpx; +} +.query-list .list .title { + margin-top: 50rpx; + font-size: 34rpx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; +} +.query-list .list .info .info-item { + margin: 20rpx 0; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 400; + color: #000000; +} +.query-list .list .info .info-line { + width: 690rpx; + height: 1px; + background: #E5E5E5; + border-radius: 1px; +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/utils/api.js b/epdc-resident-mp-yushan/subpages/extend/utils/api.js new file mode 100644 index 0000000..220e22f --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/utils/api.js @@ -0,0 +1,12 @@ +const request = require('../../../utils/request') +module.exports = { + getPrecautionList +} +/** + * 查询疫苗接种信息 + * userName + * idCard + */ +function getPrecautionList (param) { + return request.get('admin/vim/query',param) +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/utils/config.js b/epdc-resident-mp-yushan/utils/config.js index 7b609b9..aef8b9d 100644 --- a/epdc-resident-mp-yushan/utils/config.js +++ b/epdc-resident-mp-yushan/utils/config.js @@ -6,7 +6,7 @@ module.exports = { }; function BASEURL() { - // return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址 + // return 'http://115.28.104.30:17020/epdc-api/api/' // 测试环境 接口地址 // return "https://epdc-test.elinkservice.cn/epdc-api/api/" // 测试环境 ip接口地址 return 'https://epdc-yushan.elinkservice.cn/epdc-api/api/' // 微笑榆山正式环境 }