添加跳转
parent
716cb85ede
commit
7ef8893e54
|
|
@ -559,12 +559,14 @@ export default {
|
|||
if (e.jump_type == 1) {
|
||||
if (tabRouter.findIndex((el) => e.jump_link?.includes(el)) >= 0) {
|
||||
const params = this.getParams(e.jump_link);
|
||||
console.log(params);
|
||||
if(Object.keys(params.params).length>0) uni.setStorageSync(params.path, params.params);
|
||||
// console.log(params);
|
||||
if(Object.keys(params.params).length>0) {
|
||||
uni.$emit('jumpTab',params.params)
|
||||
this.$u.route({
|
||||
url: params.path,
|
||||
type: 'switchTab',
|
||||
});
|
||||
}
|
||||
} else if (whiteRouter.findIndex((el) => e.jump_link?.includes(el)) >= 0) {
|
||||
this.$u.routeAuth(e.jump_link);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@
|
|||
</block>
|
||||
</u-table>
|
||||
</view>
|
||||
<u-parse :html="detailHtml" style="font-size:0"></u-parse>
|
||||
<u-parse :html="detailHtml" style="font-size:0;width: 100%;" :tagStyle="style"></u-parse>
|
||||
</view>
|
||||
<!-- 购物须知 -->
|
||||
<view class="mt-base bg-white">
|
||||
|
|
@ -395,6 +395,11 @@ export default {
|
|||
playShow: false,
|
||||
shareShow: false,
|
||||
goodsImage: '', //本地图片
|
||||
style:{
|
||||
p: 'font-size:0',
|
||||
span: 'font-size: 0',
|
||||
img:'display:block;min-width:100%'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
|
|||
|
|
@ -18,15 +18,17 @@
|
|||
<view class="u-menu-wrap">
|
||||
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
|
||||
:scroll-into-view="itemId">
|
||||
<view v-for="(item,index) in tabbar" :key="index" class="u-tab-item" :class="[current == index ? 'u-tab-item-active' : '']"
|
||||
@tap.stop="swichMenu(index)">
|
||||
<view v-for="(item, index) in tabbar" :key="index" class="u-tab-item"
|
||||
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
|
||||
<text class="u-line-1">{{ item.name }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
|
||||
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
|
||||
@scroll="rightScroll">
|
||||
<view class="page-view">
|
||||
<block v-for="(item, index) in tabbar" :key="index">
|
||||
<view class="class-item" :id="'item' + index" v-for="(item1 , index1) in item.children" :key="index1">
|
||||
<view class="class-item" :id="'item' + index" v-for="(item1, index1) in item.children"
|
||||
:key="index1">
|
||||
<view class="item-title">
|
||||
<text>{{ item1.name }}</text>
|
||||
</view>
|
||||
|
|
@ -35,7 +37,8 @@
|
|||
<image class="w-full h-full rounded-15rpx " :src="item1.icon" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="item-container">
|
||||
<view @click="$u.route('/pages/search/search_result', {category: item2.id,})" class="thumb-box" v-for="(item2, index2) in item1.children" :key="index2">
|
||||
<view @click="$u.route('/pages/search/search_result', { category: item2.id, })"
|
||||
class="thumb-box" v-for="(item2, index2) in item1.children" :key="index2">
|
||||
<image v-if="item2.icon" class="item-menu-image" :src="item2.icon" mode=""></image>
|
||||
<view class="item-menu-name">{{ item2.name }}</view>
|
||||
</view>
|
||||
|
|
@ -71,6 +74,16 @@
|
|||
}, 300)
|
||||
this.getDate()
|
||||
},
|
||||
onShow(){
|
||||
this.$nextTick(()=>{
|
||||
uni.$on('jumpTab',({id})=> {
|
||||
if(!!id){
|
||||
const Index=this.tabbar.findIndex(e=>e.id==id)
|
||||
this.swichMenu(Index)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onReady() {
|
||||
this.getMenuItemTop()
|
||||
},
|
||||
|
|
@ -193,6 +206,7 @@
|
|||
box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.2);
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
|
||||
.u-wrap {
|
||||
height: calc(100vh);
|
||||
/* #ifdef H5 */
|
||||
|
|
@ -230,6 +244,7 @@
|
|||
width: 200rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.u-tab-item {
|
||||
height: 110rpx;
|
||||
background: #f6f6f6;
|
||||
|
|
|
|||
Loading…
Reference in New Issue