Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
d4e34f51
Commit
d4e34f51
authored
Jun 07, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序原生问题修改
parent
2cb5e97e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
113 deletions
+117
-113
src/pages/home/index.vue
+11
-7
static/nativeComponents/GoodsList/index.js
+2
-2
static/nativeComponents/GoodsList/index.wxml
+104
-104
No files found.
src/pages/home/index.vue
View file @
d4e34f51
...
...
@@ -386,13 +386,17 @@ export default {
link
:
linkVal
,
});
}
app
.
fenxiaoModel
.
getDistributorHomepage
(
res
).
then
(
ele
=>
{
if
(
ele
.
id
)
{
this
.
getDistributorHomepageName
=
'我的小店'
;
}
else
{
this
.
getDistributorHomepageName
=
'一键开店'
;
}
});
if
(
res
&&
res
.
id
){
app
.
fenxiaoModel
.
getDistributorHomepage
(
res
).
then
(
ele
=>
{
if
(
ele
.
id
)
{
this
.
getDistributorHomepageName
=
'我的小店'
;
}
else
{
this
.
getDistributorHomepageName
=
'一键开店'
;
}
});
}
if
(
res
&&
res
.
parentSpokesmanDistributionModel
==
'1'
&&
...
...
static/nativeComponents/GoodsList/index.js
View file @
d4e34f51
...
...
@@ -351,9 +351,9 @@ const componentOptions = {
let
linkVal
=
""
;
if
(
goodsType
!=
1
)
{
if
(
style
==
"list"
)
{
linkVal
=
`/goods
Search/goodsSearch
?categoryName=
${
categoryName
}
&categoryId=
${
categoryId
}
`
;
linkVal
=
`/goods
/commodityMenu
?categoryName=
${
categoryName
}
&categoryId=
${
categoryId
}
`
;
}
else
{
linkVal
=
`/goods
Search/goodsSearch
`
;
linkVal
=
`/goods
/commodityMenu
`
;
}
}
else
{
linkVal
=
`/pointShop/productList?categoryName=
${
categoryName
}
&categoryId=
${
categoryId
}
`
;
...
...
static/nativeComponents/GoodsList/index.wxml
View file @
d4e34f51
<!-- 商品列表组件 -->
<view class="goodsList" style="padding-top:{{datas.componentData.paddingList[0].value*2}}rpx;padding-bottom:{{datas.componentData.paddingList[1].value*2}}rpx;padding-left:{{datas.componentData.paddingList[2].value*2}}rpx;padding-right:{{datas.componentData.paddingList[3].value*2}}rpx;">
<view class="list-wrap heap-wrap" style="background-color:{{datas.componentData['heapBgColorShow'] ? datas.componentData['heapBgColor'] : ''}};border-radius:{{datas.componentData['cardBorderRadius']*2}}rpx;">
<!-- 头部 -->
<view class="tops flex" style="padding:{{(datas.componentData['titleIcon'] || (datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='top')) ?'0rpx 0rpx 0rpx 10rpx' : ''}};margin-bottom:{{datas.componentData['titleCardGap']*2}}rpx">
<view class="left flex">
<view class="img" wx:if="{{titleIcon}}">
<image mode="widthFix" src="{{titleIcon}}" />
</view>
<view class="title">{{datas.componentData['titles']}}</view>
</view>
<view
class="moreTop"
bindtap="viewMore"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='top' && datas.componentData['goodsSource']!='assign'}}"
>
查看更多
<text class="jt"></text>
</view>
</view>
<!-- 网格布局 -->
<view
wx:if="{{datas.componentData.style==='list'}}"
class="goodsItem-list flex"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
>
<view
wx:for="{{goodsList}}"
wx:key="index"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
>
<goods-item
datas="{{datas}}"
items="{{goodsList[index]}}"
indexs="{{index}}"
></goods-item>
</view>
</view>
<!-- 横向滚动 -->
<view class="goods-across" wx:elif="{{datas.componentData.style==='across'}}">
<view class="prev-btn">
<text class="iconfont-common common-iconyoujiantou"></text>
</view>
<view class="next-btn">
<text class="iconfont-common common-iconyoujiantou"></text>
</view>
<view
wx:for="{{datas.componentData.goodsList}}"
wx:key="index"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;margin-right:{{datas.componentData.proGap*2}}rpx"
>
<goods-item
datas="{{datas}}"
items="{{datas.componentData.goodsList[index]}}"
indexs="{{index}}"
></goods-item>
</view>
</view>
<!-- 瀑布流 -->
<view wx:if="{{datas.componentData.style==='waterfall'}}">
<waterfall-flow
generic:defaultCom="goods-item"
id="waterfallFlow"
note="{{datas.componentData.goodsList}}"
datas="{{datas}}"
padding="{{datas.componentData.proGap}}"
wx:if="{{datas.componentData.goodsList}}"
bindonLoad="onLoad"
loading="{{loading}}"
finished="{{finished}}"
></waterfall-flow>
</view>
<!-- 横向列表 -->
<view
class="goods goods-rowList"
wx:elif="{{datas.componentData.style==='rowList'}}"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
>
<view
wx:for="{{datas.componentData.goodsList}}"
wx:key="index"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
>
<goods-item
datas="{{datas}}"
items="{{datas.componentData.
goodsList[index]}}"
indexs="{{index}}"
></goods-item>
</view>
</view>
<!-- 堆叠卡片 -->
<view class="goods-heap-Item" wx:if="{{datas.componentData.style==='heap'}}">
<heap-item datas="{{datas}}"></heap-item>
</view>
<view
class="moreBottom"
bindtap="viewMore"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='bottom' && datas.componentData['goodsSource']!='assign'}}"
>
查看更多
<text class="jt"></text>
</view>
</view>
<view class="list-wrap heap-wrap" style="background-color:{{datas.componentData['heapBgColorShow'] ? datas.componentData['heapBgColor'] : ''}};border-radius:{{datas.componentData['cardBorderRadius']*2}}rpx;">
<!-- 头部 -->
<view class="tops flex" style="padding:{{(datas.componentData['titleIcon'] || (datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='top')) ?'0rpx 0rpx 0rpx 10rpx' : ''}};margin-bottom:{{datas.componentData['titleCardGap']*2}}rpx">
<view class="left flex">
<view class="img" wx:if="{{titleIcon}}">
<image mode="widthFix" src="{{titleIcon}}" />
</view>
<view class="title">{{datas.componentData['titles']}}</view>
</view>
<view
class="moreTop"
bindtap="viewMore"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='top' && datas.componentData['goodsSource']!='assign'}}"
>
查看更多
<text class="jt"></text>
</view>
</view>
<!-- 网格布局 -->
<view
wx:if="{{datas.componentData.style==='list'}}"
class="goodsItem-list flex"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
>
<view
wx:for="{{goodsList}}"
wx:key="index"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
>
<goods-item
datas="{{datas}}"
items="{{goodsList[index]}}"
indexs="{{index}}"
></goods-item>
</view>
</view>
<!-- 横向滚动 -->
<view class="goods-across" wx:elif="{{datas.componentData.style==='across'}}">
<view class="prev-btn">
<text class="iconfont-common common-iconyoujiantou"></text>
</view>
<view class="next-btn">
<text class="iconfont-common common-iconyoujiantou"></text>
</view>
<view
wx:for="{{datas.componentData.goodsList}}"
wx:key="index"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;margin-right:{{datas.componentData.proGap*2}}rpx"
>
<goods-item
datas="{{datas}}"
items="{{datas.componentData.goodsList[index]}}"
indexs="{{index}}"
></goods-item>
</view>
</view>
<!-- 瀑布流 -->
<view wx:if="{{datas.componentData.style==='waterfall'}}">
<waterfall-flow
generic:defaultCom="goods-item"
id="waterfallFlow"
note="{{datas.componentData.goodsList}}"
datas="{{datas}}"
padding="{{datas.componentData.proGap}}"
wx:if="{{datas.componentData.goodsList}}"
bindonLoad="onLoad"
loading="{{loading}}"
finished="{{finished}}"
></waterfall-flow>
</view>
<!-- 横向列表 -->
<view
class="goods goods-rowList"
wx:elif="{{datas.componentData.style==='rowList'}}"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
>
<view
wx:for="{{datas.componentData.goodsList}}"
wx:key="index"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
>
<goods-item
datas="{{datas}}"
items="{{
goodsList[index]}}"
indexs="{{index}}"
></goods-item>
</view>
</view>
<!-- 堆叠卡片 -->
<view class="goods-heap-Item" wx:if="{{datas.componentData.style==='heap'}}">
<heap-item datas="{{datas}}"></heap-item>
</view>
<view
class="moreBottom"
bindtap="viewMore"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='bottom' && datas.componentData['goodsSource']!='assign'}}"
>
查看更多
<text class="jt"></text>
</view>
</view>
</view>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment