riku
2022-08-09 87f6bb4bcb2446b9c9065b58391ae400cd358b77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// pages/module_consult/consultresult/consultresult.js
const consultservice = require("../../../service/consultservice")
const app = getApp()
 
Page({
 
  /**
   * 页面的初始数据
   */
  data: {
    keyword: ''
  },
 
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      console.log(data);
      that.data.keyword = data.keyword
    })
  },
 
  search () {
    consultservice.search(app)
  }
})