Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
12fa9e8d
Commit
12fa9e8d
authored
Jun 01, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
33c72a74
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
552 additions
and
116 deletions
+552
-116
categoryTab.js
src/component/categoryTab/categoryTab.js
+202
-41
categoryTab.wxml
src/component/categoryTab/categoryTab.wxml
+7
-11
categoryTab.wxss
src/component/categoryTab/categoryTab.wxss
+2
-0
index.js
src/config/index.js
+2
-2
my.js
src/pages/my/my.js
+100
-1
my.json
src/pages/my/my.json
+1
-0
my.wxml
src/pages/my/my.wxml
+16
-7
userCenter.js
src/pages/userCenter/userCenter.js
+49
-15
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+14
-12
project.config.json
src/project.config.json
+5
-5
categoryPro.js
src/subPackage/page/pages/categoryPro/categoryPro.js
+39
-12
subPage.js
src/subPackage/page/pages/subPage/subPage.js
+98
-3
subPage.json
src/subPackage/page/pages/subPage/subPage.json
+1
-0
subPage.wxml
src/subPackage/page/pages/subPage/subPage.wxml
+16
-7
No files found.
src/component/categoryTab/categoryTab.js
View file @
12fa9e8d
...
@@ -4,7 +4,7 @@ const wxService = require('../../utils/wxService')
...
@@ -4,7 +4,7 @@ const wxService = require('../../utils/wxService')
const
utils
=
require
(
'../../utils/util'
)
const
utils
=
require
(
'../../utils/util'
)
const
utilLink
=
require
(
'../../utils/currentLinkRouter'
)
const
utilLink
=
require
(
'../../utils/currentLinkRouter'
)
const
envInfo
=
require
(
'../../config/index'
).
envInfo
const
envInfo
=
require
(
'../../config/index'
).
envInfo
let
defaultImg
=
'https://img3.bigaka.com/prd/3001/202003/20200331/30019aa78220-546f-41e0-8075-c2feb69e10b8.jpg'
;
Component
({
Component
({
/**
/**
* 组件的属性列表
* 组件的属性列表
...
@@ -29,57 +29,54 @@ Component({
...
@@ -29,57 +29,54 @@ Component({
},
},
observers
:{
observers
:{
categoryTabFixed
(
val
){},
categoryTabFixed
(
val
){},
categoryTab
(
val
){
console
.
log
(
this
.
data
)
}
},
},
attached
()
{
attached
()
{
const
{
categoryTab
}
=
this
.
data
// const { categoryTab } = this.data;
let
categoryTab
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
categoryTab
));
let
currentTab
=
categoryTab
&&
categoryTab
.
categorys
||
[]
let
currentTab
=
categoryTab
&&
categoryTab
.
categorys
||
[]
currentTab
.
forEach
(
item
=>
{
currentTab
.
forEach
(
item
=>
{
// 存在 row 处理数据 8 商品 9 分类
if
(
typeof
item
.
row
===
'string'
){
let
newRow
=
null
item
.
row
=
JSON
.
parse
(
item
.
row
);
if
(
item
.
link
)
{
if
(
item
.
link
.
type
==
2
)
{
// 父组件 更新
const
urls
=
getCurrentPages
()
const
currentPath
=
urls
[
0
]
const
pageId
=
item
.
link
.
url
item
.
link
.
newPath
=
`/
${
currentPath
.
route
}
`
}
return
}
else
if
(
item
.
row
)
{
newRow
=
JSON
.
parse
(
item
.
row
)
if
(
newRow
.
type
==
8
)
{
newRow
.
newPath
=
'/pages/productDetail/productDetail'
}
else
if
(
newRow
.
type
==
9
)
{
newRow
.
newPath
=
'/subPackage/page/pages/categoryPro/categoryPro'
}
item
.
row
=
newRow
}
}
})
// 当前匹配路径是否需要授权 true 需要 false 不需要
item
.
value
=
item
.
row
?
item
.
row
.
url
:
''
;
currentTab
.
forEach
(
item
=>
{
item
.
rowType
=
item
.
row
?
item
.
row
.
type
:
11
;
let
checkUrl
=
''
item
.
actived
=
false
;
if
(
item
.
link
)
{
});
checkUrl
=
item
.
link
.
newPath
?
item
.
link
.
newPath
:
item
.
link
.
url
}
else
if
(
item
.
row
)
{
if
(
currentTab
.
length
!=
0
){
checkUrl
=
item
.
row
.
newPath
?
item
.
row
.
newPath
:
item
.
row
.
url
this
.
data
.
currentCategoryTabId
=
currentTab
[
0
].
value
;
}
this
.
data
.
currentCategoryRowType
=
currentTab
[
0
].
rowType
;
wxService
.
NoLoginPage
(
checkUrl
).
then
(
res
=>
{
currentTab
[
0
].
actived
=
true
;
if
(
checkUrl
)
item
.
needAuth
=
res
.
needAuth
}
this
.
setData
({
categoryList
:
currentTab
})
})
this
.
setData
({
})
currentCategoryTab
:
categoryTab
,
});
//调用获取数据接口
this
.
data
.
pageNo
=
1
;
this
.
data
.
totalPage
=
0
;
this
.
data
.
proData
=
[];
this
.
getTagProducts
();
},
},
/**
/**
* 组件的初始数据
* 组件的初始数据
*/
*/
data
:
{
data
:
{
// currentTab: 0,
// currentTab: 0,
currentTab
:
99
,
currentCategoryTabId
:
''
,
currentCategoryRowType
:
10
,
//默认10
linkType
:
''
,
isAuthorization
:
false
,
// false 不显示 true 显示
isAuthorization
:
false
,
// false 不显示 true 显示
categoryList
:
[],
currentCategoryTab
:
{},
proData
:
[{
"productId"
:
"713097736978829312"
,
"brandId"
:
"1002"
,
"productName"
:
"连体衣工装服九分裤套装阔腿两件套洋气男装一套搭配帅气痞帅春季"
,
"subtitle"
:
"连体衣工装服九分裤套装阔腿两件套洋气男装一套搭配帅气痞帅春季"
,
"brandName"
:
"舞象云"
,
"productCode"
:
"N100000002"
,
"productStatus"
:
2
,
"productStatusDesc"
:
"上架"
,
"productSku"
:[{
"skuId"
:
"713097736987217920"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000002S"
,
"stock"
:
3000
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/10020e85e297-8406-4cb3-9928-9026b5f708ce.jpg"
,
"specValue"
:
"619553340640202752###713097322363621376"
},{
"skuId"
:
"713097736987217921"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000002M"
,
"stock"
:
3000
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/10022d68e624-3980-4e12-98e8-ed940dd574d3.jpg"
,
"specValue"
:
"619553340640202752###713097343280484352"
},{
"skuId"
:
"713097736987217922"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000002L"
,
"stock"
:
0
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002c538ed30-0ab3-470f-8ea7-29dc34edb82b.jpg"
,
"specValue"
:
"619553340640202752###713097370799443968"
,
"activityPrice"
:
200
,
"activityId"
:
"713766939025084416"
},{
"skuId"
:
"713097736987217923"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000003S"
,
"stock"
:
2
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/10021b4b197d-cb59-4bab-8874-d44ad0e17fd3.jpg"
,
"specValue"
:
"621298810911592448###713097322363621376"
,
"activityPrice"
:
250
,
"activityId"
:
"713766939025084416"
},{
"skuId"
:
"713097736987217924"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000003M"
,
"stock"
:
2999
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002181efa14-d8aa-41dc-8ce8-3d6a35e1a9a8.jpg"
,
"specValue"
:
"621298810911592448###713097343280484352"
},{
"skuId"
:
"713097736987217925"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000003L"
,
"stock"
:
3000
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002a1e19aad-41ff-4a0b-8863-5d2aa4e76243.jpg"
,
"specValue"
:
"621298810911592448###713097370799443968"
},{
"skuId"
:
"713097736987217926"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000004S"
,
"stock"
:
3000
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002039ac693-ba64-4a96-a45b-eec8301529f2.jpg"
,
"specValue"
:
"713097244907409408###713097322363621376"
},{
"skuId"
:
"713097736987217927"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000004M"
,
"stock"
:
3000
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002b506d83f-8886-412f-bf19-b4e957a874b5.jpg"
,
"specValue"
:
"713097244907409408###713097343280484352"
},{
"skuId"
:
"713097736987217928"
,
"brandId"
:
"1002"
,
"productId"
:
"713097736978829312"
,
"skuCode"
:
"N100000004L"
,
"stock"
:
3000
,
"salePrice"
:
11800
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002b506d83f-8886-412f-bf19-b4e957a874b5.jpg"
,
"specValue"
:
"713097244907409408###713097370799443968"
}],
"minSalePrice"
:
11800
,
"maxSalePrice"
:
11800
,
"productType"
:
1
,
"remark"
:
"连体衣工装服九分裤套装阔腿两件套洋气男装一套搭配帅气痞帅春季"
,
"isLimit"
:
0
,
"limitType"
:
1
,
"indexUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002b506d83f-8886-412f-bf19-b4e957a874b5.jpg"
,
"descHtml"
:
"<p><img src=
\"
https://img3.bigaka.com/test/1002/202005/20200521/10022db4c7ac-c9d7-43df-a201-0c3f22cf9d0f.jpg
\"
><img src=
\"
https://img3.bigaka.com/test/1002/202005/20200521/1002f5118ed5-9026-4c6e-9520-0a5c139d5859.jpg
\"
><img src=
\"
https://img3.bigaka.com/test/1002/202005/20200521/1002d707a521-ba22-4b93-b108-9018a6880882.jpg
\"
><img src=
\"
https://img3.bigaka.com/test/1002/202005/20200521/100218c3a1a7-f5a1-44c3-aa02-75a4eddb7708.jpg
\"
></p>"
,
"stock"
:
21001
,
"sort"
:
100
,
"saleNum"
:
3
,
"isFlashSale"
:
true
,
"minActivityPrice"
:
200
,
"activityResidueStock"
:
0
,
"createTime"
:
"2020-05-21 18:35:49"
,
"updateTime"
:
"2020-05-23 16:08:48"
},{
"productId"
:
"713096039405588480"
,
"brandId"
:
"1002"
,
"productName"
:
"夏季薄款冰丝九分裤男潮牌束脚修身小脚裤网红抖音潮流宽松裤子男"
,
"subtitle"
:
"夏季薄款冰丝九分裤男潮牌束脚修身小脚裤网红抖音潮流宽松裤子男"
,
"brandName"
:
"舞象云"
,
"productCode"
:
"N1000001"
,
"productStatus"
:
2
,
"productStatusDesc"
:
"上架"
,
"productSku"
:[{
"skuId"
:
"713096039418171392"
,
"brandId"
:
"1002"
,
"productId"
:
"713096039405588480"
,
"skuCode"
:
"N1000000001"
,
"stock"
:
2000
,
"salePrice"
:
100
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002a1d219a9-5570-40ad-a9f2-0d26bf5a6695.jpg"
,
"specValue"
:
"619893244213596160###619553314006372352"
,
"activityPrice"
:
100
,
"activityId"
:
"714555275071328256"
},{
"skuId"
:
"713096039418171393"
,
"brandId"
:
"1002"
,
"productId"
:
"713096039405588480"
,
"skuCode"
:
"N1000000002"
,
"stock"
:
2000
,
"salePrice"
:
200
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/100201859271-3a5e-457f-8650-0dd970b52898.jpg"
,
"specValue"
:
"619893244213596160###681942404550496256"
,
"activityPrice"
:
200
,
"activityId"
:
"714555275071328256"
},{
"skuId"
:
"713096039418171394"
,
"brandId"
:
"1002"
,
"productId"
:
"713096039405588480"
,
"skuCode"
:
"N1000000003"
,
"stock"
:
2000
,
"salePrice"
:
300
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/10023b2554b8-78f2-407d-b7f3-0290608f65d7.jpg"
,
"specValue"
:
"713095793946529792###619553314006372352"
,
"activityPrice"
:
300
,
"activityId"
:
"714555275071328256"
},{
"skuId"
:
"713096039418171395"
,
"brandId"
:
"1002"
,
"productId"
:
"713096039405588480"
,
"skuCode"
:
"N1000000004"
,
"stock"
:
2000
,
"salePrice"
:
400
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/10020ee17287-187f-4c62-b7ff-70319321df60.jpg"
,
"specValue"
:
"713095793946529792###681942404550496256"
,
"activityPrice"
:
400
,
"activityId"
:
"714555275071328256"
}],
"minSalePrice"
:
5990
,
"maxSalePrice"
:
5990
,
"productType"
:
1
,
"remark"
:
"夏季薄款冰丝九分裤男潮牌束脚修身小脚裤网红抖音潮流宽松裤子男"
,
"isLimit"
:
0
,
"limitType"
:
1
,
"indexUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/10026663f868-1010-406d-b136-7b0971b80aef.jpg"
,
"descHtml"
:
"<p><img src=
\"
https://img3.bigaka.com/test/1002/202005/20200521/1002970101f4-9fd9-42a3-9703-ad955288f0c4.jpg
\"
><img src=
\"
https://img3.bigaka.com/test/1002/202005/20200521/1002f18be110-a95f-4239-9b6d-4f6a745eab5d.jpg
\"
><img src=
\"
https://img3.bigaka.com/test/1002/202005/20200521/1002b4fbfab6-e2ce-48a2-a163-cf29e6f2213a.jpg
\"
></p>"
,
"stock"
:
8000
,
"sort"
:
0
,
"saleNum"
:
0
,
"isFlashSale"
:
true
,
"minActivityPrice"
:
100
,
"activityResidueStock"
:
0
,
"createTime"
:
"2020-05-21 18:29:04"
,
"updateTime"
:
"2020-05-21 18:29:04"
},{
"productId"
:
"692321154874216448"
,
"brandId"
:
"1002"
,
"productName"
:
"燃油三轮车【高速低速切换】"
,
"subtitle"
:
"燃油三轮车【高速低速切换】"
,
"brandName"
:
"舞象云"
,
"productCode"
:
"SLC20200325"
,
"productStatus"
:
2
,
"productStatusDesc"
:
"上架"
,
"productSku"
:[{
"skuId"
:
"692321154882605056"
,
"brandId"
:
"1002"
,
"productId"
:
"692321154874216448"
,
"skuCode"
:
"SLCRED1001"
,
"stock"
:
999
,
"salePrice"
:
344900
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg"
,
"specValue"
:
"619553297388408832###692320753231859712"
},{
"skuId"
:
"692321154882605057"
,
"brandId"
:
"1002"
,
"productId"
:
"692321154874216448"
,
"skuCode"
:
"SLCRED1002"
,
"stock"
:
998
,
"salePrice"
:
529900
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg"
,
"specValue"
:
"619553297388408832###692320794210078720"
},{
"skuId"
:
"692321154882605058"
,
"brandId"
:
"1002"
,
"productId"
:
"692321154874216448"
,
"skuCode"
:
"SLCYEL1001"
,
"stock"
:
993
,
"salePrice"
:
344900
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg"
,
"specValue"
:
"621298810911592448###692320753231859712"
},{
"skuId"
:
"692321154882605059"
,
"brandId"
:
"1002"
,
"productId"
:
"692321154874216448"
,
"skuCode"
:
"SLCYEL1002"
,
"stock"
:
999
,
"salePrice"
:
529900
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg"
,
"specValue"
:
"621298810911592448###692320794210078720"
},{
"skuId"
:
"692321154882605060"
,
"brandId"
:
"1002"
,
"productId"
:
"692321154874216448"
,
"skuCode"
:
"SLCGRE1001"
,
"stock"
:
1000
,
"salePrice"
:
344900
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg"
,
"specValue"
:
"619553340640202752###692320753231859712"
},{
"skuId"
:
"692321154882605061"
,
"brandId"
:
"1002"
,
"productId"
:
"692321154874216448"
,
"skuCode"
:
"SLCGRE1002"
,
"stock"
:
997
,
"salePrice"
:
529900
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg"
,
"specValue"
:
"619553340640202752###692320794210078720"
}],
"minSalePrice"
:
344900
,
"maxSalePrice"
:
529900
,
"productType"
:
1
,
"remark"
:
"燃油三轮车【高速低速切换】燃油三轮车【高速低速切换】燃油三轮车【高速低速切换】"
,
"isLimit"
:
0
,
"limitType"
:
1
,
"indexUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg"
,
"descHtml"
:
"<p><img src=
\"
https://img3.bigaka.com/test/1002/202003/20200325/1002dcdf0a46-ae3f-409f-8860-ce9a7ae429f2.jpg
\"
><img src=
\"
https://img3.bigaka.com/test/1002/202003/20200325/1002f338322d-fd7b-4917-854a-37c5aa6585c6.jpg
\"
></p>"
,
"stock"
:
5986
,
"sort"
:
0
,
"saleNum"
:
0
,
"isFlashSale"
:
false
,
"activityResidueStock"
:
0
,
"createTime"
:
"2020-03-25 10:37:06"
,
"updateTime"
:
"2020-03-25 10:37:06"
,
"markTagInfo"
:{
"tagPicUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002a564efe1-d21c-4d93-81ad-0f1953327b64.png"
,
"tagType"
:
2
,
"assignPrice"
:
99990
,
"tagName"
:
"左下角显示当前金额"
}},{
"productId"
:
"684048655845691392"
,
"brandId"
:
"1002"
,
"productName"
:
"男鞋潮时尚流行"
,
"subtitle"
:
"男鞋潮时尚流行"
,
"brandName"
:
"舞象云"
,
"productCode"
:
"nan100020101"
,
"productStatus"
:
2
,
"productStatusDesc"
:
"上架"
,
"productSku"
:[{
"skuId"
:
"685426180995944448"
,
"brandId"
:
"1002"
,
"productId"
:
"684048655845691392"
,
"skuCode"
:
"b5252525"
,
"stock"
:
98
,
"salePrice"
:
58
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200302/10024c105cb4-d05a-4064-b291-9c8866c027cd.jpg"
,
"specValue"
:
"619893244213596160###619553314006372352"
},{
"skuId"
:
"685426180995944449"
,
"brandId"
:
"1002"
,
"productId"
:
"684048655845691392"
,
"skuCode"
:
"h5252524"
,
"stock"
:
78
,
"salePrice"
:
58
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200302/10024c105cb4-d05a-4064-b291-9c8866c027cd.jpg"
,
"specValue"
:
"619893244213596160###619553297388408832"
}],
"minSalePrice"
:
58
,
"maxSalePrice"
:
58
,
"productType"
:
1
,
"remark"
:
"中大奖哇卡进到你加圣诞节卡萨丁按时打算打算"
,
"isLimit"
:
0
,
"limitType"
:
1
,
"indexUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200302/10024c105cb4-d05a-4064-b291-9c8866c027cd.jpg"
,
"descHtml"
:
"<p><img src=
\"
https://img3.bigaka.com/test/1002/202003/20200302/1002b6479915-093d-4f49-8c37-18411eb6502f.jpg
\"
></p><p><img src=
\"
https://img3.bigaka.com/test/1002/202003/20200302/10028eaa8531-3bab-410e-9151-dcece3b4a390.jpg
\"
></p>"
,
"stock"
:
176
,
"sort"
:
0
,
"saleNum"
:
8
,
"isFlashSale"
:
false
,
"activityResidueStock"
:
0
,
"createTime"
:
"2020-03-02 14:45:09"
,
"updateTime"
:
"2020-05-08 19:17:03"
,
"markTagInfo"
:{
"tagPicUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002b092f1c2-3c92-4acd-9703-0cfa7f2792b2.png"
,
"tagType"
:
1
,
"assignPrice"
:
1880
,
"tagName"
:
"固定样式营销标签"
}},{
"productId"
:
"684047015461785600"
,
"brandId"
:
"1002"
,
"productName"
:
"测试商品鞋子"
,
"subtitle"
:
"测试商品鞋子"
,
"brandName"
:
"舞象云"
,
"productCode"
:
"test100101012"
,
"productStatus"
:
2
,
"productStatusDesc"
:
"上架"
,
"productSku"
:[{
"skuId"
:
"688698094942162944"
,
"brandId"
:
"1002"
,
"productId"
:
"684047015461785600"
,
"skuCode"
:
"b10010101"
,
"stock"
:
9947
,
"salePrice"
:
100
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg"
,
"specValue"
:
"619893244213596160###621369403400916992"
},{
"skuId"
:
"688698094942162945"
,
"brandId"
:
"1002"
,
"productId"
:
"684047015461785600"
,
"skuCode"
:
"h10010101"
,
"stock"
:
9985
,
"salePrice"
:
10
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg"
,
"specValue"
:
"619893244213596160###621369454760300544"
}],
"minSalePrice"
:
10
,
"maxSalePrice"
:
100
,
"productType"
:
1
,
"remark"
:
"这是上陡坡【发到你的空间的阿萨德阿萨德阿萨德按时大大是"
,
"isLimit"
:
0
,
"limitType"
:
1
,
"indexUrl"
:
"https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg"
,
"descHtml"
:
"<p><img src=
\"
https://img3.bigaka.com/test/1002/202003/20200302/1002bc90892a-6339-4554-ab19-9aad3a4f4526.jpg
\"
></p><video class=
\"
ql-video
\"
controls=
\"
controls
\"
type=
\"
video/mp4
\"
src=
\"
https://img3.bigaka.com/test/1002/202003/20200315/100265c9b883-58c5-42e4-b97e-6c58b3b89de9.mp4
\"
></video><p><br></p><p><img src=
\"
https://img3.bigaka.com/test/1002/202003/20200302/1002b1f2d13b-d149-4977-81dd-bd1e12af4718.jpg
\"
></p>"
,
"stock"
:
19932
,
"sort"
:
0
,
"saleNum"
:
53
,
"isFlashSale"
:
false
,
"activityResidueStock"
:
0
,
"createTime"
:
"2020-03-02 14:38:37"
,
"updateTime"
:
"2020-05-09 14:18:09"
,
"markTagInfo"
:{
"tagPicUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002b092f1c2-3c92-4acd-9703-0cfa7f2792b2.png"
,
"tagType"
:
1
,
"assignPrice"
:
1850
,
"tagName"
:
"固定样式营销标签"
}},{
"productId"
:
"647096699302580224"
,
"brandId"
:
"1002"
,
"productName"
:
"夫妻肺片"
,
"subtitle"
:
"夫妻肺片"
,
"brandName"
:
"舞象"
,
"productCode"
:
"WXFQFP"
,
"productStatus"
:
2
,
"productStatusDesc"
:
"上架"
,
"productSku"
:[{
"skuId"
:
"684048047436599296"
,
"brandId"
:
"1002"
,
"productId"
:
"647096699302580224"
,
"skuCode"
:
"w10000"
,
"stock"
:
189
,
"salePrice"
:
1
,
"picUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/10023c0bd56b-b440-4eb1-92a4-6cefacbbaf4a.jpg"
,
"specValue"
:
"1556091435012008"
}],
"minSalePrice"
:
1
,
"maxSalePrice"
:
1
,
"productType"
:
1
,
"remark"
:
"这个是备注"
,
"isLimit"
:
0
,
"limitType"
:
1
,
"indexUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/10023c0bd56b-b440-4eb1-92a4-6cefacbbaf4a.jpg"
,
"descHtml"
:
"<p>夫妻肺片 <span style=
\"
background-color: rgb(255, 255, 255); color: rgb(102, 102, 102);
\"
>编辑</span> <a href=
\"
https://baike.baidu.com/planet/talk?lemmaId=120778
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
background-color: rgb(255, 255, 255); color: rgb(102, 102, 102);
\"
>讨论</a></p><p><a href=
\"
https://baike.baidu.com/planet/talk?lemmaId=120778
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(255, 255, 255); background-color: rgb(243, 79, 29);
\"
>64</a></p><p>夫妻肺片<em>(Sliced beef and ox organs in chili sauce)</em><span style=
\"
color: rgb(51, 102, 204);
\"
> [1]</span><span style=
\"
color: rgb(19, 110, 194);
\"
> </span> <em>,</em>是一道四川<a href=
\"
https://baike.baidu.com/item/%E6%88%90%E9%83%BD/128473
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>成都</a>名菜,由郭朝华、张田政夫妻创制而成。通常以牛头皮、<a href=
\"
https://baike.baidu.com/item/%E7%89%9B%E5%BF%83/7175624
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>牛心</a>、<a href=
\"
https://baike.baidu.com/item/%E7%89%9B%E8%88%8C/9754964
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>牛舌</a>、<a href=
\"
https://baike.baidu.com/item/%E7%89%9B%E8%82%9A/4101516
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>牛肚</a>、<a href=
\"
https://baike.baidu.com/item/%E7%89%9B%E8%82%89/1008026
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>牛肉</a>为主料,进行卤制,而后切片。再配以<a href=
\"
https://baike.baidu.com/item/%E8%BE%A3%E6%A4%92%E6%B2%B9/5328179
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>辣椒油</a>、<a href=
\"
https://baike.baidu.com/item/%E8%8A%B1%E6%A4%92%E9%9D%A2/7241289
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>花椒面</a>等辅料制成红油浇在上面。其制作精细,色泽美观,质嫩味鲜,麻辣浓香,非常适口。</p><p>2017年5月,美国《GQ》杂志发布了餐饮品赏大师BrettMartin最新出炉的“美国2017餐饮排行榜”,位于休斯敦的PepperTwins双椒川菜馆的招牌凉菜“夫妻肺片”荣登榜首,被评选为“年度开胃菜”(Appetizer of the Year)。这道菜的英文名被翻译成“史密斯夫妇”(Mr and Mrs Smith)。</p><p>2018年9月10日,“中国菜”正式发布,“夫妻肺片“被评为“中国菜”四川十大经典名菜。<span style=
\"
color: rgb(51, 102, 204);
\"
> [2]</span></p><h2>菜品历史</h2><p><span style=
\"
background-color: rgb(255, 255, 255); color: rgb(136, 136, 136);
\"
>编辑</span></p><p><a href=
\"
https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/0/4b90f603738da977e9ee9ac8be51f8198718e314?fr=lemma&ct=single
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
><img src=
\"
https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign=cb2984bdd3c451daf2f60be986ff52a5/4b90f603738da977e9ee9ac8be51f8198718e314.jpg
\"
alt=
\"
夫妻肺片
\"
></a></p><p><span style=
\"
color: rgb(85, 85, 85);
\"
>夫妻肺片</span></p><p><a href=
\"
https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/0/0823dd54564e925809ac77479482d158cdbf4efb?fr=lemma&ct=single
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
><img src=
\"
https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign=e9080f767e094b36df921cef93cd7c00/0823dd54564e925809ac77479482d158cdbf4efb.jpg
\"
></a></p><p>相传,清朝末年,<a href=
\"
https://baike.baidu.com/item/%E6%88%90%E9%83%BD/128473
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>成都</a>街头巷尾有许多挑担、提篮叫卖凉拌肺片的小贩。用成本低廉的牛杂碎边角料,经清洗、卤煮后切片,佐以酱油、红油、辣椒、花椒面、芝麻面等拌食,风味别致,价廉物美,特别受到拉黄包车、脚夫和穷苦学生们的喜食。</p><p><br></p><p><a href=
\"
https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/21865004/3ac79f3df8dcd100c760f129788b4710b9122f3d?fr=lemma&ct=cover
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
><img src=
\"
https://gss1.bdstatic.com/-vo3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign=8e1f88b7865494ee8322081b1df4e0e1/3ac79f3df8dcd100c760f129788b4710b9122f3d.jpg
\"
alt=
\"
夫妻肺片
\"
></a></p><p><a href=
\"
https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/21865004/3ac79f3df8dcd100c760f129788b4710b9122f3d?fr=lemma&ct=cover
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>夫妻肺片</a><a href=
\"
https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/21865004/3ac79f3df8dcd100c760f129788b4710b9122f3d?fr=lemma&ct=cover
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: gray;
\"
>(6张)</a></p><p><br></p><p>20世纪30年代,成都人郭朝华和妻子一道以制售<a href=
\"
https://baike.baidu.com/item/%E5%87%89%E6%8B%8C
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>凉拌</a>肺片为业,他们夫妻俩亲自操作,走街串巷,提篮叫卖。由于选用牛肉铺的边角料做食材,价格便宜、味道好,颇受欢迎。人们就将这种凉拌牛杂称为“夫妻废片”。因为“废片”二字不好听,再加上食材中有牛肺片,便取‘废’的谐音‘肺’,改名为“夫妻肺片”。后来,他们发现<a href=
\"
https://baike.baidu.com/item/%E7%89%9B%E8%82%BA/10861040
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>牛肺</a>的口感不好,便取消了牛肺。</p><p>1933年,郭氏夫妇在成都半边桥附近(今<a href=
\"
https://baike.baidu.com/item/%E4%BA%BA%E6%B0%91%E5%85%AC%E5%9B%AD/8819436
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>人民公园</a>后门右侧)设店出售,店名正式取名为“夫妻肺片”,牌匾为金字黑底,由书法家<a href=
\"
https://baike.baidu.com/item/%E8%B5%B5%E8%95%B4%E7%8E%89
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>赵蕴玉</a>亲题。后几经变迁,该店迁至闹市街的提督西街,扩大了经营规模,增添了牛肉面等品种,食客不光是可以品尝肺片,还有面食充饥。</p><p>中华人民共和国成立后,在<a href=
\"
https://baike.baidu.com/item/%E5%85%AC%E7%A7%81%E5%90%88%E8%90%A5
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
>公私合营</a>时期,郭氏夫妇的夫妻肺片店和其他传统的餐饮名店一样,并入国营单位。后经几代人努力,夫妻肺片已成为闻名中外的熟食外卖店品。</p><p><a href=
\"
https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/0/0dd7912397dda144a22209a8bfb7d0a20cf48684?fr=lemma&ct=single
\"
rel=
\"
noopener noreferrer
\"
target=
\"
_blank
\"
style=
\"
color: rgb(19, 110, 194);
\"
><img src=
\"
https://gss3.bdstatic.com/7Po3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign=2fb2160904f79052eb1f403c3cf3d738/0dd7912397dda144a22209a8bfb7d0a20cf48684.jpg
\"
></a></p>"
,
"stock"
:
189
,
"sort"
:
0
,
"saleNum"
:
102
,
"isFlashSale"
:
false
,
"activityResidueStock"
:
0
,
"createTime"
:
"2019-11-21 15:31:16"
,
"updateTime"
:
"2020-05-21 18:23:30"
,
"markTagInfo"
:{
"tagPicUrl"
:
"https://img3.bigaka.com/test/1002/202005/20200521/1002b092f1c2-3c92-4acd-9703-0cfa7f2792b2.png"
,
"tagType"
:
1
,
"assignPrice"
:
5600
,
"tagName"
:
"固定样式营销标签"
}}]
proData
:
[],
pageNo
:
1
,
pageSize
:
10
,
totalPage
:
0
,
},
},
/*组件所在页面的生命周期 */
/*组件所在页面的生命周期 */
pageLifetimes
:
{
pageLifetimes
:
{
...
@@ -103,9 +100,173 @@ Component({
...
@@ -103,9 +100,173 @@ Component({
methods
:
{
methods
:
{
//获取标签下的商品列表
//获取标签下的商品列表
getTagProducts
(
e
){
getTagProducts
(
e
){
console
.
log
(
4564
)
//表示父组件触到底部了
console
.
log
(
e
)
if
(
e
==
'scrollBottom'
){
if
(
this
.
data
.
pageNo
<
this
.
data
.
totalPage
){
this
.
data
.
pageNo
++
;
//判断关联的是标签还是后端分类
if
(
this
.
data
.
currentCategoryRowType
==
10
){
//标签
this
.
getTagProductList
();
}
else
{
//分类
this
.
getCategoryProducts
();
}
}
else
{
//没有更多数据了 需要通知父组件更新其他组件状态
this
.
triggerEvent
(
'loadProductComplete'
,
'nomore'
);
}
}
else
{
this
.
data
.
pageNo
=
1
;
this
.
data
.
totalPage
=
0
;
//判断关联的是标签还是后端分类
if
(
this
.
data
.
currentCategoryRowType
==
10
){
//标签
this
.
getTagProductList
();
}
else
{
//标签
this
.
getCategoryProducts
();
}
}
},
//获取标签下的商品列表
getTagProductList
(){
let
pageNo
=
this
.
data
.
pageNo
,
pageSize
=
this
.
data
.
pageSize
;
let
url
=
`/sale/product/buyer/listPageByTagId?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
;
wxService
.
post
(
url
,{
mallCategoryId
:
null
,
categoryId
:
null
,
tagId
:
this
.
data
.
currentCategoryTabId
,
state
:
1
,
}).
then
(
res
=>
{
if
(
res
){
let
list
=
res
.
data
.
data
.
content
?
res
.
data
.
data
.
content
:
[];
this
.
data
.
totalPage
=
res
.
data
.
data
.
totalPages
;
list
.
forEach
(
item
=>
{
//营销标签类型 1固定样式 2左下角显示商品当前金额 3左下角显示指定数额
item
.
indexUrl
=
item
.
indexUrl
?
item
.
indexUrl
:
defaultImg
;
//处理商品身上的营销标签数据
item
.
hasPromotionTag
=
item
.
markTagInfo
?
true
:
false
;
let
tagPrice
=
item
.
minSalePrice
;
if
(
item
.
hasPromotionTag
){
item
.
tagPic
=
item
.
markTagInfo
.
tagPicUrl
;
if
(
item
.
markTagInfo
.
tagType
==
2
){
tagPrice
=
item
.
minSalePrice
;
}
else
{
tagPrice
=
item
.
markTagInfo
.
assignPrice
;
}
item
.
tagType
=
item
.
markTagInfo
.
tagType
;
}
//判断价格是否大于1000了
if
(
tagPrice
/
100
>
1000
){
tagPrice
=
parseFloat
(
tagPrice
/
10
/
10
).
toFixed
(
1
);
}
else
{
tagPrice
=
parseFloat
(
tagPrice
/
10
/
10
).
toFixed
(
2
);
}
item
.
tagPrice
=
tagPrice
;
});
this
.
data
.
proData
=
this
.
data
.
proData
.
concat
(
list
);
this
.
setData
({
proData
:
this
.
data
.
proData
});
}
})
},
//获取后端分类下的商品列表
getCategoryProducts
(){
let
pageNo
=
this
.
data
.
pageNo
,
pageSize
=
this
.
data
.
pageSize
;
let
url
=
`/sale/product/buyer/listPageByCategoryId?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
;
wxService
.
post
(
url
,
{
mallCategoryId
:
null
,
categoryId
:
this
.
data
.
currentCategoryTabId
,
tagId
:
null
,
state
:
1
,
}).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
&&
data
.
content
)
{
wx
.
hideLoading
()
let
list
=
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]
:
[...
this
.
data
.
proData
,
...
data
.
content
];
list
.
forEach
(
item
=>
{
//营销标签类型 1固定样式 2左下角显示商品当前金额 3左下角显示指定数额
item
.
indexUrl
=
item
.
indexUrl
?
item
.
indexUrl
:
defaultImg
;
//处理商品身上的营销标签数据
item
.
hasPromotionTag
=
item
.
markTagInfo
?
true
:
false
;
let
tagPrice
=
item
.
minSalePrice
;
if
(
item
.
hasPromotionTag
){
item
.
tagPic
=
item
.
markTagInfo
.
tagPicUrl
;
if
(
item
.
markTagInfo
.
tagType
==
2
){
tagPrice
=
item
.
minSalePrice
;
}
else
{
tagPrice
=
item
.
markTagInfo
.
assignPrice
;
}
item
.
tagType
=
item
.
markTagInfo
.
tagType
;
}
//判断价格是否大于1000了
if
(
tagPrice
/
100
>
1000
){
tagPrice
=
parseFloat
(
tagPrice
/
10
/
10
).
toFixed
(
1
);
}
else
{
tagPrice
=
parseFloat
(
tagPrice
/
10
/
10
).
toFixed
(
2
);
}
item
.
tagPrice
=
tagPrice
;
});
this
.
data
.
proData
=
this
.
data
.
proData
.
concat
(
list
);
this
.
data
.
totalPage
=
data
.
totalPages
;
this
.
setData
({
proData
:
this
.
data
.
proData
,
});
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
},
},
//切换分类
onTapChangeCategory
(
e
){
let
index
=
e
.
currentTarget
.
dataset
.
index
;
let
item
=
e
.
currentTarget
.
dataset
.
item
;
if
(
this
.
data
.
currentCategoryTabId
==
item
.
value
){
return
;
}
wx
.
showLoading
({
title
:
'加载中..'
,
})
this
.
data
.
currentCategoryTab
.
categorys
.
forEach
(
item
=>
{
item
.
actived
=
false
;
if
(
typeof
item
.
row
===
'string'
){
item
.
row
=
JSON
.
parse
(
item
.
row
);
item
.
rowType
=
item
.
row
.
type
;
item
.
value
=
item
.
row
.
url
;
}
});
this
.
data
.
currentCategoryTab
.
categorys
[
index
].
actived
=
true
;
this
.
data
.
currentCategoryTabId
=
this
.
data
.
currentCategoryTab
.
categorys
[
index
].
value
;
this
.
data
.
currentCategoryRowType
=
this
.
data
.
currentCategoryTab
.
categorys
[
index
].
rowType
;
this
.
setData
({
currentCategoryTab
:
this
.
data
.
currentCategoryTab
});
//调用获取数据接口
this
.
data
.
pageNo
=
1
;
this
.
data
.
totalPage
=
0
;
this
.
data
.
proData
=
[];
this
.
getTagProducts
();
// 切换分类了,是否需要把之前显示的布局显示出来
this
.
triggerEvent
(
'loadProductComplete'
,
'tabChange'
);
},
}
}
})
})
src/component/categoryTab/categoryTab.wxml
View file @
12fa9e8d
<!--component/tabSort/tabSort.wxml-->
<!--component/tabSort/tabSort.wxml-->
<view class="category-tab-container clear-box">
<view class="category-tab-container clear-box">
<view class="category-tab {{categoryTabFixed ? 'fixed' : ''}}">
<view class="category-tab {{categoryTabFixed ? 'fixed' : ''}}" wx:if="{{currentCategoryTab.categorys.length > 1}}">
<view class="scroll-view_H">
<view class="scroll-view_H" >
<view class="category-tab-item active">鞋子</view>
<view class="category-tab-item {{item.actived ? 'active' : ''}}"
<view class="category-tab-item">裤子</view>
wx:for="{{currentCategoryTab.categorys}}" wx:key="*this"
<view class="category-tab-item">帽子</view>
wx:for-index="idx" wx:for-item="item"
<view class="category-tab-item">衣服</view>
data-item="{{item}}" data-index="{{idx}}" bindtap="onTapChangeCategory">{{item.title}}</view>
<view class="category-tab-item">衣服</view>
<view class="category-tab-item">衣服</view>
<view class="category-tab-item">衣服</view>
<view class="category-tab-item">衣服</view>
</view>
</view>
</view>
</view>
<!-- 商品列表 -->
<!-- 商品列表 -->
<view class="product-list" wx:if="{{proData.length}}">
<view class="product-list" wx:if="{{proData.length}}"
style="padding-top: {{currentCategoryTab.categorys.length > 1 ? 0 : '1rpx'}};"
>
<product-list-style-one image-data="{{proData}}" />
<product-list-style-one image-data="{{proData}}" />
</view>
</view>
</view>
</view>
...
...
src/component/categoryTab/categoryTab.wxss
View file @
12fa9e8d
...
@@ -49,4 +49,5 @@
...
@@ -49,4 +49,5 @@
.category-tab-container .product-list{
.category-tab-container .product-list{
background: #ffffff;
background: #ffffff;
}
}
\ No newline at end of file
src/config/index.js
View file @
12fa9e8d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
// 修改 BRANCH_ID 为对应的商户id
// 修改 BRANCH_ID 为对应的商户id
// app.js 中brandId 修改为对应
// app.js 中brandId 修改为对应
const
PROJECT_ENV
=
'
test
'
// 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
const
PROJECT_ENV
=
'
dev
'
// 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
//仅生产环境时 配置 :
//仅生产环境时 配置 :
//3001 3001 , wx313ec36b710125d4 有直播
//3001 3001 , wx313ec36b710125d4 有直播
//2006 泰华 , wx40fec8944623c8b3 有直播 //门户 wx833d5ece112fc3fd
//2006 泰华 , wx40fec8944623c8b3 有直播 //门户 wx833d5ece112fc3fd
...
@@ -27,7 +27,7 @@ const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门
...
@@ -27,7 +27,7 @@ const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门
//2002 巴黎贝甜 wx21968cb3a486d4ab
//2002 巴黎贝甜 wx21968cb3a486d4ab
//2014 包小姐与鞋先生 wxa00302e2f53dd9c5
//2014 包小姐与鞋先生 wxa00302e2f53dd9c5
const
BRANCH_ID
=
100
2
const
BRANCH_ID
=
100
1
const
isMall
=
true
const
isMall
=
true
// const needMock = '' //
// const needMock = '' //
...
...
src/pages/my/my.js
View file @
12fa9e8d
...
@@ -35,6 +35,7 @@ wxService.page({
...
@@ -35,6 +35,7 @@ wxService.page({
contactUsModal
:
false
,
contactUsModal
:
false
,
//显示广告
//显示广告
pageInfo
:
null
,
pageInfo
:
null
,
categoryTabFixed
:
false
,
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
...
@@ -63,8 +64,84 @@ wxService.page({
...
@@ -63,8 +64,84 @@ wxService.page({
handlerDataOnPage
=
new
utils
.
HandlerDataOnPage
()
handlerDataOnPage
=
new
utils
.
HandlerDataOnPage
()
renderPage
=
require
(
'../../utils/renderPage'
).
getRenderPage
()
renderPage
=
require
(
'../../utils/renderPage'
).
getRenderPage
()
handlerDataOnPage
.
init
(
this
,
'pages'
)
handlerDataOnPage
.
init
(
this
,
'pages'
)
this
.
initPage
(
this
.
data
.
pageId
)
this
.
initPage
(
this
.
data
.
pageId
);
setTimeout
(()
=>
{
this
.
getElementTop
();
// categoryTab
},
500
);
},
// 页面滚动到底部
onReachBottom
(){
if
(
this
.
categoryTabComponent
){
this
.
categoryTabComponent
.
getTagProducts
(
'scrollBottom'
);
}
},
//页面滚动
onPageScroll
(
e
){
if
(
!
this
.
scrollTop
){
return
;
}
let
scrollTop
=
e
.
scrollTop
;
this
.
throttle
(
scoTop
=>
{
if
(
scoTop
>
this
.
scrollTop
){
this
.
data
.
categoryTabFixed
=
true
;
}
else
{
this
.
data
.
categoryTabFixed
=
false
;
}
this
.
setData
({
categoryTabFixed
:
this
.
data
.
categoryTabFixed
});
},
null
,
0
,
scrollTop
);
},
//节流器
throttle
(
fn
,
context
,
delay
,
text
){
clearTimeout
(
fn
.
timeoutId
)
fn
.
timeoutId
=
setTimeout
(
function
()
{
fn
.
call
(
context
,
text
)
},
delay
)
},
//获取元素到顶部的里
getElementTop
(){
wx
.
createSelectorQuery
().
select
(
'.categoryTab'
).
boundingClientRect
(
res
=>
{
if
(
res
){
this
.
scrollTop
=
res
.
top
;
this
.
categoryTabComponent
=
this
.
selectComponent
(
'#categoryTab'
);
}
}).
exec
();
},
//子组件更新成功
loadProductComplete
(
e
){
if
(
e
.
detail
==
'tabChange'
){
let
filterLevel
=
this
.
data
.
pages
.
filter
(
item
=>
item
.
type
==
11
);
if
(
filterLevel
.
length
!=
0
){
let
levelIndex
=
filterLevel
[
0
].
levelIndex
;
this
.
data
.
pages
.
filter
(
item
=>
item
.
levelIndex
>
levelIndex
).
forEach
(
item
=>
{
item
.
pShow
=
false
;
});
this
.
setData
({
pages
:
this
.
data
.
pages
});
}
}
else
{
this
.
data
.
pages
.
forEach
(
item
=>
{
item
.
pShow
=
true
;
});
this
.
setData
({
pages
:
this
.
data
.
pages
})
}
},
},
/**
/**
* 监听子组件事件
* 监听子组件事件
* */
* */
...
@@ -255,6 +332,8 @@ wxService.page({
...
@@ -255,6 +332,8 @@ wxService.page({
// wx.hideLoading()
// wx.hideLoading()
})
})
this
.
handleParaphe
(
products
);
const
render
=
renderPage
.
initPaging
(
filterResult
).
initRenderData
(
products
)
const
render
=
renderPage
.
initPaging
(
filterResult
).
initRenderData
(
products
)
this
.
data
.
render
=
render
this
.
data
.
render
=
render
const
renderData
=
render
.
next
()
const
renderData
=
render
.
next
()
...
@@ -286,6 +365,26 @@ wxService.page({
...
@@ -286,6 +365,26 @@ wxService.page({
wx
.
hideLoading
();
wx
.
hideLoading
();
})
})
},
},
//处理段落隐藏和显示
handleParaphe
(
products
){
//把段落增加一个index
products
.
forEach
((
item
,
index
)
=>
{
item
.
levelIndex
=
index
;
item
.
pShow
=
true
;
//默认都显示
});
//查找一下 看看有没有类型是11的
let
filterCategoryTab
=
products
.
filter
(
item
=>
item
.
type
==
11
);
//如果有的话 则把其以下的都隐藏 (目前仅支持一个)
if
(
filterCategoryTab
.
length
!=
0
){
let
levelIndex
=
filterCategoryTab
[
0
].
levelIndex
;
products
.
filter
(
item
=>
item
.
levelIndex
>
levelIndex
).
forEach
(
c
=>
{
c
.
pShow
=
false
;
});
}
},
/**
/**
* 渲染数据(合并之前的数据)
* 渲染数据(合并之前的数据)
* @param products 数组数据
* @param products 数组数据
...
...
src/pages/my/my.json
View file @
12fa9e8d
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
"pic-nav"
:
"/component/picNav/picNav"
,
"pic-nav"
:
"/component/picNav/picNav"
,
"bottom"
:
"/component/bottom/bottom"
,
"bottom"
:
"/component/bottom/bottom"
,
"tab-sort"
:
"/component/tabSort/tabSort"
,
"tab-sort"
:
"/component/tabSort/tabSort"
,
"category-tab"
:
"/component/categoryTab/categoryTab"
,
"announcement"
:
"/component/announcement/announcement"
,
"announcement"
:
"/component/announcement/announcement"
,
"icon-swiper"
:
"/component/iconSwiper/iconSwiper"
,
"icon-swiper"
:
"/component/iconSwiper/iconSwiper"
,
"bannerAd"
:
"/component/bannerAd/bannerAd"
,
"bannerAd"
:
"/component/bannerAd/bannerAd"
,
...
...
src/pages/my/my.wxml
View file @
12fa9e8d
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<view wx:if="{{pItem.type == 1}}">
<view wx:if="{{pItem.type == 1
&& pItem.pShow
}}">
<image-swiper image-data="{{pItem.rotationchart.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"/>
<image-swiper image-data="{{pItem.rotationchart.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<view class="" wx:if="{{pItem.type == 2
&& pItem.pShow
}}">
<person-center isVip="{{isVip}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" valueCardNum="{{valueCardNum}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
<person-center isVip="{{isVip}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" valueCardNum="{{valueCardNum}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<view class="" wx:if="{{pItem.type == 3
&& pItem.pShow
}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 4}}">
<view class="" wx:if="{{pItem.type == 4
&& pItem.pShow
}}">
<bottom bottom="{{pItem.bottom}}" />
<bottom bottom="{{pItem.bottom}}" />
</view>
</view>
<view class="" wx:if="{{pItem.type == 5}}">
<view class="" wx:if="{{pItem.type == 5}}">
<bottom-tabs currHomePageId="{{currHomePageId}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" tab-bar="{{pItem.tabBar}}" bind:updatePage="updatePage"/>
<bottom-tabs currHomePageId="{{currHomePageId}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" tab-bar="{{pItem.tabBar}}" bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 6}}">
<view class="" wx:if="{{pItem.type == 6
&& pItem.pShow
}}">
<announcement notice="{{pItem.notice}}"/>
<announcement notice="{{pItem.notice}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<view class="" wx:if="{{pItem.type == 7
&& pItem.pShow
}}">
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<view class="" wx:if="{{pItem.type == 8
&& pItem.pShow
}}">
<attention focus-wx="{{pItem.focusWx}}" />
<attention focus-wx="{{pItem.focusWx}}" />
</view>
</view>
<view class="" wx:if="{{pItem.type == 9}}">
<view class="" wx:if="{{pItem.type == 9}}">
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view>
<!-- 分类组件 -->
<view class="categoryTab" wx:if="{{pItem.type == 11}}">
<category-tab currHomePageId="{{currHomePageId}}"
categoryTab="{{pItem.categoryTab}}"
categoryTabFixed="{{categoryTabFixed}}" id="categoryTab"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"
bind:updatePage="updatePage"
bind:loadProductComplete="loadProductComplete"/>
</view>
</block>
</block>
</view>
</view>
<guide-page-modal show="{{guidePageModalShow}}" />
<guide-page-modal show="{{guidePageModalShow}}" />
...
...
src/pages/userCenter/userCenter.js
View file @
12fa9e8d
...
@@ -93,14 +93,14 @@ wxService.page({
...
@@ -93,14 +93,14 @@ wxService.page({
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getElementTop
();
this
.
getElementTop
();
// categoryTab
// categoryTab
},
3
00
);
},
5
00
);
},
},
// 页面滚动到底部
// 页面滚动到底部
onReachBottom
(){
onReachBottom
(){
console
.
log
(
this
.
categoryTabComponent
)
console
.
log
(
this
.
categoryTabComponent
)
if
(
this
.
categoryTabComponent
){
if
(
this
.
categoryTabComponent
){
this
.
categoryTabComponent
.
getTagProducts
(
2
);
this
.
categoryTabComponent
.
getTagProducts
(
'scrollBottom'
);
}
}
},
},
...
@@ -335,6 +335,7 @@ wxService.page({
...
@@ -335,6 +335,7 @@ wxService.page({
this
.
initHomePage
()
this
.
initHomePage
()
},
},
//初始化首页数据
initHomePage
()
{
initHomePage
()
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
...
@@ -380,6 +381,8 @@ wxService.page({
...
@@ -380,6 +381,8 @@ wxService.page({
// wx.hideLoading()
// wx.hideLoading()
})
})
this
.
handleParaphe
(
products
);
const
render
=
renderPage
.
initPaging
(
filterResult
).
initRenderData
(
products
)
const
render
=
renderPage
.
initPaging
(
filterResult
).
initRenderData
(
products
)
this
.
data
.
render
=
render
this
.
data
.
render
=
render
const
renderData
=
render
.
next
()
const
renderData
=
render
.
next
()
...
@@ -417,6 +420,50 @@ wxService.page({
...
@@ -417,6 +420,50 @@ wxService.page({
});
});
})
})
},
},
//子组件更新成功
loadProductComplete
(
e
){
if
(
e
.
detail
==
'tabChange'
){
let
filterLevel
=
this
.
data
.
pages
.
filter
(
item
=>
item
.
type
==
11
);
if
(
filterLevel
.
length
!=
0
){
let
levelIndex
=
filterLevel
[
0
].
levelIndex
;
this
.
data
.
pages
.
filter
(
item
=>
item
.
levelIndex
>
levelIndex
).
forEach
(
item
=>
{
item
.
pShow
=
false
;
});
this
.
setData
({
pages
:
this
.
data
.
pages
});
}
}
else
{
this
.
data
.
pages
.
forEach
(
item
=>
{
item
.
pShow
=
true
;
});
this
.
setData
({
pages
:
this
.
data
.
pages
})
}
},
//handleParaphe
//处理段落隐藏和显示
handleParaphe
(
products
){
//把段落增加一个index
products
.
forEach
((
item
,
index
)
=>
{
item
.
levelIndex
=
index
;
item
.
pShow
=
true
;
//默认都显示
});
//查找一下 看看有没有类型是11的
let
filterCategoryTab
=
products
.
filter
(
item
=>
item
.
type
==
11
);
//如果有的话 则把其以下的都隐藏 (目前仅支持一个)
if
(
filterCategoryTab
.
length
!=
0
){
let
levelIndex
=
filterCategoryTab
[
0
].
levelIndex
;
products
.
filter
(
item
=>
item
.
levelIndex
>
levelIndex
).
forEach
(
c
=>
{
c
.
pShow
=
false
;
});
}
},
/**
/**
* 渲染数据(合并之前的数据)
* 渲染数据(合并之前的数据)
* @param products 数组数据
* @param products 数组数据
...
@@ -443,19 +490,6 @@ wxService.page({
...
@@ -443,19 +490,6 @@ wxService.page({
})
})
},
},
// 获取plus购买信息
// getPlusPurchase() {
// wxService.get(`/sale/premium/query`).then(res => {
// if(!res) return false
// const { result, data } = res.data
// if (result == 0) {
// this.setData({
// skuVOList: data
// })
// }
// }).finally(() => {
// })
// },
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
...
...
src/pages/userCenter/userCenter.wxml
View file @
12fa9e8d
...
@@ -3,27 +3,27 @@
...
@@ -3,27 +3,27 @@
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<block wx:for="{{pages}}" wx:key="*this" wx:for-item="pItem">
<block wx:for="{{pages}}" wx:key="*this" wx:for-item="pItem">
<view wx:if="{{pItem.type == 1}}">
<view wx:if="{{pItem.type == 1
&& pItem.pShow
}}">
<image-swiper
<image-swiper
image-data="{{pItem.rotationchart.images}}"
image-data="{{pItem.rotationchart.images}}"
bind:updatePage="updatePage"
bind:updatePage="updatePage"
bind:getAuth="_getUserInfo"
bind:getAuth="_getUserInfo"
currentHasUserInfo="{{currentHasUserInfo}}"/>
currentHasUserInfo="{{currentHasUserInfo}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<view class="" wx:if="{{pItem.type == 2
&& pItem.pShow
}}">
<person-center isVip="{{isVip}}" bind:getAuth="_getUserInfo"
<person-center isVip="{{isVip}}" bind:getAuth="_getUserInfo"
currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}"
currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}"
person-data="{{pItem.customer}}" integral-num="{{integralNum}}"
person-data="{{pItem.customer}}" integral-num="{{integralNum}}"
valueCardNum="{{valueCardNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
valueCardNum="{{valueCardNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<view class="" wx:if="{{pItem.type == 3
&& pItem.pShow
}}">
<pic-nav
<pic-nav
pic-nav="{{pItem.navigation.images}}"
pic-nav="{{pItem.navigation.images}}"
bind:getAuth="_getUserInfo"
bind:getAuth="_getUserInfo"
currentHasUserInfo="{{currentHasUserInfo}}"
currentHasUserInfo="{{currentHasUserInfo}}"
bind:updatePage="updatePage"/>
bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 4}}">
<view class="" wx:if="{{pItem.type == 4
&& pItem.pShow
}}">
<bottom bottom="{{pItem.bottom}}" />
<bottom bottom="{{pItem.bottom}}" />
</view>
</view>
<view class="" wx:if="{{pItem.type == 5}}">
<view class="" wx:if="{{pItem.type == 5}}">
...
@@ -31,15 +31,15 @@
...
@@ -31,15 +31,15 @@
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"
tab-bar="{{pItem.tabBar}}" bind:updatePage="updatePage"/>
tab-bar="{{pItem.tabBar}}" bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 6}}">
<view class="" wx:if="{{pItem.type == 6
&& pItem.pShow
}}">
<announcement notice="{{pItem.notice}}"/>
<announcement notice="{{pItem.notice}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<view class="" wx:if="{{pItem.type == 7
&& pItem.pShow
}}">
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}"
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<view class="" wx:if="{{pItem.type == 8
&& pItem.pShow
}}">
<attention focus-wx="{{pItem.focusWx}}" />
<attention focus-wx="{{pItem.focusWx}}" />
</view>
</view>
<view class="" wx:if="{{pItem.type == 9}}">
<view class="" wx:if="{{pItem.type == 9}}">
...
@@ -47,12 +47,14 @@
...
@@ -47,12 +47,14 @@
currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view>
<!-- 分类组件 -->
<!-- 分类组件 -->
<view class="categoryTab" wx:if="{{pItem.type == 7}}">
<view class="categoryTab" wx:if="{{pItem.type == 11}}">
<category-tab currHomePageId="{{currHomePageId}}" categoryTab="{{pItem.categoryType}}" categoryTabFixed="{{categoryTabFixed}}"
<category-tab currHomePageId="{{currHomePageId}}"
id="categoryTab"
categoryTab="{{pItem.categoryTab}}"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
categoryTabFixed="{{categoryTabFixed}}" id="categoryTab"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"
bind:updatePage="updatePage"
bind:loadProductComplete="loadProductComplete"/>
</view>
</view>
</block>
</block>
</view>
</view>
<guide-page-modal show="{{guidePageModalShow}}" />
<guide-page-modal show="{{guidePageModalShow}}" />
...
...
src/project.config.json
View file @
12fa9e8d
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
"urlCheck"
:
false
,
"urlCheck"
:
false
,
"es6"
:
true
,
"es6"
:
true
,
"postcss"
:
true
,
"postcss"
:
true
,
"preloadBackgroundData"
:
false
,
"minified"
:
true
,
"minified"
:
true
,
"newFeature"
:
true
,
"newFeature"
:
true
,
"coverView"
:
true
,
"coverView"
:
true
,
...
@@ -21,13 +22,12 @@
...
@@ -21,13 +22,12 @@
"disablePlugins"
:
[],
"disablePlugins"
:
[],
"outputPath"
:
""
"outputPath"
:
""
},
},
"useCompilerModule"
:
true
,
"useCompilerModule"
:
false
,
"userConfirmedUseCompilerModuleSwitch"
:
false
,
"userConfirmedUseCompilerModuleSwitch"
:
false
"preloadBackgroundData"
:
false
},
},
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.11.0"
,
"libVersion"
:
"2.11.0"
,
"appid"
:
"wx
ac09792264c49b5c
"
,
"appid"
:
"wx
c3b64b09b1d3dfc2
"
,
"projectname"
:
"%E5%BE%AE%E5%95%86%E5%9F%8E"
,
"projectname"
:
"%E5%BE%AE%E5%95%86%E5%9F%8E"
,
"debugOptions"
:
{
"debugOptions"
:
{
"hidedInDevtools"
:
[]
"hidedInDevtools"
:
[]
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
"id"
:
13
,
"id"
:
13
,
"name"
:
"subPage"
,
"name"
:
"subPage"
,
"pathName"
:
"subPackage/page/pages/subPage/subPage"
,
"pathName"
:
"subPackage/page/pages/subPage/subPage"
,
"query"
:
"pageId=7
3
"
,
"query"
:
"pageId=7
2
"
,
"scene"
:
null
"scene"
:
null
},
},
{
{
...
...
src/subPackage/page/pages/categoryPro/categoryPro.js
View file @
12fa9e8d
...
@@ -18,7 +18,7 @@ wxService.page({
...
@@ -18,7 +18,7 @@ wxService.page({
form
:
{
form
:
{
mallCategoryId
:
''
,
mallCategoryId
:
''
,
sortType
:
''
,
sortType
:
''
,
order
:
''
order
:
''
,
},
},
navTab
:[
navTab
:[
{
{
...
@@ -153,7 +153,8 @@ wxService.page({
...
@@ -153,7 +153,8 @@ wxService.page({
let
url
=
`/sale/product/mallCategory/listPageProductByMallCategoryIdAndItsSons?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
;
let
url
=
`/sale/product/mallCategory/listPageProductByMallCategoryIdAndItsSons?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
;
if
(
this
.
data
.
pageFrom
==
'category'
){
if
(
this
.
data
.
pageFrom
==
'category'
){
url
=
`/sale/product/buyer/listPageByCategoryId?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
this
.
data
.
form
.
categoryId
=
this
.
data
.
form
.
mallCategoryId
;
url
=
`/sale/product/buyer/listPageByCategoryId?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
;
}
}
wxService
.
post
(
url
,
this
.
data
.
form
).
then
(
res
=>
{
wxService
.
post
(
url
,
this
.
data
.
form
).
then
(
res
=>
{
...
@@ -230,26 +231,52 @@ wxService.page({
...
@@ -230,26 +231,52 @@ wxService.page({
});
});
let
pageNo
=
this
.
data
.
pageNo
,
let
pageNo
=
this
.
data
.
pageNo
,
pageSize
=
this
.
data
.
pageSize
;
pageSize
=
this
.
data
.
pageSize
;
wxService
.
post
(
`/sale/product/listPage?pageSize=
${
pageSize
}
&pageNo=
${
pageNo
}
`
,{
this
.
data
.
form
.
state
=
1
;
productName
:
""
,
if
(
this
.
data
.
form
.
sortType
==
'recommend'
){
showStockData
:
true
,
this
.
data
.
form
.
order
=
'desc'
;
categoryIds
:
[],
}
productTagIds
:
[
this
.
data
.
tagId
],
productStatus
:
2
,
this
.
data
.
form
.
tagId
=
this
.
data
.
tagId
;
showListUrls
:
true
,
this
.
data
.
form
.
categoryId
=
null
;
}).
then
(
res
=>
{
this
.
data
.
form
.
mallCategoryId
=
null
;
wxService
.
post
(
`/sale/product/buyer/listPageByTagId?pageSize=
${
pageSize
}
&pageNo=
${
pageNo
}
`
,
this
.
data
.
form
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
&&
data
.
content
)
{
if
(
result
==
0
&&
data
.
content
)
{
wx
.
hideLoading
();
wx
.
hideLoading
();
this
.
data
.
proData
=
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]
:
[...
this
.
data
.
proData
,
...
data
.
content
];
this
.
data
.
proData
=
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]
:
[...
this
.
data
.
proData
,
...
data
.
content
];
this
.
data
.
proData
.
forEach
(
item
=>
{
this
.
data
.
proData
.
forEach
(
item
=>
{
item
.
indexUrl
=
item
.
indexUrl
?
item
.
indexUrl
:
'https://img3.bigaka.com/prd/3001/202003/20200331/30019aa78220-546f-41e0-8075-c2feb69e10b8.jpg'
;
//营销标签类型 1固定样式 2左下角显示商品当前金额 3左下角显示指定数额
item
.
indexUrl
=
item
.
indexUrl
?
item
.
indexUrl
:
defaultImg
;
//处理商品身上的营销标签数据
item
.
hasPromotionTag
=
item
.
markTagInfo
?
true
:
false
;
let
tagPrice
=
item
.
minSalePrice
;
if
(
item
.
hasPromotionTag
){
item
.
tagPic
=
item
.
markTagInfo
.
tagPicUrl
;
if
(
item
.
markTagInfo
.
tagType
==
2
){
tagPrice
=
item
.
minSalePrice
;
}
else
{
tagPrice
=
item
.
markTagInfo
.
assignPrice
;
}
item
.
tagType
=
item
.
markTagInfo
.
tagType
;
}
//判断价格是否大于1000了
if
(
tagPrice
/
100
>
1000
){
tagPrice
=
parseFloat
(
tagPrice
/
10
/
10
).
toFixed
(
1
);
}
else
{
tagPrice
=
parseFloat
(
tagPrice
/
10
/
10
).
toFixed
(
2
);
}
item
.
tagPrice
=
tagPrice
;
});
});
this
.
setData
({
this
.
setData
({
proData
:
this
.
data
.
proData
,
proData
:
this
.
data
.
proData
,
totalPages
:
data
.
totalPages
,
totalPages
:
data
.
totalPages
,
totalElements
:
data
.
totalElements
totalElements
:
data
.
totalElements
})
});
}
}
if
(
refresh
){
if
(
refresh
){
...
...
src/subPackage/page/pages/subPage/subPage.js
View file @
12fa9e8d
...
@@ -35,6 +35,7 @@ wxService.page({
...
@@ -35,6 +35,7 @@ wxService.page({
skuVOList
:[],
skuVOList
:[],
//显示广告
//显示广告
pageInfo
:
null
,
pageInfo
:
null
,
categoryTabFixed
:
false
,
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
...
@@ -65,7 +66,11 @@ wxService.page({
...
@@ -65,7 +66,11 @@ wxService.page({
pageId
:
this
.
data
.
pageId
pageId
:
this
.
data
.
pageId
});
});
this
.
initPage
(
this
.
data
.
pageId
)
this
.
initPage
(
this
.
data
.
pageId
);
setTimeout
(()
=>
{
this
.
getElementTop
();
// categoryTab
},
500
);
}
}
else
{
else
{
let
pageId
=
shareId
;
let
pageId
=
shareId
;
...
@@ -82,6 +87,8 @@ wxService.page({
...
@@ -82,6 +87,8 @@ wxService.page({
});
});
this
.
initPage
(
this
.
data
.
pageId
);
this
.
initPage
(
this
.
data
.
pageId
);
}
}
//判断是否带m 触点
//判断是否带m 触点
let
memberId
=
options
.
memberId
;
let
memberId
=
options
.
memberId
;
...
@@ -96,8 +103,78 @@ wxService.page({
...
@@ -96,8 +103,78 @@ wxService.page({
this
.
generatePointObject
(
tentacleInfo
);
this
.
generatePointObject
(
tentacleInfo
);
}
}
},
// 页面滚动到底部
onReachBottom
(){
if
(
this
.
categoryTabComponent
){
this
.
categoryTabComponent
.
getTagProducts
(
'scrollBottom'
);
}
},
},
//页面滚动
onPageScroll
(
e
){
if
(
!
this
.
scrollTop
){
return
;
}
let
scrollTop
=
e
.
scrollTop
;
this
.
throttle
(
scoTop
=>
{
if
(
scoTop
>
this
.
scrollTop
){
this
.
data
.
categoryTabFixed
=
true
;
}
else
{
this
.
data
.
categoryTabFixed
=
false
;
}
this
.
setData
({
categoryTabFixed
:
this
.
data
.
categoryTabFixed
});
},
null
,
0
,
scrollTop
);
},
//节流器
throttle
(
fn
,
context
,
delay
,
text
){
clearTimeout
(
fn
.
timeoutId
)
fn
.
timeoutId
=
setTimeout
(
function
()
{
fn
.
call
(
context
,
text
)
},
delay
)
},
//获取元素到顶部的里
getElementTop
(){
wx
.
createSelectorQuery
().
select
(
'.categoryTab'
).
boundingClientRect
(
res
=>
{
if
(
res
){
this
.
scrollTop
=
res
.
top
;
this
.
categoryTabComponent
=
this
.
selectComponent
(
'#categoryTab'
);
}
}).
exec
();
},
//子组件更新成功
loadProductComplete
(
e
){
if
(
e
.
detail
==
'tabChange'
){
let
filterLevel
=
this
.
data
.
pages
.
filter
(
item
=>
item
.
type
==
11
);
if
(
filterLevel
.
length
!=
0
){
let
levelIndex
=
filterLevel
[
0
].
levelIndex
;
this
.
data
.
pages
.
filter
(
item
=>
item
.
levelIndex
>
levelIndex
).
forEach
(
item
=>
{
item
.
pShow
=
false
;
});
this
.
setData
({
pages
:
this
.
data
.
pages
});
}
}
else
{
this
.
data
.
pages
.
forEach
(
item
=>
{
item
.
pShow
=
true
;
});
this
.
setData
({
pages
:
this
.
data
.
pages
})
}
},
/**
/**
* 监听子组件事件
* 监听子组件事件
* */
* */
...
@@ -269,6 +346,8 @@ wxService.page({
...
@@ -269,6 +346,8 @@ wxService.page({
// wx.hideLoading()
// wx.hideLoading()
})
})
this
.
handleParaphe
(
products
);
const
render
=
renderPage
.
initPaging
(
filterResult
).
initRenderData
(
products
)
const
render
=
renderPage
.
initPaging
(
filterResult
).
initRenderData
(
products
)
this
.
data
.
render
=
render
this
.
data
.
render
=
render
const
renderData
=
render
.
next
()
const
renderData
=
render
.
next
()
...
@@ -296,13 +375,29 @@ wxService.page({
...
@@ -296,13 +375,29 @@ wxService.page({
paddingBottom
:
'0rpx'
paddingBottom
:
'0rpx'
})
})
}
}
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
})
})
},
},
//处理段落隐藏和显示
handleParaphe
(
products
){
//把段落增加一个index
products
.
forEach
((
item
,
index
)
=>
{
item
.
levelIndex
=
index
;
item
.
pShow
=
true
;
//默认都显示
});
//查找一下 看看有没有类型是11的
let
filterCategoryTab
=
products
.
filter
(
item
=>
item
.
type
==
11
);
//如果有的话 则把其以下的都隐藏 (目前仅支持一个)
if
(
filterCategoryTab
.
length
!=
0
){
let
levelIndex
=
filterCategoryTab
[
0
].
levelIndex
;
products
.
filter
(
item
=>
item
.
levelIndex
>
levelIndex
).
forEach
(
c
=>
{
c
.
pShow
=
false
;
});
}
},
/**
/**
* 渲染数据(合并之前的数据)
* 渲染数据(合并之前的数据)
* @param products 数组数据
* @param products 数组数据
...
...
src/subPackage/page/pages/subPage/subPage.json
View file @
12fa9e8d
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
"bottom"
:
"/component/bottom/bottom"
,
"bottom"
:
"/component/bottom/bottom"
,
"go-guid"
:
"/component/goGuid/goGuid"
,
"go-guid"
:
"/component/goGuid/goGuid"
,
"tab-sort"
:
"/component/tabSort/tabSort"
,
"tab-sort"
:
"/component/tabSort/tabSort"
,
"category-tab"
:
"/component/categoryTab/categoryTab"
,
"announcement"
:
"/component/announcement/announcement"
,
"announcement"
:
"/component/announcement/announcement"
,
"icon-swiper"
:
"/component/iconSwiper/iconSwiper"
,
"icon-swiper"
:
"/component/iconSwiper/iconSwiper"
,
"bannerAd"
:
"/component/bannerAd/bannerAd"
,
"bannerAd"
:
"/component/bannerAd/bannerAd"
,
...
...
src/subPackage/page/pages/subPage/subPage.wxml
View file @
12fa9e8d
...
@@ -3,33 +3,42 @@
...
@@ -3,33 +3,42 @@
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<!-- {{pages}} -->
<!-- {{pages}} -->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<view wx:if="{{pItem.type == 1}}">
<view wx:if="{{pItem.type == 1
&& pItem.pShow
}}">
<image-swiper image-data="{{pItem.rotationchart.images}}" bind:updatePage="updatePage" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"/>
<image-swiper image-data="{{pItem.rotationchart.images}}" bind:updatePage="updatePage" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<view class="" wx:if="{{pItem.type == 2
&& pItem.pShow
}}">
<person-center bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" valueCardNum="{{valueCardNum}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
<person-center bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" valueCardNum="{{valueCardNum}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<view class="" wx:if="{{pItem.type == 3
&& pItem.pShow
}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 4}}">
<view class="" wx:if="{{pItem.type == 4
&& pItem.pShow
}}">
<bottom bottom="{{pItem.bottom}}" />
<bottom bottom="{{pItem.bottom}}" />
</view>
</view>
<view class="" wx:if="{{pItem.type == 5}}">
<view class="" wx:if="{{pItem.type == 5}}">
<bottom-tabs currHomePageId="{{currHomePageId}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" tab-bar="{{pItem.tabBar}}" bind:updatePage="updatePage"/>
<bottom-tabs currHomePageId="{{currHomePageId}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" tab-bar="{{pItem.tabBar}}" bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 6}}">
<view class="" wx:if="{{pItem.type == 6
&& pItem.pShow
}}">
<announcement notice="{{pItem.notice}}"/>
<announcement notice="{{pItem.notice}}"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<view class="" wx:if="{{pItem.type == 7
&& pItem.pShow
}}">
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<view class="" wx:if="{{pItem.type == 8
&& pItem.pShow
}}">
<attention focus-wx="{{pItem.focusWx}}" />
<attention focus-wx="{{pItem.focusWx}}" />
</view>
</view>
<view class="" wx:if="{{pItem.type == 9}}">
<view class="" wx:if="{{pItem.type == 9}}">
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view>
<!-- 分类组件 -->
<view class="categoryTab" wx:if="{{pItem.type == 11}}">
<category-tab currHomePageId="{{currHomePageId}}"
categoryTab="{{pItem.categoryTab}}"
categoryTabFixed="{{categoryTabFixed}}" id="categoryTab"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"
bind:updatePage="updatePage"
bind:loadProductComplete="loadProductComplete"/>
</view>
</block>
</block>
</view>
</view>
<guide-page-modal show="{{guidePageModalShow}}" />
<guide-page-modal show="{{guidePageModalShow}}" />
...
...
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