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
ec04da04
Commit
ec04da04
authored
Sep 17, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pic
parent
e084a999
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
picNav.js
src/component/picNav/picNav.js
+1
-1
picNav.wxml
src/component/picNav/picNav.wxml
+9
-5
utils.wxs
src/wxs/utils.wxs
+8
-1
No files found.
src/component/picNav/picNav.js
View file @
ec04da04
...
...
@@ -52,7 +52,7 @@ Component({
})
this
.
setData
({
picNav
},
()
=>
{
console
.
log
(
'ppp'
,
this
.
data
.
picNav
)
})
},
/**
...
...
src/component/picNav/picNav.wxml
View file @
ec04da04
...
...
@@ -7,7 +7,11 @@
wx:for-item="item"
class="nav-block"
>
<!--当前页面需要授权 且未授权-->
<!-- false 不需要授权 -->
<!-- {{item.link ? item.link.url : item.row.newPath }}
{{ utils.hanlerLinkNoNeedAuth(item) }}
-->
<!-- 当前页面需要授权 且未授权-->
<view wx:if="{{item.link ? utils.hanlerLinkNeedAuth(typeOf(item.link.newPath) != undefined ? item.link.newPath : item.link.url) : utils.hanlerLinkNeedAuth(item.row.newPath ? item.row.newPath : item.row.url)}}">
<button
wx:if="{{!currentHasUserInfo}}"
...
...
@@ -19,7 +23,7 @@
style="height:100%"
>
<image
class="pic-img"
class="pic-img
hhh
"
style="width: {{100}}%;height: {{100}}px;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
...
...
@@ -33,7 +37,7 @@
<image
wx:if="{{currentHasUserInfo}}"
class="pic-img"
class="pic-img
yyyy
"
style="width: {{100}}%;height: {{100}}px;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
...
...
@@ -46,7 +50,7 @@
</view>
<view wx:else>
<image
class="pic-img"
class="pic-img
ttt
"
style="width: {{100}}%;height: {{100}}px;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
...
...
@@ -56,7 +60,7 @@
bindload="imageLoad"
bindtap='preview'
/>
</view>
</view>
</view>
</view>
src/wxs/utils.wxs
View file @
ec04da04
...
...
@@ -27,6 +27,11 @@ function formateUrl(url, BASE_IMG_URL){
return url;
}
// 不需要授权页面 首页/种草列表/种草详情/分类/商品列表/商品详情
function hanlerLinkNoNeedAuth(item){
console.log('www', typeof(item.row && item.row.newPath) != undefined ? '1' : '2')
}
// 授权路径 我的/购物车/我的奖励/邀请好友/推广商品/我的地址/我的订单
function hanlerLinkNeedAuth(link){
var flag = false
...
...
@@ -44,10 +49,12 @@ function hanlerLinkNeedAuth(link){
return flag
}
module.exports = {
formateUrl:formateUrl,
numberFormat: numberFormat,
date: date,
handerNickName: handerNickName,
hanlerLinkNeedAuth: hanlerLinkNeedAuth
hanlerLinkNeedAuth: hanlerLinkNeedAuth,
hanlerLinkNoNeedAuth: hanlerLinkNoNeedAuth
}
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