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
bb38e656
Commit
bb38e656
authored
Jun 04, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化部分功能
parent
7739db9f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
52 deletions
+38
-52
bottomTabs.js
src/component/bottomTabs/bottomTabs.js
+12
-3
bottomTabs.wxml
src/component/bottomTabs/bottomTabs.wxml
+13
-45
bottomTabs.wxss
src/component/bottomTabs/bottomTabs.wxss
+1
-1
project.config.json
src/project.config.json
+1
-1
categoryPro.js
src/subPackage/page/pages/categoryPro/categoryPro.js
+10
-2
activityOrder.wxss
...kageMarketing/page/pages/activityOrder/activityOrder.wxss
+1
-0
No files found.
src/component/bottomTabs/bottomTabs.js
View file @
bb38e656
...
@@ -28,7 +28,7 @@ Component({
...
@@ -28,7 +28,7 @@ Component({
baseImgUrl
:
app
.
globalData
.
imageUrl
baseImgUrl
:
app
.
globalData
.
imageUrl
})
})
const
{
tabBar
}
=
this
.
data
const
{
tabBar
}
=
this
.
data
let
currentTab
=
tabBar
.
images
let
currentTab
=
tabBar
.
images
;
currentTab
.
forEach
(
item
=>
{
currentTab
.
forEach
(
item
=>
{
// 存在 row 处理数据 8 商品 9 分类
// 存在 row 处理数据 8 商品 9 分类
// 1. 外部小程序_url 2. 内部动态页面_pageId 3.预览 4. 内部页面 5. 卡券__1_卡包 2_激活领卡
// 1. 外部小程序_url 2. 内部动态页面_pageId 3.预览 4. 内部页面 5. 卡券__1_卡包 2_激活领卡
...
@@ -41,7 +41,17 @@ Component({
...
@@ -41,7 +41,17 @@ Component({
const
pageId
=
item
.
link
.
url
const
pageId
=
item
.
link
.
url
item
.
link
.
newPath
=
`/
${
currentPath
.
route
}
`
item
.
link
.
newPath
=
`/
${
currentPath
.
route
}
`
}
}
return
//处理内部固定页时
if
(
item
.
link
.
type
==
4
){
const
urls
=
getCurrentPages
()
item
.
link
.
active
=
false
;
const
currentPath
=
urls
[
urls
.
length
-
1
];
//获取当前页面的路径
if
(
item
.
link
.
url
.
indexOf
(
currentPath
.
route
)
>
-
1
){
item
.
link
.
active
=
true
;
}
}
// return
}
else
if
(
item
.
row
)
{
}
else
if
(
item
.
row
)
{
newRow
=
JSON
.
parse
(
item
.
row
)
newRow
=
JSON
.
parse
(
item
.
row
)
if
(
newRow
.
type
==
8
)
{
if
(
newRow
.
type
==
8
)
{
...
@@ -52,7 +62,6 @@ Component({
...
@@ -52,7 +62,6 @@ Component({
item
.
row
=
newRow
item
.
row
=
newRow
}
}
})
})
// 当前匹配路径是否需要授权 true 需要 false 不需要
// 当前匹配路径是否需要授权 true 需要 false 不需要
currentTab
.
forEach
(
item
=>
{
currentTab
.
forEach
(
item
=>
{
let
checkUrl
=
''
let
checkUrl
=
''
...
...
src/component/bottomTabs/bottomTabs.wxml
View file @
bb38e656
...
@@ -9,36 +9,19 @@ wx:if="{{tabBar.num == 4}}">
...
@@ -9,36 +9,19 @@ wx:if="{{tabBar.num == 4}}">
<!--当前页面需要授权 且未授权-->
<!--当前页面需要授权 且未授权-->
<view wx:if="{{tab.needAuth}}" class="btn-tab">
<view wx:if="{{tab.needAuth}}" class="btn-tab">
<view wx:if="{{!currentHasUserInfo}}" class="btn-tab">
<view wx:if="{{!currentHasUserInfo}}" class="btn-tab">
<button
<button bindgetuserinfo="_getUserInfo" data-jflag="false" open-type='getUserInfo' class='btn' hover-class="btn-hover" style="height: 100%;">
bindgetuserinfo="_getUserInfo"
<image class='tab-img' src="{{utils.formateUrl(tab.link.type == 4 ? (tab.link.active ? tab.activeImageUrl : tab.imageUrl) : (currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl),baseImgUrl)}}" />
data-jflag="false"
open-type='getUserInfo'
class='btn'
hover-class="btn-hover"
style="height: 100%;"
>
<image class='tab-img' src="{{utils.formateUrl(currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl,baseImgUrl)}}" />
</button>
</button>
</view>
</view>
<view
<view wx:else class="btn-tab" data-item="{{tab}}" bindtap="handelToPage">
wx:else
class="btn-tab"
data-item="{{tab}}"
bindtap="handelToPage"
>
<button class='btn' style="height: 100%;">
<button class='btn' style="height: 100%;">
<image class='tab-img' src="{{utils.formateUrl(
currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl
,baseImgUrl)}}" />
<image class='tab-img' src="{{utils.formateUrl(
tab.link.type == 4 ? (tab.link.active ? tab.activeImageUrl : tab.imageUrl) : (currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl)
,baseImgUrl)}}" />
</button>
</button>
</view>
</view>
</view>
</view>
<view
<view wx:else class="btn-tab" data-item="{{tab}}" bindtap="handelToPage">
wx:else
class="btn-tab"
data-item="{{tab}}"
bindtap="handelToPage"
>
<button class='btn' style="height: 100%">
<button class='btn' style="height: 100%">
<image class='tab-img' src="{{utils.formateUrl(
currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl
,baseImgUrl)}}" />
<image class='tab-img' src="{{utils.formateUrl(
tab.link.type == 4 ? (tab.link.active ? tab.activeImageUrl : tab.imageUrl) : (currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl)
,baseImgUrl)}}" />
</button>
</button>
</view>
</view>
</view>
</view>
...
@@ -50,36 +33,21 @@ wx:if="{{tabBar.num == 4}}">
...
@@ -50,36 +33,21 @@ wx:if="{{tabBar.num == 4}}">
<!--当前页面需要授权 且未授权-->
<!--当前页面需要授权 且未授权-->
<view wx:if="{{tab.needAuth}}" class="btn-tab">
<view wx:if="{{tab.needAuth}}" class="btn-tab">
<view wx:if="{{!currentHasUserInfo}}" class="btn-tab">
<view wx:if="{{!currentHasUserInfo}}" class="btn-tab">
<button
<button bindgetuserinfo="_getUserInfo" data-jflag="false" open-type='getUserInfo' class='btn' hover-class="btn-hover" style="height: 100%;">
bindgetuserinfo="_getUserInfo"
<image class='tab-img'
data-jflag="false"
src="{{utils.formateUrl(tab.link.type == 4 ? (tab.link.active ? tab.activeImageUrl : tab.imageUrl) : (currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl),baseImgUrl)}}" />
open-type='getUserInfo'
class='btn'
hover-class="btn-hover"
style="height: 100%;"
>
<image class='tab-img' src="{{utils.formateUrl(currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl,baseImgUrl)}}" />
</button>
</button>
</view>
</view>
<view
<view
wx:else
wx:else class="btn-tab" data-item="{{tab}}" bindtap="handelToPage">
class="btn-tab"
data-item="{{tab}}"
bindtap="handelToPage"
>
<button class='btn' style="height: 100%;">
<button class='btn' style="height: 100%;">
<image class='tab-img' src="{{utils.formateUrl(
currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl
,baseImgUrl)}}" />
<image class='tab-img' src="{{utils.formateUrl(
tab.link.type == 4 ? (tab.link.active ? tab.activeImageUrl : tab.imageUrl) : (currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl)
,baseImgUrl)}}" />
</button>
</button>
</view>
</view>
</view>
</view>
<view
<view wx:else class="btn-tab" data-item="{{tab}}" bindtap="handelToPage">
wx:else
class="btn-tab"
data-item="{{tab}}"
bindtap="handelToPage"
>
<button class='btn' style="height: 100%">
<button class='btn' style="height: 100%">
<image class='tab-img' src="{{utils.formateUrl(
currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl
,baseImgUrl)}}" />
<image class='tab-img' src="{{utils.formateUrl(
tab.link.type == 4 ? (tab.link.active ? tab.activeImageUrl : tab.imageUrl) : (currHomePageId == (tab.link.type == '2' ? tab.link.url : '0') ? tab.activeImageUrl: tab.imageUrl)
,baseImgUrl)}}" />
</button>
</button>
</view>
</view>
</view>
</view>
...
...
src/component/bottomTabs/bottomTabs.wxss
View file @
bb38e656
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
justify-content: center;
justify-content: center;
/* box-shadow: 0px -4px 10px 0px rgba(232, 232, 232, 0.95); */
/* box-shadow: 0px -4px 10px 0px rgba(232, 232, 232, 0.95); */
padding-top: 20rpx;
padding-top: 20rpx;
/* border-top: solid 2rpx #dddddd; */
border-top: solid 1rpx #dddddd;
}
}
.pdt {
.pdt {
padding-top: 50rpx;
padding-top: 50rpx;
...
...
src/project.config.json
View file @
bb38e656
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
"disablePlugins"
:
[],
"disablePlugins"
:
[],
"outputPath"
:
""
"outputPath"
:
""
},
},
"useCompilerModule"
:
fals
e
,
"useCompilerModule"
:
tru
e
,
"userConfirmedUseCompilerModuleSwitch"
:
false
"userConfirmedUseCompilerModuleSwitch"
:
false
},
},
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
...
...
src/subPackage/page/pages/categoryPro/categoryPro.js
View file @
bb38e656
...
@@ -323,14 +323,22 @@ wxService.page({
...
@@ -323,14 +323,22 @@ wxService.page({
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
(
res
)
{
onShareAppMessage
:
function
(
res
)
{
//修改为参数memberId
//修改为参数memberId
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
type
=
this
.
data
.
pageFrom
;
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
var
path
=
`subPackage/page/pages/categoryPro/categoryPro?id=
${
this
.
data
.
form
.
mallCategoryId
}
`
;
var
path
=
`subPackage/page/pages/categoryPro/categoryPro?id=
${
this
.
data
.
form
.
mallCategoryId
}
`
;
if
(
memberId
)
{
if
(
memberId
)
{
let
m
=
Integer
.
digit
(
memberId
,
10
,
64
);
let
m
=
Integer
.
digit
(
memberId
,
10
,
64
);
path
=
`subPackage/page/pages/categoryPro/categoryPro?m=
${
m
}
&id=
${
this
.
data
.
form
.
mallCategoryId
}
`
;
path
=
`subPackage/page/pages/categoryPro/categoryPro?m=
${
m
}
&id=
${
this
.
data
.
form
.
mallCategoryId
}
`
;
}
}
if
(
type
){
path
=
`
${
path
}
&type=
${
type
}
`
}
console
.
log
(
path
)
return
{
return
{
title
:
'我给你分享了一些商品,赶紧去看看吧~'
,
title
:
'我给你分享了一些商品,赶紧去看看吧~'
,
path
:
path
path
:
path
...
...
src/subPackageMarketing/page/pages/activityOrder/activityOrder.wxss
View file @
bb38e656
...
@@ -31,6 +31,7 @@ view{
...
@@ -31,6 +31,7 @@ view{
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: space-around;
justify-content: space-around;
/* border-top: solid 1rpx #dddddd; */
}
}
.bottom-order .order-btns{
.bottom-order .order-btns{
...
...
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