Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
F
fenxiao_h5-dz
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张志伟
fenxiao_h5-dz
提交
6275a6ec
提交
6275a6ec
编写于
5月 13, 2024
作者:
zhangzhiwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
智能专区
上级
e2c5e9eb
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
111 行增加
和
3 行删除
+111
-3
ShopCard.vue
src/components/ShopCard.vue
+1
-1
pages.json
src/pages.json
+5
-0
index.vue
src/pages/goodList/index.vue
+41
-1
index.vue
src/pages/index/index.vue
+1
-1
znList.vue
src/pages/index/znList.vue
+63
-0
zn-logo.png
src/static/img/dz/zn-logo.png
+0
-0
未找到文件。
src/components/ShopCard.vue
浏览文件 @
6275a6ec
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
loading-icon=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default1.png"
icon-size=
"30vw"
/>
loading-icon=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default1.png"
icon-size=
"30vw"
/>
</div>
</div>
<view
style=
"padding: 15rpx;background: #ffffff"
>
<view
style=
"padding: 15rpx;background: #ffffff"
>
<text
class=
"text-s ellipsis line_over2"
style=
"text-align: left;background: #ffffff;"
>
<text
class=
"text-s ellipsis line_over2"
style=
"text-align: left;background: #ffffff;
min-height: 60rpx;overflow: hidden
"
>
{{
item
.
title
}}
{{
item
.
title
}}
</text>
</text>
</view>
</view>
...
...
src/pages.json
浏览文件 @
6275a6ec
...
@@ -161,6 +161,11 @@
...
@@ -161,6 +161,11 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
"navigationBarTitleText"
:
""
}
}
},{
"path"
:
"pages/index/znList"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},{
},{
"path"
:
"pages/index/userInfo"
,
"path"
:
"pages/index/userInfo"
,
"style"
:
{
"style"
:
{
...
...
src/pages/goodList/index.vue
浏览文件 @
6275a6ec
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
<div
style=
"display: flex;align-items:center;background: #ffffff"
>
<div
style=
"display: flex;align-items:center;background: #ffffff"
>
<van-icon
size=
"1.5rem"
name=
"arrow-left"
style=
"color: #757575;"
@
click=
"goBack"
/>
<van-icon
size=
"1.5rem"
name=
"arrow-left"
style=
"color: #757575;"
@
click=
"goBack"
/>
<van-search
v-model=
"state.keyword"
style=
"flex: 1"
placeholder=
"请输入搜索关键词"
@
click
.
stop=
"topSearch"
/>
<van-search
v-model=
"state.keyword"
style=
"flex: 1"
placeholder=
"请输入搜索关键词"
@
click
.
stop=
"topSearch"
/>
<img
v-if=
"state.showStyle"
src=
"../../static/img/icon_search1.jpg"
alt=
""
@
click=
"changeIcon"
style=
"width: 1.8rem;height: 1.6rem;margin-right: 3px"
>
<img
v-if=
"!state.showStyle"
src=
"../../static/img/icon_search2.jpg"
alt=
""
@
click=
"changeIcon"
style=
"width: 1.8rem;height: 1.6rem;margin-right: 3px"
>
</div>
</div>
<van-tabs
v-model:active=
"state.active"
color=
"#EBA926"
line-width=
"206rpx"
<van-tabs
v-model:active=
"state.active"
color=
"#EBA926"
line-width=
"206rpx"
title-active-color=
"#EBA926"
@
click-tab=
"changeTab"
>
title-active-color=
"#EBA926"
@
click-tab=
"changeTab"
>
...
@@ -22,11 +26,47 @@
...
@@ -22,11 +26,47 @@
<div
style=
"margin-top: .2rem"
></div>
<div
style=
"margin-top: .2rem"
></div>
<van-list
:loading=
"state.good.loading"
:finished=
"state.good.finished"
finished-text=
"没有更多了"
<van-list
:loading=
"state.good.loading"
:finished=
"state.good.finished"
finished-text=
"没有更多了"
@
load=
"onGoodLoad"
>
@
load=
"onGoodLoad"
>
<van-row
gutter=
"12"
style=
"margin: 20rpx 20rpx;"
>
<van-row
gutter=
"12"
style=
"margin: 20rpx 20rpx;"
v-if=
"state.showStyle"
>
<van-col
span=
"12"
v-for=
"item in state.good.list"
style=
"margin-bottom: 25rpx"
>
<van-col
span=
"12"
v-for=
"item in state.good.list"
style=
"margin-bottom: 25rpx"
>
<ShopCard
:item=
"item"
></ShopCard>
<ShopCard
:item=
"item"
></ShopCard>
</van-col>
</van-col>
</van-row>
</van-row>
<van-grid
:center=
"false"
:column-num=
"1"
:gutter=
"7"
v-else
style=
"border-radius: 50%"
>
<van-grid-item
class=
"text-left"
v-for=
"(item, index) in state.good.list"
:key=
"index"
>
<van-row
style=
""
>
<van-col
span=
"7"
style=
"position: relative"
@
click=
"goto(`/pages/good/detail?skuId=${item.skuId}&spuId=${item.spuId}`)"
>
<van-image
class=
"self_center"
width=
"6rem"
height=
"6rem"
lazy-load
:src=
"item.mainImg"
/>
</van-col>
<van-col
span=
"16"
>
<view
style=
"padding: 15rpx;background: #ffffff"
@
click=
"goto(`/pages/good/detail?skuId=${item.skuId}&spuId=${item.spuId}`)"
>
<text
class=
"text-s ellipsis line_over2"
style=
"text-align: left;background: #ffffff;line-height: 36rpx"
>
{{ item.title }}
</text>
</view>
<van-row
style=
"padding-top: 50rpx"
>
<van-col
span=
"24"
>
<view
style=
"display: flex;justify-content: space-between;align-items: center"
>
<view
style=
"display: flex;background: #ffffff;padding: 15rpx;margin-top: 10rpx"
class=
"text01"
>
<view
class=
"text-orange text-ss"
>
¥
<text
class=
"text-bold text-l"
>
{{ item.salePrice }}
</text>
</view>
<view
class=
"text-ss"
style=
"margin-left: 16rpx"
>
<text
class=
"text-gray text-ss line-through"
>
¥{{ item.productPrice }}
</text>
</view>
</view>
<view
@
click=
"check(item)"
>
<img
src=
"../../static/img/car_search.png"
style=
"width: 1.8rem;margin-right: 6rpx"
alt=
""
>
</view>
</view>
</van-col>
</van-row>
</van-col>
</van-row>
</van-grid-item>
</van-grid>
</van-list>
</van-list>
<view
v-if=
"state.good.fail"
class=
"text-ss text-gray pd-50"
@
click=
"failReset"
>
请求失败,点击重试
<view
v-if=
"state.good.fail"
class=
"text-ss text-gray pd-50"
@
click=
"failReset"
>
请求失败,点击重试
<van-icon
name=
"replay"
/>
<van-icon
name=
"replay"
/>
...
...
src/pages/index/index.vue
浏览文件 @
6275a6ec
...
@@ -212,7 +212,7 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
...
@@ -212,7 +212,7 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
});
});
}
else
{
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/index/
intelligen
t`
,
url
:
`/pages/index/
znLis
t`
,
});
});
}
}
}
}
...
...
src/pages/index/znList.vue
0 → 100644
浏览文件 @
6275a6ec
<
template
>
<div
class=
"container"
>
<van-sticky>
<view
class=
"justify-center bg-white sh pd-px-20 mg-b-20"
>
<van-icon
class=
"top-left"
name=
"arrow-left"
@
tap=
"goBack"
/>
<view
class=
"top-center"
>
智能专区
</view>
</view>
</van-sticky>
<view
style=
"margin-top: 16px;margin-bottom: 50rpx"
>
<view>
<van-row
gutter=
"10"
class=
"pd-h-px-10"
>
<van-col
span=
"12"
v-for=
"(item,index) in categoryList"
:key=
"index"
>
<van-image
@
click=
"goUrl(item.id)"
style=
"margin-bottom: 20rpx"
width=
"100%;"
radius=
"20rpx"
:src=
"item.logoImg"
/>
</van-col>
</van-row>
</view>
</view>
</div>
</
template
>
<
script
lang=
"ts"
>
import
api
from
"@/api"
;
import
{
reactive
,
toRefs
,
onMounted
}
from
'vue'
;
import
{
PageUtils
}
from
'@/utils/utils'
;
export
default
{
setup
()
{
const
that
=
reactive
({
categoryList
:
[],
goBack
()
{
PageUtils
.
goBack
()
},
goUrl
(
e
){
uni
.
navigateTo
({
url
:
`/pages/goodList/index?menuId=
${
e
}
`
,
});
},
getBanner
:
()
=>
{
api
.
dzResource
().
then
((
res
:
any
)
=>
{
that
.
categoryList
=
res
.
benDiMenu
console
.
log
(
res
.
benDiMenu
);
})
},
});
onMounted
(()
=>
{
that
.
getBanner
()
})
const
refState
=
toRefs
(
that
)
return
{
...
refState
}
}
}
</
script
>
<
style
scoped
>
.container
{
-webkit-overflow-scrolling
:
touch
;
}
</
style
>
\ No newline at end of file
src/static/img/dz/zn-logo.png
0 → 100644
浏览文件 @
6275a6ec
104.6 KB
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录