feat: 添加ai店铺页面

This commit is contained in:
2026-05-27 17:54:46 +08:00
parent 7f8cd06954
commit 2eb5f30d74
6 changed files with 346 additions and 7 deletions
+15 -5
View File
@@ -32,6 +32,17 @@
"group": "商城" "group": "商城"
} }
}, },
{
"path": "pages/index/aiStore",
"style": {
"navigationBarTitleText": "AI店铺"
},
"meta": {
"sync": true,
"title": "AI店铺",
"group": "商城"
}
},
{ {
"path": "pages/index/user", "path": "pages/index/user",
"style": { "style": {
@@ -971,12 +982,11 @@
] ]
}, },
"condition": { "condition": {
//模式配置,仅开发期间生效 "current": 0,
"current": 0, //当前激活的模式(list 的索引项)
"list": [{ "list": [{
"name": "", //模式名称 "name": "",
"path": "", //启动页面,必选 "path": "",
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": ""
}] }]
} }
} }
+163
View File
@@ -0,0 +1,163 @@
<template>
<s-pages title="AI店铺">
<view class="ai-store-page" style="min-height: 100vh">
<view class="search_box flex-between">
<view class="flex-center flex1 search_input">
<image style="width: 36rpx; height: 36rpx" src="/static/icon/search1.png" mode="scaleToFill" />
<input
v-model="keyword"
class="flex1 input"
type="text"
placeholder="搜索店铺.."
placeholder-style="font-size:25rpx;color:#fff"
/>
</view>
<view class="search_btn flex-center" @click="onSearch">搜索</view>
</view>
<view class="tab_box">
<view class="tab-wrap">
<!-- <view class="tab-header">
<view
class="tab-item"
v-for="(item, index) in tabList"
:key="index"
@click="changeTab(index)"
:class="{ active: tabIndex === index }"
>
{{ item.name }}
</view>
<view class="tab-line" :style="{ left: `${tabIndex * 50 + 17.5}%` }"></view>
</view> -->
<view class="tab-content">
<view v-if="tabIndex === 0" class="tab-panel">
<view class="panel-title">选品广场</view>
<view class="panel-desc">这里展示可选商品/店铺内容</view>
</view>
<view v-else class="tab-panel tab-panel-no-padding">
<aistore_tab2 />
</view>
</view>
</view>
</view>
</view>
</s-pages>
</template>
<script setup>
import { ref } from 'vue';
import aistore_tab2 from './components/aistore_tab2.vue';
const keyword = ref('');
const tabList = ref([{ name: '选品广场' }, { name: '我的店铺' }]);
const tabIndex = ref(1);
const changeTab = (index) => {
tabIndex.value = index;
};
const onSearch = () => {};
</script>
<style lang="scss" scoped>
$primary-start: #ff7a45;
$primary-end: #ff4d7cc6;
.ai-store-page {
// background: #fff5f1;
}
.search_box {
margin-top: 30rpx;
padding: 20rpx;
.search_input {
height: 72rpx;
border-radius: 20rpx;
padding-left: 28rpx;
margin-left: 24rpx;
border: 4rpx solid rgba(255, 122, 69, 0.35);
background: linear-gradient(90deg, rgba(255, 122, 69, 0.25), rgba(255, 77, 125, 0.25));
.input {
margin-left: 16rpx;
height: 100%;
color: #ffffff;
}
}
.search_btn {
width: 120rpx;
height: 72rpx;
font-size: 25rpx;
margin: 0 20rpx;
border-radius: 20rpx;
color: #fff;
background: linear-gradient(90deg, $primary-start, $primary-end);
}
}
.tab_box {
.tab-wrap {
width: 100%;
}
.tab-header {
position: relative;
display: flex;
width: 100%;
border-bottom: 1rpx solid rgba(255, 255, 255, 0.55);
background: linear-gradient(90deg, $primary-start, $primary-end);
}
.tab-item {
flex: 1;
padding: 30rpx 0;
font-size: 32rpx;
text-align: center;
color: rgba(255, 255, 255, 0.75);
&.active {
color: #fff;
font-weight: bold;
}
}
.tab-line {
position: absolute;
bottom: 0;
width: 15%;
height: 6rpx;
background: #fff;
border-radius: 10rpx 10rpx 0 0;
transition: left 0.3s ease;
}
.tab-content {
padding: 0 24rpx;
}
.tab-panel {
padding: 28rpx;
border-radius: 20rpx;
background: #ffffff;
}
.tab-panel-no-padding {
padding: 0;
background: transparent;
}
.panel-title {
font-size: 32rpx;
font-weight: 700;
color: #333333;
}
.panel-desc {
margin-top: 12rpx;
font-size: 26rpx;
color: #666666;
}
}
</style>
+151
View File
@@ -0,0 +1,151 @@
<template>
<view class="content">
<view class="border-card" v-for="item in list" :key="item.name">
<view class="card_top flex-between">
<view class="title">{{ item.name }}</view>
<view class="QR_code_img">
<image src="/static/index/2.png" mode="scaleToFill"></image>
</view>
</view>
<view class="info_text flex-row-start">
等级:
<view class="tag">{{ item.grade }}</view>
<text>|</text>
达成时间:{{ item.createTime }}
</view>
<view class="chart_box flex-between">
<view class="chart_item">
<view class="chart_title flex-between">
<view>店铺总收益</view>
<image src="/static/aiStore/earnings.png" mode="scaleToFill"></image>
</view>
<view class="num_text">¥{{ item.price || 0.0 }}</view>
</view>
<view class="chart_item">
<view class="chart_title flex-between">
<view>绿色积分</view>
<image src="/static/aiStore/leaf.png" mode="scaleToFill"></image>
</view>
<view class="num_text">{{ item.leaf }}</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
const list = ref([
{
name: '卓玛阳光防断洗发水',
price: 220.0,
leaf: 4200,
grade: '超级店长',
createTime: '2026-01-15 09:15:00',
},
{
name: '治山贡鸡源头旗舰店',
price: 870.0,
leaf: 5600,
grade: '高级店长',
createTime: '2026-01-15 09:15:00',
},
]);
</script>
<style lang="scss" scoped>
$primary-start: #ff7a45c6;
$primary-end: #ff4d7c7d;
.content {
padding: 0 10rpx 30rpx;
}
.border-card {
margin: 30rpx 0;
padding: 30rpx 40rpx;
border-radius: 22rpx;
color: #ffffff;
background: linear-gradient(90deg, $primary-start 0%, $primary-end 100%);
box-sizing: border-box;
}
.card_top {
.title {
font-size: 35rpx;
position: relative;
padding-left: 35rpx;
&::before {
content: '';
width: 20rpx;
height: 20rpx;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.95);
border-radius: 50%;
}
}
.QR_code_img {
width: 55rpx;
height: 55rpx;
padding: 10rpx;
border: rgba(255, 255, 255, 0.9) 1rpx solid;
border-radius: 10rpx;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
}
}
}
.info_text {
font-size: 20rpx;
color: rgba(255, 255, 255, 0.85);
margin: 10rpx 0 20rpx;
.tag {
padding: 5rpx 15rpx;
color: $primary-start;
border-radius: 15rpx;
background: #fff;
}
text {
margin: 0 25rpx;
opacity: 0.9;
}
}
.chart_box {
.chart_item {
width: 48%;
padding: 20rpx 30rpx 10rpx;
border-radius: 20rpx;
box-sizing: border-box;
border: rgba(255, 255, 255, 0.6) 1rpx solid;
background: rgba(255, 255, 255, 0.18);
.chart_title {
font-size: 20rpx;
image {
width: 30rpx;
height: 30rpx;
margin-left: 10rpx;
}
}
.num_text {
font-size: 40rpx;
margin: 10rpx 0;
}
}
}
</style>
+16 -1
View File
@@ -12,7 +12,7 @@
<uni-notice-bar class="flex1" scrollable background-color="#ffffff" :text="informText" <uni-notice-bar class="flex1" scrollable background-color="#ffffff" :text="informText"
color="#333333" :speed="100" /> color="#333333" :speed="100" />
</view> </view>
<view class="ai-store-entry bg24" @click="goAiStore">ai店铺</view>
<!-- <view class="navList flex-center ju-between"> <!-- <view class="navList flex-center ju-between">
<view v-for="(v, i) in nav" :key="i" class="navItem flex-center flex-column" @click="go(v.url)"> <view v-for="(v, i) in nav" :key="i" class="navItem flex-center flex-column" @click="go(v.url)">
<image class="navImg shrink" :src="`/static/index/${v.icon}`" mode="scaleToFill" /> <image class="navImg shrink" :src="`/static/index/${v.icon}`" mode="scaleToFill" />
@@ -225,6 +225,12 @@ const go = (e) => {
} }
}; };
const goAiStore = () => {
uni.navigateTo({
url: '/pages/index/aiStore',
});
};
// 下拉刷新 // 下拉刷新
onPullDownRefresh(() => { onPullDownRefresh(() => {
// sheep.$store('app').init(); // sheep.$store('app').init();
@@ -255,6 +261,15 @@ onPullDownRefresh(() => {
height: 52rpx; height: 52rpx;
} }
.ai-store-entry {
padding: 24rpx 28rpx;
margin-bottom: 22rpx;
border-radius: 24rpx;
font-size: 28rpx;
font-weight: 600;
color: #333333;
}
:deep(.uni-noticebar) { :deep(.uni-noticebar) {
height: 92rpx; height: 92rpx;
border-radius: 12rpx; border-radius: 12rpx;
Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B