咖啡饮品提交

This commit is contained in:
duan
2025-03-11 14:56:37 +08:00
parent c1917c5fa3
commit d4240c4012
28 changed files with 1666 additions and 286 deletions

View File

@@ -1,7 +1,5 @@
<template>
<view class="content">
<!-- 占位符导航栏 -->
<navseat :opacity='opacity' :title='titlename' :titleshow='true'></navseat>
<view class="onecontent">
<view class="onecontentabsolute"></view>
</view>
@@ -16,19 +14,18 @@
<view class="towcontentoneboxswiper">
<swiper class="swiper" circular :autoplay='true' :vertical='true' display-multiple-items="4"
:interval="'3000'">
<swiper-item class="swiperitem" v-for="(item,index) in orderfindWiningUserlist"
<swiper-item class="swiperitem" v-for="(item, index) in orderfindWiningUserlist"
:key="index">
<view class="swiper-item">{{item.userName}}* 免单{{item.orderAmount}}元订单号{{item.orderNo}}
<view class="swiper-item">{{ item.userName }}* 免单{{ item.orderAmount }}元订单号{{ item.orderNo }}
</view>
</swiper-item>
</swiper>
</view>
</view>
</view>
<view class="towcontentoness">
<view class="towcontentonebox_box">
订单数{{total}}
订单数10
</view>
<view class="towcontentonebox">
<view class="towcontentoneboxswiper">
@@ -43,36 +40,19 @@
金额
</view>
</view>
<view class="swiperitem" v-for="(item,index) in ordermineWinnerList" :key="index">
<view class="swiperitem" v-for="(item, index) in ordermineWinnerList" :key="index">
<view class="swiper-item" style="margin-top: 32rpx;">
<view class="swiper_itemone">
{{item.isRefund == true ? '已免单':'待免单'}}
{{ item.isRefund == true ? '已免单' : '待免单' }}
</view>
<view class="swiper_itemtow">
{{item.orderNo}}
{{ item.orderNo }}
</view>
<view class="swiper_itemthere">
{{item.orderAmount}}
{{ item.orderAmount }}
</view>
</view>
</view>
<!-- <swiper class="swiper" circular :autoplay='true' :vertical='true' interval="3000"
display-multiple-items="4">
<swiper-item class="swiperitem" v-for="(item,index) in orderfindWiningUserlist"
:key="index">
<view class="swiper-item">
<view class="swiper_itemone">
{{item.orderAmount}}
</view>
<view class="swiper_itemtow">
{{item.orderNo}}
</view>
<view class="swiper_itemthere">
{{item.isRefund == true ? '已免单':'待免单'}}
</view>
</view>
</swiper-item>
</swiper> -->
</view>
</view>
</view>
@@ -83,295 +63,266 @@
</view>
</template>
<script>
import {
forEach
} from 'lodash';
import navseat from '@/components/navseat.vue'
export default {
components: {
navseat
},
data() {
return {
titlename: '',
opacity: false,
orderfindWiningUserlist: [],
ordermineWinnerList: [],
form: {
address: '', //地址
type: '', //品类
orderBy: '', //1.理我最近 2.销量优先 3.价格优先
other: '', //附近1KM 1选中 0不选中
page: 1, //页数
size: 10, //页容量
status: 'loadmore'
},
total:0
};
},
onLoad(e) {
this.orderfindWiningUser()
this.ordermineWinnerEvent()
let _this = this
uni.getStorage({
key: 'itemData',
success: function(res) {
_this.titlename = res.data.name
}
});
},
onReachBottom() {
this.ordermineWinnerEvent()
},
onPageScroll(e) {
if (e.scrollTop <= 44) { //搜索导航栏
this.opacity = false
} else {
this.opacity = true
}
},
methods: {
<script setup>
import {
reactive,
ref
} from 'vue';
let orderfindWiningUserlist = ref([{
userName: "王*",
orderAmount: 12,
orderNo: 213504512353548688546
}, {
userName: "赵*",
orderAmount: 48,
orderNo: 65481188834105643623210
}, {
userName: "钱*",
orderAmount: 91,
orderNo: 5891051346764518249444
}, {
userName: "孙*",
orderAmount: 84,
orderNo: 688472546798742575342
}, {
userName: "王",
orderAmount: 73,
orderNo: 597344582826533594131
}, {
userName: "郑*",
orderAmount: 98,
orderNo: 469867684658481051627
}, {
userName: "凯*",
orderAmount: 95,
orderNo: 895961781634536230631
},
cut(str, firstStr, lastStr) {
let start = str.indexOf(firstStr);
let end = str.lastIndexOf(lastStr);
return str.slice(start, end + 1); //slice方法截取的部分不包括第二参数所在位置
},
async ordermineWinnerEvent() {
let res = await this.api.ordermineWinner({
userId: uni.getStorageSync('userInfo').id,
page: this.form.page,
size: this.form.size
})
if(res.code ==0){
this.total = res.data.total
if(this.form.page==1){
this.ordermineWinnerList = res.data.list
}else{
this.ordermineWinnerList.push(...res.data.list)
}
this.form.page = ++this.form.page;
}
},
async orderfindWiningUser() {
let res = await this.api.orderfindWiningUser()
this.orderfindWiningUserlist = res.data.map((i) => {
i.userName = i.userName.slice(0, 1)
return i
})
}
}
};
])
let ordermineWinnerList = ref([{
isRefund: true,
orderNo: 895961781634536230631,
orderAmount: "95"
},
{
isRefund: true,
orderAmount: 74,
orderNo: 222674526516892311380
},
{
isRefund: false,
orderAmount: 23,
orderNo: 862674526546892311380
},
])
</script>
<style scoped lang="scss">
page {
background: #F9F9F9;
page {
background: #F9F9F9;
}
.content {
.onecontent {
width: 100%;
height: 684.19rpx;
position: relative;
background: linear-gradient(96deg, #F9F2D9 0%, #FBE1DA 100%);
.onecontentabsolute {
position: absolute;
top: 0;
height: 534.19rpx;
width: 100%;
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/mrmd.png) no-repeat;
background-size: 100% 100%;
}
}
.content {
.onecontent {
width: 100%;
height: 684.19rpx;
position: relative;
background: linear-gradient(96deg, #F9F2D9 0%, #FBE1DA 100%);
.towcontent {
position: relative;
padding: 0 28rpx;
width: 100%;
margin-top: -100rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(249, 242, 217, 0.77) 10%, #F5DFDF 100%);
.onecontentabsolute {
.towcontentone {
position: relative;
width: 100%;
background: linear-gradient(180deg, rgba(255, 241, 204, 0.77) 0%, rgba(255, 255, 255, 0.56) 40%, #FFFFFF 100%);
border-radius: 30rpx 30rpx 30rpx 30rpx;
border: 2rpx solid #FFFFFF;
padding: 32rpx 24rpx;
.towcontentoneimage {
position: absolute;
top: 0;
height: 534.19rpx;
top: -30rpx;
left: 50%;
transform: translatex(-50%);
width: 118rpx;
height: 46rpx;
}
.towcontentonebox {
width: 100%;
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/mrmd.png) no-repeat;
background-size: 100% 100%;
.towcontentoneboximage {
width: 171.63rpx;
height: 37.24rpx;
}
.towcontentoneboxswiper {
width: 100%;
padding-top: 24rpx;
overflow: hidden;
.swiper {
height: 242rpx;
.swiperitem {
height: 40rpx;
.swiper-item {
display: block;
height: 40rpx;
text-align: left;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
}
}
}
}
.towcontent {
position: relative;
padding: 0 28rpx;
.towcontentoness {
margin-top: 48rpx;
width: 100%;
margin-top: -100rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(249, 242, 217, 0.77) 10%, #F5DFDF 100%);
background: rgba(255, 255, 255, 0.96);
border-radius: 30rpx 30rpx 30rpx 30rpx;
padding: 38rpx 48rpx;
.towcontentone {
position: relative;
width: 100%;
background: linear-gradient(180deg, rgba(255, 241, 204, 0.77) 0%, rgba(255, 255, 255, 0.56) 40%, #FFFFFF 100%);
.towcontentonebox_box {
margin: 0 auto;
text-align: center;
width: 262rpx;
height: 58rpx;
line-height: 58rpx;
background: #FFA436;
border-radius: 30rpx 30rpx 30rpx 30rpx;
border: 2rpx solid #FFFFFF;
padding: 32rpx 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
}
.towcontentoneimage {
position: absolute;
top: -30rpx;
left: 50%;
transform: translatex(-50%);
width: 118rpx;
height: 46rpx;
.towcontentonebox {
width: 100%;
.towcontentoneboximage {
width: 171.63rpx;
height: 37.24rpx;
}
.towcontentonebox {
width: 100%;
.swiper-item {
display: flex;
justify-content: space-between;
align-items: center;
.towcontentoneboximage {
width: 171.63rpx;
height: 37.24rpx;
.swiper_itemone {
width: 25%;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.towcontentoneboxswiper {
width: 100%;
padding-top: 24rpx;
overflow: hidden;
.swiper_itemtow {
width: auto;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.swiper {
height: 242rpx;
.swiper_itemthere {
width: 25%;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
.swiperitem {
height: 40rpx;
.towcontentoneboxswiper {
width: 100%;
// height: 242rpx;
padding-top: 24rpx;
overflow: hidden;
.swiper-item {
display: block;
height: 40rpx;
text-align: left;
.swiper {
height: 230rpx;
.swiperitem {
height: 40rpx;
.swiper-item {
display: flex;
justify-content: space-between;
align-items: center;
.swiper_itemone {
width: 25%;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.swiper_itemtow {
width: auto;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.swiper_itemthere {
width: 25%;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
}
}
}
}
.towcontentoness {
margin-top: 48rpx;
width: 100%;
background: rgba(255, 255, 255, 0.96);
border-radius: 30rpx 30rpx 30rpx 30rpx;
padding: 38rpx 48rpx;
.towcontentonebox_box {
margin: 0 auto;
text-align: center;
width: 262rpx;
height: 58rpx;
line-height: 58rpx;
background: #FFA436;
border-radius: 30rpx 30rpx 30rpx 30rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
}
.towcontentonebox {
width: 100%;
.towcontentoneboximage {
width: 171.63rpx;
height: 37.24rpx;
}
.swiper-item {
display: flex;
justify-content: space-between;
align-items: center;
.swiper_itemone {
width: 25%;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.swiper_itemtow {
width: auto;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.swiper_itemthere {
width: 25%;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
.towcontentoneboxswiper {
width: 100%;
// height: 242rpx;
padding-top: 24rpx;
overflow: hidden;
.swiper {
height: 230rpx;
.swiperitem {
height: 40rpx;
.swiper-item {
display: flex;
justify-content: space-between;
align-items: center;
.swiper_itemone {
width: 25%;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.swiper_itemtow {
width: auto;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.swiper_itemthere {
width: 25%;
text-align: center;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
}
}
}
}
}
.towcontenttow {
margin-top: 32rpx;
padding-bottom: 144rpx;
text-align: center;
width: 100%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
.towcontenttow {
margin-top: 32rpx;
padding-bottom: 144rpx;
text-align: center;
width: 100%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
}
</style>