Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
403d6acc
Commit
403d6acc
authored
Jun 12, 2020
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
# Conflicts: # pages/index/index.vue
parents
144350bf
90e17ba8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
119 deletions
+110
-119
index.vue
pages/card/index/index.vue
+24
-24
favorite.vue
pages/favorite/favorite.vue
+1
-0
index.vue
pages/foot/index/index.vue
+3
-3
index.vue
pages/index/index.vue
+82
-92
No files found.
pages/card/index/index.vue
View file @
403d6acc
...
...
@@ -88,7 +88,6 @@ export default {
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
console
.
log
(
this
.
u
)
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
...
...
@@ -117,7 +116,7 @@ export default {
},
methods
:
{
change
(
index
)
{
console
.
log
(
index
)
this
.
current
=
index
;
this
.
page
=
1
;
this
.
g
=
[];
...
...
@@ -127,30 +126,31 @@ export default {
init
()
{
this
.
isover
=
false
;
let
h
=
this
.
apiheader
();
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/card/user-card"
,
status
:
this
.
current
+
1
,
page
:
this
.
page
,
},
},
(
res
)
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
// this.request(
// {
// url: "",
// header: h,
// data: {
// r: "api/card/user-card",
// status: this.current+1,
// page: this.page,
// },
// },
// (res) => {
// this.loading = false;
if
(
res
.
data
.
list
.
length
>
0
){
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
list
);
// TODO 这里没返一共多少页 注意下
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
//
if(res.data.list.length>0){
//
this.g = this.g.concat(res.data.list);
//
//
TODO 这里没返一共多少页 注意下
//
//
this.page_count = res.data.pagination.page_count;
//
//
if (this.page_count == 1) {
//
//
this.isover = true;
//
//
}
}
}
);
//
}
//
}
//
);
},
lower
(
e
)
{
if
(
this
.
page
<
this
.
page_count
)
{
...
...
pages/favorite/favorite.vue
View file @
403d6acc
...
...
@@ -2,6 +2,7 @@
<view
class=
"favoriteStyle"
:style=
"
{'height':contentHeight}" v-if="!isloading">
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
'mainColor'
></u-tabs>
<template
>
<u-empty
v-if=
"current==0&& goodslist.length==0"
text=
"没有任何收藏商品哦~"
mode=
"favor"
></u-empty>
<view
v-if=
"current==0 && goodslist.length>0"
style=
"
height: calc(100vh - 50px);
width: calc(100vw - 20px);
...
...
pages/foot/index/index.vue
View file @
403d6acc
...
...
@@ -220,7 +220,7 @@
});
this
.
msg
.
StartTime
=
this
.
start_time
;
this
.
msg
.
EndTime
=
this
.
end_time
;
console
.
log
(
"this.msg"
,
this
.
msg
)
this
.
request2
(
{
url
:
'/api/AppletUser/GetUserFootMarkPageList'
,
...
...
@@ -290,7 +290,7 @@
let
end
=
res
.
obj
.
tyear
+
"-"
+
res
.
obj
.
tmonth
+
"-"
+
res
.
obj
.
tday
+
' '
+
'23:59:59'
;
this
.
start_time
=
start
;
this
.
end_time
=
end
;
this
.
page
=
1
this
.
msg
.
pageIndex
=
1
this
.
g
=
[]
this
.
init
()
},
...
...
@@ -313,7 +313,7 @@
}
else
{
that
.
end_time
=
time1
;
}
this
.
page
=
1
this
.
msg
.
pageIndex
=
1
this
.
g
=
[]
this
.
init
()
...
...
pages/index/index.vue
View file @
403d6acc
...
...
@@ -9,7 +9,7 @@
:current=
"active"
:bar-width=
"80"
:font-size=
"32"
:bold=
"false"
:bold=
"false"
@
change=
"changeHandler"
></u-tabs>
<template
v-for=
"(item, i) in myPageData.home_pages.navs"
>
...
...
@@ -59,7 +59,7 @@
:key=
"di"
></addialog>
<quicknav
v-if=
"d.id == 'quick-nav' && d.data.navSwitch == 1"
v-if=
"d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs=
"d.data"
:key=
"di"
></quicknav>
...
...
@@ -67,21 +67,15 @@
</view>
</template>
<tabbar></tabbar>
<view
class=
"tips"
v-if=
"add_show == 1 && JSON.stringify(setting) != '{}'"
:style=
"{
'border-radius': setting.add_app_bg_radius + 'rpx',
opacity: setting.add_app_bg_transparency / 100,
}"
>
<u-icon
name=
"cross"
color=
"#fff"
@
click=
"close"
></u-icon>
<view
style=
"width: 1px; height: 20px; margin: 0 10px; background: #fff;"
></view>
<Text
style=
"color: #fff;"
>
{{ setting.add_app_text }}
</Text>
<view
class=
"triangle-up"
></view>
</view>
<view
class=
"tips"
v-if=
"add_show==1&& JSON.stringify(setting) != '{}' "
:style=
"{
'border-radius':setting.add_app_bg_radius+'rpx',
'opacity':setting.add_app_bg_transparency/100
}"
>
<u-icon
name=
"cross"
color=
"#fff"
@
click=
"close"
></u-icon>
<view
style=
"width: 1px;height: 20px;margin:0 10px;background: #fff;"
></view>
<Text
style=
'color: #fff;'
>
{{setting.add_app_text}}
</Text>
<view
class=
"triangle-up"
></view>
</view>
</view>
</template>
...
...
@@ -108,14 +102,14 @@ export default {
data
()
{
return
{
title
:
"Hello"
,
myPageData
:
{},
myPageData
:
{},
indexPageData
:
{},
mainColor
:
""
,
active
:
0
,
contentHeight
:
0
,
pageId
:
0
,
setting
:
{},
add_show
:
1
,
pageId
:
0
,
setting
:
{},
add_show
:
1
,
};
},
components
:
{
...
...
@@ -136,28 +130,24 @@ export default {
mapi
,
checkform
,
addialog
,
quicknav
,
quicknav
},
onLoad
(
options
)
{
console
.
log
(
options
,
"option"
);
if
(
options
&&
options
.
page_id
)
{
this
.
pageId
=
options
.
page_id
;
}
console
.
log
(
options
,
'option'
);
if
(
options
&&
options
.
page_id
)
{
this
.
pageId
=
options
.
page_id
}
let
c
=
this
.
$uiConfig
.
is_bang
?
78
:
50
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
c
);
this
.
init
();
let
set
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:
{};
if
(
!
uni
.
getStorageSync
(
"add_top_app"
))
{
uni
.
setStorageSync
(
"add_top_app"
,
{
add_top_app_show
:
1
});
}
this
.
add_show
=
uni
.
getStorageSync
(
"add_top_app"
)
?
uni
.
getStorageSync
(
"add_top_app"
).
add_top_app_show
:
1
;
this
.
setting
=
set
;
console
.
log
(
this
.
setting
);
let
set
=
uni
.
getStorageSync
(
"basedata"
)?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:{};
if
(
!
uni
.
getStorageSync
(
"add_top_app"
)){
uni
.
setStorageSync
(
"add_top_app"
,
{
add_top_app_show
:
1
});
}
this
.
add_show
=
uni
.
getStorageSync
(
"add_top_app"
)?
uni
.
getStorageSync
(
"add_top_app"
).
add_top_app_show
:
1
;
this
.
setting
=
set
;
console
.
log
(
this
.
setting
)
uni
.
showNavigationBarLoading
();
},
onShow
()
{
...
...
@@ -168,41 +158,40 @@ export default {
},
methods
:
{
init
()
{
this
.
request2
(
{
url
:
"/api/Mall/GetHome"
,
data
:
{
page_id
:
this
.
pageId
,
this
.
request2
(
{
url
:
'/api/Mall/GetHome'
,
data
:
{
page_id
:
this
.
pageId
},
},
},
(
res
)
=>
{
console
.
log
(
res
,
"resIndex"
);
this
.
indexPageData
=
res
.
data
.
home_pages
.
navs
[
0
].
template
.
data
;
this
.
myPageData
=
res
.
data
;
uni
.
showToast
({
title
:
this
.
mainColor
,
duration
:
2000
,
});
if
(
res
.
data
.
home_pages
.
title
!=
""
)
{
uni
.
setNavigationBarTitle
({
title
:
res
.
data
.
home_pages
.
title
,
});
uni
.
setNavigationBarColor
({
//字体颜色
frontColor
:
res
.
data
.
navbar
.
top_text_color
,
//背景颜色
backgroundColor
:
res
.
data
.
navbar
.
top_background_color
,
});
}
this
.
formatBg
();
},
(
error
)
=>
{}
);
},
close
()
{
this
.
add_show
=
2
;
uni
.
setStorageSync
(
"add_top_app"
,
{
add_top_app_show
:
2
});
(
res
)
=>
{
console
.
log
(
res
,
'resIndex'
);
this
.
indexPageData
=
res
.
data
.
home_pages
.
navs
[
0
].
template
.
data
;
this
.
myPageData
=
res
.
data
;
// wx.setStorageSync("indexdata", this.myPageData);
if
(
res
.
data
.
home_pages
.
title
!=
""
)
{
uni
.
setNavigationBarTitle
({
title
:
res
.
data
.
home_pages
.
title
,
});
uni
.
setNavigationBarColor
({
//字体颜色
frontColor
:
res
.
data
.
navbar
.
top_text_color
,
//背景颜色
backgroundColor
:
res
.
data
.
navbar
.
top_background_color
});
}
this
.
formatBg
();
},
(
error
)
=>
{
}
);
},
close
(){
this
.
add_show
=
2
;
uni
.
setStorageSync
(
"add_top_app"
,
{
add_top_app_show
:
2
});
},
changeHandler
(
i
)
{
this
.
active
=
i
;
},
...
...
@@ -237,29 +226,30 @@ export default {
flex-direction
:
column
;
/* align-items: center;
justify-content: center; */
padding-bottom
:
100
rpx
;
padding-bottom
:
100
rpx
;
}
.content
.tips
{
position
:
fixed
;
top
:
8px
;
right
:
6px
;
height
:
36px
;
background
:
#000000
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
0
10px
;
font-size
:
12px
;
.content
.tips
{
position
:
fixed
;
top
:
8px
;
right
:
6px
;
height
:
36px
;
background
:
#000000
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
0
10px
;
font-size
:
12px
;
}
.triangle-up
{
width
:
0
;
height
:
0
;
border-left
:
5
px
solid
transparent
;
border-right
:
5
px
solid
transparent
;
border-bottom
:
10
px
solid
black
;
position
:
fixed
;
right
:
65px
;
top
:
0px
;
.triangle-up
{
width
:
0
;
height
:
0
;
border-left
:
10
px
solid
transparent
;
border-right
:
10
px
solid
transparent
;
border-bottom
:
12
px
solid
black
;
position
:
fixed
;
right
:
65px
;
top
:
0px
}
/* .logo {
height: 200rpx;
...
...
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