Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
u011369184
shopxo-uniapp
提交
fdc4456f
S
shopxo-uniapp
项目概览
u011369184
/
shopxo-uniapp
与 Fork 源项目一致
Fork自
纵之格 / shopxo-uniapp
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
shopxo-uniapp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fdc4456f
编写于
9月 16, 2023
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
组合搭配支持商品展示
上级
0b2eb8e7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
80 addition
and
14 deletion
+80
-14
components/binding-list/binding-list.vue
components/binding-list/binding-list.vue
+79
-13
pages/plugins/binding/index/index.vue
pages/plugins/binding/index/index.vue
+1
-1
未找到文件。
components/binding-list/binding-list.vue
浏览文件 @
fdc4456f
...
...
@@ -2,16 +2,38 @@
<view>
<view
v-if=
"(data_list || null) != null && data_list.length > 0"
class=
"plugins-binding-data-list oh"
>
<block
v-for=
"(item, index) in data_list"
:key=
"index"
>
<view
class=
"item border-radius-main bg-white padding-main oh spacing-mb"
:data-value=
"item.url"
@
tap=
"url_event"
>
<image
:src=
"item.images"
mode=
"aspectFit"
class=
"images fl dis-block border-radius-main"
></image>
<view
class=
"base-right fr bs-bb"
>
<view
class=
"fw-b text-size cr-base single-text"
>
{{
item
.
title
}}
</view>
<view
class=
"cr-grey margin-top-xs text-size-xs multi-text"
>
{{
item
.
describe
}}
</view>
<view
class=
"sales-price margin-top-sm single-text"
>
{{
propCurrencySymbol
}}{{
item
.
estimate_price
}}
</view>
<view
v-if=
"item.estimate_original_price != 0"
class=
"original-price margin-top-xs single-text"
>
{{
propCurrencySymbol
}}{{
item
.
estimate_original_price
}}
</view>
<view
v-if=
"(item.estimate_discount_price || 0) != 0"
class=
"margin-top-sm single-text"
>
<text
class=
"discount-icon cr-white text-size-xs"
>
节省
</text>
<text
class=
"cr-green"
>
{{
propCurrencySymbol
}}{{
item
.
estimate_discount_price
}}
</text>
<view
class=
"item border-radius-main bg-white padding-main oh pr spacing-mb"
>
<view
class=
"oh"
:data-value=
"item.url"
@
tap=
"url_event"
>
<image
:src=
"item.images"
mode=
"aspectFit"
class=
"images fl dis-block border-radius-main"
></image>
<view
class=
"base-right fr bs-bb"
>
<view
class=
"fw-b text-size cr-base single-text"
>
{{
item
.
title
}}
</view>
<view
class=
"sales-price margin-top-lg single-text"
>
{{
propCurrencySymbol
}}{{
item
.
estimate_price
}}
</view>
<view
v-if=
"(item.estimate_discount_price || 0) != 0"
class=
"margin-top-sm single-text"
>
<text
class=
"discount-icon cr-white text-size-xs"
>
节省
</text>
<text
class=
"cr-green"
>
{{
propCurrencySymbol
}}{{
item
.
estimate_discount_price
}}
</text>
</view>
<view
class=
"tr margin-top-xl"
>
<button
type=
"default"
size=
"mini"
class=
"br-main bg-main cr-white round buy-submit"
>
{{
item
.
type_name
}}
购买
</button>
</view>
</view>
</view>
<view
:class=
"'binding-goods-list border-radius-main margin-top-lg '+((item.is_home_show_goods || 0) == 1 ? 'expand' : '')"
:style=
"'--height: '+((Math.ceil(item.goods.length/2)*132)+20)+'rpx'"
>
<view
class=
"padding-horizontal-main padding-top-lg padding-bottom-sm oh"
>
<block
v-for=
"(gv, gi) in item.goods"
:key=
"gi"
>
<view
class=
"goods-item oh margin-top-sm margin-bottom-lg"
:data-value=
"gv.goods_url"
@
tap=
"url_event"
>
<image
:src=
"gv.images"
mode=
"aspectFit"
class=
"goods-images fl dis-block radius"
></image>
<view
class=
"goods-right fr bs-bb"
>
<view
class=
"single-text text-size-sm"
>
{{
gv
.
title
}}
</view>
<view
class=
"single-text sales-price text-size-xs"
>
{{
propCurrencySymbol
}}{{
gv
.
price
}}
</view>
<view
v-if=
"(gv.discount_price || null) != null"
class=
"single-text cr-green text-size-xs"
>
节省
{{
propCurrencySymbol
}}{{
gv
.
discount_price
}}
</view>
</view>
</view>
</block>
</view>
</view>
<view
:class=
"'bg-white padding-main wh-auto pa bs-bb bottom-elastic '+((item.is_home_show_goods || 0) != 1 ? 'br-t-dashed' : '')"
:data-index=
"index"
@
tap=
"item_more_goods_event"
>
<view
class=
"arrow-bottom"
>
<view
class=
"cr-grey text-size-xs"
>
{{
(
item
.
is_home_show_goods
||
0
)
==
1
?
'
收起
'
:
'
展开
'
}}{{
item
.
type_name
}}
商品
</view>
</view>
</view>
</view>
...
...
@@ -60,17 +82,28 @@
// url事件
url_event
(
e
)
{
app
.
globalData
.
url_event
(
e
);
},
// 商品展开关闭
item_more_goods_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
temp_data
=
this
.
data_list
;
temp_data
[
index
][
'
is_home_show_goods
'
]
=
(
parseInt
(
temp_data
[
index
][
'
is_home_show_goods
'
]
||
0
)
==
1
)
?
0
:
1
;
this
.
setData
({
data_list
:
temp_data
});
}
}
};
</
script
>
<
style
>
.plugins-binding-data-list
.item
{
padding-bottom
:
76
rpx
;
}
.plugins-binding-data-list
.item
.images
{
width
:
2
65
rpx
;
height
:
2
65
rpx
!important
;
width
:
2
32
rpx
;
height
:
2
32
rpx
!important
;
}
.plugins-binding-data-list
.item
.base-right
{
width
:
calc
(
100%
-
2
85
rpx
);
width
:
calc
(
100%
-
2
52
rpx
);
}
.plugins-binding-data-list
.item
.base-right
.discount-icon
{
border-top-right-radius
:
30
rpx
;
...
...
@@ -80,6 +113,39 @@
animation
:
gradient
5s
ease
infinite
;
padding
:
0
16
rpx
;
}
.plugins-binding-data-list
.item
.base-right
.buy-submit
{
padding
:
0
20
rpx
;
line-height
:
46
rpx
;
}
.plugins-binding-data-list
.item
.binding-goods-list
{
background
:
#F8F8F8
;
transition
:
height
0.25s
ease-in-out
;
height
:
0
;
}
.plugins-binding-data-list
.item
.binding-goods-list.expand
{
height
:
var
(
--height
);
}
.plugins-binding-data-list
.item
.binding-goods-list
.goods-item
{
width
:
calc
(
50%
-
15
rpx
);
height
:
102
rpx
;
}
.plugins-binding-data-list
.item
.binding-goods-list
.goods-item
:nth-child
(
odd
)
{
float
:
left
;
}
.plugins-binding-data-list
.item
.binding-goods-list
.goods-item
:nth-child
(
even
)
{
float
:
right
;
}
.plugins-binding-data-list
.item
.binding-goods-list
.goods-item
.goods-right
{
width
:
calc
(
100%
-
115
rpx
);
}
.plugins-binding-data-list
.item
.binding-goods-list
.goods-item
.goods-images
{
width
:
100
rpx
;
height
:
100
rpx
!important
;
}
.plugins-binding-data-list
.item
.bottom-elastic
{
left
:
0
;
bottom
:
0
;
}
@keyframes
gradient
{
0
%
{
background-position
:
0%
50%
;
...
...
pages/plugins/binding/index/index.vue
浏览文件 @
fdc4456f
...
...
@@ -3,7 +3,7 @@
<view
v-if=
"(data_base || null) != null"
>
<!-- 列表 -->
<scroll-view
:scroll-y=
"true"
class=
"scroll-box"
@
scrolltolower=
"scroll_lower"
lower-threshold=
"60"
>
<view
:class=
"((shop || null) != null ? 'page' : '')"
>
<view
:class=
"
'padding-main '+
((shop || null) != null ? 'page' : '')"
>
<block
v-if=
"(data_list || null) != null && data_list.length > 0"
>
<!-- 组合搭配组件 -->
<component-binding-list
:propConfig=
"data_base"
:propDataList=
"data_list"
:propCurrencySymbol=
"currency_symbol"
></component-binding-list>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录