Commit bd08fe82 authored by liwei's avatar liwei

修改了动态子组件位置

parent cc3b83f6
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<template v-if="info.content"> <template v-if="info.content">
<u-read-more ref="uReadMore" :shadowStyle="shadowStyle" :toggle="true" color="#415C9E" <u-read-more ref="uReadMore" :shadowStyle="shadowStyle" :toggle="true" color="#415C9E"
:textIndent="0" showHeight="126rpx"> :textIndent="0" showHeight="126rpx">
<view @click="goDetail" style="font-size: 28rpx;color: #333333;"> <view @click="gotoDetail(info)" style="font-size: 28rpx;color: #333333;">
<!-- <u-parse :tagStyle="tagStyle" :content="info.content" @load="load"></u-parse> --> <!-- <u-parse :tagStyle="tagStyle" :content="info.content" @load="load"></u-parse> -->
<!-- <rich-text :nodes="info.content"></rich-text> --> <!-- <rich-text :nodes="info.content"></rich-text> -->
<view class="" style="line-height: 1.5;"> <view class="" style="line-height: 1.5;">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<!-- <text>分享</text>--> <!-- <text>分享</text>-->
<!-- </u-button>--> <!-- </u-button>-->
</view> </view>
<view class="btn" @click="goDetail"> <view class="btn" @click="gotoDetail(info)">
<image src="../../static/images/104.png" mode=""></image> <image src="../../static/images/104.png" mode=""></image>
<text>{{info.commentCount}}</text> <text>{{info.commentCount}}</text>
</view> </view>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
import xzjReadMore from "@/components/xzj-readMore/xzj-readMore.vue" import xzjReadMore from "@/components/xzj-readMore/xzj-readMore.vue"
import ELM from '@/components/elm-toast/index.vue'; import ELM from '@/components/elm-toast/index.vue';
export default { export default {
name:'ArticleItem',
options: { options: {
styleIsolation: 'shared' styleIsolation: 'shared'
}, },
...@@ -184,8 +184,11 @@ ...@@ -184,8 +184,11 @@
select() { select() {
this.$emit("selectShare", this.info) this.$emit("selectShare", this.info)
}, },
goDetail() { //查看动态详情
gotoDetail(item) {
uni.navigateTo({
url: '/pages3/articleDetail?userId=' + item.userId
})
}, },
//查看用户详情 //查看用户详情
gotoUserInfo(item) { gotoUserInfo(item) {
......
...@@ -27,8 +27,9 @@ ...@@ -27,8 +27,9 @@
<script> <script>
import ItemVue from './Item.vue' import ItemVue from './Item.vue'
import empty from '@/components/empty.vue' import empty from '@/components/empty.vue'
import login from '../../components/login/login.vue' import login from '../../../components/login/login.vue'
export default { export default {
name:'ArticleList',
components: { components: {
ItemVue, ItemVue,
empty, empty,
......
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
<swiper-item class="swiper-item" v-for="(i,index) in list" :key="index"> <swiper-item class="swiper-item" v-for="(i,index) in list" :key="index">
<!-- 这里的swiper-list-item为demo中为演示用定义的组件,列表及分页代码在swiper-list-item组件内 --> <!-- 这里的swiper-list-item为demo中为演示用定义的组件,列表及分页代码在swiper-list-item组件内 -->
<!-- 请注意,swiper-list-item非z-paging内置组件,在自己的项目中必须自己创建,若未创建则会报组件不存在的错误 --> <!-- 请注意,swiper-list-item非z-paging内置组件,在自己的项目中必须自己创建,若未创建则会报组件不存在的错误 -->
<!-- <ItemVue v-for="item in arr" :key="item.id" @delete="deleteFn" :info="item"
" @praise="praise" @close="isOpen = false" @open="isOpen = true" /> -->
<ListVue ref="listItem" @selectShare="selectShare" :tabIndex="index" :userInfo="userInfo" <ListVue ref="listItem" @selectShare="selectShare" :tabIndex="index" :userInfo="userInfo"
:currentIndex="current" @changeOpen="changeOpen"></ListVue> :currentIndex="current" @changeOpen="changeOpen"></ListVue>
</swiper-item> </swiper-item>
...@@ -49,16 +47,14 @@ ...@@ -49,16 +47,14 @@
</template> </template>
<script> <script>
import ItemVue from '../../pagesArticle/components/Item.vue';
import empty from '@/components/empty.vue' import empty from '@/components/empty.vue'
import ListVue from '../../pagesArticle/components/List.vue'; import ListVue from '../components/article/List.vue';
import login from '../../components/login/login.vue'; import login from '../../components/login/login.vue';
export default { export default {
options: { options: {
styleIsolation: 'shared' styleIsolation: 'shared'
}, },
components: { components: {
ItemVue,
empty, empty,
ListVue ListVue
}, },
......
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