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
a36ddfbb
Commit
a36ddfbb
authored
Apr 18, 2022
by
shibukun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页
parent
1e1439d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
35 deletions
+47
-35
home.vue
pages/home/home.vue
+47
-35
No files found.
pages/home/home.vue
View file @
a36ddfbb
<
template
>
<view>
<<<<<<<
HEAD
<view
class=
"layout"
>
<view
class=
"title"
>
懒人企业福利社
</view>
<view
class=
"header"
>
<view
class=
"header-top"
>
<text
class=
"header-name"
>
你好,
{{
name
}}
</text>
<text
v-if=
"isLogin"
class=
"header-name"
>
你好,
{{
name
}}
</text>
<text
v-else
class=
"header-login"
@
click=
"goLogin()"
>
请登录
</text>
<view
class=
"integral-detail"
>
积分明细 >
</view>
</view>
<view
class=
"header-center"
>
<view
class=
"header-integral"
>
{{
integralCount
}}
</view>
<view
class=
"header-integral"
>
{{
integralCount
}}
</view>
<view
class=
"header-integral-tip"
>
当前积分
</view>
</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"
>
<image
class=
"icon"
></image>
<view
class=
"item-right"
>
<text
class=
"item-title"
>
叮咚买菜
</text>
...
...
@@ -22,54 +21,66 @@
</view>
</view>
</view>
<uni-load-more
v-if=
"brandList.length>0"
:status=
"loadingType"
></uni-load-more>
=======
<view
class=
""
@
click=
"goLogin()"
>
11111
>>>>>>> d5c91777203b7e81e24f3d0960a9eb78343180ea
</view>
<uni-load-more
v-if=
"brandList.length > 0"
:status=
"loadingType"
></uni-load-more>
</view>
</
template
>
<
script
>
export
default
{
export
default
{
data
()
{
return
{
<<<<<<<
HEAD
name
:
''
,
integralCount
:
'
'
,
integralCount
:
'0
'
,
loadingType
:
'more'
,
brandList
:
[],
page
:
1
,
pageSize
:
20
=======
>>>>>>>
d5c91777203b7e81e24f3d0960a9eb78343180ea
pageSize
:
20
,
isLogin
:
false
};
},
created
()
{
this
.
getData
()
this
.
getData
();
},
onShow
()
{
this
.
getUserInfo
()
},
methods
:
{
goLogin
()
{
this
.
$router
.
push
(
'Login'
)
this
.
$router
.
push
(
'Login'
);
},
getData
()
{
this
.
$net
.
get
(
'/goods/brand'
,
{
page
:
this
.
page
,
pageSize
:
this
.
pageSize
})
getUserInfo
()
{
if
(
this
.
$net
.
tokenGet
().
length
>
0
)
{
this
.
isLogin
=
true
this
.
$net
.
get
(
'/staff/detail'
,
{})
.
then
(
res
=>
{
if
(
res
.
list
.
length
>
0
)
{
this
.
brandList
.
concat
(
res
.
list
)
}
this
.
loadingType
=
res
.
list
.
length
<
this
.
pageSize
?
'more'
:
'noMore'
this
.
name
=
res
.
accountName
this
.
integralCount
=
res
.
allIntegral
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
}
else
{
// 未登录
this
.
isLogin
=
false
}
},
getData
()
{
this
.
$net
.
get
(
'/goods/brand'
,
{
page
:
this
.
page
,
pageSize
:
this
.
pageSize
})
.
then
(
res
=>
{
if
(
res
.
list
.
length
>
0
)
{
this
.
brandList
.
concat
(
res
.
list
);
}
this
.
loadingType
=
res
.
list
.
length
<
this
.
pageSize
?
'more'
:
'noMore'
;
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
}
}
};
</
script
>
<
<<<<<<
HEAD
<
style
lang=
"scss"
>
.layout
{
width
:
100%
;
...
...
@@ -99,14 +110,19 @@
margin-left
:
30rpx
;
.header-name
{
font-size
:
24rpx
;
color: #FFFFFF;
color
:
#ffffff
;
}
.header-login
{
font-size
:
24rpx
;
color
:
#ffffff
;
text-decoration
:
underline
;
}
.integral-detail
{
background-image
:
url(../../static/integral-detail-bg.png)
;
width
:
174rpx
;
height
:
58rpx
;
font-size
:
26rpx
;
color: #
FFFFFF
;
color
:
#
ffffff
;
line-height
:
58rpx
;
text-align
:
center
;
}
...
...
@@ -118,18 +134,18 @@
.header-integral
{
font-size
:
82rpx
;
font-weight
:
bolder
;
color: #
FFFFFF
;
color
:
#
ffffff
;
margin-top
:
15rpx
;
}
.header-integral-tip
{
font-size
:
24rpx
;
color: #
FFFFFF
;
color
:
#
ffffff
;
}
}
.list
{
display
:
flex
;
flex-direction
:
row
;
background: #
FFEEEE
;
background
:
#
ffeeee
;
border-radius
:
30rpx
30rpx
0rpx
0rpx
;
padding-top
:
25rpx
;
.item
{
...
...
@@ -160,8 +176,4 @@
}
}
}
=======
<
style
lang=
"scss"
scoped
>
>>>>>>>
d5c91777203b7e81e24f3d0960a9eb78343180ea
</
style
>
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