原 uniapp 页面跳转并传递参数
版权声明:本文为博主原创文章,请尊重他人的劳动成果,转载请附上原文出处链接和本声明。
本文链接:https://www.91mszl.com/zhangwuji/article/details/1435
<view v-for="(item, index) in goodList" :key="key" @click="()=>judgeIsUserLogin(item.id)">
<view class="cate-content">
<view class="cate-text">{{item.name}}</view>
</view>
</view>
<script>
export default {
data() {
return {
};
},
methods: {
judgeIsUserLogin(obj){ // 判断用户是否登录
uni.navigateTo({
url: 'list?submenuId='+obj, // list为要跳转的页面名称
});
}
}
}
</script>
<view v-for="(item, index) in goodList" :key="key">
<navigator :url="'/pages/index/list?submenuId='+item.id" hover-class="none">
<view class="cate-content" @click="judgeIsUserLogin()">
<view class="cate-text">{{item.name}}</view>
</view>
</navigator>
</view>
2023-05-16 14:35:51 阅读(327)
名师出品,必属精品 https://www.91mszl.com
博主信息