| @@ -11,6 +11,7 @@ Page({ | |||||
| * 页面的初始数据 | * 页面的初始数据 | ||||
| */ | */ | ||||
| data: { | data: { | ||||
| aboutShow:false, | |||||
| navigationBarHeight, | navigationBarHeight, | ||||
| ifStoreApp:ifStoreApp, | ifStoreApp:ifStoreApp, | ||||
| aboutUs: imgurl.aboutUs.url, | aboutUs: imgurl.aboutUs.url, | ||||
| @@ -228,6 +229,23 @@ Page({ | |||||
| }) | }) | ||||
| //暂时注释 | //暂时注释 | ||||
| // that.getrun(); | // that.getrun(); | ||||
| //查询关于我们 | |||||
| Http.get({ | |||||
| url: config.api.getMallInfo, | |||||
| data: {} | |||||
| }).then(res => { | |||||
| console.log(res) | |||||
| if (res && res.data.businessHours) { | |||||
| that.setData({ | |||||
| aboutShow: true | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(err => { | |||||
| }) | |||||
| }, | }, | ||||
| //适配不同屏幕大小的canvas | //适配不同屏幕大小的canvas | ||||
| setCanvasSize: function() { | setCanvasSize: function() { | ||||
| @@ -246,5 +264,6 @@ Page({ | |||||
| console.log("获取设备信息失败" + e); | console.log("获取设备信息失败" + e); | ||||
| } | } | ||||
| return size; | return size; | ||||
| } | |||||
| }, | |||||
| }); | }); | ||||
| @@ -1,7 +1,7 @@ | |||||
| <navbar text="我的" background='#FD832D' color="white"></navbar> | <navbar text="我的" background='#FD832D' color="white"></navbar> | ||||
| <view class="user" style="padding-top:{{navigationBarHeight}};"> | <view class="user" style="padding-top:{{navigationBarHeight}};"> | ||||
| <view class="top" style='background:{{banneColor}}'> | <view class="top" style='background:{{banneColor}}'> | ||||
| <view class='aboutUs' bindtap='gomallInfo'> | |||||
| <view class='aboutUs' bindtap='gomallInfo' wx:if="{{aboutShow}}"> | |||||
| <image class='aboutIcons' src="{{aboutUs}}" mode='widthFix'></image> | <image class='aboutIcons' src="{{aboutUs}}" mode='widthFix'></image> | ||||
| <text>关于我们</text> | <text>关于我们</text> | ||||
| </view> | </view> | ||||
| @@ -423,7 +423,8 @@ page{ | |||||
| line-height: 40rpx; | line-height: 40rpx; | ||||
| } | } | ||||
| .aboutUs text { | .aboutUs text { | ||||
| line-height: 60rpx; | |||||
| margin-left: 10rpx; | |||||
| line-height: 55rpx; | |||||
| font-size: 28rpx; | font-size: 28rpx; | ||||
| color: #888; | color: #888; | ||||
| } | } | ||||
| @@ -34,22 +34,22 @@ Page({ | |||||
| url: config.api.getMallInfo, | url: config.api.getMallInfo, | ||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| console.log(res) | |||||
| let businessHours = JSON.parse(res.data.businessHours) | |||||
| businessHours.map((item,index)=>{ | |||||
| item.weekName = [that.data.dateArr.filter(e => e.value == item.week[0])[0].name ,that.data.dateArr.filter(e => e.value == item.week[1])[0].name], | |||||
| item.time = [util.convertUTCTimeToLocalTime(item.time[0]), util.convertUTCTimeToLocalTime(item.time[1])] | |||||
| console.log(item.time) | |||||
| }) | |||||
| console.log(businessHours,222) | |||||
| that.setData({ | |||||
| name: res.data.name, | |||||
| servicePhone: res.data.servicePhone, | |||||
| img: res.data.img, | |||||
| introduction: res.data.introduction, | |||||
| park_place_number: res.data.park_place_number, | |||||
| businessHoursH: businessHours, | |||||
| }) | |||||
| if (res.data.businessHours){ | |||||
| let businessHours = JSON.parse(res.data.businessHours) | |||||
| businessHours.map((item, index) => { | |||||
| item.weekName = [that.data.dateArr.filter(e => e.value == item.week[0])[0].name, that.data.dateArr.filter(e => e.value == item.week[1])[0].name].toString().replace(/\,/g, ' -- '), | |||||
| item.time = [util.convertUTCTimeToLocalTime(item.time[0]), util.convertUTCTimeToLocalTime(item.time[1])].toString().replace(/\,/g, ' -') | |||||
| }) | |||||
| console.log(businessHours, 222) | |||||
| that.setData({ | |||||
| name: res.data.name, | |||||
| servicePhone: res.data.servicePhone, | |||||
| img: res.data.img, | |||||
| introduction: res.data.introduction, | |||||
| parkPlaceNumber: res.data.parkPlaceNumber, | |||||
| businessHoursH: businessHours, | |||||
| }) | |||||
| } | |||||
| }) | }) | ||||
| .catch(err => { | .catch(err => { | ||||
| wx.showModal({ | wx.showModal({ | ||||
| @@ -1,6 +1,6 @@ | |||||
| <!--pages/mallInfo.wxml--> | <!--pages/mallInfo.wxml--> | ||||
| <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | ||||
| <navbar back home text="我的特权" background='#FD832D' color="#fff"></navbar> | |||||
| <navbar back home text="关于我们" background='#FD832D' color="#fff"></navbar> | |||||
| <view style="margin-top:{{navigationBarHeight}}!important;" class='codeBox'> | <view style="margin-top:{{navigationBarHeight}}!important;" class='codeBox'> | ||||
| <view class='code' > | <view class='code' > | ||||
| <image class='icons' src="{{img}}" mode='widthFix'></image> | <image class='icons' src="{{img}}" mode='widthFix'></image> | ||||
| @@ -12,13 +12,13 @@ | |||||
| <text>营业时间 :</text> | <text>营业时间 :</text> | ||||
| <view class='timesBox'> | <view class='timesBox'> | ||||
| <view class='times' wx:for="{{businessHoursH}}" wx:key="index" > | <view class='times' wx:for="{{businessHoursH}}" wx:key="index" > | ||||
| <text>{{item.time}}({{item.weekName}})</text> | |||||
| <text>{{item.time}}</text><text style='margin-left:10rpx;'>({{item.weekName}})</text> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class='park'> | |||||
| <view class='park' wx:if="{{parkPlaceNumber>0}}"> | |||||
| <text>停车位 :</text> | <text>停车位 :</text> | ||||
| <text>{{park_place_number}}</text> | |||||
| <text>{{parkPlaceNumber}}</text> | |||||
| </view> | </view> | ||||
| <view class='phone'> | <view class='phone'> | ||||
| <text>热线电话 :</text> | <text>热线电话 :</text> | ||||
| @@ -718,8 +718,7 @@ module.exports = { | |||||
| 'name': '' | 'name': '' | ||||
| }, | }, | ||||
| "aboutUs":{ | "aboutUs":{ | ||||
| 'url': baseUrl + "aboutUs1.png", | |||||
| 'url': baseUrl + "we.png", | |||||
| 'name': '' | 'name': '' | ||||
| } | |||||
| }, | |||||
| } | } | ||||