@@ -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: "" | |||
@@ -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 | |||
}) | |||
} | |||
}, | |||
}); |
@@ -1,4 +1,4 @@ | |||
<view wx:if="{{list.length>0}}" class="index-slide-view"> | |||
<view wx:if="{{list.length>0&&mouldType==0}}" class="index-slide-view"> | |||
<swiper class="imageContainer" bindchange="handleChange" previous-margin="39rpx" next-margin="40rpx" circular autoplay> | |||
<block wx:for="{{list}}" wx:key="{{index}}"> | |||
<swiper-item class="item"> | |||
@@ -6,4 +6,14 @@ | |||
</swiper-item> | |||
</block> | |||
</swiper> | |||
</view> | |||
<view wx:if="{{list.length>0&&mouldType==1}}" class="index-slide-view"> | |||
<swiper class="imageContainer1" bindchange="handleChange" indicator-color indicator-active-color="#fff" indicator-dots previous-margin="40rpx" next-margin="40rpx" circular autoplay> | |||
<block wx:for="{{list}}" wx:key="{{index}}"> | |||
<swiper-item class="item1"> | |||
<image data-id="{{item.id}}" data-data="{{item}}" bindtap='gotobannerdetail' class="itemImg1 {{currentIndex == index ? 'active1_a': 'active1'}}" src="{{item.coverImg}}"></image> | |||
</swiper-item> | |||
</block> | |||
</swiper> | |||
</view> |
@@ -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; | |||
} |
@@ -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}` | |||
}) | |||
}, | |||
} | |||
}) |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,62 @@ | |||
<!-- <view class='product' wx:if="{{showTopic}}" bindtap='gotoTopic'> | |||
<image src='{{cover}}' mode='widthFix'></image> | |||
</view> --> | |||
<view wx:if="{{obj.couponList.length>0||obj.isOnlyAd==1}}"> | |||
<view class='product' bindtap='gotoTopic' data-id="{{obj.id}}" wx:if="{{obj.isOnlyAd==1}}"> | |||
<image src='{{obj.cover}}' mode='scaleToFill'></image> | |||
</view> | |||
<view class="commBox" wx:if="{{obj.topicType!=1||(obj.topicType==1&&obj.isOnlyAd==0)}}"> | |||
<view class="titleBox"> | |||
<image class="titleImg" src="{{titleImgUrl}}" wx:if="{{!special}}"></image> | |||
<view class="specialTitle" wx:if="{{special}}">{{obj.name}}</view> | |||
<view class="more" bindtap="lookAll">查看更多优惠活动 | |||
<image class="rup" src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_jt.png"></image> | |||
</view> | |||
</view> | |||
<view class="contBox"> | |||
<view class="topImg" wx:if="{{obj.cover}}" bindtap="lookAll"> | |||
<image src="{{obj.cover}}" mode='scaleToFill'></image> | |||
</view> | |||
<div class="itemBox" wx:if="{{obj.couponList&&obj.couponList.length>0}}"> | |||
<view class="item" wx:for="{{obj.couponList}}" wx:key="index" bindtap="goDetail" data-type="{{item.type}}" data-id="{{item.id}}" data-couponid="{{item.couponId}}"> | |||
<view class="itemImg"> | |||
<image src="{{item.coverImg}}" mode='scaleToFill'></image> | |||
<view class="sellout" wx:if="{{item.remainInventory==0}}"> | |||
<image class="selloutImg" src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_img_ysx.png"></image> | |||
</view> | |||
</view> | |||
<view class="titleName">{{item.title}}</view> | |||
<view class="priceBox"> | |||
<view class="sellingBox f"> | |||
<view class="fuhao">¥</view> | |||
<view class="int" wx:if="{{item.type!=50}}">{{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}}</view> | |||
<view class="fuhao" wx:if="{{item.type!=50}}">{{item.salePriceStrH?'.'+item.salePriceStrH:''}}</view> | |||
<view class="int" wx:if="{{item.type==50}}">{{item.creditPrice}}</view> | |||
<view class="fuhao" wx:if="{{item.type==50}}"> 积分</view> | |||
</view> | |||
<view class="originalBox r"> | |||
<view class="origina">¥{{item.priceStr}}</view> | |||
</view> | |||
</view> | |||
<view class="countBox" wx:if="{{isShowCount}}"> | |||
<view class="countText f">{{setIntervalLsit[index].textTime}}</view> | |||
<view class="countDate r">{{setIntervalLsit[index].vaFlag?'活动已结束':setIntervalLsit[index].valueText}}</view> | |||
</view> | |||
</view> | |||
<view class="item moreItem" bindtap="lookAll"> | |||
<view class="noDataImg"> | |||
<image src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_img_zwlp.png"></image> | |||
</view> | |||
<view class="noDataText">查看更多优惠活动</view> | |||
</view> | |||
</div> | |||
</view> | |||
</view> | |||
</view> |
@@ -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%; | |||
} |
@@ -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; | |||
@@ -1,5 +1,5 @@ | |||
<view class='navigator' bindtap='gotoDetail' data-id='{{data.id}}' data-targetAd='{{data.targetAd}}' hover-class='hover' data-couponId='{{data.couponId}}' data-title='{{data.title}}'> | |||
<view class="presell" wx:if="{{data.type==10}}">预售 </view> | |||
<view class="presell" wx:if="{{data.type==10}}" style="{{mouldType==1?'top: 280rpx;':''}}">预售 </view> | |||
<!-- 首页优惠券列表页面 --> | |||
<view class="coupons"> | |||
<!-- fromMerchant 根据这个字段判断 --> | |||
@@ -15,7 +15,7 @@ | |||
<view class="desc" wx:if="{{data.targetAd == 5}}">消费卡</view> | |||
</view> | |||
<view class="coupons-img"> | |||
<image src="{{data.coverImg}}" mode='aspectFill' lazy-load="true"></image> | |||
<image src="{{data.coverImg}}" style="{{mouldType==1?'height: 300rpx;':''}}" mode='aspectFill' lazy-load="true"></image> | |||
</view> | |||
<view class="coupons-info"> | |||
<view class="coupons-info-name tit">{{data.title}}</view> | |||
@@ -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 { | |||
@@ -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({ | |||
@@ -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; | |||
} | |||
} | |||
.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; | |||
} */ |
@@ -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 | |||
}) | |||
} | |||
} | |||
}) |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,40 @@ | |||
<view class="optimizationBox"> | |||
<view class="titleImg"> | |||
<view class="textl f">优选好物</view> | |||
<view class="textr r">Preferred Good</view> | |||
</view> | |||
<view class="classifyBox"> | |||
<view class="itemBox" wx:for="{{businessList}}" wx:key="{{index}}" bindtap="setIndex" data-index="{{index}}" data-id="{{item.id}}"> | |||
<view class="{{classIndex==index?'className_a':'className'}}">{{item.title}}</view> | |||
<view class="xian" wx:if="{{classIndex==index}}"></view> | |||
</view> | |||
</view> | |||
<view class="contBox"> | |||
<view class="contLsitBox"> | |||
<view class="item" wx:for="{{businessData}}" wx:key="{{index}}" bindtap="goDetail" data-couponid="{{item.couponId}}" data-id="{{item.id}}"> | |||
<view class="itemImg"> | |||
<image src="{{item.coverImg}}" mode='scaleToFill'></image> | |||
</view> | |||
<view class="titleName">{{item.title}}</view> | |||
<view class="priceBox"> | |||
<view class="sellingBox f"> | |||
<view class="fuhao">¥</view> | |||
<view class="int">{{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}}</view> | |||
<view class="fuhao">{{item.salePriceStrH?'.'+item.salePriceStrH:''}}</view> | |||
</view> | |||
<view class="priceNum r">已售 {{item.sale}}</view> | |||
<view class="originalBox r"> | |||
<view class="origina">¥{{item.priceStr}}</view> | |||
</view> | |||
</view> | |||
<view class="sellout" wx:if="{{item.remainInventory==0}}"> | |||
<image class="selloutImg" src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_img_ysx.png"></image> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -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 | |||
} |
@@ -6,6 +6,10 @@ var config = { | |||
url: configUrls, | |||
wsurl: sockUrls, | |||
api: { | |||
/* | |||
*欢乐城首页专题 | |||
*/ | |||
showList:"/topic/showList", | |||
/* | |||
*记录微信订阅 | |||
*/ | |||
@@ -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() { | |||
@@ -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": { | |||
@@ -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: "分享成功", | |||
@@ -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" | |||
@@ -1,173 +1,252 @@ | |||
<navbar color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="首页"></navbar> | |||
<!-- style="padding-top:{{navigationBarHeight}}" --> | |||
<view class="container" > | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<!-- 会员信息 --> | |||
<view class="color_box" style="{{typeLsit.sy_bbg.styleClass}}"> | |||
<!-- 所属集团 --> | |||
<view class="underling" bindtap="goSquareList" wx:if="{{squareName}}"> | |||
<image class="underlingImg" mode="widthFix" src="https://formall.oss-accelerate.aliyuncs.com/cimg/dingwei.png"></image> | |||
<view class="underlingName">{{squareName}} ↓</view> | |||
</view> | |||
<view class='userinfo' wx:if="{{ifStoreApp!=1}}"> | |||
<!-- 头像 --> | |||
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | |||
<view class="user-avatar"> | |||
<open-data class="open" type="userAvatarUrl"></open-data> | |||
</view> | |||
<!-- 成长值 --> | |||
<view class="user-data fl" bindtap='gotoChengzhangzhi' style="{{typeLsit.sy_xxb.styleClass}}"> | |||
<view class='nameBox'> | |||
<open-data type="userNickName" style="{{typeLsit.sy_xxb_nf.styleClass}}"></open-data> | |||
<view class='chengzhangBox' style='background:{{chengzhangBox}}'> | |||
<text class='chengzhang'>{{levelName}}</text> | |||
</view> | |||
<!-- 初始模板 --> | |||
<view wx:if="{{mouldType==0}}"> | |||
<navbar color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="首页"></navbar> | |||
<!-- style="padding-top:{{navigationBarHeight}}" --> | |||
<view class="container"> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<!-- 会员信息 --> | |||
<view class="color_box" style="{{typeLsit.sy_bbg.styleClass}}"> | |||
<!-- 所属集团 --> | |||
<view class="underling" bindtap="goSquareList" wx:if="{{squareName}}"> | |||
<image class="underlingImg" mode="widthFix" src="https://formall.oss-accelerate.aliyuncs.com/cimg/dingwei.png"></image> | |||
<view class="underlingName">{{squareName}} ↓</view> | |||
</view> | |||
<view class='userinfo' wx:if="{{ifStoreApp!=1}}"> | |||
<!-- 头像 --> | |||
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | |||
<view class="user-avatar"> | |||
<open-data class="open" type="userAvatarUrl"></open-data> | |||
</view> | |||
<view class="view"> | |||
<progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | |||
<view class='remainchengzhangzhi' style="{{typeLsit.sy_xxb_cf.styleClass}}">还需{{upgradeScore}}成长值可升级</view> | |||
<!-- 成长值 --> | |||
<view class="user-data fl" bindtap='gotoChengzhangzhi' style="{{typeLsit.sy_xxb.styleClass}}"> | |||
<view class='nameBox'> | |||
<open-data type="userNickName" style="{{typeLsit.sy_xxb_nf.styleClass}}"></open-data> | |||
<view class='chengzhangBox' style='background:{{chengzhangBox}}'> | |||
<text class='chengzhang'>{{levelName}}</text> | |||
</view> | |||
</view> | |||
<view class="view"> | |||
<progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | |||
<view class='remainchengzhangzhi' style="{{typeLsit.sy_xxb_cf.styleClass}}">还需{{upgradeScore}}成长值可升级</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 二维码 --> | |||
<view class='qrcode fr' bindtap='qrcode' style="{{typeLsit.sy_qrc.styleClass}}"> | |||
<image src="{{typeLsit.sy_qrc.icon}}" class='qrcodeimg' mode='widthFix'></image> | |||
</view> | |||
</view> | |||
<!-- banner --> | |||
<c-banner wx:key="unique" list="{{list}}" /> | |||
<!-- 频道 --> | |||
<view class="channelBox" wx:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}"> | |||
<view class='kjBox' bindtap='goPage' data-obj="{{item}}" wx:for="{{moduleList}}" wx:key="{{index}}"> | |||
<image src='{{item.icon}}' mode='aspectFill'></image> | |||
<view class="text">{{item.name}}</view> | |||
</view> | |||
</view> | |||
<!-- <view class='channelBox' wx:if="{{ifStoreApp!=1}}" style="{{typeLsit.sy_mbg.styleClass}}"> | |||
<view class='kjBox' bindtap='gotoBargain'> | |||
<image src='{{typeLsit.sy_kj.icon}}' mode='aspectFill'></image> | |||
<view class="text">砍价</view> | |||
<!-- 二维码 --> | |||
<view class='qrcode fr' bindtap='qrcode' style="{{typeLsit.sy_qrc.styleClass}}"> | |||
<image src="{{typeLsit.sy_qrc.icon}}" class='qrcodeimg' mode='widthFix'></image> | |||
</view> | |||
</view> | |||
<view class='kjBox' bindtap='gotoSpellGroup'> | |||
<image src='{{typeLsit.sy_pt.icon}}' mode='aspectFill'></image> | |||
<view class="text">拼团</view> | |||
<!-- banner --> | |||
<c-banner wx:key="unique" list="{{list}}" /> | |||
<!-- 频道 --> | |||
<view class="channelBox" wx:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}"> | |||
<view class='kjBox' bindtap='goPage' data-obj="{{item}}" wx:for="{{moduleList}}" wx:key="{{index}}"> | |||
<image src='{{item.icon}}' mode='aspectFill'></image> | |||
<view class="text">{{item.name}}</view> | |||
</view> | |||
</view> | |||
<view class='kjBox' bindtap='gotoCard'> | |||
<image src='{{typeLsit.sy_xfk.icon}}' mode='aspectFill'></image> | |||
<view class="text">消费卡</view> | |||
<view class='channelBox' wx:if="{{ifStoreApp==1}}" style="width:525rpx;"> | |||
<view class='kjBox' bindtap='gotoBargain'> | |||
<image src='{{kanjia}}' mode='aspectFill'></image> | |||
<text>砍价</text> | |||
</view> | |||
<view class='kjBox' bindtap='gotoSpellGroup'> | |||
<image src='{{pintuan}}' mode='aspectFill'></image> | |||
<text>拼团</text> | |||
</view> | |||
<view class='kjBox' bindtap='gotoRushBuy'> | |||
<image src='{{xiaofeika}}' mode='aspectFill'></image> | |||
<text>限时抢购</text> | |||
</view> | |||
</view> | |||
<view class='kjBox' bindtap='gotogame'> | |||
<image src='{{typeLsit.sy_yx.icon}}' mode='aspectFill'></image> | |||
<view class="text">游戏</view> | |||
</view> | |||
<view class='toutiao1' wx:if="{{showQg&&ifStoreApp!=1}}"> | |||
<view class='xianshi' bindtap='gotoRushBuy'> | |||
<text>限时专区</text> | |||
<text>限时惊爆价 轻松拎回家</text> | |||
</view> | |||
<view class='xsCon'> | |||
<view wx:for="{{xslist}}" wx:key="index"> | |||
<view class='igBox' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap='gotodetail'> | |||
<image src='{{xslist[index].coverImg}}' mode='widthFix' class='imageH'></image> | |||
<view class='imTit'>{{xslist[index].title}}</view> | |||
</view> | |||
</view> | |||
<view> | |||
<view class='igBox' bindtap='gotoRushBuy'> | |||
<image src='{{more}}' mode='widthFix' class='more'></image> | |||
<view class='imTit'>更多...</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='kjBox' bindtap='goSign'> | |||
<image src='{{typeLsit.sy_qd.icon}}' mode='aspectFill'></image> | |||
<view class="text">每日签到</view> | |||
</view> | |||
<view class='kjBox' bindtap='goCalendar'> | |||
<image src='{{typeLsit.sy_hd.icon}}' mode='aspectFill'></image> | |||
<view class="text">活动日历</view> | |||
</view> | |||
<view class='kjBox' bindtap='gotoJfsc'> | |||
<image src='{{typeLsit.sy_jfsc.icon}}' mode='aspectFill'></image> | |||
<view class="text">积分商城</view> | |||
</view> | |||
<view class='kjBox' bindtap='goLive' wx:if="{{liveFlag}}"> | |||
<image src='{{typeLsit.sy_zbt.icon}}' mode='aspectFill'></image> | |||
<view class="text">直播厅</view> | |||
</view> | |||
</view> --> | |||
<!-- 频道 --> | |||
<!-- 爆款专区 --> | |||
<c-hot id="hot" /> | |||
<view class='product' wx:if="{{showTopic}}" bindtap='gotoTopic'> | |||
<image src='{{cover}}' mode='widthFix'></image> | |||
</view> | |||
<view class='channelBox' wx:if="{{ifStoreApp==1}}" style="width:525rpx;"> | |||
<view class='kjBox' bindtap='gotoBargain'> | |||
<image src='{{kanjia}}' mode='aspectFill'></image> | |||
<text>砍价</text> | |||
</view> | |||
<view class='kjBox' bindtap='gotoSpellGroup'> | |||
<image src='{{pintuan}}' mode='aspectFill'></image> | |||
<text>拼团</text> | |||
</view> | |||
<view class='kjBox' bindtap='gotoRushBuy'> | |||
<image src='{{xiaofeika}}' mode='aspectFill'></image> | |||
<text>限时抢购</text> | |||
</view> | |||
</view> | |||
<c-coupons id="lists" bind:myevent="onGetCode" class="business" loadingtext="{{loadingtext}}" loading="{{loading}}" /> | |||
<!-- 游戏蒙层 --> | |||
<g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" /> | |||
<!-- 广告蒙层 --> | |||
<c-advertisement id="advertisement" wx:if="{{showGg&&!played&&!havePlayEd1}}" ggdata="{{ggdata}}" /> | |||
</view> | |||
<!-- 顶部签到成长值 --> | |||
<view class='signin' wx:if="{{fistLogin}}" animation="{{alphaData}}"> | |||
<open-data class="open" type="userAvatarUrl"></open-data> | |||
<text class='text'>您今日签到成功,获得{{fistLogin}}成长值</text> | |||
</view> | |||
<view class="integralBox" wx:if="{{businessSwitch}}"> | |||
<!--是未授权微信且未授权手机号 --> | |||
<navigator url="/pages/getuserinfo/index" open-type="navigate" wx:if="{{accreditFlag==1}}"> | |||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
<!-- 授权了微信 没授权手机号 --> | |||
<navigator url="/pages/getuserinfo/index" open-type="navigate" wx:if="{{accreditFlag==2}}"> | |||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
<!-- 微信和手机号都授权了 跳转到商圈--> | |||
<navigator url="{{goUrl}}" wx:if="{{accreditFlag==3}}"> | |||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
</view> | |||
</view> | |||
<!-- 欢乐城模板 --> | |||
<view wx:if="{{mouldType==1}}"> | |||
<view class="container1"> | |||
<!-- 会员信息 --> | |||
<view class="color_box1"> | |||
<view style="height:{{navigationBarHeight}};overflow: hidden;" class="goSqunar1" bindtap="goSquareList"> | |||
<view class="title1" style="line-height:{{navLineHeight}}">{{marketName}}</view> | |||
<view style="height:{{navLineHeight}};position:relative;margin-right: 80rpx"> | |||
<image wx:if="{{isShowSqare}}" src="{{huanlechengImgurl}}home_ic_xialajt.png" mode='widthFix' class="xia"></image> | |||
</view> | |||
</view> | |||
<view class='userinfo1' wx:if="{{ifStoreApp!=1}}"> | |||
<!-- 头像 --> | |||
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | |||
<view class="user-avatar1"> | |||
<open-data class="open" type="userAvatarUrl"></open-data> | |||
</view> | |||
<!-- 成长值--> | |||
<view class="user-data1 fl" style="{{typeLsit.sy_xxb.styleClass}}"> | |||
<view class='nameBox' bindtap="goIntegralmall"> | |||
<!-- <open-data type="userNickName" style="{{typeLsit.sy_xxb_nf.styleClass}}"></open-data> --> | |||
<open-data type="userNickName" style="font-size: 26rpx;color:#292723;"></open-data> | |||
<!-- <image src="{{huanlechengImgurl+'home_ic_vip.png'}}" mode='widthFix'></image> --> | |||
<view class="vgrade">{{levelName}}</view> | |||
<view class="integralNum">积分:4554</view> | |||
</view> | |||
<view class="view" bindtap='gotoChengzhangzhi'> | |||
<progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | |||
<!-- <view class='remainchengzhangzhi' style="{{typeLsit.sy_xxb_cf.styleClass}}">还需{{upgradeScore}}成长值可升级</view> --> | |||
<view class='remainchengzhangzhi'>还需 | |||
<p style="color:#4D4941">{{upgradeScore}}成长值</p>可升级</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 每日头条 限时抢购 --> | |||
<!-- <view class='toutiao' bindtap='gotoRushBuy' wx:if="{{showQg&&ifStoreApp!=1}}" > | |||
<view class='imgBox'> | |||
<image src='{{toutiao}}' mode='aspectFill'></image> | |||
<!-- 二维码 style="{{typeLsit.sy_qrc.styleClass}}" --> | |||
<view class='qrcode1 fr' bindtap='qrcode'> | |||
<!-- <image src="{{typeLsit.sy_qrc.icon}}" class='qrcodeimg' mode='widthFix'></image> --> | |||
<image src="https://formall.oss-accelerate.aliyuncs.com/cimg/lqcbarcode.png" class='qrcodeimg' mode='widthFix'></image> | |||
</view> | |||
</view> | |||
<view> | |||
今日好物推荐, | |||
<text>'{{xslist[0].title}}'</text>原价 <text>{{xslist[0].priceStr}}</text> 现价... | |||
<!-- banner --> | |||
<c-banner wx:key="unique" list="{{list}}" /> | |||
<!-- 频道 --> | |||
<view class="channelBox" wx:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}"> | |||
<view class='kjBox1' bindtap='goPage' data-obj="{{item}}" wx:for="{{moduleList}}" wx:key="{{index}}"> | |||
<image src='{{item.icon}}' mode='aspectFill'></image> | |||
<view class="text">{{item.name}}</view> | |||
</view> | |||
</view> | |||
<view class='qg' style='border-color:{{qg}}'>抢购</view> | |||
</view> --> | |||
<!--限时抢购 --> | |||
<view class='toutiao1' wx:if="{{showQg&&ifStoreApp!=1}}"> | |||
<view class='xianshi' bindtap='gotoRushBuy'> | |||
<text>限时专区</text> | |||
<text>限时惊爆价 轻松拎回家</text> | |||
</view> | |||
<view class='xsCon'> | |||
<view wx:for="{{xslist}}" wx:key="index"> | |||
<view class='igBox' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap='gotodetail'> | |||
<image src='{{xslist[index].coverImg}}' mode='widthFix' class='imageH'></image> | |||
<view class='imTit'>{{xslist[index].title}}</view> | |||
<!-- 频道 --> | |||
<view class='channelBox' wx:if="{{ifStoreApp==1}}" style="width:525rpx;"> | |||
<view class='kjBox' bindtap='gotoBargain'> | |||
<image src='{{kanjia}}' mode='aspectFill'></image> | |||
<text>砍价</text> | |||
</view> | |||
<view class='kjBox' bindtap='gotoSpellGroup'> | |||
<image src='{{pintuan}}' mode='aspectFill'></image> | |||
<text>拼团</text> | |||
</view> | |||
<view class='kjBox' bindtap='gotoRushBuy'> | |||
<image src='{{xiaofeika}}' mode='aspectFill'></image> | |||
<text>限时抢购</text> | |||
</view> | |||
</view> | |||
<view> | |||
<view class='igBox' bindtap='gotoRushBuy'> | |||
<image src='{{more}}' mode='widthFix' class='more'></image> | |||
<view class='imTit'>更多...</view> | |||
</view> | |||
<!-- <view class='toutiao1' wx:if="{{showQg&&ifStoreApp!=1}}"> | |||
<view class='xianshi' bindtap='gotoRushBuy'> | |||
<text>限时专区</text> | |||
<text>限时惊爆价 轻松拎回家</text> | |||
</view> | |||
<view class='xsCon'> | |||
<view wx:for="{{xslist}}" wx:key="index"> | |||
<view class='igBox' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap='gotodetail'> | |||
<image src='{{xslist[index].coverImg}}' mode='widthFix' class='imageH'></image> | |||
<view class='imTit'>{{xslist[index].title}}</view> | |||
</view> | |||
</view> | |||
<view> | |||
<view class='igBox' bindtap='gotoRushBuy'> | |||
<image src='{{more}}' mode='widthFix' class='more'></image> | |||
<view class='imTit'>更多...</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
--> | |||
<!-- 限时抢购 --> | |||
<c-mould wx:if="{{topicObj2}}" obj="{{topicObj2}}" isShowCount titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_xsqw.png" /> | |||
<!-- 砍价 --> | |||
<c-mould wx:if="{{topicObj3}}" obj="{{topicObj3}}" titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_kj.png" /> | |||
<!-- 拼团 --> | |||
<c-mould wx:if="{{topicObj4}}" obj="{{topicObj4}}" titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_pt.png" /> | |||
<!-- 专题 --> | |||
<c-mould wx:if="{{specialLsit.length>0}}" wx:for="{{specialLsit}}" wx:key="{{index}}" obj="{{item}}" special/> | |||
<!-- 消费卡 --> | |||
<c-mould wx:if="{{topicObj5}}" obj="{{topicObj5}}" titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_xfk.png" /> | |||
<!-- 积分商城 --> | |||
<c-mould wx:if="{{topicObj6}}" obj="{{topicObj6}}" titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_jfsc.png" /> | |||
<optimization wx:if="{{businessList.length>0}}" businessList="{{businessList}}" businessData="{{businessData}}" bind:businessid="getBusineData" /> | |||
<!-- <c-coupons id="lists" bind:myevent="onGetCode" class="business" loadingtext="{{loadingtext}}" loading="{{loading}}" /> --> | |||
<!-- 游戏蒙层 --> | |||
<g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" /> | |||
<!-- 广告蒙层 --> | |||
<c-advertisement id="advertisement" wx:if="{{showGg&&!played&&!havePlayEd1}}" ggdata="{{ggdata}}" /> | |||
</view> | |||
<!-- <view class="game-entry" bindtap='gotogame'> | |||
<image src="{{usergift}}" mode="widthFix" class="gameimg"></image> | |||
</view> --> | |||
<!-- 爆款专区 --> | |||
<c-hot id="hot" /> | |||
<view class='product' wx:if="{{showTopic}}" bindtap='gotoTopic'> | |||
<image src='{{cover}}' mode='widthFix'></image> | |||
<!-- 顶部签到成长值 --> | |||
<view class='signin' wx:if="{{fistLogin}}" animation="{{alphaData}}"> | |||
<open-data class="open" type="userAvatarUrl"></open-data> | |||
<text class='text'>您今日签到成功,获得{{fistLogin}}成长值</text> | |||
</view> | |||
<c-coupons id="lists" bind:myevent="onGetCode" class="business" loadingtext="{{loadingtext}}" loading="{{loading}}" /> | |||
<!-- 游戏蒙层 --> | |||
<g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" /> | |||
<!-- 广告蒙层 --> | |||
<c-advertisement id="advertisement" wx:if="{{showGg&&!played&&!havePlayEd1}}" ggdata="{{ggdata}}" /> | |||
</view> | |||
<!-- 顶部签到成长值 --> | |||
<view class='signin' wx:if="{{fistLogin}}" animation="{{alphaData}}"> | |||
<open-data class="open" type="userAvatarUrl"></open-data> | |||
<text class='text'>您今日签到成功,获得{{fistLogin}}成长值</text> | |||
</view> | |||
<view class="integralBox" wx:if="{{businessSwitch}}"> | |||
<!--是未授权微信且未授权手机号 --> | |||
<navigator url="/pages/getuserinfo/index" open-type="navigate" wx:if="{{accreditFlag==1}}"> | |||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
<!-- 授权了微信 没授权手机号 --> | |||
<navigator url="/pages/getuserinfo/index" open-type="navigate" wx:if="{{accreditFlag==2}}"> | |||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
<!-- 微信和手机号都授权了 跳转到商圈--> | |||
<navigator url="{{goUrl}}" wx:if="{{accreditFlag==3}}"> | |||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
</view> | |||
<view class="integralBox1" wx:if="{{businessSwitch}}"> | |||
<!--是未授权微信且未授权手机号 --> | |||
<navigator url="/pages/getuserinfo/index" open-type="navigate" wx:if="{{accreditFlag==1}}"> | |||
<image src='{{huanlechengImgurl}}home_icon_wgjf.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
<!-- 授权了微信 没授权手机号 --> | |||
<navigator url="/pages/getuserinfo/index" open-type="navigate" wx:if="{{accreditFlag==2}}"> | |||
<image src='{{huanlechengImgurl}}home_icon_wgjf.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
<!-- 微信和手机号都授权了 跳转到商圈--> | |||
<navigator url="{{goUrl}}" wx:if="{{accreditFlag==3}}"> | |||
<image src='{{huanlechengImgurl}}home_icon_wgjf.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||
</navigator> | |||
</view> | |||
</view> |
@@ -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 | |||
} | |||
z-index: 1000000; | |||
} | |||
.integralBox1 { | |||
width: 140rpx; | |||
height: 140rpx; | |||
bottom: 500rpx; | |||
right: 20rpx; | |||
position: fixed; | |||
z-index: 1000000; | |||
} |
@@ -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, | |||
@@ -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({ | |||
@@ -28,8 +28,8 @@ | |||
<!-- 优惠券 --> | |||
<navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}"> | |||
<!-- 首页优惠券列表页面 --> | |||
<view class="coupons1"> | |||
<view class="coupons1-img"> | |||
<view class="coupons1" style="{{mouldType==1?'height: 540rpx;':''}}"> | |||
<view class="coupons1-img" style="{{mouldType==1?'height: 344rpx;':''}}"> | |||
<image src="{{item.coverImg}}"></image> | |||
</view> | |||
<view class="coupons1-info"> | |||
@@ -19,6 +19,7 @@ page { | |||
position: relative; | |||
width:750rpx; | |||
overflow: hidden; | |||
/* box-shadow:0px 14px 26px 0px rgba(199,203,211,1); */ | |||
} | |||
@@ -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 | |||
}) | |||
@@ -4,11 +4,11 @@ | |||
<!-- 券的详情页面 --> | |||
<view class='coupons'> | |||
<view class="coupons-body"> | |||
<view wx:if="{{coverPicture.length>0}}" class="banner"> | |||
<swiper class="index-slide swiper-box" bindchange="swiperChange" indicator-dots="true" circular="false" current="{{swiperCurrent}}"> | |||
<view wx:if="{{coverPicture.length>0}}" class="banner" style="{{mouldType==1?'height: 750rpx;':''}}"> | |||
<swiper class="index-slide swiper-box" style="{{mouldType==1?'height: 750rpx;':''}}" bindchange="swiperChange" indicator-dots="true" circular="false" current="{{swiperCurrent}}"> | |||
<block wx:for="{{coverPicture}}" wx:key="unique"> | |||
<swiper-item> | |||
<image data-data="{{item}}" src="{{item}}" class="index-slide-image" /> | |||
<image data-data="{{item}}" src="{{item}}" class="index-slide-image" style="{{mouldType==1?'height: 750rpx;':''}}"/> | |||
</swiper-item> | |||
</block> | |||
</swiper> | |||
@@ -163,6 +163,7 @@ | |||
data-shippingtype="1" class="arrive">到店自提 | |||
</button> | |||
<button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> | |||
<button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button> | |||
<button class='buy buyHr' disabled='true' wx:if="{{data.sendType!=3&&(data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8)}}">已售罄</button> | |||
<button class='buy' disabled='true' wx:if="{{data.remainInventory==0&&data.type==50||data.remainInventory==0&&data.type==51}}">已兑完</button> | |||
@@ -18,7 +18,7 @@ button::after { | |||
.couponsL c-coupons { | |||
width: 335rpx; | |||
height: 354rpx; | |||
/* height: 354rpx; */ | |||
margin-bottom: 22rpx; | |||
} | |||
@@ -6,6 +6,7 @@ const imgurl = require("../../utils/imgurl"); | |||
let app = getApp(); | |||
Page({ | |||
data: { | |||
mouldType: 0, | |||
navigationBarHeight, | |||
tabData:[ | |||
{ | |||
@@ -44,6 +45,9 @@ Page({ | |||
}) | |||
}, | |||
onLoad(options) { | |||
this.setData({ | |||
mouldType: app.globalData.mouldType, | |||
}) | |||
this.getList(0, 1); | |||
if(options.fromId){ | |||
this.setData({ | |||
@@ -22,7 +22,7 @@ | |||
<view class='mms'> | |||
<image src="{{canTransferred}}" wx-if='{{item.supportTransfer==1}}' class='cantransferred' mode="aspectFill"/> | |||
<view class='detail_msg'> | |||
<image mode="aspectFill" src='{{item.coverImg}}' mode='widthFix'></image> | |||
<image mode="aspectFill" style="{{mouldType==1?'height: 300rpx!important;':'height: 176rpx!important;'}}" src='{{item.coverImg}}' ></image> | |||
<text>{{item.title}}</text> | |||
</view> | |||
<view class='buycardbtn'> | |||
@@ -72,7 +72,7 @@ page{ | |||
.detail_msg image { | |||
display: block; | |||
width: 100%; | |||
height: 176rpx!important; | |||
/* height: 176rpx!important; */ | |||
border-radius: 16rpx; | |||
} | |||
.detail_msg text{ | |||
@@ -180,7 +180,8 @@ Page({ | |||
}) | |||
}, | |||
pay() { | |||
if (this.data.area == "") { | |||
console.log(this.data.shippingtype) | |||
if (this.data.area == "" && this.data.shippingtype==2) { | |||
wx.showToast({ | |||
title: "请选择地址", | |||
icon: 'none', | |||
@@ -13,6 +13,9 @@ Page({ | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function(options) { | |||
wx.switchTab({ | |||
url: '/index1/index1' | |||
}); | |||
console.log("我是中转页面") | |||
let that = this; | |||
console.log(options); | |||
@@ -21,6 +24,7 @@ Page({ | |||
icon: "loading", | |||
duration: 2000 | |||
}) | |||
/** | |||
* 根据接收到的参数的值,判断跳转到哪个页面 | |||
*/ | |||
@@ -146,7 +150,6 @@ Page({ | |||
}) | |||
.then(res => { | |||
// res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') | |||
//参与拼团 | |||
if (options && options.orderGroupId) { | |||
wx.redirectTo({ | |||
@@ -196,7 +199,7 @@ Page({ | |||
// 报名活动页面 | |||
else if (options && options.id && app.globalData.type == 'ra') { | |||
wx.redirectTo({ | |||
url: `/pages/radetail/index?id=${options.id}`, | |||
url: `/pages/radetail/index?id=${options.id}`, | |||
}) | |||
} | |||
//活动签到 | |||
@@ -369,7 +372,7 @@ Page({ | |||
}) | |||
} | |||
// 通过分享进入的门店详情 | |||
else if (options && options.id && options.frommd == 'md') { | |||
else if (options && options.id && options.frommd == 'md' && app.globalData.type == 'md') { | |||
wx.redirectTo({ | |||
url: `/pages/index/searchbar/detail/index?id=${options.id}` | |||
}); | |||
@@ -425,7 +428,7 @@ Page({ | |||
}) | |||
} | |||
// 通过分享进入的门店详情 | |||
else if (options && options.id && options.frommd == 'md') { | |||
else if (options && options.id && options.frommd == 'md' && app.globalData.type == 'md') { | |||
wx.redirectTo({ | |||
url: `/pages/getuserinfo/index?id=${options.id}&frommd=md` | |||
}); | |||
@@ -7,7 +7,7 @@ let app = getApp(); | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
navigationBarHeight, | |||
@@ -238,7 +238,7 @@ Page({ | |||
console.log(res) | |||
var eData = res.target.dataset.id; | |||
console.log(eData) | |||
shareObj.path = `/pages/index/index?id=${eData}&frommd=md`; | |||
shareObj.path = `/pages/index/index?id=${eData}&frommd=md&type=md`; | |||
} | |||
// 返回shareObj | |||
return shareObj; | |||
@@ -236,7 +236,7 @@ page{ | |||
.coupons c-coupons { | |||
width: 335rpx; | |||
height: 354rpx; | |||
/* height: 354rpx; */ | |||
margin-bottom: 22rpx; | |||
} | |||
@@ -198,7 +198,7 @@ Component({ | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}); | |||
}); | |||
}) | |||
}; | |||
if (app.globalData.token && app.globalData.token != null) { | |||
@@ -13,7 +13,7 @@ Page({ | |||
*/ | |||
onLoad: function(options) { | |||
let that = this; | |||
console.log(options,"跳转地址栏"); | |||
console.log(options, "跳转地址栏"); | |||
wx.showToast({ | |||
title: '加载中', | |||
icon: "loading", | |||
@@ -38,7 +38,7 @@ Page({ | |||
that.setData({ | |||
newArr: this.data.scene.split(':') | |||
}) | |||
//// 大屏-二维码-start | |||
if (this.data.newArr[0] == 'JC') { | |||
// 跳转券详情 | |||
@@ -72,17 +72,17 @@ Page({ | |||
} else if (options.type == 'si') { | |||
//活动签到 | |||
options.id = this.data.newArr[2]; | |||
} else if (options.type == 'wj'){ | |||
} else if (options.type == 'wj') { | |||
options.id = this.data.newArr[2]; | |||
} | |||
} | |||
} | |||
wx.setStorageSync('options', JSON.stringify(options)) | |||
wx.setStorageSync('imgurl', imgurl); | |||
if (app.globalData.token) { | |||
this.updateUserInfo(); | |||
// this.updateUserInfo(); | |||
if (options.couponChannelId || options.orderId || options.id) { | |||
that.userStatus(options); | |||
} else { | |||
@@ -92,7 +92,7 @@ Page({ | |||
// 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回 | |||
// 所以此处加入 callback 以防止这种情况 | |||
app.tokenCallback = token => { | |||
this.updateUserInfo(); | |||
// this.updateUserInfo(); | |||
if (options.couponChannelId || options.orderId || options.id) { | |||
that.userStatus(options); | |||
} else { | |||
@@ -114,31 +114,32 @@ Page({ | |||
} | |||
}, | |||
/** | |||
* 获取手机信息 | |||
*/ | |||
updateUserInfo() { | |||
wx.getSystemInfo({ | |||
success: function (res) { | |||
Http.post({ | |||
url: config.api.updateUserInfo, | |||
data: { | |||
systemInfo: JSON.stringify(res) | |||
} | |||
}).then(res => { | |||
console.log(res) | |||
}) | |||
} | |||
}) | |||
}, | |||
* 获取手机信息 | |||
*/ | |||
// updateUserInfo() { | |||
// wx.getSystemInfo({ | |||
// success: function(res) { | |||
// Http.post({ | |||
// url: config.api.updateUserInfo, | |||
// data: { | |||
// systemInfo: JSON.stringify(res) | |||
// } | |||
// }).then(res => { | |||
// console.log(res) | |||
// }) | |||
// } | |||
// }) | |||
// }, | |||
checkuserstatus(options) { | |||
let that = this; | |||
Http.get({ | |||
url: config.api.checkUserStatus, | |||
data: { | |||
token: app.globalData.token | |||
} | |||
}) | |||
url: config.api.checkUserStatus, | |||
data: { | |||
token: app.globalData.token | |||
} | |||
}) | |||
.then(res => { | |||
// res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') | |||
//参与拼团 | |||
@@ -394,25 +395,24 @@ Page({ | |||
wx.redirectTo({ | |||
url: `/pages/getuserinfo/index?id=${options.id}&frommd=md` | |||
}); | |||
}// 门店详情 | |||
} // 门店详情 | |||
else if (options && options.id && app.globalData.type == 'md') { | |||
wx.redirectTo({ | |||
url: `/pages/index/searchbar/detail/index?id=${options.id}` | |||
}); | |||
} | |||
// 答题问卷 | |||
else if (options && options.id && app.globalData.type == 'wj'){ | |||
else if (options && options.id && app.globalData.type == 'wj') { | |||
wx.redirectTo({ | |||
url: `/pages/questionnaire/questionnaire?id=${options.id}`, | |||
}) | |||
} | |||
} | |||
// 报名活动页面 | |||
else if (options && options.id && app.globalData.type == 'ra') { | |||
wx.redirectTo({ | |||
url: `/pages/radetail/index?id=${options.id}`, | |||
}) | |||
} | |||
else if (app.globalData.type == 'uc') { | |||
} else if (app.globalData.type == 'uc') { | |||
wx.switchTab({ | |||
url: '/index/user' | |||
}); | |||
@@ -423,6 +423,12 @@ Page({ | |||
url: '/pages/integralmall/index' | |||
}); | |||
} | |||
// 专题 | |||
else if (options && options.id && app.globalData.type == 'td') { | |||
wx.redirectTo({ | |||
url: `/pages/topicDetail/index?id=${options.id}` | |||
}); | |||
} | |||
// 首页 | |||
else if (app.globalData.type == 'in') { | |||
wx.switchTab({ | |||
@@ -245,8 +245,21 @@ Page({ | |||
/** | |||
* 用户点击右上角分享 | |||
*/ | |||
*/ | |||
onShareAppMessage: function() { | |||
var that = this; | |||
var shareObj = { | |||
title: "问卷详情", | |||
path: `/pages/main/index?id=${that.data.id}&type=wj`, | |||
success: function (res) { | |||
if (res.errMsg == 'shareAppMessage:ok') { } | |||
}, | |||
fail: function (error) { | |||
if (res.errMsg == 'shareAppMessage:fail cancel') { } else if (res.errMsg == 'shareAppMessage:fail') { } | |||
} | |||
}; | |||
console.log(shareObj) | |||
// 返回shareObj | |||
return shareObj; | |||
} | |||
}) |
@@ -127,4 +127,4 @@ Page({ | |||
} | |||
return shareObj; | |||
}, | |||
}); | |||
}); |
@@ -11,6 +11,7 @@ Page({ | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
mouldType: 0, | |||
navigationBarHeight, | |||
fenxiang: imgurl.fenxiang1.url, | |||
homeSelectedO: imgurl.homeSelectedO.url, | |||
@@ -54,6 +55,9 @@ Page({ | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
this.setData({ | |||
mouldType:app.globalData.mouldType | |||
}) | |||
Http.get({ | |||
url: config.api.checkUserStatus, | |||
data: { | |||
@@ -760,9 +764,10 @@ Page({ | |||
*/ | |||
onShow: function () { | |||
this.setData({ | |||
mouldType: app.globalData.mouldType, | |||
canSpell: true, | |||
canBuyIf: true, | |||
showTime: true | |||
showTime: true, | |||
}) | |||
if (this.data.spellData != null) { | |||
this.countdown() | |||
@@ -1,12 +1,12 @@ | |||
<navbar back home text="拼团券" background='#fff'></navbar> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class="content-box" > | |||
<view class="content-box" > | |||
<view class='content'> | |||
<view wx:if="{{coverPicture.length>0}}" class="banner"> | |||
<swiper class="index-slide swiper-box" bindchange="swiperChange" indicator-dots="true" autoplay="true" circular="false" current="{{swiperCurrent}}"> | |||
<view wx:if="{{coverPicture.length>0}}" class="banner" style="{{mouldType==1?'height: 750rpx;':''}}"> | |||
<swiper class="index-slide swiper-box" style="{{mouldType==1?'height: 750rpx;':''}}" bindchange="swiperChange" indicator-dots="true" autoplay="true" circular="false" current="{{swiperCurrent}}"> | |||
<block wx:for="{{coverPicture}}" wx:key="unique"> | |||
<swiper-item> | |||
<image data-data="{{item}}" src="{{item}}" class="index-slide-image" /> | |||
<swiper-item > | |||
<image data-data="{{item}}" style="{{mouldType==1?'height: 750rpx;':''}}" src="{{item}}" class="index-slide-image" /> | |||
</swiper-item> | |||
</block> | |||
</swiper> | |||
@@ -3,11 +3,13 @@ var config = require("../../config/config.js"); | |||
const Http = require("../../utils/HttpBasics"); | |||
const imgurl = require("../../utils/imgurl"); | |||
const { spellStatus,spellStatus02 } = require("../../utils/spell"); | |||
let app = getApp(); | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
mouldType: 0, | |||
navigationBarHeight, | |||
noCoupon: imgurl.noCoupon.url, | |||
bannerUrl: imgurl.banner.url, | |||
@@ -39,6 +41,9 @@ Page({ | |||
}) | |||
}, | |||
onLoad: function (options) { | |||
this.setData({ | |||
mouldType: app.globalData.mouldType | |||
}) | |||
let that = this; | |||
that.getBannerlist(); | |||
var todayDate = new Date().getTime(); | |||
@@ -76,6 +81,9 @@ Page({ | |||
} | |||
}, | |||
onShow(){ | |||
this.setData({ | |||
mouldType: app.globalData.mouldType | |||
}) | |||
let that=this; | |||
if (this.data.reloadIf){ | |||
wx.setNavigationBarTitle({ | |||
@@ -2,7 +2,7 @@ | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class='content-box'> | |||
<!-- <view class='top' wx:if='{{flag=="spellList"&&list.length>0}}'> | |||
<view class="banner" wx:if="{{list.length>0}}" hover-class="none" hover-stop-propagation="false"> | |||
<view class="banner" wx:if="{{list.length>0}}" hover-class="none" hover-stop-propagation="false"> | |||
<c-banner wx:key="unique" list="{{list}}" /> | |||
</view> | |||
</view> --> | |||
@@ -17,8 +17,8 @@ | |||
</view> | |||
<view class='content'> | |||
<view class='sepll-list' wx:if='{{flag=="spellList"}}' wx:for="{{lists}}" wx:key="{{index}}" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'> | |||
<view class='spell-left'> | |||
<image src='{{item.coverImg}}' mode="aspectFill"></image> | |||
<view class='spell-left' style="{{mouldType==1?'height: 300rpx':''}}"> | |||
<image src='{{item.coverImg}}' style="{{mouldType==1?'height: 300rpx;':''}}" mode="aspectFill"></image> | |||
</view> | |||
<view class='spell-centerH'> | |||
<view class='tilte'>{{item.title}}</view> | |||
@@ -70,11 +70,12 @@ image{ | |||
.content .sepll-list{ | |||
width: 346rpx; | |||
height: 432rpx; | |||
/* height: 432rpx; */ | |||
background: #fff; | |||
border-radius: 30rpx; | |||
margin-top: 20rpx; | |||
margin-bottom: 20rpx; | |||
overflow: hidden; | |||
} | |||
.content >view:nth-of-type(2n){ | |||
float: right; | |||
@@ -85,11 +86,13 @@ image{ | |||
.content .spell-left{ | |||
width: 100%; | |||
height: 196rpx; | |||
overflow: hidden; | |||
} | |||
.content .spell-left image{ | |||
width: 300rpx; | |||
height: 176rpx; | |||
margin: 20rpx; | |||
border-radius: 20rpx; | |||
} | |||
.content .spell-center{ | |||
padding: 0 20rpx; | |||
@@ -108,10 +111,12 @@ image{ | |||
overflow: hidden; | |||
text-overflow:ellipsis; | |||
white-space: nowrap; | |||
width: 90%; | |||
margin: 0 auto; | |||
} | |||
.content .remark{ | |||
height: 44rpx; | |||
width:304rpx; | |||
/* width:304rpx; */ | |||
font-size:24rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
@@ -120,10 +125,13 @@ image{ | |||
overflow: hidden; | |||
text-overflow:ellipsis; | |||
white-space: nowrap; | |||
width: 90%; | |||
margin: 0 auto; | |||
} | |||
.content .numBox{ | |||
display: flex; | |||
justify-content: space-between; | |||
} | |||
.content .spell-num{ | |||
width: 80rpx; | |||
@@ -142,6 +150,7 @@ image{ | |||
margin-bottom: 20rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
} | |||
.spell-centerH { | |||
padding: 0 10rpx; | |||
@@ -6,6 +6,7 @@ const util = require("../../utils/util"); | |||
const imgurl = require("../../utils/imgurl"); | |||
Page({ | |||
data: { | |||
mouldType: 0, | |||
navigationBarHeight, | |||
data: { | |||
bgColor:"#fff" | |||
@@ -16,9 +17,13 @@ Page({ | |||
day: "", | |||
hour: "", | |||
minute: "", | |||
nodes: '' | |||
nodes: '', | |||
id:'', | |||
}, | |||
onLoad(options){ | |||
this.setData({ | |||
mouldType: app.globalData.mouldType | |||
}) | |||
console.log(options) | |||
if(options&&options.id){ | |||
this.setData({ | |||
@@ -27,7 +32,7 @@ Page({ | |||
this.topicShow(options.id) | |||
} | |||
}, | |||
goback: function () { | |||
goback: function () { | |||
wx.switchTab({ | |||
url: '/index/index', | |||
}) | |||
@@ -85,7 +90,20 @@ Page({ | |||
} | |||
}, | |||
onShareAppMessage: function (options) { | |||
var that = this; | |||
var shareObj = { | |||
title: "专题活动", | |||
path: `/pages/main/index?id=${that.data.id}&type=td`, | |||
success: function (res) { | |||
if (res.errMsg == 'shareAppMessage:ok') { } | |||
}, | |||
fail: function (error) { | |||
if (res.errMsg == 'shareAppMessage:fail cancel') { } else if (res.errMsg == 'shareAppMessage:fail') { } | |||
} | |||
}; | |||
console.log(shareObj) | |||
// 返回shareObj | |||
return shareObj; | |||
} | |||
}); |
@@ -5,7 +5,7 @@ | |||
<view class='coupons' style='background:{{data.bgColor}};height:{{winHeight}};padding-top:{{navigationBarHeight}}'> | |||
<view class="coupons-body"> | |||
<view class='banner'> | |||
<image src='{{data.advert}}' mode='widthFix'></image> | |||
<image src='{{data.advert}}' style="" mode='widthFix'></image> | |||
</view> | |||
<view class='act'> | |||
<view class='txt001'>{{data.name}}</view> | |||
@@ -20,13 +20,13 @@ | |||
<!-- 优惠券 --> | |||
<view class='navigator' wx:for="{{data.couponList}}" wx:key="{{index}}" data-couponId='{{item.couponId}}' data-type='{{item.type}}' data-couponChannelId='{{item.id}}' bindtap='gotoDetail'> | |||
<!-- 首页优惠券列表页面 --> | |||
<view class="coupons1"> | |||
<view class="coupons1-img"> | |||
<image src="{{item.coverImg}}"></image> | |||
<view class="coupons1" style="{{mouldType==1?'height: 560rpx':''}}"> | |||
<view class="coupons1-img" style="{{mouldType==1?'height: 344rpx':''}}"> | |||
<image src="{{item.coverImg}}" style="{{mouldType==1?'height: 344rpx':''}}"></image> | |||
</view> | |||
<view class="coupons1-info"> | |||
<view class="coupons1-info-name tit">{{item.title}}</view> | |||
<view class="coupons1-info-name subtitle">{{item.subTitle}}</view> | |||
<view class="coupons1-info-name subtitle" wx:if="{{item.subTitle}}">{{item.subTitle}}</view> | |||
<view class="coupons1-info-price-p"> | |||
<text class="i">¥</text>{{item.salePriceStr}} | |||
<view class="coupons-info-manjian" style="margin-top:10rpx;font-size:28rpx;" wx:if="{{item.type == 1}}"> | |||
@@ -24,11 +24,11 @@ | |||
"disablePlugins": [], | |||
"outputPath": "" | |||
}, | |||
"preloadBackgroundData": false, | |||
"compileHotReLoad": false, | |||
"useIsolateContext": true, | |||
"useCompilerModule": true, | |||
"userConfirmedUseCompilerModuleSwitch": false | |||
"minifyWXML": true, | |||
"useMultiFrameRuntime": true, | |||
"useApiHook": true, | |||
"useApiHostProcess": true, | |||
"useIsolateContext": true | |||
}, | |||
"compileType": "miniprogram", | |||
"libVersion": "2.16.0", | |||
@@ -39,15 +39,12 @@ | |||
"simulatorPluginLibVersion": {}, | |||
"condition": { | |||
"search": { | |||
"current": -1, | |||
"list": [] | |||
}, | |||
"conversation": { | |||
"current": -1, | |||
"list": [] | |||
}, | |||
"plugin": { | |||
"current": -1, | |||
"list": [] | |||
}, | |||
"game": { | |||
@@ -55,33 +52,10 @@ | |||
"list": [] | |||
}, | |||
"gamePlugin": { | |||
"current": -1, | |||
"list": [] | |||
}, | |||
"miniprogram": { | |||
"current": -1, | |||
"list": [ | |||
{ | |||
"id": 1, | |||
"name": "直播列表", | |||
"pathName": "pages2/live/livelist/index", | |||
"query": "", | |||
"scene": null | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "我的", | |||
"pathName": "index/user", | |||
"query": "", | |||
"scene": null | |||
}, | |||
{ | |||
"id": 3, | |||
"name": "pages/index/index", | |||
"pathName": "pages/index/index", | |||
"query": "type=zb", | |||
"scene": null | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "券详情", | |||
@@ -89,20 +63,6 @@ | |||
"query": "type=cd&couponChannelId=420885883373359104", | |||
"scene": null | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "pages/main/index", | |||
"pathName": "pages/main/index", | |||
"query": "type=cd&couponChannelId=489599575725629440", | |||
"scene": null | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "活动日历", | |||
"pathName": "pages/dateLsit/dateLsit", | |||
"query": "", | |||
"scene": null | |||
}, | |||
{ | |||
"id": 8, | |||
"name": "pages/questionnaire/questionnaireLsit/questionnaireLsit", | |||
@@ -133,25 +93,12 @@ | |||
"scene": null | |||
}, | |||
{ | |||
"id": 10, | |||
"name": "123", | |||
"pathName": "pages/bargain/bargainDatail/bargainDatail", | |||
"query": "orderId=601302157553754112&from=discount&composeOrderType=0", | |||
"scene": null | |||
}, | |||
{ | |||
"id": -1, | |||
"name": "填写订单", | |||
"pathName": "pages/fillIndent/fillIndent", | |||
"query": "", | |||
"scene": null | |||
}, | |||
{ | |||
"id": 12, | |||
"name": "授权测试", | |||
"pathName": "/pages/getuserinfo/index", | |||
"id": 5, | |||
"name": "pages/index/index", | |||
"pathName": "pages/index/index", | |||
"query": "", | |||
"scene": null | |||
"scene": 1036, | |||
"referrerInfo": {} | |||
} | |||
] | |||
} | |||
@@ -29,6 +29,22 @@ function fmtDate(date) { | |||
return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''); | |||
} | |||
function toHHmmss(date) {//传入时间戳获取时分秒 | |||
var time; | |||
var d = Math.floor(date / 1000 / 60 / 60 / 24) | |||
var hours = Math.floor(((date / 1000 / 60 / 60) % 24) + 24 * d) | |||
var minutes = Math.floor((date / 1000 / 60) % 60) | |||
var seconds = Math.floor((date / 1000) % 60) | |||
if (date<=0){ | |||
time = "00:00:00" | |||
}else{ | |||
time = (hours < 10 ? ('0' + hours) : hours) + ':' + (minutes < 10 ? ('0' + minutes) : minutes) + ':' + (seconds < 10 ? ('0' + seconds) : seconds); | |||
} | |||
return time; | |||
} | |||
const formatTime = (date, fmt) => { | |||
try { | |||
@@ -194,6 +210,7 @@ function getProxyImgUrl(str) { | |||
return str1 | |||
} | |||
module.exports = { | |||
toHHmmss: toHHmmss, | |||
formatTime: formatTime, | |||
barcode: barc, | |||
qrcode: qrc, | |||