diff --git a/app.js b/app.js index 0ef7245..de9ee78 100644 --- a/app.js +++ b/app.js @@ -42,6 +42,10 @@ App({ }) .then(res => { wx.setStorageSync('openId',res.data.openId) + if (res.data.subMalls){ + const squareList = JSON.parse(res.data.subMalls) + wx.setStorageSync("squareList", squareList) + } if (res.data && res.data.score) { if (res.data.score != 0) { that.globalData.score = res.data.score; diff --git a/app.json b/app.json index e4d5450..b3882ca 100644 --- a/app.json +++ b/app.json @@ -1,130 +1,131 @@ { - "pages": [ - "pages/index/index", - "pages/main/index", - "index/index", - "index/searchbar", - "index/passCar", - "index/user", - "pages/searchbar/searchbar", - "pages/integralmall/integraHistory/index", - "pages/integralmall/payIntegcouponStatus/index", - "pages/integralmall/payIntegcoupondetail/index", - "pages/joinFrDpell/index", - "pages/spellDetail/index", - "pages/radetail/success/index", - "pages/spellTimeout/index", - "pages/spellGroup/mySpellGroup/index", - "pages/spellGroup/spellGroup", - "pages/complete/index", - "pages/topicDetail/index", - "pages/acSignIn/index", - "pages/index/merchantList/index", - "pages/index/searchbar/detail/index", - "pages/bargain/bargainDatail/bargainDatail", - "pages/bargain/bargain", - "pages/cardorder/index/index", - "pages/scanPay/scanPay", - "pages/edit/edit", - "pages/radetail/index", - "pages/radetail/joinActivity/edit", - "pages/bannerdetail/index", - "pages/getuserinfo/index", - "pages/phoneinput/phoneinput", - "pages/user/myactivity/index", - "pages/coupon/detail/index", - "pages/rushToBuy/index", - "pages/couponorder/index/index", - "pages/couponorder/detail/index", - "pages/cardorder/detail/index", - "pages/cardorder/userule/userule", - "pages/order/detail/index", - "pages/order/index/index", - "pages/ques/ques", - "pages/getphoneInfo/index", - "pages/addPark/addPark", - "pages/orderquanma/index", - "pages/passCar/couponList/couponList", - "pages/passCar/couponDetail/couponDetail", - "pages/managelicenseplate/managelicenseplate", - "pages/payrule/payrule", - "pages/grade/grade", - "pages/exchange/exchange", - "pages/game/index", - "pages/canvas/index", - "pages/specialcourtesy/specialcourtesy", - "pages/discountCardList/discountCardList", - "pages/cardListDetail/cardListDetail", - "pages/freeBannerDetail/index", - "pages/paySuccess/paySuccess", - "pages/ConsumeDetail/ConsumeDetail", - "pages/externallinks/index", - "pages/czdetail/czdetail", - "pages/spellGroup/paySpellGroup/index", - "pages/integralmall/index", - "pages/mallInfo/mallInfo" - ], - "subpackages": [ - { - "root": "pages2", - "name": "pages2", - "independent": false, - "pages": [ - "live/livelist/index" - ] - } - ], - "navigateToMiniProgramAppIdList": [ - "wx192b7d2e8dcbefd0", - "wxc07f9d67923d676d", - "wxbd08b4baa10fcc1d" - ], - "permission": { - "scope.userLocation": { - "desc": "你的位置信息将用于小程序位置接口的效果展示" - } - }, - "tabBar": { - "custom": true, - "list": [ - { - "pagePath": "index/index", - "iconPath": "assets/images/home.png", - "selectedIconPath": "assets/images/home-a.png", - "text": "首页" - }, - { - "pagePath": "index/searchbar", - "iconPath": "assets/images/mendian.png", - "selectedIconPath": "assets/images/mendian-a.png", - "text": "门店" - }, - { - "pagePath": "index/passCar", - "iconPath": "assets/images/park.png", - "selectedIconPath": "assets/images/park-a.png", - "text": "停车" - }, - { - "pagePath": "index/user", - "iconPath": "assets/images/user.png", - "selectedIconPath": "assets/images/user-a.png", - "text": "我的" - } - ] - }, - "usingComponents": {}, - "window": { - "backgroundTextStyle": "dark", - "navigationBarBackgroundColor": "#FFFFFF", - "navigationBarTitleText": "", - "navigationBarTextStyle": "black", - "navigationStyle": "custom" - }, - "networkTimeout": { - "request": 30000, - "downloadFile": 10000 - }, - "debug": false, - "sitemapLocation": "sitemap.json" + "pages": [ + "pages/index/index", + "pages/main/index", + "index/index", + "index/searchbar", + "index/passCar", + "index/user", + "pages/searchbar/searchbar", + "pages/integralmall/integraHistory/index", + "pages/integralmall/payIntegcouponStatus/index", + "pages/integralmall/payIntegcoupondetail/index", + "pages/joinFrDpell/index", + "pages/spellDetail/index", + "pages/radetail/success/index", + "pages/spellTimeout/index", + "pages/spellGroup/mySpellGroup/index", + "pages/spellGroup/spellGroup", + "pages/complete/index", + "pages/topicDetail/index", + "pages/acSignIn/index", + "pages/index/merchantList/index", + "pages/index/searchbar/detail/index", + "pages/bargain/bargainDatail/bargainDatail", + "pages/bargain/bargain", + "pages/cardorder/index/index", + "pages/scanPay/scanPay", + "pages/edit/edit", + "pages/radetail/index", + "pages/radetail/joinActivity/edit", + "pages/bannerdetail/index", + "pages/getuserinfo/index", + "pages/phoneinput/phoneinput", + "pages/user/myactivity/index", + "pages/coupon/detail/index", + "pages/rushToBuy/index", + "pages/couponorder/index/index", + "pages/couponorder/detail/index", + "pages/cardorder/detail/index", + "pages/cardorder/userule/userule", + "pages/order/detail/index", + "pages/order/index/index", + "pages/ques/ques", + "pages/getphoneInfo/index", + "pages/addPark/addPark", + "pages/orderquanma/index", + "pages/passCar/couponList/couponList", + "pages/passCar/couponDetail/couponDetail", + "pages/managelicenseplate/managelicenseplate", + "pages/payrule/payrule", + "pages/grade/grade", + "pages/exchange/exchange", + "pages/game/index", + "pages/canvas/index", + "pages/specialcourtesy/specialcourtesy", + "pages/discountCardList/discountCardList", + "pages/cardListDetail/cardListDetail", + "pages/freeBannerDetail/index", + "pages/paySuccess/paySuccess", + "pages/ConsumeDetail/ConsumeDetail", + "pages/externallinks/index", + "pages/czdetail/czdetail", + "pages/spellGroup/paySpellGroup/index", + "pages/integralmall/index", + "pages/mallInfo/mallInfo", + "pages/location/location" + ], + "subpackages": [ + { + "root": "pages2", + "name": "pages2", + "independent": false, + "pages": [ + "live/livelist/index" + ] + } + ], + "navigateToMiniProgramAppIdList": [ + "wx192b7d2e8dcbefd0", + "wxc07f9d67923d676d", + "wxbd08b4baa10fcc1d" + ], + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + } + }, + "tabBar": { + "custom": true, + "list": [ + { + "pagePath": "index/index", + "iconPath": "assets/images/home.png", + "selectedIconPath": "assets/images/home-a.png", + "text": "首页" + }, + { + "pagePath": "index/searchbar", + "iconPath": "assets/images/mendian.png", + "selectedIconPath": "assets/images/mendian-a.png", + "text": "门店" + }, + { + "pagePath": "index/passCar", + "iconPath": "assets/images/park.png", + "selectedIconPath": "assets/images/park-a.png", + "text": "停车" + }, + { + "pagePath": "index/user", + "iconPath": "assets/images/user.png", + "selectedIconPath": "assets/images/user-a.png", + "text": "我的" + } + ] + }, + "usingComponents": {}, + "window": { + "backgroundTextStyle": "dark", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTitleText": "", + "navigationBarTextStyle": "black", + "navigationStyle": "custom" + }, + "networkTimeout": { + "request": 30000, + "downloadFile": 10000 + }, + "debug": false, + "sitemapLocation": "sitemap.json" } \ No newline at end of file diff --git a/index/index.js b/index/index.js index e7f4b97..129e1d1 100644 --- a/index/index.js +++ b/index/index.js @@ -81,7 +81,19 @@ Page({ openId: '', showGg: false, ggdata: {}, - liveFlag:0//直播按钮显隐标志位 + liveFlag:0,//直播按钮显隐标志位 + squareName:"",//当前广场 + isShowSqare:false, + }, + //获取当前广场名 + gitSuperiorName(){ + + }, + //跳转到其他广场列表 + goSquareList(){ + wx.navigateTo({ + url: '/pages/location/location', + }) }, goLive(){ wx.navigateTo({ @@ -203,10 +215,25 @@ Page({ url: '/pages/specialcourtesy/specialcourtesy', }) }, + //是否属于集团 + ifShowSqare(){ + if (wx.getStorageSync("squareList")){ + this.setData({ + isShowSqare:true + }) + }else{ + this.setData({ + isShowSqare: false + }) + } + }, + + /** * 生命周期函数--监听页面初次渲染完成 */ onLoad: function(options) { + this.ifShowSqare(); this.getLocation(); let that = this; let optionss; @@ -261,6 +288,9 @@ Page({ } }) }, + onUnload(){ + wx.removeStorageSync('squareList') + }, onShow: function() { if (typeof this.getTabBar === 'function' && this.getTabBar()) { diff --git a/index/index.wxml b/index/index.wxml index cca4d8e..23e0314 100644 --- a/index/index.wxml +++ b/index/index.wxml @@ -1,5 +1,10 @@ + + + + {{"当前广场"}} ↓ + diff --git a/index/index.wxss b/index/index.wxss index ceceed2..33b2fd0 100644 --- a/index/index.wxss +++ b/index/index.wxss @@ -2,6 +2,21 @@ page{ background: #F4F5F9; } +.underlingImg{ + + width: 30rpx; + height: 60rpx; + font-size: 30prx; + float: left; +} +.underlingName{ + float: left; + line-height: 30rpx; +} +.underling{ + font-size: 30rpx; + overflow: hidden; +} .index-position { background: rgba(0, 0, 0, 0.5); height: 88rpx; @@ -52,7 +67,9 @@ page { display: block; width: 100%; } - +.underling{ + margin: 10rpx 30rpx; +} .userinfo{ width:690rpx; height: 96rpx; diff --git a/pages/integralmall/index.wxml b/pages/integralmall/index.wxml index 90190d7..97c0dff 100644 --- a/pages/integralmall/index.wxml +++ b/pages/integralmall/index.wxml @@ -10,7 +10,7 @@ - + squareList {{levelName}} diff --git a/pages/location/location.js b/pages/location/location.js new file mode 100644 index 0000000..bd23879 --- /dev/null +++ b/pages/location/location.js @@ -0,0 +1,86 @@ +// pages/location/location.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + squareList: [], //广场列表 + }, + + /** + * 跳转到其他小程序 + * 接受唯一参数 appId + * */ + goSquare(event) { + let appid = event.currentTarget.dataset.appid + wx.navigateToMiniProgram({ + appId: appid, + success(res) { + // 打开成功 + } + }) + }, + + + + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + const squareList = wx.getStorageSync('squareList') + this.setData({ + squareList : squareList + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function() { + + } +}) \ No newline at end of file diff --git a/pages/location/location.json b/pages/location/location.json new file mode 100644 index 0000000..d82a6ce --- /dev/null +++ b/pages/location/location.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "navbar": "../../../components/navbar/navbar" + } +} \ No newline at end of file diff --git a/pages/location/location.wxml b/pages/location/location.wxml new file mode 100644 index 0000000..d797de3 --- /dev/null +++ b/pages/location/location.wxml @@ -0,0 +1,25 @@ + + + + + + 城市广场 + + + + {{item.name}} + {{item.addr}} + + + + + + + \ No newline at end of file diff --git a/pages/location/location.wxss b/pages/location/location.wxss new file mode 100644 index 0000000..8c232a8 --- /dev/null +++ b/pages/location/location.wxss @@ -0,0 +1,60 @@ +/* pages/location/location.wxss */ +.Boxa{ + width: 90%; + margin: 0 5%; + margin-top: 130rpx; + +} +.presentSiteBox{ + overflow: hidden; + margin-bottom: 70rpx; +} +.presentText{ + font-size: 24rpx; + color: rgb(153, 153, 153); + overflow: hidden +} +.gpsBox{ + margin-top: 54rpx; + overflow: hidden; + margin-bottom: 20rpx; +} +.city{ + font-size: 40rpx; + float: left +} +.gps{ + float: left; + font-size: 24rpx; + line-height: 60rpx; + color: rgb(153, 153, 153); + margin-left: 40rpx; +} +.siteText{ + font-size: 24rpx; + color: rgb(153, 153, 153); + margin-top: 2rpx; +} +.plazaName{ + margin-top: 60rpx; + font-size: 34rpx; +} +.siteBox{ + margin-bottom: 30rpx; + overflow: hidden +} +.site{ + margin-top: 30rpx; + font-size: 24rpx; + color: rgb(153, 153, 153); + float: left; +} +.distance{ + margin-top: 30rpx; + font-size: 24rpx; + color: rgb(153, 153, 153); + float: right +} +.wire{ + border: 2rpx solid rgb(204, 204, 204) +} \ No newline at end of file diff --git a/pages/spellTimeout/index.wxss b/pages/spellTimeout/index.wxss index a0c9a93..ceef3bd 100644 --- a/pages/spellTimeout/index.wxss +++ b/pages/spellTimeout/index.wxss @@ -3,10 +3,15 @@ page { height: auto; overflow: auto; background: #f89132; - background-image: url('https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/spelldetail-bg.png'); + background-image: url('https://formall.oss-accelerate.aliyuncs.com/cimg/spelldetail-bg.png'); background-size: cover; background-repeat: no-repeat; } +.underlingImg{ + white-space: 30rpx; + height: 60rpx; + +} .status{ width: 690rpx; padding:25px 0 0;