Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
F
fenxiao_h5-dz
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张志伟
fenxiao_h5-dz
提交
99b93df3
提交
99b93df3
编写于
5月 13, 2024
作者:
zhangzhiwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
.
上级
4b49e662
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
46 行删除
+10
-46
ShopCard.vue
src/components/ShopCard.vue
+2
-2
detail.vue
src/pages/good/detail.vue
+7
-43
index.vue
src/pages/goodList/index.vue
+1
-1
未找到文件。
src/components/ShopCard.vue
浏览文件 @
99b93df3
<
template
>
<
template
>
<view>
<view>
<div
class=
"image-container"
@
click=
"goto(`/pages/good/detail?skuId=$
{item.skuId}
&
spuId=${item.spuId}`)">
<div
class=
"image-container"
@
click=
"goto(`/pages/good/detail?skuId=$
{item.skuId}
&
spuId=${item.spuId}`)">
<van-image
fit=
"cover"
lazy-load
:src=
"item.mainImg"
<van-image
fit=
"cover"
lazy-load
:src=
"item.mainImg"
height=
"45vw"
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"
@
click=
"goto(`/pages/good/detail?skuId=$
{item.skuId}
&
spuId=${item.spuId}`)"
>
<text
class=
"text-s ellipsis line_over2"
style=
"text-align: left;background: #ffffff;min-height: 60rpx;overflow: hidden"
>
<text
class=
"text-s ellipsis line_over2"
style=
"text-align: left;background: #ffffff;min-height: 60rpx;overflow: hidden"
>
{{
item
.
title
}}
{{
item
.
title
}}
</text>
</text>
...
...
src/pages/good/detail.vue
浏览文件 @
99b93df3
...
@@ -285,49 +285,12 @@
...
@@ -285,49 +285,12 @@
src
=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/price_tip1.png"
/>
src
=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/price_tip1.png"
/>
<
template
v
-
if
=
"!state.switch.newView"
>
<
template
v
-
if
=
"!state.switch.newView"
>
<
view
id
=
"otherSku"
class
=
"good_anchor"
>
同系列推荐
<
/view
>
<
view
id
=
"otherSku"
class
=
"good_anchor"
>
同系列推荐
<
/view
>
<
van
-
list
v
-
if
=
"state.data.skuJson"
class
=
"mg-t-15"
:
finished
=
"true"
finished
-
text
=
"已经到底了哦~"
>
<
van
-
list
v
-
if
=
"state.data.skuJson"
:
finished
=
"true"
finished
-
text
=
"已经到底了哦~"
>
<
van
-
grid
:
center
=
"false"
:
column
-
num
=
"2"
:
gutter
=
"7"
>
<
van
-
row
gutter
=
"12"
style
=
"margin: 0rpx 20rpx 20rpx;"
>
<
template
v
-
for
=
"item in state.data.skuJson"
>
<
van
-
col
span
=
"12"
v
-
for
=
"item in state.data.skuJson"
style
=
"margin-bottom: 25rpx;align-self: baseline"
>
<
van
-
grid
-
item
v
-
if
=
"item.skuId != state.skuId"
class
=
"text-left"
<
ShopCard
v
-
if
=
"item.skuId != state.skuId"
:
item
=
"item"
><
/ShopCard
>
@
tap
=
"goto(`/pages/good/detail?skuId=${item.skuId
}
&spuId=${state.data.spuId
}
`)"
>
<
/van-col
>
<
van
-
image
class
=
"self_center"
width
=
"30vw"
height
=
"30vw"
lazy
-
load
<
/van-row
>
loading
-
icon
=
"https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default1.png"
icon
-
size
=
"30vw"
:
src
=
"item.mainImg"
/>
<
view
class
=
"mg-t-30-m"
>
<
van
-
image
v
-
if
=
"zoneIcon"
width
=
"60rpx"
height
=
"32rpx"
:
src
=
"zoneIcon[0]"
/>
<
van
-
image
v
-
if
=
"item.isVideoIcon"
class
=
"mg-l-5"
width
=
"32rpx"
height
=
"32rpx"
src
=
"/static/img/play.png"
/>
<
/view
>
<
text
class
=
"text-s ellipsis line_over2 pd-t-10"
style
=
"width: 320rpx;height: 32px;margin-bottom:6px"
>
{{
item
.
title
}}
<
/text
>
<
text
class
=
"text-ss"
v
-
if
=
"item.specHeight || item.specLength || item.specWidth"
>
{{
`W(宽):${item.specWidth
}
H(高):${item.specHeight
}
D(深):${item.specLength
}
`
}}
<
/text
>
<
text
class
=
"text-gray text-ss"
><
/text
>
<
template
v
-
if
=
"item.salePrice !== null"
>
<
view
class
=
"text-gray text-ss line-through"
>
零售价¥
{{
item
.
productPrice
}}
<
/view
>
<
view
class
=
"text-orange text-ss"
>
优惠价¥
<
text
class
=
"text-bold text-l"
>
{{
item
.
salePrice
}}
<
/text
>
<
/view
>
<
/template
>
<
template
v
-
else
>
<
view
class
=
"text-orange text-ss"
>
零售价¥
<
text
class
=
"text-bold text-l"
>
{{
item
.
productPrice
}}
<
/text
>
<
/view
>
<
/template
>
<
/van-grid-item
>
<
/template
>
<
/van-grid
>
<
/van-list
>
<
/van-list
>
<
/template
>
<
/template
>
<
/van-skeleton
>
<
/van-skeleton
>
...
@@ -388,6 +351,7 @@
...
@@ -388,6 +351,7 @@
<
/template
>
<
/template
>
<
script
setup
lang
=
"ts"
>
<
script
setup
lang
=
"ts"
>
import
ShopCard
from
'@/components/ShopCard.vue'
;
import
{
Enum
,
PageUtils
,
WXUtils
}
from
'@/utils/utils'
import
{
Enum
,
PageUtils
,
WXUtils
}
from
'@/utils/utils'
import
{
computed
,
nextTick
,
onBeforeMount
,
reactive
,
ref
,
onUnmounted
,
onMounted
}
from
'vue'
;
import
{
computed
,
nextTick
,
onBeforeMount
,
reactive
,
ref
,
onUnmounted
,
onMounted
}
from
'vue'
;
import
{
onPageScroll
,
onShow
,
onHide
}
from
'@dcloudio/uni-app'
import
{
onPageScroll
,
onShow
,
onHide
}
from
'@dcloudio/uni-app'
...
...
src/pages/goodList/index.vue
浏览文件 @
99b93df3
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<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;"
v-if=
"state.showStyle"
>
<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
;align-self: baseline
"
>
<ShopCard
:item=
"item"
></ShopCard>
<ShopCard
:item=
"item"
></ShopCard>
</van-col>
</van-col>
</van-row>
</van-row>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录