16、我的服务菜单的四个字用组件标题替换

This commit is contained in:
77 2024-09-26 11:10:58 +08:00
parent 7c358424a0
commit 2163f717a2
6 changed files with 120 additions and 79 deletions

View File

@ -40,7 +40,7 @@
:class="isDisable ? 'disabled-color' : 'subtitle-color'" :class="isDisable ? 'disabled-color' : 'subtitle-color'"
v-if="data.validityType === 2" v-if="data.validityType === 2"
> >
有效期领取后 {{ data.fixedEndTerm }} 天内可用 有效期领取后{{ data.fixedStartTerm }}天开始至第{{ data.fixedEndTerm }}天内有效
</view> </view>
<view class="sellby-text" :class="isDisable ? 'disabled-color' : 'subtitle-color'" v-else> <view class="sellby-text" :class="isDisable ? 'disabled-color' : 'subtitle-color'" v-else>
有效期: {{ sheep.$helper.timeFormat(data.validStartTime, 'yyyy-mm-dd') }} 有效期: {{ sheep.$helper.timeFormat(data.validStartTime, 'yyyy-mm-dd') }}

View File

@ -1,19 +1,19 @@
<!-- 装修基础组件菜单导航金刚区 --> <!-- 装修基础组件菜单导航金刚区 -->
<template> <template>
<view> <view>
<view class="title"> <!-- <view class="title">
我的服务 我的服务
</view> </view> -->
<!-- 包裹层 --> <!-- 包裹层 -->
<view class="ui-swiper" :class="[props.mode, props.bg, props.ui]" <!-- <view class="ui-swiper" :class="[props.mode, props.bg, props.ui]"
:style="[{ height: swiperHeight + (menuList.length > 1 ? 50 : 0) + 'rpx' }]"> :style="[{ height: swiperHeight + (menuList.length > 1 ? 50 : 0) + 'rpx' }]"> -->
<!-- 轮播 --> <!-- 轮播 -->
<swiper :circular="props.circular" :current="state.cur" :autoplay="props.autoplay" <!-- <swiper :circular="props.circular" :current="state.cur" :autoplay="props.autoplay"
:interval="props.interval" :duration="props.duration" :style="[{ height: swiperHeight + 'rpx' }]" :interval="props.interval" :duration="props.duration" :style="[{ height: swiperHeight + 'rpx' }]"
@change="swiperChange"> @change="swiperChange"> -->
<swiper-item v-for="(arr, index) in menuList" :key="index" :class="{ cur: state.cur == index }"> <!-- <swiper-item v-for="(arr, index) in menuList" :key="index" :class="{ cur: state.cur == index }"> -->
<!-- 宫格 --> <!-- 宫格 -->
<view class="grid-wrap"> <!-- <view class="grid-wrap">
<view v-for="(item, index) in arr" :key="index" <view v-for="(item, index) in arr" :key="index"
class="grid-item ss-flex ss-flex-col ss-col-center ss-row-center" class="grid-item ss-flex ss-flex-col ss-col-center ss-row-center"
:style="[{ width: `${100 * (1 / data.column)}%`, height: '200rpx' }]" :style="[{ width: `${100 * (1 / data.column)}%`, height: '200rpx' }]"
@ -35,11 +35,11 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
</swiper-item> <!-- </swiper-item>
</swiper> </swiper> -->
<!-- 指示点 --> <!-- 指示点 -->
<template v-if="menuList.length > 1"> <!-- <template v-if="menuList.length > 1">
<view class="ui-swiper-dot" :class="props.dotStyle" v-if="props.dotStyle != 'tag'"> <view class="ui-swiper-dot" :class="props.dotStyle" v-if="props.dotStyle != 'tag'">
<view class="line-box" v-for="(item, index) in menuList.length" :key="index" <view class="line-box" v-for="(item, index) in menuList.length" :key="index"
:class="[state.cur == index ? 'cur' : '', props.dotCur]"></view> :class="[state.cur == index ? 'cur' : '', props.dotCur]"></view>
@ -50,7 +50,30 @@
</view> </view>
</view> </view>
</template> </template>
</view> -->
<view class="newList">
<view class="new_menu" v-for="(arr, index) in menuList" :key="index">
<view v-for="(item, index) in arr" :key="index"
class="new_items"
:style="[{ width: `${100 * (1 / data.column)}%`}]"
@tap="sheep.$router.go(item.url)">
<view class="menu-box ss-flex ss-flex-col ss-col-center ss-row-center">
<view v-if="item.badge.show" class="tag-box">
{{ item.badge.text }}
</view> </view>
<image v-if="item.iconUrl" class="menu-icon" :src="sheep.$url.cdn(item.iconUrl)"
mode="aspectFill"></image>
<view v-if="data.layout === 'iconText'" class="menu-title"
:style="[{ color: item.titleColor }]">
{{ item.title }}
</view>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
@ -212,9 +235,18 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.new_menu{
display:flex;
flex-wrap:wrap;
.new_items{
width:25%;
margin-bottom:20px;
}
}
.title { .title {
padding: 10px 20px; padding: 10px 10px;
height: 20px; height: 0px;
line-height: 20px; line-height: 20px;
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
@ -252,8 +284,8 @@
.menu-icon { .menu-icon {
transform: translate(0, 0); transform: translate(0, 0);
width: 80rpx; width: 25px;
height: 80rpx; height: 28px;
padding-bottom: 10rpx; padding-bottom: 10rpx;
} }

View File

@ -2,34 +2,21 @@
<template> <template>
<view class="menu-list-wrap"> <view class="menu-list-wrap">
<uni-list :border="true"> <uni-list :border="true">
<uni-list-item <uni-list-item v-for="(item, index) in data.list" :key="index" showArrow clickable
v-for="(item, index) in data.list" @tap="sheep.$router.go(item.url)">
:key="index"
showArrow
clickable
@tap="sheep.$router.go(item.url)"
>
<template v-slot:header> <template v-slot:header>
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<image <image v-if="item.iconUrl" class="list-icon" :src="sheep.$url.cdn(item.iconUrl)"
v-if="item.iconUrl" mode="aspectFit"></image>
class="list-icon" <view class="title-text ss-flex ss-row-center ss-col-center ss-m-l-20"
:src="sheep.$url.cdn(item.iconUrl)" :style="[{ color: item.titleColor }]">
mode="aspectFit"
></image>
<view
class="title-text ss-flex ss-row-center ss-col-center ss-m-l-20"
:style="[{ color: item.titleColor }]"
>
{{ item.title }} {{ item.title }}
</view> </view>
</view> </view>
</template> </template>
<template v-slot:footer> <template v-slot:footer>
<view <view class="notice-text ss-flex ss-row-center ss-col-center"
class="notice-text ss-flex ss-row-center ss-col-center" :style="[{ color: item.subtitleColor }]">
:style="[{ color: item.subtitleColor }]"
>
{{ item.subtitle }} {{ item.subtitle }}
</view> </view>
</template> </template>
@ -52,12 +39,31 @@
</script> </script>
<style lang="scss"> <style lang="scss">
:deep(.container--right){
padding-left: 5px !important;
}
.ss-col-center{
.list-icon { .list-icon {
width: 20px; position: relative;
height: 20px; width: 100px;
height: 40px;
padding-right: 10px;
&::after{
position:absolute;
content:'';
top:50%;
right:0;
width:1px;
height:57%;
border-right:1px solid #ababab;
transform: translateY(-50%);
} }
.notice-text {
} }
}
.notice-text {}
.menu-list-wrap { .menu-list-wrap {
::v-deep .uni-list { ::v-deep .uni-list {
background-color: transparent; background-color: transparent;

View File

@ -4,7 +4,7 @@
<view class="title"> <view class="title">
<span>订单中心</span> <span>订单中心</span>
<view class="ff"> <view class="ff">
<span class="ckgd" @click="sheep.$router.go('/pages/order/list');">查看更多</span> <span class="ckgd" @click="sheep.$router.go('/pages/order/list');">查看全部</span>
<span class="ckgd" @click="sheep.$router.go('/pages/order/list');"> <span class="ckgd" @click="sheep.$router.go('/pages/order/list');">
<image class="img" src="@/static/images/dayu.png"></image> <image class="img" src="@/static/images/dayu.png"></image>
</span> </span>
@ -96,7 +96,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.title { .title {
padding: 10px 20px; padding: 10px 10px;
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
font-size: 16px; font-size: 16px;

View File

@ -57,9 +57,9 @@
const elStyles = { const elStyles = {
background: `url(${sheep.$url.cdn(props.data.bgImgUrl)}) no-repeat top center / 100% auto`, background: `url(${sheep.$url.cdn(props.data.bgImgUrl)}) no-repeat top center / 100% auto`,
fontSize: `${props.data.titleSize}px`, fontSize: `${props.data.titleSize}px`,
fontWeight: `${props.data.titleWeight}px`, fontWeight: props.data.titleWeight,
}; };
console.log(elStyles,"elStyleselStyles")
// //
const titleStyles = { const titleStyles = {
color: props.data.titleColor, color: props.data.titleColor,

View File

@ -14,6 +14,9 @@
<view class="nickname-box ss-flex ss-col-center"> <view class="nickname-box ss-flex ss-col-center">
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view> <view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
</view> </view>
<view class="nickname-box ss-flex ss-col-center">
<view class="nick-name ss-m-r-20">{{ userInfo?.mobile || mobile }}</view>
</view>
</view> </view>
</view> </view>
<view class="right-box ss-m-r-52"> <view class="right-box ss-m-r-52">