Commit 2a98f555 by 高淑倩

add: 图片导航

parent e56f1cb6
......@@ -29,12 +29,7 @@ Component({
isAuthorization: false,
isAuthorizationActiveText: '',
isAuthorizationType: 2,
baseImgUrl: '',
picNavH: [{
url: ''
}, {
url: ''
}]
baseImgUrl: ''
},
/**
* 组件的方法列表
......@@ -71,7 +66,7 @@ Component({
}
if (link.type == 2) {
// 触发父组件更新页面 内部子页面
// 触发父组件更新页面
wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url })
})
......@@ -81,9 +76,9 @@ Component({
current: `${app.globalData.imageUrl}/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`${app.globalData.imageUrl}/${currentClickType.link.url}`] // 需要预览的图片http链接列表
})
} else if (link.type == 4) { // 内部固定功能
} else if (link.type == 4) {
wxService.router(`${currentClickType}`)
} else if (link.type == 5) { // 微信卡券 -- 卡包/领卡
} else if (link.type == 5) {
if (currentClickType == 1) {
wxService.openCard()
} else if (currentClickType == 2) {
......@@ -101,8 +96,14 @@ Component({
wxService.openCard()
}
}
} else if (link.type == 6) {
} 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) {
......
<!--component/picNav/picNav.wxml-->
<!--<view class="pic-nav">
<block
wx:for="{{picNavH}}"
<view class="pic-nav">
<view
wx:for="{{picNav}}"
wx:key="{{index}}"
wx:for-item="item"
class="nav-block"
>
<view class="pic-item">
11
</view>
</block>
</view>-->
<image
wx:if="{{baseImgUrl}}"
class="pic-img"
style="width: {{100}}%;height: {{100}}px;"
src="{{baseImgUrl}}{{item.imageUrl}}"
data-appid="{{item.link.appid}}"
data-path="{{item.link.url}}"
data-link="{{item.link}}"
data-item="{{item}}"
bindload="imageLoad"
bindtap='preview'
/>
</view>
</view>
<authorization-modal
isAuthorization='{{isAuthorization}}'
bind:activeTocard="activeTocard"
isAuthorizationType="{{isAuthorizationType}}"
isAuthorizationActiveText="{{isAuthorizationActiveText}}"
/>
<view class="pic-nav">
<!--<view class="pic-nav">
<view
wx:for="{{picNav}}"
wx:key="{{index}}"
......@@ -33,6 +50,10 @@
/>
</view>
</view>
<authorization-modal
isAuthorization='{{isAuthorization}}'
bind:activeTocard="activeTocard"
isAuthorizationType="{{isAuthorizationType}}"
isAuthorizationActiveText="{{isAuthorizationActiveText}}"
/>
-->
......@@ -4,20 +4,10 @@
overflow: hidden;
padding: 0;
margin: 0;
box-sizing:content-box;
margin: 0 20rpx;
box-sizing: content-box;
}
.pic-item {
flex: 1;
height: 154rpx;
opacity: 0.5;
border-radius: 10rpx;
background-color: rgba(196, 186, 175, 0.22);
}
.pic-item:first-child {
margin:0 10rpx 10rpx 0;
}
/* .pic-nav {
.pic-nav {
display: flex;
padding: 0;
margin: 0;
......@@ -25,5 +15,7 @@
box-sizing: border-box;
flex-direction: row;
align-items: center;
} */
}
.nav-block {
flex: 1
}
\ No newline at end of file
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 37,
"current": 25,
"list": [
{
"id": -1,
......@@ -206,7 +206,7 @@
"id": 25,
"name": "订单详情",
"pathName": "pages/orderDetail/orderDetail",
"query": "id=614116644096184320",
"query": "id=616360692727025664",
"scene": null
},
{
......
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