style: ai店铺ui

This commit is contained in:
2026-06-01 18:47:47 +08:00
parent 86e964c363
commit 79fab5929a
7 changed files with 591 additions and 20 deletions
+2 -2
View File
@@ -311,9 +311,9 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.card { .card {
background: #ffefe5; background: #fff;//#ffefe5;
border-radius: 12rpx; border-radius: 12rpx;
padding: 24rpx 20rpx; // padding: 24rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
} }
+140 -7
View File
@@ -1,5 +1,5 @@
<template> <template>
<s-pages title="AI店铺" navPreset="blue" tabbar="/pages/index/aiStore" :showLeftButton="false"> <s-pages title="AI店铺" :pink_bg="false" navPreset="blue" tabbar="/pages/index/aiStore" :showLeftButton="false">
<view class="ai-store-page h100 flex-column"> <view class="ai-store-page h100 flex-column">
<view class="top-area"> <view class="top-area">
<view class="tab-header"> <view class="tab-header">
@@ -15,7 +15,7 @@
<view class="tab-line" :style="{ left: index === 0 ? '25%' : '75%' }"></view> <view class="tab-line" :style="{ left: index === 0 ? '25%' : '75%' }"></view>
</view> </view>
<view class="search-wrap flex-center"> <view class="search-wrap flex-center" v-if="index === 0">
<view class="search-input flex1 flex-center"> <view class="search-input flex1 flex-center">
<uni-icons class="m-r-16" type="search" color="#9AA7C7" size="18" /> <uni-icons class="m-r-16" type="search" color="#9AA7C7" size="18" />
<uni-easyinput <uni-easyinput
@@ -71,9 +71,42 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view style="padding: 120rpx 0" v-if="index === 1&&false">
<view style="position: relative">
<view class="shop-summary-card">
<view class="shop-summary-top flex-row">
<view class="shop-summary-icon-wrap shrink flex-center">
<image class="shop-summary-icon" src="/static/index/shop1.png" mode="aspectFit" />
</view> </view>
<view class="shop-summary-info flex1">
<view class="list-wrap flex1"> <view class="shop-summary-title">{{ shopSummary.title }}</view>
<view class="shop-summary-id">ID:{{ shopSummary.id }}</view>
</view>
</view>
<view class="shop-summary-bottom" v-if="index === 1">
<view class="shop-summary-metrics flex-center">
<view class="metric flex1">
<view class="metric-label">总收益</view>
<view class="metric-value">{{ formatAmount(shopSummary.totalEarnings) }}</view>
</view>
<view class="metric-divider"></view>
<view class="metric flex1">
<view class="metric-label">店铺数量</view>
<view class="metric-value">{{ shopSummary.shopCount }}</view>
</view>
<view class="metric-divider"></view>
<view class="metric flex1">
<view class="metric-label">店铺等级</view>
<view class="metric-value">{{ shopSummary.level }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- :style="{ marginTop: index === 1 ? '150rpx' : '0' }" -->
<view class="list-wrap flex1" >
<card_pages <card_pages
ref="pageCommodity" ref="pageCommodity"
:navList="nav" :navList="nav"
@@ -301,16 +334,34 @@
function shipment() { function shipment() {
pageCommodity.value?.downCallback(); pageCommodity.value?.downCallback();
} }
const shopSummary = ref({
title: '我的店铺',
id: '123726492',
totalEarnings: 26873.8,
shopCount: 12,
level: 'LV.3',
});
const formatAmount = (value) => {
const num = Number(value);
if (!Number.isFinite(num)) return '0.00';
const fixed = num.toFixed(2);
const [intPart, decPart] = fixed.split('.');
const withComma = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return `${withComma}.${decPart}`;
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ai-store-page { .ai-store-page {
min-height: 100vh; min-height: 100vh;
background: #2556ec;
} }
.top-area { .top-area {
padding: 24rpx 24rpx 0; padding: 24rpx 24rpx;
background: #2556ec;
border-radius: 0 0 30rpx 30rpx;
} }
.tab-header { .tab-header {
@@ -367,7 +418,7 @@
.notice-card { .notice-card {
margin-top: 18rpx; margin-top: 18rpx;
padding: 0 40rpx; padding: 20rpx 40rpx;
} }
.notice-item { .notice-item {
@@ -425,4 +476,86 @@
:deep(.ai-button1) { :deep(.ai-button1) {
background: linear-gradient(to bottom right, #2c8cfa 0%, #3d5efb 100%) !important; background: linear-gradient(to bottom right, #2c8cfa 0%, #3d5efb 100%) !important;
} }
.shop-summary-card {
width: 94% !important;
border-radius: 26rpx;
overflow: hidden;
position: absolute;
top: -60rpx;
left: 3%;
width: 100%;
box-sizing: border-box;
box-shadow: 0 8rpx 22rpx rgba(38, 107, 246, 0.45);
background: linear-gradient(135deg, #2c8cfa 0%, #3d5efb 100%);
}
.shop-summary-top {
padding: 30rpx 28rpx;
// background: linear-gradient(135deg, #2c8cfa 0%, #3d5efb 100%);
}
.shop-summary-icon-wrap {
width: 88rpx;
height: 88rpx;
border-radius: 24rpx;
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(8rpx);
margin-right: 20rpx;
}
.shop-summary-icon {
width: 54rpx;
height: 54rpx;
}
.shop-summary-title {
font-size: 34rpx;
font-weight: 700;
color: #ffffff;
line-height: 44rpx;
}
.shop-summary-id {
margin-top: 6rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 0.85);
line-height: 32rpx;
}
.shop-summary-bottom {
background: rgba(255, 255, 255, 0.96);
padding: 22rpx 18rpx;
border-radius: 30rpx 30rpx 0 0;
// position: relative;
}
.shop-summary-metrics {
align-items: stretch;
// position: absolute;
}
.metric {
text-align: center;
}
.metric-label {
font-size: 24rpx;
color: #2c63ff;
line-height: 34rpx;
}
.metric-value {
margin-top: 10rpx;
font-size: 40rpx;
font-weight: 800;
color: #111111;
line-height: 44rpx;
}
.metric-divider {
width: 1rpx;
background: rgba(155, 170, 199, 0.55);
margin: 12rpx 0;
}
</style> </style>
@@ -0,0 +1,216 @@
<template>
<view class="tab2-wrap p-x-32 p-t-16 p-b-24">
<view class="shop-card m-b-24" v-for="(v, i) in mockList" :key="v.id || i">
<view class="cover-wrap">
<image class="cover" :src="v.cover" mode="aspectFill" />
<view class="cover-mask" />
<view class="cover-content">
<view class="title lineOne">{{ v.name }}</view>
<view class="sub flex-center ju-flex-start m-t-10">
<view class="tag shrink">{{ v.level }}</view>
<view class="subText lineOne m-l-16">首次代理时间:{{ v.createTime }}</view>
</view>
</view>
</view>
<view class="body">
<view class="progress-row">
<view class="progress-label">目标达成:{{ v.progress }}%</view>
<view class="progress-bar">
<view class="progress" :style="{ width: `${v.progress}%` }" />
</view>
</view>
<view class="stats flex-between">
<view class="stat">
<view class="stat-title flex-between al-flex-center">
<view>店铺总收益</view>
<image class="stat-icon" src="/static/aiStore/earnings.png" mode="aspectFit" />
</view>
<view class="stat-value">¥{{ formatMoney(v.earnings) }}</view>
</view>
<view class="stat">
<view class="stat-title flex-between al-flex-center">
<view>绿色积分</view>
<image class="stat-icon" src="/static/aiStore/leaf.png" mode="aspectFit" />
</view>
<view class="stat-value leaf">{{ v.leaf }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
defineProps({
list: {
type: Array,
default: () => [],
},
source: {
type: Number,
default: 1,
},
});
const emit = defineEmits(['addCar', 'update', 'shipment']);
const mockList = ref([
{
id: 1,
name: '卓玛阳光防断洗发水',
level: 'LV.3 超级店长',
createTime: '2026-03-09',
progress: 75,
earnings: 200,
leaf: 3200,
cover: '/static/home/img1.png',
},
{
id: 2,
name: '治山贡鸡源头旗舰店',
level: 'LV.2 高级店长',
createTime: '2026-02-18',
progress: 62,
earnings: 870,
leaf: 5600,
cover: '/static/home/5.png',
},
{
id: 3,
name: '有购精选生活馆',
level: 'LV.1 初级店长',
createTime: '2026-01-25',
progress: 48,
earnings: 126.5,
leaf: 2100,
cover: '/static/home/6.png',
},
]);
const formatMoney = (value) => {
const num = Number(value);
if (!Number.isFinite(num)) return '0.00';
return num.toFixed(2);
};
</script>
<style lang="scss" scoped>
.tab2-wrap {
box-sizing: border-box;
}
.shop-card {
background: #ffffff;
border-radius: 24rpx;
overflow: hidden;
box-shadow: 0 16rpx 40rpx rgba(25, 80, 215, 0.12);
}
.cover-wrap {
position: relative;
height: 220rpx;
}
.cover {
width: 100%;
height: 100%;
}
.cover-mask {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.55) 100%);
}
.cover-content {
position: absolute;
left: 24rpx;
right: 24rpx;
bottom: 20rpx;
color: #ffffff;
}
.title {
font-size: 34rpx;
font-weight: 600;
letter-spacing: 0.5rpx;
}
.subText {
font-size: 22rpx;
opacity: 0.92;
}
.tag {
padding: 6rpx 16rpx;
border-radius: 999rpx;
font-size: 22rpx;
border: 1rpx solid rgba(255, 255, 255, 0.4);
background: rgba(255, 255, 255, 0.22);
box-sizing: border-box;
}
.body {
padding: 24rpx;
}
.progress-label {
font-size: 24rpx;
color: #5b6b8a;
margin-bottom: 12rpx;
}
.progress-bar {
height: 12rpx;
border-radius: 999rpx;
background: #e9eef8;
overflow: hidden;
}
.progress {
height: 100%;
border-radius: 999rpx;
background: linear-gradient(90deg, #2c63ff 0%, #ff8a00 100%);
}
.stats {
margin-top: 20rpx;
}
.stat {
width: 48%;
padding: 20rpx 22rpx 12rpx;
border-radius: 20rpx;
box-sizing: border-box;
background: #f7faff;
border: 1rpx solid #e6ecfb;
}
.stat-title {
font-size: 22rpx;
color: #5b6b8a;
}
.stat-icon {
width: 28rpx;
height: 28rpx;
}
.stat-value {
font-size: 42rpx;
font-weight: 700;
color: #ff4d3f;
margin-top: 10rpx;
}
.stat-value.leaf {
color: #12b76a;
}
</style>
+228 -10
View File
@@ -1,19 +1,46 @@
<template> <template>
<view class="p-t-16 p-b-24"> <view class="tab2-wrap p-x-32 p-t-16 p-b-24">
<view class="m-b-24" v-for="(v, i) in list" :key="i"> <view class="shop-card m-b-24" v-for="(v, i) in list" :key="v.id || i">
<aiOrder <view class="shop-card-inner">
:data="v" <view class="shop-card-top">
@addCar="emit('addCar', $event)" <view class="shop-name lineOne">{{ v.name }}</view>
:source="source" </view>
@update="emit('update')"
@shipment="emit('shipment')" <view class="meta-row flex-between">
/> <view class="progress-row">
<view class="progress-bar">
<view
class="progress"
:style="{ width: `${Math.max(0, Math.min(100, Number(v.progress) || 0))}%` }"
></view>
</view>
</view>
<view class="first-time">首次代理时间:{{ v.createTime }}</view>
</view>
<view class="stats flex-between">
<view class="stat">
<view class="stat-head flex-between">
<view class="stat-title">店铺总收益</view>
<image class="stat-icon" src="/static/aiStore/earnings.png" mode="aspectFit" />
</view>
<view class="stat-value">¥{{ formatMoney(v.earnings) }}</view>
</view>
<view class="stat">
<view class="stat-head flex-between">
<view class="stat-title">绿色积分</view>
<image class="stat-icon" src="/static/aiStore/leaf.png" mode="aspectFit" />
</view>
<view class="stat-value leaf">{{ v.leaf || 0 }}</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import aiOrder from '@/components/ai_order/ai_order'; import { ref } from 'vue';
defineProps({ defineProps({
list: { list: {
@@ -27,7 +54,198 @@
}); });
const emit = defineEmits(['addCar', 'update', 'shipment']); const emit = defineEmits(['addCar', 'update', 'shipment']);
const mockList = ref([
{
id: 1,
name: '卓玛阳光防断洗发水',
// level: 'LV.3 超级店长',
createTime: '2026-03-09',
progress: 75,
earnings: 200,
leaf: 3200,
cover: '/static/home/img1.png',
},
{
id: 2,
name: '治山贡鸡源头旗舰店',
// level: 'LV.2 高级店长',
createTime: '2026-02-18',
progress: 62,
earnings: 870,
leaf: 5600,
cover: '/static/home/5.png',
},
{
id: 3,
name: '有购精选生活馆',
// level: 'LV.1 初级店长',
createTime: '2026-01-25',
progress: 48,
earnings: 126.5,
leaf: 2100,
cover: '/static/home/6.png',
},
]);
const formatMoney = (value) => {
const num = Number(value);
if (!Number.isFinite(num)) return '0.00';
return num.toFixed(2);
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab2-wrap {
box-sizing: border-box;
}
.shop-card {
background: #ffffff;
border-radius: 24rpx;
overflow: hidden;
box-shadow: 0 16rpx 40rpx rgba(25, 80, 215, 0.12);
}
.shop-card-inner {
padding: 24rpx;
}
.shop-card-top {
align-items: flex-end;
}
.shop-name {
flex: 1;
font-size: 34rpx;
font-weight: 600;
color: #1b2b4b;
letter-spacing: 0.5rpx;
}
.meta-row {
margin-top: 16rpx;
align-items: center;
gap: 16rpx;
}
.first-time {
flex-shrink: 0;
font-size: 22rpx;
color: #5b6b8a;
}
.progress-row {
flex: 1;
min-width: 180rpx;
}
.cover-wrap {
position: relative;
height: 220rpx;
}
.cover {
width: 100%;
height: 100%;
}
.cover-mask {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.55) 100%);
}
.cover-content {
position: absolute;
left: 24rpx;
right: 24rpx;
bottom: 20rpx;
color: #ffffff;
}
.title {
font-size: 34rpx;
font-weight: 600;
letter-spacing: 0.5rpx;
}
.subText {
font-size: 22rpx;
opacity: 0.92;
}
.tag {
padding: 6rpx 16rpx;
border-radius: 999rpx;
font-size: 22rpx;
border: 1rpx solid rgba(255, 255, 255, 0.4);
background: rgba(255, 255, 255, 0.22);
box-sizing: border-box;
}
.body {
padding: 24rpx;
}
.progress-label {
font-size: 24rpx;
color: #5b6b8a;
margin-bottom: 12rpx;
}
.progress-bar {
height: 15rpx;
border-radius: 999rpx;
background: linear-gradient(90deg, #2c63ff 0%, #ff3b30 100%);
overflow: hidden;
}
.progress {
height: 13rpx;
margin: 1rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.92);
}
.stats {
margin-top: 20rpx;
}
.stat {
width: 48%;
padding: 20rpx 22rpx 12rpx;
border-radius: 20rpx;
box-sizing: border-box;
background: #f7faff;
border: 1rpx solid #e6ecfb;
}
.stat-head {
gap: 12rpx;
}
.stat-title {
font-size: 22rpx;
color: #5b6b8a;
}
.stat-icon {
width: 28rpx;
height: 28rpx;
}
.stat-value {
font-size: 42rpx;
font-weight: 700;
color: #ff4d3f;
margin-top: 10rpx;
}
.stat-value.leaf {
color: #12b76a;
}
</style> </style>
+5 -1
View File
@@ -12,7 +12,7 @@
<!-- <Agreement /> --> <!-- <Agreement /> -->
<view class="theme-ai pages"> <view class="theme-ai pages">
<view class="card1 w100"> <view class="card1 w100">
<image class="w100" :src="$ygUrl + 'transparent_bg.png'" mode="" /> <image v-if="pink_bg" class="w100" :src="$ygUrl + 'transparent_bg.png'" mode="" />
</view> </view>
<view class="scon" :style="{ height: height + 'px' }"> <view class="scon" :style="{ height: height + 'px' }">
<slot /> <slot />
@@ -76,6 +76,10 @@
type: [String, Boolean], type: [String, Boolean],
default: '', default: '',
}, },
pink_bg: {
type: Boolean,
default: true,
},
}); });
let height = ref(0); let height = ref(0);
let sysInfo = uni.getSystemInfoSync(); let sysInfo = uni.getSystemInfoSync();
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB