Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
7ca111d3
Commit
7ca111d3
authored
Aug 28, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 公告
parent
b4c8bf43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
announcement.js
src/component/announcement/announcement.js
+9
-2
announcement.wxml
src/component/announcement/announcement.wxml
+5
-4
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+2
-5
No files found.
src/component/announcement/announcement.js
View file @
7ca111d3
...
...
@@ -9,7 +9,10 @@ Component({
* 组件的属性列表
*/
properties
:
{
notice
:
{
type
:
Object
,
value
:
null
}
},
attached
()
{
...
...
@@ -24,6 +27,10 @@ Component({
* 组件的方法列表
*/
methods
:
{
handelToAnn
(
e
){
const
ev
=
e
.
currentTarget
.
dataset
;
let
redirectId
=
ev
.
redirectId
console
.
log
(
'redirectid'
,
redirectId
)
}
}
})
src/component/announcement/announcement.wxml
View file @
7ca111d3
<!--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">
<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>
<text class="text"
>公告公告公告公告公告公告公告公告公告公告公告公告公告公告公告公告公告
</text>
</view>
<text class="text"
style="color:{{notice.fontColor}}">{{notice.content}}
</text>
</view>
\ No newline at end of file
src/pages/userCenter/userCenter.wxml
View file @
7ca111d3
...
...
@@ -2,8 +2,7 @@
<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-权重高)-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
{{pItem.type}}
<!-- {{pItem.type}} -->
<view wx:if="{{pItem.type == 1}}">
<image-swiper/>
</view>
...
...
@@ -20,7 +19,7 @@
<bottom-tabs/>
</view>
<view class="" wx:if="{{pItem.type == 6}}">
<announcement/>
<announcement
notice="{{pItem.notice}}"
/>
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<tab-sort categorys="{{pItem.categoryType.categorys}}"/>
...
...
@@ -31,8 +30,6 @@
<view class="" wx:if="{{pItem.type == 9}}">
<attention/>
</view>
</block>
<!--
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment