

// components/nav/nav.js
const app=getApp();
Component({
  /**
   * 页面的初始数据
   */
  data: {
    keyWord:'',
    img_host:app.hostConfig().imghost
  },
  pageLifetimes: {
    // 组件所在页面的生命周期函数
    show() { 
      this.setData({
        img_host:app.hostConfig().imghost
      });
    },
    hide: function () { },
    resize: function () { },
  },
  
  methods: {
    search(){
        this.triggerEvent('goSearch',this.data.keyWord)
    },
    clearKeyWord(){
        this.setData({
            keyWord:''
        })
    },
    changeIpt(event){
      let {value} = event.detail;
     console.log(value);
      this.setData({
        keyWord:value
      })
    
    },
    goInquirtForm(){
    //   wx.navigateTo({
    //     url: '/case/pages/scan/scan',
    //   })
    }
  },
  
})