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
4f074d73
Commit
4f074d73
authored
Aug 29, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:动态子页面
parent
030257e2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
135 additions
and
67 deletions
+135
-67
bottomTabs.js
src/component/bottomTabs/bottomTabs.js
+72
-3
bottomTabs.wxml
src/component/bottomTabs/bottomTabs.wxml
+2
-2
userCenter.json
src/pages/userCenter/userCenter.json
+2
-1
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+2
-49
project.config.json
src/project.config.json
+3
-2
subPage.json
src/subPackage/page/pages/subPage/subPage.json
+10
-1
subPage.wxml
src/subPackage/page/pages/subPage/subPage.wxml
+44
-9
No files found.
src/component/bottomTabs/bottomTabs.js
View file @
4f074d73
...
@@ -69,9 +69,78 @@ Component({
...
@@ -69,9 +69,78 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
handelToPage
(
e
){
handelToPage
(
event
){
const
{
route
}
=
e
.
currentTarget
.
dataset
const
ev
=
event
.
currentTarget
.
dataset
;
wxService
.
router
(
route
)
let
curItemType
=
ev
.
item
const
userInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
console
.
log
(
'curItemType'
,
curItemType
,
curItemType
.
link
.
type
)
// link row
if
(
curItemType
.
link
)
{
let
currentClickType
=
app
.
globalData
.
commonFunc
.
getLink
(
curItemType
.
link
.
type
,
curItemType
)
if
(
curItemType
.
link
.
type
==
1
)
{
// 触发父组件更新页面 外部小程序
this
.
setData
({
isAuthorization
:
false
})
return
false
}
else
if
(
!
userInfo
)
{
this
.
setData
({
isAuthorization
:
true
})
return
false
}
else
if
(
userInfo
&&
userInfo
.
member
&&
!
userInfo
.
member
.
mobile
)
{
wxService
.
openCard
()
return
false
}
if
(
curItemType
.
link
.
type
==
2
)
{
// 触发父组件更新页面
wxService
.
nextTick
(()
=>
{
this
.
triggerEvent
(
'updatePage'
,
{
pageId
:
currentClickType
.
url
})
})
}
else
if
(
curItemType
.
link
.
type
==
3
)
{
// 预览
wx
.
previewImage
({
current
:
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
imageUrl
}
`
,
// 当前显示图片的http链接
urls
:
[
`
${
app
.
globalData
.
imageUrl
}
/
${
currentClickType
.
link
.
url
}
`
]
// 需要预览的图片http链接列表
})
}
else
if
(
curItemType
.
link
.
type
==
4
)
{
wxService
.
router
(
`/
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
5
)
{
if
(
currentClickType
==
1
)
{
wxService
.
openCard
()
}
else
if
(
currentClickType
==
2
)
{
wxService
.
openCard
()
}
}
else
if
(
curItemType
.
link
.
type
==
6
)
{
wxService
.
router
(
`/
${
currentClickType
}
`
)
}
else
if
(
curItemType
.
link
.
type
==
7
)
{
// 集点详情
console
.
log
(
'pointPath'
,
currentClickType
)
wxService
.
router
(
`
${
currentClickType
}
`
)
}
}
else
if
(
curItemType
.
row
)
{
let
rowObj
=
JSON
.
parse
(
curItemType
.
row
)
let
currentClickRow
=
app
.
globalData
.
commonFunc
.
getLinkRow
(
rowObj
.
type
,
rowObj
)
console
.
log
(
'bacccccccccc'
,
currentClickRow
)
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/bottomTabs/bottomTabs.wxml
View file @
4f074d73
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<block wx:for="{{tabBar.images}}" wx:key="{{index}}" wx:for-item="tab">
<block wx:for="{{tabBar.images}}" wx:key="{{index}}" wx:for-item="tab">
<view
<view
class="tab"
class="tab"
data-
route="{{tab.route
}}"
data-
item="{{tab
}}"
bindtap="handelToPage"
bindtap="handelToPage"
>
>
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</view>
</view>
<view class="bottom-tab fixed-bottom0" style="height: 108rpx;" wx:if="{{tabBar.num == 5}}">
<view class="bottom-tab fixed-bottom0" style="height: 108rpx;" wx:if="{{tabBar.num == 5}}">
<block wx:for="{{tabs}}" wx:key="{{index}}" wx:for-item="tab">
<block wx:for="{{tabs}}" wx:key="{{index}}" wx:for-item="tab">
<view class="tab" data-
route="{{tab.route
}}" bindtap="handelToPage">
<view class="tab" data-
item="{{tab
}}" bindtap="handelToPage">
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.activeImageUrl}}' />
<image class='tab-img' wx:else src='{{tab.imageUrl}}' />
<image class='tab-img' wx:else src='{{tab.imageUrl}}' />
</view>
</view>
...
...
src/pages/userCenter/userCenter.json
View file @
4f074d73
...
@@ -13,6 +13,6 @@
...
@@ -13,6 +13,6 @@
"bannerAd"
:
"/component/bannerAd/bannerAd"
,
"bannerAd"
:
"/component/bannerAd/bannerAd"
,
"attention"
:
"/component/attention/attention"
,
"attention"
:
"/component/attention/attention"
,
"guide-page-modal"
:
"/component/guidePageModal/guidePageModal"
,
"guide-page-modal"
:
"/component/guidePageModal/guidePageModal"
,
"bottom-tabs"
:
"
./../..
/component/bottomTabs/bottomTabs"
"bottom-tabs"
:
"/component/bottomTabs/bottomTabs"
}
}
}
}
\ No newline at end of file
src/pages/userCenter/userCenter.wxml
View file @
4f074d73
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</view>-->
</view>-->
<view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}">
<view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}">
<!-- <attention wx:if="{{pItem.type == 9}}" /> wx:else -->
<!-- <attention wx:if="{{pItem.type == 9}}" /> wx:else -->
<bottom-tabs tab-bar="{{pItem.tabBar}}" />
<bottom-tabs
bind:updatePage="updatePage"
tab-bar="{{pItem.tabBar}}" />
</view>
</view>
<view class="" wx:if="{{pItem.type == 6}}">
<view class="" wx:if="{{pItem.type == 6}}">
<announcement notice="{{pItem.notice}}" />
<announcement notice="{{pItem.notice}}" />
...
@@ -34,54 +34,7 @@
...
@@ -34,54 +34,7 @@
<attention/>
<attention/>
</view>-->
</view>-->
</block>
</block>
<!--
<tab-sort/>
<view class="page-bgc">
<image-swiper/>
<announcement/>
<icon-swiper/>
<pic-nav/>
</view>
<view class="person-hot border_box">
<text class="person-text">- 人气热卖</text>
<span class="hot border_box">HOT -</span>
</view>
<hot-item/>
<attention/>
<bannerAd/>-->
<!-- <block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<view class="pd1530" wx:if="{{pItem.type == 1}}">
<image-swiper bind:updatePage="updatePage" image-data="{{pItem.rotationchart.images}}" />
</view>
<view class="pd1530" wx:if="{{pItem.type == 2}}">
<person-center
base-user-info="{{baseUserInfo}}"
person-data="{{pItem.customer}}"
integral-num="{{integralNum}}"
coupon-num="{{couponNum}}"
token="{{token}}"
/>
</view>
<view class="pd1520" wx:if="{{pItem.type == 3}}">
<pic-nav bind:updatePage="updatePage" pic-nav="{{pItem.navigation.images}}" />
</view>
<view class="" wx:if="{{pItem.type == 4}}">
<bottom bind:updatePage="updatePage" bottom="{{pItem.bottom}}" />
</view>
</block>-->
</view>
</view>
<
!--<authorization-modal isAuthorization='{{isAuthorization}}' />--
>
<
authorization-modal isAuthorization='{{isAuthorization}}' /
>
<guide-page-modal show="{{guidePageModalShow}}" />
<guide-page-modal show="{{guidePageModalShow}}" />
src/project.config.json
View file @
4f074d73
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
25
,
"current"
:
13
,
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
...
@@ -123,7 +123,8 @@
...
@@ -123,7 +123,8 @@
"id"
:
13
,
"id"
:
13
,
"name"
:
"subPage"
,
"name"
:
"subPage"
,
"pathName"
:
"subPackage/page/pages/subPage/subPage"
,
"pathName"
:
"subPackage/page/pages/subPage/subPage"
,
"query"
:
"pageId=4"
"query"
:
"pageId=14"
,
"scene"
:
null
},
},
{
{
"id"
:
14
,
"id"
:
14
,
...
...
src/subPackage/page/pages/subPage/subPage.json
View file @
4f074d73
...
@@ -5,6 +5,14 @@
...
@@ -5,6 +5,14 @@
"person-center"
:
"/component/personCenter/personCenter"
,
"person-center"
:
"/component/personCenter/personCenter"
,
"pic-nav"
:
"/component/picNav/picNav"
,
"pic-nav"
:
"/component/picNav/picNav"
,
"bottom"
:
"/component/bottom/bottom"
,
"bottom"
:
"/component/bottom/bottom"
,
"authorization-modal"
:
"/component/authorization-modal/authorization-modal"
"authorization-modal"
:
"/component/authorization-modal/authorization-modal"
,
"tab-sort"
:
"/component/tabSort/tabSort"
,
"announcement"
:
"/component/announcement/announcement"
,
"icon-swiper"
:
"/component/iconSwiper/iconSwiper"
,
"hot-item"
:
"/component/hotItem/hotItem"
,
"bannerAd"
:
"/component/bannerAd/bannerAd"
,
"attention"
:
"/component/attention/attention"
,
"guide-page-modal"
:
"/component/guidePageModal/guidePageModal"
,
"bottom-tabs"
:
"/component/bottomTabs/bottomTabs"
}
}
}
}
\ No newline at end of file
src/subPackage/page/pages/subPage/subPage.wxml
View file @
4f074d73
<!--subPackage/page/pages/subPage/subPage.wxml-->
<!--subPackage/page/pages/subPage/subPage.wxml-->
<view class='user-center'>
<!--<view class='user-center'>
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}-->
<!-- 轮播 -->
<view class="pd1530" wx:if="{{pItem.type == 1}}">
<view class="pd1530" wx:if="{{pItem.type == 1}}">
<image-swiper bind:updatePage="updatePage" image-data="{{pItem.rotationchart.images}}" />
<image-swiper bind:updatePage="updatePage" image-data="{{pItem.rotationchart.images}}" />
</view>
</view>
<!-- 个人中心 {{pItem.customer}}-->
<view class="pd1530" wx:if="{{pItem.type == 2}}">
<view class="pd1530" wx:if="{{pItem.type == 2}}">
<person-center person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
<person-center person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view>
</view>
<!-- 图片导航 {{pItem.navigation.images}} pd1530-->
<view class="pd1520" wx:if="{{pItem.type == 3}}">
<view class="pd1520" wx:if="{{pItem.type == 3}}">
<pic-nav bind:updatePage="updatePage" pic-nav="{{pItem.navigation.images}}" />
<pic-nav bind:updatePage="updatePage" pic-nav="{{pItem.navigation.images}}" />
</view>
</view>
<!-- 底部 -->
<view class="" wx:if="{{pItem.type == 4}}">
<view class="" wx:if="{{pItem.type == 4}}">
<bottom bind:updatePage="updatePage" bottom="{{pItem.bottom}}"/>
<bottom bind:updatePage="updatePage" bottom="{{pItem.bottom}}"/>
</view>
</view>
</block>
</block>
</view>-->
<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">
<view wx:if="{{pItem.type == 1}}">
<image-swiper image-data="{{pItem.rotationchart.images}}" />
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<person-center person-data="{{pItem.customer}}" />
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" />
</view>
<view class="" wx:if="{{pItem.type == 4}}">
<bottom bottom="{{pItem.bottom}}" />
</view>
<!--<view class="" wx:if="{{pItem.type == 5}}">
<bottom-tabs tab-bar="{{pItem.tabBar}}" />
</view>-->
<view class="" wx:if="{{ pItem.type == 9 ? pItem.type == 9 : pItem.type == 5}}">
<!-- <attention wx:if="{{pItem.type == 9}}" /> wx:else -->
<bottom-tabs bind:updatePage="updatePage" tab-bar="{{pItem.tabBar}}" />
</view>
<view class="" wx:if="{{pItem.type == 6}}">
<announcement notice="{{pItem.notice}}" />
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<tab-sort category-type="{{pItem.categoryType}}" />
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" />
</view>
<!-- <view class="" wx:if="{{pItem.type == 9}}">
<attention/>
</view>-->
</block>
</view>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}'/>
<authorization-modal isAuthorization='{{isAuthorization}}' />
<guide-page-modal show="{{guidePageModalShow}}" />
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