| @@ -12,7 +12,7 @@ | |||||
| "pages/joinFrDpell/index", | "pages/joinFrDpell/index", | ||||
| "pages/spellDetail/index", | "pages/spellDetail/index", | ||||
| "pages/radetail/success/index", | "pages/radetail/success/index", | ||||
| "pages/spellTimeout/index", | |||||
| "pages/spellTimeout/index", | |||||
| "pages/spellGroup/mySpellGroup/index", | "pages/spellGroup/mySpellGroup/index", | ||||
| "pages/spellGroup/spellGroup", | "pages/spellGroup/spellGroup", | ||||
| "pages/complete/index", | "pages/complete/index", | ||||
| @@ -60,7 +60,8 @@ | |||||
| "pages/externallinks/index", | "pages/externallinks/index", | ||||
| "pages/czdetail/czdetail", | "pages/czdetail/czdetail", | ||||
| "pages/spellGroup/paySpellGroup/index", | "pages/spellGroup/paySpellGroup/index", | ||||
| "pages/integralmall/index" | |||||
| "pages/integralmall/index", | |||||
| "pages/mallInfo/mallInfo" | |||||
| ], | ], | ||||
| "navigateToMiniProgramAppIdList": [ | "navigateToMiniProgramAppIdList": [ | ||||
| "wx192b7d2e8dcbefd0", | "wx192b7d2e8dcbefd0", | ||||
| @@ -310,7 +310,9 @@ var config = { | |||||
| //获取未支付的订单 | //获取未支付的订单 | ||||
| getUnPaidOrder: "/order/getUnPaidOrder", | getUnPaidOrder: "/order/getUnPaidOrder", | ||||
| getCouponOrderByPassword:'/couponPassword/getCouponOrderByPassword', | getCouponOrderByPassword:'/couponPassword/getCouponOrderByPassword', | ||||
| getbuildingfloorlist:'/wxMallBuilding/getbuildingfloorlist' | |||||
| getbuildingfloorlist:'/wxMallBuilding/getbuildingfloorlist', | |||||
| //商场信息接口 | |||||
| getMallInfo: "/mall/mallInfo" | |||||
| }, | }, | ||||
| weapp: { | weapp: { | ||||
| AppId: weappId | AppId: weappId | ||||
| @@ -68,6 +68,14 @@ Page({ | |||||
| url: '/pages/czdetail/czdetail', | url: '/pages/czdetail/czdetail', | ||||
| }) | }) | ||||
| }, | }, | ||||
| /** | |||||
| * 跳转到商场信息的页面 | |||||
| */ | |||||
| gomallInfo: function () { | |||||
| wx.navigateTo({ | |||||
| url: '/pages/mallInfo/mallInfo', | |||||
| }) | |||||
| }, | |||||
| showVersion: function() { | showVersion: function() { | ||||
| /** | /** | ||||
| * 长按显示版本号 | * 长按显示版本号 | ||||
| @@ -146,4 +146,9 @@ | |||||
| <view class='of' wx:if="{{canIUse}}"> | <view class='of' wx:if="{{canIUse}}"> | ||||
| <official-account class="gzh"></official-account> | <official-account class="gzh"></official-account> | ||||
| </view> | </view> | ||||
| <view class='of1' bindtap='gomallInfo'> | |||||
| <image class='img'></image> | |||||
| <view>富茂链客好大一广场</view> | |||||
| <view>></view> | |||||
| </view> | |||||
| </view> | </view> | ||||
| @@ -1,5 +1,6 @@ | |||||
| page{ | page{ | ||||
| overflow-y:visible!important; | |||||
| /* overflow-y:visible!important; */ | |||||
| overflow: auto; | |||||
| height: 100%!important; | height: 100%!important; | ||||
| background: #f6f6f6; | background: #f6f6f6; | ||||
| } | } | ||||
| @@ -220,7 +221,20 @@ page{ | |||||
| overflow: hidden; | overflow: hidden; | ||||
| box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15); | box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15); | ||||
| } | } | ||||
| .of1{ | |||||
| width: 90%; | |||||
| margin: auto; | |||||
| height: 160rpx; | |||||
| background: #fff; | |||||
| border-radius: 16rpx; | |||||
| overflow: hidden; | |||||
| box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15); | |||||
| display: flex; | |||||
| } | |||||
| .of1 .img{ | |||||
| width:100rpx; | |||||
| height: 100rpx; | |||||
| } | |||||
| .activeimg { | .activeimg { | ||||
| width: 200rpx !important; | width: 200rpx !important; | ||||
| position: absolute; | position: absolute; | ||||
| @@ -41,6 +41,10 @@ | |||||
| <image src='{{nodata}}'></image> | <image src='{{nodata}}'></image> | ||||
| <view class='no-data-text'>暂无数据</view> | <view class='no-data-text'>暂无数据</view> | ||||
| </view> | </view> | ||||
| <view class='sort'> | |||||
| <view>我可换购</view> | |||||
| <view>所需积分</view> | |||||
| </view> | |||||
| <view class='content' wx:if='{{lists.length>0}}'> | <view class='content' wx:if='{{lists.length>0}}'> | ||||
| <view class='sepll-list' wx:for="{{lists}}" wx:key="{{index}}" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'> | <view class='sepll-list' wx:for="{{lists}}" wx:key="{{index}}" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'> | ||||
| <view class='spell-left'> | <view class='spell-left'> | ||||
| @@ -1,9 +1,8 @@ | |||||
| /* pages/spellGroup/spellGroup.wxss */ | /* pages/spellGroup/spellGroup.wxss */ | ||||
| .topbg { | .topbg { | ||||
| margin-bottom: 30rpx; | |||||
| /* margin-bottom: 20rpx; */ | |||||
| width:100%; | width:100%; | ||||
| /* padding: 0 3%; */ | |||||
| height:234rpx; | height:234rpx; | ||||
| background:linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%); | background:linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%); | ||||
| } | } | ||||
| @@ -466,4 +465,22 @@ button::after{ border: none; } | |||||
| } | } | ||||
| .remainInventory{ | .remainInventory{ | ||||
| background: #ccc; | background: #ccc; | ||||
| } | |||||
| .sort{ | |||||
| width:100%; | |||||
| height:90rpx; | |||||
| background:#fff; | |||||
| margin:0 auto 20rpx; | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| align-items: center; | |||||
| } | |||||
| .sort view{ | |||||
| height:60rpx; | |||||
| width: 180rpx; | |||||
| line-height: 60rpx; | |||||
| color: #3C3C3C; | |||||
| font-size: 28rpx; | |||||
| text-align: center; | |||||
| /* border-radius: 20rpx; */ | |||||
| } | } | ||||
| @@ -0,0 +1,62 @@ | |||||
| // pages/mallInfo.js | |||||
| const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'; | |||||
| var config = require("../../config/config.js"); | |||||
| var app = getApp(); | |||||
| const Http = require("../../utils/HttpBasics"); | |||||
| const imgurl = require("../../utils/imgurl"); | |||||
| const util = require("../../utils/util"); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| navigationBarHeight, | |||||
| weekName:[], | |||||
| times:[], | |||||
| dateArr:[ | |||||
| { name: "星期一", value: "0" }, | |||||
| { name: "星期二", value: "1" }, | |||||
| { name: "星期三", value: "2" }, | |||||
| { name: "星期四", value: "3" }, | |||||
| { name: "星期五", value: "4" }, | |||||
| { name: "星期六", value: "5" }, | |||||
| { name: "星期天", value: "6" } | |||||
| ], | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| let that = this; | |||||
| console.log("渲染开始") | |||||
| Http.get({ | |||||
| 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.fmtDate(item.time[0]), util.fmtDate(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, | |||||
| parkingSpace: res.data.parkingSpace, | |||||
| businessHoursH: businessHours, | |||||
| }) | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showModal({ | |||||
| title: '提示', | |||||
| content: err.message, | |||||
| showCancel: false | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| }) | |||||
| @@ -0,0 +1,8 @@ | |||||
| { | |||||
| "navigationBarTitleText": "我的特权", | |||||
| "navigationBarBackgroundColor": "#FD832D", | |||||
| "navigationBarTextStyle": "white", | |||||
| "usingComponents": { | |||||
| "navbar": "../../components/navbar/navbar" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,28 @@ | |||||
| <!--pages/mallInfo.wxml--> | |||||
| <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | |||||
| <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> | |||||
| </view> | |||||
| <view class='info'> | |||||
| <view class='title'>{{name}}</view> | |||||
| <text class='introduction'>{{introduction}}</text> | |||||
| <view class='time'> | |||||
| <text>营业时间 :</text> | |||||
| <view class='' wx:for="{{businessHoursH}}" wx:key="index" > | |||||
| <text>{{item.time}}({{item.weekName}})</text> | |||||
| <!-- <text>{{item.times}}</text> --> | |||||
| </view> | |||||
| </view> | |||||
| <view class='park'> | |||||
| <text>停车位 :</text> | |||||
| <text>{{parkingSpace}}</text> | |||||
| </view> | |||||
| <view class='phone'> | |||||
| <text>热线电话 :</text> | |||||
| <text>{{servicePhone}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| @@ -0,0 +1,94 @@ | |||||
| /* pages/mallInfo.wxss */ | |||||
| @import "../../app.wxss"; | |||||
| page{ | |||||
| background:linear-gradient(180deg,#FD832D 0%,#FE4A16 100%); | |||||
| } | |||||
| .codeBox{ | |||||
| background:linear-gradient(180deg,#FD832D 0%,#FE4A16 100%); | |||||
| height: 100%; | |||||
| overflow: auto; | |||||
| } | |||||
| .none { | |||||
| font-size: 24rpx; | |||||
| text-align: center; | |||||
| margin-top: 38rpx; | |||||
| color: #FFFFFF; | |||||
| float: none !important; | |||||
| } | |||||
| .fl { | |||||
| float: left; | |||||
| } | |||||
| .fr { | |||||
| float: right; | |||||
| } | |||||
| .goback { | |||||
| position: fixed; | |||||
| right: 50rpx; | |||||
| bottom: 60rpx; | |||||
| width: 100rpx !important; | |||||
| height: 100rpx; | |||||
| z-index: 100; | |||||
| background: rgba(255, 255, 255, 1); | |||||
| line-height: 95rpx; | |||||
| border: 1rpx solid rgba(227, 227, 227, 1); | |||||
| border-radius: 50%; | |||||
| } | |||||
| .goback image { | |||||
| position: absolute; | |||||
| width: 60rpx; | |||||
| left: 0; | |||||
| right: 0; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| } | |||||
| .code { | |||||
| width: 690rpx; | |||||
| background: #fff; | |||||
| margin: 20rpx auto; | |||||
| border-radius: 10rpx; | |||||
| padding-top: 20rpx; | |||||
| padding-bottom: 20rpx; | |||||
| } | |||||
| .code image{ | |||||
| display:block; | |||||
| margin: auto ; | |||||
| } | |||||
| .info{ | |||||
| width: 650rpx; | |||||
| background: #fff; | |||||
| margin: 20rpx auto; | |||||
| border-radius: 10rpx; | |||||
| padding: 20rpx; | |||||
| } | |||||
| .title{ | |||||
| margin: 20rpx 0; | |||||
| text-align: center; | |||||
| font-size: 50rpx; | |||||
| } | |||||
| .phone,.park,.introduction{ | |||||
| font-size: 30rpx; | |||||
| line-height:40rpx; | |||||
| margin: 20rpx 0; | |||||
| } | |||||
| .time{ | |||||
| margin: 20rpx 0; | |||||
| font-size: 30rpx; | |||||
| display: flex; | |||||
| } | |||||
| .times{ | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| margin-left: 10rpx; | |||||
| } | |||||
| .times text{ | |||||
| line-height: 40rpx; | |||||
| } | |||||
| .park > text:nth-child(2) ,.phone > text:nth-child(2){ | |||||
| margin-left: 10rpx; | |||||
| } | |||||
| @@ -4,6 +4,32 @@ var qrcode = require("./qrcode"); | |||||
| const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | ||||
| let imgProxy = extConfig.attr.imgProxy; | let imgProxy = extConfig.attr.imgProxy; | ||||
| function convertUTCTimeToLocalTime(UTCDateString) { | |||||
| if (!UTCDateString) { | |||||
| return '-'; | |||||
| } | |||||
| function formatFunc(str) { //格式化显示 | |||||
| return str > 9 ? str : '0' + str | |||||
| } | |||||
| var date2 = new Date(UTCDateString); //这步是关键 | |||||
| var year = date2.getFullYear(); | |||||
| var mon = formatFunc(date2.getMonth() + 1); | |||||
| var day = formatFunc(date2.getDate()); | |||||
| var hour = date2.getHours(); | |||||
| var noon = hour >= 12 ? 'PM' : 'AM'; | |||||
| hour = hour >= 12 ? hour - 12 : hour; | |||||
| hour = formatFunc(hour); | |||||
| var min = formatFunc(date2.getMinutes()); | |||||
| var dateStr = year + '-' + mon + '-' + day + ' ' + noon + ' ' + hour + ':' + min; | |||||
| return dateStr; | |||||
| } | |||||
| function fmtDate(date) { | |||||
| var dateee = new Date(date).toJSON(); | |||||
| return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''); | |||||
| } | |||||
| const formatTime = (date, fmt) => { | const formatTime = (date, fmt) => { | ||||
| try { | try { | ||||
| if (!date) { | if (!date) { | ||||