12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import http from '../../../base/httputil'
- const app = getApp()
- Page({
- /**
- * 组件的初始数据
- */
- data: {
- host: app.globalData.host,
- materialList: [],
- },
- onLoad() {
- // this.list(null)
- },
- // 搜索结果跳页
- bindViewSearchEnd() {
- // wx.navigateTo({
- // url: '../search/search'
- // })
- },
- // 物资详情页
- bindViewDetails(e) {
- let material_details = e.currentTarget.dataset.index
- wx.navigateTo({
- url: '../details/material_details?details=' + JSON.stringify(material_details)
- })
- },
- searchEnterprise(e) {
- var obj = new Object()
- obj.materialName = e.detail.value
-
- this.list(obj)
- },
- list(data) {
- http.send_get("/system/AppMaterialController/geMaterialList", data, this.getMaterListSuccess)
- },
- getMaterListSuccess(res) {
- console.log("!!!!",res.data.rows.length)
- this.setData({
- materialList: res.data.rows
- })
- }
- })
|