|
@@ -7,6 +7,7 @@ Page({
|
|
data: {
|
|
data: {
|
|
host: app.globalData.host,
|
|
host: app.globalData.host,
|
|
enterpriseList: [],
|
|
enterpriseList: [],
|
|
|
|
+ enterpriseCode:''
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
this.list(null)
|
|
this.list(null)
|
|
@@ -31,11 +32,33 @@ Page({
|
|
this.list(obj)
|
|
this.list(obj)
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ bindViewSearchCode(){
|
|
|
|
+ let that=this
|
|
|
|
+ wx.scanCode({
|
|
|
|
+ onlyFromCamera: true,
|
|
|
|
+ success: (res) => {
|
|
|
|
+ that.setData({
|
|
|
|
+ //['details.code']:res.result,
|
|
|
|
+ enterpriseCode:res.result
|
|
|
|
+ })
|
|
|
|
+ var obj = new Object()
|
|
|
|
+ obj.enterpriseCode = that.data.enterpriseCode
|
|
|
|
+ that.list(obj)
|
|
|
|
+ },
|
|
|
|
+ fail: (res) => {
|
|
|
|
+ // wx.showToast({
|
|
|
|
+ // title: '扫描失败请重试',
|
|
|
|
+ // icon:'none'
|
|
|
|
+ // })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
list(data) {
|
|
list(data) {
|
|
http.post("/system/AppEnterpriseController/getInitEnterpriseList", data, this.getQiyeEnterpriseListSuccess)
|
|
http.post("/system/AppEnterpriseController/getInitEnterpriseList", data, this.getQiyeEnterpriseListSuccess)
|
|
},
|
|
},
|
|
|
|
|
|
getQiyeEnterpriseListSuccess(res) {
|
|
getQiyeEnterpriseListSuccess(res) {
|
|
|
|
+ console.log("@@@",res)
|
|
this.setData({
|
|
this.setData({
|
|
enterpriseList: res.rows
|
|
enterpriseList: res.rows
|
|
})
|
|
})
|