From e7e6d63fd96aa059ce94259280536af8d7c20268 Mon Sep 17 00:00:00 2001 From: ZhaoTongYao <531131322@qq.com> Date: Wed, 24 Jun 2020 18:03:43 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=88=91=E6=9C=89?= =?UTF-8?q?=E4=BA=8B=E8=A6=81=E9=98=85=EF=BC=9B=E9=A6=96=E9=A1=B5=E7=94=B5?= =?UTF-8?q?=E8=AF=9D=E4=BB=8E=E6=8E=A5=E5=8F=A3=E8=8E=B7=E5=8F=96=EF=BC=9B?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9C=8D=E5=8A=A1=E6=A0=B7=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9B=E5=BF=97=E6=84=BF=E8=80=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=92=A8=E8=AF=A2=E7=83=AD=E7=BA=BF=E7=82=B9=E5=87=BB=E6=8B=A8?= =?UTF-8?q?=E6=89=93=EF=BC=9B=E7=B2=BE=E5=BD=A9=E8=AF=B4=E8=AF=B4=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4=EF=BC=9B=E6=96=B0=E5=A2=9E=E7=AD=89?= =?UTF-8?q?=E7=BA=A7=E6=8E=92=E5=90=8D=E9=A1=B5=E9=9D=A2=EF=BC=9B=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AE=BA=E5=9D=9B=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/activity/activity.js | 153 ++- components/activity/activity.wxml | 76 +- images/home/call.png | Bin 0 -> 9539 bytes pages/heartNew/heartNew.js | 713 +++++----- pages/heartNew/heartNew.wxml | 178 +-- pages/heartNew/heartNew.wxss | 768 +++++------ pages/indexNew/indexNew.js | 61 +- pages/indexNew/indexNew.json | 17 +- pages/indexNew/indexNew.wxml | 332 ++--- pages/indexNew/indexNew.wxss | 1260 +++++++++--------- project.config.json | 4 +- subpages/integralCentre/pages/index/index.js | 467 +++---- utils/activity.js | 54 +- utils/api.js | 1016 +++++++------- utils/config.js | 56 +- 15 files changed, 2632 insertions(+), 2523 deletions(-) create mode 100644 images/home/call.png diff --git a/components/activity/activity.js b/components/activity/activity.js index 898a3d6..4daa66f 100644 --- a/components/activity/activity.js +++ b/components/activity/activity.js @@ -1,78 +1,77 @@ -var api = require('../../utils/activity.js') - -const app = getApp() -Component({ - properties: { - state: Number - }, - data: { - activityList: [], - nomore: false - }, - attached: function() {}, - ready: function() {}, - pageLifetimes: { - show: function() {}, - }, - methods: { - getActivityList(params) { - let that = this - that.setData({ - selectedTab: params.selectedTab - }) - if (params.qkdat == true) { - console.log('清空') - that.setData({ - activityList: [], - nomore: false - }) - } - - api.getActivityList(params).then((res) => { - console.log(res.data) - that.setData({ - activityList: that.data.activityList.concat(res.data) - }) - console.log(res.data.length) - //数据访问成功 - var myEventDetail = { - listLength: res.data.length - } - that.triggerEvent('toActDetail', myEventDetail) - if (res.data.length == 0) { - that.setData({ - nomore: true - }) - } - }) - }, - - toActDetail(e) { - console.log('selectedTab::::'+this.data.selectedTab) - const id = e.currentTarget.dataset.id - const actcurrentstate = e.currentTarget.dataset.actcurrentstate - const signupflag = e.currentTarget.dataset.signupflag - this.triggerEvent('toActDetail', { - actId: id - }) - wx.navigateTo({ - url: `/subpages/heart/pages/heartDetail/heartDetail?id=${id}&actcurrentstate=${actcurrentstate}&signupflag=${signupflag}&selectedTab=${this.data.selectedTab}` - }) - }, - updateActivityList(params) { - api.getActivityList(params).then(res => { - console.log('详情回列表刷新数据', res) - const index = this.data.activityList.findIndex(item => item.id === res.data[0].id) - if (index > -1) { - this.data.activityList.splice(index, 1, res.data[0]) - } else { - this.data.activityList.splice(index, 1) - } - this.setData({ - activityList: this.data.activityList - }) - }) - } - } - +var api = require('../../utils/activity.js') + +const app = getApp() +Component({ + properties: { + state: Number, + }, + data: { + activityList: [], + nomore: false + }, + attached: function() {}, + ready: function() {}, + pageLifetimes: { + show: function() {}, + }, + methods: { + getActivityList(params) { + let that = this + that.setData({ + selectedTab: params.selectedTab + }) + if (params.qkdat == true) { + console.log('清空') + that.setData({ + activityList: [], + nomore: false + }) + } + + api.getActivityList(params).then((res) => { + console.log(res.data) + that.setData({ + activityList: that.data.activityList.concat(res.data) + }) + //console.log(res.data.length) + //数据访问成功 + var myEventDetail = { + listLength: res.data.length + } + that.triggerEvent('toActDetail', myEventDetail) + if (res.data.length == 0) { + that.setData({ + nomore: true + }) + } + }) + }, + + toActDetail(e) { + console.log('selectedTab::::'+this.data.selectedTab) + const id = e.currentTarget.dataset.id + const actcurrentstate = e.currentTarget.dataset.actcurrentstate + const signupflag = e.currentTarget.dataset.signupflag + this.triggerEvent('toActDetail', { + actId: id + }) + wx.navigateTo({ + url: `/subpages/heart/pages/heartDetail/heartDetail?id=${id}&actcurrentstate=${actcurrentstate}&signupflag=${signupflag}&selectedTab=${this.data.selectedTab}` + }) + }, + updateActivityList(params) { + api.getActivityList(params).then(res => { + console.log('详情回列表刷新数据', res) + const index = this.data.activityList.findIndex(item => item.id === res.data[0].id) + if (index > -1) { + this.data.activityList.splice(index, 1, res.data[0]) + } else { + this.data.activityList.splice(index, 1) + } + this.setData({ + activityList: this.data.activityList + }) + }) + } + } }) \ No newline at end of file diff --git a/components/activity/activity.wxml b/components/activity/activity.wxml index 901d62a..2ebacac 100644 --- a/components/activity/activity.wxml +++ b/components/activity/activity.wxml @@ -1,39 +1,39 @@ - - - - - 报名中 - 已报满 - 未开始 - 进行中 - 已结束 - 已取消 - - - {{item.title}} - - - - 活动时间:{{item.actStartTime}}至 - - {{item.actEndTime}} - - - 活动地点:{{item.actAddress}} - - - - - 不限名额 - 活动名额 {{item.actQuota}}人 - 已报名 {{item.signupNum}}人 - - - - - - \ No newline at end of file diff --git a/images/home/call.png b/images/home/call.png new file mode 100644 index 0000000000000000000000000000000000000000..2dbe817a479b9a7be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HF@z&KH?bS#Y$fIHKneJaVB8#@>`Nn{TQBz!YR~2Z#$4a7 zW+f|CAJ45x8iF5hMwBVIc9COQJ|)l|Ix8z(hn_D6AiaCCn6?;!cCxtgPp9#vdEU4v zBjV7hx!GWHUz=)+Z1i{Z_}p|pa!lVV`^h8^d2q)GVjXr{g`;atc{loTvDwrMOjBjdlVxB zu#c`tuY{3h>Ow=1Lv~Y>=x>`jtB#}DdGeSdc$8lzzFmE|$_TMbuSj^`5zyk@cAv=z z@U#<~F z0NH*txsA9Ofowx6yHd6qW%sw4A-(Sj;A5kZW}@fA5jLrX;KqktSsLsPQsc_l-6LiD zPyzdoVH@#kTqbQeoMZtp0$~E#J6-mZmm}U&UJN2W?EbXR!$W|Lk9eDK0a=ci%4NIo z`Bhtn%l}Vv`_N`a@3;(d*#P7U!ik>n*ob0H^tTv-9AXUBhZx86>6lSN;S0!e2+-l! z7}g}-7lAGR)oA~?qaCK>KEM@5ki5!jgE-nd_+$KB9e|U!ay-DU`2Oc=-0B*{b9F(_ h(Rq(I!1ZqH{{t%cgtS?OhP40y002ovPDHLkV1iI|wC4Z- literal 0 HcmV?d00001 diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js index 18e7c34..2d04c5d 100644 --- a/pages/heartNew/heartNew.js +++ b/pages/heartNew/heartNew.js @@ -1,347 +1,368 @@ -// pages/heartNew/heartNew.js -const app = getApp() -var api = require('../../utils/activity.js') -import { - getTimestamp -} from '../../utils/common' -Page({ - - /** - * 页面的初始数据 - */ - data: { - statusHeight: 0, // 自定义头部状态栏高度 - navigationHeight: 0, // 自定义头部导航栏高度 - selectedTab: 'tab0', - // banner 相关 - banner: [], - indicatorDots: false, //指示点 - autoplay: true, //true false,//自动播放 - circular: true, //衔接滑动 - interval: 4000, //自动播放间隔时长(ms) - duration: 500, //幻灯片切换时长(ms) - currentSwiper: 0, - // banner 相关end - // 列表相关 - loadMoreVisible: false, //false - loadMoreType: 'none', //loading none - dingdan: false,//判断订单列表隐藏 - jingcai: true,//判断精彩列表隐藏 - indexPage: 1, - pageSize: 10, - qkdat: false,//判断是否清空数据 - actId: '',//判断返回以后是否需要刷新列表 - volunteerlist:[],//志愿者列表 - listLength:0,//数据长度判断是否需要加载 - getImgUrl:'', - ifClickImage:false,//因为志友多多点击图片查看大图,会出现列表刷新的bug,所以加这个字段进行控制 - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - this.bannerListV2() - this.getImgUrl()//获取配置图片 - this.setData({ - statusHeight: app.globalData.deviceInfo.statusHeight, - navigationHeight: app.globalData.deviceInfo.navigationHeight, - }) - - let parms = { - pageIndex: this.data.indexPage, - pageSize: this.data.pageSize, - timestamp: getTimestamp(), - actType: 0, - qkdat: true, - selectedTab:this.data.selectedTab - } - this.selectComponent("#state-0").getActivityList(parms) - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - if(this.data.selectedTab == 'tab1'){//刷新志友 - if(this.data.ifClickImage){//如果为true就不可以刷新,判断完成以后重新置为false - this.setData({ - ifClickImage: false - }) - }else{ - this.setData({ - loadMoreVisible: false, - loadMoreType: 'none', - indexPage: 1, - }) - this.setData({ - dingdan: true, - jingcai: true, - volunteerlist:[],//列表置空 - listLength:0 - }) - let parms = { - pageIndex: this.data.indexPage, - pageSize: this.data.pageSize, - } - this.volunteerlist(parms) - } - } - if (this.data.actId) { - this.setData({ - loadMoreVisible: false, - loadMoreType: 'none', - indexPage: 1, - }) - this.updateActivityList() - } - }, - // tab 切换 - tabBarChange(e) { - this.setData({ - loadMoreVisible: false, - loadMoreType: 'none', - indexPage: 1, - }) - if (e.currentTarget.dataset.tab == 'tab0') { - this.setData({ - dingdan: false, - jingcai: true, - }) - let parms = { - pageIndex: this.data.indexPage, - pageSize: this.data.pageSize, - timestamp: getTimestamp(), - actType: 0,//活动列表类型(0-招募令,1-精彩活动) - qkdat: true, - selectedTab:e.currentTarget.dataset.tab - } - this.selectComponent("#state-0").getActivityList(parms) - } else if (e.currentTarget.dataset.tab == 'tab1') { - this.setData({ - dingdan: true, - jingcai: true, - volunteerlist:[],//列表置空 - listLength:0 - }) - let parms = { - pageIndex: this.data.indexPage, - pageSize: this.data.pageSize, - } - this.volunteerlist(parms) - } else if (e.currentTarget.dataset.tab == 'tab2') { - this.setData({ - dingdan: true, - jingcai: false, - }) - let parms = { - pageIndex: this.data.indexPage, - pageSize: this.data.pageSize, - timestamp: getTimestamp(), - actType: 1,//活动列表类型(0-招募令,1-精彩活动) - qkdat: true, - selectedTab:e.currentTarget.dataset.tab - } - this.selectComponent("#state-2").getActivityList(parms) - } else if (e.currentTarget.dataset.tab == 'tab3') { - this.setData({ - dingdan: true, - jingcai: true, - }) - - wx.navigateTo({ - url: `/subpages/heart/pages/leaderboardNew/leaderboardNew` - }) - } - this.setData({ - selectedTab: e.currentTarget.dataset.tab - }) - }, - // 返回以后刷新列表 - updateActivityList() { - if ((this.data.selectedTab === 'tab0')) { - let params = { - pageIndex: 1, - pageSize: 10, - timestamp: getTimestamp(), - actType: 0, - actId: this.data.actId, - selectedTab:this.data.selectedTab - } - this.selectComponent("#state-0").updateActivityList(params) - } else if (this.data.selectedTab === 'tab2') { - let params = { - pageIndex: 1, - pageSize: 10, - timestamp: getTimestamp(), - actType: 1, - actId: this.data.actId, - selectedTab:this.data.selectedTab - } - this.selectComponent("#state-2").updateActivityList(params) - } - - this.setData({ - actId: '' - }) - }, - // 志愿者列表 - volunteerlist(params){ - let that = this - api.volunteerlist(params).then(function (res) { - if (res.data.length !== that.data.pageSize) { - that.setData({ - loadMoreVisible: true, - loadMoreType: 'none', - }) - } - that.setData({ - listLength:res.data.length, - volunteerlist:that.data.volunteerlist.concat(res.data) - }) - }) - }, - //返回上一级 - goback() { - wx.navigateBack({ - delta: 1 - }) - }, - // banner 切换 - swiperChange: function (e) { - this.setData({ - currentSwiper: e.detail.current - }) - }, - // 通过判断列表的长度断定是否显示加载中 - toActDetailDown(e) { - if (e.detail.listLength !== this.data.pageSize) { - this.setData({ - loadMoreVisible: true, - loadMoreType: 'none', - }) - } - this.setData({ - actId: e.detail.actId, - listLength: e.detail.listLength - }) - }, - - clickImage(e){ - this.setData({ - ifClickImage: e.detail, - }) - }, - - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - this.bannerListV2() - }, - bannerListV2: function () { - let that = this - let params = { - bannerType:"0" - } - api.bannerList(params).then(function (res) { - that.setData({ - banner: res.data - }) - wx.stopPullDownRefresh(); - }) - }, - // 获取配置图片 - getImgUrl:function(){//0:咨询热线 - let that = this - api.getImgUrl('0').then(function (res) { - that.setData({ - getImgUrl: res.data[0].imgUrl - }) - }) - }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - if (this.data.listLength !== this.data.pageSize) { - this.setData({ - loadMoreVisible: true, - loadMoreType: 'none', - }) - } else { - this.setData({ - loadMoreVisible: true, - loadMoreType: 'loading', - }) - } - if (this.data.selectedTab == 'tab0') { - this.setData({ - indexPage: this.data.indexPage + 1 - }) - let parms = { - pageIndex: this.data.indexPage, - pageSize: this.data.pageSize, - timestamp: getTimestamp(), - actType: 0, - selectedTab:this.data.selectedTab - } - this.selectComponent("#state-0").getActivityList(parms) - }else if(this.data.selectedTab == 'tab1'){ - this.setData({ - indexPage: this.data.indexPage + 1 - }) - let parms = { - pageIndex: this.data.indexPage, - pageSize: this.data.pageSize, - } - this.volunteerlist(parms) - } else if (this.data.selectedTab == 'tab2') { - this.setData({ - indexPage: this.data.indexPage + 1 - }) - let parms = { - pageIndex: this.data.indexPage, - pageSize: this.data.pageSize, - timestamp: getTimestamp(), - actType: 1, - selectedTab:this.data.selectedTab - } - this.selectComponent("#state-2").getActivityList(parms) - } - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - }, - //跳转志愿者认证页面 - govolunteer() { - wx.navigateTo({ - url: `/subpages/heart/pages/volunteer/volunteer` - }) - }, +// pages/heartNew/heartNew.js +const app = getApp() +var api = require('../../utils/activity.js') +import { + getTimestamp +} from '../../utils/common' +Page({ + + /** + * 页面的初始数据 + */ + data: { + statusHeight: 0, // 自定义头部状态栏高度 + navigationHeight: 0, // 自定义头部导航栏高度 + selectedTab: 'tab0', + // banner 相关 + banner: [], + indicatorDots: false, //指示点 + autoplay: true, //true false,//自动播放 + circular: true, //衔接滑动 + interval: 4000, //自动播放间隔时长(ms) + duration: 500, //幻灯片切换时长(ms) + currentSwiper: 0, + // banner 相关end + // 列表相关 + loadMoreVisible: false, //false + loadMoreType: 'none', //loading none + dingdan: false,//判断订单列表隐藏 + jingcai: true,//判断精彩列表隐藏 + indexPage: 1, + pageSize: 10, + qkdat: false,//判断是否清空数据 + actId: '',//判断返回以后是否需要刷新列表 + volunteerlist:[],//志愿者列表 + listLength:0,//数据长度判断是否需要加载 + getImgUrl:'', + ifClickImage:false,//因为志友多多点击图片查看大图,会出现列表刷新的bug,所以加这个字段进行控制 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.bannerListV2() + this.getImgUrl()//获取配置图片 + this.setData({ + statusHeight: app.globalData.deviceInfo.statusHeight, + navigationHeight: app.globalData.deviceInfo.navigationHeight, + }) + + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + timestamp: getTimestamp(), + actType: 0, + qkdat: true, + selectedTab:this.data.selectedTab + } + this.selectComponent("#state-0").getActivityList(parms) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + if(this.data.selectedTab == 'tab1'){//刷新志友 + if(this.data.ifClickImage){//如果为true就不可以刷新,判断完成以后重新置为false + this.setData({ + ifClickImage: false + }) + }else{ + this.setData({ + loadMoreVisible: false, + loadMoreType: 'none', + indexPage: 1, + }) + this.setData({ + dingdan: true, + jingcai: true, + volunteerlist:[],//列表置空 + listLength:0 + }) + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + } + this.volunteerlist(parms) + } + } + if (this.data.actId) { + this.setData({ + loadMoreVisible: false, + loadMoreType: 'none', + indexPage: 1, + }) + this.updateActivityList() + } + }, + // tab 切换 + tabBarChange(e) { + this.setData({ + loadMoreVisible: false, + loadMoreType: 'none', + indexPage: 1, + }) + if (e.currentTarget.dataset.tab == 'tab0') { + this.setData({ + dingdan: false, + jingcai: true, + }) + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + timestamp: getTimestamp(), + actType: 0,//活动列表类型(0-招募令,1-精彩活动) + qkdat: true, + selectedTab:e.currentTarget.dataset.tab + } + this.selectComponent("#state-0").getActivityList(parms) + } else if (e.currentTarget.dataset.tab == 'tab1') { + this.setData({ + dingdan: true, + jingcai: true, + volunteerlist:[],//列表置空 + listLength:0 + }) + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + } + this.volunteerlist(parms) + } else if (e.currentTarget.dataset.tab == 'tab2') { + this.setData({ + dingdan: true, + jingcai: false, + }) + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + timestamp: getTimestamp(), + actType: 1,//活动列表类型(0-招募令,1-精彩活动) + qkdat: true, + selectedTab:e.currentTarget.dataset.tab + } + this.selectComponent("#state-2").getActivityList(parms) + } else if (e.currentTarget.dataset.tab == 'tab3') { + this.setData({ + dingdan: true, + jingcai: true, + }) + + wx.navigateTo({ + url: `/subpages/heart/pages/leaderboardNew/leaderboardNew` + }) + } + this.setData({ + selectedTab: e.currentTarget.dataset.tab + }) + }, + // 返回以后刷新列表 + updateActivityList() { + if ((this.data.selectedTab === 'tab0')) { + let params = { + pageIndex: 1, + pageSize: 10, + timestamp: getTimestamp(), + actType: 0, + actId: this.data.actId, + selectedTab:this.data.selectedTab + } + this.selectComponent("#state-0").updateActivityList(params) + } else if (this.data.selectedTab === 'tab2') { + let params = { + pageIndex: 1, + pageSize: 10, + timestamp: getTimestamp(), + actType: 1, + actId: this.data.actId, + selectedTab:this.data.selectedTab + } + this.selectComponent("#state-2").updateActivityList(params) + } + + this.setData({ + actId: '' + }) + }, + // 志愿者列表 + volunteerlist(params){ + let that = this + api.volunteerlist(params).then(function (res) { + if (res.data.length !== that.data.pageSize) { + that.setData({ + loadMoreVisible: true, + loadMoreType: 'none', + }) + } + that.setData({ + listLength:res.data.length, + volunteerlist:that.data.volunteerlist.concat(res.data) + }) + }) + }, + //返回上一级 + goback() { + wx.navigateBack({ + delta: 1 + }) + }, + // banner 切换 + swiperChange: function (e) { + this.setData({ + currentSwiper: e.detail.current + }) + }, + // 通过判断列表的长度断定是否显示加载中 + toActDetailDown(e) { + if (e.detail.listLength !== this.data.pageSize) { + this.setData({ + loadMoreVisible: true, + loadMoreType: 'none', + }) + } + this.setData({ + actId: e.detail.actId, + listLength: e.detail.listLength + }) + }, + + clickImage(e){ + this.setData({ + ifClickImage: e.detail, + }) + }, + + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.bannerListV2() + }, + bannerListV2: function () { + let that = this + let params = { + bannerType:"0" + } + api.bannerList(params).then(function (res) { + that.setData({ + banner: res.data + }) + wx.stopPullDownRefresh(); + }) + }, + // 获取配置图片 + getImgUrl:function(){//0:咨询热线 + let that = this + api.getImgUrl('0').then(function (res) { + that.setData({ + getImgUrl: res.data[0] + }) + }) + }, + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (this.data.listLength !== this.data.pageSize) { + this.setData({ + loadMoreVisible: true, + loadMoreType: 'none', + }) + } else { + this.setData({ + loadMoreVisible: true, + loadMoreType: 'loading', + }) + } + if (this.data.selectedTab == 'tab0') { + this.setData({ + indexPage: this.data.indexPage + 1 + }) + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + timestamp: getTimestamp(), + actType: 0, + selectedTab:this.data.selectedTab + } + this.selectComponent("#state-0").getActivityList(parms) + }else if(this.data.selectedTab == 'tab1'){ + this.setData({ + indexPage: this.data.indexPage + 1 + }) + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + } + this.volunteerlist(parms) + } else if (this.data.selectedTab == 'tab2') { + this.setData({ + indexPage: this.data.indexPage + 1 + }) + let parms = { + pageIndex: this.data.indexPage, + pageSize: this.data.pageSize, + timestamp: getTimestamp(), + actType: 1, + selectedTab:this.data.selectedTab + } + this.selectComponent("#state-2").getActivityList(parms) + } + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + //跳转志愿者认证页面 + govolunteer() { + wx.navigateTo({ + url: `/subpages/heart/pages/volunteer/volunteer` + }) + }, + + //拨打电话 + getPhone(e) { + // return false + wx.showModal({ + title: '拨打电话', + content: ``, + cancelColor: '#29B9A5', + confirmColor: '#29B9A5', + success: (res) => { + if (res.confirm) { + console.log('用户点击确定') + wx.makePhoneCall({ + phoneNumber: e.currentTarget.dataset.number + }) + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) + } }) \ No newline at end of file diff --git a/pages/heartNew/heartNew.wxml b/pages/heartNew/heartNew.wxml index 56467d8..26cd795 100644 --- a/pages/heartNew/heartNew.wxml +++ b/pages/heartNew/heartNew.wxml @@ -1,90 +1,90 @@ - - - - - - - - 志愿者去哪儿 - - - - - - - - - - - - - - - - - - - - - - 订单多多 - - - 志友朵朵 - - - 精彩说说 - - - 积分火火 - - - - - - - - - - - - - - - - - + + + + + + + + 志愿者去哪儿 + + + + + + + + + + + + + + + + + + + + + + 订单多多 + + + 志友朵朵 + + + 精彩说说 + + + 积分火火 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/heartNew/heartNew.wxss b/pages/heartNew/heartNew.wxss index 54b4b31..527694f 100644 --- a/pages/heartNew/heartNew.wxss +++ b/pages/heartNew/heartNew.wxss @@ -1,385 +1,385 @@ -page { - width: 100%; - height: auto; - overflow-y: auto; - background: #f7f7f7; -} - -.header { - position: fixed; - width: 100%; - top: 0; - left: 0; - z-index: 999; -} - -.header .header-bg { - width: 100%; - height: 100%; - position: absolute; - z-index: 10; - left: 0; - top: 0; -} - - - -.header .navigation { - /* width: calc(100% - 46rpx); - margin-left: 46rpx; */ - display: flex; - align-items: center; - /* justify-content: center; */ - position: relative; - z-index: 100; -} - -.header .navigation .goback { - width: 16rpx; - margin-left: 30rpx; - display: flex; - align-items: center; - justify-content: center; -} - -.header .navigation .goback image { - width: 16rpx; - height: 28rpx; -} - -.header .navigation .title { - display: flex; - align-items: center; - /* justify-content: center; */ - width: calc(100% - 46rpx); - margin-left: 46rpx; - color: rgba(255, 255, 255, 0.9); - font-size: 32rpx; - letter-spacing: 2rpx; -} - -.header .navigation .title .title-right { - /* margin-right: 46rpx; */ -} - -.home { - width: 100%; -} - -.belong-grid { - width: 100%; - height: 138rpx; - box-sizing: border-box; - padding-top: 16rpx; - position: relative; -} - -.belong-grid .newbelong-grid { - display: flex; - flex-direction: row; - /* align-items: center; */ - justify-content: space-between; -} - -.belong-grid .belong-grid-bg { - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - z-index: 10; -} - -.belong-grid .newbelong-grid .grid { - margin-left: 21rpx; - /* width: 90%; */ - width: calc(100% - 234rpx); - height: 62rpx; - position: relative; - z-index: 100; - display: flex; - align-items: center; -} - -.belong-grid .newbelong-grid .grid image { - width: 100%; - height: 46rpx; -} - -.belong-grid .newbelong-grid .volunteer { - margin-right: 15rpx; - width: 90rpx; - height: 62rpx; - position: relative; - z-index: 100; - display: flex; - align-items: center; -} - -.belong-grid .newbelong-grid .volunteer image { - width: 100%; - height: 100%; -} - -/* banner 样式 */ -.banner-main { - position: absolute; - width: calc(100% - 60rpx); - height: 300rpx; - margin-left: 30rpx; - background-color: #fff; - z-index: 997; - margin-top: -36rpx; - box-shadow: 0px 6px 21px 0px rgba(122, 122, 122, 0.23); - border-radius: 17rpx; -} - - -.page-body { - /* padding-top: 30rpx; */ - /* background: #fff; */ -} - -.page-section { - width: 100%; - margin-bottom: 60rpx; -} - -.page-section_center { - display: flex; - flex-direction: column; - align-items: center; -} - -.page-section:last-child { - margin-bottom: 0; -} - -.page-section-gap { - box-sizing: border-box; - padding: 0 30rpx; -} - -.page-section-spacing { - box-sizing: border-box; - /* padding: 0 20rpx; */ - height: 300rpx; -} - -swiper { - height: 300rpx; -} - -.page-section-title { - font-size: 28rpx; - color: #999; - margin-bottom: 10rpx; - padding-left: 30rpx; - padding-right: 30rpx; -} - -.page-section-gap .page-section-title { - padding-left: 0; - padding-right: 0; -} - -.demo-text-1 { - position: relative; - align-items: center; - justify-content: center; - background-color: #1aad19; - color: #fff; - font-size: 36rpx; -} - -.demo-text-1:before { - content: 'A'; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); -} - -.demo-text-2 { - position: relative; - align-items: center; - justify-content: center; - background-color: #2782d7; - color: #fff; - font-size: 36rpx; -} - -.demo-text-2:before { - content: 'B'; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); -} - -.demo-text-3 { - position: relative; - align-items: center; - justify-content: center; - background-color: #f1f1f1; - color: #353535; - font-size: 36rpx; -} - -.demo-text-3:before { - content: 'C'; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); -} - -button { - margin-bottom: 30rpx; -} - -button:last-child { - margin-bottom: 0; -} - -.page-section-title { - padding: 0; -} - -.swiper-item { - display: block; - height: 300rpx; -} - -.banner { - overflow: hidden; - height: 300rpx; - display: flex; - width: 100%; - border-radius: 16rpx; -} - -.dots { - display: flex; - justify-content: center; - margin-top: -23rpx; - z-index: 999; - position: relative; - - /* padding-bottom: 10rpx; */ -} - -.dots .dot { - width: 20rpx; - height: 6rpx; - margin-left: 8rpx; - background: rgba(247, 247, 247, 1); - opacity: 0.38; - border-radius: 3rpx; - transition: all 0.3s; -} - -.dots .dot.active { - width: 20rpx; - background: rgba(247, 247, 247, 1); - border-radius: 3rpx; - opacity: 1; - /* background-image: linear-gradient(90deg, #fc5555 58%, #fc5555 100%); */ -} - -/* banner end */ - -.tab-all { - position: absolute; - width: 100%; - height: 370rpx; - background-color: #fff; - z-index: 996; -} - - -.tab-bar { - margin-top: 278rpx; - width: 100%; - height: 92rpx; - background: #fff; - display: flex; - align-items: center; - position: relative; -} - -.tab-bar .tab { - font-size: 34rpx; - font-weight: 500; - color: rgba(171, 171, 171, 1); - width: 25%; - height: 100%; - line-height: 92rpx; - /* text-indent: 20rpx; */ - text-align: center; - position: relative; - z-index: 10; -} - -.tab-bar .tab.select { - font-size: 36rpx; - font-weight: bold; - color: rgba(229, 15, 0, 1); -} - -.tab-bar .select-bar { - position: absolute; - left: 14rpx; - bottom: 0rpx; - width: 30rpx; - height: 8rpx; - border-radius: 4rpx; - background: #fc5555; - z-index: 1; -} - -.tab-bar .tab0.select-bar { - left: calc(12.5% - 15rpx); - transition: left 0.3s linear; -} - -.tab-bar .tab1.select-bar { - left: calc(37.5% - 15rpx); - transition: left 0.3s linear; -} - -.tab-bar .tab2.select-bar { - left: calc(62.5% - 15rpx); - transition: left 0.3s linear; -} - -.tab-bar .tab3.select-bar { - left: calc(87.5% - 15rpx); - transition: left 0.3s linear; -} - -.tab-bar .hover-tab { - background: #f7f7f7; -} - - -/* 内容 */ -.details-top { - margin-top: 385rpx; -} - -.volunteer-box { - display: flex; - align-items: center; - justify-content: space-between; - flex-wrap: wrap; - padding: 0rpx 40rpx 19rpx 40rpx; -} -.show { - padding: 0rpx 40rpx; - height: 24rpx; - font-size: 24rpx; - line-height: 24rpx; - font-weight: 500; - color: #C5C5C5; +page { + width: 100%; + height: auto; + overflow-y: auto; + background: #f7f7f7; +} + +.header { + position: fixed; + width: 100%; + top: 0; + left: 0; + z-index: 999; +} + +.header .header-bg { + width: 100%; + height: 100%; + position: absolute; + z-index: 10; + left: 0; + top: 0; +} + + + +.header .navigation { + /* width: calc(100% - 46rpx); + margin-left: 46rpx; */ + display: flex; + align-items: center; + /* justify-content: center; */ + position: relative; + z-index: 100; +} + +.header .navigation .goback { + width: 16rpx; + margin-left: 30rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.header .navigation .goback image { + width: 16rpx; + height: 28rpx; +} + +.header .navigation .title { + display: flex; + align-items: center; + /* justify-content: center; */ + width: calc(100% - 46rpx); + margin-left: 46rpx; + color: rgba(255, 255, 255, 0.9); + font-size: 32rpx; + letter-spacing: 2rpx; +} + +.header .navigation .title .title-right { + /* margin-right: 46rpx; */ +} + +.home { + width: 100%; +} + +.belong-grid { + width: 100%; + height: 138rpx; + box-sizing: border-box; + padding-top: 16rpx; + position: relative; +} + +.belong-grid .newbelong-grid { + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: space-between; +} + +.belong-grid .belong-grid-bg { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 10; +} + +.belong-grid .newbelong-grid .grid { + margin-left: 28rpx; + /* width: 90%; */ + width: calc(100% - 234rpx); + height: 62rpx; + position: relative; + z-index: 100; + display: flex; + align-items: center; +} + +.belong-grid .newbelong-grid .grid image { + width: 532rpx; + height: 66rpx; +} + +.belong-grid .newbelong-grid .volunteer { + margin-right: 15rpx; + width: 108rpx; + height: 68rpx; + position: relative; + z-index: 100; + display: flex; + align-items: center; +} + +.belong-grid .newbelong-grid .volunteer image { + width: 100%; + height: 100%; +} + +/* banner 样式 */ +.banner-main { + position: absolute; + width: calc(100% - 60rpx); + height: 300rpx; + margin-left: 30rpx; + background-color: #fff; + z-index: 997; + margin-top: -36rpx; + box-shadow: 0px 6px 21px 0px rgba(122, 122, 122, 0.23); + border-radius: 17rpx; +} + + +.page-body { + /* padding-top: 30rpx; */ + /* background: #fff; */ +} + +.page-section { + width: 100%; + margin-bottom: 60rpx; +} + +.page-section_center { + display: flex; + flex-direction: column; + align-items: center; +} + +.page-section:last-child { + margin-bottom: 0; +} + +.page-section-gap { + box-sizing: border-box; + padding: 0 30rpx; +} + +.page-section-spacing { + box-sizing: border-box; + /* padding: 0 20rpx; */ + height: 300rpx; +} + +swiper { + height: 300rpx; +} + +.page-section-title { + font-size: 28rpx; + color: #999; + margin-bottom: 10rpx; + padding-left: 30rpx; + padding-right: 30rpx; +} + +.page-section-gap .page-section-title { + padding-left: 0; + padding-right: 0; +} + +.demo-text-1 { + position: relative; + align-items: center; + justify-content: center; + background-color: #1aad19; + color: #fff; + font-size: 36rpx; +} + +.demo-text-1:before { + content: 'A'; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.demo-text-2 { + position: relative; + align-items: center; + justify-content: center; + background-color: #2782d7; + color: #fff; + font-size: 36rpx; +} + +.demo-text-2:before { + content: 'B'; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.demo-text-3 { + position: relative; + align-items: center; + justify-content: center; + background-color: #f1f1f1; + color: #353535; + font-size: 36rpx; +} + +.demo-text-3:before { + content: 'C'; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +button { + margin-bottom: 30rpx; +} + +button:last-child { + margin-bottom: 0; +} + +.page-section-title { + padding: 0; +} + +.swiper-item { + display: block; + height: 300rpx; +} + +.banner { + overflow: hidden; + height: 300rpx; + display: flex; + width: 100%; + border-radius: 16rpx; +} + +.dots { + display: flex; + justify-content: center; + margin-top: -23rpx; + z-index: 999; + position: relative; + + /* padding-bottom: 10rpx; */ +} + +.dots .dot { + width: 20rpx; + height: 6rpx; + margin-left: 8rpx; + background: rgba(247, 247, 247, 1); + opacity: 0.38; + border-radius: 3rpx; + transition: all 0.3s; +} + +.dots .dot.active { + width: 20rpx; + background: rgba(247, 247, 247, 1); + border-radius: 3rpx; + opacity: 1; + /* background-image: linear-gradient(90deg, #fc5555 58%, #fc5555 100%); */ +} + +/* banner end */ + +.tab-all { + position: absolute; + width: 100%; + height: 370rpx; + background-color: #fff; + z-index: 996; +} + + +.tab-bar { + margin-top: 278rpx; + width: 100%; + height: 92rpx; + background: #fff; + display: flex; + align-items: center; + position: relative; +} + +.tab-bar .tab { + font-size: 34rpx; + font-weight: 500; + color: rgba(171, 171, 171, 1); + width: 25%; + height: 100%; + line-height: 92rpx; + /* text-indent: 20rpx; */ + text-align: center; + position: relative; + z-index: 10; +} + +.tab-bar .tab.select { + font-size: 36rpx; + font-weight: bold; + color: rgba(229, 15, 0, 1); +} + +.tab-bar .select-bar { + position: absolute; + left: 14rpx; + bottom: 0rpx; + width: 30rpx; + height: 8rpx; + border-radius: 4rpx; + background: #fc5555; + z-index: 1; +} + +.tab-bar .tab0.select-bar { + left: calc(12.5% - 15rpx); + transition: left 0.3s linear; +} + +.tab-bar .tab1.select-bar { + left: calc(37.5% - 15rpx); + transition: left 0.3s linear; +} + +.tab-bar .tab2.select-bar { + left: calc(62.5% - 15rpx); + transition: left 0.3s linear; +} + +.tab-bar .tab3.select-bar { + left: calc(87.5% - 15rpx); + transition: left 0.3s linear; +} + +.tab-bar .hover-tab { + background: #f7f7f7; +} + + +/* 内容 */ +.details-top { + margin-top: 385rpx; +} + +.volunteer-box { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + padding: 0rpx 40rpx 19rpx 40rpx; +} +.show { + padding: 0rpx 40rpx; + height: 24rpx; + font-size: 24rpx; + line-height: 24rpx; + font-weight: 500; + color: #C5C5C5; } \ No newline at end of file diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js index 33c64c3..98c23c7 100644 --- a/pages/indexNew/indexNew.js +++ b/pages/indexNew/indexNew.js @@ -72,6 +72,9 @@ Page({ loadMoreType: 'none', loadMoreVisible: false, defaultGridId:'',//默认网格 + leaderGridId:'', //领导网格6.22 + completeInfoDialogVisible: false, //完善信息 + homePagePhone: {} }, onShow: function() { if (wx.getStorageSync('token') != '' && wx.getStorageSync('token') != undefined && wx.getStorageSync('token') != null) { @@ -127,6 +130,14 @@ Page({ // 获取默认网格 this.getResidentConfig() + api.getHomePhone().then( res => { + if (res.code === 0 && res.msg === 'success') { + this.data.homePagePhone = res.data[0] + this.setData({ + homePagePhone: this.data.homePagePhone + }) + } + }) }, // 获取默认网格 getResidentConfig(){ @@ -138,6 +149,10 @@ Page({ that.setData({ defaultGridId:item.residentValue }) + } else if (item.residentType === 'default_grid' && item.residentCode === 'leader_grid') { + that.setData({ + leaderGridId:item.residentValue + }) } }) } @@ -508,6 +523,39 @@ Page({ }) } }, + // 我有事阅 6.22 + wysy() { + if(this.data.departmentId != this.data.leaderGridId){//领导网格处理 + wx.showToast({ + title: '无法使用该板块', + icon: 'none', + duration: 3000 + }) + }else{ + if (this.verifyCompleteInfo()) { + return false + } + api.getScrip().then(res => { + if (res.code === 0 && res.msg === 'success') { + console.log('getScrip',res.data) + wx.navigateToMiniProgram({ + appId: 'wx3ea0a6fb71ddf659', + path: 'pages/login/login?scrip='+res.data, + extraData: { + scrip: res.data + }, + envVersion: 'trial',//trial //develop + success(res) { + console.log(res) + }, + fail(err) { + console.log(err) + } + }) + } + }) + } + }, dqhd() { wx.navigateTo({ url: `../../subpages/associationNew/pages/associationlist/associationlist` @@ -560,7 +608,7 @@ Page({ // return false wx.showModal({ title: '拨打电话', - content: `您确定拨打${e.currentTarget.dataset.number}`, + content: ``, cancelColor: '#29B9A5', confirmColor: '#29B9A5', success: (res) => { @@ -574,5 +622,16 @@ Page({ } } }) + }, + // 检查 是否完善信息6.22 + verifyCompleteInfo () { + if (app.globalData.infoCompleted == 0) { + this.setData({ + completeInfoDialogVisible: !this.data.completeInfoDialogVisible + }) + return true + } else { + return false + } } }) \ No newline at end of file diff --git a/pages/indexNew/indexNew.json b/pages/indexNew/indexNew.json index c175821..0b63bd2 100644 --- a/pages/indexNew/indexNew.json +++ b/pages/indexNew/indexNew.json @@ -1,9 +1,10 @@ -{ - "navigationBarTitleText": "e锦水", - "navigationStyle": "custom", - "navigationBarTextStyle": "white", - "usingComponents": { - "nav-bar": "/components/navbar/index", - "load-more": "../../components/loadMore/loadMore" - } +{ + "navigationBarTitleText": "e锦水", + "navigationStyle": "custom", + "navigationBarTextStyle": "white", + "usingComponents": { + "nav-bar": "/components/navbar/index", + "load-more": "../../components/loadMore/loadMore", + "complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog" + } } \ No newline at end of file diff --git a/pages/indexNew/indexNew.wxml b/pages/indexNew/indexNew.wxml index 4007b30..10b6e37 100644 --- a/pages/indexNew/indexNew.wxml +++ b/pages/indexNew/indexNew.wxml @@ -1,163 +1,169 @@ - - - - e锦水 - - - - - - - - - - - {{departmentName}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 积分排名 - - - - 政策导航 - - - - 了解锦水 - - - - 个人中心 - - - - - - - {{item.newsTitle}} - - - {{item.deptName}}-{{item.newsCategoryName}} - {{filter.formatTime(item.newsStartTime, 'yyyy-MM-dd')}} - - - - - - - - - - - - \ No newline at end of file + + + + e锦水 + + + + + + + + + + + {{departmentName}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 积分排名 + + + + 政策导航 + + + + 了解锦水 + + + + 个人中心 + + + + + + + {{item.newsTitle}} + + + {{item.deptName}}-{{item.newsCategoryName}} + {{filter.formatTime(item.newsStartTime, 'yyyy-MM-dd')}} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/indexNew/indexNew.wxss b/pages/indexNew/indexNew.wxss index f0bb110..ac9a988 100644 --- a/pages/indexNew/indexNew.wxss +++ b/pages/indexNew/indexNew.wxss @@ -1,627 +1,633 @@ -page { - width: 100%; - height: auto; - overflow-y: auto; - background: #fff; -} - -.header { - position: fixed; - width: 100%; - top: 0; - left: 0; - z-index: 1000; -} - -.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; -} - -.home { - width: 100%; -} - -.belong-grid { - width: 100%; - height: 160rpx; - position: relative; -} - -.belong-grid .newbelong-grid { - display: flex; - flex-direction: row; - /* align-items: center; */ - justify-content: space-between; -} - -.belong-grid .belong-grid-bg { - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - z-index: 10; -} - -.belong-grid .newbelong-grid .grid { - /* width: 90%; */ - width: calc(100% - 129rpx); - height: 34rpx; - position: relative; - z-index: 100; - display: flex; - align-items: center; -} - -.belong-grid .newbelong-grid .grid .party-logo { - width: 24rpx; - height: 30rpx; - margin: 0 14rpx 0 22rpx; -} - -.belong-grid .newbelong-grid .grid .grid-name { - font-size: 32rpx; - color: #fff; -} - -.belong-grid .newbelong-grid .grid .more-grid { - width: 16rpx; - height: 22rpx; - margin-left: 10rpx; - margin-top: 5rpx; -} - -.belong-grid .newbelong-grid .my-and-news { - width: 129rpx; - height: 34rpx; - position: relative; - z-index: 100; - display: flex; - align-items: center; - justify-content: flex-end; -} - -.belong-grid .newbelong-grid .my-and-news .news { - width: 34rpx; - height: 34rpx; - margin-right: 24rpx; -} - -.belong-grid .newbelong-grid .my-and-news .my { - width: 34rpx; - height: 34rpx; - margin-left: 30rpx; -} - -.belong-grid .newImage { - position: relative; - height: calc(100% - 34rpx); - z-index: 999; - display: flex; - align-items: center; - justify-content: center; -} - -.belong-grid .newImage image { - width: 576rpx; - height: 52rpx; -} - -/* .belong-grid .news { - width: 34rpx; - height: 34rpx; - margin-right: 22rpx; - position: relative; - z-index: 100; -} */ - -/* bannner *********** start */ - -.banner { - width: 100%; - height: 340rpx; -} - -.banner swiper { - width: 100%; - height: 340rpx; -} - -.banner-item { - width: 100%; - height: 340rpx; - position: relative; -} - -.banner-item .banner-img { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; -} - -.banner-item .banner-content { - position: relative; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 100; - display: flex; - align-items: flex-end; -} - -.banner-item .banner-content .title { - width: 100%; - height: 91rpx; - background: rgba(0, 0, 0, 0.4); - box-sizing: border-box; - padding: 0 20rpx; - display: flex; - /* align-items: center; */ - justify-content: space-between; -} - -.banner-item .banner-content .title .title-text { - width: 75%; - /* height: 50rpx; */ - color: #fff; - font-size: 26rpx; - /* line-height: 50rpx; */ - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - margin-top: 10rpx; -} - -/* 自定义轮播指示点样式 */ - -.indication { - height: 70rpx; - display: flex; - position: absolute; - /* bottom: -2rpx; */ - right: 20rpx; - flex-direction: row; - /* align-items: center; */ - justify-content: center; -} - -/* 未选中指示点样式 */ - -.spot { - width: 10rpx; - height: 10rpx; - border-radius: 50%; - margin-right: 10rpx; - background-color: #c6c6c8; -} - -/*选中指示样式 */ - -.spot.active { - width: 10rpx; - height: 10rpx; - border-radius: 50%; - background-color: #fff; -} - -/* bannner *********** end */ - -/* 新版通知 */ - -.newnotice { - width: calc(100% - 88rpx); - height: 102rpx; - margin-left: 24rpx; - position: relative; - z-index: 888; - margin-top: -31rpx; - border-radius: 10rpx; - background: rgba(253, 253, 253, 1); - box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1); - padding: 0 20rpx; - display: flex; - align-items: center; -} - -.newnotice .image1 { - width: 599rpx; - height: 50rpx; -} - -.newnotice .image2 { - width: 174rpx; - height: 40rpx; - margin-left: 11rpx; -} - -.newnotice text { - font-size: 50rpx; - font-family: Impact; - font-weight: 400; - font-style: italic; - color: rgba(72, 72, 72, 1); - margin-left: 25rpx; -} - -/* 通知 start*/ - -.notice { - width: calc(100% - 88rpx); - height: 90rpx; - margin-left: 24rpx; - position: relative; - z-index: 888; - margin-top: -31rpx; - border-radius: 10rpx; - background: rgba(253, 253, 253, 1); - box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1); - padding: 0 20rpx; - display: flex; - align-items: center; -} - -.notice .left { - height: 28rpx; - width: calc(100% - 44rpx); - display: flex; - align-items: center; -} - -.notice .left image { - height: 28rpx; - width: 62rpx; -} - -.notice .left .circle { - width: 8rpx; - height: 8rpx; - background: #666; - border-radius: 50%; - margin-left: 21rpx; -} - -.notice .left .notice-info { - height: 24rpx; - width: calc(100%-148rpx); - font-size: 24rpx; - font-weight: 500; - color: rgba(153, 153, 153, 1); - line-height: 24rpx; - margin-left: 22rpx; -} - -/* 滚动start */ - -.havenotice { - overflow: hidden; - display: flex; - justify-content: space-between; - align-items: center; - height: 100%; - width: calc(100%-148rpx); -} - -.notice-broadcast-content { - margin-left: 12rpx; - width: 85%; - height: 20px; - position: relative; - top: 1px; - overflow: hidden; -} - -.notice_list { - width: 100%; -} - -.li { - color: #333; - font-size: 28rpx; - width: 100%; - height: 40rpx; - line-height: 40rpx; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.notice-broadcast-more { - font-size: 28rpx; - font-weight: normal; - color: #ffa650; - margin-top: 16rpx; -} - -.nomorenotice { - color: #666; - margin-left: 14rpx; -} - -.swiperitem { - height: 100%; - line-height: 30rpx; -} - -.swiper-txt { - font-size: 28rpx; - color: #333; - line-height: 40rpx; -} - -.swiper-position { - position: absolute; - margin: -20rpx 0 0 20rpx; - width: calc(100% - 200rpx); - z-index: 2; - height: 46rpx; - overflow: hidden; -} - -.swiperview .wx-swiper-dots { - display: none; -} - -/* 滚动end */ - -.notice .right { - height: 32rpx; - width: 44rpx; - position: relative; -} - -.notice .right image { - position: absolute; - width: 100%; - height: 100%; - left: 0px; - top: 0px; -} - -.notice .right .name { - position: absolute; - text-align: center; - width: 100%; - height: 100%; - left: 0px; - top: 0px; - font-size: 22rpx; - font-weight: 500; - color: rgba(255, 255, 255, 1); - line-height: 32rpx; -} - -/* 通知 end*/ - -/* 我有事说新版 */ - -.grid-all-new { - height: 278rpx; - width: calc(100% - 42rpx); - margin-top: 29rpx; - margin-left: 21rpx; -} - -.grid-all-new .weui-btn-left { - height: 100%; - width: 50%; - padding: 0; - border: none; - float: left; -} - -.hover-btn { - box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1); - border: 1px solid #666; -} - -.weui-btn-left+.weui-btn-left { - margin-top: 0 !important; -} - -.grid-all-new .weui-btn-left image { - height: 100%; - width: 100%; -} - -.grid-all-new .weui-btn-right { - height: 100%; - width: 50%; - float: left; -} - -.grid-all-new .weui-btn-right .weui-btn-top { - height: 50%; - width: 100%; - padding: 0; - border: none; -} - -.weui-btn-top+.weui-btn-top { - margin-top: 0 !important; -} - -.grid-all-new .weui-btn-right .weui-btn-top image { - height: 100%; - width: 100%; -} - -/* 我有事说 */ - -.grid-all { - height: 356rpx; - width: calc(100% - 54rpx); - margin-top: 29rpx; - margin-left: 27rpx; -} - -.grid-all .weui-btn { - height: 50%; - width: 50%; - padding: 0; - border: none; - float: left; -} - -.hover-btn { - box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1); - border: 1px solid #666; -} - -.weui-btn+.weui-btn { - margin-top: 0 !important; -} - -.grid-all .weui-btn image { - height: 100%; - width: 100%; -} - -/* 我有事说 end*/ - -/* 列表样式 */ - -.list-all { - width: calc(100% - 48rpx); - margin-left: 21rpx; - margin-top: 50rpx; -} - -.list-all .list-item { - border-bottom: 1rpx solid #eaeaea; - padding: 41rpx 18rpx 31rpx 15rpx; - display: flex; - /* align-items: center; */ -} - -.list-all .list-item:first-child { - border-top: 1rpx solid #eaeaea; -} - -.list-all .list-item:last-child { - border-bottom: none; -} - -.list-all .list-item .item-info { - width: calc(100% - 220rpx); - height: 146rpx; - position: relative; -} - -.list-all .list-item .item-info .item-info-name { - width: calc(100% - 47rpx); - font-size: 32rpx; - font-weight: 500; - color: rgba(63, 63, 63, 1); - line-height: 50rpx; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; -} - -.list-all .list-item .item-info .item-info-time { - width: calc(100% - 23rpx); - height: 22rpx; - position: absolute; - bottom: 5rpx; - display: flex; - flex-direction: row; - justify-content: space-between; -} - -.list-all .list-item .item-info .item-info-time text { - font-size: 22rpx; - font-weight: 500; - color: rgba(170, 170, 170, 1); - line-height: 22rpx; -} - -.list-all .list-item image { - width: 220rpx; - height: 146rpx; - border-radius: 10rpx; -} - -.list-all .list-item .label { - position: absolute; - z-index: 999; - width: 34rpx; - height: 34rpx; - right: 45rpx; -} - -.list-all .list-item .label image { - position: absolute; - width: 100%; - height: 100%; -} - -.nomorenews { - display: flex; - justify-content: center; - align-items: center; - font-size: 28rpx; - color: #999; - padding: 20rpx; -} - -/* 九宫格 */ - -.grid-new { - width: 100%; - height: 174rpx; -} - -.grid-new-item { - width: 25%; - height: 174rpx; - float: left; - /* display: flex; - justify-content: center; *//* align-items: center; */ -} - -.grid-new-item .grid-new-text { - height: 48rpx; - width: 100%; - font-size: 28rpx; - line-height: 48rpx; - font-weight: 500; - color: rgba(63, 63, 63, 1); - text-align: center; -} - -.grid-new-item .grid-new-btn { - height: 126rpx; - width: 126rpx; - padding: 0; - border: none; -} - -.grid-new-btn+.grid-new-btn { - margin-top: 0 !important; -} - -.grid-new-item .grid-new-btn image { - height: 100%; - width: 100%; -} +page { + width: 100%; + height: auto; + overflow-y: auto; + background: #fff; +} + +.header { + position: fixed; + width: 100%; + top: 0; + left: 0; + z-index: 1000; +} + +.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; +} + +.home { + width: 100%; +} + +.belong-grid { + width: 100%; + height: 160rpx; + position: relative; +} + +.belong-grid .newbelong-grid { + display: flex; + flex-direction: row; + /* align-items: center; */ + justify-content: space-between; +} + +.belong-grid .belong-grid-bg { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 10; +} + +.belong-grid .newbelong-grid .grid { + /* width: 90%; */ + width: calc(100% - 129rpx); + height: 34rpx; + position: relative; + z-index: 100; + display: flex; + align-items: center; +} + +.belong-grid .newbelong-grid .grid .party-logo { + width: 24rpx; + height: 30rpx; + margin: 0 14rpx 0 22rpx; +} + +.belong-grid .newbelong-grid .grid .grid-name { + font-size: 32rpx; + color: #fff; +} + +.belong-grid .newbelong-grid .grid .more-grid { + width: 16rpx; + height: 22rpx; + margin-left: 10rpx; + margin-top: 5rpx; +} + +.belong-grid .newbelong-grid .my-and-news { + width: 129rpx; + height: 34rpx; + position: relative; + z-index: 100; + display: flex; + align-items: center; + justify-content: flex-end; +} + +.belong-grid .newbelong-grid .my-and-news .news { + width: 34rpx; + height: 34rpx; + margin-right: 24rpx; +} + +.belong-grid .newbelong-grid .my-and-news .my { + width: 34rpx; + height: 34rpx; + margin-left: 30rpx; +} + +.belong-grid .newImage { + position: relative; + height: calc(100% - 34rpx); + z-index: 999; + display: flex; + align-items: center; + justify-content: center; +} + +.belong-grid .newImage image { + width: 576rpx; + height: 52rpx; +} + +/* .belong-grid .news { + width: 34rpx; + height: 34rpx; + margin-right: 22rpx; + position: relative; + z-index: 100; +} */ + +/* bannner *********** start */ + +.banner { + width: 100%; + height: 340rpx; +} + +.banner swiper { + width: 100%; + height: 340rpx; +} + +.banner-item { + width: 100%; + height: 340rpx; + position: relative; +} + +.banner-item .banner-img { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; +} + +.banner-item .banner-content { + position: relative; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 100; + display: flex; + align-items: flex-end; +} + +.banner-item .banner-content .title { + width: 100%; + height: 91rpx; + background: rgba(0, 0, 0, 0.4); + box-sizing: border-box; + padding: 0 20rpx; + display: flex; + /* align-items: center; */ + justify-content: space-between; +} + +.banner-item .banner-content .title .title-text { + width: 75%; + /* height: 50rpx; */ + color: #fff; + font-size: 26rpx; + /* line-height: 50rpx; */ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-top: 10rpx; +} + +/* 自定义轮播指示点样式 */ + +.indication { + height: 70rpx; + display: flex; + position: absolute; + /* bottom: -2rpx; */ + right: 20rpx; + flex-direction: row; + /* align-items: center; */ + justify-content: center; +} + +/* 未选中指示点样式 */ + +.spot { + width: 10rpx; + height: 10rpx; + border-radius: 50%; + margin-right: 10rpx; + background-color: #c6c6c8; +} + +/*选中指示样式 */ + +.spot.active { + width: 10rpx; + height: 10rpx; + border-radius: 50%; + background-color: #fff; +} + +/* bannner *********** end */ + +/* 新版通知 */ + +.newnotice { + width: calc(100% - 88rpx); + height: 102rpx; + margin-left: 24rpx; + position: relative; + z-index: 888; + margin-top: -31rpx; + border-radius: 10rpx; + background: rgba(253, 253, 253, 1); + box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1); + padding: 0 20rpx; + display: flex; + align-items: center; +} + +.image-call { + width: 126rpx; + height: 72rpx; + margin-left: 70rpx; +} +.newnotice .image1 { + width: 456rpx; + height: 50rpx; +} + +.newnotice .image2 { + width: 174rpx; + height: 40rpx; + margin-left: 11rpx; +} + +.newnotice text { + font-size: 50rpx; + font-family: Impact; + font-weight: 400; + font-style: italic; + color: rgba(72, 72, 72, 1); + margin-left: 25rpx; +} + +/* 通知 start*/ + +.notice { + width: calc(100% - 88rpx); + height: 90rpx; + margin-left: 24rpx; + position: relative; + z-index: 888; + margin-top: -31rpx; + border-radius: 10rpx; + background: rgba(253, 253, 253, 1); + box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1); + padding: 0 20rpx; + display: flex; + align-items: center; +} + +.notice .left { + height: 28rpx; + width: calc(100% - 44rpx); + display: flex; + align-items: center; +} + +.notice .left image { + height: 28rpx; + width: 62rpx; +} + +.notice .left .circle { + width: 8rpx; + height: 8rpx; + background: #666; + border-radius: 50%; + margin-left: 21rpx; +} + +.notice .left .notice-info { + height: 24rpx; + width: calc(100%-148rpx); + font-size: 24rpx; + font-weight: 500; + color: rgba(153, 153, 153, 1); + line-height: 24rpx; + margin-left: 22rpx; +} + +/* 滚动start */ + +.havenotice { + overflow: hidden; + display: flex; + justify-content: space-between; + align-items: center; + height: 100%; + width: calc(100%-148rpx); +} + +.notice-broadcast-content { + margin-left: 12rpx; + width: 85%; + height: 20px; + position: relative; + top: 1px; + overflow: hidden; +} + +.notice_list { + width: 100%; +} + +.li { + color: #333; + font-size: 28rpx; + width: 100%; + height: 40rpx; + line-height: 40rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.notice-broadcast-more { + font-size: 28rpx; + font-weight: normal; + color: #ffa650; + margin-top: 16rpx; +} + +.nomorenotice { + color: #666; + margin-left: 14rpx; +} + +.swiperitem { + height: 100%; + line-height: 30rpx; +} + +.swiper-txt { + font-size: 28rpx; + color: #333; + line-height: 40rpx; +} + +.swiper-position { + position: absolute; + margin: -20rpx 0 0 20rpx; + width: calc(100% - 200rpx); + z-index: 2; + height: 46rpx; + overflow: hidden; +} + +.swiperview .wx-swiper-dots { + display: none; +} + +/* 滚动end */ + +.notice .right { + height: 32rpx; + width: 44rpx; + position: relative; +} + +.notice .right image { + position: absolute; + width: 100%; + height: 100%; + left: 0px; + top: 0px; +} + +.notice .right .name { + position: absolute; + text-align: center; + width: 100%; + height: 100%; + left: 0px; + top: 0px; + font-size: 22rpx; + font-weight: 500; + color: rgba(255, 255, 255, 1); + line-height: 32rpx; +} + +/* 通知 end*/ + +/* 我有事说新版 */ + +.grid-all-new { + height: 278rpx; + width: calc(100% - 42rpx); + margin-top: 29rpx; + margin-left: 21rpx; + margin-bottom: 29rpx; +} + +.grid-all-new .weui-btn-left { + height: 100%; + width: 50%; + padding: 0; + border: none; + float: left; +} + +.hover-btn { + box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1); + border: 1px solid #666; +} + +.weui-btn-left+.weui-btn-left { + margin-top: 0 !important; +} + +.grid-all-new .weui-btn-left image { + height: 100%; + width: 100%; +} + +.grid-all-new .weui-btn-right { + height: 100%; + width: 50%; + float: left; +} + +.grid-all-new .weui-btn-right .weui-btn-top { + height: 50%; + width: 100%; + padding: 0; + border: none; +} + +.weui-btn-top+.weui-btn-top { + margin-top: 0 !important; +} + +.grid-all-new .weui-btn-right .weui-btn-top image { + height: 100%; + width: 100%; +} + +/* 我有事说 */ + +.grid-all { + height: 356rpx; + width: calc(100% - 54rpx); + margin-top: 29rpx; + margin-left: 27rpx; +} + +.grid-all .weui-btn { + height: 50%; + width: 50%; + padding: 0; + border: none; + float: left; +} + +.hover-btn { + box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1); + border: 1px solid #666; +} + +.weui-btn+.weui-btn { + margin-top: 0 !important; +} + +.grid-all .weui-btn image { + height: 100%; + width: 100%; +} + +/* 我有事说 end*/ + +/* 列表样式 */ + +.list-all { + width: calc(100% - 48rpx); + margin-left: 21rpx; + margin-top: 50rpx; +} + +.list-all .list-item { + border-bottom: 1rpx solid #eaeaea; + padding: 41rpx 18rpx 31rpx 15rpx; + display: flex; + /* align-items: center; */ +} + +.list-all .list-item:first-child { + border-top: 1rpx solid #eaeaea; +} + +.list-all .list-item:last-child { + border-bottom: none; +} + +.list-all .list-item .item-info { + width: calc(100% - 220rpx); + height: 146rpx; + position: relative; +} + +.list-all .list-item .item-info .item-info-name { + width: calc(100% - 47rpx); + font-size: 32rpx; + font-weight: 500; + color: rgba(63, 63, 63, 1); + line-height: 50rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.list-all .list-item .item-info .item-info-time { + width: calc(100% - 23rpx); + height: 22rpx; + position: absolute; + bottom: 5rpx; + display: flex; + flex-direction: row; + justify-content: space-between; +} + +.list-all .list-item .item-info .item-info-time text { + font-size: 22rpx; + font-weight: 500; + color: rgba(170, 170, 170, 1); + line-height: 22rpx; +} + +.list-all .list-item image { + width: 220rpx; + height: 146rpx; + border-radius: 10rpx; +} + +.list-all .list-item .label { + position: absolute; + z-index: 999; + width: 34rpx; + height: 34rpx; + right: 45rpx; +} + +.list-all .list-item .label image { + position: absolute; + width: 100%; + height: 100%; +} + +.nomorenews { + display: flex; + justify-content: center; + align-items: center; + font-size: 28rpx; + color: #999; + padding: 20rpx; +} + +/* 九宫格 */ + +.grid-new { + width: 100%; + height: 174rpx; +} + +.grid-new-item { + width: 25%; + height: 174rpx; + float: left; + /* display: flex; + justify-content: center; *//* align-items: center; */ +} + +.grid-new-item .grid-new-text { + height: 48rpx; + width: 100%; + font-size: 28rpx; + line-height: 48rpx; + font-weight: 500; + color: rgba(63, 63, 63, 1); + text-align: center; +} + +.grid-new-item .grid-new-btn { + height: 126rpx; + width: 126rpx; + padding: 0; + border: none; +} + +.grid-new-btn+.grid-new-btn { + margin-top: 0 !important; +} + +.grid-new-item .grid-new-btn image { + height: 100%; + width: 100%; +} diff --git a/project.config.json b/project.config.json index 00f0fe9..de6daae 100644 --- a/project.config.json +++ b/project.config.json @@ -22,9 +22,9 @@ "disablePlugins": [], "outputPath": "" }, - "useIsolateContext": true, "useCompilerModule": false, - "userConfirmedUseCompilerModuleSwitch": false + "userConfirmedUseCompilerModuleSwitch": false, + "useIsolateContext": true }, "compileType": "miniprogram", "libVersion": "2.8.2", diff --git a/subpages/integralCentre/pages/index/index.js b/subpages/integralCentre/pages/index/index.js index e48561f..15911a0 100644 --- a/subpages/integralCentre/pages/index/index.js +++ b/subpages/integralCentre/pages/index/index.js @@ -1,232 +1,237 @@ -// subpages/integralCentre/pages/index/index.js -import { - pointsRecordlist, - pointsRankinglist, - userPointsRankinglist -} from '../../../../utils/api' -import { - getTimestamp -} from '../../../../utils/common' -Page({ - - /** - * 页面的初始数据 - */ - data: { - nodatapointsRecord: false, - nodatapointsRanking: false, - points: 0, //积分 - pageIndex: 1, - pageSize: 15, - pointsRecordlist: [], //积分记录列表 - pointsRankinglist: [], //积分排行 - rankingType: 0, //排名方式 - selectTab: 'tab1', - typeList: [{ //排名方式:0-周,1-月 - type: '0', - name: '网格排名', - select: true - }, - { - type: '1', - name: '街道排名', - select: false - } - ], - timestamp: getTimestamp(), - loadMoreType: 'none', - loadMoreVisible: false, - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function(options) { - this.setData({ //前面页面传过来的积分总数 - points: options.points - }) - this.pointsRankinglist(); //初始化加载积分记录列表 - }, - // tab 切换 - onTabChange(e) { - this.setData({ - pageIndex: 1, - pageSize: 15, - loadMoreType: 'loading', - loadMoreVisible: true, - pointsRecordlist: [], - pointsRankinglist: [], - pointsRankingUser: {},//当前用户排名信息 - selectTab: e.currentTarget.dataset.tab, - nodatapointsRecord: false, - nodatapointsRanking: false, - }) - if (this.data.selectTab == 'tab1') { - this.pointsRankinglist(); //积分排行 - } else { - this.pointsRecordlist(); //初始化加载积分记录列表 - } - }, - // 排行切换 - onButtonChange: function(e) { - const list = this.data.typeList - let that = this; - list.forEach(item => { - if (item.type === e.currentTarget.dataset.type) { - item.select = true - } else { - item.select = false - } - }) - that.setData({ - typeList: list, - rankingType: e.currentTarget.dataset.type, - pageIndex: 1, - pageSize: 15, - timestamp: this.data.timestamp, - pointsRankinglist: [], - nodatapointsRanking: false, - loadMoreType: 'loading', - loadMoreVisible: true, - }) - - that.pointsRankinglist() - }, - - // 积分记录-积分排行接口 - pointsRankinglist() { - let that = this - const para = { - pageIndex: 1, - pageSize: 20, - timestamp: this.data.timestamp, - rankingType: this.data.rankingType, //排名方式:0-周,1-月 - } - userPointsRankinglist(para).then(res => { - that.setData({ - pointsRankingUser: res.data.currentUser, - pointsRankinglist: that.data.pointsRankinglist.concat(res.data.rank), - }) - if (that.data.pointsRankinglist.length > 0) { - that.setData({ - nodatapointsRanking: false, - loadMoreType: 'none', - }) - } else { - that.setData({ - nodatapointsRanking: true, - loadMoreType: 'none', - loadMoreVisible: false, - }) - } - }).catch(err => { - that.setData({ - pointsRankinglist: [], - nodatapointsRanking: true, - loadMoreType: 'none', - loadMoreVisible: false, - }) - console.log(err) - }) - }, - - // 积分记录-积分记录接口 - pointsRecordlist() { - let that = this - const para = { - pageIndex: this.data.pageIndex, - pageSize: this.data.pageSize, - timestamp: this.data.timestamp, - } - pointsRecordlist(para).then(res => { - that.setData({ - pointsRecordlist: that.data.pointsRecordlist.concat(res.data), - loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', - }) - if (that.data.pointsRecordlist.length > 0) { - that.setData({ - nodatapointsRecord: false, - }) - } else { - that.setData({ - nodatapointsRecord: true, - loadMoreVisible: false, - }) - } - }).catch(err => { - that.setData({ - loadMoreType: 'none', - loadMoreVisible: false, - pointsRecordlist: [], - nodatapointsRecord: true, - }) - console.log(err) - }) - }, - - - - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function(options) {}, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function() { - this.setData({ - loadMoreVisible: true - }) - - if (this.data.selectTab == 'tab1') { - // this.pointsRankinglist(); //积分排行 - } else { - - if (this.data.loadMoreType === 'loading') { - this.setData({ - pageIndex: this.data.pageIndex + 1, - pageSize: this.data.pageSize, - timestamp: this.data.timestamp, - nodatapointsRecord: false, - }) - this.pointsRecordlist(); //初始化加载积分记录列表 - } - } - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function() { - - } +// subpages/integralCentre/pages/index/index.js +import { + pointsRecordlist, + pointsRankinglist, + userPointsRankinglist +} from '../../../../utils/api' +import { + getTimestamp +} from '../../../../utils/common' +Page({ + + /** + * 页面的初始数据 + */ + data: { + nodatapointsRecord: false, + nodatapointsRanking: false, + points: 0, //积分 + pageIndex: 1, + pageSize: 15, + pointsRecordlist: [], //积分记录列表 + pointsRankinglist: [], //积分排行 + rankingType: 0, //排名方式 + selectTab: 'tab1', + typeList: [{ //排名方式:0-周,1-月 + type: '0', + name: '网格排名', + select: true + }, + { + type: '1', + name: '街道排名', + select: false + }, + { + type: '2', + name: '等级排名', + select: false + } + ], + timestamp: getTimestamp(), + loadMoreType: 'none', + loadMoreVisible: false, + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + this.setData({ //前面页面传过来的积分总数 + points: options.points + }) + this.pointsRankinglist(); //初始化加载积分记录列表 + }, + // tab 切换 + onTabChange(e) { + this.setData({ + pageIndex: 1, + pageSize: 15, + loadMoreType: 'loading', + loadMoreVisible: true, + pointsRecordlist: [], + pointsRankinglist: [], + pointsRankingUser: {},//当前用户排名信息 + selectTab: e.currentTarget.dataset.tab, + nodatapointsRecord: false, + nodatapointsRanking: false, + }) + if (this.data.selectTab == 'tab1') { + this.pointsRankinglist(); //积分排行 + } else { + this.pointsRecordlist(); //初始化加载积分记录列表 + } + }, + // 排行切换 + onButtonChange: function(e) { + const list = this.data.typeList + let that = this; + list.forEach(item => { + if (item.type === e.currentTarget.dataset.type) { + item.select = true + } else { + item.select = false + } + }) + that.setData({ + typeList: list, + rankingType: e.currentTarget.dataset.type, + pageIndex: 1, + pageSize: 15, + timestamp: this.data.timestamp, + pointsRankinglist: [], + nodatapointsRanking: false, + loadMoreType: 'loading', + loadMoreVisible: true, + }) + + that.pointsRankinglist() + }, + + // 积分记录-积分排行接口 + pointsRankinglist() { + let that = this + const para = { + pageIndex: 1, + pageSize: 20, + timestamp: this.data.timestamp, + rankingType: this.data.rankingType, //排名方式:0-周,1-月 + } + userPointsRankinglist(para).then(res => { + that.setData({ + pointsRankingUser: res.data.currentUser, + pointsRankinglist: that.data.pointsRankinglist.concat(res.data.rank), + }) + if (that.data.pointsRankinglist.length > 0) { + that.setData({ + nodatapointsRanking: false, + loadMoreType: 'none', + }) + } else { + that.setData({ + nodatapointsRanking: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + } + }).catch(err => { + that.setData({ + pointsRankinglist: [], + nodatapointsRanking: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + console.log(err) + }) + }, + + // 积分记录-积分记录接口 + pointsRecordlist() { + let that = this + const para = { + pageIndex: this.data.pageIndex, + pageSize: this.data.pageSize, + timestamp: this.data.timestamp, + } + pointsRecordlist(para).then(res => { + that.setData({ + pointsRecordlist: that.data.pointsRecordlist.concat(res.data), + loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', + }) + if (that.data.pointsRecordlist.length > 0) { + that.setData({ + nodatapointsRecord: false, + }) + } else { + that.setData({ + nodatapointsRecord: true, + loadMoreVisible: false, + }) + } + }).catch(err => { + that.setData({ + loadMoreType: 'none', + loadMoreVisible: false, + pointsRecordlist: [], + nodatapointsRecord: true, + }) + console.log(err) + }) + }, + + + + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function(options) {}, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + this.setData({ + loadMoreVisible: true + }) + + if (this.data.selectTab == 'tab1') { + // this.pointsRankinglist(); //积分排行 + } else { + + if (this.data.loadMoreType === 'loading') { + this.setData({ + pageIndex: this.data.pageIndex + 1, + pageSize: this.data.pageSize, + timestamp: this.data.timestamp, + nodatapointsRecord: false, + }) + this.pointsRecordlist(); //初始化加载积分记录列表 + } + } + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function() { + + } }) \ No newline at end of file diff --git a/utils/activity.js b/utils/activity.js index d15ba83..b4d83bc 100644 --- a/utils/activity.js +++ b/utils/activity.js @@ -1,28 +1,28 @@ -var fly = require('./request.js') -module.exports = { - getActivityList: getActivityList, - bannerList, - bannerListV2, - volunteerlist, - getImgUrl -} - -function getActivityList(params) { - return fly.get('heart/act/list', params) -} - -function bannerList(params) { - return fly.get('heart/act/banner/list',params) -} - -function bannerListV2() { - return fly.get('heart/actbanner/banner/list') -} -// 志愿者列表 -function volunteerlist(params) { - return fly.get('app-user/volunteer/list',params) -} -// 获取配置图片 -function getImgUrl(imgType) { - return fly.get(`imgConfig/getImgUrl/${imgType}`) +var fly = require('./request.js') +module.exports = { + getActivityList: getActivityList, + bannerList, + bannerListV2, + volunteerlist, + getImgUrl +} + +function getActivityList(params) { + return fly.get('heart/act/list', params) +} + +function bannerList(params) { + return fly.get('heart/act/banner/list',params) +} + +function bannerListV2() { + return fly.get('heart/actbanner/banner/list') +} +// 志愿者列表 +function volunteerlist(params) { + return fly.get('app-user/volunteer/list',params) +} +// 获取配置图片 +function getImgUrl(imgType) { + return fly.get(`imgConfig/getImgUrl/${imgType}`) } \ No newline at end of file diff --git a/utils/api.js b/utils/api.js index 4018626..2786565 100644 --- a/utils/api.js +++ b/utils/api.js @@ -1,503 +1,515 @@ -var fly = require('./request.js') -module.exports = { - getToken: getToken, - getCompleteName: getCompleteName, - saveWxFormid: saveWxFormid, - getScanSwitch: getScanSwitch, - getTokenV2: getTokenV2, - updateWxInfo: updateWxInfo, - sendSms: sendSms, - gridLeaderRegister: gridLeaderRegister, - getGridList: getGridList, - changeGrid: changeGrid, - completeInfo: completeInfo, - completeResidentInfo: completeResidentInfo, - completePartyInfo: completePartyInfo, - prepareComplete: prepareComplete, - getUserInfo: getUserInfo, - getMyAssociation: getMyAssociation, - getCommandAssociation: getCommandAssociation, - getMyTopicList: getMyTopicList, - getMyTopicListV2:getMyTopicListV2, - getMyIssueList: getMyIssueList, - getMyProjectList: getMyProjectList, - checkWxUnionId: checkWxUnionId, - bannerList: bannerList, - getFirstInfo: getFirstInfo, - noticelist: noticelist, - newsList: newsList, - getIssueList: getIssueList, - getProjectList: getProjectList, - pointsRankinglist: pointsRankinglist, - pointsRecordlist: pointsRecordlist, - // 爱心互助 - leaderboard: leaderboard, - detail: detail, - rejectDetail: rejectDetail, - cancelDetail: cancelDetail, - clockAddressDetail: clockAddressDetail, - clockList: clockList, - getPhraseList: getPhraseList, - sagenumAddOne: sagenumAddOne, - clock: clock, - authenticate: authenticate, - signup: signup, - cancelsignup:cancelsignup, - getSignedList: getSignedList, - unpassActivityDetail: unpassActivityDetail, - completeInfoV2: completeInfoV2, - getTokenV3: getTokenV3, - getWxPhone: getWxPhone, - completeResidentInfoV2: completeResidentInfoV2, - completePartyInfoV2: completePartyInfoV2, - userPointsRankinglist:userPointsRankinglist, - getDefaultGridInfo:getDefaultGridInfo, - getResidentConfig:getResidentConfig -} - -function getToken(wxCode) { - return fly.get('app-user/user/ma/getToken', { - wxCode: wxCode - }) -} - -function bannerList(position) { - return fly.get('news/banner/list', { - position - }) -} - -function getIssueList(param) { - return fly.get('events/issue/list', param) -} - -function getProjectList(param) { - return fly.get('events/item/list', param) -} - -function getFirstInfo() { - return fly.post('news/information/first') -} - -function noticelist(param) { - return fly.get('news/notice/list', param) -} - -function newsList(param) { - return fly.get('news/news/list', param) -} - -function getScanSwitch(versionNum) { - return fly.get('ma/scanSwitch', { - versionNum - }) -} - -function getCompleteName(gridId) { - return fly.get('admin/dept/completeName', { - gridId: gridId - }) -} - -function saveWxFormid(wxCode, wxFormId) { - return fly.post('app-user/wxformid/save', { - wxCode: wxCode, - wxFormId: wxFormId - }) -} - -function getTokenV2({ - wxCode, - gridId, - inviteUserId -}) { - return fly.get('app-user/user/ma/v2/getToken', { - wxCode, - gridId, - inviteUserId - }) -} - -function updateWxInfo(wxCode, encryptedData, iv) { - return fly.post('app-user/user/ma/updateWxInfo', { - wxCode: wxCode, - encryptedData: encryptedData, - iv: iv - }) -} - -function gridLeaderRegister(mobile, smsCode, wxCode) { - return fly.post('app-user/user/ma/gridLeaderRegister', { - mobile: mobile, - smsCode: smsCode, - wxCode: wxCode - }) -} - - - -function prepareComplete() { - return fly.get('app-user/user/prepareComplete', {}) -} - -function sendSms(mobile) { - return fly.get('message/sms/sendCode', { - mobile: mobile - }) -} - -/** - * 获取网格长管理的所有网格 - */ -function getGridList() { - return fly.get('app-user/user/listGrid') -} - -/** - * 网格长切换网格 - * @params { - * gridId 将要切换的网格id - * } - */ -function changeGrid(gridId) { - return fly.get(`app-user/user/switchGrid/${gridId}`) -} -// ---------------------------------党群议事start--------------------- - -/** - * 获取 议题列表 - */ -function getIssueList(params) { - return fly.get('events/issue/list', params) -} - -/** - * 获取项目列表 - */ -function getProjectList(params) { - return fly.get('events/item/list', params) -} -// ---------------------------------党群议事 end --------------------- -// ---------------------------------友邻社群接口start------------------ - -/** - * 获取用户信息 - * @param {*} param0 - */ -// function getUserInfo() { -// return fly.get('/app-user/user/getInfoById') -// } -function getUserInfo() { - return fly.get('app-user/user/getInfoById') -} -/** - * 我的群列表 - */ -function getMyAssociation() { - return fly.get('group/group/listOfMine') -} - -/** - * 推荐群列表 - */ -function getCommandAssociation() { - return fly.get('group/group/listOfRecommend') -} - -// ---------------------------------友邻社群接口end-------------------- - -// ---------------------------------个人中心接口start------------------ - -/** - * 我的话题列表 - */ -function getMyTopicList({ - pageIndex, - pageSize -}) { - return fly.get('group/topic/listOfMine', { - pageIndex, - pageSize - }) -} -/** - * 我的话题列表V2 - */ -function getMyTopicListV2({ - pageIndex, - pageSize, - timestamp -}) { - return fly.get('partyGroup/myTopicList/list', { - pageIndex, - pageSize, - timestamp - }) -} -/** - * 我的议题列表 - */ -function getMyIssueList() { - return fly.get('events/issue/listByUserId') -} - -/** - * 我的项目列表 - */ -function getMyProjectList({ - pageIndex, - pageSize, - timestamp -}) { - return fly.get('events/item/listByUserId', { - pageIndex, - pageSize, - timestamp - }) -} - -/** - * 查看用户是否已保存unionId - */ -function checkWxUnionId() { - return fly.get('app-user/user/checkWxUnionId') -} -// ---------------------------------个人中心接口 end------------------- - -/** - * 积分记录-积分记录接口 - * timestamp String 第一页查询发起时的时间 - * pageIndex Number 页码 - * pageSize Number 页容量 - */ -function pointsRecordlist({ - timestamp, - pageIndex, - pageSize -}) { - return fly.get('points/pointsRecord/list', { - timestamp, - pageIndex, - pageSize - }) -} - -/** - * 积分记录-积分排行接口 - * timestamp String 第一页查询发起时的时间 - * pageIndex Number 页码 - * pageSize Number 页容量 - * rankingType Number 排名方式:0-周,1-月 - */ - -function pointsRankinglist({ - timestamp, - pageIndex, - pageSize, - rankingType -}) { - return fly.get('points/pointsRanking/list', { - timestamp, - pageIndex, - pageSize, - rankingType - }) -} -/** - * 积分记录-锦水-积分排行接口 v2 排名方式发生改变 - * timestamp String 第一页查询发起时的时间 - * pageIndex Number 页码 - * pageSize Number 页容量 - * rankingType Number 排名方式:0-网格,1-街道 - */ -function userPointsRankinglist({ - timestamp, - pageIndex, - pageSize, - rankingType -}) { - return fly.get('app-user/userPointsRanking/list', { - timestamp, - pageIndex, - pageSize, - rankingType - }) -} - -// *****************************爱心互助接口*************************** - -/** - * 排行榜 - */ -function leaderboard() { - return fly.get('heart/volunteer/leaderboard') -} -/** - * 活动详情 - */ -function detail(id) { - return fly.get(`heart/act/detail/${id}`) -} - -/** - * 未通过活动详情 - */ -function rejectDetail(id) { - return fly.get(`heart/act/rejectDetail/${id}`) -} - -/** - * 取消活动详情 - */ -function cancelDetail(id) { - return fly.get(`heart/act/cancelDetail/${id}`) -} - - -/** - * 活动打卡地点详情 - */ -function clockAddressDetail(id) { - return fly.get('heart/act/clockAddressDetail', { - actId: id - }) -} - -/** - * 打卡列表 - */ -function clockList(actId) { - return fly.get('heart/act/clockList', { - actId: actId - }) -} -/** - * 常用语列表 - */ -function getPhraseList() { - return fly.get('heart/phrase/getPhraseList') -} - -/** - * 使用常用语 - */ -function sagenumAddOne(id) { - return fly.post('heart/phrase/sagenumAddOne', { - id: id - }) -} - - -/** - * 活动打卡 - */ -function clock(data) { - return fly.post('heart/act/clock', data) -} - -// /** -// * 志愿者认证 -// */ -// function authenticate(data) { -// return fly.post('app-user/volunteer/authenticate', data) -// } - -/** - * 志愿者认证 v2 - */ -function authenticate(data) { - return fly.post('app-user/volunteer/v2/authenticate', data) -} -/** - * 活动报名 - */ - -function signup(actId) { - return fly.post(`heart/act/signup?actId=${actId}`) -} - -/** - * 取消报名 - */ -function cancelsignup(id, response) { - return fly.post('heart/act/cancelsignup', { - actId: id, - failureReason: response - }) -} - - - -/** - * 已报名活动 - */ -function getSignedList({ pageIndex, pageSize, timestamp, actType }) { - return fly.get('heart/act/signupList', { - pageIndex, - pageSize, - timestamp, - actType - }) -} - -/** - * 未通过活动详情 - */ -function unpassActivityDetail(id) { - return fly.get(`heart/act/rejectDetail/${id}`) -} - - - -/** - * 用户完善个人信息v2(不穿验证码) - */ -function completeInfoV2(para) { - return fly.post('app-user/user/v2/completeInfo', para) -} -function completeInfo(data) { - return fly.post('app-user/user/completeInfo', data) -} -//居民 完善个人信息 -function completeResidentInfo(data) { - return fly.post('app-user/user/completeResidentInfo', data) -} -//党员 完善个人信息 -function completePartyInfo(data) { - return fly.post('app-user/user/completePartyInfo', data) -} -// 居民 完善个人信息v2 不需要穿验证码 -function completeResidentInfoV2(para) { - return fly.post('app-user/user/v2/completeResidentInfo', para) -} -// 党员 完善个人信息 v2 不需要穿验证码 -function completePartyInfoV2(para) { - return fly.post('app-user/user/v2/completePartyInfo', para) -} - - -/** - * 获取Token v3 网格码和邀请码合二为一 - */ - -function getTokenV3(para) { - return fly.get('app-user/user/ma/v3/getToken', para) -} - -/********微信获取手机号 ********/ -function getWxPhone({ wxCode, encryptedData, iv }) { - return fly.get('app-user/user/ma/getWxPhone', { - wxCode, - encryptedData, - iv - }) -} -// *****************************爱心互助接口***************************end -// 获取默认网格信息 -function getDefaultGridInfo() { - return fly.get('dic/getDefaultGridInfo') -} -// 获取居民端配置 -function getResidentConfig() { - return fly.get('residentConfig/getResidentConfig') +var fly = require('./request.js') +module.exports = { + getToken: getToken, + getCompleteName: getCompleteName, + saveWxFormid: saveWxFormid, + getScanSwitch: getScanSwitch, + getTokenV2: getTokenV2, + updateWxInfo: updateWxInfo, + sendSms: sendSms, + gridLeaderRegister: gridLeaderRegister, + getGridList: getGridList, + changeGrid: changeGrid, + completeInfo: completeInfo, + completeResidentInfo: completeResidentInfo, + completePartyInfo: completePartyInfo, + prepareComplete: prepareComplete, + getUserInfo: getUserInfo, + getMyAssociation: getMyAssociation, + getCommandAssociation: getCommandAssociation, + getMyTopicList: getMyTopicList, + getMyTopicListV2:getMyTopicListV2, + getMyIssueList: getMyIssueList, + getMyProjectList: getMyProjectList, + checkWxUnionId: checkWxUnionId, + bannerList: bannerList, + getFirstInfo: getFirstInfo, + noticelist: noticelist, + newsList: newsList, + getIssueList: getIssueList, + getProjectList: getProjectList, + pointsRankinglist: pointsRankinglist, + pointsRecordlist: pointsRecordlist, + // 爱心互助 + leaderboard: leaderboard, + detail: detail, + rejectDetail: rejectDetail, + cancelDetail: cancelDetail, + clockAddressDetail: clockAddressDetail, + clockList: clockList, + getPhraseList: getPhraseList, + sagenumAddOne: sagenumAddOne, + clock: clock, + authenticate: authenticate, + signup: signup, + cancelsignup:cancelsignup, + getSignedList: getSignedList, + unpassActivityDetail: unpassActivityDetail, + completeInfoV2: completeInfoV2, + getTokenV3: getTokenV3, + getWxPhone: getWxPhone, + completeResidentInfoV2: completeResidentInfoV2, + completePartyInfoV2: completePartyInfoV2, + userPointsRankinglist:userPointsRankinglist, + getDefaultGridInfo:getDefaultGridInfo, + getResidentConfig:getResidentConfig, + getScrip:getScrip, + getHomePhone:getHomePhone +} + +function getToken(wxCode) { + return fly.get('app-user/user/ma/getToken', { + wxCode: wxCode + }) +} + +function bannerList(position) { + return fly.get('news/banner/list', { + position + }) +} + +function getIssueList(param) { + return fly.get('events/issue/list', param) +} + +function getProjectList(param) { + return fly.get('events/item/list', param) +} + +function getFirstInfo() { + return fly.post('news/information/first') +} + +function noticelist(param) { + return fly.get('news/notice/list', param) +} + +function newsList(param) { + return fly.get('news/news/list', param) +} + +function getScanSwitch(versionNum) { + return fly.get('ma/scanSwitch', { + versionNum + }) +} + +function getCompleteName(gridId) { + return fly.get('admin/dept/completeName', { + gridId: gridId + }) +} + +function saveWxFormid(wxCode, wxFormId) { + return fly.post('app-user/wxformid/save', { + wxCode: wxCode, + wxFormId: wxFormId + }) +} + +function getTokenV2({ + wxCode, + gridId, + inviteUserId +}) { + return fly.get('app-user/user/ma/v2/getToken', { + wxCode, + gridId, + inviteUserId + }) +} + +function updateWxInfo(wxCode, encryptedData, iv) { + return fly.post('app-user/user/ma/updateWxInfo', { + wxCode: wxCode, + encryptedData: encryptedData, + iv: iv + }) +} + +function gridLeaderRegister(mobile, smsCode, wxCode) { + return fly.post('app-user/user/ma/gridLeaderRegister', { + mobile: mobile, + smsCode: smsCode, + wxCode: wxCode + }) +} + + + +function prepareComplete() { + return fly.get('app-user/user/prepareComplete', {}) +} + +function sendSms(mobile) { + return fly.get('message/sms/sendCode', { + mobile: mobile + }) +} + +/** + * 获取网格长管理的所有网格 + */ +function getGridList() { + return fly.get('app-user/user/listGrid') +} + +/** + * 网格长切换网格 + * @params { + * gridId 将要切换的网格id + * } + */ +function changeGrid(gridId) { + return fly.get(`app-user/user/switchGrid/${gridId}`) +} +// ---------------------------------党群议事start--------------------- + +/** + * 获取 议题列表 + */ +function getIssueList(params) { + return fly.get('events/issue/list', params) +} + +/** + * 获取项目列表 + */ +function getProjectList(params) { + return fly.get('events/item/list', params) +} +// ---------------------------------党群议事 end --------------------- +// ---------------------------------友邻社群接口start------------------ + +/** + * 获取用户信息 + * @param {*} param0 + */ +// function getUserInfo() { +// return fly.get('/app-user/user/getInfoById') +// } +function getUserInfo() { + return fly.get('app-user/user/getInfoById') +} +/** + * 我的群列表 + */ +function getMyAssociation() { + return fly.get('group/group/listOfMine') +} + +/** + * 推荐群列表 + */ +function getCommandAssociation() { + return fly.get('group/group/listOfRecommend') +} + +// ---------------------------------友邻社群接口end-------------------- + +// ---------------------------------个人中心接口start------------------ + +/** + * 我的话题列表 + */ +function getMyTopicList({ + pageIndex, + pageSize +}) { + return fly.get('group/topic/listOfMine', { + pageIndex, + pageSize + }) +} +/** + * 我的话题列表V2 + */ +function getMyTopicListV2({ + pageIndex, + pageSize, + timestamp +}) { + return fly.get('partyGroup/myTopicList/list', { + pageIndex, + pageSize, + timestamp + }) +} +/** + * 我的议题列表 + */ +function getMyIssueList() { + return fly.get('events/issue/listByUserId') +} + +/** + * 我的项目列表 + */ +function getMyProjectList({ + pageIndex, + pageSize, + timestamp +}) { + return fly.get('events/item/listByUserId', { + pageIndex, + pageSize, + timestamp + }) +} + +/** + * 查看用户是否已保存unionId + */ +function checkWxUnionId() { + return fly.get('app-user/user/checkWxUnionId') +} +// ---------------------------------个人中心接口 end------------------- + +/** + * 积分记录-积分记录接口 + * timestamp String 第一页查询发起时的时间 + * pageIndex Number 页码 + * pageSize Number 页容量 + */ +function pointsRecordlist({ + timestamp, + pageIndex, + pageSize +}) { + return fly.get('points/pointsRecord/list', { + timestamp, + pageIndex, + pageSize + }) +} + +/** + * 积分记录-积分排行接口 + * timestamp String 第一页查询发起时的时间 + * pageIndex Number 页码 + * pageSize Number 页容量 + * rankingType Number 排名方式:0-周,1-月 + */ + +function pointsRankinglist({ + timestamp, + pageIndex, + pageSize, + rankingType +}) { + return fly.get('points/pointsRanking/list', { + timestamp, + pageIndex, + pageSize, + rankingType + }) +} +/** + * 积分记录-锦水-积分排行接口 v2 排名方式发生改变 + * timestamp String 第一页查询发起时的时间 + * pageIndex Number 页码 + * pageSize Number 页容量 + * rankingType Number 排名方式:0-网格,1-街道 + */ +function userPointsRankinglist({ + timestamp, + pageIndex, + pageSize, + rankingType +}) { + return fly.get('app-user/userPointsRanking/list', { + timestamp, + pageIndex, + pageSize, + rankingType + }) +} + +// *****************************爱心互助接口*************************** + +/** + * 排行榜 + */ +function leaderboard() { + return fly.get('heart/volunteer/leaderboard') +} +/** + * 活动详情 + */ +function detail(id) { + return fly.get(`heart/act/detail/${id}`) +} + +/** + * 未通过活动详情 + */ +function rejectDetail(id) { + return fly.get(`heart/act/rejectDetail/${id}`) +} + +/** + * 取消活动详情 + */ +function cancelDetail(id) { + return fly.get(`heart/act/cancelDetail/${id}`) +} + + +/** + * 活动打卡地点详情 + */ +function clockAddressDetail(id) { + return fly.get('heart/act/clockAddressDetail', { + actId: id + }) +} + +/** + * 打卡列表 + */ +function clockList(actId) { + return fly.get('heart/act/clockList', { + actId: actId + }) +} +/** + * 常用语列表 + */ +function getPhraseList() { + return fly.get('heart/phrase/getPhraseList') +} + +/** + * 使用常用语 + */ +function sagenumAddOne(id) { + return fly.post('heart/phrase/sagenumAddOne', { + id: id + }) +} + + +/** + * 活动打卡 + */ +function clock(data) { + return fly.post('heart/act/clock', data) +} + +// /** +// * 志愿者认证 +// */ +// function authenticate(data) { +// return fly.post('app-user/volunteer/authenticate', data) +// } + +/** + * 志愿者认证 v2 + */ +function authenticate(data) { + return fly.post('app-user/volunteer/v2/authenticate', data) +} +/** + * 活动报名 + */ + +function signup(actId) { + return fly.post(`heart/act/signup?actId=${actId}`) +} + +/** + * 取消报名 + */ +function cancelsignup(id, response) { + return fly.post('heart/act/cancelsignup', { + actId: id, + failureReason: response + }) +} + + + +/** + * 已报名活动 + */ +function getSignedList({ pageIndex, pageSize, timestamp, actType }) { + return fly.get('heart/act/signupList', { + pageIndex, + pageSize, + timestamp, + actType + }) +} + +/** + * 未通过活动详情 + */ +function unpassActivityDetail(id) { + return fly.get(`heart/act/rejectDetail/${id}`) +} + + + +/** + * 用户完善个人信息v2(不穿验证码) + */ +function completeInfoV2(para) { + return fly.post('app-user/user/v2/completeInfo', para) +} +function completeInfo(data) { + return fly.post('app-user/user/completeInfo', data) +} +//居民 完善个人信息 +function completeResidentInfo(data) { + return fly.post('app-user/user/completeResidentInfo', data) +} +//党员 完善个人信息 +function completePartyInfo(data) { + return fly.post('app-user/user/completePartyInfo', data) +} +// 居民 完善个人信息v2 不需要穿验证码 +function completeResidentInfoV2(para) { + return fly.post('app-user/user/v2/completeResidentInfo', para) +} +// 党员 完善个人信息 v2 不需要穿验证码 +function completePartyInfoV2(para) { + return fly.post('app-user/user/v2/completePartyInfo', para) +} + + +/** + * 获取Token v3 网格码和邀请码合二为一 + */ + +function getTokenV3(para) { + return fly.get('app-user/user/ma/v3/getToken', para) +} + +/********微信获取手机号 ********/ +function getWxPhone({ wxCode, encryptedData, iv }) { + return fly.get('app-user/user/ma/getWxPhone', { + wxCode, + encryptedData, + iv + }) +} +// *****************************爱心互助接口***************************end +// 获取默认网格信息 +function getDefaultGridInfo() { + return fly.get('dic/getDefaultGridInfo') +} +// 获取居民端配置 +function getResidentConfig() { + return fly.get('residentConfig/getResidentConfig') +} + +// *****************************获取临时凭证接口****6.22***************end +// 获取临时凭证用于跳转到数据端 +function getScrip() { + return fly.post('admin/getScrip') +} +// 获取首页电话 +function getHomePhone() { + return fly.get('imgConfig/getImgUrl/3') } \ No newline at end of file diff --git a/utils/config.js b/utils/config.js index b705e92..9c560a3 100644 --- a/utils/config.js +++ b/utils/config.js @@ -1,28 +1,28 @@ -module.exports = { - BASEURL: BASEURL, - WEBROOT: WEBROOT, - Token: getToken, - userId: "" -}; - -function BASEURL() { - // 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/' // 锦水正式环境接口地址 -} - -function WEBROOT() { - // return "http://10.10.10.117:8080/#/" // 本地 h5前端地址 - return 'https://epdc-shibei.elinkit.com.cn/#/' // 测试环境 h5前端地址 - // return 'https://epdc.elinkservice.cn/#/' // 正式环境 h5前端地址 - // return 'https://epdc-app.qingdaoshibei.cn/#/' // 电政办 正式环境 前端地址 - // return 'https://epdc-shibei.elinkservice.cn/#/' // 电政办 正式环境 前端地址 -} - -function getToken() { - return wx.getStorageSync("token"); -} +module.exports = { + BASEURL: BASEURL, + WEBROOT: WEBROOT, + Token: getToken, + userId: "" +}; + +function BASEURL() { + 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/' // 锦水正式环境接口地址 +} + +function WEBROOT() { + // return "http://10.10.10.117:8080/#/" // 本地 h5前端地址 + return 'https://epdc-shibei.elinkit.com.cn/#/' // 测试环境 h5前端地址 + // return 'https://epdc.elinkservice.cn/#/' // 正式环境 h5前端地址 + // return 'https://epdc-app.qingdaoshibei.cn/#/' // 电政办 正式环境 前端地址 + // return 'https://epdc-shibei.elinkservice.cn/#/' // 电政办 正式环境 前端地址 +} + +function getToken() { + return wx.getStorageSync("token"); +} From 8d223fb3ea6ff20df043fdb215d4096f817bb2c3 Mon Sep 17 00:00:00 2001 From: ZhaoTongYao <531131322@qq.com> Date: Sun, 28 Jun 2020 14:14:25 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83-?= =?UTF-8?q?=E7=AD=89=E7=BA=A7=E6=8E=92=E5=90=8D=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpages/integralCentre/pages/index/index.js | 49 +++++- .../integralCentre/pages/index/index.wxml | 144 +++++++++--------- utils/api.js | 22 ++- 3 files changed, 136 insertions(+), 79 deletions(-) diff --git a/subpages/integralCentre/pages/index/index.js b/subpages/integralCentre/pages/index/index.js index 15911a0..d85bc40 100644 --- a/subpages/integralCentre/pages/index/index.js +++ b/subpages/integralCentre/pages/index/index.js @@ -2,7 +2,8 @@ import { pointsRecordlist, pointsRankinglist, - userPointsRankinglist + userPointsRankinglist, + gradeRankinglist } from '../../../../utils/api' import { getTimestamp @@ -40,7 +41,7 @@ Page({ ], timestamp: getTimestamp(), loadMoreType: 'none', - loadMoreVisible: false, + loadMoreVisible: false }, /** * 生命周期函数--监听页面加载 @@ -93,8 +94,11 @@ Page({ loadMoreType: 'loading', loadMoreVisible: true, }) - - that.pointsRankinglist() + if ( e.currentTarget.dataset.type == '2') { + that.gradeRankinglist() + } else { + that.pointsRankinglist() + } }, // 积分记录-积分排行接口 @@ -211,11 +215,9 @@ Page({ this.setData({ loadMoreVisible: true }) - if (this.data.selectTab == 'tab1') { // this.pointsRankinglist(); //积分排行 } else { - if (this.data.loadMoreType === 'loading') { this.setData({ pageIndex: this.data.pageIndex + 1, @@ -228,6 +230,41 @@ Page({ } }, + //6.28 等级排行榜 + gradeRankinglist () { + let that = this + const para = { + pageIndex: 1, + pageSize: 20, + timestamp: getTimestamp() + } + gradeRankinglist(para).then(res => { + that.setData({ + pointsRankingUser: res.data.currentUser, + pointsRankinglist: that.data.pointsRankinglist.concat(res.data.rank), + }) + if (that.data.pointsRankinglist.length > 0) { + that.setData({ + nodatapointsRanking: false, + loadMoreType: 'none', + }) + } else { + that.setData({ + nodatapointsRanking: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + } + }).catch(err => { + that.setData({ + pointsRankinglist: [], + nodatapointsRanking: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + console.log(err) + }) + }, /** * 用户点击右上角分享 */ diff --git a/subpages/integralCentre/pages/index/index.wxml b/subpages/integralCentre/pages/index/index.wxml index 67aaec3..98bdfc8 100644 --- a/subpages/integralCentre/pages/index/index.wxml +++ b/subpages/integralCentre/pages/index/index.wxml @@ -1,73 +1,73 @@ - - - {{points}} - 积分 - - - - 积分排行 - 积分记录 - - - - - - - - - - - - - {{pointsRankingUser.rank}} - - - {{pointsRankingUser.realName}} - - {{pointsRankingUser.points}} - - 注:该排行仅显示已完善信息用户 - - - - - - - - - - {{item.rank}} - - - {{item.realName}} - - {{item.points}} - - - - - - - - - 事件名称 - 积分 - 时间 - - - - {{item.ruleDesc}} - - - - +{{item.points}} - {{item.operationTime}} - - - - - + + + {{points}} + 积分 + + + + 积分排行 + 积分记录 + + + + + + + + + + + + + {{pointsRankingUser.rank}} + + + {{pointsRankingUser.realName||pointsRankingUser.nickName}} + + {{pointsRankingUser.points||pointsRankingUser.grade}} + + 注:该排行仅显示已完善信息用户 + + + + + + + + + + {{item.rank}} + + + {{item.realName||item.nickName}} + + {{item.points||item.grade}} + + + + + + + + + 事件名称 + 积分 + 时间 + + + + {{item.ruleDesc}} + + - + +{{item.points}} + {{item.operationTime}} + + + + + \ No newline at end of file diff --git a/utils/api.js b/utils/api.js index 2786565..96f380c 100644 --- a/utils/api.js +++ b/utils/api.js @@ -54,7 +54,8 @@ module.exports = { getDefaultGridInfo:getDefaultGridInfo, getResidentConfig:getResidentConfig, getScrip:getScrip, - getHomePhone:getHomePhone + getHomePhone:getHomePhone, + gradeRankinglist:gradeRankinglist } function getToken(wxCode) { @@ -512,4 +513,23 @@ function getScrip() { // 获取首页电话 function getHomePhone() { return fly.get('imgConfig/getImgUrl/3') +} + +/** + * 积分记录-等级排行接口 6.28 + * timestamp String 第一页查询发起时的时间 + * pageIndex Number 页码 + * pageSize Number 页容量 + */ + +function gradeRankinglist({ + timestamp, + pageIndex, + pageSize +}) { + return fly.get('app-user/user/gradeRanking/list', { + timestamp, + pageIndex, + pageSize + }) } \ No newline at end of file From 66d266e57f1b71ffe0e836d925746b3e6f9b29d6 Mon Sep 17 00:00:00 2001 From: ZhaoTongYao <531131322@qq.com> Date: Sun, 28 Jun 2020 17:04:50 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=BC=80=E6=94=BE=E9=94=A6=E6=B0=B4?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=A8=A1=E5=9D=97=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 3 +- project.config.json | 2 +- .../understandJs/pages/archives/archives.js | 138 +++++++------ .../understandJs/pages/archives/archives.wxml | 58 +++--- subpages/understandJs/pages/index/index.js | 194 +++++++++--------- 5 files changed, 202 insertions(+), 193 deletions(-) diff --git a/app.json b/app.json index 13eb7a9..a93418f 100644 --- a/app.json +++ b/app.json @@ -67,7 +67,8 @@ "pages/gOfficialsList/gOfficialsList", "pages/talklist/talklist", "pages/eventlist/eventlist", - "pages/addTopic/addTopic" + "pages/addTopic/addTopic", + "pages/guideInfo/guideInfo" ] }, { diff --git a/project.config.json b/project.config.json index de6daae..663d584 100644 --- a/project.config.json +++ b/project.config.json @@ -22,7 +22,7 @@ "disablePlugins": [], "outputPath": "" }, - "useCompilerModule": false, + "useCompilerModule": true, "userConfirmedUseCompilerModuleSwitch": false, "useIsolateContext": true }, diff --git a/subpages/understandJs/pages/archives/archives.js b/subpages/understandJs/pages/archives/archives.js index dc52274..8da410a 100644 --- a/subpages/understandJs/pages/archives/archives.js +++ b/subpages/understandJs/pages/archives/archives.js @@ -1,66 +1,74 @@ -// subpages/understandJs/pages/archives/archives.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - } +// subpages/understandJs/pages/archives/archives.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + searchFile () { + wx.showToast({ + title: '未查询到相关档案', + icon: 'none', + duration: 2000 + }) + } }) \ No newline at end of file diff --git a/subpages/understandJs/pages/archives/archives.wxml b/subpages/understandJs/pages/archives/archives.wxml index 7cc817e..7a7bb79 100644 --- a/subpages/understandJs/pages/archives/archives.wxml +++ b/subpages/understandJs/pages/archives/archives.wxml @@ -1,29 +1,29 @@ - - - - - - - - - - - - - - - - - 玫瑰街道医疗物质采购档案 - - - 存放位置:玫瑰街道档案室 - - - - 玫瑰街道医疗物质采购档案 - - - 存放位置:玫瑰街道档案室 - - \ No newline at end of file + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/subpages/understandJs/pages/index/index.js b/subpages/understandJs/pages/index/index.js index 220df51..0e32a61 100644 --- a/subpages/understandJs/pages/index/index.js +++ b/subpages/understandJs/pages/index/index.js @@ -1,98 +1,98 @@ -const api = require('../../../../utils/understandJs') -Page({ - - /** - * 页面的初始数据 - */ - data: { - modulelist: [] - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - this.modulelist() - }, - modulelist() { - let that = this; - api.modulelist().then(function (res) { //了解锦水-模块管理接口 - that.setData({ - modulelist: res.data, - }) - }) - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - }, - goDetails(e) {//模块编码(0-政策导航,1-印象,2-味道,3-硬核,4-档案) - console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) - if (e.currentTarget.dataset.modulecode == 'notice_warning') { //警事 - wx.navigateTo({ - url: `../impression/impression?modulecode=${e.currentTarget.dataset.modulecode}` - }) - } else if (e.currentTarget.dataset.modulecode == 'notice_impression' || e.currentTarget.dataset.modulecode == 'notice_taste') {//印象//味道 - wx.navigateTo({ - url: `../noticeDetail/noticeDetail?modulecode=${e.currentTarget.dataset.modulecode}` - }) - } else if (e.currentTarget.dataset.modulecode == 'module_hardcore') {//硬核 - wx.navigateTo({ - url: `../sclerotia/sclerotia?modulecode=${e.currentTarget.dataset.modulecode}` - }) - } else if (e.currentTarget.dataset.modulecode == 'module_file') {//档案 - wx.showToast({ - title: '敬请期待', - icon: 'none', - duration: 1000 - }) - // wx.navigateTo({ - // url: '../archives/archives' - // }) - } - } +const api = require('../../../../utils/understandJs') +Page({ + + /** + * 页面的初始数据 + */ + data: { + modulelist: [] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.modulelist() + }, + modulelist() { + let that = this; + api.modulelist().then(function (res) { //了解锦水-模块管理接口 + that.setData({ + modulelist: res.data, + }) + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + goDetails(e) {//模块编码(0-政策导航,1-印象,2-味道,3-硬核,4-档案) + console.log(JSON.stringify(e.currentTarget.dataset) + e.currentTarget.dataset.modulecode) + if (e.currentTarget.dataset.modulecode == 'notice_warning') { //警事 + wx.navigateTo({ + url: `../impression/impression?modulecode=${e.currentTarget.dataset.modulecode}` + }) + } else if (e.currentTarget.dataset.modulecode == 'notice_impression' || e.currentTarget.dataset.modulecode == 'notice_taste') {//印象//味道 + wx.navigateTo({ + url: `../noticeDetail/noticeDetail?modulecode=${e.currentTarget.dataset.modulecode}` + }) + } else if (e.currentTarget.dataset.modulecode == 'module_hardcore') {//硬核 + wx.navigateTo({ + url: `../sclerotia/sclerotia?modulecode=${e.currentTarget.dataset.modulecode}` + }) + } else if (e.currentTarget.dataset.modulecode == 'module_file') {//档案 + // wx.showToast({ + // title: '敬请期待', + // icon: 'none', + // duration: 1000 + // }) + wx.navigateTo({ + url: '../archives/archives' + }) + } + } }) \ No newline at end of file From f23124df855f7952716a16292bfec2c63e3bb26d Mon Sep 17 00:00:00 2001 From: lihenian <2629534615@qq.com> Date: Sun, 28 Jun 2020 18:30:10 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=89=88=E6=9C=AC1.4.11=20=E7=95=8C?= =?UTF-8?q?=E9=9D=A2UI=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/toRegister/toRegister.js | 2 +- project.config.json | 2 +- utils/config.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js index 44dadb3..f7214b4 100644 --- a/pages/toRegister/toRegister.js +++ b/pages/toRegister/toRegister.js @@ -21,7 +21,7 @@ Page({ // } // }) let that = this - const versionNum = '1.4.10' + const versionNum = '1.4.11' api.getScanSwitch(versionNum).then(function (res) { console.log(res.data) let state = res.data.scanFlag diff --git a/project.config.json b/project.config.json index 663d584..ecf518e 100644 --- a/project.config.json +++ b/project.config.json @@ -64,7 +64,7 @@ "id": 0, "name": "带参数二维码", "pathName": "pages/index/index", - "query": "scene=1215152928323555330&inviteUserId=12345", + "query": "scene=1277169327606366209&inviteUserId=12345", "scene": 1011 }, { diff --git a/utils/config.js b/utils/config.js index 9c560a3..d26ede4 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/' // 锦水正式环境接口地址 } function WEBROOT() {