Merge branch 'wwz_x' of e.coding.net:g-cphe0354/xiaochengxusaomadiancan/cashier_weapp into wwz_d

This commit is contained in:
duan 2024-07-19 16:09:03 +08:00
commit 2a3c5eabba
3 changed files with 144 additions and 142 deletions

View File

@ -108,10 +108,10 @@
} }
.navbarcontent { .navbarcontent {
position: -webkit-sticky; position: relative;
position: sticky;
top: 0; top: 0;
left: 0; left: 0;
width: 100%;
z-index: 9999; z-index: 9999;
.active { .active {
@ -136,6 +136,7 @@
.navbar { .navbar {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0;
width: 100%; width: 100%;
z-index: 99; z-index: 99;

View File

@ -1,17 +1,13 @@
<template> <template>
<view class="content"> <view class="content">
<!-- 占位符导航栏 --> <!-- 占位符导航栏 -->
<navseat :opacity='false' :title='"歌曲列表"' :titleshow='true' :heightshow='true' :namecolor='"#fff"'></navseat> <navseat :opacity='false' :title='"歌曲列表"' :titleshow='true' :heightshow='true' :namecolor='"#fff"' :iconshow='false'></navseat>
<view class="search flex-between"> <view class="search flex-between">
<view class="searchinput flex-between"> <view class="searchinput flex-between">
<input type="text" class="searchinput_input" placeholder-style="color:#FFFFFF" @input="onInput" <input type="text" class="searchinput_input" placeholder-style="color:#FFFFFF" @input="onInput"
v-model="keyWord" placeholder="搜索" /> v-model="keyWord" placeholder="搜索" />
<!-- <view class="searchinputu-icon" @click="init_fn"> -->
<u-icon name="search" @click="init_fn" color="#fff" size="48"></u-icon> <u-icon name="search" @click="init_fn" color="#fff" size="48"></u-icon>
<!-- </view> -->
</view> </view>
<!-- <image class="searchimage" @click="clickrecord"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/chooseasong/index.png" mode="aspectFill"></image> -->
</view> </view>
<scroll-view scroll-y="true" id="demo" style="width:100%;" :style="{'height':Height}" @scroll="handleScroll" <scroll-view scroll-y="true" id="demo" style="width:100%;" :style="{'height':Height}" @scroll="handleScroll"
show-scrollbar="false" @scrolltolower="lower"> show-scrollbar="false" @scrolltolower="lower">
@ -19,7 +15,6 @@
<view class="contentclassbox"> <view class="contentclassbox">
<view class="contentclassboxitem flex-between" v-for="(item,index) in list" :key="index"> <view class="contentclassboxitem flex-between" v-for="(item,index) in list" :key="index">
<view class="contentclassboxleft flex-start"> <view class="contentclassboxleft flex-start">
<!-- <image class="contentclassboxleftimage" :src="item.img" mode="aspectFill"></image> -->
<view class="onecontentclassboxleft flex-colum-start"> <view class="onecontentclassboxleft flex-colum-start">
<text class="onecontentclassboxleft_one">{{item.name}}</text> <text class="onecontentclassboxleft_one">{{item.name}}</text>
<text class="onecontentclassboxleft_tow">{{item.originSinger}}</text> <text class="onecontentclassboxleft_tow">{{item.originSinger}}</text>
@ -32,32 +27,10 @@
</view> </view>
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png" <image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
v-if="is_end" mode="aspectFill"></image> v-if="is_end" mode="aspectFill"></image>
<u-loadmore :status="form.status" loadmore-text="下拉加载更多" @loadmore="loadmorelang" fontSize="28" <u-loadmore :status="form.status" loadmore-text="上滑加载更多" @loadmore="loadmorelang" fontSize="28"
color="#999" iconSize="28" /> color="#999" iconSize="28" />
</view> </view>
</scroll-view> </scroll-view>
<!-- <image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
v-if="is_end" mode="aspectFill"></image>
<u-loadmore :status="form.status" fontSize="28" color="#999" iconSize="28" /> -->
<!-- <view class="contentclass">
<view class="contentclassbox">
<view class="contentclassboxitem flex-between" v-for="(item,index) in list" :key="index">
<view class="contentclassboxleft flex-start">
<image class="contentclassboxleftimage" :src="item.img" mode="aspectFill"></image>
<view class="onecontentclassboxleft flex-colum-start">
<text class="onecontentclassboxleft_one">{{item.name}}</text>
<text class="onecontentclassboxleft_tow">{{item.originSinger}}</text>
</view>
</view>
<view class="contentclassboxright" @click="clicshowpopupk(item)">
{{item.price}}
</view>
</view>
</view>
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
v-if="is_end" mode="aspectFill"></image>
<u-loadmore :status="form.status" fontSize="28" color="#999" iconSize="28" />
</view> -->
<view class="positionfixed"> <view class="positionfixed">
<view class="positionfixedimage flex-colum"> <view class="positionfixedimage flex-colum">
<image class="positionfixedimage_image" <image class="positionfixedimage_image"
@ -71,7 +44,8 @@
</image> </image>
<view class="positionfixedbox_itemtexto"> <view class="positionfixedbox_itemtexto">
<u-notice-bar style="width: 100rpx;" :text="songName" :iconshow='false' <u-notice-bar style="width: 100rpx;" :text="songName" :iconshow='false'
color='rgba(255, 255, 255, 0.73)' fontSize='24' bgColor='transparent'></u-notice-bar> color='rgba(255, 255, 255, 0.73)' speed='40' fontSize='24'
bgColor='transparent'></u-notice-bar>
<!-- <text class="">{{songName || '暂无人点歌,快来...'}}</text> --> <!-- <text class="">{{songName || '暂无人点歌,快来...'}}</text> -->
</view> </view>
@ -149,7 +123,7 @@
keyWord: '', keyWord: '',
form: { form: {
page: 1, page: 1,
size: 10, size: 12,
status: 'loadmore', status: 'loadmore',
}, },
shopId: "11", shopId: "11",
@ -247,7 +221,7 @@
this.list = [] this.list = []
this.is_end = false this.is_end = false
this.form.page = 1 this.form.page = 1
this.form.size = 10 this.form.size = 12
this.form.status = 'loadmore' this.form.status = 'loadmore'
this.cashierService() this.cashierService()
this.apisongsinging() this.apisongsinging()
@ -277,13 +251,12 @@
} else { } else {
this.list = [...this.list, ...res.data.list]; this.list = [...this.list, ...res.data.list];
} }
this.form.status = 'loading'; if (this.form.page > res.data.pages) {
if (res.data.pageNum >= res.data.pages) {
this.form.status = 'nomore'; this.form.status = 'nomore';
} else { } else {
this.form.status = 'loadmore'; this.form.status = 'loading';
} }
}, 500) }, 1000)
} }
}, },
// //
@ -630,7 +603,7 @@
} }
.contentupopupboutton { .contentupopupboutton {
padding: 32rpx 70rpx 0 70rpx; padding: 50rpx 70rpx 0 70rpx;
.contentupopupbouttonO { .contentupopupbouttonO {
width: 196rpx; width: 196rpx;

View File

@ -2,34 +2,43 @@
<view class=""> <view class="">
<!-- 占位符导航栏 --> <!-- 占位符导航栏 -->
<navseat :opacity='false' :title='"点单记录"' :titleshow='true' :heightshow='true' :namecolor='"#fff"' <navseat :opacity='false' :title='"点单记录"' :titleshow='true' :heightshow='true' :namecolor='"#fff"'
iconcolor="#fff"> iconcolor="#fff" @Topdistance='Topdistance'>
</navseat> </navseat>
<view class="content"> <view class="content">
<scroll-view scroll-y="true" id="demo" style="width:100%;" :style="{'height':Height}" show-scrollbar="false" <scroll-view scroll-y="true" style="width:100%;" :style="{'height':Height}" show-scrollbar="false"
@scrolltolower="lower"> @scrolltolower="lower">
<view class="contentbox" v-for="(item,index) in list" :key="index"> <view class="scrollview" :style="{'height':Height}">
<view class="contentboxtop flex-between"> <view class="contentbox" v-for="(item,index) in list" :key="index">
<text class="contentboxtopname">{{item.name}}</text> <view class="contentboxtop flex-between">
<text v-if="item.state == '-1'" class="contentboxtopname_weizhifu">未支付</text> <text class="contentboxtopname">{{item.name}}</text>
<text v-if="item.state == '0'">已取消</text> <text v-if="item.state == '-1'" class="contentboxtopname_weizhifu">未支付</text>
<view class="contentboxtopone" v-if="item.state == '1'"> <text v-if="item.state == '0'">已取消</text>
<text class="contentboxtopone_one">前面还有{{item.preCount}}</text> <view class="contentboxtopone" v-if="item.state == '1'">
<text class="contentboxtopone_tow">已支付</text> <text class="contentboxtopone_one">前面还有{{item.preCount}}</text>
<text class="contentboxtopone_tow">已支付</text>
</view>
<text class="contentboxtopnametow" v-if="item.state == '2'">演唱中</text>
<text class="contentboxtopnametowthere" v-if="item.state == '3'">已演唱</text>
</view> </view>
<text class="contentboxtopnametow" v-if="item.state == '2'">演唱中</text> <view class="contentboxtopO">
<text class="contentboxtopnametowthere" v-if="item.state == '3'">已演唱</text> ¥{{item.price}}
</view>
<view class="contentboxtopT">
下单时间{{$u.timeFormat(item.create_time,'yyyy-mm-dd hh:MM') || '无'}}
</view>
<image class="contentboxafter" src="" mode=""></image>
</view> </view>
<view class="contentboxtopO"> <view class="flex-colum" v-if="is_end" :style="{'height':Height}">
¥{{item.price}} <image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/chooseasong/background.png"
mode="aspectFill"></image>
<u-loadmore :status="form.status" fontSize="28" color="#999" iconSize="28" />
</view> </view>
<view class="contentboxtopT"> <view style="padding: 32rpx 0;">
下单时间{{$u.timeFormat(item.create_time,'yyyy-mm-dd hh:MM') || '无'}} <u-loadmore :status="form.status" fontSize="28" color="#999" iconSize="28" />
</view> </view>
<image class="contentboxafter" src="" mode=""></image>
</view> </view>
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
v-if="is_end" mode="aspectFill"></image>
<u-loadmore :status="form.status" fontSize="28" color="#999" iconSize="28" />
</scroll-view> </scroll-view>
</view> </view>
@ -52,7 +61,7 @@
size: 10, size: 10,
status: 'loadmore', status: 'loadmore',
}, },
shopId: '' shopId: '10'
}; };
}, },
onLoad(e) { onLoad(e) {
@ -60,13 +69,25 @@
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
this.GetTop() this.Topdistance()
}, 200) }, 200)
}, },
onShow() { onShow() {
this.cashierService() this.cashierService()
}, },
methods: { methods: {
Topdistance(res) {
// console.log(res,111)
var resdata = res
uni.getSystemInfo({
success: (data) => {
console.log(data)
this.Height = data.screenHeight - 32 - resdata + 'px'
// console.log(this.Height)
// console.log(this.Height)
}
})
},
lower() { lower() {
console.log('触底加载') console.log('触底加载')
this.cashierService() this.cashierService()
@ -95,7 +116,7 @@
this.list = [...this.list, ...res.data.list]; this.list = [...this.list, ...res.data.list];
} }
this.form.status = 'loading'; this.form.status = 'loading';
if (res.data.pageNum == res.data.pages) { if (this.form.page > res.data.pages) {
this.form.status = 'nomore'; this.form.status = 'nomore';
} else { } else {
this.form.status = 'loading'; this.form.status = 'loading';
@ -111,7 +132,7 @@
console.log(data) console.log(data)
this.$u.getRect('.content').then(res => { this.$u.getRect('.content').then(res => {
console.log(res, 111) console.log(res, 111)
this.Height = data.safeArea.height - 36 + 'px' this.Height = data.safeArea.height - 32 + 'px'
// console.log(this.Height) // console.log(this.Height)
}) })
// console.log(this.Height) // console.log(this.Height)
@ -128,110 +149,117 @@
height: 100%; height: 100%;
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/chooseasong/background.png); background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/chooseasong/background.png);
background-size: 100% 100%; background-size: 100% 100%;
overflow: auto;
} }
.content { .content {
position: relative;
z-index: 99;
padding: 32rpx 28rpx 0rpx 28rpx; padding: 32rpx 28rpx 0rpx 28rpx;
overflow: auto;
.contentbox:nth-child(1) { .scrollview {
margin-top: 0; overflow: auto;
} .contentbox:nth-child(1) {
margin-top: 0;
.contentbox {
position: relative;
margin-top: 48rpx;
width: 100%;
background: rgba(129, 125, 207, 0.2);
border: 2px solid #828282;
backdrop-filter: blur(20px);
border-radius: 24rpx 24rpx 24rpx 24rpx;
.contentboxafter {
position: absolute;
bottom: 0;
width: 482rpx;
height: 14rpx;
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/chooseasong/dibuyin.png);
background-size: 100% 100%;
left: 50%;
transform: translate(-50%, 0);
} }
.contentboxtop { .contentbox {
padding: 16rpx 24rpx; position: relative;
border-bottom: 2rpx solid #F6F6F6; margin-top: 48rpx;
width: 100%;
background: rgba(129, 125, 207, 0.2);
border: 2px solid #828282;
backdrop-filter: blur(20px);
border-radius: 24rpx 24rpx 24rpx 24rpx;
.contentboxtopname { .contentboxafter {
font-family: Source Han Sans CN, Source Han Sans CN; position: absolute;
font-weight: 500; bottom: 0;
font-size: 32rpx; width: 482rpx;
color: #fff; height: 14rpx;
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/chooseasong/dibuyin.png);
background-size: 100% 100%;
left: 50%;
transform: translate(-50%, 0);
} }
.contentboxtopone { .contentboxtop {
display: flex; padding: 16rpx 24rpx;
justify-content: flex-start; border-bottom: 2rpx solid #F6F6F6;
align-items: center;
.contentboxtopone_one { .contentboxtopname {
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400; font-weight: 500;
font-size: 24rpx; font-size: 32rpx;
color: #F9DDF9; color: #fff;
} }
.contentboxtopone_tow { .contentboxtopone {
margin-left: 16rpx; display: flex;
justify-content: flex-start;
align-items: center;
.contentboxtopone_one {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #F9DDF9;
}
.contentboxtopone_tow {
margin-left: 16rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #32AA52;
text-shadow: 0px 6px 6px rgba(50, 170, 82, 0.55);
}
}
.contentboxtopnametow {
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #32AA52; color: #FF9C39;
text-shadow: 0px 6px 6px rgba(50, 170, 82, 0.55); text-shadow: 0px 4px 4px rgba(255, 156, 57, 0.37);
}
.contentboxtopname_weizhifu {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: rgba(255, 255, 255, 0.5);
text-shadow: 0px 4px 4px rgba(255, 255, 255, 0.37);
}
.contentboxtopnametowthere {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
text-shadow: 0px 4px 4px rgba(255, 255, 255, 0.37);
} }
} }
.contentboxtopnametow { .contentboxtopO {
padding: 0 24rpx;
margin-top: 10rpx;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #FF9C39; color: #999999;
text-shadow: 0px 4px 4px rgba(255, 156, 57, 0.37);
} }
.contentboxtopname_weizhifu { .contentboxtopT {
padding: 0rpx 24rpx 32rpx 24rpx;
margin-top: 16rpx;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500; font-weight: 400;
font-size: 28rpx; font-size: 24rpx;
color: rgba(255, 255, 255, 0.5); color: #999999;
text-shadow: 0px 4px 4px rgba(255, 255, 255, 0.37);
} }
.contentboxtopnametowthere {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
text-shadow: 0px 4px 4px rgba(255, 255, 255, 0.37);
}
}
.contentboxtopO {
padding: 0 24rpx;
margin-top: 10rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #999999;
}
.contentboxtopT {
padding: 0rpx 24rpx 32rpx 24rpx;
margin-top: 16rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #999999;
} }
} }
} }
</style> </style>