首页搭建

develoop
Your Name 10 months ago
parent 43a661633b
commit cf920b5c1f
  1. BIN
      assets/images/Group9591.png
  2. BIN
      assets/images/image19.png
  3. BIN
      assets/images/image20.png
  4. BIN
      assets/images/image64.png
  5. BIN
      assets/images/image70.png
  6. 11
      assets/js/flexible.js
  7. 4
      components/layoutFooter.vue
  8. 487
      components/layoutHeader copy.vue
  9. 537
      components/layoutHeader.vue
  10. 4
      layouts/default.vue
  11. 16
      nuxt.config.ts
  12. 401
      package-lock.json
  13. 5
      package.json
  14. 699
      pages/homeIndex/bannerIndex.vue
  15. 8
      pages/index.vue
  16. 5
      plugins/lib-flexible.ts
  17. 18
      plugins/rem.js
  18. 7
      postcss.config.js
  19. 9610
      yarn.lock

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

@ -0,0 +1,11 @@
!(function (e, t) {
var n = t.documentElement,
i = 'orientationchange' in window ? 'orientationchange' : 'resize',
a = function () {
var e = n.clientWidth
e && (n.style.fontSize = 100 * (e / 1920) + 'px')
}
t.addEventListener &&
(e.addEventListener(i, a, !1),
t.addEventListener('DOMContentLoaded', a, !1))
})(window, document)

