diff --git a/app.js b/app.js index 7b70793..4cae355 100644 --- a/app.js +++ b/app.js @@ -96,12 +96,19 @@ App({ data: usrdata }) .then(res => { + if (res.data.mall){ + that.globalData.marketName = res.data.mall.name ? res.data.mall.name : "" + } + wx.setStorageSync('openId', res.data.openId) - + that.globalData.mouldType = res.data.mouldType ? res.data.mouldType:0 if (res.data.subMalls) { const squareList = JSON.parse(res.data.subMalls) wx.setStorageSync("squareList", squareList) - wx.setStorageSync("selectedMall", res.data.selectedMall) + if (res.data.mall){ + wx.setStorageSync("selectedMall", res.data.mall.tenantId) + } + } if (res.data && res.data.score) { if (res.data.score != 0) { @@ -201,6 +208,7 @@ App({ }) }, globalData: { + mouldType:0,//主题风格模板 styleLsit: {}, previewFlag: false, //解决图片预览调用noshow activityId: '', //活动id方便授权数据回传 @@ -223,6 +231,7 @@ App({ // ETCP token etcpToken: null, carLogin: false, + marketName:"",//商场,名称 // 当前商场信息 market: { name: "" diff --git a/components/banner/index.js b/components/banner/index.js index 1c41daf..dfde683 100644 --- a/components/banner/index.js +++ b/components/banner/index.js @@ -1,5 +1,7 @@ // pages/index/sw/index.js const imgurl = require("../../utils/imgurl"); +const app = getApp() + Component({ /** * 组件的属性列表 @@ -16,7 +18,8 @@ Component({ */ data: { bannerUrl: imgurl.banner.url, - currentIndex: 0 + currentIndex: 0, + mouldType:0, }, /** @@ -76,5 +79,13 @@ Component({ currentIndex: e.detail.current }) }, - } + }, + attached: function () { + // 在组件实例进入页面节点树时执行 + if (app.globalData.mouldType){ + this.setData({ + mouldType: app.globalData.mouldType + }) + } + }, }); diff --git a/components/banner/index.wxml b/components/banner/index.wxml index 6b48405..762c53a 100644 --- a/components/banner/index.wxml +++ b/components/banner/index.wxml @@ -1,4 +1,4 @@ - + @@ -6,4 +6,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/components/banner/index.wxss b/components/banner/index.wxss index 8ad3b5d..4acc63e 100644 --- a/components/banner/index.wxss +++ b/components/banner/index.wxss @@ -1,84 +1,80 @@ -/* .index-slide-view { - position: relative; - width: 750rpx; - height: 258rpx; - overflow: hidden; - margin: 0 auto; +.imageContainer { + width: 100%; + height: 304rpx; } -.index-slide, swiper-item - .index-slide-image { - display: block; - width: 690rpx; - height: 258rpx; - margin: 0 auto; - border-radius: 16rpx; +.itemImg { + position: absolute; + width: 640rpx; + height: 227rpx; + border-radius: 15rpx; overflow: hidden; - position: relative; - + z-index: 5; + opacity: 0.7; + top: 20%; + margin: 0 20rpx; } -.dots { - position: absolute; - left: 0; - right: 0; - bottom: 20rpx; - display: flex; - justify-content: center; +.active { + opacity: 1; + z-index: 10; + width: 640rpx; + height: 270rpx; + top: 11%; + transition: all 0.2s ease-in 0s; } -.dot { - margin: 0 8rpx; - width: 14rpx; - height: 14rpx; - background: #fff; - border-radius: 8rpx; - transition: all 0.6s; +.item { + width: 100%; + height: 304rpx; + overflow: hidden; + border-radius: 16rpx; } -.dot.active { - width: 24rpx; - background: #f80; +.index-slide-view { + margin-top: -30rpx; } - -.bannerbg { - width: 100%; +.index-slide-view1 { + margin-top: -40rpx; } -.bannerbg image { - display: block; - width: 100%; -} */ - -.imageContainer{ +.imageContainer1 { width: 100%; - height: 304rpx; + height: 400rpx; } -.itemImg{ + +.itemImg1 { position: absolute; width: 640rpx; - height: 227rpx; + height: 360rpx; border-radius: 15rpx; overflow: hidden; z-index: 5; opacity: 0.7; - top: 20%; + top: 12%; margin: 0 20rpx; } -.active{ + +.active1_a { opacity: 1; z-index: 10; width: 640rpx; - height: 270rpx; top: 11%; - transition:all .2s ease-in 0s; + transition: all 0.2s ease-in 0s; +} + +.active1 { + opacity: 1; + z-index: 10; + width: 640rpx; + height: 310rpx; + top: 17%; + transition: all 0.2s ease-in 0s; } -.item{ + +.item1 { width: 100%; - height: 304rpx; + height: 360rpx; overflow: hidden; border-radius: 16rpx; } -.index-slide-view{ - margin-top: -30rpx; -} \ No newline at end of file diff --git a/components/commodityMould/commodityMould.js b/components/commodityMould/commodityMould.js new file mode 100644 index 0000000..ff72597 --- /dev/null +++ b/components/commodityMould/commodityMould.js @@ -0,0 +1,133 @@ +const util = require("../../utils/util"); +Component({ + /** + * 组件的属性列表 util.toHHmmss(res.data.endTime,); + */ + properties: { + special:{ + type: Boolean, + value: false + }, + titleImgUrl:{ + type:String, + value:"", + }, + isShowCount:{ + type: Boolean, + value: false + }, + obj:{ + type:Object, + value:{} + } + }, + + /** + * 组件的初始数据 + */ + data: { + setIntervalLsit:[] + }, + + attached: function () { + let this_ =this + let arr = [] + let tempLsit = [] + // 处理首页定时 + if (this_.properties.obj.couponList!=null&&this_.properties.obj.couponList.length>0){ + //限时抢购 倒计时 + this_.properties.obj.couponList.map((item,index)=>{//初次渲染 + if (item.targetAd==2){ + let tempObj = {} + let beginTime = item.beginTime;//开始时间 + let endTime = item.endTime;//结束时间 + let present = new Date().getTime()//当前时间 + let textTime = item.beginTime >= present?"距开始":"距结束" + tempObj={ + value: item.beginTime >= present ? beginTime - present : endTime - present, + valueText: item.beginTime >= present ? util.toHHmmss(beginTime - present) : util.toHHmmss(endTime - present), + // vaFlag: tempObj.value<=0?true:false,//活动是否结束 + index:index, + interval:"" , + beginTime: beginTime,//开始时间 + endTime: endTime,//开始时间 + textTime: textTime + } + arr.push(tempObj) + this_.setData({ + setIntervalLsit: arr + }) + } + }) + } + tempLsit =this_.data.setIntervalLsit + tempLsit.map((item,index)=>{//再次渲染 + + item.interval = setInterval(function(){ + let present = new Date().getTime()//当前时间 + if(item.value<=1){ + + clearInterval(item.interval) + item.vaFlag = true,//活动是否结束 + console.log(item.value, "活动已经结束") + }else{ + + + let tempTime = item.beginTime >= present ? item.beginTime - present : item.endTime - present + // console.log(tempTime, "presents") + item.value = tempTime, + item.valueText = util.toHHmmss(tempTime - 1000) + item.textTime = item.beginTime >= present ? "距开始" : "距结束", + item.vaFlag= item.value <= 0 ? true : false,//活动是否结束 + this_.setData({ + setIntervalLsit: tempLsit + }) + + } + },1000) + }) + // 处理首页定时 + }, + detached: function () { + this.data.setIntervalLsit.map(item=>{ + clearInterval(item.interval) + }) + console.log("88888") + // 在组件实例被从页面节点树移除时执行 ; + }, + + /** + * 组件的方法列表 + */ + methods: { + lookAll(){ + wx.navigateTo({ + url: `/${this.properties.obj.weappPath}`, + }) + }, + goDetail(e){ + console.log(e.currentTarget.dataset) + let couponChannelId = e.currentTarget.dataset.id + let couponId = e.currentTarget.dataset.couponid + let type = e.currentTarget.dataset.type + if (type==9){ + wx.navigateTo({ + url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, + }) + }else{ + wx.navigateTo({ + url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, + }) + } + + + }, + gotoTopic(e) { + + let id = e.currentTarget.dataset.id + wx.navigateTo({ + url: `/pages/topicDetail/index?id=${id}` + }) + }, + } +}) diff --git a/components/commodityMould/commodityMould.json b/components/commodityMould/commodityMould.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/commodityMould/commodityMould.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/commodityMould/commodityMould.wxml b/components/commodityMould/commodityMould.wxml new file mode 100644 index 0000000..4baa51c --- /dev/null +++ b/components/commodityMould/commodityMould.wxml @@ -0,0 +1,62 @@ + + + + + + + + + + + + {{obj.name}} + 查看更多优惠活动 + + + + + + + + +
+ + + + + + + + + {{item.title}} + + + + {{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}} + {{item.salePriceStrH?'.'+item.salePriceStrH:''}} + + {{item.creditPrice}} + 积分 + + + ¥{{item.priceStr}} + + + + {{setIntervalLsit[index].textTime}} + {{setIntervalLsit[index].vaFlag?'活动已结束':setIntervalLsit[index].valueText}} + + + + + + + 查看更多优惠活动 + +
+
+
+ +
\ No newline at end of file diff --git a/components/commodityMould/commodityMould.wxss b/components/commodityMould/commodityMould.wxss new file mode 100644 index 0000000..779e06f --- /dev/null +++ b/components/commodityMould/commodityMould.wxss @@ -0,0 +1,223 @@ +.commBox{ + width: 96%; + margin: 27rpx auto; + background-color: #fff; + border-radius: 20rpx; + overflow: hidden; +} +.titleBox{ + width: 100%; + overflow: hidden; + height: 140rpx; + background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_d9qt.png"); + background-size: 100% 100%; + background-repeat: no-repeat; + +} +.titleImg{ + width: 180rpx; + height: 40rpx; + float: left; + margin: 20rpx; + display: block; +} +.specialTitle{ + float: left; + margin: 10rpx 20rpx; + font-size: 38rpx; + font-family: YouSheBiaoTiHei; + font-weight: 600; + color: #37332D; +} +.more{ + float: right; + font-size: 24rpx; + font-family: OPPOSans; + font-weight: 500; + color: #866741; + margin: 16rpx 20rpx; + +} +.rup{ + width: 13rpx; + height: 20rpx; + margin: 2rpx 0 0 6rpx +} +.contBox{ + overflow: hidden; + /* width: 96%; */ + margin: -50rpx auto 0 auto; +} +.topImg{ + width: 100%; + height: 140rpx; + border-radius: 16rpx; + margin-bottom: 40rpx; + /* background-color: chartreuse; */ +} +.topImg image{ + border-radius: 16rpx; + width: 100%; + height: 100%; +} +.itemBox{ + overflow: hidden; + display: -webkit-box; + overflow-x: scroll; + -webkit-overflow-scrolling: touch; + margin: 20rpx auto; + width: 96% +} +.itemBox::-webkit-scrollbar { + display: none; +} +.item{ + width: 240rpx; + /* background-color: antiquewhite; */ + margin-right: 20rpx; +} +.itemImg{ + position: relative; + width: 240rpx; + height: 240rpx; + border-radius: 16rpx ; + /* background-color: aquamarine; */ +} +.itemImg image{ + width: 100%; + height: 100%; + border-radius: 16rpx; +} +.sellout{ + position: absolute; + top: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.5); + width: 240rpx; + height: 240rpx; + border-radius: 20rpx; +} + +.selloutImg{ + width: 195rpx !important; + height: 154rpx !important; + margin: 18% auto; + display: block +} + +.titleName{ + width:100%; + font-size: 28rpx; + font-family: OPPOSans; + font-weight: 500; + color: #333333; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-top: 10rpx +} +.priceBox{ + overflow: hidden; + margin: 10rpx 0; +} +.f{ + float: left; +} +.r{ + float:right; +} +.sellingBox{ + overflow: hidden +} +.fuhao{ + color: #DF2D2D; + font-size: 24rpx; + float: left; + font-family: OPPOSans; + /* font-weight: bold; */ + margin-top: 10rpx +} +.int{ + float: left; + font-size: 36rpx; + font-family: OPPOSans; + font-weight: bold; + color: #DF2D2D; +} +.originalBox{ + overflow: hidden +} +.origina{ + text-align: right; + font-size: 24rpx; + font-family: OPPOSans; + font-weight: 400; + text-decoration: line-through; + color: #999999; + margin-top: 10rpx; + margin-right: 10rpx; +} +.countBox{ + width: 100%; + height: 46rpx; + background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_bq.png"); + background-size: 100% 100%; + background-repeat: no-repeat; + margin-bottom: 20rpx; + line-height: 46rpx; + overflow: hidden; +} +.countText{ + font-size: 22rpx; + font-family: OPPOSans; + font-weight: 400; + color: #999999; + background: linear-gradient(180deg, #DCB07D 0%, #F5E0BF 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + margin-left: 8rpx; +} +.countDate{ + font-size: 24rpx; + font-family: OPPOSans; + font-weight: bold; + color: #4C3820; + margin-right: 8rpx; +} +.moreItem{ + background: #F7F7F7; + border-radius: 8px; +} +.noDataImg{ + width: 160rpx; + height: 160rpx; + margin: 25% auto 5% auto; + +} +.noDataImg image{ + width: 100%; + height: 100% +} +.noDataText{ + text-align: center; + font-size: 22rpx; + font-family: OPPOSans; + font-weight: 500; + color: #999999; + +} + + +.product{ + width: 96%; + height: 140rpx; + margin: 30rpx auto 10rpx; + border-radius: 16rpx; + overflow: hidden; +} +.product image{ + + height: 100%; + display: block; + width: 100%; +} \ No newline at end of file diff --git a/components/coupons/index.js b/components/coupons/index.js index ff6bcc1..f655841 100644 --- a/components/coupons/index.js +++ b/components/coupons/index.js @@ -1,4 +1,4 @@ -// pages/index/sw/index.js +const app = getApp() Component({ /** * 组件的属性列表 @@ -15,7 +15,17 @@ Component({ /** * 组件的初始数据 */ - data: {}, + data: { + mouldType: 0, + }, + attached: function () { + // 在组件实例进入页面节点树时执行 + if (app.globalData.mouldType) { + this.setData({ + mouldType: app.globalData.mouldType + }) + } + }, methods: { gotoDetail(e) { let couponId = e.currentTarget.dataset.couponid; diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml index 500320b..3289b8b 100644 --- a/components/coupons/index.wxml +++ b/components/coupons/index.wxml @@ -1,5 +1,5 @@ -预售 + 预售 @@ -15,7 +15,7 @@ 消费卡 - + {{data.title}} diff --git a/components/coupons/index.wxss b/components/coupons/index.wxss index 53eadc9..5b80527 100644 --- a/components/coupons/index.wxss +++ b/components/coupons/index.wxss @@ -31,10 +31,11 @@ } .coupons-info { - width: 335rpx; + width: 90%; height: 152rpx; border-radius: 0rpx 0rpx 10rpx 10rpx; background: #fff; + margin: 0 auto; } .coupons-info-name { diff --git a/components/navbar/navbar.js b/components/navbar/navbar.js index 45f28cf..180108c 100644 --- a/components/navbar/navbar.js +++ b/components/navbar/navbar.js @@ -26,16 +26,18 @@ Component({ home: { type: Boolean, value: false - } + }, + }, data: { array: ['A广场', 'B广场-北京西单'], index: 1, statusBarHeight: app.statusBarHeight + 'px', - navigationBarHeight: (app.statusBarHeight + 44) + 'px' + navigationBarHeight: (app.statusBarHeight + 44) + 'px', }, methods: { + backHome: function () { wx.switchTab({ url: '/index/index', @@ -54,6 +56,7 @@ Component({ } }, attached: function(){ + let pages = getCurrentPages(); if (pages.length <= 1) { this.setData({ diff --git a/components/navbar/navbar.wxss b/components/navbar/navbar.wxss index 055b358..ae3096b 100644 --- a/components/navbar/navbar.wxss +++ b/components/navbar/navbar.wxss @@ -46,18 +46,7 @@ transform: translate(-50%,-50%); } -.title { - color: #000; - position: absolute; - left: 104px; - right: 104px; - font-weight: 600; - font-size: 32rpx; - text-align: center; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} + @font-face { font-family: 'iconfont'; /* project id 1353695 */ src: url('//at.alicdn.com/t/font_1353695_nyv2ld9xqk8.eot'); @@ -89,4 +78,28 @@ .pick-box{ width: 260rpx; padding-left: 20rpx; -} \ No newline at end of file +} +.titleBox{ + width: 100%; + display: flex; + justify-content: center; +} +.title { + color: #000; + position: absolute; + left: 104px; + right: 104px; + font-weight: 600; + font-size: 32rpx; + text-align: center; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +/* .jituan{ + width: 24rpx; + height: 14rpx; + color: #000; + margin-top: 16rpx; + margin-left: 10rpx; +} */ \ No newline at end of file diff --git a/components/optimization/optimization.js b/components/optimization/optimization.js new file mode 100644 index 0000000..d3a1a4a --- /dev/null +++ b/components/optimization/optimization.js @@ -0,0 +1,45 @@ +// components/optimization/optimization.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + businessList:{ + type:Array, + value:[] + }, + businessData: { + type: Array, + value: [] + }, + }, + + /** + * 组件的初始数据 + */ + data: { + classIndex:0 + }, + + /** + * 组件的方法列表 + */ + methods: { + goDetail(e){ + let couponChannelId = e.currentTarget.dataset.id + let couponId = e.currentTarget.dataset.couponid + wx.navigateTo({ + url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, + }) + }, + setIndex(e){ + let index = e.currentTarget.dataset.index + let id = e.currentTarget.dataset.id + this.triggerEvent('businessid',id) + this.setData({ + classIndex:index + }) + } + + } +}) diff --git a/components/optimization/optimization.json b/components/optimization/optimization.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/optimization/optimization.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/optimization/optimization.wxml b/components/optimization/optimization.wxml new file mode 100644 index 0000000..81acd2b --- /dev/null +++ b/components/optimization/optimization.wxml @@ -0,0 +1,40 @@ + + + 优选好物 + Preferred Good + + + + + + {{item.title}} + + + + + + + + + + + {{item.title}} + + + + {{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}} + {{item.salePriceStrH?'.'+item.salePriceStrH:''}} + + 已售 {{item.sale}} + + ¥{{item.priceStr}} + + + + + + + + + + \ No newline at end of file diff --git a/components/optimization/optimization.wxss b/components/optimization/optimization.wxss new file mode 100644 index 0000000..a6f5119 --- /dev/null +++ b/components/optimization/optimization.wxss @@ -0,0 +1,202 @@ +.optimizationBox { + overflow: hidden; +} + +.titleImg { + width: 96%; + height: 80rpx; + margin: 0rpx auto; + background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_ggw_yxhw.png"); + background-size: 100% 100%; + background-repeat: no-repeat; +} + +.textl { + font-size: 34rpx; + font-family: OPPOSans; + font-weight: bold; + color: #dfbe99; + margin: 20rpx; +} + +.textr { + font-size: 30rpx; + font-family: OPPOSans; + font-weight: 300; + color: #91897e; + margin: 20rpx; +} + +.f { + float: left; +} + +.r { + float: right; +} + +.classifyBox { + width: 100%; + border-radius: 20rpx 20rpx 0 0; + background-color: #fff; + overflow: hidden; + display: -webkit-box; + overflow-x: scroll; + -webkit-overflow-scrolling: touch; + /* margin: 10rpx 0; *//* background: linear-gradient(0deg, #F5F5F5, #fff); */ +} + +.classifyBox::-webkit-scrollbar { + display: none; +} + +.itemBox { + width: 100rpx; + height: 100rpx; + margin: 0 20rpx; +} + +.className { + font-size: 28rpx; + font-family: OPPOSans; + font-weight: 500; + color: #454340; + text-align: center; + margin: 20rpx auto 10rpx auto; +} + +.className_a { + font-size: 30rpx; + font-family: OPPOSans; + font-weight: 800; + color: #c99f67; + text-align: center; + background: linear-gradient(180deg, #cc9a60 0%, #dfbf8e 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + margin: 20rpx auto 10rpx auto; +} +.xian{ + width: 22rpx; + height: 5rpx; + background: linear-gradient(180deg, #D5A56E, #E9D0AA); + border-radius: 3px; + margin: 0 auto; +} +.contBox{ + + background: linear-gradient(0deg, #F5F5F5, #fff); + overflow: hidden; +} +.contLsitBox{ + width: 96%; + margin: 0 auto; + display: flex; + overflow: hidden; + justify-content: space-between; + flex-wrap: wrap; + +} +.item{ + width: 49%; + background-color: #fff; + border-radius: 20rpx; + margin: 12rpx 0; + position: relative; +} +.itemImg{ + width: 100%; + height: 350rpx; + border-radius: 20rpx; + /* background-color: aquamarine; */ +} +.itemImg image{ + width: 100%; + height: 100%; + border-radius: 20rpx 20rpx 0 0; +} +.titleName{ + width:90%; + height: 80rpx; + font-size: 28rpx; + font-family: OPPOSans; + font-weight: 500; + color: #333333; + margin: 10rpx auto 0 auto; + + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + white-space:normal; + +} +.priceBox{ + width: 90%; + overflow: hidden; + margin: 10rpx auto; +} +.f{ + float: left; +} +.r{ + float:right; +} +.sellingBox{ + overflow: hidden +} +.fuhao{ + color: #DF2D2D; + font-size: 24rpx; + float: left; + font-family: OPPOSans; + /* font-weight: bold; */ + margin-top: 10rpx +} +.int{ + float: left; + font-size: 36rpx; + font-family: OPPOSans; + font-weight: bold; + color: #DF2D2D; +} +.originalBox{ + overflow: hidden +} +.origina{ + text-align: right; + font-size: 24rpx; + font-family: OPPOSans; + font-weight: 400; + text-decoration: line-through; + color: #999999; + margin-top: 10rpx; + margin-right: 10rpx; +} +.priceNum{ + text-align: right; + font-size: 24rpx; + font-family: OPPOSans; + font-weight: 400; + + color: #999999; + margin-top: 10rpx; + /* margin-right: 10rpx; */ +} +.sellout{ + position: absolute; + top: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.5); + width: 100%; + height: 100%; + border-radius: 20rpx; +} + +.selloutImg{ + width: 195rpx !important; + height: 154rpx !important; + margin: 50% auto; + display: block +} \ No newline at end of file diff --git a/config/config.js b/config/config.js index 51376c8..4c64dc8 100755 --- a/config/config.js +++ b/config/config.js @@ -6,6 +6,10 @@ var config = { url: configUrls, wsurl: sockUrls, api: { + /* + *欢乐城首页专题 + */ + showList:"/topic/showList", /* *记录微信订阅 */ diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index 50a7679..61bc58b 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -115,7 +115,9 @@ Component({ getType() { Http.get({ url: config.api.setType, - data: {} + data: { + mouldType: app.globalData.mouldType + } }).then(res => { const { code, @@ -130,34 +132,34 @@ Component({ }, // 初始换底部导航栏 setTabStyle: function () { - this.getTabBar().setData({ - selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, - list: [{ - "pagePath": "/index/index", - "iconPath": `${app.globalData.styleLsit.t_in.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, - "text": "首页" - }, - { - "pagePath": "/index/searchbar", - "iconPath": `${app.globalData.styleLsit.t_md.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, - "text": "门店" - }, - { - "pagePath": "/index/passCar", - "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, - "text": "停车" - }, - { - "pagePath": "/index/user", - "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, - "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, - "text": "我的" - } - ], - }) + this.getTabBar().setData({ + selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, + list: [{ + "pagePath": "/index/index", + "iconPath": `${app.globalData.styleLsit.t_in.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, + "text": "首页" + }, + { + "pagePath": "/index/searchbar", + "iconPath": `${app.globalData.styleLsit.t_md.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, + "text": "门店" + }, + { + "pagePath": "/index/passCar", + "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, + "text": "停车" + }, + { + "pagePath": "/index/user", + "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, + "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, + "text": "我的" + } + ], + }) }, getTemplateId() { diff --git a/ext.json b/ext.json index 248639b..0f043d1 100644 --- a/ext.json +++ b/ext.json @@ -1,14 +1,7 @@ { "ext": { "attr": { - "car": { - "etcp": { - "etcpAppId": "wx192b7d2e8dcbefd0", - "etcpVersion": "release", - "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" - } - }, - "mchId": "1604439800", + "mchId": "1602801645", "imgProxy": [ { "newUrl": "https://ctest.malls.iformall.com/img", @@ -24,12 +17,14 @@ } ], "configUrl": "https://ctest.malls.iformall.com/C/api", - "businessSwitch": "1", + "etcpAppId": "wx9f3a77763caa7c89", + "etcpVersion": "release", + "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", "ifHaveWebSocket": "0", "ifHaveCarModular": "1" }, - "name": "金泸商务", - "weappId": "wx649b3be73c1afe47", + "name": "富茂望京测试版", + "weappId": "wx9f3a77763caa7c89", "appVersion": "C.test.5.2.0" }, "debug": false, @@ -70,16 +65,12 @@ "navigationBarBackgroundColor": "#FFFFFF" }, "plugins": { - "auto-points-plugin": { - "version": "1.3.0", - "provider": "wxfab2bf944bfc4da6" - }, "live-player-plugin": { "version": "1.2.5", "provider": "wx2b03c6e691cd7370" } }, - "extAppid": "wx649b3be73c1afe47", + "extAppid": "wx9f3a77763caa7c89", "extEnable": true, "permission": { "scope.userLocation": { diff --git a/index/index.js b/index/index.js index d2a6138..8321af8 100644 --- a/index/index.js +++ b/index/index.js @@ -12,6 +12,22 @@ const bgColor = require("../utils/bgColor.js") let app = getApp(); Page({ data: { + aa: (app.statusBarHeight+ 34) + "rpx", + noDataFlag:false, + busineKye:0, + businePageNum:1, + businessList:[],//优选好物导航 + businessData: [],//优选好物数据 + topicObj2: null,//欢乐城首页限时抢购 + topicObj3: null,//欢乐城首页砍价 + topicObj4: null,//欢乐城首页拼团 + topicObj5: null,//欢乐城首页消费卡 + topicObj6: null,//欢乐城首页积分商城 + specialLsit:[],//欢乐城首页专题 + marketName:"",//商场名称 + mouldType:0, + navLineHeight: ((app.statusBarHeight + app.statusBarHeight) + 44) + "px", + huanlechengImgurl: "https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/", mch_id: mch_id, goUrl:"",//商圈跳转链接 accreditFlag:1,//1是未授权微信且未授权手机号 2授权了微信 没授权手机号 3微信和手机号都授权了 @@ -93,6 +109,97 @@ Page({ isShowSqare: false, moduleList:[],//按钮列表 }, + getBusineData(e){ + this.setData({ + businePageNum:1, + busineKye: e.detail, + noDataFlag:false, + }) + this.getCouponChannelList(e.detail) + }, + getBusinessList(){//获取优选导航 + Http.get({ + url: config.api.businessList, + data: { + filter: 2 + } + }).then(res => { + this.setData({ + businessList: [{ id: 0, title: "全部", type: 1 }].concat(res.data) + }); + }).catch(err=>{ + wx.showModal({ + title: '提示', + content: err.message ? err.message:err.data, + showCancel: false + }) + }) + }, + getCouponChannelList(key){ + if (this.data.noDataFlag) { + return + } + wx.showLoading({ + title: "加载中" + }); + let param={} + if (key==0){ + param = { + pageNum: this.data.businePageNum, + pageSize: 6, + targetAd: 1 + } + }else{ + param = { + pageNum: this.data.businePageNum, + pageSize: 6, + business: key, + targetAd: 1 + + } + } + + Http.get({ + url: config.api.couponChannelList, + data: param + }).then(res=>{ + if (res.data.list.length==0){ + this.setData({ + noDataFlag:true + }) + } + + let tempLsit = this.data.businessData + let data = res.data.list + data.map(item => { + if (item.salePriceStr && item.salePriceStr.indexOf('.') != -1) { + let str = item.salePriceStr.split('.') + item.salePriceStrQ = str[0] + item.salePriceStrH = str[1] + } + item.sale = item.inventory - item.remainInventory + }) + + if (this.data.businePageNum>1){ + this.setData({ + businessData: [...tempLsit, ...data] + }) + }else{ + this.setData({ + businessData: data + }) + } + wx.hideLoading(); + + }).catch(err => { + wx.hideLoading(); + wx.showModal({ + title: '提示', + content: err.message ? err.message : err.data, + showCancel: false + }) + }) + }, goPage(e){ let obj = e.currentTarget.dataset.obj console.log(obj,"obj") @@ -132,6 +239,7 @@ Page({ moduleList: res.data, }) }).catch(err=>{ + if (err.status!=404) wx.showModal({ title: '提示', content: err.message ? err.message:err.data, @@ -160,7 +268,7 @@ Page({ }) }else{ wx.showToast({ - title: err.errMsg, + title: err.message, icon: 'none', duration: 2000, mask: false @@ -174,7 +282,7 @@ Page({ }) }else{ wx.showToast({ - title: err.errMsg, + title: err.message, icon: 'none', duration: 2000, mask: false @@ -198,9 +306,12 @@ Page({ }, //跳转到其他广场列表 goSquareList() { - wx.navigateTo({ - url: '/pages/location/location', - }) + if (this.data.isShowSqare){ + wx.navigateTo({ + url: '/pages/location/location', + }) + } + }, goLive() { wx.navigateTo({ @@ -340,7 +451,9 @@ Page({ getType() { Http.get({ url: config.api.setType, - data:{} + data:{ + mouldType: app.globalData.mouldType + } }).then(res=>{ const{code ,data}=res if(code==200){ @@ -355,8 +468,11 @@ Page({ * 生命周期函数--监听页面初次渲染完成 */ onLoad: function(options) { - - + this.setData({ + mouldType: app.globalData.mouldType, + marketName: app.globalData.marketName, + activeColor: app.globalData.mouldType == 1 ? "#E9D0AA" : bgColor.colorFirst.main.activeColor + }) let that = this; let optionss; //获取首页按钮 @@ -411,6 +527,7 @@ Page({ }, onUnload() { // wx.removeStorageSync('squareList') + }, // 初始换底部导航栏 setTabStyle: function () { @@ -445,6 +562,12 @@ Page({ }, onShow: function() { + console.log(app.globalData.mouldType,"mouldType") + this.setData({ + mouldType: app.globalData.mouldType, + marketName: app.globalData.marketName, + activeColor: app.globalData.mouldType == 1 ? "#E9D0AA" : bgColor.colorFirst.main.activeColor + }) this.uesrInfo() if (businessSwitch) { let openId = wx.getStorageSync("openId") @@ -458,7 +581,7 @@ Page({ } this.ifShowSqare(); - if (wx.getStorageSync("squareList")) { + if (wx.getStorageSync("squareList") && wx.getStorageSync("selectedMall")) { var temp = wx.getStorageSync("squareList").filter(item => item.tenantId == wx.getStorageSync("selectedMall"))[0].name this.setData({ squareName: temp @@ -536,6 +659,11 @@ Page({ url: '/pages/czdetail/czdetail', }) }, + goIntegralmall(){ + wx.navigateTo({ + url: '/pages/integralmall/index', + }) + }, gotoBargain: function() { wx.navigateTo({ url: '/pages/bargain/bargain', @@ -583,8 +711,21 @@ Page({ console.log(app.globalData.token) that.getmemberId(app.globalData.token); that.getBannerlist(); - that.topicShow(); - that.getxsList(); + if(that.data.mouldType==0){//富茂原版 + that.topicShow(); + that.getxsList(); + } else if (that.data.mouldType == 1){//欢乐城模板 + that.getShowList() + that.topicShowall(2); + that.topicShowall(3); + that.topicShowall(4); + that.topicShowall(5); + that.topicShowall(6); + that.getBusinessList(); + that.getCouponChannelList(0) + } + + that.getType() // that.uesrInfo() that.getLocation(); @@ -615,8 +756,8 @@ Page({ that.getGg(app.globalData.token) let weapNote = JSON.parse(res.data.weapNote); that.setData({ - desc: weapNote.firstpage.desc, - title: weapNote.firstpage.title + // desc: weapNote.firstpage.desc?weapNote.firstpage.desc:"", + // title: weapNote.firstpage.title?weapNote.firstpage.title:'', }) }) .catch(err => { @@ -625,7 +766,7 @@ Page({ that.getGg(app.globalData.token) wx.showModal({ title: "提示", - content: err.errMsg, + content: err.message, showCancel: false }); }); @@ -636,8 +777,19 @@ Page({ console.log(app.globalData.token) that.getmemberId(app.globalData.token); that.getBannerlist(); - that.topicShow(); - that.getxsList(); + if (that.data.mouldType == 0) {//富茂原版 + that.topicShow(); + that.getxsList(); + } else if (that.data.mouldType == 1) {//欢乐城模板 + that.getShowList() + that.topicShowall(2); + that.topicShowall(3); + that.topicShowall(4); + that.topicShowall(5); + that.topicShowall(6); + that.getBusinessList(); + that.getCouponChannelList(0) + } that.getType() // that.uesrInfo() that.getLocation(); @@ -668,8 +820,8 @@ Page({ that.getGg(app.globalData.token) let weapNote = JSON.parse(res.data.weapNote); that.setData({ - desc: weapNote.firstpage.desc, - title: weapNote.firstpage.title + // desc: weapNote.firstpage.desc?weapNote.firstpage.desc:"", + // title: weapNote.firstpage.title?weapNote.firstpage.title:'', }) }) .catch(err => { @@ -678,7 +830,7 @@ Page({ that.getGg(app.globalData.token) wx.showModal({ title: "提示", - content: err.errMsg, + content: err.message, showCancel: false }); }); @@ -793,7 +945,7 @@ Page({ .catch(err => { console.log(err) wx.showToast({ - title: err.errMsg, + title: err.message, icon: 'none', duration: 2000, mask: false @@ -823,6 +975,96 @@ Page({ // that.checkUserCarStatus(); }); }, + //获取欢乐城专题 + getShowList(){ + Http.get({ + url: config.api.showList + }).then(res=>{ + let tempData = res.data + tempData.map(item1=>{ + if (item1.couponList){ + item1.couponList.map(item2 => { + if (item2.salePriceStr && item2.salePriceStr.indexOf('.') != -1) { + let str = item2.salePriceStr.split('.') + item2.salePriceStrQ = str[0] + item2.salePriceStrH = str[1] + } + }) + } + + }) + this.setData({ + specialLsit:res.data?res.data:[] + + }) + }).catch(err => { + wx.showToast({ + title: err.message ? err.message : err.data, + icon: 'none', + duration: 2000, + mask: false + }); + }) + }, + /** + * topicType=2 限时抢购 + * topicType=3 砍价 + * topicType=4 拼团 + * topicType=5 消费卡 + * topicType=6 积分商城 + */ + topicShowall(topicType){ + Http.get({ + url: config.api.topicShow, + data:{ + topicType + } + }).then(res=>{ + + let data = res.data + + if (data.couponList != null && data.couponList.length > 0){ + data.couponList.map(item => { + if (item.salePriceStr && item.salePriceStr.indexOf('.') != -1) { + let str = item.salePriceStr.split('.') + item.salePriceStrQ = str[0] + item.salePriceStrH = str[1] + } + }) + } + + if (topicType==2){ + let tempData = data + this.setData({ + topicObj2:data + }) + } else if (topicType == 3){ + this.setData({ + topicObj3: data + }) + } else if (topicType == 4) { + this.setData({ + topicObj4: data + }) + } else if (topicType == 5) { + this.setData({ + topicObj5: data + }) + } else if (topicType == 6) { + this.setData({ + topicObj6: data + }) + } + + }).catch(err=>{ + wx.showToast({ + title: err.message ? err.message:err.data, + icon: 'none', + duration: 2000, + mask: false + }); + }) + }, // 专题显示 topicShow: function() { let that = this; @@ -965,6 +1207,13 @@ Page({ * 刷新 */ onPullDownRefresh: function(e) { + this.setData({ + topicObj2: null,//欢乐城首页限时抢购 + topicObj3: null,//欢乐城首页砍价 + topicObj4: null,//欢乐城首页拼团 + topicObj5: null,//欢乐城首页消费卡 + topicObj6: null,//欢乐城首页积分商城 + }) let that = this; that.getWeapNote(); that.setData({ @@ -975,47 +1224,58 @@ Page({ } else { this.getWeapNote() } - if (that.data.code == 0 || that.data.code == undefined) { - that.selectComponent("#lists").getList(0, 1, "refresh"); - wx.stopPullDownRefresh(); - } else { - that.selectComponent("#lists").getList(that.data.code, 1, "refresh"); - wx.stopPullDownRefresh(); - }; + if (that.selectComponent("#lists")){ + if (that.data.code == 0 || that.data.code == undefined) { + that.selectComponent("#lists").getList(0, 1, "refresh"); + wx.stopPullDownRefresh(); + } else { + that.selectComponent("#lists").getList(that.data.code, 1, "refresh"); + wx.stopPullDownRefresh(); + }; + that.selectComponent("#hot").getList(); + } + // 砍价下拉刷新 // that.selectComponent("#bargain").getList(); // that.selectComponent("#spellGroup").getList(); // that.selectComponent("#rushtobyCard").getList(); wx.stopPullDownRefresh(); //爆款专区下拉刷新 - that.selectComponent("#hot").getList(); + that.getxsList(); that.topicShow(); }, //加载更多 onReachBottom: function() { + console.log("我到底了") let that = this; that.data.page++; that.setData({ - page: that.data.page + page: that.data.page, + businePageNum: that.data.businePageNum+1 }); - console.log("加载更多页数" + that.data.page); + console.log("加载更多页数" + that.data.page, ); console.log("加载更多key" + that.data.code); - //父组件获得子组件的方法 - //如果code == 0 - if (that.data.code == 0 || that.data.code == undefined) { - that.selectComponent("#lists").getList(0, that.data.page); - } else { - that.selectComponent("#lists").getList(that.data.code, that.data.page); + if (that.data.mouldType==0){//富茂源模板 + //父组件获得子组件的方法 + //如果code == 0 + if (that.data.code == 0 || that.data.code == undefined) { + that.selectComponent("#lists").getList(0, that.data.page); + } else { + that.selectComponent("#lists").getList(that.data.code, that.data.page); + } + }else if(that.data.mouldType==1){ + this.getCouponChannelList(that.data.busineKye) } + }, // 用户点击右上角分享 onShareAppMessage: function() { app.globalData.previewFlag = true return { + path:"/pages/index/index", title: this.data.weappShareTitle, imageUrl: this.data.weappShareCoverImg, - // desc: this.data.desc, success: function(res) { wx.showToast({ title: "分享成功", diff --git a/index/index.json b/index/index.json index 6f75e0c..e543f75 100644 --- a/index/index.json +++ b/index/index.json @@ -6,7 +6,9 @@ "g-entry": "../components/gameentry/gentry", "c-hot": "../components/hot/index", "c-advertisement":"../components/advertisement/advertisement", - "navbar": "../components/navbar/navbar" + "navbar": "../components/navbar/navbar", + "c-mould":"../components/commodityMould/commodityMould", + "optimization":"../components/optimization/optimization" }, "enablePullDownRefresh": true, "navigationBarBackgroundColor": "#F4F5F9" diff --git a/index/index.wxml b/index/index.wxml index 39739be..365b0f2 100644 --- a/index/index.wxml +++ b/index/index.wxml @@ -1,173 +1,252 @@ - - - - - - - - - - {{squareName}} ↓ - - - - - - - - - - - - - {{levelName}} - + + + + + + + + + + + + {{squareName}} ↓ + + + + + + - - - 还需{{upgradeScore}}成长值可升级 + + + + + + {{levelName}} + + + + + 还需{{upgradeScore}}成长值可升级 + - - - - - - - - - - - - - {{item.name}} - - - - + + + - - - 拼团 + + + + + + + {{item.name}} + - - - - 消费卡 + + + + 砍价 + + + + 拼团 + + + + 限时抢购 + - - - - 游戏 + + + + 限时专区 + 限时惊爆价 轻松拎回家 + + + + + + {{xslist[index].title}} + + + + + + 更多... + + + - - - - 每日签到 - - - - 活动日历 - - - - 积分商城 - - - - 直播厅 - - - --> - + + + + + - - - - 砍价 - - - - 拼团 - - - - 限时抢购 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{marketName}} + + + + + + + + + + + + + + + + + {{levelName}} + 积分:4554 + + + + + 还需 +

{{upgradeScore}}成长值

可升级
+
+
+
- - + + + +
- - 今日好物推荐, - '{{xslist[0].title}}'原价 {{xslist[0].priceStr}} 现价... + + + + + + + {{item.name}} + - 抢购 - --> - - - - 限时专区 - 限时惊爆价 轻松拎回家 - - - - - - {{xslist[index].title}} + + + + + 砍价 + + + + 拼团 + + + + 限时抢购 - - - - 更多... + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/index/index.wxss b/index/index.wxss index 13e2372..c6e2d6a 100644 --- a/index/index.wxss +++ b/index/index.wxss @@ -1,28 +1,117 @@ - @import "../app.wxss"; -page{ - background: #F4F5F9; +@import "../app.wxss"; + +page { + background: #f4f5f9; +} + +.xia { + width: 24rpx; + height: 14rpx; + margin: auto 10rpx; + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + + /* margin: auto; */ +} + +.goSqunar { + display: flex; + justify-content: space-around; } -.color_box{ -/* padding-top: 20rpx; */ - /* background-image: linear-gradient(#DC143C, #F4F5F9); */ -background-color: #F4F5F9; +.goSqunar1 { + display: flex; + justify-content: center; + +} + +.title { + font-size: 32rpx; + font-family: OPPOSans; + font-weight: bold; + } -.underlingImg{ +.title1 { + max-width:320rpx; + font-size: 32rpx; + font-family: OPPOSans; + font-weight: bold; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.squareMore { + width: 24rpx; + /* height: 15rpx; */ +} +.marketName{ + +} +.f { + float: left; +} + +.r { + float: right; +} + +.vgrade { + /* width: 40rpx; */ + height: 26rpx; + float: left; + margin: 10rpx; + background: linear-gradient(180deg, #d5a56e, #e9d0aa); + border-radius: 16rpx 0 16rpx 0; + color: #fff; + line-height: 26rpx; + font-size: 24rpx; + padding: 4rpx 10rpx; +} + +.integralNum { + float: left; + font-family: OPPOSans; + font-weight: bold; + color: #be8b50; + font-size: 26rpx; +} + +.color_box1 { + background-color: #fff; + background-image: url('https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_top_bnt.png'); + background-size: 100% 100%; + border-radius: 0 0 40rpx 40rpx; + overflow: hidden; + background-repeat: no-repeat; +} + +.color_box { + /* padding-top: 20rpx; *//* background-image: linear-gradient(#DC143C, #F4F5F9); */ + background-color: #f4f5f9; +} + +.underlingImg { width: 30rpx; height: 60rpx; font-size: 30prx; float: left; /* margin-top: 20rpx; */ } -.underlingName{ - float: left; - line-height: 30rpx; - color: #A6A6A6; - /* margin-top: 20rpx; */ - margin-bottom: 20rpx; - margin-left: 5rpx; + +.underlingName { + float: left; + line-height: 30rpx; + color: #a6a6a6; + /* margin-top: 20rpx; */ + margin-bottom: 20rpx; + margin-left: 5rpx; } + .index-position { background: rgba(0, 0, 0, 0.5); height: 88rpx; @@ -38,18 +127,19 @@ background-color: #F4F5F9; overflow: hidden; } -.red{ - position:absolute; - width:13rpx; - height:13rpx; - border-radius:50%; - background:red; - right:-50rpx; - top:19rpx; - left:0; - margin:auto; +.red { + position: absolute; + width: 13rpx; + height: 13rpx; + border-radius: 50%; + background: red; + right: -50rpx; + top: 19rpx; + left: 0; + margin: auto; display: none; } + page { width: 100%; height: auto !important; @@ -63,7 +153,7 @@ page { .game-entry { position: fixed; right: 27rpx; - bottom:443rpx; + bottom: 443rpx; width: 120rpx; margin: 37rpx auto 0; z-index: 10; @@ -73,22 +163,35 @@ page { display: block; width: 100%; } -.underling{ - padding: 10rpx 30rpx; + +.underling { + padding: 10rpx 30rpx; } -.userinfo{ - width:690rpx; + +.userinfo { + width: 690rpx; height: 96rpx; - border-radius:16rpx; + border-radius: 16rpx; display: flex; justify-content: space-between; margin: 0 auto 30rpx; } -.infoLeft{ + +.userinfo1 { + width: 690rpx; + height: 96rpx; + border-radius: 16rpx; + display: flex; + justify-content: space-between; + margin: 0 auto; +} + +.infoLeft { height: 100%; - border-radius:12rpx; - background: #FFF; + border-radius: 12rpx; + background: #fff; } + .section { padding: 0 20rpx; justify-content: space-around; @@ -96,29 +199,35 @@ page { margin-top: 25rpx; margin-bottom: 30rpx; } -.sellsection{ + +.sellsection { margin-bottom: 37rpx; - padding: 0 38rpx; + padding: 0 38rpx; } -.section >view,.sellsection>view{ + +.section >view, .sellsection>view { width: 25%; display: inline-block; position: relative; } -.section >view image,.sellsection>view image{ + +.section >view image, .sellsection>view image { display: block; margin: 0 auto; } + .section >view image { width: 55rpx; height: 55rpx; margin-top: 20rpx; margin-bottom: 14rpx; } -.sellsection>view image{ + +.sellsection>view image { width: 159rpx; height: 134rpx; } + .section text { font-size: 24rpx; color: rgba(51, 51, 51, 1); @@ -134,12 +243,16 @@ page { bottom: 0; z-index: 1000; background: rgba(0, 0, 0, 0.6); - } .qrcode image { margin: 15rpx 20rpx 15rpx; - z-index:100; + z-index: 100; +} + +.qrcode1 image { + margin: 15rpx 20rpx 15rpx; + z-index: 100; } .showQrcode { @@ -162,7 +275,7 @@ page { margin: auto; background: #fff; border-radius: 16rpx; - z-index:100; + z-index: 100; padding-bottom: 30rpx; } @@ -184,30 +297,36 @@ page { color: rgba(2, 192, 255, 1); overflow: hidden; } -.memberIds{ + +.memberIds { padding-top: 30rpx; font-size: 30rpx; } -.search{ - background:rgba(2, 192, 255, 1); + +.search { + background: rgba(2, 192, 255, 1); height: 50rpx; } -.searchbar{ + +.searchbar { position: relative; width: 685rpx; height: 76rpx; margin: 0 auto; text-align: center; } -.searchbar image{ + +.searchbar image { width: 40rpx; } -.searchbar text{ + +.searchbar text { font-size: 28rpx; line-height: 50rpx; color: #fff; display: inline-block; } + .user-avatar { width: 80rpx; height: 80rpx; @@ -216,17 +335,34 @@ page { float: left; margin: 10rpx 10rpx; } + .user-avatar open-data { - display:block; - width:100%; - height:100%; + display: block; + width: 100%; + height: 100%; +} + +.user-avatar1 { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + overflow: hidden; + float: left; + margin: 0 10rpx; +} + +.user-avatar1 open-data { + display: block; + width: 100%; + height: 100%; } + .user-data { letter-spacing: 0.64rpx; line-height: 46rpx; font-size: 30rpx; color: #333; - background: #FFF; + background: #fff; margin-top: 10rpx; margin-bottom: 26rpx; float: right; @@ -234,67 +370,96 @@ page { flex-direction: column; } -.nameBox open-data{ +.user-data1 { + letter-spacing: 0.64rpx; + line-height: 46rpx; + font-size: 30rpx; + color: #333; + background: #fff; + /* margin-top: 10rpx; */ + margin-bottom: 26rpx; + float: right; + display: flex; + flex-direction: column; +} + +.nameBox open-data { float: left; } -.chengzhangBox{ - height:32rpx; + +.chengzhangBox { + height: 32rpx; line-height: 26rpx; - border-radius:9px 9px 9px 0px; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(255,255,255,1); + border-radius: 9px 9px 9px 0px; + font-family: PingFangSC-Regular; + font-weight: 400; + color: rgba(255, 255, 255, 1); float: left; margin-top: 8rpx; } + .chengzhang { font-size: 22rpx; font-weight: 400; - color: #FFFFFF; - height:22rpx; + color: #fff; + height: 22rpx; line-height: 22rpx; padding: 0 8rpx; } -.integral{ + +.integral { margin-left: 70rpx; } -.jifen{ + +.jifen { display: inline-block; height: 34rpx; - color: #999999; - font-size:24rpx; + color: #999; + font-size: 24rpx; line-height: 34rpx; } -.jifenNumber{ - color:#D18B4C; + +.jifenNumber { + color: #d18b4c; font-size: 34rpx; line-height: 34rpx; margin-left: 10rpx; font-weight: bold; } + .view { display: flex; font-size: 24rpx; - color: #999999; + color: #999; } -.view>.score{ - margin-left:9rpx; - color:#333333; - font-size:30rpx; - margin-right:23rpx; - font-family:PingFang-SC-Bold; + +.view>.score { + margin-left: 9rpx; + color: #333; + font-size: 30rpx; + margin-right: 23rpx; + font-family: PingFang-SC-Bold; } -.qrcode{ + +.qrcode1 { width: 106rpx; height: 96rpx; - background: #FFF; - border-radius:12rpx; + border-radius: 12rpx; } -.qrcodeimg{ - width: 68rpx!important; - height: 68rpx!important; + +.qrcode { + width: 106rpx; + height: 96rpx; + background: #fff; + border-radius: 12rpx; +} + +.qrcodeimg { + width: 68rpx !important; + height: 68rpx !important; } -.leftimg{ + +.leftimg { position: absolute; right: 40rpx; top: 60rpx; @@ -302,170 +467,206 @@ page { width: 14rpx; height: 26rpx; } -.duihuanimg{ + +.duihuanimg { display: block; width: 48rpx; margin-top: 6rpx; } -.product{ + +.product { width: 710rpx; margin: 30rpx auto 10rpx; border-radius: 16rpx; overflow: hidden; } -.product image{ + +.product image { display: block; width: 100%; } -.textBox{ + +.textBox { width: 400rpx; height: 100%; float: left; margin-left: 10rpx; } -.textBox .name{ + +.textBox .name { width: 400rpx; font-size: 28rpx; - color: #3C3C3C; + color: #3c3c3c; margin-top: 20rpx; } -.textBox .title{ + +.textBox .title { width: 400rpx; font-size: 20rpx; - color: #A6A6A6; + color: #a6a6a6; margin-top: 10rpx; } -.product .gift{ - width:88rpx; - height:88rpx; +.product .gift { + width: 88rpx; + height: 88rpx; float: left; margin-top: 30rpx; margin-left: 15rpx; } -.next image{ + +.next image { width: 26rpx; height: 40rpx; } -.gift image{ - width:88rpx; - height:76rpx; + +.gift image { + width: 88rpx; + height: 76rpx; } -.product .next{ - width:32rpx; - height:60rpx; + +.product .next { + width: 32rpx; + height: 60rpx; float: right; margin-top: 40rpx; margin-right: 26rpx; } -#rushtobyCard{ + +#rushtobyCard { margin-top: 30rpx; } -.signin{ + +.signin { width: 542rpx; height: 94rpx; position: fixed; top: 0; left: 0; right: 0; - z-index: 10000000; + z-index: 10000000; margin: auto; } + .signin open-data { position: absolute; - width:90rpx; + width: 90rpx; left: 0; top: 0; bottom: 0; - height:94rpx; + height: 94rpx; margin: auto; border-radius: 50%; overflow: hidden; } -.signin text{ + +.signin text { display: block; background: rgba(0, 0, 0, 0.5); font-size: 28rpx; height: 80rpx; width: 100%; line-height: 80rpx; - color: #D6D5D5; + color: #d6d5d5; text-indent: 4em; - border-radius:60rpx; + border-radius: 60rpx; margin-top: 7rpx; } -.remainchengzhangzhi{ + +.remainchengzhangzhi { display: block; - color: #A6A6A6; + color: #a6a6a6; font-size: 22rpx; margin-top: 5rpx; height: 30rpx; line-height: 30rpx; float: left; - margin-left:10rpx; + margin-left: 10rpx; width: 255rpx; overflow: hidden; - text-overflow:ellipsis; + text-overflow: ellipsis; white-space: nowrap; } -progress{ - width:200rpx; - border-radius:60rpx; - overflow:hidden; + +progress { + width: 200rpx; + border-radius: 60rpx; + overflow: hidden; float: left; margin-top: 10rpx; } -.channelBox{ - width:688rpx; + +.channelBox { + width: 688rpx; /* height: 220rpx; */ - margin:20rpx auto; + margin: 20rpx auto; display: flex; - flex-wrap:wrap; + flex-wrap: wrap; /* justify-content: space-between; */ - background: #F4F5F9; - + background: #f4f5f9; +} + +.kjBox { + width: 25%; + height: 118rpx; + font-size: 24rpx; + color: #a6a6a6; + margin-top: 10rpx; + text-align: center; } -.kjBox{ + +.kjBox1 { width: 25%; height: 118rpx; font-size: 24rpx; - color: #A6A6A6; + color: #a6a6a6; margin-top: 10rpx; text-align: center; } -.kjBox image{ + +.kjBox image { width: 60rpx; height: 60rpx; - margin: auto + margin: auto; } -.text{ - margin: 0 auto + +.kjBox1 image { + width: 80rpx; + height: 80rpx; + margin: auto; +} + +.text { + margin: 0 auto; } -.toutiao{ - width:710rpx; + +.toutiao { + width: 710rpx; height: 128rpx; line-height: 128rpx; - margin:0 auto; - background: #FFF; - box-shadow:0px 6rpx 16rpx 0px rgba(236,238,243,1); - border-radius:12rpx; + margin: 0 auto; + background: #fff; + box-shadow: 0px 6rpx 16rpx 0px rgba(236, 238, 243, 1); + border-radius: 12rpx; margin-top: 18rpx; - margin-bottom:18rpx; + margin-bottom: 18rpx; position: relative; } -.toutiao1{ - width:710rpx; + +.toutiao1 { + width: 710rpx; height: 128rpx; - margin:0 auto; - background: #FFF; - box-shadow:0px 6rpx 16rpx 0px rgba(236,238,243,1); - border-radius:12rpx; + margin: 0 auto; + background: #fff; + box-shadow: 0px 6rpx 16rpx 0px rgba(236, 238, 243, 1); + border-radius: 12rpx; margin-top: 18rpx; - margin-bottom:18rpx; + margin-bottom: 18rpx; display: flex; justify-content: space-between; } -.xianshi{ + +.xianshi { display: flex; flex-direction: column; justify-content: center; @@ -473,31 +674,35 @@ progress{ font-size: 30rpx; padding: 20rpx; } -.xianshi>text{ + +.xianshi>text { height: 40rpx; } -.xianshi>text:nth-child(1){ - font-size:30rpx; - font-family:PingFangSC; - font-weight:500; + +.xianshi>text:nth-child(1) { + font-size: 30rpx; + font-family: PingFangSC; + font-weight: 500; } -.xianshi>text:nth-child(2){ + +.xianshi>text:nth-child(2) { margin-top: 10rpx; - height:28rpx; - font-size:20rpx; - font-family:PingFangSC; - font-weight:400; - color:rgba(166,166,166,1); - line-height:28rpx; -} -.xsCon{ + height: 28rpx; + font-size: 20rpx; + font-family: PingFangSC; + font-weight: 400; + color: rgba(166, 166, 166, 1); + line-height: 28rpx; +} + +.xsCon { width: 300rpx; display: flex; - justify-content:flex-end; + justify-content: flex-end; overflow: hidden; } -.igBox{ +.igBox { height: 100%; width: 100rpx; display: flex; @@ -506,95 +711,112 @@ progress{ align-content: center; } -.igBoxm{ +.igBoxm { height: 100%; width: 100rpx; display: flex; flex-direction: column; text-align: center; } -.imageH{ - height:50rpx!important; - width: 50rpx!important; + +.imageH { + height: 50rpx !important; + width: 50rpx !important; border-radius: 50%; margin: 15rpx auto; margin-bottom: 15rpx; } -.more{ - height:70rpx!important; - width: 70rpx!important; + +.more { + height: 70rpx !important; + width: 70rpx !important; margin: 0 auto; } -.imTit{ - height:14px; - font-size:10px; - font-family:PingFangSC; - font-weight:400; - color:rgba(60,60,60,1); - line-height:14px; + +.imTit { + height: 14px; + font-size: 10px; + font-family: PingFangSC; + font-weight: 400; + color: rgba(60, 60, 60, 1); + line-height: 14px; width: 100%; overflow: hidden; - text-overflow:ellipsis; - white-space: nowrap; + text-overflow: ellipsis; + white-space: nowrap; text-align: center; } -.toutiao view:nth-child(2){ - font-size:26rpx; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(60,60,60,1); + +.toutiao view:nth-child(2) { + font-size: 26rpx; + font-family: PingFangSC-Regular; + font-weight: 400; + color: rgba(60, 60, 60, 1); float: left; width: 500rpx; overflow: hidden; - text-overflow:ellipsis; + text-overflow: ellipsis; white-space: nowrap; } -.toutiao view:nth-child(2) text:nth-child(1){ + +.toutiao view:nth-child(2) text:nth-child(1) { color: red; } -.toutiao view:nth-child(2) text:nth-child(2){ + +.toutiao view:nth-child(2) text:nth-child(2) { text-decoration: line-through; color: red; } -.toutiao .imgBox{ + +.toutiao .imgBox { width: 64rpx; height: 64rpx; float: left; - margin:5rpx 0 5rpx 20rpx; + margin: 5rpx 0 5rpx 20rpx; } -.toutiao image{ + +.toutiao image { width: 48rpx; height: 38rpx; margin: auto; } -.toutiao .qg{ + +.toutiao .qg { width: 80rpx; height: 44rpx; line-height: 44rpx; - border-radius:18rpx; - border:2rpx solid; + border-radius: 18rpx; + border: 2rpx solid; position: absolute; top: 0; bottom: 0; right: 20rpx; margin: auto; - font-size:24rpx; - font-family:PingFangSC-Medium; - font-weight:500; - color:#FD782D; + font-size: 24rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: #fd782d; text-align: center; } - -i-tabs i-tabs-scroll{ - background: #F4F5F9!important; +i-tabs i-tabs-scroll { + background: #f4f5f9 !important; } -.integralBox{ +.integralBox { width: 110rpx; height: 110rpx; bottom: 500rpx; right: 20rpx; position: fixed; - z-index: 1000000 -} \ No newline at end of file + z-index: 1000000; +} + +.integralBox1 { + width: 140rpx; + height: 140rpx; + bottom: 500rpx; + right: 20rpx; + position: fixed; + z-index: 1000000; +} diff --git a/index/passCar.js b/index/passCar.js index 3423547..0fc5ff2 100644 --- a/index/passCar.js +++ b/index/passCar.js @@ -458,6 +458,9 @@ Page({ * 券绑定车牌 */ bindCoupon: function (quanid,quantitle) { + wx.showLoading({ + title: '使用中...', + }) var that = this; /** * etcp @@ -502,6 +505,7 @@ Page({ data: postCouponData }) .then(res => { + wx.hideLoading() // if(res.data){ that.getStopFee(that.data.listCardNum); that.initUsrCarList(); @@ -519,7 +523,7 @@ Page({ }) .catch(err => { - + wx.hideLoading() if (err.message!=undefined) { wx.showToast({ title: err.message, diff --git a/pages/bannerdetail/index.js b/pages/bannerdetail/index.js index 97d7e18..8f2b4fe 100644 --- a/pages/bannerdetail/index.js +++ b/pages/bannerdetail/index.js @@ -6,6 +6,7 @@ const util = require("../../utils/util"); const imgurl = require("../../utils/imgurl"); Page({ data: { + mouldType: 0, navigationBarHeight, data: {}, couponId: null, @@ -17,6 +18,9 @@ Page({ nodes: '' }, onLoad(options) { + this.setData({ + mouldType: app.globalData.mouldType, + }) let that = this; if (options.id){ Http.get({ diff --git a/pages/bannerdetail/index.wxml b/pages/bannerdetail/index.wxml index da4374d..55c05fa 100644 --- a/pages/bannerdetail/index.wxml +++ b/pages/bannerdetail/index.wxml @@ -28,8 +28,8 @@ - - + + diff --git a/pages/bannerdetail/index.wxss b/pages/bannerdetail/index.wxss index 048bd69..6dcbe77 100644 --- a/pages/bannerdetail/index.wxss +++ b/pages/bannerdetail/index.wxss @@ -19,6 +19,7 @@ page { position: relative; width:750rpx; overflow: hidden; + /* box-shadow:0px 14px 26px 0px rgba(199,203,211,1); */ } diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index a2db500..5bc3842 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -6,9 +6,10 @@ const util = require("../../../utils/util"); const imgurl = require("../../../utils/imgurl"); Page({ data: { + mouldType: 0, navigationBarHeight, homeSelectedO: imgurl.homeSelectedO.url, - isshowposter: false, //是否显示分享弹框 + isshowposter: false, //是否显示分享弹框 fenxiang: imgurl.fenxiang1.url, fenxiangUrl: imgurl.fenxiang.url, clockUrl: imgurl.clock.url, @@ -503,6 +504,9 @@ Page({ * 获取用户信息 */ onLoad(options) { + this.setData({ + mouldType: app.globalData.mouldType, + }) let that = this; if (options.g) { app.globalData.havePlayEd1 = true; @@ -1149,6 +1153,7 @@ Page({ }, onShow() { this.setData({ + mouldType: app.globalData.mouldType, showbutton: false, showbutton1: false }) diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml index 896461e..bfee45a 100644 --- a/pages/coupon/detail/index.wxml +++ b/pages/coupon/detail/index.wxml @@ -4,11 +4,11 @@ -