diff --git a/app.js b/app.js index b456c18..add468e 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,6 @@ //app.js App({ onLaunch: function () { - }, }) \ No newline at end of file diff --git a/app.json b/app.json index a8b0d3f..1e9580f 100644 --- a/app.json +++ b/app.json @@ -3,9 +3,7 @@ "pages/index/index", "pages/news/news", "pages/news/news-details", - "pages/introduction/introduction", "pages/product/product", - "pages/video/video", "pages/contact/contact" ], "window": { diff --git a/app.wxss b/app.wxss index 8de898f..808848a 100644 --- a/app.wxss +++ b/app.wxss @@ -313,4 +313,7 @@ page{ } .contact { padding: 40rpx 40rpx 40rpx 40rpx; +} +image { + height: auto; } \ No newline at end of file diff --git a/pages/contact/contact.js b/pages/contact/contact.js index abded6b..c548532 100644 --- a/pages/contact/contact.js +++ b/pages/contact/contact.js @@ -1,13 +1,47 @@ +var CONFIG = require('../../utils/config.js') +var WxParse = require('../../utils/wxParse/wxParse.js'); + Page({ data: { - title: '联系我们', - latitude: 31.838403, - longitude: 120.528958, - scale: 16, - markers: [{ - latitude: 31.838403, - longitude: 120.528958, - name: '华东国际大厦5F' - }] + }, + onLoad: function () { + var that = this; + wx.request({ + url: CONFIG.API_URL.GET_PAGE + '36', + method: 'GET', + data: {}, + header: { + 'Accept': 'application/json' + }, + success: function(res) { + console.log(res); + + if (res.statusCode == 200 && res.data.status == 'ok') { + var data = res.data; + + that.setData({page: data.page}); + WxParse.wxParse('content', 'html', data.page.content, that, 25) + } else { + + } + } + }) + }, + onReady:function(){ + // 页面渲染完成 + }, + onShow:function(){ + // 页面显示 + }, + onHide:function(){ + // 页面隐藏 + }, + onUnload:function(){ + // 页面关闭 + }, + go: function(event) { + wx.navigateTo({ + url: '/pages/news/news-details?id=' + event.currentTarget.dataset.type + }) } }) diff --git a/pages/contact/contact.wxml b/pages/contact/contact.wxml index 83e39e9..a3cd335 100644 --- a/pages/contact/contact.wxml +++ b/pages/contact/contact.wxml @@ -1,21 +1,10 @@ + - - - - - - 股票:838280 - 电话:0512-58161723 - 传真:0512-58161711 - 地址:江苏省苏州市张家港市滨河路2号 - 华东国际大厦5F - - + + + - + +