|
|
@@ -13,30 +13,36 @@
|
|
|
</view>
|
|
|
<!-- 通知栏 -->
|
|
|
<view class="tongz flex">
|
|
|
- <view >
|
|
|
- <view class="tongz-bg">
|
|
|
- <image src="../../static/img/tongz-bg.png" mode=""></image>
|
|
|
- </view>
|
|
|
+ <view>
|
|
|
+ <view class="tongz-bg"><image src="../../static/img/tongz-bg.png" mode=""></image></view>
|
|
|
<view class="tongz-left flex">
|
|
|
<image class="image-left" src="../../static/img/ling.png" mode=""></image>
|
|
|
- <u-notice-bar style="width: 100%;" mode="vertical" type="none" :volume-icon="false" :more-icon="true" :list="showList.infoList" @click="goDetails" @getMore="nav('/pages/index/nodeList')"></u-notice-bar>
|
|
|
+ <u-notice-bar
|
|
|
+ style="width: 100%;"
|
|
|
+ mode="vertical"
|
|
|
+ type="none"
|
|
|
+ :volume-icon="false"
|
|
|
+ :more-icon="true"
|
|
|
+ :list="showList.infoList"
|
|
|
+ @click="goDetails"
|
|
|
+ @getMore="nav('/pages/index/nodeList')"
|
|
|
+ ></u-notice-bar>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="box-body">
|
|
|
<view class="navBox">
|
|
|
<view class="navBox-left">
|
|
|
- <!-- <view class="navBox-item" @click="nav('./node')"><image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image></view> -->
|
|
|
- <view class="navBox-item" @click="node()"><image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image></view>
|
|
|
+ <view class="navBox-item" @click="nav('./node')"><image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image></view>
|
|
|
</view>
|
|
|
<view class="navBox-right">
|
|
|
<view class="navBox-item" @click="nav('./convert')"><image src="../../static/img/index3.png" style="width: 385rpx; height: 216rpx; " mode=""></image></view>
|
|
|
- <!-- <view class="navBox-item" @click="nav('/pages/index/appointment')">
|
|
|
- <image src="../../static/img/index6.png" style="width: 339rpx; height: 170rpx; margin-top: -12rpx;" mode=""></image>
|
|
|
- </view> -->
|
|
|
- <view class="navBox-item" @click="node()">
|
|
|
+ <view class="navBox-item" @click="nav('/pages/index/appointment')">
|
|
|
<image src="../../static/img/index6.png" style="width: 339rpx; height: 170rpx; margin-top: -12rpx;" mode=""></image>
|
|
|
</view>
|
|
|
+ <!-- <view class="navBox-item" @click="node()">
|
|
|
+ <image src="../../static/img/index6.png" style="width: 339rpx; height: 170rpx; margin-top: -12rpx;" mode=""></image>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="shopBox" v-for="(item, index) in list" :key="index">
|
|
|
@@ -46,10 +52,11 @@
|
|
|
<text id="one">{{ item.name }}</text>
|
|
|
<text id="two">{{ item.lun }}轮</text>
|
|
|
</view>
|
|
|
- <view v-if="'childList' in item">
|
|
|
+ <view v-if="'childList' in item && item.type == 1">
|
|
|
<text id="three" v-if="item.childList.next_pink_status">待开团</text>
|
|
|
- <text id="three" v-else>拼购中</text>
|
|
|
+ <text id="three" v-else>预约中</text>
|
|
|
</view>
|
|
|
+ <view v-if="item.type == 2"><text id="three" v-if="item.childList.next_pink_status">未开始</text></view>
|
|
|
</view>
|
|
|
<view class="shopBox-between">
|
|
|
<view class="number">
|
|
|
@@ -69,7 +76,11 @@
|
|
|
<text>{{ 1 * item.ticket }}{{ item.ticket_money_type }}</text>
|
|
|
</view>
|
|
|
<view class="appointmentTime">
|
|
|
- 预约时间:
|
|
|
+ 预约开始时间:
|
|
|
+ <text>{{ item.start }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="appointmentTime">
|
|
|
+ 预约结束时间:
|
|
|
<text>{{ item.end }}</text>
|
|
|
</view>
|
|
|
<view class="lotteryTime">
|
|
|
@@ -78,12 +89,12 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="btn-box flex">
|
|
|
- <view class="submit1" @click="lalaDetial(item.id)">当天拼购</view>
|
|
|
- <view v-if="'childList' in item">
|
|
|
+ <view class="submit1" @click="lalaDetial(item.id)">当天预约</view>
|
|
|
+ <view v-if="'childList' in item && item.type == 1">
|
|
|
<view class="submit" v-if="item.childList.next_pink_status">待开团</view>
|
|
|
- <view class="submit" @click="buy(item)" v-else>拼购</view>
|
|
|
+ <view class="submit" @click="buy(item)" v-else>预约</view>
|
|
|
</view>
|
|
|
-
|
|
|
+ <view v-if="item.type == 2"><view class="submit">未开始</view></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -144,7 +155,8 @@ export default {
|
|
|
carouselList: [],
|
|
|
swiperLength: 0,
|
|
|
swiperCurrent: 0,
|
|
|
- showList:[]
|
|
|
+ showList: [],
|
|
|
+ start: '' //平团开始时间
|
|
|
};
|
|
|
},
|
|
|
//页面加载即刻发生
|
|
|
@@ -163,35 +175,55 @@ export default {
|
|
|
obj.carouselList = data.banner;
|
|
|
obj.swiperLength = data.banner.length;
|
|
|
let arr = data.roll;
|
|
|
- let ar = []
|
|
|
+ let ar = [];
|
|
|
arr.forEach(e => {
|
|
|
- ar.push(e.info)
|
|
|
- })
|
|
|
+ ar.push(e.info);
|
|
|
+ });
|
|
|
arr.infoList = ar;
|
|
|
obj.showList = arr;
|
|
|
lala({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
}).then(({ data }) => {
|
|
|
-
|
|
|
data.list.data.forEach((e, index) => {
|
|
|
lalaDetial({ page: 1, limit: 1 }, e.id).then(les => {
|
|
|
// e.childList = les.data
|
|
|
- let date = les.data.open_times[0].name.split(' ')
|
|
|
- e.start = date[0] + ' ' + les.data.lala_pink_open
|
|
|
- e.end = getTime(les.data.next_pink.value - les.data.close_join * 60)
|
|
|
- console.log(les.data.next_pink.value - les.data.close_join * 60)
|
|
|
- for(let i = 0;i<les.data.open_times.length;i++){
|
|
|
- if(les.data.open_times[i].value == les.data.next_pink.value){
|
|
|
- e.lun = i+1
|
|
|
+ //开团时间
|
|
|
+ let date = les.data.open_times[0].name.split(' ');
|
|
|
+ let start = date[0] + ' ' + les.data.lala_pink_open + ':00';
|
|
|
+ start = new Date(start);
|
|
|
+ start = start.getTime();
|
|
|
+ obj.start = start;
|
|
|
+ //当前时间
|
|
|
+ let dateTime = new Date().valueOf();
|
|
|
+ //结束时间
|
|
|
+ let endTime = les.data.open_times[5].value * 1000;
|
|
|
+ //如果当前时间在开团时间之前或在结束时间之后,显示未开始
|
|
|
+ if (dateTime > start || dataTime < endTime) {
|
|
|
+ e.type = 1;
|
|
|
+ } else {
|
|
|
+ e.type = 2;
|
|
|
+ }
|
|
|
+ //拼团结束时间
|
|
|
+ e.end = getTime(les.data.next_pink.value - les.data.close_join * 60);
|
|
|
+ for (let i = 0; i < les.data.open_times.length; i++) {
|
|
|
+ if (les.data.open_times[i].value == les.data.next_pink.value) {
|
|
|
+ //拼团的轮数
|
|
|
+ e.lun = i + 1;
|
|
|
+ //拼团开始时间
|
|
|
+ if (i != 0) {
|
|
|
+ let j = i - 1;
|
|
|
+ e.start = getTime(les.data.open_times[j].value);
|
|
|
+ } else {
|
|
|
+ e.start = getTime(obj.start);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
obj.$set(e, 'childList', les.data);
|
|
|
-
|
|
|
});
|
|
|
});
|
|
|
obj.list = data.list.data;
|
|
|
- console.log(obj.list,"1111111")
|
|
|
+ console.log(obj.list, '1111111');
|
|
|
uni.stopPullDownRefresh();
|
|
|
uni.hideLoading();
|
|
|
});
|
|
|
@@ -199,17 +231,16 @@ export default {
|
|
|
.catch(e => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
nav(url) {
|
|
|
- console.log(url)
|
|
|
+ console.log(url);
|
|
|
uni.navigateTo({
|
|
|
url: url
|
|
|
});
|
|
|
},
|
|
|
buy(item) {
|
|
|
this.money = 1 * item.cost + item.cost_money_type;
|
|
|
- this.souxu = 1* item.ticket + item.ticket_money_type;
|
|
|
+ this.souxu = 1 * item.ticket + item.ticket_money_type;
|
|
|
this.id = item.id;
|
|
|
this.show = true;
|
|
|
},
|
|
|
@@ -235,7 +266,7 @@ export default {
|
|
|
this.show1 = false;
|
|
|
},
|
|
|
pswQd() {
|
|
|
- const obj = this
|
|
|
+ const obj = this;
|
|
|
buylala(
|
|
|
{
|
|
|
trade_psw: this.password
|
|
|
@@ -245,7 +276,7 @@ export default {
|
|
|
.then(e => {
|
|
|
this.password = '';
|
|
|
this.show1 = false;
|
|
|
- this.$api.msg("参与拼购成功");
|
|
|
+ this.$api.msg('参与拼购成功');
|
|
|
})
|
|
|
.catch(e => {
|
|
|
this.password = '';
|
|
|
@@ -267,12 +298,12 @@ export default {
|
|
|
this.swiperCurrent = index;
|
|
|
this.titleNViewBackground = this.carouselList[index].background;
|
|
|
},
|
|
|
- goDetails(e){
|
|
|
+ goDetails(e) {
|
|
|
uni.navigateTo({
|
|
|
url: this.showList[e].url
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
@@ -311,24 +342,24 @@ export default {
|
|
|
.swiper-dots-item {
|
|
|
width: 14rpx;
|
|
|
height: 14rpx;
|
|
|
- background: #AAAAAA;
|
|
|
+ background: #aaaaaa;
|
|
|
border-radius: 50%;
|
|
|
margin: 0 16rpx;
|
|
|
// z-index: 999;
|
|
|
}
|
|
|
|
|
|
.action {
|
|
|
- background-color: #FFFFFF;
|
|
|
+ background-color: #ffffff;
|
|
|
}
|
|
|
}
|
|
|
-.tongz{
|
|
|
+.tongz {
|
|
|
width: 690rpx;
|
|
|
height: 70rpx;
|
|
|
margin: 48rpx auto 0;
|
|
|
padding: 18rpx 30rpx 18rpx 24rpx;
|
|
|
align-items: center;
|
|
|
position: relative;
|
|
|
- .tongz-bg{
|
|
|
+ .tongz-bg {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
right: 0;
|
|
|
@@ -351,7 +382,7 @@ export default {
|
|
|
font-size: 28rpx;
|
|
|
font-family: Source Han Sans CN;
|
|
|
font-weight: 400;
|
|
|
- color: #0F253A;
|
|
|
+ color: #0f253a;
|
|
|
}
|
|
|
}
|
|
|
.tongz-right {
|
|
|
@@ -359,7 +390,7 @@ export default {
|
|
|
z-index: 11;
|
|
|
width: 12rpx;
|
|
|
height: 26rpx;
|
|
|
- image{
|
|
|
+ image {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
@@ -548,7 +579,7 @@ export default {
|
|
|
.submit1 {
|
|
|
width: 280rpx;
|
|
|
height: 70rpx;
|
|
|
- background: #FFFFFF;
|
|
|
+ background: #ffffff;
|
|
|
border: 1px solid #60bab0;
|
|
|
border-radius: 35rpx;
|
|
|
font-size: 32rpx;
|