@ -34,7 +34,7 @@ onMounted(() => {
<!--页面底部-->
<template>
<div v-if="pcHomeCon" class="layoutFooter mt-20px" ref="targetElement">
<div
<!-- <div
v-if="pcHomeCon.philosophyList && pcHomeCon.philosophyList.length"
class="w-100% h-90px bg-#FFFFFF"
style="border-top: 1px solid #f5f5f5;"
@ -47,7 +47,7 @@ onMounted(() => {
</div>
</div>
</div>
</div>
</div> -->
<!-- 底部黑色模块 -->
<div class="py-40px bg-#333333">
<div class="wrapper_1200 flex justify-between">

@ -0,0 +1,487 @@
<!--页面头部-->
<template>
<div class="relative w-100%">
<!--黑条-->
<div class="header bg-#F5F5F5" :class="isShowTop && useApp.isHomePage ? 'headerfixed' : ''">
<div class="headerCon acea-row row-between-wrapper">
<div class="flex-y-center text-12px">
<div class="mr-30px flex-y-center">
<nuxt-link :to="{ path: '/' }" class="flex-y-center"
><span class="iconfont icon-shangchengshouye inline-block"></span>商城首页</nuxt-link
>
</div>
<el-popover
v-if="pcHomeCon && pcHomeCon.goPhoneQrCodeType"
:width="auto"
:minWidth="auto"
popper-style="box-shadow: rgb(14 18 22 / 35%) 0px 10px 38px -10px, rgb(14 18 22 / 20%) 0px 10px 20px -15px; padding: 20px;"
>
<template #reference>
<div class="flex-y-center mobileMall">
<span class="iconfont icon-shoujishangcheng inline-block"></span>手机商城
</div>
</template>
<template #default>
<div class="acea-row">
<div v-if="pcHomeCon.goPhoneQrCodeType.includes('1')">
<div :class="pcHomeCon.goPhoneQrCodeType.includes('2')?'mr-26px':''">
<div class="borderSol-eee w-80px h-80px flex-center b-rd-4px mb-10px">
<el-image :src="wechatQrcode" class="w-72px h-72px"></el-image>
</div>
<div class="font-400 text-12px text-#333 w-80px text-center">小程序商城</div>
</div>
</div>
<div v-if="pcHomeCon.goPhoneQrCodeType.includes('2')">
<div class="borderSol-eee w-80px h-80px flex-center b-rd-4px mb-10px">
<qrcode-vue :value="indexDomain" :size="72" level="H" />
</div>
<div class="font-400 text-12px text-#333 w-80px text-center">H5商城</div>
</div>
</div>
</template>
</el-popover>
</div>
<div class="user acea-row row-middle">
<div v-if="!userStore.isLogin" class="item" @click="handlerLogin">登录/注册</div>
<div v-else class="acea-row row-middle" @click.stop="handlerNuxtLink('/users/user_info', 11)">
<span class="line1 font-color" style="max-width: 135px">Hi{{ userStore.userInfo.nikeName }}</span>
<p class="ml-10px item" @click.stop="handleHeaderLogout">退出</p>
</div>
<div class="item" @click="handlerNuxtLink('/users/order_list', 1)">我的订单</div>
<div class="item" @click="handlerNuxtLink('/users/collect_products', 3)">我的收藏</div>
<el-dropdown class="user">
<span class="el-dropdown-link text-12px item">
商户入驻
<el-icon class="el-icon--right">
<arrow-down />
</el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item class="text-12px" @click="handlerNuxtLink('/merchant/merchant_settled', 0)"
>商户入驻</el-dropdown-item
>
<el-dropdown-item class="text-12px" @click="handlerNuxtLink('/merchant/application_record', 0)"
>申请记录</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</div>
</div>
<!--菜单/搜索框/菜单-->
<div class="w-100% bg-white">
<!--搜索框-->
<div :class="isShowTop && useApp.isHomePage ? 'menufixed' : ''" class="w-100% bg-white">
<div class="min_wrapper_1200">
<div class="flex flex-justify-between pt-30px">
<!--logo-->
<nuxt-link :to="{ path: '/' }"
><el-image lazy :src="pcHomeCon?.leftTopLogo" class="w100px h36px"></el-image
></nuxt-link>
<!--搜索框商品详情页商户主页-->
<div v-if="useApp.routePath === '/merchant/merchant_home' || useApp.routePath.includes('product/detail')" class="acea-row">
<div class="w-560px ml-5px">
<el-input
v-model="searchVal"
placeholder="搜索全站/本店"
class="input-with-select"
@keyup.enter="handleEnterKey"
>
<template #append>
<div @click="handleEnterKey" class="cursors w-80px h-40px bg-color b-rd-20px text-center lh-40px">
<span class="text-#fff text-14px font-400">搜全站</span>
</div>
</template>
</el-input>
</div>
<div @click="handleEnterKeyHome" class="cursors w-80px h-40px bg-#333333 b-rd-20px text-center lh-40px ml-10px">
<span class="text-#fff text-14px font-400">搜本店</span>
</div>
</div>
<!--搜索框-->
<div v-else class="w-560px ml-5px">
<el-input
v-model="searchVal"
placeholder="搜索商品/店铺"
class="input-with-select"
@keyup.enter="handleEnterKey"
>
<template #prepend>
<el-select v-model="selectVal" placeholder="Select" style="width: 115px">
<el-option label="商品" value="1" />
<el-option label="店铺" value="2" />
</el-select>
</template>
<template #append>
<div @click="handleEnterKey" class="cursors w-80px h-40px bg-color b-rd-20px text-center lh-40px">
<span class="iconfont icon-sousuo text-#fff font-400"></span>
</div>
</template>
</el-input>
</div>
<!--购物车-->
<div
@click="handlerNuxtLink('/order/shopping_cart', 0)"
class="h-40px borderSol b-rd-20px font-color text-14px flex-center mb-26px cursors w-140px mr-5px"
>
<span class="iconfont icon-gouwuche mr-10px"></span>购物车({{ useApp.carNumber }})
</div>
</div>
</div>
</div>
<!--菜单分类-->
<div v-if="useApp.isShowHeaderMenu" class="w-100% bg-white header-menu">
<div class="min_wrapper_1200">
<div @mouseenter="handlerMenuEnter" @mouseleave="handleSubmitLeave">
<!--菜单分类-->
<div class="menu flex-y-center">
<div
v-for="(item, index) in menuList"
:key="item.id"
@mouseenter="handlerMenuEnter(index)"
@click="handleGoPage(item, index)"
:class="index === 0 ? 'classification' : current===item.id ? 'font-color':''"
class="cursor-pointer menu-item fontColor333 text-16px mr-40px font-500 oppoSans-M"
>
<span v-show="index === 0" class="iconfont icon-shangpinfenlei mr-8px"></span>{{ item.name }}
</div>
</div>
<!--分类显示 -->
<div v-if="showMenu" class="absolute w-1200px yop-179px z-11" :class="showSeach ? 'on' : ''">
<div class="classify z-8">
<!--分类组件-->
<classify-card @handleSubmitLeave="handleSubmitLeave"></classify-card>
</div>
</div>
</div>
</div>
</div>
</div>
<!--登录弹窗-->
<user-login ref="userLoginRef" @on-login-succeeded="onLoginSucceeded"></user-login>
</div>
</template>
<script setup lang="ts">
import { headerMenuListDefault } from '~/components/defaultComponents'
import { ArrowDown } from '@element-plus/icons-vue'
import {b64toBlob, Debounce, linkNavigateTo} from '~/utils/util'
import { loginLogout } from '~/server/userApi'
import feedback from '~/utils/feedback'
defineOptions({ name: 'layoutHeader' })
import { useUserStore } from '@/stores/user'
import {onMounted, ref, watch} from 'vue'
import { searcKeywordApi } from '~/server/goodsApi'
import { useAppStore } from '~/stores/app'
import QrcodeVue from 'qrcode.vue'
import { indexDomainApi, wechatQrcodeApi } from '~/server/homeApi'
import {auto} from "@popperjs/core";
const userStore = useUserStore()
const useApp = useAppStore()
const route = useRoute()
/**
* 监听页面滚动
*/
onMounted(() => {
window.addEventListener('scroll', handleScroll)
})
const isShowTop = ref<boolean>(false)
const handleScroll = () => {
const t = document.documentElement.scrollTop || document.body.scrollTop
if (t > 100) {
isShowTop.value = true
} else {
isShowTop.value = false
}
}
//
const props = defineProps({
pcHomeCon: {
type: Object,
default: null,
},
})
const { pcHomeCon } = toRefs(props)
//
const { data: indexDomain } = useAsyncData(() => indexDomainApi())
//
const wechatQrcode = ref<string>('')
const getWechatQrcode = async () => {
let data = await wechatQrcodeApi({
scene: 'id=0',
path: 'pages/index/index',
env_version: 'trial',
})
let blob = b64toBlob(data.code)
wechatQrcode.value = URL.createObjectURL(blob)
}
getWechatQrcode();
//
const searchVal = ref<string>('') //
const selectVal = ref<string>('1') //
searchVal.value = route.query.searchValue ? route.query.searchValue.toString() : searchVal.value.toString()
onMounted(() => {
selectVal.value = '1'
});
//
const handleEnterKeyHome = async()=>{
linkNavigateTo(`/merchant/merchant_home`, { merId: useApp.pcMerId, searchValue: searchVal.value, currentVal: 1 })
}
//
const handleEnterKey = async () => {
//useApp.routePath === '/merchant/merchant_home' || useApp.routePath.includes('product/detail')
if(useApp.routePath === '/merchant/merchant_home'|| useApp.routePath.includes('product/detail')){
await linkNavigateTo(`/product/product_list`, { searchValue: searchVal.value })
}else{
if (selectVal.value === '1') {
await linkNavigateTo(`/product/product_list`, { searchValue: searchVal.value })
} else {
await linkNavigateTo(`/merchant/merchant_list`, { searchValue: searchVal.value })
}
}
showSeach.value = !showSeach.value
showMenu.value = false
}
//
const menuList = ref<ItemObject[]>(headerMenuListDefault())
//
const { $aos } = useNuxtApp()
onMounted(() => {
$aos().init({
easing: 'ease-out-back',
duration: 1000,
})
})
//
const onLoginSucceeded = () => {
// getCartCount()
}
/**
* 热门搜索词
*/
const showSeach = ref<boolean>(false)
const { data: searcKeywordList } = await useAsyncData(async () => searcKeywordApi())
//
const nuxtApp = useNuxtApp()
nuxtApp.provide('onClearSearchVal', () => {
searchVal.value = ''
})
/**
* 菜单移入
*/
const checkedIndex = ref<number>(10) //
const showMenu = ref<boolean>(false) //
const handlerMenuEnter = (idx: number | undefined) => {
checkedIndex.value = idx ? idx : 10
if (idx === 0 && !useApp.isHomePage) {
showMenu.value = true
} else {
showMenu.value = false
}
}
//
const handleSubmitLeave = () => {
showMenu.value = false
}
//
const current = ref<string>(route.query.type?<string>route.query.type:'')
watch(
() => <string>route.query.type,
(newValue) => {
current.value = newValue
},
)
const handleGoPage = async (obj: any, idx: number) => {
current.value = obj.id
if (idx === 0) return
await linkNavigateTo(obj.pc_url, { type: obj.id })
}
/**
* 登录
*/
const userLoginRef = shallowRef()
const handlerLogin = async () => {
if (userStore.isLogin) {
// await linkNavigateTo('/forum/create')
} else {
//data.backUrl = '/forum/create'
userLoginRef.value.open()
}
}
/**
* 地址跳转
*/
const handlerNuxtLink = async (url: string, type: number) => {
if (userStore.token) {
await linkNavigateTo(url, { type: type })
} else {
userLoginRef.value.open()
}
}
//退
//0
const { getCarNumber } = useAppStore()
const handleHeaderLogout = Debounce(async () => {
await feedback.confirm('确定退出吗?')
await loginLogout()
await getCarNumber(0)
await userStore.logout()
},500)
</script>
<style scoped lang="scss">
:deep(.el-dropdown-menu__item){
font-size: 12px !important;
}
:deep(.el-dropdown__popper.el-popper), :deep(.el-popper){
font-size: 12px !important;
}
.header-menu {
border-bottom: 2px solid #e93323;
}
.mobileMall{
&:hover {
color: #e93323;
}
}
.classification {
width: 200px;
height: 40px;
background: #e93323;
border-radius: 12px 12px 0px 0px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
:deep(.el-input-group) {
height: 40px;
background: #ffffff;
border-radius: 20px 20px 20px 20px;
border: 1px solid #e93323;
overflow: hidden;
}
:deep(.el-input__wrapper) {
padding-left: 20px !important;
}
:deep(.el-input__wrapper),
:deep(.el-input-group__prepend),
:deep(.el-input-group__prepend:hover),
:deep(.el-input-group__append) {
padding: 0;
box-shadow: none !important;
--el-fill-color-light: rgba(255, 255, 255, 0) !important;
}
:deep(.el-input-group__append) {
padding: 0;
}
:deep(.el-input) {
--el-input-hover-border-color: none !important;
--el-input-focus-border-color: none !important;
}
:deep(.el-select) {
margin: 0 !important;
width: 74px !important;
--el-select-input-focus-border-color: none !important;
}
:deep(.el-input-group__prepend:hover) {
border: none;
}
.headerfixed {
top: 0;
z-index: 99;
position: fixed;
}
.menufixed {
top: 40px;
z-index: 99;
position: fixed;
}
.seachfixed {
position: fixed;
top: 124px;
z-index: 99;
}
.classify {
border-radius: 0px 0px 26px 26px;
overflow: hidden;
box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.1);
}
.search {
&-ipt {
outline: none;
border: 0;
background: none;
}
&-history {
border-radius: 0px 0px 16px 16px;
}
}
.header {
flex: 1;
width: 100%;
height: 40px;
font-size: 12px;
color: #666666;
cursor: pointer;
.headerCon {
height: 100%;
position: relative;
max-width: 1200px;
margin: 0 auto;
a {
color: #666666;
&:hover {
color: #e93323;
}
}
.iconfont {
margin-right: 5px;
}
.user {
.item {
margin-right: 8px;
position: relative;
padding-left: 8px;
color: #666666;
&:hover {
color: #e93323;
}
}
}
}
}
</style>

@ -1,332 +1,42 @@
<!--页面头部-->
<template>
<div class="relative w-100%">
<!--黑条-->
<div class="header bg-#F5F5F5" :class="isShowTop && useApp.isHomePage ? 'headerfixed' : ''">
<div class="headerCon acea-row row-between-wrapper">
<div class="flex-y-center text-12px">
<div class="mr-30px flex-y-center">
<nuxt-link :to="{ path: '/' }" class="flex-y-center"
><span class="iconfont icon-shangchengshouye inline-block"></span>商城首页</nuxt-link
>
</div>
<el-popover
v-if="pcHomeCon && pcHomeCon.goPhoneQrCodeType"
:width="auto"
:minWidth="auto"
popper-style="box-shadow: rgb(14 18 22 / 35%) 0px 10px 38px -10px, rgb(14 18 22 / 20%) 0px 10px 20px -15px; padding: 20px;"
>
<template #reference>
<div class="flex-y-center mobileMall">
<span class="iconfont icon-shoujishangcheng inline-block"></span>手机商城
</div>
</template>
<template #default>
<div class="acea-row">
<div v-if="pcHomeCon.goPhoneQrCodeType.includes('1')">
<div :class="pcHomeCon.goPhoneQrCodeType.includes('2')?'mr-26px':''">
<div class="borderSol-eee w-80px h-80px flex-center b-rd-4px mb-10px">
<el-image :src="wechatQrcode" class="w-72px h-72px"></el-image>
</div>
<div class="font-400 text-12px text-#333 w-80px text-center">小程序商城</div>
</div>
</div>
<div v-if="pcHomeCon.goPhoneQrCodeType.includes('2')">
<div class="borderSol-eee w-80px h-80px flex-center b-rd-4px mb-10px">
<qrcode-vue :value="indexDomain" :size="72" level="H" />
</div>
<div class="font-400 text-12px text-#333 w-80px text-center">H5商城</div>
</div>
</div>
</template>
</el-popover>
</div>
<div class="user acea-row row-middle">
<div v-if="!userStore.isLogin" class="item" @click="handlerLogin">登录/注册</div>
<div v-else class="acea-row row-middle" @click.stop="handlerNuxtLink('/users/user_info', 11)">
<span class="line1 font-color" style="max-width: 135px">Hi{{ userStore.userInfo.nikeName }}</span>
<p class="ml-10px item" @click.stop="handleHeaderLogout">退出</p>
</div>
<div class="item" @click="handlerNuxtLink('/users/order_list', 1)">我的订单</div>
<div class="item" @click="handlerNuxtLink('/users/collect_products', 3)">我的收藏</div>
<el-dropdown class="user">
<span class="el-dropdown-link text-12px item">
商户入驻
<el-icon class="el-icon--right">
<arrow-down />
</el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item class="text-12px" @click="handlerNuxtLink('/merchant/merchant_settled', 0)"
>商户入驻</el-dropdown-item
>
<el-dropdown-item class="text-12px" @click="handlerNuxtLink('/merchant/application_record', 0)"
>申请记录</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
<div class="w-100%" style="background-color: #fff;">
<div class="nav">
<div class="menu">
<ul>
<li @click="goTo(1)">首页</li>
<li @click="goTo(2)">下订单</li>
<li @click="goTo(3)">接订单</li>
<li @click="goTo(4)">找花店</li>
<li @click="goTo(5)">花店地图</li>
<li @click="goTo(6)">服务中心</li>
<li @click="goTo(7)">下载中心</li>
<li ref="active" class="active"></li>
</ul>
</div>
</div>
<!--菜单/搜索框/菜单-->
<div class="w-100% bg-white">
<!--搜索框-->
<div :class="isShowTop && useApp.isHomePage ? 'menufixed' : ''" class="w-100% bg-white">
<div class="min_wrapper_1200">
<div class="flex flex-justify-between pt-30px">
<!--logo-->
<nuxt-link :to="{ path: '/' }"
><el-image lazy :src="pcHomeCon?.leftTopLogo" class="w100px h36px"></el-image
></nuxt-link>
<!--搜索框商品详情页商户主页-->
<div v-if="useApp.routePath === '/merchant/merchant_home' || useApp.routePath.includes('product/detail')" class="acea-row">
<div class="w-560px ml-5px">
<el-input
v-model="searchVal"
placeholder="搜索全站/本店"
class="input-with-select"
@keyup.enter="handleEnterKey"
>
<template #append>
<div @click="handleEnterKey" class="cursors w-80px h-40px bg-color b-rd-20px text-center lh-40px">
<span class="text-#fff text-14px font-400">搜全站</span>
</div>
</template>
</el-input>
</div>
<div @click="handleEnterKeyHome" class="cursors w-80px h-40px bg-#333333 b-rd-20px text-center lh-40px ml-10px">
<span class="text-#fff text-14px font-400">搜本店</span>
</div>
</div>
<!--搜索框-->
<div v-else class="w-560px ml-5px">
<el-input
v-model="searchVal"
placeholder="搜索商品/店铺"
class="input-with-select"
@keyup.enter="handleEnterKey"
>
<template #prepend>
<el-select v-model="selectVal" placeholder="Select" style="width: 115px">
<el-option label="商品" value="1" />
<el-option label="店铺" value="2" />
</el-select>
</template>
<template #append>
<div @click="handleEnterKey" class="cursors w-80px h-40px bg-color b-rd-20px text-center lh-40px">
<span class="iconfont icon-sousuo text-#fff font-400"></span>
</div>
</template>
</el-input>
</div>
<!--购物车-->
<div
@click="handlerNuxtLink('/order/shopping_cart', 0)"
class="h-40px borderSol b-rd-20px font-color text-14px flex-center mb-26px cursors w-140px mr-5px"
>
<span class="iconfont icon-gouwuche mr-10px"></span>购物车({{ useApp.carNumber }})
</div>
</div>
</div>
</div>
<!--菜单分类-->
<div v-if="useApp.isShowHeaderMenu" class="w-100% bg-white header-menu">
<div class="min_wrapper_1200">
<div @mouseenter="handlerMenuEnter" @mouseleave="handleSubmitLeave">
<!--菜单分类-->
<div class="menu flex-y-center">
<div
v-for="(item, index) in menuList"
:key="item.id"
@mouseenter="handlerMenuEnter(index)"
@click="handleGoPage(item, index)"
:class="index === 0 ? 'classification' : current===item.id ? 'font-color':''"
class="cursor-pointer menu-item fontColor333 text-16px mr-40px font-500 oppoSans-M"
>
<span v-show="index === 0" class="iconfont icon-shangpinfenlei mr-8px"></span>{{ item.name }}
</div>
</div>
<!--分类显示 -->
<div v-if="showMenu" class="absolute w-1200px yop-179px z-11" :class="showSeach ? 'on' : ''">
<div class="classify z-8">
<!--分类组件-->
<classify-card @handleSubmitLeave="handleSubmitLeave"></classify-card>
</div>
</div>
</div>
</div>
<div class="login-btn">
<div class="login" @click="login">登录</div>
<div class="registered" @click="login">注册</div>
</div>
</div>
<!--登录弹窗-->
<user-login ref="userLoginRef" @on-login-succeeded="onLoginSucceeded"></user-login>
<!--登录弹窗-->
<user-login ref="userLoginRef" @on-login-succeeded="onLoginSucceeded"></user-login>
</div>
</template>
<script setup lang="ts">
import { headerMenuListDefault } from '~/components/defaultComponents'
import { ArrowDown } from '@element-plus/icons-vue'
import {b64toBlob, Debounce, linkNavigateTo} from '~/utils/util'
import { loginLogout } from '~/server/userApi'
import feedback from '~/utils/feedback'
defineOptions({ name: 'layoutHeader' })
<script lang="ts" setup>
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
import { useUserStore } from '@/stores/user'
import {onMounted, ref, watch} from 'vue'
import { searcKeywordApi } from '~/server/goodsApi'
import { useAppStore } from '~/stores/app'
import QrcodeVue from 'qrcode.vue'
import { indexDomainApi, wechatQrcodeApi } from '~/server/homeApi'
import {auto} from "@popperjs/core";
const userStore = useUserStore()
const useApp = useAppStore()
const route = useRoute()
/**
* 监听页面滚动
*/
onMounted(() => {
window.addEventListener('scroll', handleScroll)
})
const isShowTop = ref<boolean>(false)
const handleScroll = () => {
const t = document.documentElement.scrollTop || document.body.scrollTop
if (t > 100) {
isShowTop.value = true
} else {
isShowTop.value = false
}
}
//
const props = defineProps({
pcHomeCon: {
type: Object,
default: null,
},
})
const { pcHomeCon } = toRefs(props)
//
const { data: indexDomain } = useAsyncData(() => indexDomainApi())
//
const wechatQrcode = ref<string>('')
const getWechatQrcode = async () => {
let data = await wechatQrcodeApi({
scene: 'id=0',
path: 'pages/index/index',
env_version: 'trial',
})
let blob = b64toBlob(data.code)
wechatQrcode.value = URL.createObjectURL(blob)
}
getWechatQrcode();
//
const searchVal = ref<string>('') //
const selectVal = ref<string>('1') //
searchVal.value = route.query.searchValue ? route.query.searchValue.toString() : searchVal.value.toString()
onMounted(() => {
selectVal.value = '1'
});
//
const handleEnterKeyHome = async()=>{
linkNavigateTo(`/merchant/merchant_home`, { merId: useApp.pcMerId, searchValue: searchVal.value, currentVal: 1 })
}
//
const handleEnterKey = async () => {
//useApp.routePath === '/merchant/merchant_home' || useApp.routePath.includes('product/detail')
if(useApp.routePath === '/merchant/merchant_home'|| useApp.routePath.includes('product/detail')){
await linkNavigateTo(`/product/product_list`, { searchValue: searchVal.value })
}else{
if (selectVal.value === '1') {
await linkNavigateTo(`/product/product_list`, { searchValue: searchVal.value })
} else {
await linkNavigateTo(`/merchant/merchant_list`, { searchValue: searchVal.value })
}
}
showSeach.value = !showSeach.value
showMenu.value = false
}
//
const menuList = ref<ItemObject[]>(headerMenuListDefault())
//
const { $aos } = useNuxtApp()
onMounted(() => {
$aos().init({
easing: 'ease-out-back',
duration: 1000,
})
})
//
const onLoginSucceeded = () => {
// getCartCount()
}
/**
* 热门搜索词
*/
const showSeach = ref<boolean>(false)
const { data: searcKeywordList } = await useAsyncData(async () => searcKeywordApi())
//
const nuxtApp = useNuxtApp()
nuxtApp.provide('onClearSearchVal', () => {
searchVal.value = ''
})
/**
* 菜单移入
*/
const checkedIndex = ref<number>(10) //
const showMenu = ref<boolean>(false) //
const handlerMenuEnter = (idx: number | undefined) => {
checkedIndex.value = idx ? idx : 10
if (idx === 0 && !useApp.isHomePage) {
showMenu.value = true
} else {
showMenu.value = false
}
}
//
const handleSubmitLeave = () => {
showMenu.value = false
}
//
const active = ref(null)
const userLoginRef = shallowRef()
const current = ref<string>(route.query.type?<string>route.query.type:'')
watch(
() => <string>route.query.type,
(newValue) => {
current.value = newValue
},
)
const goTo = (index: number) => {
// console.log(active.value.offsetWidth);
const width = active.value.offsetWidth
active.value.style.left = (index - 1) * width + 'px'
const handleGoPage = async (obj: any, idx: number) => {
current.value = obj.id
if (idx === 0) return
await linkNavigateTo(obj.pc_url, { type: obj.id })
}
/**
* 登录
*/
const userLoginRef = shallowRef()
const handlerLogin = async () => {
const login = () => {
if (userStore.isLogin) {
// await linkNavigateTo('/forum/create')
} else {
@ -334,153 +44,62 @@ const handlerLogin = async () => {
userLoginRef.value.open()
}
}
/**
* 地址跳转
*/
const handlerNuxtLink = async (url: string, type: number) => {
if (userStore.token) {
await linkNavigateTo(url, { type: type })
} else {
userLoginRef.value.open()
}
}
//退
//0
const { getCarNumber } = useAppStore()
const handleHeaderLogout = Debounce(async () => {
await feedback.confirm('确定退出吗?')
await loginLogout()
await getCarNumber(0)
await userStore.logout()
},500)
</script>
<style scoped lang="scss">
:deep(.el-dropdown-menu__item){
font-size: 12px !important;
}
:deep(.el-dropdown__popper.el-popper), :deep(.el-popper){
font-size: 12px !important;
}
.header-menu {
border-bottom: 2px solid #e93323;
}
.mobileMall{
&:hover {
color: #e93323;
}
}
.classification {
width: 200px;
height: 40px;
background: #e93323;
border-radius: 12px 12px 0px 0px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
:deep(.el-input-group) {
height: 40px;
background: #ffffff;
border-radius: 20px 20px 20px 20px;
border: 1px solid #e93323;
overflow: hidden;
}
:deep(.el-input__wrapper) {
padding-left: 20px !important;
}
:deep(.el-input__wrapper),
:deep(.el-input-group__prepend),
:deep(.el-input-group__prepend:hover),
:deep(.el-input-group__append) {
padding: 0;
box-shadow: none !important;
--el-fill-color-light: rgba(255, 255, 255, 0) !important;
}
:deep(.el-input-group__append) {
padding: 0;
}
:deep(.el-input) {
--el-input-hover-border-color: none !important;
--el-input-focus-border-color: none !important;
}
:deep(.el-select) {
margin: 0 !important;
width: 74px !important;
--el-select-input-focus-border-color: none !important;
}
:deep(.el-input-group__prepend:hover) {
border: none;
}
.headerfixed {
top: 0;
z-index: 99;
position: fixed;
}
.menufixed {
top: 40px;
z-index: 99;
position: fixed;
}
.seachfixed {
position: fixed;
top: 124px;
z-index: 99;
}
.classify {
border-radius: 0px 0px 26px 26px;
overflow: hidden;
box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.1);
}
.search {
&-ipt {
outline: none;
border: 0;
background: none;
}
&-history {
border-radius: 0px 0px 16px 16px;
}
}
.header {
flex: 1;
width: 100%;
height: 40px;
font-size: 12px;
color: #666666;
cursor: pointer;
.headerCon {
height: 100%;
<style lang="scss" scoped>
.nav {
display: flex;
justify-content: space-between;
width: 6.25rem;
margin: auto;
height: .5208rem;
background-color: #fff;
ul {
position: relative;
max-width: 1200px;
margin: 0 auto;
a {
color: #666666;
&:hover {
color: #e93323;
}
padding: 0;
margin: 0;
display: flex;
align-items: center;
height: 100%;
li {
font-size: .0833rem;
width: .4688rem;
list-style: none;
text-align: center;
cursor: pointer;
}
.iconfont {
margin-right: 5px;
.active {
position: absolute;
bottom: 0;
left: 0;
width: .4688rem;
height: .0365rem;
background: linear-gradient(270deg, #ffd4ac 0%, #ff94d4 53%, #ff518f 100%);
border-radius: 0px 0px 0px 0px;
opacity: 1;
// transition: width 5s linear 0s;
}
.user {
.item {
margin-right: 8px;
position: relative;
padding-left: 8px;
color: #666666;
&:hover {
color: #e93323;
}
}
}
.login-btn {
display: flex;
align-items: center;
height: 100%;
.login {
width: .4219rem;
height: .1563rem;
border-radius: .125rem;
color: #000;
text-align: center;
line-height: .1563rem;
}
.registered {
width: .4219rem;
height: .1563rem;
border-radius: .125rem;
background: linear-gradient(270deg, #ffd4ac 0%, #ff94d4 53%, #ff518f 100%);
color: #fff;
text-align: center;
line-height: .1563rem;
}
}
}

@ -1,7 +1,7 @@
<template>
<div class="w-100% h100vh relative">
<!-- 头部广告 -->
<LayoutAdvertisement :pc-home-con="pcHomeCon" v-if="pcHomeCon &&pcHomeCon.advertisement && pcHomeCon.advertisement.imageUrl && !pcHomeCon.advertisement.status && useStore.isHomePage"></LayoutAdvertisement>
<!-- <LayoutAdvertisement :pc-home-con="pcHomeCon" v-if="pcHomeCon &&pcHomeCon.advertisement && pcHomeCon.advertisement.imageUrl && !pcHomeCon.advertisement.status && useStore.isHomePage"></LayoutAdvertisement> -->
<!-- 共享的头部内容 -->
<LayoutHeader :pc-home-con="pcHomeCon"></LayoutHeader>
@ -14,7 +14,7 @@
</div>
<!-- 右侧黑条-->
<right-navigation :isShowCoupon="isShowCoupon"></right-navigation>
<!-- <right-navigation :isShowCoupon="isShowCoupon"></right-navigation> -->
</div>
</main>
<!-- 共享的底部内容 -->

@ -23,7 +23,10 @@ export default defineNuxtConfig({
},
},
ssr: false,
css: ['~/assets/fonts/font.css','~/assets/scss/index.scss', '~/assets/iconfont/iconfont.css', 'aos/dist/aos.css'],
css: ['~/assets/fonts/font.css','~/assets/scss/index.scss', '~/assets/iconfont/iconfont.css', 'aos/dist/aos.css', {
src: 'lib-flexible/flexible.js',
mode: 'client'
}],
typescript: {
strict: true,
shim: false,
@ -36,7 +39,14 @@ export default defineNuxtConfig({
...envConfig,
},
},
head: {
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no' }
]
},
build: {
postcss: require('./postcss.config')
},
// build modules
modules: [
'@vueuse/nuxt',
@ -64,7 +74,7 @@ export default defineNuxtConfig({
colorMode: {
classSuffix: '',
},
plugins: [{ src: '~/plugins/fetch' },{src: "~/plugins/vue-swiper", ssr: false}],
plugins: [{ src: '~/plugins/fetch' },{src: "~/plugins/vue-swiper", ssr: false},],
unocss: {
uno: true,
attributify: true,

401
package-lock.json generated

@ -17,10 +17,12 @@
"crypto-js": "^4.1.1",
"dotenv": "^16.3.1",
"element-plus": "^2.3.4",
"lib-flexible": "^0.3.2",
"lodash": "^4.17.21",
"ohmyfetch": "^0.4.21",
"pinia": "^2.1.4",
"pinia-plugin-persistedstate": "^3.1.0",
"postcss-px2rem": "^0.3.0",
"qrcode.vue": "^3.4.0",
"vue-awesome-swiper": "^5.0.1"
},
@ -3979,6 +3981,17 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
"node_modules/atob": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
"bin": {
"atob": "bin/atob.js"
},
"engines": {
"node": ">= 4.5.0"
}
},
"node_modules/autoprefixer": {
"version": "10.4.16",
"resolved": "https://repo.huaweicloud.com/repository/npm/autoprefixer/-/autoprefixer-10.4.16.tgz",
@ -4039,7 +4052,6 @@
"version": "1.0.2",
"resolved": "https://repo.huaweicloud.com/repository/npm/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true,
"license": "MIT"
},
"node_modules/binary-extensions": {
@ -4072,7 +4084,6 @@
"version": "1.1.11",
"resolved": "https://repo.huaweicloud.com/repository/npm/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
@ -4494,7 +4505,6 @@
"version": "0.0.1",
"resolved": "https://repo.huaweicloud.com/repository/npm/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true,
"license": "MIT"
},
"node_modules/consola": {
@ -4602,6 +4612,17 @@
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==",
"license": "MIT"
},
"node_modules/css": {
"version": "2.2.4",
"resolved": "https://registry.npmmirror.com/css/-/css-2.2.4.tgz",
"integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==",
"dependencies": {
"inherits": "^2.0.3",
"source-map": "^0.6.1",
"source-map-resolve": "^0.5.2",
"urix": "^0.1.0"
}
},
"node_modules/css-declaration-sorter": {
"version": "6.4.1",
"resolved": "https://repo.huaweicloud.com/repository/npm/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz",
@ -4659,6 +4680,14 @@
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/css/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/cssesc": {
"version": "3.0.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/cssesc/-/cssesc-3.0.0.tgz",
@ -4822,6 +4851,14 @@
}
}
},
"node_modules/decode-uri-component": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
"engines": {
"node": ">=0.10"
}
},
"node_modules/deep-is": {
"version": "0.1.4",
"resolved": "https://repo.huaweicloud.com/repository/npm/deep-is/-/deep-is-0.1.4.tgz",
@ -5690,6 +5727,11 @@
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
"node_modules/extend": {
"version": "3.0.2",
"resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"node_modules/externality": {
"version": "1.0.2",
"resolved": "https://repo.huaweicloud.com/repository/npm/externality/-/externality-1.0.2.tgz",
@ -5974,7 +6016,6 @@
"version": "1.0.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true,
"license": "ISC"
},
"node_modules/fsevents": {
@ -6253,6 +6294,25 @@
"node": ">= 0.4.0"
}
},
"node_modules/has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==",
"dependencies": {
"ansi-regex": "^2.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/has-ansi/node_modules/ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/has-flag/-/has-flag-3.0.0.tgz",
@ -6409,7 +6469,6 @@
"version": "1.0.6",
"resolved": "https://repo.huaweicloud.com/repository/npm/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"dev": true,
"license": "ISC",
"dependencies": {
"once": "^1.3.0",
@ -6723,6 +6782,11 @@
"jiti": "bin/jiti.js"
}
},
"node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/js-tokens/-/js-tokens-4.0.0.tgz",
@ -6874,6 +6938,11 @@
"node": ">= 0.8.0"
}
},
"node_modules/lib-flexible": {
"version": "0.3.2",
"resolved": "https://registry.npmmirror.com/lib-flexible/-/lib-flexible-0.3.2.tgz",
"integrity": "sha512-9yowMWA70tKhKdCJDaltY0mNQG4OWo7pWKScnTp9aiSxS7s20ZYlwBRE3335nweOf5qKXVC7sDxJwMPM8/MFZg=="
},
"node_modules/lilconfig": {
"version": "2.1.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/lilconfig/-/lilconfig-2.1.0.tgz",
@ -7337,6 +7406,12 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/natives": {
"version": "1.1.6",
"resolved": "https://registry.npmmirror.com/natives/-/natives-1.1.6.tgz",
"integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==",
"deprecated": "This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x."
},
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/natural-compare/-/natural-compare-1.4.0.tgz",
@ -7967,7 +8042,6 @@
"version": "1.4.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dev": true,
"license": "ISC",
"dependencies": {
"wrappy": "1"
@ -8175,7 +8249,6 @@
"version": "1.0.1",
"resolved": "https://repo.huaweicloud.com/repository/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@ -8716,6 +8789,114 @@
"postcss": "^8.2.15"
}
},
"node_modules/postcss-px2rem": {
"version": "0.3.0",
"resolved": "https://registry.npmmirror.com/postcss-px2rem/-/postcss-px2rem-0.3.0.tgz",
"integrity": "sha512-ACZRimmOEDma0L/sI5ENREY3BoYB4LNME9iM9VcZU2t598OB9KLEPDYX8JBohNsvwJ+Nvlvk3IcGm0bRqOBC/Q==",
"dependencies": {
"postcss": "^5.0.0",
"px2rem": "~0.5.0"
}
},
"node_modules/postcss-px2rem/node_modules/ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-px2rem/node_modules/ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-px2rem/node_modules/chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==",
"dependencies": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-px2rem/node_modules/chalk/node_modules/supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/postcss-px2rem/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/postcss-px2rem/node_modules/has-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-px2rem/node_modules/postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
"integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==",
"dependencies": {
"chalk": "^1.1.3",
"js-base64": "^2.1.9",
"source-map": "^0.5.6",
"supports-color": "^3.2.3"
},
"engines": {
"node": ">=0.12"
}
},
"node_modules/postcss-px2rem/node_modules/source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-px2rem/node_modules/strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
"dependencies": {
"ansi-regex": "^2.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/postcss-px2rem/node_modules/supports-color": {
"version": "3.2.3",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-3.2.3.tgz",
"integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==",
"dependencies": {
"has-flag": "^1.0.0"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/postcss-reduce-initial": {
"version": "6.0.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/postcss-reduce-initial/-/postcss-reduce-initial-6.0.0.tgz",
@ -8922,6 +9103,180 @@
"node": ">=6"
}
},
"node_modules/px2rem": {
"version": "0.5.0",
"resolved": "https://registry.npmmirror.com/px2rem/-/px2rem-0.5.0.tgz",
"integrity": "sha512-R+LQj3Evbjbpmglo7D0PBVsnAbKP4WSvZEZUnF8RGIpWkIHFeAT+BlDOxxBxKVyMDecmfv9qdzNLTZLMq32osA==",
"dependencies": {
"chalk": "~0.5.1",
"commander": "~2.6.0",
"css": "~2.2.0",
"extend": "~3.0.0",
"fs-extra": "~0.16.3"
},
"bin": {
"px2rem": "bin/px2rem.js"
}
},
"node_modules/px2rem/node_modules/ansi-regex": {
"version": "0.2.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-0.2.1.tgz",
"integrity": "sha512-sGwIGMjhYdW26/IhwK2gkWWI8DRCVO6uj3hYgHT+zD+QL1pa37tM3ujhyfcJIYSbsxp7Gxhy7zrRW/1AHm4BmA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/px2rem/node_modules/ansi-styles": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-1.1.0.tgz",
"integrity": "sha512-f2PKUkN5QngiSemowa6Mrk9MPCdtFiOSmibjZ+j1qhLGHHYsqZwmBMRF3IRMVXo8sybDqx2fJl2d/8OphBoWkA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/px2rem/node_modules/chalk": {
"version": "0.5.1",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-0.5.1.tgz",
"integrity": "sha512-bIKA54hP8iZhyDT81TOsJiQvR1gW+ZYSXFaZUAvoD4wCHdbHY2actmpTE4x344ZlFqHbvoxKOaESULTZN2gstg==",
"dependencies": {
"ansi-styles": "^1.1.0",
"escape-string-regexp": "^1.0.0",
"has-ansi": "^0.1.0",
"strip-ansi": "^0.3.0",
"supports-color": "^0.2.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/px2rem/node_modules/commander": {
"version": "2.6.0",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.6.0.tgz",
"integrity": "sha512-PhbTMT+ilDXZKqH8xbvuUY2ZEQNef0Q7DKxgoEKb4ccytsdvVVJmYqR0sGbi96nxU6oGrwEIQnclpK2NBZuQlg==",
"engines": {
"node": ">= 0.6.x"
}
},
"node_modules/px2rem/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/px2rem/node_modules/fs-extra": {
"version": "0.16.5",
"resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-0.16.5.tgz",
"integrity": "sha512-yb7ti8kVH+qboUQWYxUuOPj/qcMUA6lO68ErZoPQOTP+7qroCIN/1gZ1lLk/rs2p0gPFzrvPYujKGnHTu+HHxA==",
"dependencies": {
"graceful-fs": "^3.0.5",
"jsonfile": "^2.0.0",
"rimraf": "^2.2.8"
}
},
"node_modules/px2rem/node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
}
},
"node_modules/px2rem/node_modules/graceful-fs": {
"version": "3.0.12",
"resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-3.0.12.tgz",
"integrity": "sha512-J55gaCS4iTTJfTXIxSVw3EMQckcqkpdRv3IR7gu6sq0+tbC363Zx6KH/SEwXASK9JRbhyZmVjJEVJIOxYsB3Qg==",
"dependencies": {
"natives": "^1.1.3"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/px2rem/node_modules/has-ansi": {
"version": "0.1.0",
"resolved": "https://registry.npmmirror.com/has-ansi/-/has-ansi-0.1.0.tgz",
"integrity": "sha512-1YsTg1fk2/6JToQhtZkArMkurq8UoWU1Qe0aR3VUHjgij4nOylSWLWAtBXoZ4/dXOmugfLGm1c+QhuD0JyedFA==",
"dependencies": {
"ansi-regex": "^0.2.0"
},
"bin": {
"has-ansi": "cli.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/px2rem/node_modules/jsonfile": {
"version": "2.4.0",
"resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-2.4.0.tgz",
"integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==",
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/px2rem/node_modules/jsonfile/node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"optional": true
},
"node_modules/px2rem/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/px2rem/node_modules/rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz",
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
}
},
"node_modules/px2rem/node_modules/strip-ansi": {
"version": "0.3.0",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-0.3.0.tgz",
"integrity": "sha512-DerhZL7j6i6/nEnVG0qViKXI0OKouvvpsAiaj7c+LfqZZZxdwZtv8+UiA/w4VUJpT8UzX0pR1dcHOii1GbmruQ==",
"dependencies": {
"ansi-regex": "^0.2.1"
},
"bin": {
"strip-ansi": "cli.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/px2rem/node_modules/supports-color": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-0.2.0.tgz",
"integrity": "sha512-tdCZ28MnM7k7cJDJc7Eq80A9CsRFAAOZUy41npOZCs++qSjfIy7o5Rh46CBk+Dk5FbKJ33X3Tqg4YrV07N5RaA==",
"bin": {
"supports-color": "cli.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/qrcode.vue": {
"version": "3.4.1",
"resolved": "https://repo.huaweicloud.com/repository/npm/qrcode.vue/-/qrcode.vue-3.4.1.tgz",
@ -9127,6 +9482,12 @@
"node": ">=8"
}
},
"node_modules/resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmmirror.com/resolve-url/-/resolve-url-0.2.1.tgz",
"integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==",
"deprecated": "https://github.com/lydell/resolve-url#deprecated"
},
"node_modules/reusify": {
"version": "1.0.4",
"resolved": "https://repo.huaweicloud.com/repository/npm/reusify/-/reusify-1.0.4.tgz",
@ -9532,6 +9893,19 @@
"node": ">=0.10.0"
}
},
"node_modules/source-map-resolve": {
"version": "0.5.3",
"resolved": "https://registry.npmmirror.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
"integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
"deprecated": "See https://github.com/lydell/source-map-resolve#deprecated",
"dependencies": {
"atob": "^2.1.2",
"decode-uri-component": "^0.2.0",
"resolve-url": "^0.2.1",
"source-map-url": "^0.4.0",
"urix": "^0.1.0"
}
},
"node_modules/source-map-support": {
"version": "0.5.21",
"resolved": "https://repo.huaweicloud.com/repository/npm/source-map-support/-/source-map-support-0.5.21.tgz",
@ -9553,6 +9927,12 @@
"node": ">=0.10.0"
}
},
"node_modules/source-map-url": {
"version": "0.4.1",
"resolved": "https://registry.npmmirror.com/source-map-url/-/source-map-url-0.4.1.tgz",
"integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
"deprecated": "See https://github.com/lydell/source-map-url#deprecated"
},
"node_modules/ssr-window": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-4.0.2.tgz",
@ -10364,6 +10744,12 @@
"punycode": "^2.1.0"
}
},
"node_modules/urix": {
"version": "0.1.0",
"resolved": "https://registry.npmmirror.com/urix/-/urix-0.1.0.tgz",
"integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==",
"deprecated": "Please see https://github.com/lydell/urix#deprecated"
},
"node_modules/urlpattern-polyfill": {
"version": "8.0.2",
"resolved": "https://repo.huaweicloud.com/repository/npm/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz",
@ -11443,7 +11829,6 @@
"version": "1.0.2",
"resolved": "https://repo.huaweicloud.com/repository/npm/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true,
"license": "ISC"
},
"node_modules/xml-name-validator": {

@ -28,10 +28,12 @@
"crypto-js": "^4.1.1",
"dotenv": "^16.3.1",
"element-plus": "^2.3.4",
"lib-flexible": "^0.3.2",
"lodash": "^4.17.21",
"ohmyfetch": "^0.4.21",
"pinia": "^2.1.4",
"pinia-plugin-persistedstate": "^3.1.0",
"postcss-px2rem": "^0.3.0",
"qrcode.vue": "^3.4.0",
"vue-awesome-swiper": "^5.0.1"
},
@ -68,6 +70,3 @@
"type": "module",
"__npminstall_done": false
}

@ -1,140 +1,609 @@
<script setup lang="ts">
import { articleHotListApi, pcHomeBannerApi } from '~/server/homeApi'
import { useUserStore } from '~/stores/user'
import { linkNavigateTo } from '~/utils/util'
import useOrder from '~/composables/useOrder'
const userStore = useUserStore()
const { handleIntoPage } = useOrder()
//banner
const { data: bannerList, pending: listLoading } = await useAsyncData(async () => pcHomeBannerApi())
//
const { data: articleList, pending: articleListLoading } = await useAsyncData(async () => articleHotListApi())
const menuList = ref<Array<string>>([
{
name: '宝贝收藏',
icon: 'icon-baobeishoucang',
url: '/users/collect_products',
id: '3',
},
{
name: '关注店铺',
icon: 'icon-guanzhudianpu',
url: '/users/collect_merchant',
id: '4',
},
{
name: '我的足迹',
icon: 'icon-zuji',
url: '/users/browsing_history',
id: '8',
},
])
/**
* 登录
*/
const nuxtApp = useNuxtApp()
const userLoginRef = shallowRef()
const handlerLogin = async () => {
if (!userStore.isLogin) {
await nuxtApp.$onHandlerLogin()
}
}
const handlerNuxtLink = async (url: string, type: number) => {
if (!userStore.isLogin) {
await nuxtApp.$onHandlerLogin()
} else {
await linkNavigateTo(url, { type: type })
}
}
</script>
<template>
<div class="bannerIndex h-410px bg-#FFFFFF w-100% mb-30px">
<div class="min_wrapper_1200 acea-row">
<!--分类组件-->
<classify-card></classify-card>
<!--轮播-->
<div class="w-730px h-360px mt-20px ml-220px" v-loading="listLoading">
<el-carousel :interval="5000" height="360px" arrow="always">
<el-carousel-item v-for="item in bannerList" :key="item" class="w-730px h-360px el-image">
<a v-if="item.linkUrl" :href="item.linkUrl" target="_blank">
<el-image :src="item.imageUrl" class="w-730px h-360px el-image b-rd-12px" fit="fill" />
</a>
<el-image v-else :src="item.imageUrl" class="w-730px h-360px el-image b-rd-12px" fit="fill" />
</el-carousel-item>
</el-carousel>
<div class="banner">
<div class="left">
<div class="title-one">鲜花电商下单方<span>117405</span></div>
<div class="title-tow">实名认证花店<span>316261</span></div>
<div class="btn">
<button>立即下单</button>
<button>开始接单</button>
</div>
<!--登录-->
<div class="ml-30px w-220px mt-20px">
<div class="flex-col-center">
<img v-if="!userStore.isLogin" @click="handlerLogin" class="cursors w-60px h-60px b-rd-50% mb-10px" src="@/assets/images/morentou.png" />
<img v-else :src="userStore.userInfo.avatar" @click="linkNavigateTo('/users/user_info', { type: 11 })" class="w-60px h-60px b-rd-50% mb-10px cursors" />
<div v-if="!userStore.isLogin" @click="handlerLogin" class="cursors mb-20px line1 w-218px text-center text-#666 text-16px">
Hi~<span class="text-#333">你好</span>
</div>
<div class="right"><img src="../../assets/images/image19.png" alt="" /></div>
</div>
<div class="content">
<ul>
<li>
<div class="sum">30W+</div>
<div class="title">注册会员</div>
</li>
<li>
<div class="sum">1200+</div>
<div class="title">覆盖全国市//</div>
</li>
<li>
<div class="sum">8000W+</div>
<div class="title">积累服务订单</div>
</li>
<li>
<div class="sum">1S</div>
<div class="title">最快接单只需</div>
</li>
<li>
<div class="sum">30000+</div>
<div class="title">日购订单</div>
</li>
</ul>
</div>
<div class="orders-box"></div>
<div class="orders">
<div class="edition">
<div class="title">
<div class="title-one">最新已成交订单</div>
<div class="title-two">汇聚抖音小店抖音团购天猫京东美团饿了么等各大电商平台海量订单实时分发</div>
<div class="title-therr">超过28W+花店在线接单</div>
<div class="time-out">
{{ `${time.year}-${time.month}-${time.day}` }}<span>{{ time.hours }}</span
><span>{{ time.minutes }}</span
><span>{{ time.seconds }}</span
><span class="content-day">今日已成交<i>1999</i></span>
</div>
</div>
<div class="commodity-box">
<div class="commodity">
<div class="left">
<div class="image"><img src="../../assets/images/image64.png" alt="" /></div>
<div class="botton-txt">接单耗时3分钟</div>
</div>
<div v-else class="mb-20px line1 w-218px text-center text-#666 text-16px cursors">
Hi~<span class="text-#333" @click="linkNavigateTo('/users/user_info', { type: 11 })">{{ userStore.userInfo.nikeName }}</span>
<div class="right">
<div class="essential-address">江西省 萍乡市 安源区</div>
<div class="detailed-address">江西省萍乡市安源区白源街街 道萍乡市公路勘察***</div>
<div class="time">配送时间2023-12-26 13:10</div>
<div class="price">
<div class="left-price"><span></span>110</div>
<div class="icon">
<el-icon><Right /></el-icon>
</div>
</div>
</div>
</div>
<div class="commodity">
<div class="left">
<div class="image"><img src="../../assets/images/image64.png" alt="" /></div>
<div class="botton-txt">接单耗时3分钟</div>
</div>
<div class="flex-x-center mb-20px">
<div
v-if="!userStore.isLogin"
class="handleBtn w-105px h-32px lh-31px mr-10px cursors"
@click="handlerLogin"
>
登录/注册
<div class="right">
<div class="essential-address">江西省 萍乡市 安源区</div>
<div class="detailed-address">江西省萍乡市安源区白源街街 道萍乡市公路勘察***</div>
<div class="time">配送时间2023-12-26 13:10</div>
<div class="price">
<div class="left-price"><span></span>110</div>
<div class="icon">
<el-icon><Right /></el-icon>
</div>
</div>
<div
class="handleBtnBorder borderSolE9 w-105px h-32px lh-31px font-color cursors"
@click="handlerNuxtLink('/merchant/merchant_settled', 0)"
>
商户入驻
</div>
</div>
<div class="commodity">
<div class="left">
<div class="image"><img src="../../assets/images/image64.png" alt="" /></div>
<div class="botton-txt">接单耗时3分钟</div>
</div>
<div class="right">
<div class="essential-address">江西省 萍乡市 安源区</div>
<div class="detailed-address">江西省萍乡市安源区白源街街 道萍乡市公路勘察***</div>
<div class="time">配送时间2023-12-26 13:10</div>
<div class="price">
<div class="left-price"><span></span>110</div>
<div class="icon">
<el-icon><Right /></el-icon>
</div>
</div>
</div>
<div class="flex flex-justify-between w-200px">
<div
v-for="(item, index) in menuList"
:key="index"
class="flex-col-center cursors"
@click="handlerNuxtLink(item.url, item.id)"
>
<div class="iconfont font-color mb-8px" :class="item.icon" style="font-size: 18px"></div>
<div class="text-12px text-#333">{{ item.name }}</div>
</div>
<div class="commodity">
<div class="left">
<div class="image"><img src="../../assets/images/image64.png" alt="" /></div>
<div class="botton-txt">接单耗时3分钟</div>
</div>
<div class="right">
<div class="essential-address">江西省 萍乡市 安源区</div>
<div class="detailed-address">江西省萍乡市安源区白源街街 道萍乡市公路勘察***</div>
<div class="time">配送时间2023-12-26 13:10</div>
<div class="price">
<div class="left-price"><span></span>110</div>
<div class="icon">
<el-icon><Right /></el-icon>
</div>
</div>
</div>
<el-divider border-style="dashed" />
</div>
<div
@click="handleIntoPage('/activity/information_info', { informationId: item.id })"
v-for="item in articleList.length === 2 ? articleList : articleList.slice(0, 3)"
class="acea-row items-center cursors mb-12px"
>
<div class="text-12px font-color bg-#FDEAE9 px-4px py-3px b-rd-2px mr-6px line-heightOne">资讯</div>
<div class="text-14px text-#666 line1 w-180px fontFamilyOPPOSans">{{ item.title }}</div>
<div class="commodity">
<div class="left">
<div class="image"><img src="../../assets/images/image64.png" alt="" /></div>
<div class="botton-txt">接单耗时3分钟</div>
</div>
<div class="right">
<div class="essential-address">江西省 萍乡市 安源区</div>
<div class="detailed-address">江西省萍乡市安源区白源街街 道萍乡市公路勘察***</div>
<div class="time">配送时间2023-12-26 13:10</div>
<div class="price">
<div class="left-price"><span></span>110</div>
<div class="icon">
<el-icon><Right /></el-icon>
</div>
</div>
</div>
</div>
<div class="commodity">
<div class="left">
<div class="image"><img src="../../assets/images/image64.png" alt="" /></div>
<div class="botton-txt">接单耗时3分钟</div>
</div>
<div class="right">
<div class="essential-address">江西省 萍乡市 安源区</div>
<div class="detailed-address">江西省萍乡市安源区白源街街 道萍乡市公路勘察***</div>
<div class="time">配送时间2023-12-26 13:10</div>
<div class="price">
<div class="left-price"><span></span>110</div>
<div class="icon">
<el-icon><Right /></el-icon>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="doload">
<div class="title">产品下载</div>
<div class="app-info">
<div class="img"><img src="../../assets/images/image70.png" alt="" /></div>
<div class="app-info-txt">
<div class="app-title">花机宝网络科技主要经营</div>
<p>聚合美团饿了么淘宝京东抖店拼多多快手小红书等电商交易平台针对鲜花蛋糕绿植气球派对等行业提供转单交易平台助力电商用户高效运营</p>
<p>提供线上外卖配送聚合服务打通全域电商平台物流同城配送实现一键操作和管理</p>
<p> 提供电商运营管理聚合软件多门店管理门店产品一键复制门店产品一键批量设置折扣价格多平台消息聚合多门店评价管理多门店诊断等服务</p>
<div class="doload-app">下载APP</div>
</div>
</div>
</div>
<div class="serve">
<div class="title">功能强大安全稳定的服务应用</div>
<div class="title-two">多年技术沉淀20+项服务共筑服务矩阵</div>
<div class="serve-box">
<div class="item">
<div class="icon"></div>
<div class="title">微花店</div>
<div class="txt">为线下实体花店定制开发的移动商城帮助花店轻松建立自己的网上店铺并将店铺商品同步至花递平台进行销售从而为花店带来更大的经济收益</div>
</div>
<div class="item">
<div class="icon"></div>
<div class="title">微花店</div>
<div class="txt">为线下实体花店定制开发的移动商城帮助花店轻松建立自己的网上店铺并将店铺商品同步至花递平台进行销售从而为花店带来更大的经济收益</div>
</div>
<div class="item">
<div class="icon"></div>
<div class="title">微花店</div>
<div class="txt">为线下实体花店定制开发的移动商城帮助花店轻松建立自己的网上店铺并将店铺商品同步至花递平台进行销售从而为花店带来更大的经济收益</div>
</div>
<div class="item">
<div class="icon"></div>
<div class="title">微花店</div>
<div class="txt">为线下实体花店定制开发的移动商城帮助花店轻松建立自己的网上店铺并将店铺商品同步至花递平台进行销售从而为花店带来更大的经济收益</div>
</div>
<div class="item">
<div class="icon"></div>
<div class="title">微花店</div>
<div class="txt">为线下实体花店定制开发的移动商城帮助花店轻松建立自己的网上店铺并将店铺商品同步至花递平台进行销售从而为花店带来更大的经济收益</div>
</div>
<div class="item">
<div class="icon"></div>
<div class="title">微花店</div>
<div class="txt">为线下实体花店定制开发的移动商城帮助花店轻松建立自己的网上店铺并将店铺商品同步至花递平台进行销售从而为花店带来更大的经济收益</div>
</div>
<div class="item">
<div class="icon"></div>
<div class="title">微花店</div>
<div class="txt">为线下实体花店定制开发的移动商城帮助花店轻松建立自己的网上店铺并将店铺商品同步至花递平台进行销售从而为花店带来更大的经济收益</div>
</div>
<div class="item">
<div class="icon"></div>
<div class="title">微花店</div>
<div class="txt">为线下实体花店定制开发的移动商城帮助花店轻松建立自己的网上店铺并将店铺商品同步至花递平台进行销售从而为花店带来更大的经济收益</div>
</div>
</div>
<div class="more-services">查看更多服务</div>
</div>
</template>
<style scoped lang="scss">
.bannerIndex{
:deep(.el-carousel__indicators){
<script lang="ts" setup>
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
import { Right } from '@element-plus/icons-vue'
const time: any = ref({})
const getDatTime = () => {
const currentDate = new Date()
const year = currentDate.getFullYear()
const month = currentDate.getMonth() + 1 // 01
const day = currentDate.getDate()
const hours = currentDate.getHours()
const minutes = currentDate.getMinutes()
const seconds = currentDate.getSeconds()
time.value.year = year
time.value.month = month
time.value.day = day
time.value.hours = hours
time.value.minutes = minutes
time.value.seconds = seconds
// console.log(time.value);
}
setInterval(() => {
getDatTime()
}, 1000)
</script>
<style lang="scss" scoped>
.banner {
width: 100%;
height: 3.0208rem;
display: flex;
.left {
width: 30%;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
justify-content: center;
.title-one {
font-weight: 700;
font-size: 0.1667rem;
span {
font-size: 0.2188rem;
color: #ff4e8d;
}
}
.title-tow {
font-weight: 700;
font-size: 0.1667rem;
span {
font-size: 0.2188rem;
color: #ff4e8d;
}
}
.btn {
width: 100%;
margin-top: 0.1563rem;
display: flex;
justify-content: center;
button {
width: 0.6354rem;
height: 0.2083rem;
margin: 0.0521rem;
background-color: transparent;
color: #252b3a;
border: 1px solid #252b3a;
font-size: 0.0833rem;
// border-color: #252B3A;
}
}
}
:deep(.el-carousel__container) {
.right {
width: 70%;
height: 100%;
img {
width: 100%;
height: 100%;
}
}
}
.content {
width: 100%;
background: linear-gradient(90deg, #ffd4ac 0%, #ff94d4 53%, #ff518f 100%);
height: 0.5208rem;
ul {
display: flex;
height: 100%;
width: 100%;
justify-content: center;
li {
width: 1.25rem;
list-style: none;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.sum {
font-size: 0.125rem;
font-weight: 700;
}
.title {
font-size: 0.0729rem;
}
}
}
}
.orders {
// margin-top: .4167rem;
padding: 0.4167rem 0;
width: 100%;
background-color: #fff;
// height: 500px;
.edition {
width: 6.25rem;
margin: 0 auto;
.title {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.title-one {
font-size: 0.1667rem;
color: #252b3a;
}
.title-two {
margin-top: 0.0833rem;
line-height: 0.1146rem;
font-size: 0.0833rem;
color: #575d6c;
}
.title-therr {
line-height: 0.1146rem;
font-size: 0.0833rem;
color: #575d6c;
}
.time-out {
margin-top: 0.2344rem;
font-size: 0.0833rem;
color: #252b3a;
span {
color: #fff;
display: inline-block;
width: 0.1563rem;
height: 0.1458rem;
border-radius: 0.026rem;
background-color: #ff518f;
text-align: center;
line-height: 0.1458rem;
margin: 0 0.0313rem;
}
.content-day {
width: auto;
background: none;
color: #000;
i {
font-size: 0.1146rem;
color: #ff518f;
font-style: normal;
padding: 0 0.0156rem;
}
}
}
}
}
}
.commodity-box {
display: flex;
flex-wrap: wrap;
margin-top: 0.1563rem;
}
.commodity {
box-shadow: 1px 1px 9px 6px rgb(0 0 0 / 4%);
padding: 0.1042rem;
width: 2.0469rem;
height: 1.1198rem;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
margin: 0.0521rem 0.0521rem 0.0521rem;
margin-left: 0;
transition: transform 0.3s ease; /* 过渡效果,持续时间为0.3秒,缓动函数为ease */
.left {
width: 0.75rem;
height: 0.875rem;
.image {
width: 100%;
height: 0.7396rem;
img {
width: 100%;
height: 100%;
}
}
.botton-txt {
height: 0.1302rem;
width: 100%;
background: linear-gradient(90deg, #ff94d4 0%, #ffddbe 100%);
color: #ff4e8d;
text-align: center;
line-height: 0.1302rem;
font-size: 0.0625rem;
}
}
.right {
flex: 1;
margin-left: 0.1042rem;
height: 100%;
border-radius: 12px;
overflow: hidden;
.essential-address {
font-size: 0.0833rem;
}
.detailed-address {
margin-top: 0.0521rem;
color: #555555;
font-size: 0.0729rem;
}
.time {
height: 0.1823rem;
margin-top: 0.1563rem;
color: #252b3a;
font-size: 0.0677rem;
border-bottom: 1px solid #e4e4e4;
}
.price {
margin-top: 0.0625rem;
display: flex;
justify-content: space-between;
align-items: center;
.left-price {
font-size: 0.125rem;
color: #ff4e8d;
span {
font-size: 0.0729rem;
}
}
.icon {
font-size: 0.1042rem;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
}
}
}
}
.commodity:nth-child(3n) {
margin-right: 0;
}
.commodity:hover {
transform: translateY(-5px);
}
.doload {
width: 100%;
height: 3.8021rem;
background: url('../../assets/images/image20.png') no-repeat;
background-size: cover;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.title {
color: #252b3a;
font-size: 0.1667rem;
font-weight: 600;
}
.app-info {
display: flex;
.img {
width: 2.3646rem;
height: 2.3646rem;
img {
width: 100%;
height: 100%;
}
}
.app-info-txt{
width: 3.3333rem;
padding: 0 .5208rem;
padding-top:.4167rem;
.app-title{
height: .3125rem;
color: #252B3A;
font-weight: 600;
font-size: .1354rem;
}
p{
color: #575D6C;
font-size: .0729rem;
margin: .1042rem 0;
}
.doload-app{
margin-top: .1563rem;
width: 1.3542rem;
height: .3125rem;
color: #fff;
font-size: .125rem;
background: linear-gradient(270deg, #ffd4ac 0%, #ff94d4 53%, #ff518f 100%);
cursor: pointer;
text-align: center;
line-height: .3125rem;
transition: transform 0.3s ease;
border-radius: .026rem;
}
.doload-app:hover{
transform: scale(1.1);
}
}
}
}
.serve{
width: 100%;
background-color: #fff;
padding-top: .4167rem;
display: flex;
flex-direction: column;
align-items: center;
.title{
width: 100%;
font-weight: 700;
text-align: center;
font-size: .1667rem;
color: #252B3A;
}
.title-two{
width: 100%;
text-align: center;
font-size: .0833rem;
color: #575D6C;
margin-top: .0938rem;
}
.serve-box{
padding-top: .2604rem;
width: 6.25rem;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.item{
width: 1.375rem;
height: 1.9271rem;
background: url('../../assets/images/Group9591.png') no-repeat;
background-size: contain;
display: flex;
flex-direction: column;
align-items: center;
box-shadow: 1px 1px 9px 6px rgb(0 0 0 / 4%);
transition: transform 0.3s ease;
.icon{
margin-top: .4167rem;
width: .2344rem;
height: .2344rem;
}
.title{
font-weight: 600;
color: #575D6C;
font-size: .0729rem;
}
.txt{
margin-top: .1042rem;
width: .9375rem;
text-align: center;
line-height: .1146rem;
}
}
.item:nth-last-child(-n+4){
margin-top: .1042rem;
}
.item:hover{
transform: translateY(-5px);
}
}
.more-services{
width: 1.3021rem;
height: .2604rem;
color: #fff;
font-size: .0833rem;
line-height:.2604rem ;
text-align: center;
border-radius: .026rem;
margin: .1563rem 0 ;
background: linear-gradient(90deg, #ff94d4 0%, #ffddbe 100%);
transition:transform .3s ease;
}
.more-services:hover{
transform: scale(1.1);
}
}
</style>

@ -3,13 +3,13 @@
<!--轮播图-->
<banner-index></banner-index>
<!--秒杀-->
<seckill-index></seckill-index>
<!-- <seckill-index></seckill-index> -->
<!--品牌好店-->
<merchant-index :goodStoreImage="pcHomeCon?.goodStoreImage"></merchant-index>
<!-- <merchant-index :goodStoreImage="pcHomeCon?.goodStoreImage"></merchant-index> -->
<!--推荐商品-->
<recommended-index></recommended-index>
<!-- <recommended-index></recommended-index> -->
<!--猜你喜欢-->
<recommend></recommend>
<!-- <recommend></recommend> -->
</div>
</template>

@ -0,0 +1,5 @@
import 'lib-flexible'
// export default () => {
// flexible.rem = 192 // 设计稿宽度 / 10,例如设计稿宽度为750px,则rem为75
// }

@ -0,0 +1,18 @@
function fn(){
console.log(11111);
function setHtmlFontSize() {
let whdef = 100 / 1920 ;
let bodyWidth = document.documentElement.getBoundingClientRect().width;
console.log(bodyWidth,'屏幕宽度')
let rem = bodyWidth * whdef
document.getElementsByTagName('html')[0].style.fontSize = rem + 'px'
}
setHtmlFontSize()
window.addEventListener('resize',function(){
setTimeout(function(){
setHtmlFontSize()
},100)
})
}
fn()

@ -0,0 +1,7 @@
module.exports = {
plugins: {
'postcss-px2rem': {
remUnit: 192 // 设计稿宽度 / 10,例如设计稿宽度为750px,则remUnit为75
}
}
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save