收藏
回答

components组件在多个页面中使用,但是navigator跳转转时点击没有反应?

犹豫首页显示的是所有信息的列表,再做了几个分类页面,所有把信息做成了components组件,在各个分类页面展示,但是在跳转到详情页面时,首页的信息能够跳转,分类页面的信息点击没有反应,更别说跳转了,这个问题怎么解决?问题展示如图:

代码:

components组件代码:

<wxs src="../../utils/util.wxs" module="util"/>
<navigator url="{{detailurl}}">
  <view class="list-group">
    <view class="list-title">自动化装配钳工</view>
    <view class="content">{{recruit.content}}</view>
    <view class="nickName">
      <image class="nickName-avatar" src="{{recruit.author.avatarUrl}}">
      </image>
      <view class="nickName-company">
        <view class="company">深圳市赢世纪科技有限公司</view>
        <view class="nickName-firstName">
          <view class="firstName">{{recruit.firstName}}</view>
          <view class="spot">·</view>
          <view class="position">人事经理</view> 
        </view>
      </view>
      <button class="varchar">
        <image class="varchar-image" src="/images/telephone.png"></image>
        <text class="varchar-text">电话</text>
      </button>
    </view>
    <view class="list-detail">
      <view class="detail-location">
        <image class="location" src="../../images/location.png"/>
        <text class="location-text">{{recruit.location.address}}</text>
      </view>
      <view class="detail-time">{{util.timeFormat(recruit.create_time)}}</view>
    </view>
  </view>
</navigator>
components组件js代码:
 properties: {
    detailurl:{
     type:String,
     value:null
    },
    recruit:{
      type:Object,
      value:{}
    }
  },

page首页代码:
wxml代码:
 <recruitment wx:for="{{recruits}}" wx:key="key" wx:for-item="recruit" recruit="{{recruit}}" detailurl="../recuitmentd/recuitmentd?index={{index}}"></recruitment>
  </view>
page分类项页面代码:
<recruitment wx:for="{{recruits}}" wx:key="key" wx:for-item="recruit" recruit="{{recruit}}" detailurl="../../recuitmentd/recuitmentd?index={{index}}"></recruitment>
回答关注问题邀请回答
收藏
登录 后发表内容