From 867c1c4dd1e7331130702bb650c2658587b22887 Mon Sep 17 00:00:00 2001 From: ZhaoTongYao <531131322@qq.com> Date: Fri, 6 Nov 2020 11:03:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85=E5=8E=BB?= =?UTF-8?q?=E5=93=AA=E9=A1=B6=E9=83=A8banner=E5=A2=9E=E5=8A=A0=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E8=B7=B3=E8=BD=AC=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 3 +- pages/heartNew/heartNew.js | 9 +- pages/heartNew/heartNew.wxml | 2 +- project.config.json | 5 +- subpages/heart/images/ic_yueduliang.png | Bin 0 -> 1201 bytes .../heart/pages/bannerDetail/bannerDetail.js | 23 ++++ .../pages/bannerDetail/bannerDetail.json | 6 + .../pages/bannerDetail/bannerDetail.wxml | 28 ++++ .../pages/bannerDetail/bannerDetail.wxss | 126 ++++++++++++++++++ utils/activity.js | 8 +- utils/config.js | 4 +- 11 files changed, 207 insertions(+), 7 deletions(-) create mode 100644 subpages/heart/images/ic_yueduliang.png create mode 100644 subpages/heart/pages/bannerDetail/bannerDetail.js create mode 100644 subpages/heart/pages/bannerDetail/bannerDetail.json create mode 100644 subpages/heart/pages/bannerDetail/bannerDetail.wxml create mode 100644 subpages/heart/pages/bannerDetail/bannerDetail.wxss diff --git a/app.json b/app.json index bfa8119..5a5a63c 100644 --- a/app.json +++ b/app.json @@ -114,7 +114,8 @@ "pages/noticeDetail/noticeDetail", "pages/myApply/myApply", "pages/myApplyList/myApplyList", - "pages/myApplyDetail/myApplyDetail" + "pages/myApplyDetail/myApplyDetail", + "pages/bannerDetail/bannerDetail" ] }, { diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js index e2f30d7..ac5cdec 100644 --- a/pages/heartNew/heartNew.js +++ b/pages/heartNew/heartNew.js @@ -448,5 +448,12 @@ Page({ wx.navigateTo({ url: "/subpages/heart/pages/myApply/myApply" }) - } + }, + + //banner跳转到详情 + toBannerDetail (e) { + wx.navigateTo({ + url: `/subpages/heart/pages/bannerDetail/bannerDetail?id=${e.currentTarget.dataset.id}` + }) + }, }) \ No newline at end of file diff --git a/pages/heartNew/heartNew.wxml b/pages/heartNew/heartNew.wxml index 423c205..b89a90d 100644 --- a/pages/heartNew/heartNew.wxml +++ b/pages/heartNew/heartNew.wxml @@ -30,7 +30,7 @@ - + diff --git a/project.config.json b/project.config.json index 9831e1c..ecfcec3 100644 --- a/project.config.json +++ b/project.config.json @@ -25,11 +25,14 @@ "disablePlugins": [], "outputPath": "" }, + "bundle": false, "useIsolateContext": true, "useCompilerModule": true, "userConfirmedUseCompilerModuleSwitch": false, + "userConfirmedBundleSwitch": false, "packNpmManually": false, - "packNpmRelationList": [] + "packNpmRelationList": [], + "minifyWXSS": true }, "compileType": "miniprogram", "libVersion": "2.8.2", diff --git a/subpages/heart/images/ic_yueduliang.png b/subpages/heart/images/ic_yueduliang.png new file mode 100644 index 0000000000000000000000000000000000000000..7d6f21fd75f18c34df3c03f108e341b0cf6dc352 GIT binary patch literal 1201 zcmV;i1Wx;jP)6+uy>!^ zB!Ni+(T0WwufMBW_2e-tHaUss0KyGHd8J%wA7oZ;e zJ!S;Par`{^96Sj+aj+5N`{`c~Dv1=45wYnIS;o|QP{S!VBHshM?j;9mG28+oU^(NN z$aWQ38O=ty8M&45XUM0(k0Wl( z*EwmkeS%w@{wK!O+AlH!1P-w_2W$gXterrXj7b0|MQrZG;9`c=jJF^Yj+`aacc78J zbS{7n^eYAi2KKVo54Dmw9*_Gb!AI!7h%92ypU6d{5qOAGwDk4$6`)wgc%RE!i;SG> zG%LVCPz;^}i>Q=`wJD7gK!Ca{2U92})T%h_}UG&)8Z7U$>ZmnIU4lTN`A z0FQwWnQB!?F?2Z)xocn<1ddV0pJZlcmSkjP_=y=PzcUb<&0LZ#r}0tb6VM`?cCs*+ z@#3tktY3pC4`8Xy*97kfIT4KP$C4PY1fK4JU-C_Ai8A<~Vy3&IRGD0CQGL%&7e zE_iXskQtk42ksmZ8UOOqiHYDJL;q##se+iFhRzDG*S8r^_{A=X2Us|bvvTKH zq0~#sre09NT%Fwk^#=9p>~iV}CaJY&!O!fShFlFAM|%s7qoil{8aS@&cvvw!tQxcV zLNFISp%7^9ZZPRgZo#Im;cO03iTq~F$H?CGGW(XbBE{S@Bg=_)NAJJkc8Z)RqdHpo z&Y!aXBI9{_GbZ#J>OBW9k-=-&G!H{(sh00CRAE0rMrOYwrJSln?;ztgu#o-^=APEO zk?JqNn7;=|qOWn@#3??&kluJb%a`;$flk$B56&Z?RPO?MkJ|U&E$29Gzvmw$#`p$? zHh}GrsU{+?+JlttUP_Bf68#Ry?jmw~Apg5AsPS58@}JQpf&V>$e+3u-IS+VkWWRd~ P00000NkvXXu0mjfWGqB* literal 0 HcmV?d00001 diff --git a/subpages/heart/pages/bannerDetail/bannerDetail.js b/subpages/heart/pages/bannerDetail/bannerDetail.js new file mode 100644 index 0000000..481f694 --- /dev/null +++ b/subpages/heart/pages/bannerDetail/bannerDetail.js @@ -0,0 +1,23 @@ +const api = require("../../../../utils/activity") +import util from "../../../../utils/util" +Page({ + data: { + noticeObj: {}, + noticeObjContent: "", //富文本内容 + preloadVisible: true + }, + onLoad (options) { + this.getNoticeDetail(options.id) + }, + getNoticeDetail (id) { + api.getBannerDetail(id).then(res => { + this.setData({ + noticeObj: res.data, + noticeObjContent: util.formatRichText(res.data.content), + preloadVisible: false + }) + }).catch(err => { + console.log(err) + }) + } +}) \ No newline at end of file diff --git a/subpages/heart/pages/bannerDetail/bannerDetail.json b/subpages/heart/pages/bannerDetail/bannerDetail.json new file mode 100644 index 0000000..cab45d7 --- /dev/null +++ b/subpages/heart/pages/bannerDetail/bannerDetail.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "parser": "../../../../components/parser/parser" + }, + "navigationBarTitleText": "详情" +} \ No newline at end of file diff --git a/subpages/heart/pages/bannerDetail/bannerDetail.wxml b/subpages/heart/pages/bannerDetail/bannerDetail.wxml new file mode 100644 index 0000000..c05c183 --- /dev/null +++ b/subpages/heart/pages/bannerDetail/bannerDetail.wxml @@ -0,0 +1,28 @@ + + + + + {{noticeObj.title}} + + + + + {{filter.formatTime(noticeObj.createdTime, 'yyyy-MM-dd')}} + + + + + + {{noticeObj.browseNum}} + + + + + + + + + + + + \ No newline at end of file diff --git a/subpages/heart/pages/bannerDetail/bannerDetail.wxss b/subpages/heart/pages/bannerDetail/bannerDetail.wxss new file mode 100644 index 0000000..8de4bcb --- /dev/null +++ b/subpages/heart/pages/bannerDetail/bannerDetail.wxss @@ -0,0 +1,126 @@ +.notice-detail { + width: 100%; + height: 100%; + box-sizing: border-box; + padding: 20rpx; + background: #f7f7f7; +} +.selfContent { + width: 100%; + display: table; + background: #ffffff; + border-radius: 16rpx; + box-sizing: border-box; + padding: 0 25rpx 38rpx; +} +.detail-title { + font-family: PingFang-SC-Bold; + font-size: 48rpx; + font-weight: bold; + line-height: 68rpx; + color: #333333; + padding-top: 40rpx; + margin-bottom: 20rpx; + position: relative; +} +.detail-title-img { + text-align: right; +} +.detail-title image { + width: 176rpx; + height: 66rpx; + vertical-align: middle; +} +.detail-subtitle { + display: flex; + width: 100%; + justify-content: space-between; + font-size: 22rpx; + color: #999999; + margin-top:45rpx; + margin-bottom: 20rpx; +} +.detail-subtitle .left span:nth-child(1){ + margin-right: 32rpx; +} +.detail-subtitle .right{ + display: flex; + height: 32rpx; + line-height: 32rpx; +} + +.detail-subtitle .right .readNum { + /* display: inline-block; */ + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; +} +.detail-subtitle .right .readNum image{ + width: 100%; + height: 100%; + float:left; + object-fit: cover; +} +.banner { + width: 100%; + height: 400rpx; + margin: 39rpx 0 19rpx 0; +} +.banner image{ + width: 100%; + height: 100%; + float:left; + object-fit: cover; + border-radius: 16rpx; + overflow: hidden; +} +.paragraph { + font-size: 38rpx; + line-height: 58rpx; + color: #333333; + text-indent: 76rpx; + margin-top:22rpx; +} + +.richContent{ + word-break: break-all; +} + +/* preload start */ +.preload { + width: 100%; + background: #fff; + box-sizing: border-box; + border-radius: 16rpx; + padding: 0 24rpx; + overflow: hidden; + margin-bottom: 20rpx; +} +.preload-title { + width: 100%; + height: 80rpx; + border-radius: 8rpx; + background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%); + animation: loading 1.4s ease infinite; + background-size: 400% 100%; + margin-top: 20rpx; +} +.preload-content { + width: 100%; + height: 200rpx; + border-radius: 8rpx; + background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%); + animation: loading 1.4s ease infinite; + background-size: 400% 100%; + margin-top: 20rpx; +} +@keyframes loading { + 0% { + background-position: 100% 50% + } + + 100% { + background-position: 0 50% + } +} +/* preload end */ \ No newline at end of file diff --git a/utils/activity.js b/utils/activity.js index a78a6cb..b3cef3f 100644 --- a/utils/activity.js +++ b/utils/activity.js @@ -5,7 +5,8 @@ module.exports = { bannerListV2, volunteerlist, volunteerV2list, - getImgUrl + getImgUrl, + getBannerDetail } function getActivityList (params) { @@ -30,4 +31,9 @@ function volunteerV2list (params) { // 获取配置图片 function getImgUrl (imgType) { return fly.get(`imgConfig/getImgUrl/${imgType}`) +} + +//banner跳转详情 +function getBannerDetail (id) { + return fly.get(`heart/act/banner/detail/${id}`) } \ No newline at end of file diff --git a/utils/config.js b/utils/config.js index d099316..e94fe91 100644 --- a/utils/config.js +++ b/utils/config.js @@ -6,8 +6,8 @@ module.exports = { }; function BASEURL() { - return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 - // return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 + // return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 + return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 // return 'http://192.168.43.19:9094/epdc-api/api/' } From 535395a30a546090dee95b2ce1940e2a22fee8d6 Mon Sep 17 00:00:00 2001 From: lihenian <2629534615@qq.com> Date: Fri, 6 Nov 2020 13:25:20 +0800 Subject: [PATCH 2/3] =?UTF-8?q?project.config.json=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.config.json b/project.config.json index 4af217b..cb937de 100644 --- a/project.config.json +++ b/project.config.json @@ -29,9 +29,9 @@ "useIsolateContext": true, "useCompilerModule": true, "userConfirmedUseCompilerModuleSwitch": false, - "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], + "userConfirmedBundleSwitch": false, "minifyWXSS": true }, "compileType": "miniprogram", From 1d370e3668d2af8d635c1da7723a1edbb3f3d8cd Mon Sep 17 00:00:00 2001 From: lihenian <2629534615@qq.com> Date: Fri, 6 Nov 2020 15:34:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=89=88=E6=9C=AC1.6.3=20=E9=94=A6?= =?UTF-8?q?=E6=B0=B4=E6=B8=85=E9=A3=8E-=E6=88=91=E8=A6=81=E4=B8=BE?= =?UTF-8?q?=E6=8A=A5=E6=8C=89=E9=92=AE=E6=9A=82=E6=97=B6=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/toRegister/toRegister.js | 2 +- project.config.json | 4 - .../pages/moduleList/moduleList.wxml | 206 ++++++++---------- 3 files changed, 93 insertions(+), 119 deletions(-) diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js index 6196831..30b0e52 100644 --- a/pages/toRegister/toRegister.js +++ b/pages/toRegister/toRegister.js @@ -21,7 +21,7 @@ Page({ // } // }) let that = this - const versionNum = "1.6.1" + const versionNum = "1.6.3" 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 cc7159e..4af217b 100644 --- a/project.config.json +++ b/project.config.json @@ -32,10 +32,6 @@ "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], -<<<<<<< HEAD - "userConfirmedBundleSwitch": false, -======= ->>>>>>> feature/volunteer "minifyWXSS": true }, "compileType": "miniprogram", diff --git a/subpages/oneKeyService/pages/moduleList/moduleList.wxml b/subpages/oneKeyService/pages/moduleList/moduleList.wxml index c9008a5..8ce894b 100644 --- a/subpages/oneKeyService/pages/moduleList/moduleList.wxml +++ b/subpages/oneKeyService/pages/moduleList/moduleList.wxml @@ -1,137 +1,115 @@ - - + + + + + + + - - - - - {{item.noticeTitle}} - - - {{item.deptName}} - {{item.noticeTime}} - - + + + + + {{item.noticeTitle}} + + + {{item.deptName}} + {{item.noticeTime}} + - - - - - - {{item.categoryName}} - - - - + + + + + + + {{item.categoryName}} + + + + + + + + + {{item.noticeTitle}} + + {{common.getStr(item.noticeContent)}} + - - - - - {{item.noticeTitle}} - - {{common.getStr(item.noticeContent)}} - - - - - - - - - - - {{item.noticeTitle}} - - - {{item.deptName}} - {{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}} - - - - + + + + + + + + {{item.noticeTitle}} + + {{item.deptName}} + {{filter.formatTime(item.noticeTime, 'yyyy-MM-dd')}} + + + - - - - - - {{item.noticeTitle}} - - + + + + + + + {{item.noticeTitle}} + - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + - - - - module.exports.getStr = function(content) { return content.replace(getRegExp('<\/?.+?\/?>|[ ]','g'),'') } - - + \ No newline at end of file