Commit ec04da04 by 高淑倩

pic

parent e084a999
......@@ -52,7 +52,7 @@ Component({
})
this.setData({ picNav }, () => {
console.log('ppp', this.data.picNav)
})
},
/**
......
......@@ -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>
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment