Commit 2a98f555 by 高淑倩

add: 图片导航

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