This commit is contained in:
kbing1981 2024-07-22 14:30:24 +08:00
parent 72c6cd95cc
commit 69e3cffe6b
7 changed files with 535 additions and 36 deletions

View File

@ -437,8 +437,8 @@
position: absolute;
top:140rpx;
left: 25rpx;
color: #f9f3d3;
background: linear-gradient(to right, #fe912e, #ffa350);
color: #fff;
background: linear-gradient(to right, #019c88, #73d8b4);
width: 126upx;
text-align: center;
border-radius:90rpx 60rpx 60rpx 30rpx;

View File

@ -1,33 +1,526 @@
<!-- 自定义下拉刷新与上拉加载演示(vue) -->
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1">
<view style="font-size: 28upx;" v-html="content" ></view>
</view>
<view class="content">
<z-paging ref="paging" v-model="dataList" @query="queryList" >
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中如果需要跟着滚动则不要设置slot="top" -->
<!-- 注意此处的z-tabs为独立的组件可替换为第三方的tabs若需要使用z-tabs请在插件市场搜索z-tabs并引入否则会报插件找不到的错误 -->
<template #top>
<view class="service-head-top">
<view class="service-head-top-left">
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
<image style="width: 136rpx; height:40rpx ;" src="../../static/seckill4.png"></image>
</view>
<view>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input"
@clear="clear">
</uni-search-bar>
<view class="search-btn" @click="searchBtn">
搜索
</view>
</view>
</view>
<!-- <view class="fenlei">
<z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/>
</view> -->
</template>
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher"此时不用获取refresherStatus会自动使用z-paging自带的下拉刷新view) -->
<!-- 注意注意注意字节跳动小程序中自定义下拉刷新不支持slot-scope将导致custom-refresher无法显示 -->
<!-- 如果是字节跳动小程序请参照sticky-demo.vue中的写法此处使用slot-scope是为了减少data中无关变量声明降低依赖 -->
<template #refresher="{refresherStatus}" >
<!-- 此处的custom-refresh为demo中自定义的组件非z-paging的内置组件请在实际项目中自行创建这里插入什么view下拉刷新就显示什么view -->
<custom-refresher :status="refresherStatus" />
</template>
<!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore >
<!-- 此处的custom-nomore为demo中自定义的组件非z-paging的内置组件请在实际项目中自行创建这里插入什么view没有更多数据就显示什么view -->
<custom-nomore />
</template>
<!-- 如果希望其他view跟着页面滚动可以放在z-paging标签内 -->
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)" >
<!-- <view class="item-title">{{item.title}}</view>
<view class="item-detail">{{item.detail}}</view> -->
<!-- <view class="item-line"></view> -->
<view class="item-img">
<image :src="item.packageImg" mode=""></image>
<span class="img-span">{{item.status=='1'?'未用完':item.status=='2'?'退款':'已用完'}}</span>
</view>
<view class="item-view">
<view class="view-cata">
<view class="item-view-title">传统中式学位推拿</view>
</view>
<view class="shop_label">
<span>增强免疫</span>
<span>对症调理</span>
<span>调节改变</span>
</view>
<view class="pace-plan">
<view class="pace-text"><span>90</span><span>分钟</span></view>
</view>
<view class="seckill-entry">
<view class="seckill-money">
<span>263.5</span>
<span>去拼团</span>
<span>222</span>
</view>
<view class="seckill-rob ">
<span class="seckill-text">去拼团</span>
</view>
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
export default {
data() {
return {
content:''
export default {
data() {
return {
myId: '',
// v-model
dataList: [],
tabList: [],
typeData:'105',
tabIndex: 0,
searchValue:'',
serviceTrue:true,
page:1,
limit:10,
titleNmae:''
}
},
onLoad() {
this.getGuize();
},
methods: {
getGuize(){
this.$Request.getT('/app/common/type/177').then(res =>{
if(res.code === 0){
this.content = res.data.value;
onLoad(){
this.myId = uni.getStorageSync('userId')
this.getData()
},
methods: {
input(res) {//
this.searchValue=res;
console.log('----input:', res)
},
searchBtn(){//
if(this.searchValue!=""){
this.getData()
}
},
getData(){
let data = {
userId: this.myId,
type: this.typeData,
page: this.page,
limit: this.limit,
title:this.searchValue,
}
this.$Request.get('/app/user/package/findMyPackageList', data).then(res => {
if (res.code == 0) {
this.dataList=res.data.records;
}
});
})
},
tabChange(index) {
this.tabIndex = index;
//tabreloadqueryList
//reloadtruereloadfalse
this.$refs.paging.reload(true);
},
queryList(pageNo, pageSize) {
// console.log(pageNo,pageSize,this.tabIndex)
//
// pageNopageSize
//
const params = {
userId: this.myId,
page: pageNo,
limit: pageSize,
type: this.typeData,
title:''
}
this.$Request.get('/app/user/package/findMyPackageList',params).then(res => {
// z-paging
this.$refs.paging.complete(res.data.records);
}).catch(res => {
// this.$refs.paging.complete(false);
// catchz-paging
// uni.$emit('z-paging-error-emit');
this.$refs.paging.complete(false);
})
},
backImg(){//
uni.reLaunch({
url:'/pages/my/index'
})
},
clear(res) {
this.getData()
},
itemClick(item) {
uni.navigateTo({
url:'/pages/my/cikarDrtail?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+'my'
})
}
}
}
}
</script>
<style>
page{
<style scoped>
.shop_label{
display: flex;
flex-wrap: wrap;
margin: 10rpx 0;
align-items: center;
}
.shop_label span{
background: #e5e5e5;
border-radius: 8rpx;
padding: 8rpx 10rpx;
font-size: 20rpx;
margin-right: 8rpx;
display: flex;
align-items: center;
}
.shop-arrow{
display: inline-block;
border-top: 1px solid;
border-right: 1px solid;
width: 7px;
height: 7px;
border-color: #999;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
margin-top: 7px;
}
.pace-plan{
display: flex;
flex-direction: row;
margin-left: 10rpx;
}
.pace-text{
font-size: 24rpx;
}
.pace-text span:nth-child(1){
color: #666;
}
.pace-text span:nth-child(2){
color: #666;
}
.pace{
width: 60%;
height: 30rpx;
border-radius: 30rpx;
background: #f5f5f5;
font-size: 20rpx;
line-height: 30rpx;
}
.seckill-entry{
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 10rpx;
}
.seckill-money{
width: 74%;
background: #fff8f0;
border-radius: 10rpx 0 0 10rpx;
padding: 14rpx 20rpx;
}
.seckill-money span:nth-child(1){
color: #666;
font-size: 24rpx;
text-decoration: line-through;
}
.seckill-money span:nth-child(2){
color: #fc2d32;
font-weight: bold;
font-size: 24rpx;
}
.seckill-money span:nth-child(3){
color: #fc2d32;
font-size: 30rpx;
}
.seckill-rob{
width: 30%;
height: 60rpx;
background: linear-gradient(90deg, #fb2d30, #fc2e37);
text-align: center;
line-height: 60rpx;
border-radius: 0 10rpx 10rpx 0;
}
.seckill-img{
width: 70rpx;
height: 70rpx;
position: absolute;
top:-18rpx;
left:-22rpx;
}
.seckill-text{
color: #fff;
font-size:26rpx;
}
.item-view-bottom-qian{
}
.item-view-bottom-btn{
text-align: center;
width: 131rpx;
height: 55rpx;
line-height: 55rpx;
background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);
border-radius: 10rpx;
font-weight: bold;
font-size: 28rpx;
color: #FFFFFF;
}
.item-view-bottom-qian span:nth-child(5){
font-size: 28rpx;
color: #848484;
text-decoration-line: line-through;
}
.item-view-bottom-qian span:nth-child(4){
font-size: 28rpx;
color: #848484;
text-decoration-line: line-through;
margin-left: 5px;
}
.item-view-bottom-qian span:nth-child(1){
font-weight: 400;
font-size: 25rpx;
color: #F95900;
}
.item-view-bottom-qian span:nth-child(2){
font-weight: bold;
font-size: 36.81rpx;
color: #F95900;
}
.item-view-bottom-qian span:nth-child(3){
font-weight: 400;
font-size: 25rpx;
color: #F95900;
}
.item-view-bottom{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.item-view-jianjie{
font-weight: 400;
font-size: 24rpx;
color: #999;
margin:5px 0px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 显示的行数,可以根据需要修改 */
overflow: hidden;
text-overflow: ellipsis;
}
.item-view-biao{
padding: 1px 5px;
border-radius: 15rpx 3rpx 15rpx 3rpx;
}
.tuina{
background-color:#d1f2df;
color: #17984d;
}
.xiaoer{
background-color:#f1f8d7;
color: #58b314;
}
.taishi{
background-color:#e5d5c6;
color: #805d39;
}
.kangfu{
background-color:#fcf3da;
color: #ff8600;
}
.item-view-xiangmu span:nth-child(2){
font-weight: normal;
color: #666666;
}
.item-view-xiangmu span:nth-child(1){
font-weight: normal;
color: #999;
margin-right: 5rpx;
}
.item-view-xiangmu{
width: 100%;
display: flex;
flex-direction: row;
font-weight: 400;
font-size: 25rpx;
align-items: flex-end;
}
.item-view-title{
font-weight: bold;
font-size: 32rpx;
color: #333333;
overflow: hidden;
}
.item-view{
width: 66%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.item-img{
width: 200rpx;
height: 200rpx;
border-radius: 14rpx;
position: relative;
}
.img-span{
padding: 2px 5px;
font-weight: 400;
font-size: 8px;
color: #FFFFFF;
background: linear-gradient(-90deg, #FF6F48, #FF9E69);
border-radius: 7px 0px 7px 0px;
position: absolute;
bottom: 0px;
right: 0;
margin-bottom: 5px;
margin-right: 5px;
}
.item-img image{
width: 100%;
height: 100%;
border-radius: 14rpx;
}
.item {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
height: 140px;
background: #FFFFFF;
border-radius: 21rpx;
margin-top:10px;
align-items: center;
padding: 0px 10px;
}
.item-detail {
padding: 5rpx 15rpx;
border-radius: 10rpx;
font-size: 28rpx;
color: white;
background-color: #007AFF;
}
.item-line {
position: absolute;
bottom: 0rpx;
left: 0rpx;
height: 1px;
width: 100%;
background-color: #eeeeee;
}
/deep/.zp-paging-container{
background-color: #f7f7f7;
width:100%;
}
/deep/.zp-paging-container-content{
width: 95%;
margin: 50px auto 0px auto;
}
.fenlei{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.index-fenl-title{
width: 81rpx;
text-align: center;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
font-weight: bold;
font-size: 34rpx;
color:#019C88;
}
.index-fenl-title-bottom{
position: absolute;
bottom: 0;
margin-bottom: 0px;
width: 81rpx;
height: 14rpx;
border-radius: 7rpx;
background: linear-gradient(-48deg,rgba(1, 156, 136, 0.35),rgba(45, 196, 142, 0.35));
}
/deep/.uni-searchbar__cancel{
display: none;
}
.search-btn{
text-align: center;
line-height: 31px;
color: #fff;
position: absolute;
right: 0;
top: 0;
margin-top:9.4px;
margin-right: 11px;
height: 32px !important;
}
/deep/.uni-searchbar__box-icon-search,.search-btn{
width: 150rpx;
height: 60rpx;
background: #18A689;
border-radius: 31rpx;
}
/deep/.uni-searchbar__box{
height: 31px;
border-radius: 15px !important;
background-color: #fff !important;
border: 1px solid #E5E5E5;
padding: 0px;
display: flex;
flex-direction: row;
flex-flow: row-reverse;
position: relative;
}
/deep/.uni-searchbar{
width: 240px;
border-radius: 31rpx;
}
.service-head-top-left image{
width: 25px;
height: 30rpx;
margin-right: 10px;
}
.service-head-top-left span{
font-weight: bold;
font-size: 34rpx;
color: #171717;
}
.service-head-top-left{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.service-head-top{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: #fff;
position: fixed;
z-index: 999;
}
.view-cata{
display: flex;
flex-direction: row;
align-items: center;
}
</style>

View File

@ -8,7 +8,7 @@
<span>{{typeData=='104'?'服务套餐':typeData=='105'?'次卡':'服务疗程'}}</span>
</view>
<view>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input"
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input"
@clear="clear">
</uni-search-bar>
<view class="search-btn" @click="searchBtn">
@ -237,13 +237,13 @@
height: 100vh;
overflow: hidden;
background-color: #f7f7f7;
position: relative;
/*position: relative;*/
}
.item-view-bottom-btn{
text-align: center;
width: 131rpx;
height: 55rpx;
line-height: 55rpx;
height: 56rpx;
line-height: 56rpx;
background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);
border-radius: 10rpx;
font-weight: bold;
@ -443,8 +443,8 @@
border-radius: 31rpx;
}
/deep/.uni-searchbar__box{
height: 32px;
border-radius: 15px !important;
height: 30px;
border-radius: 30px !important;
background-color: #fff !important;
border: 1px solid #09a28a;
padding: 0px;
@ -456,19 +456,19 @@
}
.search-btn{
text-align: center;
line-height: 27px;
line-height: 30px;
color: #fff;
position: absolute;
right: 20rpx;
top: 28rpx;
height: 26px !important;
right:14rpx;
top: 25rpx;
height: 30px !important;
}
/deep/.uni-searchbar{
width: 240px;
border-radius: 31rpx;
position: relative;
}
/deep/.uni-input-input {
position: relative;
display: block;
height: 100%;
background: none;

View File

@ -1295,7 +1295,13 @@ import permision from "@/components/permission.js";
text-overflow: ellipsis;
text-align: left;
}
.touxiang-frame{
position: absolute;
width: 100rpx;
height: 38rpx;
left: 44rpx;
top:140rpx;
}
.dituList{
width: 85%;
height: 173px;

BIN
static/background-img4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

BIN
static/navigation.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

View File

@ -252,7 +252,7 @@
display: flex;
/* #endif */
flex-direction: row;
position: relative;
//position: relative;
padding: 14rpx 14rpx;
// background-color: #fff;
}
@ -264,12 +264,12 @@
justify-content: left;
/* #endif */
overflow: hidden;
position: relative;
//position: relative;
flex: 1;
flex-direction: row;
align-items: center;
height: $uni-searchbar-height;
padding: 5px 8px 5px 0px;
padding: 6px 8px 6px 0px;
}
.uni-searchbar__box-icon-search {