Skip to content

uni.navigateTo 事件监听

2022-12-06

js
toIndex() {
  let _that = this
  const href = '/pages/index/index2' 
  uni.navigateTo({
    url: href + "?uid=" + this.uid,
    events: {
      // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
      reGetList: function() {
        _that.getFwList()
      }
    }
  })
}

被打开的页面调用

js
const eventChannel = this.getOpenerEventChannel();
eventChannel.emit('reGetList', {data: ''});

linux 基础工具安装

bash

yum update -y

# ifconfig 
yum install net-tools

yum install wget -y

linux 配置DNS

bash
# cat /etc/resolv.conf
nameserver 114.114.114.114