From 727ef6347fbc91390b7abb7f4384f3ccf683ec4e Mon Sep 17 00:00:00 2001 From: initwithout Date: Mon, 24 Apr 2023 16:32:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B6=88=E6=81=AF=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/distribution/detail.wxml | 4 ++-- pages/notice/index.js | 15 ++++++++------- pages/notice/index.json | 3 ++- pages/notice/index.wxml | 4 ++-- pages/notice/notice.js | 10 +++++++--- pages/notice/notice.json | 3 ++- pages/notice/notice.wxml | 23 ++++++++++------------- pages/notice/notice.wxss | 25 +++++++++++++------------ wxParse/wxParse.wxml | 2 +- 9 files changed, 47 insertions(+), 42 deletions(-) diff --git a/pages/distribution/detail.wxml b/pages/distribution/detail.wxml index e5bde81..a7c839e 100644 --- a/pages/distribution/detail.wxml +++ b/pages/distribution/detail.wxml @@ -71,11 +71,11 @@ - + - + diff --git a/pages/notice/index.js b/pages/notice/index.js index cc3f108..4d55862 100644 --- a/pages/notice/index.js +++ b/pages/notice/index.js @@ -3,7 +3,7 @@ var WxParse = require('../../wxParse/wxParse.js'); var WXAPI = require('../../utils/server.js'); Page({ data: { - notice: [], + notice: {}, radioindex: '', pro_id: 0, num: 0, @@ -21,19 +21,20 @@ Page({ }, onLoad: function (options) { - wx.setNavigationBarTitle({ - title: '公告详情', //修改页面标题 - }); + var index = options.index var that = this; WXAPI.messageList({ + accessId: app.globalData.accessId, + storeId: 239, + storeType: 1, }).then(res => { if (res.code == 200) { var data = res.data - var notice = data.message; - var detail = data.message[0].detail; + var notice = data.message[index]; + var detail = data.message[index].content; WxParse.wxParse('detail', 'html', detail, that, 5);//处理规则的富文本框 if (notice == '') { - var notice = [] + var notice = {} } that.setData({ notice: notice diff --git a/pages/notice/index.json b/pages/notice/index.json index e8cfaaf..634a3f3 100644 --- a/pages/notice/index.json +++ b/pages/notice/index.json @@ -1,4 +1,5 @@ { "component": true, - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "公告详情" } \ No newline at end of file diff --git a/pages/notice/index.wxml b/pages/notice/index.wxml index 5ab6090..edbdde3 100644 --- a/pages/notice/index.wxml +++ b/pages/notice/index.wxml @@ -2,9 +2,9 @@ - {{notice[0].name}} + {{notice.title}} - {{notice[0].time}} + {{notice.time}} diff --git a/pages/notice/notice.js b/pages/notice/notice.js index 8cc3001..e4afee6 100644 --- a/pages/notice/notice.js +++ b/pages/notice/notice.js @@ -22,9 +22,6 @@ Page({ this.DataonLoad(); }, onLoad: function (options) { - wx.setNavigationBarTitle({ - title: '公告', //修改页面标题 - }); var that = this; WXAPI.messageList({ accessId: app.globalData.accessId, @@ -66,5 +63,12 @@ Page({ } }) }, + navToIndex: function (e) { + var item = e.currentTarget.dataset.item + var index = e.currentTarget.dataset.index + wx.navigateTo({ + url: '/pages/notice/index?id=' + item.id+'&index='+index, + }) + } }) \ No newline at end of file diff --git a/pages/notice/notice.json b/pages/notice/notice.json index e8cfaaf..027854d 100644 --- a/pages/notice/notice.json +++ b/pages/notice/notice.json @@ -1,4 +1,5 @@ { "component": true, - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "公告" } \ No newline at end of file diff --git a/pages/notice/notice.wxml b/pages/notice/notice.wxml index d200b64..7a18f49 100644 --- a/pages/notice/notice.wxml +++ b/pages/notice/notice.wxml @@ -1,17 +1,14 @@ - - - - - - {{item.content}} - {{item.time}} - - - - + + + + + {{item.time}} + {{item.content}} - - + + + + \ No newline at end of file diff --git a/pages/notice/notice.wxss b/pages/notice/notice.wxss index 7b65147..206f696 100644 --- a/pages/notice/notice.wxss +++ b/pages/notice/notice.wxss @@ -4,30 +4,25 @@ page{ height: 100%; background:#eee !important; } -.function{ - width:95%; - margin: 10px auto; - border-radius: 5px; -} .mor{ color: gray; font-size: 12px; } +.tab_tab{ + padding-top: 25rpx; + padding-bottom: 25rpx; + margin: 25rpx 25rpx 0rpx 25rpx; + background-color: white; + border-radius: 10rpx; +} .function_list{ display:flex; justify-content:space-between; background:#fff; - margin:0rpx; - padding:0; - color:#666; - border-bottom:20rpx solid #eee; - height: 150rpx; } .function_left{ - /* display: flex; */ font-size:16px; margin-left:10px; - padding-top: 3px; } .function .iconfont { line-height:27px; @@ -35,6 +30,12 @@ page{ .function_text{ margin-top:10px; margin-left:5px; + color:#666; +} +.function_time{ + margin-left:5px; + font-size:15px; + color:#999; } .jiantou{ margin-top:40rpx; diff --git a/wxParse/wxParse.wxml b/wxParse/wxParse.wxml index 9666f56..630d839 100644 --- a/wxParse/wxParse.wxml +++ b/wxParse/wxParse.wxml @@ -25,7 +25,7 @@