Commit 7ca111d3 by 高淑倩

add: 公告

parent b4c8bf43
...@@ -9,7 +9,10 @@ Component({ ...@@ -9,7 +9,10 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
notice: {
type: Object,
value: null
}
}, },
attached () { attached () {
...@@ -24,6 +27,10 @@ Component({ ...@@ -24,6 +27,10 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
handelToAnn(e){
const ev = e.currentTarget.dataset;
let redirectId = ev.redirectId
console.log('redirectid', redirectId)
}
} }
}) })
<!--component/announcement/announcement.wxml--> <!--component/announcement/announcement.wxml-->
<view class="announcement df"> <view class="announcement df" style="background-color:{{notice.backgroundColor}}" data-redirectId="{{notice.redirectId}}" bindtap="handelToAnn">
<view class="horn"> <view class="horn">
<image class="img" src="./../../assets/imgs/7_1_0/notice.png" mode="widthFix" lazy-load="false" binderror="" bindload="" /> <image class="img" src="{{notice.iconImageUrl? 'notice.iconImageUrl': '/assets/imgs/7_1_0/notice.png'}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
</view> </view>
<text class="text">公告公告公告公告公告公告公告公告公告公告公告公告公告公告公告公告公告</text> <text class="text" style="color:{{notice.fontColor}}">{{notice.content}}</text>
</view> </view>
\ No newline at end of file
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px"> <view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)--> <!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem"> <block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!-- {{pItem.type}} -->
{{pItem.type}}
<view wx:if="{{pItem.type == 1}}"> <view wx:if="{{pItem.type == 1}}">
<image-swiper/> <image-swiper/>
</view> </view>
...@@ -20,7 +19,7 @@ ...@@ -20,7 +19,7 @@
<bottom-tabs/> <bottom-tabs/>
</view> </view>
<view class="" wx:if="{{pItem.type == 6}}"> <view class="" wx:if="{{pItem.type == 6}}">
<announcement/> <announcement notice="{{pItem.notice}}"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 7}}"> <view class="" wx:if="{{pItem.type == 7}}">
<tab-sort categorys="{{pItem.categoryType.categorys}}"/> <tab-sort categorys="{{pItem.categoryType.categorys}}"/>
...@@ -31,8 +30,6 @@ ...@@ -31,8 +30,6 @@
<view class="" wx:if="{{pItem.type == 9}}"> <view class="" wx:if="{{pItem.type == 9}}">
<attention/> <attention/>
</view> </view>
</block> </block>
<!-- <!--
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment