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
7547ce91
Commit
7547ce91
authored
Aug 30, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:轮播图&&图片导航跳转
parent
fbd1c04d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
123 deletions
+82
-123
bottomTabs.js
src/component/bottomTabs/bottomTabs.js
+1
-3
imageSwiper.js
src/component/imageSwiper/imageSwiper.js
+67
-41
picNav.js
src/component/picNav/picNav.js
+13
-73
tabSort.js
src/component/tabSort/tabSort.js
+1
-6
No files found.
src/component/bottomTabs/bottomTabs.js
View file @
7547ce91
...
@@ -102,7 +102,7 @@ Component({
...
@@ -102,7 +102,7 @@ Component({
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
})
})
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
wxService
.
router
(
`
/
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
if
(
currentClickType
==
1
)
{
if
(
currentClickType
==
1
)
{
wxService
.
openCard
()
wxService
.
openCard
()
...
@@ -113,13 +113,11 @@ Component({
...
@@ -113,13 +113,11 @@ Component({
wxService
.
router
(
`/
${
currentClickType
}
`
)
wxService
.
router
(
`/
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
// 集点详情
// 集点详情
console
.
log
(
'pointPath'
,
currentClickType
)
wxService
.
router
(
`
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
}
else
if
(
curItemType
.
row
)
{
}
else
if
(
curItemType
.
row
)
{
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
console
.
log
(
'bacccccccccc'
,
currentClickRow
)
if
(
rowObj
.
type
==
1
)
{
}
if
(
rowObj
.
type
==
1
)
{
}
else
if
(
rowObj
.
type
==
2
)
{
}
else
if
(
rowObj
.
type
==
2
)
{
}
...
...
src/component/imageSwiper/imageSwiper.js
View file @
7547ce91
...
@@ -36,50 +36,76 @@ Component({
...
@@ -36,50 +36,76 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
preview
(
e
)
{
preview
(
event
)
{
const
{
appid
,
path
,
link
,
item
}
=
e
.
currentTarget
.
dataset
const
ev
=
event
.
currentTarget
.
dataset
;
console
.
log
(
'ev'
,
ev
)
let
curItemType
=
ev
.
item
// 获取当前帐号信息
// 获取当前帐号信息
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
item
.
link
.
type
,
item
)
// link row
if
(
link
.
type
==
1
)
{
if
(
curItemType
.
link
)
{
// 触发父组件更新页面 外部小程序
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
curItemType
.
link
.
type
,
curItemType
)
this
.
setData
({
if
(
curItemType
.
link
.
type
==
1
)
{
isAuthorization
:
false
// 触发父组件更新页面 外部小程序
})
this
.
setData
({
return
false
isAuthorization
:
false
}
else
if
(
!
userInfo
)
{
})
this
.
setData
({
return
false
isAuthorization
:
true
}
else
if
(
!
userInfo
)
{
})
this
.
setData
({
return
false
isAuthorization
:
true
}
else
if
(
userInfo
&&
userInfo
.
member
&&
!
userInfo
.
member
.
mobile
)
{
})
wxService
.
openCard
()
return
false
return
false
}
else
if
(
userInfo
&&
userInfo
.
member
&&
!
userInfo
.
member
.
mobile
)
{
}
wxService
.
openCard
()
return
false
}
if
(
link
.
type
==
2
)
{
if
(
curItemType
.
link
.
type
==
2
)
{
// 触发父组件更新页面
// 触发父组件更新页面
wxService
.
nextTick
(()
=>
{
wxService
.
nextTick
(()
=>
{
this
.
triggerEvent
(
'updatePage'
,
{
pageId
:
currentClickType
.
url
})
this
.
triggerEvent
(
'updatePage'
,
{
pageId
:
currentClickType
.
url
})
})
})
}
else
if
(
link
.
type
==
3
)
{
}
else
if
(
curItemType
.
link
.
type
==
3
)
{
// 预览
// 预览
wx
.
previewImage
({
wx
.
previewImage
({
current
:
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
imageUrl
}
`
,
// 当前显示图片的http链接
current
:
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
imageUrl
}
`
,
// 当前显示图片的http链接
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
})
})
}
else
if
(
link
.
type
==
4
)
{
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
wxService
.
router
(
`
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
link
.
type
==
5
)
{
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
if
(
currentClickType
==
1
)
{
if
(
currentClickType
==
1
)
{
// wxService.openCardList()
wxService
.
openCard
()
wxService
.
openCard
()
}
else
if
(
currentClickType
==
2
)
{
}
else
if
(
currentClickType
==
2
)
{
wxService
.
openCard
()
wxService
.
openCard
()
}
}
}
else
if
(
curItemType
.
link
.
type
==
6
)
{
}
else
if
(
link
.
type
==
6
){
wxService
.
router
(
`/
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
}
// 集点详情
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
else
if
(
curItemType
.
row
)
{
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
if
(
rowObj
.
type
==
1
)
{
}
else
if
(
rowObj
.
type
==
2
)
{
}
else
if
(
rowObj
.
type
==
3
)
{
}
else
if
(
rowObj
.
type
==
4
)
{
}
else
if
(
rowObj
.
type
==
5
)
{
}
else
if
(
rowObj
.
type
==
6
)
{
}
else
if
(
rowObj
.
type
==
7
)
{
}
else
if
(
rowObj
.
type
==
8
)
{
// 商品
wxService
.
router
(
`/pages/productDetail/productDetail?productId=
${
currentClickRow
}
`
)
}
else
if
(
rowObj
.
type
==
9
)
{
// 分类
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
${
currentClickRow
}
`
)
}
}
}
}
}
}
})
})
src/component/picNav/picNav.js
View file @
7547ce91
...
@@ -42,19 +42,16 @@ Component({
...
@@ -42,19 +42,16 @@ Component({
imageheight
:
imageSize
.
imageHeight
imageheight
:
imageSize
.
imageHeight
})
})
},
},
preview
(
e
)
{
preview
(
event
)
{
const
ev
=
e
.
currentTarget
.
dataset
const
ev
=
event
.
currentTarget
.
dataset
;
let
curItemType
=
ev
.
item
let
curItemType
=
ev
.
item
console
.
log
(
'ev'
,
curItemType
)
const
{
memberActivateStatus
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 获取当前帐号信息
// 获取当前帐号信息
const
accountInfo
=
utils
.
getAccountInfo
()
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
console
.
log
(
'222222222'
,
curItemType
)
// link row
// link row
if
(
curItemType
.
link
)
{
if
(
curItemType
.
link
)
{
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
curItemType
.
link
.
type
,
curItemType
)
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
curItemType
.
link
.
type
,
curItemType
)
if
(
curItemType
.
link
.
type
==
1
)
{
if
(
curItemType
.
link
.
type
==
1
)
{
// 触发父组件更新页面 外部小程序
// 触发父组件更新页面 外部小程序
this
.
setData
({
this
.
setData
({
isAuthorization
:
false
isAuthorization
:
false
...
@@ -82,7 +79,7 @@ Component({
...
@@ -82,7 +79,7 @@ Component({
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
})
})
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
wxService
.
router
(
`
/
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
if
(
currentClickType
==
1
)
{
if
(
currentClickType
==
1
)
{
wxService
.
openCard
()
wxService
.
openCard
()
...
@@ -93,14 +90,13 @@ Component({
...
@@ -93,14 +90,13 @@ Component({
wxService
.
router
(
`/
${
currentClickType
}
`
)
wxService
.
router
(
`/
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
// 集点详情
// 集点详情
console
.
log
(
'pointPath'
,
currentClickType
)
wxService
.
router
(
`
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
}
else
if
(
curItemType
.
row
)
{
}
else
if
(
curItemType
.
row
)
{
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
if
(
rowObj
.
type
==
1
)
{
}
if
(
rowObj
.
type
==
1
)
{
}
else
if
(
rowObj
.
type
==
2
)
{
}
else
if
(
rowObj
.
type
==
2
)
{
}
else
if
(
rowObj
.
type
==
3
)
{
}
else
if
(
rowObj
.
type
==
3
)
{
}
else
if
(
rowObj
.
type
==
4
)
{
}
else
if
(
rowObj
.
type
==
4
)
{
}
...
@@ -115,63 +111,7 @@ Component({
...
@@ -115,63 +111,7 @@ Component({
// 分类
// 分类
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
${
currentClickRow
}
`
)
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
${
currentClickRow
}
`
)
}
}
}
}
// 2019.06.14
// let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
// if (link.type == 1) {
// // 触发父组件更新页面 外部小程序
// this.setData({
// isAuthorization: false
// })
// return false
// } else if (!userInfo) {
// // userInfo 不存在 授权弹框
// this.setData({
// isAuthorization: true
// })
// return false
// }
// if (link.type == 2) {
// // 触发父组件更新页面
// wxService.nextTick(() => {
// this.triggerEvent('updatePage', { pageId: currentClickType.url })
// })
// } else if (link.type == 3) {
// // 预览
// wx.previewImage({
// current: `${app.globalData.imageUrl}/${currentClickType.imageUrl}`, // 当前显示图片的http链接
// urls: [`${app.globalData.imageUrl}/${currentClickType.link.url}`] // 需要预览的图片http链接列表
// })
// } else if (link.type == 4) {
// wxService.router(`${currentClickType}`)
// } else if (link.type == 5) {
// if (currentClickType == 1) {
// wxService.openCard()
// } else if (currentClickType == 2) {
// // wxService.openCard()
// if (userInfo && userInfo.member && userInfo.member.mobile && !userInfo.memberActivateStatus) {
// // 手机号存在 但未激活 跳转激活领卡页面 老用户
// this.setData({
// isAuthorizationActiveText: '新激活领卡',
// isAuthorization: true,
// isAuthorizationType: 3
// }, () => {
// return false
// })
// } else {
// wxService.openCard()
// }
// }
// } 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
)
{
activeTocard
(
e
)
{
if
(
e
.
detail
)
{
if
(
e
.
detail
)
{
...
...
src/component/tabSort/tabSort.js
View file @
7547ce91
...
@@ -82,7 +82,7 @@ Component({
...
@@ -82,7 +82,7 @@ Component({
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
})
})
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
wxService
.
router
(
`
/
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
if
(
currentClickType
==
1
)
{
if
(
currentClickType
==
1
)
{
wxService
.
openCard
()
wxService
.
openCard
()
...
@@ -93,13 +93,11 @@ Component({
...
@@ -93,13 +93,11 @@ Component({
wxService
.
router
(
`/
${
currentClickType
}
`
)
wxService
.
router
(
`/
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
// 集点详情
// 集点详情
console
.
log
(
'pointPath'
,
currentClickType
)
wxService
.
router
(
`
${
currentClickType
}
`
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
}
else
if
(
curItemType
.
row
)
{
}
else
if
(
curItemType
.
row
)
{
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
console
.
log
(
'bacccccccccc'
,
currentClickRow
)
if
(
rowObj
.
type
==
1
)
{
}
if
(
rowObj
.
type
==
1
)
{
}
else
if
(
rowObj
.
type
==
2
)
{
}
else
if
(
rowObj
.
type
==
2
)
{
}
...
@@ -117,9 +115,6 @@ Component({
...
@@ -117,9 +115,6 @@ Component({
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
${
currentClickRow
}
`
)
wxService
.
router
(
`/subPackage/page/pages/categoryPro/categoryPro?
${
currentClickRow
}
`
)
}
}
}
}
},
},
switchTab
(
event
)
{
switchTab
(
event
)
{
var
cur
=
event
.
detail
.
current
var
cur
=
event
.
detail
.
current
...
...
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