diff --git a/images/home/signin.png b/images/home/signin.png new file mode 100644 index 0000000..dc4b961 Binary files /dev/null and b/images/home/signin.png differ diff --git a/images/home/signined.png b/images/home/signined.png new file mode 100644 index 0000000..2d5c436 Binary files /dev/null and b/images/home/signined.png differ diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js index 57fb268..82b9c6b 100644 --- a/pages/indexNew/indexNew.js +++ b/pages/indexNew/indexNew.js @@ -75,11 +75,16 @@ Page({ workGridId:'', //工作网格7.08 completeInfoDialogVisible: false, //完善信息 homePagePhone: {}, - fromprogram: '' //来自工作端=work 或者 数据分析端=leader 的跳转 + fromprogram: '', //来自工作端=work 或者 数据分析端=leader 的跳转, + visible: false, + signMsg: '', + signCode: 0, + isSignUp: 0 }, onShow: function () { if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) { if (!this.data.first) { + this.getUserInfo() this.loadGridList() this.getBannerList() this.getFirstInfo() @@ -361,6 +366,7 @@ Page({ } that.getResidentConfig() that.getHomePhone() + that.getUserInfo() that.loadGridList() that.getBannerList() that.getFirstInfo() @@ -630,5 +636,49 @@ Page({ } else { return false } + }, + // 获取用户信息 + getUserInfo () { + api.getUserInfo().then(res => { + console.log("用户信息", res) + this.setData({ + isSignUp: res.data.isSignUp + }) + }).catch(err => { + this.setData({ + isSignUp: 0 + }) + console.log(err) + }) + }, + //签到 2020.07.31 + toSignIn () { + if (this.data.isSignUp == 1) { + return + } + api.userInfoSignUp().then(res => { + console.log(res.data) + if (res.code === 0) { + // 显示提醒 + this.setData({ + signCode: res.code, + signMsg: res.data, + visible: true + }); + } else { + this.setData({ + signCode: res.code, + signMsg: res.msg, + visible: true + }); + } + }) + }, + // 关闭签到提醒 + onClose() { + this.getUserInfo() + this.setData({ + visible: false + }); } }) \ No newline at end of file diff --git a/pages/indexNew/indexNew.json b/pages/indexNew/indexNew.json index 0b63bd2..49f2c18 100644 --- a/pages/indexNew/indexNew.json +++ b/pages/indexNew/indexNew.json @@ -5,6 +5,7 @@ "usingComponents": { "nav-bar": "/components/navbar/index", "load-more": "../../components/loadMore/loadMore", - "complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog" + "complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog", + "wux-popup": "../../dist/popup/index" } } \ No newline at end of file diff --git a/pages/indexNew/indexNew.wxml b/pages/indexNew/indexNew.wxml index 27124e0..e95deae 100644 --- a/pages/indexNew/indexNew.wxml +++ b/pages/indexNew/indexNew.wxml @@ -15,6 +15,10 @@ {{departmentName}} + + + + @@ -169,4 +173,9 @@ - \ No newline at end of file + + + + + 确定 + \ No newline at end of file diff --git a/pages/indexNew/indexNew.wxss b/pages/indexNew/indexNew.wxss index ac9a988..4000388 100644 --- a/pages/indexNew/indexNew.wxss +++ b/pages/indexNew/indexNew.wxss @@ -60,9 +60,22 @@ page { z-index: 10; } +.belong-grid .newbelong-grid .signin-btn { + width: 140rpx; + height: 44rpx; + position: absolute; + z-index: 99; + right: 80rpx; +} + +.belong-grid .newbelong-grid .signin-btn image { + width: 100%; + height: 100%; +} + .belong-grid .newbelong-grid .grid { /* width: 90%; */ - width: calc(100% - 129rpx); + width: calc(100% - 240rpx); height: 34rpx; position: relative; z-index: 100; @@ -89,7 +102,7 @@ page { } .belong-grid .newbelong-grid .my-and-news { - width: 129rpx; + width: 80rpx; height: 34rpx; position: relative; z-index: 100; @@ -631,3 +644,10 @@ page { height: 100%; width: 100%; } + +.popup__button { + width: 100%; + text-align: center; + font-size: 36rpx; + color: #04BCA0; +} \ No newline at end of file diff --git a/pages/mine/mine.js b/pages/mine/mine.js index 5395c43..f84b5cc 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -335,34 +335,34 @@ Page({ }) }, - //签到 2020.07.24 - toSignUp () { - if (this.data.userInfo.isSignUp == 1) { - return - } - api.userInfoSignUp().then(res => { - console.log(res.data) - if (res.code === 0) { - // 显示提醒 - this.setData({ - signCode: res.code, - signMsg: res.data, - visible: true - }); - } else { - this.setData({ - signCode: res.code, - signMsg: res.msg, - visible: true - }); - } - }) - }, - // 关闭签到提醒 - onClose() { - this.getUserInfo() - this.setData({ - visible: false - }); - } + // 签到 2020.07.24 + // toSignUp () { + // if (this.data.userInfo.isSignUp == 1) { + // return + // } + // api.userInfoSignUp().then(res => { + // console.log(res.data) + // if (res.code === 0) { + // // 显示提醒 + // this.setData({ + // signCode: res.code, + // signMsg: res.data, + // visible: true + // }); + // } else { + // this.setData({ + // signCode: res.code, + // signMsg: res.msg, + // visible: true + // }); + // } + // }) + // }, + // // 关闭签到提醒 + // onClose() { + // this.getUserInfo() + // this.setData({ + // visible: false + // }); + // } }) \ No newline at end of file diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index c0f0554..c4d442c 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -26,14 +26,14 @@ - + diff --git a/project.config.json b/project.config.json index 6fc0371..24ee6f9 100644 --- a/project.config.json +++ b/project.config.json @@ -17,15 +17,15 @@ "checkInvalidKey": true, "checkSiteMap": true, "uploadWithSourceMap": true, - "compileHotReLoad": false, "babelSetting": { "ignore": [], "disablePlugins": [], "outputPath": "" }, - "useIsolateContext": true, "useCompilerModule": false, - "userConfirmedUseCompilerModuleSwitch": false + "userConfirmedUseCompilerModuleSwitch": false, + "compileHotReLoad": false, + "useIsolateContext": true }, "compileType": "miniprogram", "libVersion": "2.8.2", diff --git a/subpages/oneKeyService/pages/index/index.js b/subpages/oneKeyService/pages/index/index.js index e3e88f3..eb0899f 100644 --- a/subpages/oneKeyService/pages/index/index.js +++ b/subpages/oneKeyService/pages/index/index.js @@ -59,6 +59,14 @@ Page({ wx.navigateTo({ url: `../directTo/directTo?modulecode=${e.currentTarget.dataset.modulecode}` }) + } else if (e.currentTarget.dataset.modulecode == 'notice_zcwsc') { + wx.navigateTo({ + url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}` + }) + } else if (e.currentTarget.dataset.modulecode == 'notice_aq') { + wx.navigateTo({ + url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}` + }) } } }) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js index e557b32..7cb8e38 100644 --- a/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js +++ b/subpages/oneKeyService/pages/noticeDetail/noticeDetail.js @@ -26,6 +26,16 @@ Page({ title: '锦水警事' }) this.noticeDetail(options.id) + } else if(options.modulecode == 'notice_zcwsc'){ + wx.setNavigationBarTitle({ + title: '众创卫生城' + }) + this.noticeDetail(options.id) + } else if(options.modulecode == 'notice_aq'){ + wx.setNavigationBarTitle({ + title: '安全360' + }) + this.noticeDetail(options.id) } }, diff --git a/subpages/oneKeyService/pages/warning/warning.js b/subpages/oneKeyService/pages/warning/warning.js index d09c359..d8bffad 100644 --- a/subpages/oneKeyService/pages/warning/warning.js +++ b/subpages/oneKeyService/pages/warning/warning.js @@ -18,7 +18,7 @@ Page({ indicatorDots: false, //指示点 autoplay: true, //true,//自动播放 circular: true, //衔接滑动 - interval: 3000, //自动播放间隔时长(ms) + interval: 5000, //自动播放间隔时长(ms) duration: 500, //幻灯片切换时长(ms) currentSwiper: 0, }, @@ -34,14 +34,24 @@ Page({ wx.setNavigationBarTitle({ title: '锦水印象' }) + }else if(options.modulecode == 'notice_zcwsc'){ + this.getBannerList('4') + wx.setNavigationBarTitle({ + title: '众创卫生城' + }) + }else if(options.modulecode == 'notice_aq'){ + this.getBannerList('5') + wx.setNavigationBarTitle({ + title: '安全360' + }) }else{ + this.getBannerList('2') wx.setNavigationBarTitle({ title: '锦水警事' }) } this.noticelist() - this.getBannerList() }, /** @@ -105,9 +115,9 @@ Page({ }) }, - getBannerList: function() { + getBannerList: function(bannerNum) { let that = this - api.bannerList('2').then(function(res) { + api.bannerList(bannerNum).then(function(res) { // console.log('res==', res.data) that.setData({ swiperBannerList: res.data @@ -115,10 +125,34 @@ Page({ }) }, swiperChange: function(e) { + wx.createVideoContext('video'+this.data.currentSwiper).pause() this.setData({ - currentSwiper: e.detail.current + currentSwiper: e.detail.current, + autoplay: true }) }, + bindplay() { + this.setData({ + autoplay: false + }) + wx.getNetworkType({ + success (res) { + const networkType = res.networkType + if (res.networkType != 'wifi') { + wx.showToast({ + title: '当前为非WI-FI环境,请注意流量消耗', + icon: 'none', + duration: 3000 + }) + } + } + }) + }, + bindended() { + this.setData({ + autoplay: true + }) + }, // swiperChange2: function(e) { // this.setData({ // 'options2.currentSwiper': e.detail.current, diff --git a/subpages/oneKeyService/pages/warning/warning.wxml b/subpages/oneKeyService/pages/warning/warning.wxml index 090b059..013e86a 100644 --- a/subpages/oneKeyService/pages/warning/warning.wxml +++ b/subpages/oneKeyService/pages/warning/warning.wxml @@ -1,5 +1,5 @@ - diff --git a/utils/config.js b/utils/config.js index 5986183..6cf2c13 100644 --- a/utils/config.js +++ b/utils/config.js @@ -6,13 +6,13 @@ module.exports = { }; function BASEURL() { - // return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 + return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 // return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址 // return "http://219.146.91.110:9094/epdc-api/api/" // 测试环境 ip接口地址 // return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址 // return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址 // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址 - return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 + // return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 // return 'http://192.168.43.19:9094/epdc-api/api/' }