diff --git a/app.json b/app.json
index ec7732f..d81440b 100644
--- a/app.json
+++ b/app.json
@@ -12,7 +12,7 @@
"pages/joinFrDpell/index",
"pages/spellDetail/index",
"pages/radetail/success/index",
- "pages/spellTimeout/index",
+ "pages/spellTimeout/index",
"pages/spellGroup/mySpellGroup/index",
"pages/spellGroup/spellGroup",
"pages/complete/index",
@@ -60,7 +60,8 @@
"pages/externallinks/index",
"pages/czdetail/czdetail",
"pages/spellGroup/paySpellGroup/index",
- "pages/integralmall/index"
+ "pages/integralmall/index",
+ "pages/mallInfo/mallInfo"
],
"navigateToMiniProgramAppIdList": [
"wx192b7d2e8dcbefd0",
diff --git a/config/config.js b/config/config.js
index e87a885..ce1a625 100755
--- a/config/config.js
+++ b/config/config.js
@@ -310,7 +310,9 @@ var config = {
//获取未支付的订单
getUnPaidOrder: "/order/getUnPaidOrder",
getCouponOrderByPassword:'/couponPassword/getCouponOrderByPassword',
- getbuildingfloorlist:'/wxMallBuilding/getbuildingfloorlist'
+ getbuildingfloorlist:'/wxMallBuilding/getbuildingfloorlist',
+ //商场信息接口
+ getMallInfo: "/mall/mallInfo"
},
weapp: {
AppId: weappId
diff --git a/index/user.js b/index/user.js
index 0b5e748..742ce6c 100644
--- a/index/user.js
+++ b/index/user.js
@@ -68,6 +68,14 @@ Page({
url: '/pages/czdetail/czdetail',
})
},
+ /**
+ * 跳转到商场信息的页面
+ */
+ gomallInfo: function () {
+ wx.navigateTo({
+ url: '/pages/mallInfo/mallInfo',
+ })
+ },
showVersion: function() {
/**
* 长按显示版本号
diff --git a/index/user.wxml b/index/user.wxml
index d8865b3..f22cc41 100644
--- a/index/user.wxml
+++ b/index/user.wxml
@@ -146,4 +146,9 @@
+
+
+ 富茂链客好大一广场
+ >
+
\ No newline at end of file
diff --git a/index/user.wxss b/index/user.wxss
index 23d4162..feca8b4 100644
--- a/index/user.wxss
+++ b/index/user.wxss
@@ -1,5 +1,6 @@
page{
- overflow-y:visible!important;
+ /* overflow-y:visible!important; */
+ overflow: auto;
height: 100%!important;
background: #f6f6f6;
}
@@ -220,7 +221,20 @@ page{
overflow: hidden;
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 {
width: 200rpx !important;
position: absolute;
diff --git a/pages/integralmall/index.wxml b/pages/integralmall/index.wxml
index edff4ae..f3af5fe 100644
--- a/pages/integralmall/index.wxml
+++ b/pages/integralmall/index.wxml
@@ -41,6 +41,10 @@
暂无数据
+
+ 我可换购
+ 所需积分
+
diff --git a/pages/integralmall/index.wxss b/pages/integralmall/index.wxss
index 7378149..366e092 100644
--- a/pages/integralmall/index.wxss
+++ b/pages/integralmall/index.wxss
@@ -1,9 +1,8 @@
/* pages/spellGroup/spellGroup.wxss */
.topbg {
- margin-bottom: 30rpx;
+ /* margin-bottom: 20rpx; */
width:100%;
- /* padding: 0 3%; */
height:234rpx;
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{
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; */
}
\ No newline at end of file
diff --git a/pages/mallInfo/mallInfo.js b/pages/mallInfo/mallInfo.js
new file mode 100644
index 0000000..e899564
--- /dev/null
+++ b/pages/mallInfo/mallInfo.js
@@ -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
+ })
+ })
+ },
+
+})
\ No newline at end of file
diff --git a/pages/mallInfo/mallInfo.json b/pages/mallInfo/mallInfo.json
new file mode 100644
index 0000000..801ebb1
--- /dev/null
+++ b/pages/mallInfo/mallInfo.json
@@ -0,0 +1,8 @@
+{
+ "navigationBarTitleText": "我的特权",
+ "navigationBarBackgroundColor": "#FD832D",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {
+ "navbar": "../../components/navbar/navbar"
+ }
+}
\ No newline at end of file
diff --git a/pages/mallInfo/mallInfo.wxml b/pages/mallInfo/mallInfo.wxml
new file mode 100644
index 0000000..5590e19
--- /dev/null
+++ b/pages/mallInfo/mallInfo.wxml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+ {{name}}
+ {{introduction}}
+
+ 营业时间 :
+
+ {{item.time}}({{item.weekName}})
+
+
+
+
+ 停车位 :
+ {{parkingSpace}}
+
+
+ 热线电话 :
+ {{servicePhone}}
+
+
+
+
diff --git a/pages/mallInfo/mallInfo.wxss b/pages/mallInfo/mallInfo.wxss
new file mode 100644
index 0000000..93553ae
--- /dev/null
+++ b/pages/mallInfo/mallInfo.wxss
@@ -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;
+}
diff --git a/utils/util.js b/utils/util.js
index 382de0b..a247da3 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -4,6 +4,32 @@ var qrcode = require("./qrcode");
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
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) => {
try {
if (!date) {