feat: 添加ai店铺页面
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user