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
2a98f555
Commit
2a98f555
authored
Aug 28, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 图片导航
parent
e56f1cb6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
39 deletions
+54
-39
picNav.js
src/component/picNav/picNav.js
+11
-10
picNav.wxml
src/component/picNav/picNav.wxml
+33
-12
picNav.wxss
src/component/picNav/picNav.wxss
+8
-15
project.config.json
src/project.config.json
+2
-2
No files found.
src/component/picNav/picNav.js
View file @
2a98f555
...
...
@@ -29,12 +29,7 @@ Component({
isAuthorization
:
false
,
isAuthorizationActiveText
:
''
,
isAuthorizationType
:
2
,
baseImgUrl
:
''
,
picNavH
:
[{
url
:
''
},
{
url
:
''
}]
baseImgUrl
:
''
},
/**
* 组件的方法列表
...
...
@@ -71,7 +66,7 @@ Component({
}
if
(
link
.
type
==
2
)
{
// 触发父组件更新页面
内部子页面
// 触发父组件更新页面
wxService
.
nextTick
(()
=>
{
this
.
triggerEvent
(
'updatePage'
,
{
pageId
:
currentClickType
.
url
})
})
...
...
@@ -81,9 +76,9 @@ Component({
current
:
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
imageUrl
}
`
,
// 当前显示图片的http链接
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
})
}
else
if
(
link
.
type
==
4
)
{
// 内部固定功能
}
else
if
(
link
.
type
==
4
)
{
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
link
.
type
==
5
)
{
// 微信卡券 -- 卡包/领卡
}
else
if
(
link
.
type
==
5
)
{
if
(
currentClickType
==
1
)
{
wxService
.
openCard
()
}
else
if
(
currentClickType
==
2
)
{
...
...
@@ -101,8 +96,14 @@ Component({
wxService
.
openCard
()
}
}
}
else
if
(
link
.
type
==
6
)
{
}
else
if
(
link
.
type
==
6
)
{
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
link
.
type
==
7
){
// 集点详情
let
pointPath
=
currentClickType
&&
currentClickType
.
split
(
'?'
)[
0
]
let
pointIdParams
=
currentClickType
&&
currentClickType
.
split
(
'?'
)[
1
]
let
pointId
=
pointIdParams
.
split
(
'='
)[
1
]
wxService
.
router
(
`
${
pointPath
}
`
).
search
({
id
:
pointId
})
}
},
activeTocard
(
e
)
{
...
...
src/component/picNav/picNav.wxml
View file @
2a98f555
<!--component/picNav/picNav.wxml-->
<
!--<
view class="pic-nav">
<block
wx:for="{{picNav
H
}}"
<view class="pic-nav">
<view
wx:for="{{picNav}}"
wx:key="{{index}}"
wx:for-item="item"
class="nav-block"
>
<view class="pic-item">
11
</view>
</block>
</view>-->
<image
wx:if="{{baseImgUrl}}"
class="pic-img"
style="width: {{100}}%;height: {{100}}px;"
src="{{baseImgUrl}}{{item.imageUrl}}"
data-appid="{{item.link.appid}}"
data-path="{{item.link.url}}"
data-link="{{item.link}}"
data-item="{{item}}"
bindload="imageLoad"
bindtap='preview'
/>
</view>
</view>
<authorization-modal
isAuthorization='{{isAuthorization}}'
bind:activeTocard="activeTocard"
isAuthorizationType="{{isAuthorizationType}}"
isAuthorizationActiveText="{{isAuthorizationActiveText}}"
/>
<view class="pic-nav">
<!--<view class="pic-nav">
<view
wx:for="{{picNav}}"
wx:key="{{index}}"
...
...
@@ -33,6 +50,10 @@
/>
</view>
</view>
<authorization-modal
isAuthorization='{{isAuthorization}}'
bind:activeTocard="activeTocard"
isAuthorizationType="{{isAuthorizationType}}"
isAuthorizationActiveText="{{isAuthorizationActiveText}}"
/>
-->
src/component/picNav/picNav.wxss
View file @
2a98f555
...
...
@@ -4,20 +4,10 @@
overflow: hidden;
padding: 0;
margin: 0;
box-sizing:content-box;
margin: 0 20rpx;
box-sizing: content-box;
}
.pic-item {
flex: 1;
height: 154rpx;
opacity: 0.5;
border-radius: 10rpx;
background-color: rgba(196, 186, 175, 0.22);
}
.pic-item:first-child {
margin:0 10rpx 10rpx 0;
}
/* .pic-nav {
.pic-nav {
display: flex;
padding: 0;
margin: 0;
...
...
@@ -25,5 +15,7 @@
box-sizing: border-box;
flex-direction: row;
align-items: center;
} */
}
.nav-block {
flex: 1
}
\ No newline at end of file
src/project.config.json
View file @
2a98f555
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
37
,
"current"
:
25
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -206,7 +206,7 @@
"id"
:
25
,
"name"
:
"订单详情"
,
"pathName"
:
"pages/orderDetail/orderDetail"
,
"query"
:
"id=61
4116644096184320
"
,
"query"
:
"id=61
6360692727025664
"
,
"scene"
:
null
},
{
...
...
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