diff --git a/epdc-resident-mp-yushan/app.json b/epdc-resident-mp-yushan/app.json index 4b6db3a..94155e0 100644 --- a/epdc-resident-mp-yushan/app.json +++ b/epdc-resident-mp-yushan/app.json @@ -159,7 +159,10 @@ "root": "subpages/extend", "name": "extend", "pages": [ - "pages/vaccines/vaccines" + "pages/vaccines/vaccines", + "pages/epidemicControl/epidemicControl", + "pages/tripReport/tripReport", + "pages/moreList/moreList" ] }, { diff --git a/epdc-resident-mp-yushan/dist/date-picker-view/index.js b/epdc-resident-mp-yushan/dist/date-picker-view/index.js new file mode 100644 index 0000000..6f14b24 --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker-view/index.js @@ -0,0 +1 @@ +"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames=_interopRequireDefault(require("../helpers/classNames")),_index=_interopRequireDefault(require("./locales/index")),_props=require("./props");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,r)}return a}function _objectSpread(t){for(var e=1;e \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker-view/index.wxss b/epdc-resident-mp-yushan/dist/date-picker-view/index.wxss new file mode 100644 index 0000000..e69de29 diff --git a/epdc-resident-mp-yushan/dist/date-picker-view/locales/en.js b/epdc-resident-mp-yushan/dist/date-picker-view/locales/en.js new file mode 100644 index 0000000..1619275 --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker-view/locales/en.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={year:"",month:"",day:"",hour:"",minute:"",am:"AM",pm:"PM"};exports.default=_default; \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker-view/locales/index.js b/epdc-resident-mp-yushan/dist/date-picker-view/locales/index.js new file mode 100644 index 0000000..1ccfa28 --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker-view/locales/index.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _en=_interopRequireDefault(require("./en")),_zh_CN=_interopRequireDefault(require("./zh_CN")),_zh_TW=_interopRequireDefault(require("./zh_TW"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default={en:_en.default,zh_CN:_zh_CN.default,zh_TW:_zh_TW.default};exports.default=_default; \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_CN.js b/epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_CN.js new file mode 100644 index 0000000..35081c3 --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_CN.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={year:"年",month:"月",day:"日",hour:"时",minute:"分",am:"上午",pm:"下午"};exports.default=_default; \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_TW.js b/epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_TW.js new file mode 100644 index 0000000..dc8b1bb --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_TW.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={year:"年",month:"月",day:"日",hour:"時",minute:"分",am:"上午",pm:"下午"};exports.default=_default; \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker-view/props.js b/epdc-resident-mp-yushan/dist/date-picker-view/props.js new file mode 100644 index 0000000..723e70c --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker-view/props.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.props=void 0;var props={prefixCls:{type:String,value:"wux-date-picker"},multiPickerPrefixCls:{type:String,value:"wux-picker"},pickerPrefixCls:{type:String,value:"wux-picker-col"},value:{type:null,value:null},itemHeight:{type:Number,value:34},itemStyle:{type:[String,Object,Array],value:""},indicatorStyle:{type:[String,Object,Array],value:""},indicatorClass:{type:String,value:""},maskStyle:{type:[String,Object,Array],value:""},maskClass:{type:String,value:""},labelAlign:{type:String,value:"center"},mode:{type:String,value:"datetime"},minuteStep:{type:Number,value:1},use12Hours:{type:Boolean,value:!1},minDate:{type:null,value:null},maxDate:{type:null,value:null},minHour:{type:Number,value:0},maxHour:{type:Number,value:23},minMinute:{type:Number,value:0},maxMinute:{type:Number,value:59},lang:{type:String,value:"zh_CN"}};exports.props=props; \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker/index.js b/epdc-resident-mp-yushan/dist/date-picker/index.js new file mode 100644 index 0000000..bf222cd --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker/index.js @@ -0,0 +1 @@ +"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_popupMixin=_interopRequireDefault(require("../helpers/popupMixin")),_props=require("../date-picker-view/props"),_utils=require("./utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var platformProps={labelPropName:"label",format:function(e,r){return(0,_utils.formatDate)(e.date,{datetime:"yyyy-MM-dd hh:mm",date:"yyyy-MM-dd",year:"yyyy",month:"yyyy-MM",time:"hh:mm"}[r.mode])}};(0,_baseComponent.default)({behaviors:[(0,_popupMixin.default)("#wux-picker",platformProps)],properties:_props.props}); \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker/index.json b/epdc-resident-mp-yushan/dist/date-picker/index.json new file mode 100644 index 0000000..c6d4c63 --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "wux-popup": "../popup/index", + "wux-date-picker-view": "../date-picker-view/index" + } +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker/index.wxml b/epdc-resident-mp-yushan/dist/date-picker/index.wxml new file mode 100644 index 0000000..b6bbbe7 --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker/index.wxml @@ -0,0 +1,45 @@ + + + + + {{ toolbar.cancelText }} + {{ toolbar.title }} + {{ toolbar.confirmText }} + + + + + + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker/index.wxss b/epdc-resident-mp-yushan/dist/date-picker/index.wxss new file mode 100644 index 0000000..548d788 --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker/index.wxss @@ -0,0 +1 @@ +.wux-date-picker__toolbar{position:relative;width:100%;font-size:34rpx;line-height:1.5;color:rgba(0,0,0,.85);background:#f7f7f8}.wux-date-picker__toolbar::before{content:" ";position:absolute;left:0;top:0;right:0;height:1PX;border-top:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 0;transform:scaleY(.5)}.wux-date-picker__inner{height:88rpx;display:-ms-flexbox;display:flex;text-align:center}.wux-date-picker__title{position:absolute;display:block;width:100%;padding:0;font-size:34rpx;font-weight:400;line-height:88rpx;color:rgba(0,0,0,.85);text-align:center;white-space:nowrap}.wux-date-picker__button{position:absolute;box-sizing:border-box;height:88rpx;line-height:88rpx;padding:0 30rpx;z-index:10}.wux-date-picker__button--cancel{left:0;color:#b2b2b2}.wux-date-picker__button--confirm{right:0;color:#33cd5f}.wux-date-picker__button--hover{background-color:#ececec} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/dist/date-picker/utils.js b/epdc-resident-mp-yushan/dist/date-picker/utils.js new file mode 100644 index 0000000..cad6da3 --- /dev/null +++ b/epdc-resident-mp-yushan/dist/date-picker/utils.js @@ -0,0 +1 @@ +"use strict";function formatDate(e,t){e instanceof Date||(e=new Date(e));var r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(var a in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("(".concat(a,")")).test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[a]:("00"+r[a]).substr((""+r[a]).length)));return t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatDate=formatDate; \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/index/index.js b/epdc-resident-mp-yushan/pages/index/index.js index d516022..b9d9a35 100644 --- a/epdc-resident-mp-yushan/pages/index/index.js +++ b/epdc-resident-mp-yushan/pages/index/index.js @@ -15,9 +15,10 @@ Page({ noticeList: [], // 通知公告列表 unReadNum: 0, // 未读数量 timestamp: '', // 时间戳 - sudokuState: { // 九宫格显隐状态 + sudokuState: { + // 九宫格显隐状态 consultAvailable: '0', // 网格专员 - appraiseAvailable: '0' // 请您监督 + appraiseAvailable: '0', // 请您监督 }, completeInfoDialogVisible: false, // 完善信息弹框显隐 gridId: '', // 网格id @@ -28,11 +29,36 @@ Page({ communityNewsList: [], currentIndex: 0, moduleList: [ - { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db9d4408de344c419bb22be21ba163b9.png', tip: '积分排名', module: 'pointRank' }, - { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/59b127e9fc8042969334c31fe0272c3f.png', tip: '指尖榆山', module: 'fingerYushan' }, - { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/ccbab2a8a4a847548a72972770009576.png', tip: '网格队伍', module: 'gridArmy' }, - { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db945b5cc30147df80923f6c5928074f.png', tip: '志愿服务', module: 'volunteerService' }, - { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/47c5baebb4d54987b4faebfeadd92a25.png', tip: '社会组织', module: 'societyOrg' } + { + icon: + 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db9d4408de344c419bb22be21ba163b9.png', + tip: '积分排名', + module: 'pointRank', + }, + { + icon: + 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/59b127e9fc8042969334c31fe0272c3f.png', + tip: '指尖榆山', + module: 'fingerYushan', + }, + { + icon: + 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/ccbab2a8a4a847548a72972770009576.png', + tip: '网格队伍', + module: 'gridArmy', + }, + { + icon: + 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db945b5cc30147df80923f6c5928074f.png', + tip: '志愿服务', + module: 'volunteerService', + }, + { + icon: + 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/47c5baebb4d54987b4faebfeadd92a25.png', + tip: '社会组织', + module: 'societyOrg', + }, ], serviceImgUrl: '', servicePhone: '', @@ -44,7 +70,7 @@ Page({ pageNo: 1, pageSize: 10, currentView: 'item', - phoneSlideState: 'close' + phoneSlideState: 'close', }, onLoad(options) { if (options.scene) { @@ -52,14 +78,17 @@ Page({ this.setData({ statusHeight: app.globalData.deviceInfo.statusHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight, - gridId: options.scene.substring(0, options.scene.length - 2) + gridId: options.scene.substring(0, options.scene.length - 2), }) - wx.setStorageSync('redirectToAddIssue', options.scene.substr(options.scene.length - 2, 2)) + wx.setStorageSync( + 'redirectToAddIssue', + options.scene.substr(options.scene.length - 2, 2) + ) } else { this.setData({ statusHeight: app.globalData.deviceInfo.statusHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight, - gridId: options.scene + gridId: options.scene, }) } } else { @@ -82,7 +111,7 @@ Page({ }, onReachBottom() { this.setData({ - loadMoreVisible: true + loadMoreVisible: true, }) if (this.data.loadMoreType === 'loading') { this.data.pageNo += 1 @@ -90,9 +119,9 @@ Page({ } }, swiperChange: function (e) { - if (e.detail.source === "touch") { + if (e.detail.source === 'touch') { this.setData({ - currentIndex: e.detail.current + currentIndex: e.detail.current, }) } }, @@ -103,64 +132,66 @@ Page({ success(res) { if (res.code) { let code = res.code - api.getToken(code).then(res => { + api.getToken(code).then((res) => { const state = res.data.userState app.globalData.infoCompleted = state wx.setStorageSync('topGridName', res.data.grid) wx.setStorageSync('token', res.data.token) that.setData({ - departmentName: res.data.grid + departmentName: res.data.grid, }) // 扫码进入 if (that.data.gridId !== '') { // 扫的是网格长码 if (that.data.gridId == 'gridLeader') { wx.redirectTo({ - url: '/pages/gridLeaderRegister/gridLeaderRegister' + url: '/pages/gridLeaderRegister/gridLeaderRegister', }) // 扫的是网格码 } else { wx.redirectTo({ - url: '/pages/formid/formid?gid=' + that.data.gridId + url: '/pages/formid/formid?gid=' + that.data.gridId, }) } } else { if (state == '4') { // 非扫码进入,通过搜索小程序直接进入的情况 wx.redirectTo({ - url: '/pages/toRegister/toRegister' + url: '/pages/toRegister/toRegister', }) } else { if (wx.getStorageSync('redirectToAddIssue')) { wx.navigateTo({ - url: '/subpages/discussion/pages/addIssue/addIssue' + url: '/subpages/discussion/pages/addIssue/addIssue', }) } else { that.initLoad() } - } } }) } else { console.log('登录失败' + res.errMsg) } - } + }, }) }, // 获取banner列表 getBannerList() { - api.bannerList('0').then(res => { - console.log('首页banner列表', res) - this.setData({ - bannerList: res.data + api + .bannerList('0') + .then((res) => { + console.log('首页banner列表', res) + this.setData({ + bannerList: res.data, + }) }) - }).catch(() => { - console.log('获取banner列表失败') - this.setData({ - bannerList: [] + .catch(() => { + console.log('获取banner列表失败') + this.setData({ + bannerList: [], + }) }) - }) }, // 获取项目列表 getProjectList() { @@ -169,76 +200,91 @@ Page({ pageSize: 10, timestamp: this.data.timestamp, searchContent: '', - firstCategoryCode: '' + firstCategoryCode: '', } - api.getProjectList(para).then(res => { - console.log('项目列表', res) - this.setData({ - projectList: res.data, + api + .getProjectList(para) + .then((res) => { + console.log('项目列表', res) + this.setData({ + projectList: res.data, + }) }) - }).catch(() => { - console.log('获取项目列表失败') - this.setData({ - projectList: [] + .catch(() => { + console.log('获取项目列表失败') + this.setData({ + projectList: [], + }) }) - }) }, // 获取最新一条消息-主要获取消息未读数 getUnreadNum() { - api.getFirstInfo().then(res => { - console.log('获取消息未读数', res) - this.setData({ - unReadNum: res.data.amount + api + .getFirstInfo() + .then((res) => { + console.log('获取消息未读数', res) + this.setData({ + unReadNum: res.data.amount, + }) + }) + .catch(() => { + console.log('获取消息未读数失败') }) - }).catch(() => { - console.log('获取消息未读数失败') - }) }, // 获取消息列表 getInfoList() { let para = { pageIndex: 1, pageSize: 10, - timestamp: this.data.timestamp + timestamp: this.data.timestamp, } - homeApi.getInfoList(para).then(res => { - console.log('消息列表', res) - this.setData({ - infoList: res.data + homeApi + .getInfoList(para) + .then((res) => { + console.log('消息列表', res) + this.setData({ + infoList: res.data, + }) + }) + .catch((err) => { + console.log('获取消息列表失败') }) - }).catch((err) => { - console.log('获取消息列表失败') - }) }, // 获取通知公告列表 getNoticeList() { let para = { pageIndex: 1, pageSize: 10, - timestamp: this.data.timestamp + timestamp: this.data.timestamp, } - homeApi.getNoticeList(para).then(res => { - this.setData({ - noticeList: res.data + homeApi + .getNoticeList(para) + .then((res) => { + this.setData({ + noticeList: res.data, + }) + }) + .catch((err) => { + console.log(err) }) - }).catch(err => { - console.log(err) - }) }, // 获取 网格员 gridmanList() { const params = { pageIndex: 1, - pageSize: 10 + pageSize: 10, } - api.gridmanList(params).then(res => { - console.log('网格员列表', res) - this.setData({ - griderList: res.data + api + .gridmanList(params) + .then((res) => { + console.log('网格员列表', res) + this.setData({ + griderList: res.data, + }) + }) + .catch((err) => { + console.error('网格员列表', err) }) - }).catch(err => { - console.error('网格员列表', err) - }) }, // 初始化加载 initLoad() { @@ -248,7 +294,7 @@ Page({ timestamp: getTimestamp(), newsList: [], loadMoreType: 'loading', - loadMoreVisible: false + loadMoreVisible: false, }) this.getBannerList() this.getProjectList() @@ -267,15 +313,15 @@ Page({ // 跳转到通知公告列表 navigateToInfoList() { wx.navigateTo({ - url: '/subpages/home/pages/notice/notice' + url: '/subpages/home/pages/notice/notice', }) }, // 消息没有数据 noMore() { wx.showToast({ - title: "暂无更多消息~", - icon: "none", - duration: 1000 + title: '暂无更多消息~', + icon: 'none', + duration: 1000, }) }, // 跳转到消息页面 @@ -287,56 +333,68 @@ Page({ const { id, url, newsflag } = e.currentTarget.dataset if (newsflag == '0') { wx.navigateTo({ - url: `/subpages/home/pages/webview/webview?url=${url}` + url: `/subpages/home/pages/webview/webview?url=${url}`, }) } else if (newsflag == '1') { wx.navigateTo({ - url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}` + url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}`, }) } }, //积分排行 navigateToIntegral() { - api.getUserInfo().then(res => { - // console.log('用户信息', res) - wx.navigateTo({ - url: "/subpages/integralCentre/pages/index/index?points=" + res.data.points + api + .getUserInfo() + .then((res) => { + // console.log('用户信息', res) + wx.navigateTo({ + url: + '/subpages/integralCentre/pages/index/index?points=' + + res.data.points, + }) + }) + .catch((err) => { + console.log(err) }) - }).catch(err => { - console.log(err) - }) }, //社区教育 navigateToEducation() { wx.navigateTo({ - url: '/subpages/education/pages/index/index' + url: '/subpages/education/pages/index/index', }) }, navigateToSynthetical() { wx.navigateTo({ - url: '/subpages/education/pages/healthyLife/healthyLife?page=zhfw' + 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) - }) + 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' + url: '/subpages/extend/pages/epidemicControl/epidemicControl', + // url: '/subpages/extend/pages/vaccines/vaccines' }) }, // 获取最新社区资讯 @@ -344,39 +402,42 @@ Page({ const params = { pageIndex: 1, pageSize: 5, - typeId: '' + typeId: '', } - homeApi.contentList(params).then(res => { - console.log('社区最新资讯', res) - this.setData({ - communityNewsList: res.data + homeApi + .contentList(params) + .then((res) => { + console.log('社区最新资讯', res) + this.setData({ + communityNewsList: res.data, + }) + }) + .catch((err) => { + console.error(err) }) - }).catch(err => { - console.error(err) - }) }, // 模块列表跳转 navigateToModule(e) { const { module } = e.currentTarget.dataset if (module === 'gridArmy') { wx.navigateTo({ - url: '/subpages/gridArmy/pages/index/index' + url: '/subpages/gridArmy/pages/index/index', }) } else if (module === 'pointRank') { wx.navigateTo({ - url: '/subpages/integralCentre/pages/index/index' + url: '/subpages/integralCentre/pages/index/index', }) } else if (module === 'volunteerService') { wx.navigateTo({ - url: '/pages/heart/heart' + url: '/pages/heart/heart', }) } else if (module === 'societyOrg') { wx.navigateTo({ - url: '/subpages/societyOrg/pages/orgList/orgList' + url: '/subpages/societyOrg/pages/orgList/orgList', }) } else if (module === 'fingerYushan') { wx.navigateTo({ - url: '/subpages/fingertipYushan/pages/index/index' + url: '/subpages/fingertipYushan/pages/index/index', }) } }, @@ -384,12 +445,12 @@ Page({ navigateToDiscussion() { if (app.globalData.infoCompleted == 0) { this.setData({ - completeInfoDialogVisible: !this.data.completeInfoDialogVisible + completeInfoDialogVisible: !this.data.completeInfoDialogVisible, }) return false } wx.navigateTo({ - url: '/pages/discussion/discussion' + url: '/pages/discussion/discussion', }) // wx.navigateTo({ // url: '/subpages/discussion/pages/addIssue/addIssue' @@ -398,37 +459,40 @@ Page({ navigateToWork() { if (app.globalData.infoCompleted == 0) { this.setData({ - completeInfoDialogVisible: !this.data.completeInfoDialogVisible + completeInfoDialogVisible: !this.data.completeInfoDialogVisible, }) return false } wx.navigateTo({ - url: '/subpages/workTodo/pages/index/index' + url: '/subpages/workTodo/pages/index/index', }) }, navigateToSumbit() { if (app.globalData.infoCompleted == 0) { this.setData({ - completeInfoDialogVisible: !this.data.completeInfoDialogVisible + completeInfoDialogVisible: !this.data.completeInfoDialogVisible, }) return false } wx.navigateTo({ - url: '/subpages/submitAdvise/pages/activeApply/activeApply' + url: '/subpages/submitAdvise/pages/activeApply/activeApply', }) }, // 获取服务电话 getImgUrl() { const imgType = '3' - api.getImgUrl(imgType).then(res => { - console.log('服务电话', res) - this.setData({ - serviceImgUrl: res.data[0].imgUrl, - servicePhone: res.data[0].remark + api + .getImgUrl(imgType) + .then((res) => { + console.log('服务电话', res) + this.setData({ + serviceImgUrl: res.data[0].imgUrl, + servicePhone: res.data[0].remark, + }) + }) + .catch((err) => { + console.error(err) }) - }).catch(err => { - console.error(err) - }) }, // 拨打便民服务电话 callPhone(e) { @@ -457,11 +521,11 @@ Page({ loadMoreType: 'none', loadMoreVisible: false, newsList: [], - currentView: `item${tab}` + currentView: `item${tab}`, }) this.data.pageNo = 1 wx.showLoading({ - title: '加载中...' + title: '加载中...', }) this.contentList() }, @@ -470,49 +534,56 @@ Page({ const params = { pageIndex: this.data.pageNo, pageSize: this.data.pageSize, - typeId: this.data.currentTab + typeId: this.data.currentTab, } - homeApi.contentList(params).then(res => { - console.log('社区最新资讯', res) - this.setData({ - newsList: this.data.newsList.concat(res.data), - loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none' + homeApi + .contentList(params) + .then((res) => { + console.log('社区最新资讯', res) + this.setData({ + newsList: this.data.newsList.concat(res.data), + loadMoreType: + res.data.length === this.data.pageSize ? 'loading' : 'none', + }) + wx.hideLoading() + }) + .catch((err) => { + console.error(err) + wx.hideLoading() }) - wx.hideLoading() - }).catch(err => { - console.error(err) - wx.hideLoading() - }) }, // 获取栏目列表 contentModuleList() { - homeApi.contentModuleList().then(res => { - console.log('栏目列表', res) - const tabList = [] - res.data.forEach(item => { - tabList.push({ label: item.typeName, value: item.id }) + homeApi + .contentModuleList() + .then((res) => { + console.log('栏目列表', res) + const tabList = [] + res.data.forEach((item) => { + tabList.push({ label: item.typeName, value: item.id }) + }) + this.setData({ + tabList: [...[{ label: '最新资讯', value: '' }], ...tabList], + }) }) - this.setData({ - tabList: [...[{ label: '最新资讯', value: '' }], ...tabList] + .catch((err) => { + console.error('', err) }) - }).catch(err => { - console.error('', err) - }) }, navigateToDetail(e) { const { id } = e.currentTarget.dataset wx.navigateTo({ - url: `/subpages/communityNews/pages/detail/detail?id=${id}` + url: `/subpages/communityNews/pages/detail/detail?id=${id}`, }) }, openPhonePannel() { this.setData({ - phoneSlideState: this.data.phoneSlideState === "open" ? "close" : "open" + phoneSlideState: this.data.phoneSlideState === 'open' ? 'close' : 'open', }) }, pageTouchEnd() { this.setData({ - phoneSlideState: "close" + phoneSlideState: 'close', }) - } -}) \ No newline at end of file + }, +}) diff --git a/epdc-resident-mp-yushan/subpages/extend/images/back-white.png b/epdc-resident-mp-yushan/subpages/extend/images/back-white.png new file mode 100644 index 0000000..946a4c6 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/back-white.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/images/by.png b/epdc-resident-mp-yushan/subpages/extend/images/by.png new file mode 100644 index 0000000..e686cc5 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/by.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/images/dingwei.png b/epdc-resident-mp-yushan/subpages/extend/images/dingwei.png new file mode 100644 index 0000000..4e8cf5a Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/dingwei.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/images/jiezhongchaxun.png b/epdc-resident-mp-yushan/subpages/extend/images/jiezhongchaxun.png new file mode 100644 index 0000000..98c8d1b Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/jiezhongchaxun.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/images/pos.png b/epdc-resident-mp-yushan/subpages/extend/images/pos.png new file mode 100644 index 0000000..d24e564 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/pos.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/images/right-sword.png b/epdc-resident-mp-yushan/subpages/extend/images/right-sword.png new file mode 100644 index 0000000..4c6f0ce Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/right-sword.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/images/wodeshangbao.png b/epdc-resident-mp-yushan/subpages/extend/images/wodeshangbao.png new file mode 100644 index 0000000..2c4928e Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/wodeshangbao.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/images/xingchengshangbao.png b/epdc-resident-mp-yushan/subpages/extend/images/xingchengshangbao.png new file mode 100644 index 0000000..6833553 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/extend/images/xingchengshangbao.png differ diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.js b/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.js new file mode 100644 index 0000000..4ede665 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.js @@ -0,0 +1,57 @@ +const app = getApp() + +Page({ + data: { + statusHeight: app.globalData.deviceInfo.statusHeight, // 自定义头部状态栏高度 + navigationHeight: app.globalData.deviceInfo.navigationHeight, // 自定义头部导航栏高度 + }, + onLoad: function (options) {}, + goBack() { + wx.navigateBack({ + delta: 1, + }) + }, + //疫苗接种 + toVaccines() { + wx.navigateTo({ + url: '/subpages/extend/pages/vaccines/vaccines', + }) + }, + // 行程上报 + toTripReport() { + wx.navigateTo({ + url: '/subpages/extend/pages/tripReport/tripReport', + }) + }, + onReady: function () {}, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () {}, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () {}, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () {}, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () {}, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () {}, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () {}, +}) diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.json b/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.json new file mode 100644 index 0000000..0381105 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "nav-bar": "/components/navbar/index" + }, + "navigationStyle": "custom", + "navigationBarTextStyle": "white", + "backgroundColor": "#f7f7f7" +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxml b/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxml new file mode 100644 index 0000000..bd0a262 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxml @@ -0,0 +1,31 @@ + + + + + 疫情防控 + + + + + + + + + + 行程上报 + 上报近期的行程信息,群防群控,共同抗击疫情。 + + > + + + + + + + 接种查询 + 查询疫苗接种情况信息,共同抗疫,人人有责 + + > + + + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxss b/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxss new file mode 100644 index 0000000..dbc41c0 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxss @@ -0,0 +1,107 @@ +page { + background: #f7f7f7; +} + +.epidemic-control { + box-sizing: border-box; + width: 100%; +} + +.header { + position: fixed; + width: 100%; + top: 0; + left: 0; + z-index: 1000; + /* background: #349c83; */ +} + +.header .header-bg { + width: 100%; + height: 100%; + position: absolute; + z-index: 10; + left: 0; + top: 0; +} + +.header .navigation { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + color: rgba(255, 255, 255, 0.9); + font-size: 32rpx; + position: relative; + z-index: 100; + letter-spacing: 2rpx; +} + +.back-icon { + width: 16rpx; + height: 28rpx; +} + +.header-title { + width: 90%; + text-align: center; +} + +.by { + width: 750rpx; + height: 410rpx; +} + +/* 头结束 */ +.box { + width: 100%; + box-sizing: border-box; + position: relative; + left: 0; + top: -100rpx; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.box-item { + box-sizing: border-box; + width: 690rpx; + height: 190rpx; + background-color: #ffffff; + border-radius: 14rpx; + display: flex; + align-items: center; + padding: 0 43rpx 29rpx; +} + +.left { + width: 86rpx; + height: 86rpx; +} + +.left image { + width: 86rpx; + height: 86rpx; +} + +.center { + /* width: calc(100% - 200rpx); */ + margin: 0 30rpx; +} + +.center-title { + font-size: 32rpx; + color: #333333; + margin-bottom: 18rpx; +} + +.center-content { + font-size: 28rpx; + color: #999999; +} + +.right { + color: #999999; +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.js b/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.js new file mode 100644 index 0000000..d6e0975 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.js @@ -0,0 +1,61 @@ +import { getTripInfoList } from '../../utils/tripReport' +Page({ + data: { + newsList: [], + pageIndex: 1, + pageSize: 10, + loadMoreVisible: true, + loadMoreType: 'loading', + isShow: false, + }, + onShow: function () { + this.getTripInfoList() + }, + // 列表点击事件 + toDetail(e) { + let type = e.currentTarget.dataset.type + wx.navigateTo({ + url: `/subpages/extend/pages/tripReport/tripReport?id=${e.currentTarget.dataset.id}&type=${type}`, + }) + }, + getTripInfoList() { + let params = { + pageIndex: this.data.pageIndex, + pageSize: this.data.pageSize, + } + if (this.data.pageIndex == 1) { + this.setData({ + newsList: [], + }) + } + getTripInfoList(params) + .then((res) => { + this.setData({ + newsList: this.data.newsList.concat(res.data), + loadMoreType: + res.data.length < this.data.pageSize ? 'none' : 'loading', + }) + if (this.data.newsList == 0) { + this.setData({ + isShow: true, + loadMoreVisible: false, + }) + } + }) + .catch((err) => { + this.setData({ + loadMoreVisible: false, + isShow: true, + }) + }) + }, + onReachBottom: function () { + if (this.data.loadMoreType == 'none') { + return + } + this.setData({ + pageIndex: ++this.data.pageIndex, + }) + this.getTripInfoList() + }, +}) diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.json b/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.json new file mode 100644 index 0000000..140e0b9 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "我的上报", + "usingComponents": { + "load-more": "../../../../components/loadMore/loadMore", + "no-data": "../../../../components/nodata/nodata" + } +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxml b/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxml new file mode 100644 index 0000000..eb5fec4 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxml @@ -0,0 +1,26 @@ + + + + + 上报时间: {{item.createdTime}} + + + + + + + {{item.comeAddressName}} + + + + + > + + + + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxss b/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxss new file mode 100644 index 0000000..438e3c3 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxss @@ -0,0 +1,78 @@ +page { + background: #f7f7f7; +} + +.more-list { + box-sizing: border-box; + width: 100%; +} + +.item-box { + box-sizing: border-box; + width: 100%; + height: 188rpx; + background: #fff; + margin-bottom: 7rpx; + padding: 30rpx 37rpx 0 31rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.item-title { + height: 80rpx; + font-size: 32rpx; + color: #000000; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.item-bottom { + display: flex; + justify-content: space-between; +} + +.item-bottom-left { + display: flex; + align-items: center; +} + + +.location-icon { + width: 26rpx; + height: 32rpx; + margin-right: 10rpx; + vertical-align: middle; +} + +.time { + font-size: 26rpx; + color: #666666; + vertical-align: middle; +} + +.item-bottom-right { + display: flex; + align-items: center; +} + +.edit { + font-size: 26rpx; + color: #bb0300; + margin-right: 53rpx; +} + +.look { + font-size: 26rpx; + color: #666666; +} + +.right-icon { + width: 16rpx; + height: 23rpx; + font-size: 28rpx; + color: #a3a3a3; +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js new file mode 100644 index 0000000..0f86415 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js @@ -0,0 +1,363 @@ +import { + saveTripInfo, + getTripInfoDetail, + deleteTripById, + getAreaInfo, +} from '../../utils/tripReport.js' +Page({ + data: { + lock: false, // 防止重复点击 + id: '', // 活动id + name: '', // 姓名 + phone: '', //手机号 + card: '', //身份证号 + visibleNowAddress: false, //级联 + nowAddressValue: [], // 现居地址ip + nowAddress: '', //现居地址 + detailAddress: '', //详细地址 + + comeFromAddress: '', //来自地址 + comeFromAddressValue: [], + visibleComeFromAddress: false, + + localTime: '', //来到本地时间 + visibleLocalTime: '', + localTimeValue: [], + + backTime: '', //返回时间 + backTimeValue: [], + visibleBackTime: false, + + actContent: '', // 备注信息 + + type: '', // 编辑 还是 查看 + options1: [ + // { + // label: '北京', + // value: '110000', + // children: [ + // { + // label: '北京市', + // value: '110000', + // children: [ + // { + // label: '东城区', + // value: '110101', + // }, + // ], + // }, + // ], + // }, + // { + // label: '上海', + // value: '310000', + // children: [ + // { + // label: '上海市', + // value: '310000', + // children: [ + // { + // label: '黄浦区', + // value: '310101', + // }, + // ], + // }, + // ], + // }, + ], + defaultFieldNames: { + value: 'id', + label: 'shortName', + }, + pid: 0, + }, + onLoad: function (options) { + this.getNowTime() + this.getAreaInfo() + if (options.id) { + this.setData({ + id: options.id, + type: options.type, + }) + } + if (this.data.type == 'look') { + this.getTripInfoDetail() + } + }, + getNowTime() { + const date = new Date() + const year = date.getFullYear() + const month = date.getMonth() + const day = date.getDate() + this.setData({ + localTimeValue: [year, month, day], + backTimeValue: [year, month, day], + }) + }, + // 获取类别 + getAreaInfo() { + getAreaInfo(this.data.pid).then((res) => { + res.data.forEach((item) => { + item.label = item.shortName + item.value = item.id + item.isLeaf = false + }) + if (this.data.pid == 0) { + this.setData({ + options1: res.data, + }) + } else { + if (res.data.length === 0) { + wx.hideLoading() + this.setData({ + visibleNowAddress: false, + visibleComeFromAddress: false, + }) + return + } + // 如果不是第一层级,要往下加children + let options1 = this.data.options1 + this.recursionMethod(options1, this.data.pid, res.data) + } + }) + }, + recursionMethod(arr, pid, children) { + arr.forEach((item) => { + if (item.id === pid) { + item.children = children + wx.hideLoading() + } + if (item.children) { + this.recursionMethod(item.children, this.data.pid, children) + } + }) + this.setData({ + options1: arr, + }) + }, + // 动态加载级联选择器 + onLoadOptions(e) { + console.log('onLoadOptions', e.detail) + const { value } = e.detail + wx.showLoading({ mask: true }) + this.setData({ + pid: value[value.length - 1], + }) + this.getAreaInfo() + }, + onLoadComeAddress(e) { + const { value } = e.detail + wx.showLoading({ mask: true }) + this.setData({ + pid: value[value.length - 1], + }) + this.getAreaInfo() + }, + // 获取申请详情 + getTripInfoDetail() { + let _this = this + getTripInfoDetail(this.data.id).then((res) => { + if (res.code == 0 && res.msg == 'success') { + if (res.data) { + this.setData({ + id: res.data.id, + name: res.data.name, + phone: res.data.mobile, + card: res.data.idCard, + nowAddress: res.data.nowAddressName, + detailAddress: res.data.nowAddressDetail, + comeFromAddress: res.data.comeAddressName, + localTime: res.data.comeDate, + backTime: res.data.backDate, + actContent: res.data.note, + }) + } + console.log('详情', res.data.backDate) + } + }) + }, + // 删除 + deleteTripById() { + wx.showModal({ + title: '提示', + content: '确定要删除吗', + success: (res) => { + if (res.confirm) { + const params = { + id: this.data.id, + } + deleteTripById(params).then((res) => { + wx.showToast({ + title: '删除成功', + icon: 'success', + duration: 2000, + success: () => { + wx.navigateBack({ + delta: 1, + }) + }, + }) + }) + } else if (res.cancel) { + console.log('用户点击取消') + } + }, + }) + }, + confirmButton() { + wx.navigateBack({ + delta: 1, + }) + }, + // 提交申请 + onSubmitApply() { + if (this.data.lock) { + return + } + if (!this.data.name.trim('')) { + this.showToast('姓名不能为空') + return + } + if (!this.data.phone.trim('')) { + this.showToast('手机号不能为空') + return + } + if (!this.data.card.trim('')) { + this.showToast('身份证号不能为空') + return + } + if (this.data.nowAddressValue.length === 0) { + this.showToast('现居住地不能为空') + return + } + if (!this.data.detailAddress.trim('')) { + this.showToast('详细地址不能为空') + return + } + if (this.data.comeFromAddressValue.length === 0) { + this.showToast('来自地区不能为空') + return + } + if (this.data.localTimeValue.length === 0) { + this.showToast('来到本地时间不能为空') + return + } + this.setData({ + lock: true, + }) + this.setData({ + nowAddress: this.data.nowAddress.split('-'), + comeFromAddress: this.data.comeFromAddress.split('-'), + }) + let params = { + name: this.data.name.trim(''), + mobile: this.data.phone.trim(''), + idCard: this.data.card.trim(''), + nowAddressCode: this.data.nowAddressValue.join(','), + nowAddressName: this.data.nowAddress.join('-'), + nowAddressDetail: this.data.detailAddress, + comeAddressCode: this.data.comeFromAddressValue.join(','), + comeAddressName: this.data.comeFromAddress.join('-'), + comeDate: this.data.localTime, + backDate: this.data.backTime, + note: this.data.actContent.trim(''), + } + saveTripInfo(params) + .then((res) => { + if (res.code == 0 && res.msg == 'success') { + this.showToast('提交成功') + setTimeout(() => { + this.setData({ + lock: false, + }) + wx.switchTab({ + url: '/pages/index/index', + }) + }, 1000) + } else { + this.setData({ + lock: false, + }) + } + }) + .catch((err) => { + this.setData({ + lock: false, + }) + }) + }, + onInputValue(e) { + let code = e.currentTarget.dataset.code + this.setData({ + [code]: e.detail.value, + }) + }, + // 简化提示 + showToast(title, time = 2500) { + wx.showToast({ + title: title || '请耐心等待...', + icon: 'none', + duration: time, + }) + }, + toApplyList() { + wx.navigateTo({ + url: '/subpages/extend/pages/moreList/moreList', + }) + }, + // 现地址 + onOpenNowAddress() { + this.setData({ + visibleNowAddress: true, + }) + }, + onCloseNowAddress() { + this.setData({ visibleNowAddress: false }) + }, + onChangeAdress(e) { + this.setData({ + nowAddressValue: e.detail.value, + nowAddress: e.detail.options.map((n) => n.label).join('-'), + }) + }, + // 来自地址 + onOpenComeFromAddress() { + this.setData({ + visibleComeFromAddress: true, + }) + }, + onCloseComeFromAddress() { + this.setData({ visibleComeFromAddress: false }) + }, + onChangeComeFromAddress(e) { + this.setData({ + comeFromAddressValue: e.detail.value, + comeFromAddress: e.detail.options.map((n) => n.label).join('-'), + }) + }, + // 来到时间 + onOpenLocalTime() { + this.setData({ + visibleLocalTime: true, + }) + }, + onConfirm(e) { + const { name, label, visible } = e.currentTarget.dataset + this.setData({ + [name]: e.detail.value, + [label]: e.detail.label, + [visible]: false, + }) + }, + onCancelTime(e) { + const { visible } = e.currentTarget.dataset + this.setData({ + [visible]: false, + }) + }, + onOpenBackTime() { + this.setData({ + visibleBackTime: true, + }) + }, +}) diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.json b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.json new file mode 100644 index 0000000..c1f88d9 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "行程上报", + "usingComponents": { + "date-time-picker": "../../../../components/DateTimePicker/index", + "wux-cascader": "../../../../dist/cascader/index", + "wux-date-picker": "../../../../dist/date-picker/index" + } +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml new file mode 100644 index 0000000..f1fb608 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml @@ -0,0 +1,162 @@ + + + + + + + 基本信息 + + + * + 姓名 + + + + + + * + 手机号 + + + + + + * + 身份证号 + + + + + + 现居住地 + + + * + 现居地 + + {{nowAddress || '请选择'}} + + + + + + + + + + + * + 详情地址 + + + + + + 行程信息 + + + * + 来自地区 + + + {{comeFromAddress || '请选择'}} + + + + + + + + * + 来到本地时间 + + {{localTime || '请选择'}} + + + + + + + + 返回时间 + + {{backTime || '请选择'}} + + + + + + + + + + + + + + 提交 + + + + + + + 基本信息 + + + 姓名 + {{name}} + + + 手机号 + {{phone}} + + + 身份证号 + {{card}} + + + + + 现居住地 + + + 现居地 + {{nowAddress}} + + + 详细地址 + {{detailAddress}} + + + + + 行程信息 + + + 来自地区 + {{comeFromAddress}} + + + 来到本地时间 + {{localTime}} + + + 返回时间 + {{backTime? backTime:'暂无'}} + + + + + 备注 + {{actContent}} + + + + + 删除 + 确定 + + + + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss new file mode 100644 index 0000000..7bf46ce --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss @@ -0,0 +1,231 @@ +.active-apply { + background-color: #f7f7f7; + position: relative; +} + +.data-form { + box-sizing: border-box; + /* margin-bottom: 10rpx; */ +} + +.data-form-item { + box-sizing: border-box; + display: flex; + align-items: center; + height: 110rpx; + border-bottom: 1px solid #eee; + background-color: #fff; + padding-left: 30rpx; + box-sizing: border-box; +} + +.data-form .must { + color: #ff0000; +} + +.data-form .item-label { + width: 150rpx; + font-size: 32rpx; + color: #333333; + display: flex; +} + +.data-form .reason-label { + width: 200rpx; +} + +.data-form .item-value { + width: 490rpx; +} + +.data-form .item-value .value-text { + width: 480rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.data-form .placeholder { + color: #c1c1c1; +} + +.data-form .item-select { + width: 60rpx; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.upload-image { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: space-around; + height: 300rpx; +} + +.upload-image .wux-upload--picture-card .wux-upload__select { + width: 214rpx !important; + height: 214rpx !important; +} + +.upload-image .wux-upload--picture-card .wux-upload__file { + width: 214rpx !important; + height: 214rpx !important; +} + +.item-select .arrow { + width: 20rpx; + height: 30rpx; +} + +.item-select .pos { + width: 34rpx; + height: 38rpx; +} + +.textarea-item { + display: flex; + flex-direction: column; + align-items: flex-start; + height: 360rpx; + /* border-bottom: 1px solid #eee; */ + background-color: #fff; + padding-left: 30rpx; + padding-top: 40rpx; + box-sizing: border-box; +} + +.textarea-item .textarea { + width: 690rpx; + padding: 24rpx 12rpx; +} + +.switch-item { + display: flex; + align-items: center; + justify-content: space-between; + height: 110rpx; + border-bottom: 1px solid #eee; + background-color: #fff; + padding-left: 30rpx; + padding-right: 30rpx; + box-sizing: border-box; +} + +.switch-item .switch-label { + width: 200rpx; + font-size: 32rpx; + color: #333333; +} + +.footer-item { + display: flex; + align-items: center; + justify-content: center; + height: 200rpx; + /* background-color: #fff; */ + padding-left: 30rpx; + box-sizing: border-box; +} + +.submit { + width: 500rpx; + height: 80rpx; + line-height: 80rpx; + text-align: center; + border-radius: 40rpx; + background-color: #ff0000; + color: #fff; +} + +/* 上传图片 start */ +.image-list { + width: 100%; + display: grid; + grid-template-columns: 214rpx 214rpx 214rpx; + grid-template-rows: 214rpx; + grid-gap: 17rpx; + height: 214rpx; +} + +.image-list .image-item { + width: 100%; + height: 100%; + position: relative; +} + +.image-list image { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 8rpx; +} + +.image-list .image-item .loading { + position: absolute; + left: 25%; + top: 25%; + width: 50%; + height: 50%; +} + +.image-list .image-item .close { + position: absolute; + top: -10rpx; + right: -10rpx; + width: 40rpx; + height: 40rpx; +} + +/* 上传图片 end */ +.apply-list { + width: 160rpx; + height: 56rpx; + position: absolute; + right: 0rpx; + /* top: -20rpx; */ + z-index: 999; +} + +.apply-list image { + width: 100%; + height: 100%; +} + +.data-form .item-label-title { + font-size: 34rpx; + color: #333333; + font-weight: bold; +} + +.delete { + width: 200rpx; + height: 72rpx; + background-image: linear-gradient(90deg, + #fc6c3b 0%, + #fe861e 51%, + #ffa000 100%), + linear-gradient(#c9c9c9, + #c9c9c9); + background-blend-mode: normal, + normal; + box-shadow: 0rpx 4rpx 27rpx 0rpx rgba(205, 205, 205, 0.33); + border-radius: 36rpx; + margin-right: 67rpx; +} + +.confirm { + width: 200rpx; + height: 72rpx; + background-image: linear-gradient(90deg, + #db1a1f 20%, + #e95027 100%), + linear-gradient(#ffffff, + #ffffff); + background-blend-mode: normal, + normal; + box-shadow: 0rpx 4rpx 27rpx 0rpx rgba(220, 28, 31, 0.29); + border-radius: 36rpx; +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/extend/utils/tripReport.js b/epdc-resident-mp-yushan/subpages/extend/utils/tripReport.js new file mode 100644 index 0000000..0117376 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/extend/utils/tripReport.js @@ -0,0 +1,22 @@ +var fly = require('../../../utils/request') + +// 行程上报 +export function saveTripInfo(params) { + return fly.post('custom/epidemic/saveTripInfo', params) +} +// 我的上报列表 +export function getTripInfoList(params) { + return fly.get('custom/epidemic/getTripInfoList', params) +} +// 我的上报详情 +export function getTripInfoDetail(id) { + return fly.get(`custom/epidemic/getTripInfoDetail?id=${id}`) +} +// 删除 +export function deleteTripById(params) { + return fly.deleted('custom/epidemic/deleteTripById', params) +} +// 级联 +export function getAreaInfo(pid) { + return fly.get(`admin/city/getAreaInfo?pid=${pid}`) +} diff --git a/epdc-resident-mp-yushan/utils/config.js b/epdc-resident-mp-yushan/utils/config.js index 0918b71..97e0369 100644 --- a/epdc-resident-mp-yushan/utils/config.js +++ b/epdc-resident-mp-yushan/utils/config.js @@ -2,13 +2,13 @@ module.exports = { BASEURL: BASEURL, WEBROOT: WEBROOT, Token: getToken, - userId: "" -}; + userId: '', +} function BASEURL() { // return 'http://192.168.51.31:9094/epdc-api/api/' // 测试环境 接口地址 - // return "https://epdc-api-test.elinkservice.cn/epdc-api/api/" // 测试环境 ip接口地址 - return 'https://epdc-yushan.elinkservice.cn/epdc-api/api/' // 现代榆山正式环境 + return 'https://epdc-api-test.elinkservice.cn/epdc-api/api/' // 测试环境 ip接口地址 + // return 'https://epdc-yushan.elinkservice.cn/epdc-api/api/' // 现代榆山正式环境 } function WEBROOT() { @@ -17,5 +17,5 @@ function WEBROOT() { } function getToken() { - return wx.getStorageSync("token"); + return wx.getStorageSync('token') } diff --git a/epdc-resident-mp-yushan/utils/request.js b/epdc-resident-mp-yushan/utils/request.js index 3970a84..cf5f978 100644 --- a/epdc-resident-mp-yushan/utils/request.js +++ b/epdc-resident-mp-yushan/utils/request.js @@ -1,31 +1,32 @@ var global = require('./config.js') -const request = function (url, options) { +const request = function (url, options) { let token = wx.getStorageSync('token') - if (token==undefined || token==null) { + if (token == undefined || token == null) { token = '' } - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { wx.request({ url: `${global.BASEURL()}${url}`, method: options.method, - data: options.method === 'GET' ? options.data : JSON.stringify(options.data), + data: + options.method === 'GET' ? options.data : JSON.stringify(options.data), header: { 'Content-Type': 'application/json; charset=UTF-8', - 'Authorization': token + Authorization: token, }, - success (response) { + success(response) { if (response.statusCode === 200) { - if(response.data.code===0){ - resolve(response.data) - }else{ + if (response.data.code === 0) { + resolve(response.data) + } else { let errmsg = response.data.msg - if(errmsg==undefined || errmsg=='undefined' ){ + if (errmsg == undefined || errmsg == 'undefined') { errmsg = '未返回错误信息' } wx.showToast({ title: errmsg, icon: 'none', - duration: 3000 + duration: 3000, }) reject(false) } @@ -33,19 +34,19 @@ const request = function (url, options) { wx.showToast({ title: '网络问题,请稍后再试。', icon: 'none', - duration: 2000 + duration: 2000, }) reject(false) } }, - fail (error) { + fail(error) { wx.showToast({ title: '网络问题,请稍后再试。', icon: 'none', - duration: 2000 + duration: 2000, }) reject(error.data) - } + }, }) }) } @@ -60,9 +61,14 @@ function post(url, options = {}) { function put(url, options = {}) { return request(url, { method: 'PUT', data: options }) } +// 写delete报错 +function deleted(url, options = {}) { + return request(url, { method: 'DELETE', data: options }) +} module.exports = { get: get, post: post, - put: put + put: put, + deleted: deleted, }