Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FuLiMini
Project
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
wangjian
FuLiMini
Commits
b3a6044e
Commit
b3a6044e
authored
Apr 18, 2022
by
shibukun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品列表
parent
1f55765a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
89 deletions
+101
-89
pages.json
pages.json
+83
-85
home.vue
pages/home/home.vue
+16
-3
router.js
router/router.js
+2
-1
No files found.
pages.json
View file @
b3a6044e
{
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/home/home"
,
"style"
:
{
"navigationBarTitleText"
:
"懒人企业福利社"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/order/order"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/mine/mine"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
,
"backgroundColor"
:
"#F5F5F5"
}
}
],
"subPackages"
:
[{
"root"
:
"pagesA"
,
"pages"
:[
{
"path"
:
"login/login"
,
"style"
:
{
"navigationBarTitleText"
:
"登录"
,
"enablePullDownRefresh"
:
false
}
},{
"path"
:
"integral/integral"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"selectAccount/selectAccount"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
]
}],
"preloadRule"
:{
"pagesA/login/login"
:
{
"network"
:
"all"
,
"packages"
:
[
"__APP__"
]
}
"path"
:
"pages/home/home"
,
"style"
:
{
"navigationBarTitleText"
:
"懒人企业福利社"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/order/order"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine/mine"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
,
"backgroundColor"
:
"#F5F5F5"
}
}
],
"subPackages"
:
[{
"root"
:
"pagesA"
,
"pages"
:
[{
"path"
:
"login/login"
,
"style"
:
{
"navigationBarTitleText"
:
"登录"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"integral/integral"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"selectAccount/selectAccount"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"GoodSkuList/GoodSkuList"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}]
}],
"preloadRule"
:
{
"pagesA/login/login"
:
{
"network"
:
"all"
,
"packages"
:
[
"__APP__"
]
}
},
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"backgroundColor"
:
"#F8F8F8"
},
"tabBar"
:
{
"color"
:
"#686868"
,
"selectedColor"
:
"#FF0520"
,
"borderStyle"
:
"black"
,
"backgroundColor"
:
"#ffffff"
,
"list"
:
[{
"pagePath"
:
"pages/home/home"
,
"iconPath"
:
"static/tabbar/home.png"
,
"selectedIconPath"
:
"static/tabbar/home_h.png"
,
"text"
:
"首页"
},
{
"pagePath"
:
"pages/order/order"
,
"iconPath"
:
"static/tabbar/order.png"
,
"selectedIconPath"
:
"static/tabbar/order_h.png"
,
"text"
:
"订单"
},
{
"pagePath"
:
"pages/mine/mine"
,
"iconPath"
:
"static/tabbar/mine.png"
,
"selectedIconPath"
:
"static/tabbar/mine_h.png"
,
"text"
:
"我的"
}]
},
"tabBar"
:
{
"color"
:
"#686868"
,
"selectedColor"
:
"#FF0520"
,
"borderStyle"
:
"black"
,
"backgroundColor"
:
"#ffffff"
,
"list"
:
[{
"pagePath"
:
"pages/home/home"
,
"iconPath"
:
"static/tabbar/home.png"
,
"selectedIconPath"
:
"static/tabbar/home_h.png"
,
"text"
:
"首页"
},
{
"pagePath"
:
"pages/order/order"
,
"iconPath"
:
"static/tabbar/order.png"
,
"selectedIconPath"
:
"static/tabbar/order_h.png"
,
"text"
:
"订单"
},
{
"pagePath"
:
"pages/mine/mine"
,
"iconPath"
:
"static/tabbar/mine.png"
,
"selectedIconPath"
:
"static/tabbar/mine_h.png"
,
"text"
:
"我的"
}]
}
}
pages/home/home.vue
View file @
b3a6044e
...
...
@@ -4,7 +4,7 @@
<view
class=
"header-top"
>
<text
v-if=
"isLogin"
class=
"header-name"
>
你好,
{{
name
}}
</text>
<text
v-else
class=
"header-login"
@
click=
"goLogin()"
>
请登录
</text>
<view
class=
"integral-detail"
>
积分明细 >
</view>
<view
class=
"integral-detail"
@
click=
"goIntegralDetail"
>
积分明细 >
</view>
</view>
<view
class=
"header-center"
>
<view
class=
"header-integral"
>
{{
integralCount
}}
</view>
...
...
@@ -12,7 +12,7 @@
</view>
</view>
<view
class=
"list"
>
<view
class=
"item"
v-for=
"(item, index) in brandList"
:key=
"index"
>
<view
class=
"item"
v-for=
"(item, index) in brandList"
:key=
"index"
@
click=
"goToGoodDetail(item.brandNo)"
>
<view
class=
"item-layout"
>
<image
class=
"icon"
mode=
"aspectFill"
:src=
"item.imgPath"
></image>
<view
class=
"item-right"
>
...
...
@@ -72,6 +72,7 @@ export default {
if
(
res
.
data
.
list
.
length
>
0
)
{
this
.
brandList
=
this
.
brandList
.
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
).
concat
(
res
.
data
.
list
);
this
.
page
+=
1
}
this
.
loadingType
=
res
.
data
.
list
.
length
<
this
.
pageSize
?
'noMore'
:
'more'
;
console
.
log
(
this
.
loadingType
)
...
...
@@ -79,12 +80,24 @@ export default {
.
catch
(
err
=>
{
console
.
log
(
err
);
});
},
goToGoodDetail
(
brandNo
)
{
if
(
!
this
.
isLogin
)
{
this
.
goLogin
()
}
this
.
$router
.
push
(
'GoodSkuList'
,
{
brandNo
:
brandNo
})
},
goIntegralDetail
()
{
if
(
!
this
.
isLogin
)
{
this
.
goLogin
()
}
}
}
};
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.layout
{
width
:
100%
;
height
:
100%
;
...
...
router/router.js
View file @
b3a6044e
...
...
@@ -5,7 +5,8 @@ const routers = {
'Home'
:
'/pages/home/home'
,
'Order'
:
'/pages/order/order'
,
'Mine'
:
'/pages/mine/mine'
,
'SelectAccount'
:
'/pagesA/selectAccount/selectAccount'
'SelectAccount'
:
'/pagesA/selectAccount/selectAccount'
,
'GoodSkuList'
:
'/pagesA/GoodSkuList/GoodSkuList'
}
export
function
push
(
routerName
,
params
,
events
)
{
...
...
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