feat:添加了返回上一页

This commit is contained in:
sundongyu 2024-05-27 10:36:02 +08:00
parent 55619df6f2
commit 8b0cc76627
2 changed files with 37 additions and 13 deletions

View File

@ -21,6 +21,7 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div class="color-nav" @click="colorNav">返回上一页</div>
</el-header> </el-header>
<el-main> <el-main>
<div style="margin-top: 2rem; margin-bottom: 1rem"> <div style="margin-top: 2rem; margin-bottom: 1rem">
@ -77,13 +78,15 @@
</el-row> </el-row>
</div> </div>
<div> <div>
<el-row :gutter="20"> <el-row>
<el-col :span="4" :offset="2"> <el-col v-for="(item, index) in slot" :key="index" :span="4" :offset="2">
<div class="cardone"> <div class="cardone">
<div><img src="" style="width: 5rem; height: 5rem; border-radius: 0.5rem" /></div> <div>
<div class="card-textone">汽车多门店预约</div> <img :src="item.icon" style="width: 5rem; height: 5rem; border-radius: 0.5rem" />
</div>
<div class="card-textone">{{ item.title }}</div>
<div class="card-texttow">免费使用7天</div> <div class="card-texttow">免费使用7天</div>
<div class="card-textthree">气测行业门店预约系统搭载最新的内部群机器人通知</div> <div class="card-textthree">{{ item.desce }}</div>
<div class="card-textfour">免费使用</div> <div class="card-textfour">免费使用</div>
</div> </div>
</el-col> </el-col>
@ -97,6 +100,9 @@
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { posttListAPI } from '../api/index' import { posttListAPI } from '../api/index'
import { useRouter } from 'vue-router'
const router = useRouter()
const slot = ref([])
const data = ref([ const data = ref([
{ {
text: '全部' text: '全部'
@ -116,12 +122,17 @@ const data = ref([
]) ])
const posttList = async () => { const posttList = async () => {
const arr = await posttListAPI({ id: '', category: '', name: '', tags: '', status: '' }) const arr = await posttListAPI({ id: '', category: '', name: '', tags: '', status: '' })
console.log(arr) slot.value = arr.data
console.log(arr.data)
} }
const dataIndex = ref(0) const dataIndex = ref(0)
function click (index) { function click (index) {
dataIndex.value = index dataIndex.value = index
} }
function colorNav () {
console.log(1)
router.back()
}
onMounted(() => { onMounted(() => {
posttList() posttList()
}) })
@ -132,7 +143,7 @@ onMounted(() => {
padding: 0; padding: 0;
} }
.color { .color {
max-width: 100%; max-width: 99%;
background-color: #4772ff; background-color: #4772ff;
color: #fff; color: #fff;
padding-top: 1rem; padding-top: 1rem;
@ -197,6 +208,7 @@ onMounted(() => {
width: 240px; width: 240px;
padding: 30px; padding: 30px;
background-color: #fff; background-color: #fff;
margin-bottom: 1.5rem;
transition: transform 0.3s ease; transition: transform 0.3s ease;
.card-textone { .card-textone {
margin-top: 1rem; margin-top: 1rem;

View File

@ -41,7 +41,8 @@
<div> <div>
<div class="block"> <div class="block">
<div style="font-size: 1.2rem; font-weight: 700"> <div style="font-size: 1.2rem; font-weight: 700">
我的商铺(0/10) 我的商铺(<span>{{ data.length }}</span
>/10)
<span style="font-size: 0.8rem; color: #a6aec2" <span style="font-size: 0.8rem; color: #a6aec2"
>每个商铺为独立运营的会员是不通用的每个商铺可以邀请合伙人一起管理</span >每个商铺为独立运营的会员是不通用的每个商铺可以邀请合伙人一起管理</span
> >
@ -63,11 +64,17 @@
<div @click="enterInto"> <div @click="enterInto">
<div class="blockone"> <div class="blockone">
<div class="blockone-textone"> <div class="blockone-textone">
{{ item.title }}<span class="blockone-textone-one">(通用服务业)</span <div>
><span class="blockone-textone-tow">创始人</span> {{ item.title }}
<span class="blockone-textone-one"
>(<span>{{ item.key }}</span
>)
</span>
</div>
<span class="blockone-textone-tow">创始人</span>
</div> </div>
<div class="blockone-texttow"> <div class="blockone-texttow">
开通时间: &nbsp; <span>2024-05-25 15:57:34</span> 开通时间: &nbsp; <span>{{ item.createTime }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -94,7 +101,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, toRefs, onMounted } from 'vue' import { ref, reactive, toRefs, onMounted } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { posttListAPI, getListAPI } from '../api/index' import { getListAPI } from '../api/index'
const router = useRouter() const router = useRouter()
const tenantId = ref(1) const tenantId = ref(1)
const data: any = ref([]) const data: any = ref([])
@ -169,11 +176,16 @@ onMounted(() => {
margin-bottom: 1rem; margin-bottom: 1rem;
margin-top: 1.5rem; margin-top: 1.5rem;
margin-left: 0.8rem; margin-left: 0.8rem;
display: flex;
justify-content: space-between;
.blockone-textone-one { .blockone-textone-one {
font-size: 1rem; font-size: 1rem;
color: #91919b; color: #91919b;
} }
.blockone-textone-tow { .blockone-textone-tow {
display: flex;
align-items: center;
text-align: center;
font-size: 0.7rem; font-size: 0.7rem;
font-weight: 500; font-weight: 500;
padding: 0rem 0.5rem; padding: 0rem 0.5rem;
@ -181,7 +193,7 @@ onMounted(() => {
color: #4772ff; color: #4772ff;
height: 20px; height: 20px;
border-radius: 10px; border-radius: 10px;
margin-left: 8rem; margin-right: 1rem;
} }
} }
.blockone-texttow { .blockone-texttow {