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
d0efeaee
Commit
d0efeaee
authored
Jun 07, 2021
by
张卓
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nativehome_tst' of
http://code.mayi888.com/chengmo/mayi-mp-shop
into nativehome_tst
parents
d90a256f
d4e34f51
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
134 additions
and
124 deletions
+134
-124
src/pages/home/index.vue
+11
-7
src/pages/wxArticle/index.vue
+12
-8
src/pages/wxPay/index.vue
+5
-3
static/nativeComponents/GoodsList/index.js
+2
-2
static/nativeComponents/GoodsList/index.wxml
+104
-104
No files found.
src/pages/home/index.vue
View file @
d0efeaee
...
@@ -386,13 +386,17 @@ export default {
...
@@ -386,13 +386,17 @@ export default {
link
:
linkVal
,
link
:
linkVal
,
});
});
}
}
app
.
fenxiaoModel
.
getDistributorHomepage
(
res
).
then
(
ele
=>
{
if
(
res
&&
if
(
ele
.
id
)
{
res
.
id
this
.
getDistributorHomepageName
=
'我的小店'
;
){
}
else
{
app
.
fenxiaoModel
.
getDistributorHomepage
(
res
).
then
(
ele
=>
{
this
.
getDistributorHomepageName
=
'一键开店'
;
if
(
ele
.
id
)
{
}
this
.
getDistributorHomepageName
=
'我的小店'
;
});
}
else
{
this
.
getDistributorHomepageName
=
'一键开店'
;
}
});
}
if
(
if
(
res
&&
res
&&
res
.
parentSpokesmanDistributionModel
==
'1'
&&
res
.
parentSpokesmanDistributionModel
==
'1'
&&
...
...
src/pages/wxArticle/index.vue
View file @
d0efeaee
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
};
};
},
},
async
onLoad
(
options
)
{
async
onLoad
(
options
)
{
console
.
log
(
options
,
'第三方页面'
);
console
.
log
(
options
,
"第三方页面"
);
/**
/**
* scene=sso 第三方需要登录的页面
* scene=sso 第三方需要登录的页面
* login=1 jwt需要登录(临时方案)
* login=1 jwt需要登录(临时方案)
...
@@ -56,13 +56,15 @@ export default {
...
@@ -56,13 +56,15 @@ export default {
this
.
getSsoBcakUrl
(
decodeURIComponent
(
options
.
link
));
this
.
getSsoBcakUrl
(
decodeURIComponent
(
options
.
link
));
}
}
}
else
if
(
getUrlKey
(
decodeURIComponent
(
options
.
link
),
"login"
)
!=
"1"
)
{
}
else
if
(
getUrlKey
(
decodeURIComponent
(
options
.
link
),
"login"
)
!=
"1"
)
{
this
.
link
=
decodeURIComponent
(
options
.
link
);
this
.
setLink
(
decodeURIComponent
(
options
.
link
)
);
}
else
{
}
else
{
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
link
=
forUrlAddKey
(
decodeURIComponent
(
options
.
link
),
{
this
.
setLink
(
token
:
wx
.
getStorageSync
(
"sessionid"
),
forUrlAddKey
(
decodeURIComponent
(
options
.
link
),
{
jwt
:
1
,
token
:
wx
.
getStorageSync
(
"sessionid"
),
});
jwt
:
1
,
})
);
}
else
{
}
else
{
let
url
=
`/pages/login/main?scene=sso&back=
${
options
.
link
}
`
;
let
url
=
`/pages/login/main?scene=sso&back=
${
options
.
link
}
`
;
wx
.
navigateTo
({
wx
.
navigateTo
({
...
@@ -119,6 +121,9 @@ export default {
...
@@ -119,6 +121,9 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
setLink
(
data
)
{
this
.
link
=
data
;
},
getSsoBcakUrl
(
link
)
{
getSsoBcakUrl
(
link
)
{
let
op
=
{
let
op
=
{
callbackUrl
:
link
,
callbackUrl
:
link
,
...
@@ -130,9 +135,8 @@ export default {
...
@@ -130,9 +135,8 @@ export default {
wxAvatarUrl
:
this
.
$store
.
state
.
userInfo
.
avatarUrl
,
wxAvatarUrl
:
this
.
$store
.
state
.
userInfo
.
avatarUrl
,
};
};
login
.
getSsoBcakUrl
(
op
).
then
((
res
)
=>
{
login
.
getSsoBcakUrl
(
op
).
then
((
res
)
=>
{
console
.
log
(
res
,
this
.
link
,
555444
);
if
(
res
.
data
.
code
==
"200"
)
{
if
(
res
.
data
.
code
==
"200"
)
{
this
.
link
=
res
.
data
.
data
;
this
.
setLink
(
res
.
data
.
data
)
;
}
else
{
}
else
{
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
});
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
});
}
}
...
...
src/pages/wxPay/index.vue
View file @
d0efeaee
...
@@ -158,9 +158,11 @@ export default {
...
@@ -158,9 +158,11 @@ export default {
}
}
// sso场景(跳转第三方url)
// sso场景(跳转第三方url)
if
(
_this
.
scene
==
"sso"
)
{
if
(
_this
.
scene
==
"sso"
)
{
wx
.
redirectTo
({
setTimeout
(()
=>
{
url
:
`../wxArticle/main?from=sso&link=
${
_this
.
backUrl
}
`
,
wx
.
redirectTo
({
});
url
:
`../wxArticle/main?from=sso&link=
${
_this
.
backUrl
}
`
,
});
},
500
);
return
;
return
;
}
}
...
...
static/nativeComponents/GoodsList/index.js
View file @
d0efeaee
...
@@ -351,9 +351,9 @@ const componentOptions = {
...
@@ -351,9 +351,9 @@ const componentOptions = {
let
linkVal
=
""
;
let
linkVal
=
""
;
if
(
goodsType
!=
1
)
{
if
(
goodsType
!=
1
)
{
if
(
style
==
"list"
)
{
if
(
style
==
"list"
)
{
linkVal
=
`/goods
Search/goodsSearch
?categoryName=
${
categoryName
}
&categoryId=
${
categoryId
}
`
;
linkVal
=
`/goods
/commodityMenu
?categoryName=
${
categoryName
}
&categoryId=
${
categoryId
}
`
;
}
else
{
}
else
{
linkVal
=
`/goods
Search/goodsSearch
`
;
linkVal
=
`/goods
/commodityMenu
`
;
}
}
}
else
{
}
else
{
linkVal
=
`/pointShop/productList?categoryName=
${
categoryName
}
&categoryId=
${
categoryId
}
`
;
linkVal
=
`/pointShop/productList?categoryName=
${
categoryName
}
&categoryId=
${
categoryId
}
`
;
...
...
static/nativeComponents/GoodsList/index.wxml
View file @
d0efeaee
<!-- 商品列表组件 -->
<!-- 商品列表组件 -->
<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="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="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="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="left flex">
<view class="img" wx:if="{{titleIcon}}">
<view class="img" wx:if="{{titleIcon}}">
<image mode="widthFix" src="{{titleIcon}}" />
<image mode="widthFix" src="{{titleIcon}}" />
</view>
</view>
<view class="title">{{datas.componentData['titles']}}</view>
<view class="title">{{datas.componentData['titles']}}</view>
</view>
</view>
<view
<view
class="moreTop"
class="moreTop"
bindtap="viewMore"
bindtap="viewMore"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='top' && datas.componentData['goodsSource']!='assign'}}"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='top' && datas.componentData['goodsSource']!='assign'}}"
>
>
查看更多
查看更多
<text class="jt"></text>
<text class="jt"></text>
</view>
</view>
</view>
</view>
<!-- 网格布局 -->
<!-- 网格布局 -->
<view
<view
wx:if="{{datas.componentData.style==='list'}}"
wx:if="{{datas.componentData.style==='list'}}"
class="goodsItem-list flex"
class="goodsItem-list flex"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
>
>
<view
<view
wx:for="{{goodsList}}"
wx:for="{{goodsList}}"
wx:key="index"
wx:key="index"
class="goods-item"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
>
>
<goods-item
<goods-item
datas="{{datas}}"
datas="{{datas}}"
items="{{goodsList[index]}}"
items="{{goodsList[index]}}"
indexs="{{index}}"
indexs="{{index}}"
></goods-item>
></goods-item>
</view>
</view>
</view>
</view>
<!-- 横向滚动 -->
<!-- 横向滚动 -->
<view class="goods-across" wx:elif="{{datas.componentData.style==='across'}}">
<view class="goods-across" wx:elif="{{datas.componentData.style==='across'}}">
<view class="prev-btn">
<view class="prev-btn">
<text class="iconfont-common common-iconyoujiantou"></text>
<text class="iconfont-common common-iconyoujiantou"></text>
</view>
</view>
<view class="next-btn">
<view class="next-btn">
<text class="iconfont-common common-iconyoujiantou"></text>
<text class="iconfont-common common-iconyoujiantou"></text>
</view>
</view>
<view
<view
wx:for="{{datas.componentData.goodsList}}"
wx:for="{{datas.componentData.goodsList}}"
wx:key="index"
wx:key="index"
class="goods-item"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;margin-right:{{datas.componentData.proGap*2}}rpx"
style="width:{{100/datas.componentData.columnNum}}%;margin-right:{{datas.componentData.proGap*2}}rpx"
>
>
<goods-item
<goods-item
datas="{{datas}}"
datas="{{datas}}"
items="{{datas.componentData.goodsList[index]}}"
items="{{datas.componentData.goodsList[index]}}"
indexs="{{index}}"
indexs="{{index}}"
></goods-item>
></goods-item>
</view>
</view>
</view>
</view>
<!-- 瀑布流 -->
<!-- 瀑布流 -->
<view wx:if="{{datas.componentData.style==='waterfall'}}">
<view wx:if="{{datas.componentData.style==='waterfall'}}">
<waterfall-flow
<waterfall-flow
generic:defaultCom="goods-item"
generic:defaultCom="goods-item"
id="waterfallFlow"
id="waterfallFlow"
note="{{datas.componentData.goodsList}}"
note="{{datas.componentData.goodsList}}"
datas="{{datas}}"
datas="{{datas}}"
padding="{{datas.componentData.proGap}}"
padding="{{datas.componentData.proGap}}"
wx:if="{{datas.componentData.goodsList}}"
wx:if="{{datas.componentData.goodsList}}"
bindonLoad="onLoad"
bindonLoad="onLoad"
loading="{{loading}}"
loading="{{loading}}"
finished="{{finished}}"
finished="{{finished}}"
></waterfall-flow>
></waterfall-flow>
</view>
</view>
<!-- 横向列表 -->
<!-- 横向列表 -->
<view
<view
class="goods goods-rowList"
class="goods goods-rowList"
wx:elif="{{datas.componentData.style==='rowList'}}"
wx:elif="{{datas.componentData.style==='rowList'}}"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
>
>
<view
<view
wx:for="{{datas.componentData.goodsList}}"
wx:for="{{datas.componentData.goodsList}}"
wx:key="index"
wx:key="index"
class="goods-item"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
>
>
<goods-item
<goods-item
datas="{{datas}}"
datas="{{datas}}"
items="{{datas.componentData.
goodsList[index]}}"
items="{{
goodsList[index]}}"
indexs="{{index}}"
indexs="{{index}}"
></goods-item>
></goods-item>
</view>
</view>
</view>
</view>
<!-- 堆叠卡片 -->
<!-- 堆叠卡片 -->
<view class="goods-heap-Item" wx:if="{{datas.componentData.style==='heap'}}">
<view class="goods-heap-Item" wx:if="{{datas.componentData.style==='heap'}}">
<heap-item datas="{{datas}}"></heap-item>
<heap-item datas="{{datas}}"></heap-item>
</view>
</view>
<view
<view
class="moreBottom"
class="moreBottom"
bindtap="viewMore"
bindtap="viewMore"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='bottom' && datas.componentData['goodsSource']!='assign'}}"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='bottom' && datas.componentData['goodsSource']!='assign'}}"
>
>
查看更多
查看更多
<text class="jt"></text>
<text class="jt"></text>
</view>
</view>
</view>
</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