瀏覽代碼

[关于我们][修改][显示条件,营业时间显示]

tags/C.10.02
hurui 5 年之前
父節點
當前提交
a0aaae792a
共有 6 個文件被更改,包括 45 次插入26 次删除
  1. +20
    -1
      index/user.js
  2. +1
    -1
      index/user.wxml
  3. +2
    -1
      index/user.wxss
  4. +16
    -16
      pages/mallInfo/mallInfo.js
  5. +4
    -4
      pages/mallInfo/mallInfo.wxml
  6. +2
    -3
      utils/imgurl.js

+ 20
- 1
index/user.js 查看文件

@@ -11,6 +11,7 @@ Page({
* 页面的初始数据
*/
data: {
aboutShow:false,
navigationBarHeight,
ifStoreApp:ifStoreApp,
aboutUs: imgurl.aboutUs.url,
@@ -228,6 +229,23 @@ Page({
})
//暂时注释
// 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
setCanvasSize: function() {
@@ -246,5 +264,6 @@ Page({
console.log("获取设备信息失败" + e);
}
return size;
}
},
});

+ 1
- 1
index/user.wxml 查看文件

@@ -1,7 +1,7 @@
<navbar text="我的" background='#FD832D' color="white"></navbar>
<view class="user" style="padding-top:{{navigationBarHeight}};">
<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>
<text>关于我们</text>
</view>


+ 2
- 1
index/user.wxss 查看文件

@@ -423,7 +423,8 @@ page{
line-height: 40rpx;
}
.aboutUs text {
line-height: 60rpx;
margin-left: 10rpx;
line-height: 55rpx;
font-size: 28rpx;
color: #888;
}

+ 16
- 16
pages/mallInfo/mallInfo.js 查看文件

@@ -34,22 +34,22 @@ Page({
url: config.api.getMallInfo,
})
.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 => {
wx.showModal({


+ 4
- 4
pages/mallInfo/mallInfo.wxml 查看文件

@@ -1,6 +1,6 @@
<!--pages/mallInfo.wxml-->
<!-- <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 class='code' >
<image class='icons' src="{{img}}" mode='widthFix'></image>
@@ -12,13 +12,13 @@
<text>营业时间 :</text>
<view class='timesBox'>
<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 class='park'>
<view class='park' wx:if="{{parkPlaceNumber>0}}">
<text>停车位 :</text>
<text>{{park_place_number}}</text>
<text>{{parkPlaceNumber}}</text>
</view>
<view class='phone'>
<text>热线电话 :</text>


+ 2
- 3
utils/imgurl.js 查看文件

@@ -718,8 +718,7 @@ module.exports = {
'name': ''
},
"aboutUs":{
'url': baseUrl + "aboutUs1.png",
'url': baseUrl + "we.png",
'name': ''
}
},
}

Loading…
取消
儲存