Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
F
fenxiao_h5-dz
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张志伟
fenxiao_h5-dz
提交
3b73cc9f
提交
3b73cc9f
编写于
5月 06, 2024
作者:
zhangzhiwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
测试
上级
1f4b768b
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
400 行增加
和
413 行删除
+400
-413
App.vue
src/App.vue
+2
-2
ShopCard.vue
src/components/ShopCard.vue
+5
-3
index.vue
src/pages/index/index.vue
+393
-408
未找到文件。
src/App.vue
浏览文件 @
3b73cc9f
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
onLaunch
((
e
)
=>
{
onLaunch
((
e
)
=>
{
let
device
=
navigator
.
userAgent
.
toLowerCase
();
let
device
=
navigator
.
userAgent
.
toLowerCase
();
window
.
_wx
.
miniProgram
.
postMessage
({
data
:{}});
window
.
_wx
.
miniProgram
.
postMessage
({
data
:{}});
console
.
log
(
window
.
__wxjs_environment
===
'miniprogram'
,
'window.__wxjs_environment ===
\'
miniprogram
\'
'
);
console
.
log
(
window
.
__wxjs_environment
===
'miniprogram'
,
'window.__wxjs_environment ===
\'
miniprogram
\'
'
);
if
(
!
(
window
.
__wxjs_environment
===
'miniprogram'
))
{
if
(
!
(
window
.
__wxjs_environment
===
'miniprogram'
))
{
if
(
!
/ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile|mobile/
.
test
(
device
))
{
if
(
!
/ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile|mobile/
.
test
(
device
))
{
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
}
catch
{
}
catch
{
}
}
}
}
uni
.
setStorageSync
(
'subdomain'
,
'
alisa1
'
)
uni
.
setStorageSync
(
'subdomain'
,
'
0571gs008
'
)
});
});
onShow
(()
=>
{
onShow
(()
=>
{
console
.
log
(
"App Show"
);
console
.
log
(
"App Show"
);
...
...
src/components/ShopCard.vue
浏览文件 @
3b73cc9f
...
@@ -4,9 +4,11 @@
...
@@ -4,9 +4,11 @@
<van-image
fit=
"cover"
lazy-load
:src=
"item.mainImg"
<van-image
fit=
"cover"
lazy-load
:src=
"item.mainImg"
loading-icon=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default.png"
icon-size=
"30vw"
/>
loading-icon=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default.png"
icon-size=
"30vw"
/>
</div>
</div>
<text
class=
"text-s ellipsis line_over2"
style=
"height: 32px;text-align: left;background: #ffffff;padding: 15rpx"
>
<view
style=
"padding: 15rpx;background: #ffffff"
>
{{
item
.
title
}}
<text
class=
"text-s ellipsis line_over2"
style=
"text-align: left;background: #ffffff"
>
</text>
{{
item
.
title
}}
</text>
</view>
<view
style=
"display: flex;background: #ffffff;padding: 15rpx"
class=
"text01"
>
<view
style=
"display: flex;background: #ffffff;padding: 15rpx"
class=
"text01"
>
<view
class=
"text-orange text-ss"
>
¥
<view
class=
"text-orange text-ss"
>
¥
<text
class=
"text-bold text-l"
>
{{
item
.
salePrice
}}
</text>
<text
class=
"text-bold text-l"
>
{{
item
.
salePrice
}}
</text>
...
...
src/pages/index/index.vue
浏览文件 @
3b73cc9f
<
template
>
<
template
>
<view
class=
"text-center pd-b-px-55"
>
<view
class=
"text-center pd-b-px-55"
>
<img
@
click=
"gotoU"
src=
"../../static/right_rule.png"
style=
"position: fixed;right: 0;top: 70%;z-index: 99"
alt=
""
>
<img
@
click=
"gotoU"
src=
"../../static/right_rule.png"
style=
"position: fixed;right: 0;top: 70%;z-index: 99"
alt=
""
>
<van-sticky>
<van-sticky>
<view
class=
"search_bar sh"
>
<view
class=
"search_bar sh"
>
<van-search
input-align=
"center"
placeholder=
"搜索商城商品"
shape=
"round"
v-model=
"state.keyword"
<van-search
input-align=
"center"
placeholder=
"搜索商城商品"
shape=
"round"
v-model=
"state.keyword"
@
focus=
"goSearch"
>
@
focus=
"goSearch"
>
<!--
<template
v-slot:right-icon
>
-->
<!--
<template
v-slot:right-icon
>
-->
<!--
<van-icon
name=
"photograph"
@
click=
"searchImg"
size=
"1.2rem"
/>
-->
<!--
<van-icon
name=
"photograph"
@
click=
"searchImg"
size=
"1.2rem"
/>
-->
<!--
</
template
>
-->
<!--
</
template
>
-->
</van-search>
</van-search>
</view>
</view>
</van-sticky>
</van-sticky>
<!--名片-->
<!--名片-->
<view
style=
"background: #ffffff;padding-bottom: 36rpx;padding-top: 20rpx"
>
<view
style=
"background: #ffffff;padding-bottom: 36rpx;padding-top: 20rpx"
>
<view
class=
"card-div"
>
<view
class=
"card-div"
>
<van-row
gutter=
"12"
class=
"pd-h-px-10"
style=
"padding-top: 26rpx"
>
<van-row
gutter=
"12"
class=
"pd-h-px-10"
style=
"padding-top: 26rpx"
>
<van-col
span=
"6"
>
<van-col
span=
"6"
>
<van-image
style=
"border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx"
radius=
"20rpx"
src=
"../../static/img/dz/jyx-logo.jpg"
<van-image
style=
"border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx"
radius=
"20rpx"
src=
"../../static/img/dz/jyx-logo.jpg"
/>
/>
</van-col>
</van-col>
<van-col
span=
"18"
style=
"text-align: left"
>
<van-col
span=
"18"
style=
"text-align: left"
>
<view
style=
"font-size: 34rpx;font-weight: bold"
>
金燕侠
</view>
<view
style=
"font-size: 34rpx;font-weight: bold"
>
金燕侠
</view>
<view
style=
"color: #666666;font-size: 26rpx;letter-spacing: 1rpx;margin-top: 6rpx"
>
浙江省杭州市杭州市莫干山路1418-66号3幢12层 1203 室
</view>
<view
style=
"color: #666666;font-size: 26rpx;letter-spacing: 1rpx;margin-top: 6rpx"
>
浙江省杭州市杭州市莫干山路1418-66号3幢12层 1203 室
</view>
<view
style=
"font-size: 26rpx;margin-top: 4px"
>
<van-icon
name=
"manager-o"
color=
"#707070"
size=
"16px"
style=
"margin-right: 10rpx"
/>
金燕侠
<span
style=
"margin: 0 16rpx;color: #DDDDDD"
>
|
</span><van-icon
name=
"phone-o"
color=
"#707070"
size=
"16px"
/>
13613613666
<span
style=
"float: right;border-radius: 8rpx;
<view
style=
"font-size: 26rpx;margin-top: 4px"
>
<van-icon
name=
"manager-o"
color=
"#707070"
size=
"16px"
style=
"margin-right: 10rpx"
/>
金燕侠
<span
style=
"margin: 0 16rpx;color: #DDDDDD"
>
|
</span><van-icon
name=
"phone-o"
color=
"#707070"
size=
"16px"
/>
13613613666
<span
style=
"float: right;border-radius: 8rpx;
border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx"
@
click=
"goPhoneBtn(13613613666)"
>
拨打
</span>
</view>
border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx"
@
click=
"goPhoneBtn(13613613666)"
>
拨打
</span>
</view>
</van-col>
</van-col>
</van-row>
</van-row>
<van-row
class=
"pd-h-px-10 dianpu"
>
<van-row
class=
"pd-h-px-10 dianpu"
>
<van-col
span=
"11"
style=
"background: #fef9ef"
>
<van-col
span=
"11"
style=
"background: #fef9ef"
>
<view
style=
"display: flex;align-items: center;justify-content: center"
>
<van-icon
name=
"shop-collect"
color=
"#EBA926"
size=
"20px"
style=
"margin-right: 10rpx"
/>
店铺信息
</view>
<view
style=
"display: flex;align-items: center;justify-content: center"
>
<van-icon
name=
"shop-collect"
color=
"#EBA926"
size=
"20px"
style=
"margin-right: 10rpx"
/>
店铺信息
</view>
</van-col>
</van-col>
<van-col
span=
"2"
style=
"background: #fef9ef"
>
<van-col
span=
"2"
style=
"background: #fef9ef"
>
<view
style=
"color: #DDDDDD"
>
|
</view>
<view
style=
"color: #DDDDDD"
>
|
</view>
</van-col>
</van-col>
<van-col
span=
"11"
style=
"background: #fef9ef"
>
<van-col
span=
"11"
style=
"background: #fef9ef"
>
<view
style=
"display: flex;align-items: center;justify-content: center"
><van-icon
name=
"photo"
color=
"#EBA926"
size=
"20px"
style=
"margin-right: 10rpx"
/>
店铺海报
</view>
<view
style=
"display: flex;align-items: center;justify-content: center"
><van-icon
name=
"photo"
color=
"#EBA926"
size=
"20px"
style=
"margin-right: 10rpx"
/>
店铺海报
</view>
</van-col>
</van-col>
</van-row>
</van-row>
</view>
</view>
</view>
</view>
<van-swipe
v-if=
"state.banner.indexCarouselBig.length > 0"
lazy-render
class=
"banner_top"
:autoplay=
"3000"
<van-swipe
v-if=
"state.banner.indexCarouselBig.length > 0"
lazy-render
class=
"banner_top"
:autoplay=
"3000"
indicator-color=
"white"
>
indicator-color=
"white"
>
<van-swipe-item
v-for=
"item in state.banner.indexCarouselBig"
>
<van-swipe-item
v-for=
"item in state.banner.indexCarouselBig"
>
<van-image
:src=
"item.iconpath"
@
tap=
"goto(item.josnContent)"
/>
<van-image
:src=
"item.iconpath"
@
tap=
"goto(item.josnContent)"
/>
</van-swipe-item>
</van-swipe-item>
</van-swipe>
</van-swipe>
<van-swipe
v-if=
"state.banner.indexCarouselSmall.length > 0"
lazy-render
class=
"banner_afterTop"
vertical
<van-swipe
v-if=
"state.banner.indexCarouselSmall.length > 0"
lazy-render
class=
"banner_afterTop"
vertical
:autoplay=
"3000"
:show-indicators=
"false"
>
:autoplay=
"3000"
:show-indicators=
"false"
>
<van-swipe-item
v-for=
"item in state.banner.indexCarouselSmall"
>
<van-swipe-item
v-for=
"item in state.banner.indexCarouselSmall"
>
<van-image
:src=
"item.iconpath"
@
tap=
"goto(item.josnContent)"
/>
<van-image
:src=
"item.iconpath"
@
tap=
"goto(item.josnContent)"
/>
</van-swipe-item>
</van-swipe-item>
</van-swipe>
</van-swipe>
<van-cell-group
v-if=
"false"
>
<van-cell-group
v-if=
"false"
>
<van-cell
is-link
class=
"justify-middle"
@
tap=
"goto('/pages/index/storeCard')"
>
<van-cell
is-link
class=
"justify-middle"
@
tap=
"goto('/pages/index/storeCard')"
>
<
template
#
title
>
<
template
#
title
>
<view
class=
"justify-middle"
>
<view
class=
"justify-middle"
>
<van-image
fit=
"cover"
height=
"70rpx"
round
@
click
.
stop=
"goMe"
<van-image
fit=
"cover"
height=
"70rpx"
round
@
click
.
stop=
"goMe"
:src=
"state.mall.headImg || 'https://img.edsmall.com/ROOT/ETao/fenxiao/h5/mall_default.png'"
:src=
"state.mall.headImg || 'https://img.edsmall.com/ROOT/ETao/fenxiao/h5/mall_default.png'"
width=
"70rpx"
/>
width=
"70rpx"
/>
<text
class=
"pd-l-15 text-bold text-m"
@
click
.
stop=
"goMe"
>
{{
state
.
mall
.
mallName
}}
</text>
<text
class=
"pd-l-15 text-bold text-m"
@
click
.
stop=
"goMe"
>
{{
state
.
mall
.
mallName
}}
</text>
</view>
</view>
</
template
>
</
template
>
<
template
#
right-icon
>
<
template
#
right-icon
>
<view
class=
"flex col text-center"
>
<view
class=
"flex col text-center"
>
<van-icon
class=
"text-orange text-xl"
name=
"shop"
/>
<van-icon
class=
"text-orange text-xl"
name=
"shop"
/>
<text
class=
"text-gray text-ss block"
>
店铺名片
</text>
<text
class=
"text-gray text-ss block"
>
店铺名片
</text>
</view>
</view>
</
template
>
</
template
>
</van-cell>
</van-cell>
</van-cell-group>
</van-cell-group>
<view
style=
"font-size: 40rpx;font-weight: bold;margin-top: 36rpx"
>
频道专区
</view>
<view
style=
"font-size: 40rpx;font-weight: bold;margin-top: 36rpx"
>
频道专区
</view>
<view
style=
"margin-top: 16px;margin-bottom: 50rpx"
>
<view
style=
"margin-top: 16px;margin-bottom: 50rpx"
>
<view>
<view>
<van-row
gutter=
"8"
class=
"pd-h-px-10"
>
<van-row
gutter=
"8"
class=
"pd-h-px-10"
>
<van-col
span=
"12"
>
<van-col
span=
"12"
>
<van-image
width=
"100%;"
radius=
"20rpx"
src=
"../../static/img/dz/act01.png"
<van-image
@
click=
"goUrl(1)"
width=
"100%;"
radius=
"20rpx"
src=
"../../static/img/dz/act03.png"
/>
/>
<van-image
width=
"100%"
style=
"margin-top: 12rpx"
radius=
"20rpx"
src=
"../../static/img/dz/act02.png"
<van-image
@
click=
"goUrl(2)"
width=
"100%"
style=
"margin-top: 12rpx"
radius=
"20rpx"
src=
"../../static/img/dz/act04.png"
/>
/>
</van-col>
</van-col>
<van-col
span=
"12"
>
<van-col
span=
"12"
>
<van-image
width=
"100%"
radius=
"20rpx"
src=
"../../static/img/dz/act03.png"
<van-image
@
click=
"goUrl(3)"
width=
"100%"
radius=
"20rpx"
src=
"../../static/img/dz/act02.png"
/>
/>
<van-image
width=
"100%"
style=
"margin-top: 12rpx"
radius=
"20rpx"
src=
"../../static/img/dz/act04.png"
<van-image
@
click=
"goUrl(4)"
width=
"100%"
style=
"margin-top: 12rpx"
radius=
"20rpx"
src=
"../../static/img/dz/act01.png"
/>
/>
</van-col>
</van-col>
</van-row>
</van-row>
</view>
</view>
</view>
</view>
<van-tabs
class=
"pd-b-10"
v-model:active=
"state.tab.active"
animated
swipeable
>
<van-tabs
class=
"pd-b-10"
v-model:active=
"state.tab.active"
animated
swipeable
>
<van-tab
v-for=
"tItem in state.tab.tabList"
:title=
"tItem.title"
>
<van-tab
v-for=
"tItem in state.tab.tabList"
:title=
"tItem.title"
>
<van-grid
class=
"small-padding"
:column-num=
"4"
>
<van-grid
class=
"small-padding"
:column-num=
"4"
>
<van-grid-item
v-for=
"item in tItem.list"
:key=
"item.id"
<van-grid-item
v-for=
"item in tItem.list"
:key=
"item.id"
@
click=
"changeTab(state.tab.active == 0 ? item.id : item.name)"
>
@
click=
"changeTab(state.tab.active == 0 ? item.id : item.name)"
>
<van-image
width=
"14vw"
height=
"14vw"
:src=
"item.icon || item.img"
lazy-load
<van-image
width=
"14vw"
height=
"14vw"
:src=
"item.icon || item.img"
lazy-load
loading-icon=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default.png"
icon-size=
"18vw"
/>
loading-icon=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default.png"
icon-size=
"18vw"
/>
<text
class=
"text-ss text-darkGray"
>
{{ item.name }}
</text>
<text
class=
"text-ss text-darkGray"
>
{{ item.name }}
</text>
</van-grid-item>
</van-grid-item>
</van-grid>
</van-grid>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
<van-swipe
v-if=
"state.banner.middleBanner.length > 0"
lazy-render
class=
"banner_afterTap"
vertical
:autoplay=
"3000"
<van-swipe
v-if=
"state.banner.middleBanner.length > 0"
lazy-render
class=
"banner_afterTap"
vertical
:autoplay=
"3000"
:show-indicators=
"false"
>
:show-indicators=
"false"
>
<van-swipe-item
v-for=
"item in state.banner.middleBanner"
>
<van-swipe-item
v-for=
"item in state.banner.middleBanner"
>
<van-image
:src=
"item.iconpath"
@
tap=
"goto(item.josnContent)"
/>
<van-image
:src=
"item.iconpath"
@
tap=
"goto(item.josnContent)"
/>
</van-swipe-item>
</van-swipe-item>
</van-swipe>
</van-swipe>
<van-image
class=
"block_title"
src=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/recommend_title.png"
/>
<
template
v-if=
"state.banner.areaBanner.length > 0"
>
<van-list
v-if=
"state.inited"
:loading=
"state.good.loading"
:finished=
"state.good.finished"
finished-text=
"没有更多了"
<van-image
class=
"block_title"
src=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/area_title.png"
/>
offset=
"10"
@
load=
"onGoodLoad"
>
<view>
<van-row
gutter=
"12"
style=
"margin: 10rpx 20rpx;"
>
<view
v-if=
"state.banner.areaBanner.length == 6"
>
<van-col
span=
"12"
v-for=
"item in state.good.list"
style=
"margin-bottom: 25rpx"
>
<van-row
gutter=
"8"
class=
"pd-h-px-10"
>
<ShopCard
:item=
"item"
></ShopCard>
<van-col
span=
"12"
>
</van-col>
<van-image
width=
"100%"
radius=
"20rpx"
:src=
"state.banner.areaBanner[0].iconpath"
</van-row>
@
tap=
"changeTab(state.banner.areaBanner[0].josnContent, 'zq')"
/>
</van-list>
</van-col>
<view
v-if=
"state.good.fail"
class=
"text-ss text-gray pd-50"
@
tap=
"failReset"
>
请求失败,点击重试
<van-col
span=
"12"
class=
"flex col justify-between"
>
<van-icon
name=
"replay"
/>
<van-image
width=
"100%"
radius=
"20rpx"
:src=
"state.banner.areaBanner[1].iconpath"
</view>
@
tap=
"changeTab(state.banner.areaBanner[1].josnContent, 'zq')"
/>
<to-top
/>
<van-image
width=
"100%"
radius=
"20rpx"
:src=
"state.banner.areaBanner[2].iconpath"
<!--弹窗-->
@
tap=
"changeTab(state.banner.areaBanner[2].josnContent, 'zq')"
/>
<!--<popup-banner v-model:show.sync="state.banner.showPopup" :list="state.banner.popupCarousel" />-->
</van-col>
<van-overlay
z-index=
"99999"
:show=
"state.showCertificates"
>
</van-row>
<van-image
lazy-load
:src=
"state.showCertificatesImg"
style=
"width: 90%;margin: 50vw auto"
/>
<van-row
gutter=
"8"
class=
"pd-h-px-10 pd-t-px-10"
>
</van-overlay>
<van-col
span=
"12"
class=
"flex col justify-between"
>
</view>
<van-image
width=
"100%"
radius=
"20rpx"
:src=
"state.banner.areaBanner[3].iconpath"
@
tap=
"changeTab(state.banner.areaBanner[3].josnContent, 'zq',state.banner.areaBanner[3].ifCanEnter)"
/>
<van-image
width=
"100%"
radius=
"20rpx"
:src=
"state.banner.areaBanner[4].iconpath"
@
tap=
"changeTab(state.banner.areaBanner[4].josnContent, 'zq',)"
/>
</van-col>
<van-col
span=
"12"
>
<van-image
width=
"100%"
radius=
"20rpx"
:src=
"state.banner.areaBanner[5].iconpath"
@
tap=
"changeTab(state.banner.areaBanner[5].josnContent, 'zq',state.banner.areaBanner[5].ifCanEnter)"
/>
</van-col>
</van-row>
</view>
</view>
</
template
>
<van-image
class=
"block_title"
src=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/recommend_title.png"
/>
<van-list
v-if=
"state.inited"
:loading=
"state.good.loading"
:finished=
"state.good.finished"
finished-text=
"没有更多了"
offset=
"10"
@
load=
"onGoodLoad"
>
<van-row
gutter=
"12"
style=
"margin: 10rpx 20rpx;"
>
<van-col
span=
"12"
v-for=
"item in state.good.list"
style=
"margin-bottom: 25rpx"
>
<ShopCard
:item=
"item"
></ShopCard>
</van-col>
</van-row>
</van-list>
<view
v-if=
"state.good.fail"
class=
"text-ss text-gray pd-50"
@
tap=
"failReset"
>
请求失败,点击重试
<van-icon
name=
"replay"
/>
</view>
<to-top
/>
<!--弹窗-->
<!--<popup-banner v-model:show.sync="state.banner.showPopup" :list="state.banner.popupCarousel" />-->
<van-overlay
z-index=
"99999"
:show=
"state.showCertificates"
>
<van-image
lazy-load
:src=
"state.showCertificatesImg"
style=
"width: 90%;margin: 50vw auto"
/>
</van-overlay>
</view>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
api
from
"@/api"
;
import
api
from
"@/api"
;
import
{
Toast
}
from
'vant'
;
import
{
Toast
}
from
'vant'
;
import
{
onBeforeMount
,
onMounted
,
reactive
,
ref
}
from
'vue'
;
import
{
onBeforeMount
,
onMounted
,
reactive
,
ref
}
from
'vue'
;
import
toTop
from
'@/components/tool/toTop.vue'
;
import
toTop
from
'@/components/tool/toTop.vue'
;
import
ShopCard
from
'@/components/ShopCard.vue'
;
import
ShopCard
from
'@/components/ShopCard.vue'
;
import
popupBanner
from
'@/components/tool/popupBanner.vue'
;
import
popupBanner
from
'@/components/tool/popupBanner.vue'
;
const
state
=
reactive
({
const
state
=
reactive
({
show
:
false
,
show
:
false
,
actHotSell
:
null
,
actHotSell
:
null
,
actEight
:
null
,
actEight
:
null
,
actLittleE
:
null
,
actLittleE
:
null
,
showCertificatesImg
:
''
,
showCertificatesImg
:
''
,
showCertificates
:
false
,
showCertificates
:
false
,
keyword
:
""
,
keyword
:
""
,
actList
:[],
actList
:[],
act_bg
:
''
,
act_bg
:
''
,
banner
:
{
banner
:
{
areaBanner
:
[]
as
any
,
areaBanner
:
[]
as
any
,
indexCarouselBig
:
[]
as
any
,
indexCarouselBig
:
[]
as
any
,
indexCarouselSmall
:
[]
as
any
,
indexCarouselSmall
:
[]
as
any
,
middleBanner
:
[]
as
any
,
middleBanner
:
[]
as
any
,
popupCarousel
:
[]
as
any
,
popupCarousel
:
[]
as
any
,
showPopup
:
false
,
showPopup
:
false
,
},
tab
:
{
active
:
0
,
tabList
:
[
{
title
:
'类型'
,
list
:
[]
},
{
title
:
'空间'
,
list
:
[]
},
{
title
:
'风格'
,
list
:
[]
},
]
as
any
},
good
:
{
loading
:
false
,
finished
:
false
,
fail
:
false
,
page
:
0
,
list
:
[]
as
any
},
mall
:
{}
as
any
,
inited
:
false
})
onBeforeMount
(()
=>
{
getBanner
()
getIndexEtaomall
()
canUse
()
})
const
isAPP
=
ref
(
false
)
onMounted
(()
=>
{
window
.
_wx
.
miniProgram
.
getEnv
((
res
)
=>
{
if
(
res
.
miniprogram
)
{
isAPP
.
value
=
true
}
else
{
isAPP
.
value
=
false
}
});
setTimeout
(()
=>
{
state
.
inited
=
true
},
1000
)
});
function
goPhoneBtn
(
val
){
uni
.
makePhoneCall
({
// 手机号
phoneNumber
:
val
,
// 成功回调
success
:
(
res
)
=>
{
},
},
// 失败回调
tab
:
{
fail
:
(
res
)
=>
{
active
:
0
,
}
tabList
:
[
{
title
:
'类型'
,
list
:
[]
},
{
title
:
'空间'
,
list
:
[]
},
{
title
:
'风格'
,
list
:
[]
},
]
as
any
},
good
:
{
loading
:
false
,
finished
:
false
,
fail
:
false
,
page
:
0
,
list
:
[]
as
any
},
mall
:
{}
as
any
,
inited
:
false
})
onBeforeMount
(()
=>
{
getBanner
()
getIndexEtaomall
()
canUse
()
})
const
isAPP
=
ref
(
false
)
onMounted
(()
=>
{
window
.
_wx
.
miniProgram
.
getEnv
((
res
)
=>
{
if
(
res
.
miniprogram
)
{
isAPP
.
value
=
true
}
else
{
isAPP
.
value
=
false
}
});
setTimeout
(()
=>
{
state
.
inited
=
true
},
1000
)
});
});
}
function
goUrl
(
type
)
{
function
searchImg
()
{
console
.
log
(
type
);
const
{
token
}
=
uni
.
getStorageSync
(
"user"
)
||
{};
if
(
type
==
1
){
uni
.
chooseImage
({
uni
.
navigateTo
({
count
:
1
,
//默认3
url
:
`/pages/goodList/index?sortType=0`
,
sizeType
:
[
'original'
,
'compressed'
],
});
success
:
function
(
res
)
{
}
else
if
(
type
==
3
){
let
formData1
=
{
uni
.
navigateTo
({
image
:
res
.
tempFiles
[
0
],
url
:
`/pages/goodList/index?sortType=1`
,
link
:
'alisa1'
,
});
pageNum
:
1
,
}
else
if
(
type
==
2
){
pageSize
:
20
uni
.
navigateTo
({
url
:
`/pages/goodList/index?search=套餐`
,
});
}
else
{
Toast
(
'正在筹备中,敬请期待!'
);
}
}
function
goPhoneBtn
(
val
){
uni
.
makePhoneCall
({
// 手机号
phoneNumber
:
val
,
// 成功回调
success
:
(
res
)
=>
{
},
// 失败回调
fail
:
(
res
)
=>
{
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
});
uni
.
uploadFile
({
}
header
:
{
function
searchImg
()
{
"Authorization"
:
token
const
{
token
}
=
uni
.
getStorageSync
(
"user"
)
||
{};
},
uni
.
chooseImage
({
url
:
'/pre/api/image/search'
,
count
:
1
,
//默认3
timeout
:
1000
*
6
,
sizeType
:
[
'original'
,
'compressed'
],
filePath
:
''
,
success
:
function
(
res
)
{
formData
:
formData1
,
let
formData1
=
{
success
:
(
res
)
=>
{
image
:
res
.
tempFiles
[
0
],
console
.
log
(
res
);
link
:
'alisa1'
,
},
pageNum
:
1
,
complete
:
()
=>
{
pageSize
:
20
},
}
fail
:
(
res
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
}
uni
.
uploadFile
({
header
:
{
"Authorization"
:
token
},
url
:
'/pre/api/image/search'
,
timeout
:
1000
*
6
,
filePath
:
''
,
formData
:
formData1
,
success
:
(
res
)
=>
{
console
.
log
(
res
);
},
complete
:
()
=>
{
},
fail
:
(
res
)
=>
{
}
})
})
})
})
}
});
}
function
gotoU
()
{
uni
.
redirectTo
({
url
:
"/pages/my/technicalSupport?name=index"
,
});
}
function
goToAct
(
id
)
{
uni
.
navigateTo
({
url
:
`/pages/goodList/index?actId=
${
id
}
`
,
});
}
function
setBgColor
(
bgColor
)
{
return
{
background
:
'url('
+
bgColor
+
') no-repeat 0 0'
,
'background-position'
:
'center'
,
'background-sizing'
:
'100% 100%'
,
'position'
:
'relative'
}
}
});
}
function
gotoU
()
{
uni
.
redirectTo
({
url
:
"/pages/my/technicalSupport?name=index"
,
});
}
function
goToAct
(
id
)
{
uni
.
navigateTo
({
url
:
`/pages/goodList/index?actId=
${
id
}
`
,
});
}
function
setBgColor
(
bgColor
)
{
return
{
background
:
'url('
+
bgColor
+
') no-repeat 0 0'
,
'background-position'
:
'center'
,
'background-sizing'
:
'100% 100%'
,
'position'
:
'relative'
}
}
}
function
H
()
{
function
H
()
{
let
url
=
'https://etaoact.edstao.com/etaoappv3/?userId=1'
let
url
=
'https://etaoact.edstao.com/etaoappv3/?userId=1'
const
weburl
=
encodeURIComponent
(
url
+
'/weixin/QRCode&&name=alisa1'
+
'&from=wx'
);
const
weburl
=
encodeURIComponent
(
url
+
'/weixin/QRCode&&name=alisa1'
+
'&from=wx'
);
window
.
_wx
.
miniProgram
.
redirectTo
({
url
:
`/pages/index?weburl=
${
weburl
}
`
})
window
.
_wx
.
miniProgram
.
redirectTo
({
url
:
`/pages/index?weburl=
${
weburl
}
`
})
}
}
function
goMe
()
{
function
goMe
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/good/contact"
,
url
:
"/pages/good/contact"
,
});
});
}
}
function
goSearch
()
{
function
goSearch
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/topSearch/index"
,
url
:
"/pages/topSearch/index"
,
});
});
}
}
function
getBanner
()
{
function
getBanner
()
{
api
.
indexModule
().
then
((
data
:
any
)
=>
{
api
.
indexModule
().
then
((
data
:
any
)
=>
{
if
(
!
data
)
return
if
(
!
data
)
return
const
{
indexBanners
,
indexClassify
}
=
data
const
{
indexBanners
,
indexClassify
}
=
data
state
.
banner
=
indexBanners
state
.
banner
=
indexBanners
if
(
Object
.
keys
(
data
.
actBanner
).
length
>
0
)
{
if
(
Object
.
keys
(
data
.
actBanner
).
length
>
0
)
{
let
imgData
=
data
.
actBanner
let
imgData
=
data
.
actBanner
state
.
act_bg
=
imgData
.
actBackground
[
0
].
iconpath
state
.
act_bg
=
imgData
.
actBackground
[
0
].
iconpath
if
(
imgData
.
actHotSell
.
length
>
0
)
{
if
(
imgData
.
actHotSell
.
length
>
0
)
{
state
.
actHotSell
=
imgData
.
actHotSell
[
0
]
state
.
actHotSell
=
imgData
.
actHotSell
[
0
]
}
}
if
(
imgData
.
actEight
.
length
>
0
)
{
if
(
imgData
.
actEight
.
length
>
0
)
{
state
.
actEight
=
imgData
.
actEight
[
0
]
state
.
actEight
=
imgData
.
actEight
[
0
]
}
}
if
(
imgData
.
actLittleE
.
length
>
0
)
{
if
(
imgData
.
actLittleE
.
length
>
0
)
{
state
.
actLittleE
=
imgData
.
actLittleE
[
0
]
state
.
actLittleE
=
imgData
.
actLittleE
[
0
]
}
}
}
}
state
.
tab
.
tabList
[
0
].
list
=
[
state
.
tab
.
tabList
[
0
].
list
=
[
...
indexClassify
.
type
.
slice
(
0
,
7
),
...
indexClassify
.
type
.
slice
(
0
,
7
),
{
img
:
'https://img.edsmall.com/ROOT/ETao/fenxiao/h5/more.png'
,
name
:
'更多'
}
{
img
:
'https://img.edsmall.com/ROOT/ETao/fenxiao/h5/more.png'
,
name
:
'更多'
}
]
]
state
.
tab
.
tabList
[
1
].
list
=
[
state
.
tab
.
tabList
[
1
].
list
=
[
...
indexClassify
.
room
.
slice
(
0
,
7
),
...
indexClassify
.
room
.
slice
(
0
,
7
),
{
img
:
'https://img.edsmall.com/ROOT/ETao/fenxiao/h5/more.png'
,
name
:
'更多'
}
{
img
:
'https://img.edsmall.com/ROOT/ETao/fenxiao/h5/more.png'
,
name
:
'更多'
}
]
]
state
.
tab
.
tabList
[
2
].
list
=
[
state
.
tab
.
tabList
[
2
].
list
=
[
...
indexClassify
.
style
.
slice
(
0
,
7
),
...
indexClassify
.
style
.
slice
(
0
,
7
),
{
img
:
'https://img.edsmall.com/ROOT/ETao/fenxiao/h5/more.png'
,
name
:
'更多'
}
{
img
:
'https://img.edsmall.com/ROOT/ETao/fenxiao/h5/more.png'
,
name
:
'更多'
}
]
]
if
(
state
.
banner
.
popupCarousel
.
length
>
0
)
state
.
banner
.
showPopup
=
true
if
(
state
.
banner
.
popupCarousel
.
length
>
0
)
state
.
banner
.
showPopup
=
true
})
})
}
}
function
getIndexEtaomall
()
{
function
getIndexEtaomall
()
{
api
.
getIndexEtaomall
({
domain
:
uni
.
getStorageSync
(
"subdomain"
)
}).
then
((
data
:
any
)
=>
{
api
.
getIndexEtaomall
({
domain
:
uni
.
getStorageSync
(
"subdomain"
)
}).
then
((
data
:
any
)
=>
{
state
.
mall
=
data
state
.
mall
=
data
uni
.
setStorageSync
(
'mail'
,
state
.
mall
)
uni
.
setStorageSync
(
'mail'
,
state
.
mall
)
})
})
}
}
function
canUse
()
{
function
canUse
()
{
api
.
getCanUse
({
domain
:
uni
.
getStorageSync
(
"subdomain"
)
}).
then
((
data
:
any
)
=>
{
api
.
getCanUse
({
domain
:
uni
.
getStorageSync
(
"subdomain"
)
}).
then
((
data
:
any
)
=>
{
if
(
data
){
if
(
data
){
state
.
showCertificates
=
true
state
.
showCertificates
=
true
state
.
showCertificatesImg
=
data
state
.
showCertificatesImg
=
data
}
}
})
})
}
}
function
onGoodLoad
()
{
function
onGoodLoad
()
{
if
(
state
.
good
.
loading
||
state
.
good
.
fail
)
return
if
(
state
.
good
.
loading
||
state
.
good
.
fail
)
return
state
.
good
.
loading
=
true
state
.
good
.
loading
=
true
state
.
good
.
page
+=
1
state
.
good
.
page
+=
1
api
.
productList
({
pageNum
:
state
.
good
.
page
,
sortType
:
0
,
pageSize
:
20
,
link
:
uni
.
getStorageSync
(
"subdomain"
)
}).
then
((
data
:
any
)
=>
{
api
.
productList
({
pageNum
:
state
.
good
.
page
,
sortType
:
0
,
pageSize
:
20
,
link
:
uni
.
getStorageSync
(
"subdomain"
)
}).
then
((
data
:
any
)
=>
{
if
(
!
data
)
return
if
(
!
data
)
return
if
(
!
data
||!
data
.
hasNextPage
){
if
(
!
data
||!
data
.
hasNextPage
){
state
.
good
.
finished
=
true
state
.
good
.
finished
=
true
}
state
.
good
.
list
.
push
(...
data
.
list
)
})
.
catch
(()
=>
{
state
.
good
.
fail
=
true
})
.
finally
(()
=>
{
state
.
good
.
loading
=
false
})
}
}
state
.
good
.
list
.
push
(...
data
.
list
)
})
.
catch
(()
=>
{
state
.
good
.
fail
=
true
})
.
finally
(()
=>
{
state
.
good
.
loading
=
false
})
}
function
failReset
()
{
function
failReset
()
{
state
.
good
.
page
-=
1
state
.
good
.
page
-=
1
state
.
good
.
finished
=
false
state
.
good
.
finished
=
false
state
.
good
.
fail
=
false
state
.
good
.
fail
=
false
onGoodLoad
()
onGoodLoad
()
}
}
function
goto
(
url
:
any
)
{
function
goto
(
url
:
any
)
{
url
&&
uni
.
navigateTo
({
url
})
url
&&
uni
.
navigateTo
({
url
})
}
}
function
changeTab
(
name
:
any
,
ZQ
?:
any
,
num
?:
any
)
{
function
changeTab
(
name
:
any
,
ZQ
?:
any
,
num
?:
any
)
{
if
(
num
==
0
)
{
if
(
num
==
0
)
{
Toast
(
'正在筹备中,敬请期待!'
);
Toast
(
'正在筹备中,敬请期待!'
);
return
return
}
if
(
ZQ
==
'zq'
)
{
uni
.
navigateTo
({
url
:
`/pages/goodList/index?zone=
${
name
}
`
,
});
return
}
if
(
!
name
||
name
==
'更多'
)
{
let
act
=
0
if
(
state
.
tab
.
active
==
1
)
act
=
6
if
(
state
.
tab
.
active
==
2
)
act
=
1
uni
.
navigateTo
({
url
:
`/pages/classify/index?act=
${
act
}
`
,
});
return
}
let
type
=
null
if
(
state
.
tab
.
active
==
0
)
{
type
=
'menuId'
}
else
if
(
state
.
tab
.
active
==
1
)
{
type
=
'space'
}
else
if
(
state
.
tab
.
active
==
2
)
{
type
=
'styleName'
}
uni
.
navigateTo
({
url
:
`/pages/goodList/index?
${
type
}
=
${
name
}
`
,
});
}
}
if
(
ZQ
==
'zq'
)
{
uni
.
navigateTo
({
url
:
`/pages/goodList/index?zone=
${
name
}
`
,
});
return
}
if
(
!
name
||
name
==
'更多'
)
{
let
act
=
0
if
(
state
.
tab
.
active
==
1
)
act
=
6
if
(
state
.
tab
.
active
==
2
)
act
=
1
uni
.
navigateTo
({
url
:
`/pages/classify/index?act=
${
act
}
`
,
});
return
}
let
type
=
null
if
(
state
.
tab
.
active
==
0
)
{
type
=
'menuId'
}
else
if
(
state
.
tab
.
active
==
1
)
{
type
=
'space'
}
else
if
(
state
.
tab
.
active
==
2
)
{
type
=
'styleName'
}
uni
.
navigateTo
({
url
:
`/pages/goodList/index?
${
type
}
=
${
name
}
`
,
});
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -468,21 +453,21 @@ function changeTab(name: any, ZQ?: any,num?:any) {
...
@@ -468,21 +453,21 @@ function changeTab(name: any, ZQ?: any,num?:any) {
width
:
85%
;
width
:
85%
;
background-color
:
#fff
;
background-color
:
#fff
;
}
}
.search_bar
{
.search_bar
{
width
:
100vw
;
width
:
100vw
;
}
}
.banner_top
{
.banner_top
{
height
:
43
.5vw
;
height
:
43
.5vw
;
}
}
.banner_afterTop
,
.banner_afterTop
,
.banner_afterTap
{
.banner_afterTap
{
height
:
20vw
;
height
:
20vw
;
}
}
.block_title
{
.block_title
{
margin
:
40rpx
auto
25rpx
auto
;
margin
:
40rpx
auto
25rpx
auto
;
width
:
60vw
;
width
:
60vw
;
}
}
</
style
>
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录