小程序页面跳转 之 js页面函数绑定跳转

第一种方式:
wxml 页面
<view bindtap="bindViewTap" class="page"> </view>
 
js 页面
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: ../logs/logs?id = "id"‘ //跳转的页面地址 可以跟参数
    })
  },
 
第二种方式:
  <navigator url="/pages/index/regidter/reg_hos_area/reg_hos_area?id={{item.hosAreaId}}"><view class="image3">点击跳转</view></navigator>
<!-- 名片 -->
<view class="page">
  <view class="mingpian">
    <view class="mingpian1">
      <!-- 头像 -->
      <!-- <view><image class="touxiang" src="{{userInfo.avatarUrl}}"></image></view> -->
       <block >
          <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
      </block>
      <!-- 姓名手机号 -->
      <view class="grjj" wx:for-items="{{array}}"  wx:key="id">
        <view ><text class="yanse">{{item.userName}}</text></view><view><text class="yanse">{{item.telephone}}</text></view>
      </view>
      <view class="renzhen"><text class="yansee">未认证</text></view>
    </view>
    <!-- 列表 -->
    <view class="list">
        <view class="list1"><text class="yanse">就诊者</text></view><view class="list1"><text class="yanse">健康卡</text></view>
        <view class="list1"><text class="yanse">关注收藏</text></view ><view class="list1"><text class="yanse">我的提问</text></view>
    </view>
  </view>

  <!-- 健康档案上浮 -->
  <view class="jkda">
    <view class="dangan"><text class="dangancolor">健康档案</text></view>
    <view class="name" wx:for-items="{{array}}">
      <view ><text>姓名: {{item.userName}}</text></view>
      <view><text>身份证号: {{item.idCard}}</text></view>
    </view>
    <view class="danganphone"><image  src="/images/1.png"></image></view>
  </view>

  <!-- 功能列表1 -->
  <view class="liebiao">
    <navigator url="/pages/index/regidter/reg_search_arrange/reg_search_arrange"><view class="image3"><image  src="/images/1.png"></image><text class="text">我的预约</text></view></navigator>
    
    <navigator url="/pages/index/regidterDay/reg_history/reg_history"><view class="image3"><image  src="/images/2.png"></image><text class="text">我的挂号</text></view></navigator>

    <navigator url="/pages/mylist/test/test"><view class="image3"><image  src="/images/5.png"></image><text class="text">签约服务</text></view></navigator>
    
    <view class="image3"><image  src="/images/6.png"></image><text class="text">药品订单</text></view>
  </view>

  <!-- 功能列表2 -->
  <view class="list2">
    <view class="weui-cell weui-cell_active weui-cell_access">
      <view class="weui-cell__bd">
        <text class="cuIcon-moneybag" style="vertical-align: middle;"> 门诊缴费记录</text>
        <!-- <text class="cuIcon-moneybag" style="vertical-align: middle;"> {{message}}</text> -->
      </view>
      <view class="weui-cell__ft"></view>
    </view>

    <view class="weui-cell weui-cell_active weui-cell_access">
      <view class="weui-cell__bd">
        <text class="cuIcon-sponsor" style="vertical-align: middle;"> 就诊卡充值记录</text>
      </view>
      <view class="weui-cell__ft"></view>
    </view>

    <view class="weui-cell weui-cell_active weui-cell_access">
      <view class="weui-cell__bd">
        <text class="cuIcon-recharge" style="vertical-align: middle;"> 住院预交记录</text>
      </view>
      <view class="weui-cell__ft"></view>
    </view>

    <view class="weui-cell weui-cell_active weui-cell_access">
      <view class="weui-cell__bd">
        <text class="cuIcon-friend" style="vertical-align: middle;"> 转账记录</text>
      </view>
      <view class="weui-cell__ft"></view>
    </view>

    <view class="weui-cell weui-cell_active weui-cell_access">
      <view class="weui-cell__bd">
        <text class="cuIcon-form" style="vertical-align: middle;"> 会诊记录</text>
      </view>
      <view class="weui-cell__ft"></view>
    </view>

    <view class="weui-cell weui-cell_active weui-cell_access">
      <view class="weui-cell__bd">
        <text class="cuIcon-copy" style="vertical-align: middle;"> 病案预约记录</text>
      </view>
      <view class="weui-cell__ft"></view>
    </view>

  </view>

</view>

小程序页面跳转 之 js页面函数绑定跳转

上一篇:mac 小程序 helloworld


下一篇:(八)微信小程序:tabBar应用