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,11 +2,12 @@
<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="scrollview" :style="{'height':Height}">
<view class="contentbox" v-for="(item,index) in list" :key="index"> <view class="contentbox" v-for="(item,index) in list" :key="index">
<view class="contentboxtop flex-between"> <view class="contentboxtop flex-between">
<text class="contentboxtopname">{{item.name}}</text> <text class="contentboxtopname">{{item.name}}</text>
@ -27,9 +28,17 @@
</view> </view>
<image class="contentboxafter" src="" mode=""></image> <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" <view class="flex-colum" v-if="is_end" :style="{'height':Height}">
v-if="is_end" mode="aspectFill"></image> <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" /> <u-loadmore :status="form.status" fontSize="28" color="#999" iconSize="28" />
</view>
<view style="padding: 32rpx 0;">
<u-loadmore :status="form.status" fontSize="28" color="#999" iconSize="28" />
</view>
</view>
</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,11 +149,16 @@
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;
.scrollview {
overflow: auto;
.contentbox:nth-child(1) { .contentbox:nth-child(1) {
margin-top: 0; margin-top: 0;
} }
@ -234,4 +260,6 @@
} }
} }
} }
}
</style> </style>