diff --git a/pages/company/company/index.js b/pages/company/company/index.js index 45f18f2..a84fc97 100644 --- a/pages/company/company/index.js +++ b/pages/company/company/index.js @@ -7,7 +7,8 @@ Page({ * 页面的初始数据 */ data: { - storeInfo: {} + storeInfo: {}, + infoList:[] }, /** @@ -23,20 +24,21 @@ Page({ onReady () { }, - goDetail(){ + goDetail(e){ console.log("0000") wx.navigateTo({ - url: '../companyDetail/index', + url: '../companyDetail/index?id='+e.mark.id, }) }, - goMap () { - console.log("123") + goMap (e) { + console.log(e.mark.address) let that = this + var detail = e.mark.address; wx.openLocation({ - latitude: Number(that.data.storeInfo.lat), - longitude: Number(that.data.storeInfo.lng), - name: that.data.storeInfo.fullName, - address: that.data.storeInfo.address, + latitude: Number(detail.lat), + longitude: Number(detail.lng), + name: detail.storeName, + address: detail.address, scale: 18 }) }, @@ -52,19 +54,19 @@ Page({ getInfo () { let that = this wx.request({ - url: app.globalData.ip + "/yicai/agency/store/list", + url: app.globalData.ip + "/yishoudan/agency/store/list", data: { pageSize: 100, pageNum: 1, keys: "",agencyId:2743}, header: app.globalData.headers, method: "post", success: function (res) { console.log(res); if (res.data.status == 200) { - res.data.data.pageBean.recordList.forEach(item => { - item['pubTime'] = dateUtil.timeShow(item.publishTime); + res.data.data.recordList.forEach(item => { + // item['pubTime'] = dateUtil.timeShow(item.publishTime); console.log(item); }); that.setData({ - infoList: res.data.data.pageBean.recordList, + infoList: res.data.data.recordList, }); } }, @@ -73,9 +75,9 @@ Page({ /** * 拨打电话 */ - makePhoneCall () { + makePhoneCall (e) { var that = this; - if (!that.data.storeInfo.contactTel) { + if (!e.mark.tel) { wx.showToast({ title: '暂无联系方式', icon: 'none' @@ -83,7 +85,7 @@ Page({ return } wx.makePhoneCall({ - phoneNumber: that.data.storeInfo.contactTel, + phoneNumber: e.mark.tel, }); }, /** diff --git a/pages/company/company/index.wxml b/pages/company/company/index.wxml index a1d699c..cdc38f5 100644 --- a/pages/company/company/index.wxml +++ b/pages/company/company/index.wxml @@ -1,74 +1,28 @@ - + - {{storeInfo.fullName || '-'}} - - - - 营业时间:8:00 - 23:00 - - - {{storeInfo.address || '-'}} - - - - - - - - - - - - - - - - {{storeInfo.fullName || '-'}} + {{item.storeName || '-'}} - - - 营业时间:8:00 - 23:00 - - - {{storeInfo.address || '-'}} - - - - + - - - - - {{storeInfo.fullName || '-'}} - - - - 营业时间:8:00 - 23:00 - {{storeInfo.address || '-'}} - - - - - + {{item.address || '-'}} + + - - - 搜索 + 搜索 diff --git a/pages/index/index.js b/pages/index/index.js index 7df56f0..6056534 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -554,24 +554,24 @@ Page({ this.getJobList(); }, onShareAppMessage: function () { - var path = commonUtil.getCurrentPageUrlWithArgs(); - if (app.globalData.isLogin && app.globalData.agencyStatus - 0 != 0) { - //当前用户是代理人 - path += (path.indexOf("?") >= 0 ? "&" : "?") + "agencyUserId=" + app.globalData.loginUserInfo.id; - } - console.log(path); - let img; + // var path = commonUtil.getCurrentPageUrlWithArgs(); + // if (app.globalData.isLogin && app.globalData.agencyStatus - 0 != 0) { + // //当前用户是代理人 + // path += (path.indexOf("?") >= 0 ? "&" : "?") + "agencyUserId=" + app.globalData.loginUserInfo.id; + // } + // console.log(path); + // let img; - this.data.templateList.forEach((element) => { - if (element.title == "职位云小程序首页卡片分享封面") { - img = element.img + "?" + new Date().getTime(); - } - }); - return { - title: " ", - path: path, - imageUrl: img, - }; + // this.data.templateList.forEach((element) => { + // if (element.title == "职位云小程序首页卡片分享封面") { + // img = element.img + "?" + new Date().getTime(); + // } + // }); + // return { + // title: " ", + // path: path, + // imageUrl: img, + // }; }, goSearch () { if (!this.data.isLogin) { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 27d5805..b37aa16 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -33,7 +33,7 @@ - 搜索 + 搜索