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
2816875c
Commit
2816875c
authored
Aug 28, 2020
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
parents
a277ba24
ce6dec53
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
819 additions
and
31 deletions
+819
-31
pages.json
pages.json
+6
-1
index.vue
pages/index/index.vue
+39
-7
order-detail.vue
pages/order/order-detail.vue
+10
-2
share-detail.vue
pages/share-team/share-detail.vue
+691
-0
share-team.vue
pages/share-team/share-team.vue
+73
-21
No files found.
pages.json
View file @
2816875c
...
@@ -166,7 +166,12 @@
...
@@ -166,7 +166,12 @@
"root"
:
"pages/share-team"
,
"root"
:
"pages/share-team"
,
"pages"
:
[{
"pages"
:
[{
"path"
:
"share-team"
"path"
:
"share-team"
}]
},{
"path"
:
"share-detail"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
}]
},
},
{
{
"root"
:
"pages/share-order"
,
"root"
:
"pages/share-order"
,
...
...
pages/index/index.vue
View file @
2816875c
...
@@ -129,6 +129,7 @@ export default {
...
@@ -129,6 +129,7 @@ export default {
showBack
:
false
,
showBack
:
false
,
showAuth
:
false
,
showAuth
:
false
,
U
:{},
U
:{},
shopData
:{},
};
};
},
},
components
:
{
components
:
{
...
@@ -273,6 +274,7 @@ export default {
...
@@ -273,6 +274,7 @@ export default {
// #endif
// #endif
this
.
init
();
this
.
init
();
this
.
getSmallShopById
()
let
set
=
uni
.
getStorageSync
(
"basedata"
)
let
set
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:
{};
:
{};
...
@@ -334,13 +336,24 @@ export default {
...
@@ -334,13 +336,24 @@ export default {
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
:
0
;
}
}
return
{
if
(
SmallShopId
!=
0
){
title
:
this
.
setting
.
share_title
return
{
?
this
.
setting
.
share_title
title
:
this
.
shopData
.
Name
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
,
?
this
.
shopData
.
Name
path
:
"/pages/index/index?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
,
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
,
imageUrl
:
this
.
setting
.
share_pic
?
this
.
setting
.
share_pic
:
""
,
path
:
"/pages/index/index?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
,
};
imageUrl
:
''
,
}
}
else
{
return
{
title
:
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
,
path
:
"/pages/index/index?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
,
imageUrl
:
this
.
setting
.
share_pic
?
this
.
setting
.
share_pic
:
""
,
};
}
},
},
// #endif
// #endif
onShow
()
{
onShow
()
{
...
@@ -523,6 +536,25 @@ export default {
...
@@ -523,6 +536,25 @@ export default {
(
error
)
=>
{}
(
error
)
=>
{}
);
);
},
},
getSmallShopById
(){
let
Id
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
Id
==
0
){
Id
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
this
.
request2
(
{
url
:
'/api/AppletUser/GetSmallShopById'
,
data
:
{
Id
:
Id
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
shopData
=
res
.
data
}
}
);
},
close
()
{
close
()
{
this
.
add_show
=
2
;
this
.
add_show
=
2
;
uni
.
setStorageSync
(
"add_top_app"
,
{
add_top_app_show
:
2
});
uni
.
setStorageSync
(
"add_top_app"
,
{
add_top_app_show
:
2
});
...
...
pages/order/order-detail.vue
View file @
2816875c
...
@@ -415,10 +415,15 @@ export default {
...
@@ -415,10 +415,15 @@ export default {
showModal
:
false
,
showModal
:
false
,
delivery_time
:
14
,
//时间
delivery_time
:
14
,
//时间
uid
:
0
,
uid
:
0
,
NewUserId
:
0
,
//zk新增
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
id
=
option
.
id
||
63702
;
this
.
id
=
option
.
id
||
63702
;
//zk新增
if
(
option
.
NewUserId
){
this
.
NewUserId
=
option
.
NewUserId
;
}
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
headStyle
.
background
=
`linear-gradient(to right,
${
this
.
mc
}
,80%,
${
this
.
secondary
}
)`
;
this
.
headStyle
.
background
=
`linear-gradient(to right,
${
this
.
mc
}
,80%,
${
this
.
secondary
}
)`
;
...
@@ -429,7 +434,7 @@ export default {
...
@@ -429,7 +434,7 @@ export default {
let
p
=
getCurrentPages
();
let
p
=
getCurrentPages
();
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
this
.
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
if
(
p
.
length
>
1
)
{
if
(
p
.
length
>
1
)
{
this
.
prevPage
=
p
[
p
.
length
-
2
].
route
;
this
.
prevPage
=
p
[
p
.
length
-
2
].
route
;
...
@@ -535,7 +540,10 @@ export default {
...
@@ -535,7 +540,10 @@ export default {
this
.
request2
(
this
.
request2
(
{
{
url
:
'/api/AppletOrder/GetAppletMyOrderInfo'
,
url
:
'/api/AppletOrder/GetAppletMyOrderInfo'
,
data
:
{
OrderId
:
this
.
id
}
data
:
{
OrderId
:
this
.
id
,
NewUserId
:
this
.
NewUserId
}
},
},
(
res
)
=>
{
(
res
)
=>
{
this
.
orders
=
res
.
data
;
this
.
orders
=
res
.
data
;
...
...
pages/share-team/share-detail.vue
0 → 100644
View file @
2816875c
<
style
>
.cdetailStyle
.sharebox_top
{
width
:
100%
;
height
:
210px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
background-image
:
url(../../static/images/shareTop.png)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
}
.cdetailStyle
.sharebox_top_nav
{
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
height
:
44px
;
padding
:
0
10px
;
}
.cdetailStyle
.sharebox_top
.sharebox_top_t
{
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
20px
;
}
.cdetailStyle
.top_t_l
{
margin-left
:
30px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
flex-start
;
}
.cdetailStyle
.sharebox_topc
{
width
:
94%
;
height
:
40px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-around
;
padding
:
0
20px
;
margin-top
:
18px
;
}
.cdetailStyle
.center_item
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
space-between
;
}
.cdetailStyle
.listbox
{
width
:
90%
;
background
:
#fff
;
padding
:
0
15px
;
/* margin-top: 15px; */
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
margin
:
5px
auto
;
border
:
1px
solid
#F7F7F7
;
border-radius
:
10px
;
}
.cdetailStyle
.box_top
{
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
10px
0
;
}
.cdetailStyle
.box_r
{
width
:
calc
(
100vw
-
30px
-
32px
-
20px
);
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.cdetailStyle
.box_r
.l_name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
font-size
:
14px
;
color
:
#000000
;
font-weight
:
bold
;
}
.cdetailStyle
.box_b
{
width
:
100%
;
height
:
35px
;
padding
:
0
10px
;
background
:
#F7F5F5
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
border-radius
:
6px
;
margin
:
10px
0
;
font-size
:
13px
;
color
:
#878787
;
}
.cdetailStyle
.redStyle
{
color
:
#FF3F47
}
.cdetailStyle
.grayStyle
{
color
:
#999999
}
.cdetailStyle
.greenStyle
{
color
:
green
}
.cdetailStyle
.buy_List
{
width
:
100%
;
margin
:
10px
auto
;
display
:
flex
;
justify-content
:
space-between
;
}
.cdetailStyle
.bug_GoodImg
{
width
:
65px
;
height
:
65px
;
border-radius
:
6px
;
overflow
:
hidden
;
}
.cdetailStyle
.bug_GoodImg
img
{
width
:
100%
;
height
:
100%
;
}
.cdetailStyle
.share_gdtitle
{
font-size
:
13px
;
color
:
#111111
;
width
:
100%
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
1
;
}
.cdetailStyle
.share_gg
{
color
:
#555555
;
font-size
:
12px
;
}
.cdetailStyle
.share_yj
{
padding
:
3px
10px
;
background-color
:
#F7F5F5
;
font-size
:
12px
;
color
:
#111111
;
}
.cdetailStyle
.viewBox
{
width
:
123px
;
height
:
174px
;
margin-right
:
4px
;
border
:
1px
solid
#F7F7F7
;
padding
:
4px
;
}
.cdetailStyle
.view_main
{
position
:
relative
;
margin-bottom
:
12px
;
border
:
1px
solid
#F7F7F7
;
border-radius
:
10
rpx
;
overflow
:
hidden
;
padding-bottom
:
10
rpx
;
}
.cdetailStyle
.view_imgbox
{
width
:
100%
;
height
:
0
;
padding-top
:
100%
;
position
:
relative
;
}
.cdetailStyle
.viewImg
{
position
:
absolute
;
left
:
0
;
top
:
0
;
bottom
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
.cdetailStyle
.viewImg
img
{
width
:
100%
;
height
:
100%
;
border-radius
:
2px
;
}
.cdetailStyle
.view_title
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin
:
3px
0
;
font-size
:
13px
;
height
:
37px
;
margin
:
5px
;
}
.cdetailStyle
.Sone_Line
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
}
.cdetailStyle
.order_userName
{
max-width
:
130px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
}
</
style
>
<
template
>
<view
class=
"cdetailStyle"
:style=
"
{'height':contentHeight}">
<view
style=
"width:100%;height:100%"
>
<view
class=
"sh_head"
>
<view
class=
"sharebox_top"
>
<view
class=
"sharebox_top_nav"
:style=
"
{paddingTop:nav+'px'}">
<view
class=
"arrow"
@
click=
"redirectPrev"
>
<u-icon
name=
"arrow-left"
size=
"48"
color=
"#fff"
></u-icon>
</view>
<view
class=
"title"
style=
"color: #FFFFFF;font-size: 16px;"
>
{{
pageTitle
}}
</view>
<view
style=
"width: 24px;height: 24px;"
></view>
</view>
<view
class=
"sharebox_top_t"
>
<view
class=
"top_t_l"
>
<u-avatar
:src=
"headData.Photo"
size=
"130"
></u-avatar>
<view
style=
"display: flex;flex-direction: column;color: #fff;margin:7px 0 0 16px;"
>
<view
style=
"display: flex;flex-direction: row;align-items: center"
>
<Text
style=
'font-size: 18px;max-width: 150px;overflow: hidden;display: inline-block;white-space: nowrap; text-overflow:ellipsis;'
>
{{
headData
.
Name
}}
</Text>
<image
:src=
"headData.Icon"
style=
"width:67px;height:22px;margin-left:5px;"
></image>
</view>
<Text
style=
"font-size: 12px;margin-top: 5px;height:19px;font-family:'cuIcon'"
>
{{
headData
.
createDateStr
}}
</Text>
</view>
</view>
</view>
<view
class=
"sharebox_topc"
>
<view
class=
"center_item"
style=
"font-size: 12px;color: #FFFFFF;justify-content: space-between;"
>
<Text>
累计返佣
</Text>
<Text>
{{
headData
.
totalCommission
}}
元
</Text>
</view>
<view
style=
"width: 2px;height: 25px;background: #FFFFFF;justify-content: space-between;"
></view>
<view
class=
"center_item"
style=
"font-size: 12px;color: #FFFFFF;"
>
<Text>
本月返佣
</Text>
<Text>
{{
headData
.
currentCommission
}}
元
</Text>
</view>
</view>
</view>
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
'mainColor'
></u-tabs>
</view>
<view
style=
"background-color: #fff;"
:style=
"
{ 'height': `calc(100% - ${scrollHeight})`}">
<scroll-view
v-if=
"current==0"
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
<template
v-if=
"customData.length==0"
>
<u-empty
text=
"暂无数据"
mode=
"data"
></u-empty>
</
template
>
<
template
v-else
>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
v-for=
"(item, index) in customData"
:key=
"index"
class=
"listbox"
>
<view
class=
"box_top"
>
<u-avatar
:src=
"item.Photo"
size=
"64"
></u-avatar>
<view
class=
"box_r"
style=
"margin-left:10px;"
>
<view
style=
"width: 100%;display: flex;flex-direction: row;align-items: center;
justify-content: space-between;"
>
<view
style=
"width: 190px;"
>
<Text
class=
'l_name'
>
{{
item
.
UserName
}}
</Text>
</view>
<Text
style=
'font-size: 12px;'
>
推广
{{
item
.
GeneralizeNum
}}
人
</Text>
</view>
<Text
style=
'font-size: 12px;color: #999999;margin-top:3px;'
>
{{
item
.
CreateDate
}}
</Text>
</view>
</view>
<view
class=
"box_b"
>
<Text><text
style=
'color: #FF3F47;'
>
{{
item
.
Income
}}
</text>
元
</Text>
<Text>
{{
item
.
OrderNum
}}
个订单
</Text>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
/>
</
template
>
</scroll-view>
<!-- 订单列表 -->
<scroll-view
v-if=
"current==1"
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"{ height: '100%' }"
>
<
template
v-if=
"orderData.length==0"
>
<u-empty
text=
"暂无数据"
mode=
"data"
></u-empty>
</
template
>
<
template
v-else
>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
v-for=
"(item, index) in orderData"
:key=
"index"
class=
"listbox"
>
<view
class=
"box_top"
>
<u-avatar
:src=
"item.Photo"
size=
"64"
></u-avatar>
<view
class=
"box_r"
style=
"margin-left:10px;display:flex;align-items: center;"
>
<view
style=
"width: 100%;display: flex;flex-direction: row;align-items: center;
justify-content: space-between;"
>
<view
style=
"display:flex;"
>
<Text
class=
'order_userName'
>
{{
item
.
UserName
}}
</Text>
<img
:src=
"item.Icon"
style=
"width:67px;height:22px;margin-left:5px;"
alt=
""
/>
</view>
<Text
style=
'font-size: 12px;'
:class=
"
{'redStyle':item.StatusName=='已完成',
'grayStyle':item.StatusName=='已付款','greenStyle':item.StatusName=='待付款'}">
{{
item
.
StatusName
}}
</Text>
</view>
</view>
</view>
<view
class=
"buy_List"
v-for=
"(subItem,subIndex) in item.DetailList"
:key=
"subIndex"
@
click=
"redirectToDetail(item.OrderId)"
>
<view
class=
"bug_GoodImg"
>
<img
:src=
"subItem.CoverImagePath"
alt=
""
/>
</view>
<view
style=
"width:77%;"
>
<view
class=
"share_gdtitle"
>
{{
subItem
.
GoodsName
}}
</view>
<view
class=
"share_gg Sone_Line"
style=
"margin:8px 0"
>
规格:
<text
v-for=
"(tItem,tindex) in subItem.SpecificationList"
:key=
"tindex"
style=
"margin-right:5px;"
>
{{
tItem
}}
</text>
</view>
<view
style=
"display:flex;justify-content: space-between;"
>
<view
class=
"share_gg"
>
×
{{
subItem
.
Number
}}
</view>
<view
class=
"share_yj"
>
已得佣金:
<text
style=
"color:#FF3F47"
>
{{
item
.
Commission
}}
</text>
元
</view>
</view>
</view>
</view>
<view
class=
"box_b"
>
<Text>
<text>
订单号:
{{
item
.
OrderNo
}}
</text>
</Text>
<text
@
click=
"copyHandler(item.OrderNo)"
>
复制
</text>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
/>
</
template
>
</scroll-view>
<!-- 浏览记录 -->
<scroll-view
v-if=
"current==2"
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"{ height: '100%',padding:'12px'}"
>
<
template
v-if=
"viewData.length==0"
>
<u-empty
text=
"暂无数据"
mode=
"data"
></u-empty>
</
template
>
<
template
v-else
>
<u-row
gutter=
"24"
>
<u-col
span=
"6"
v-for=
"(item, gli) in viewData"
:key=
"gli"
>
<view
class=
"view_main"
@
click=
"openGood(item)"
>
<view
class=
"view_imgbox"
>
<view
class=
"viewImg"
>
<img
:src=
"item.GoodsImgPath"
alt=
""
/>
</view>
</view>
<view
class=
"view_title"
>
{{
item
.
GoodsName
}}
</view>
<view
style=
"display:flex;justify-content: space-between;margin:0 5px;align-items: center;"
>
<text
style=
"color:#E73727;"
>
¥
{{
item
.
Price
}}
</text>
<text
style=
"font-size:12px;font-family:'cuIcon'"
>
{{
getTime
(
item
.
CreateDate
)
}}
</text>
</view>
</view>
</u-col>
</u-row>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
/>
</
template
>
</scroll-view>
</view>
</view>
</view>
</template>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"团队成员信息"
,
contentHeight
:
0
,
mainColor
:
''
,
secondary
:
''
,
list
:
[{
name
:
''
},
{
name
:
''
},
{
name
:
''
}],
current
:
0
,
nav
:
0
,
//获取顶部msg
headMsg
:
{
UserId
:
0
},
headData
:
{},
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
//客户详情数据
customData
:
[],
customMsg
:
{
pageIndex
:
1
,
pageSize
:
10
,
FXGradeId
:
0
,
Name
:
''
,
//昵称
SortNum
:
0
,
// 0时间降序 1时间升序 2人数倒序 3人数升序
NewUserId
:
0
},
page_count
:
1
,
page_count2
:
1
,
page_count3
:
1
,
//订单信息
orderMsg
:
{
pageIndex
:
1
,
pageSize
:
10
,
UserId
:
0
,
SupplierId
:
0
,
GoodsName
:
''
,
CommissionState
:
0
,
StartTime
:
''
,
EndTime
:
''
,
NewUserId
:
0
},
orderData
:
[],
//浏览记录
viewMsg
:
{
pageIndex
:
1
,
pageSize
:
18
,
StartTime
:
''
,
EndTime
:
''
,
NewUserId
:
0
},
viewData
:
[],
scrollHeight
:
0
}
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
getHeadHeight
();
},
onLoad
(
option
)
{
if
(
option
.
UserId
)
{
this
.
headMsg
.
UserId
=
option
.
UserId
;
this
.
customMsg
.
NewUserId
=
option
.
UserId
;
this
.
orderMsg
.
NewUserId
=
option
.
UserId
;
this
.
viewMsg
.
NewUserId
=
option
.
UserId
;
}
this
.
getHead
();
this
.
getCustomData
();
this
.
getOrder
();
this
.
getView
();
},
methods
:
{
//跳转至订单详情
redirectToDetail
(
id
)
{
uni
.
navigateTo
({
url
:
"/pages/order/order-detail?id="
+
id
+
'&NewUserId='
+
this
.
headMsg
.
UserId
});
},
//跳转至商品详情
openGood
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
item
.
GoodsId
});
},
getHeadHeight
()
{
let
that
=
this
;
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
query
.
select
(
".sh_head"
)
.
boundingClientRect
((
data
)
=>
{
that
.
scrollHeight
=
data
.
height
+
"px"
;
})
.
exec
();
},
//复制文字
copyHandler
(
OrderNo
)
{
uni
.
setClipboardData
({
data
:
OrderNo
});
},
change
(
index
)
{
this
.
current
=
index
;
this
.
customData
=
[];
this
.
orderData
=
[];
this
.
viewData
=
[];
if
(
index
==
0
)
{
this
.
customMsg
.
pageIndex
=
1
;
this
.
getCustomData
();
}
if
(
index
==
1
)
{
this
.
orderMsg
.
pageIndex
=
1
;
this
.
getOrder
();
}
if
(
index
==
2
)
{
this
.
fun_date
(
60
);
this
.
viewMsg
.
pageIndex
=
1
;
this
.
getView
();
}
},
getHead
()
{
uni
.
showLoading
({
title
:
'加载中'
});
this
.
request2
({
url
:
'/api/AppletUser/GetTeamUserInfo'
,
data
:
this
.
headMsg
},
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
resultCode
==
1
)
{
this
.
headData
=
res
.
data
;
}
}
);
},
//获取客户详情数据
getCustomData
()
{
this
.
customCount
=
''
this
.
request2
({
url
:
'/api/AppletUser/GetUserMyTeamPageListForFX'
,
data
:
this
.
customMsg
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
customData
=
this
.
customData
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
if
(
this
.
list
[
0
].
name
==
''
)
{
this
.
list
[
0
].
name
=
'客户详情('
+
res
.
data
.
count
+
')'
}
}
}
);
},
//获取订单列表
getOrder
()
{
this
.
request2
({
url
:
'/api/AppletOrder/GetUserDistributionOrdersPageList'
,
data
:
this
.
orderMsg
},
(
res
)
=>
{
this
.
orderData
=
this
.
orderData
.
concat
(
res
.
data
.
pageData
);
this
.
page_count2
=
res
.
data
.
pageCount
;
if
(
this
.
page_count2
==
1
)
{
this
.
status
=
"nomore"
;
}
if
(
this
.
list
[
1
].
name
==
''
)
{
this
.
list
[
1
].
name
=
'订单列表('
+
res
.
data
.
count
+
')'
}
}
);
},
//获取浏览记录
getView
()
{
this
.
request2
({
url
:
'/api/AppletUser/GetUserFootMarkPageList'
,
data
:
this
.
viewMsg
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
viewData
=
this
.
viewData
.
concat
(
res
.
data
.
pageData
);
this
.
page_count3
=
res
.
data
.
pageCount
;
if
(
this
.
page_count3
==
1
)
{
this
.
status
=
"nomore"
;
}
if
(
this
.
list
[
2
].
name
==
''
)
{
this
.
list
[
2
].
name
=
'浏览记录('
+
res
.
data
.
count
+
')'
}
}
}
);
},
//日期返回月-日
getTime
(
date
)
{
var
year
=
""
,
month
=
""
,
day
=
""
,
str
=
''
;
if
(
date
)
{
month
=
date
.
substr
(
5
,
2
);
day
=
date
.
substr
(
8
,
2
);
str
=
month
+
'-'
+
day
;
}
return
str
;
},
//获取往前一个月日期
fun_date
(
num
)
{
let
that
=
this
let
date1
=
new
Date
();
//今天时间
let
time1
=
date1
.
getFullYear
()
+
"-"
+
(
date1
.
getMonth
()
+
1
)
+
"-"
+
date1
.
getDate
()
+
' '
+
'23:59:59'
let
date2
=
new
Date
(
date1
);
date2
.
setDate
(
date1
.
getDate
()
-
num
);
//num是正数表示之后的时间,num负数表示之前的时间,0表示今天
let
time2
=
date2
.
getFullYear
()
+
"-"
+
(
date2
.
getMonth
()
+
1
)
+
"-"
+
date2
.
getDate
()
+
' '
+
'00:00:00'
;
let
time3
=
date2
.
getFullYear
()
+
"-"
+
(
date2
.
getMonth
()
+
1
)
+
"-"
+
date2
.
getDate
()
+
' '
+
'23:59:59'
;
that
.
viewMsg
.
StartTime
=
time2
;
that
.
viewMsg
.
EndTime
=
time1
;
},
//返回上一页
redirectPrev
()
{
uni
.
navigateBack
({
delta
:
1
,
});
},
//滚动加载
lower
()
{
//加载客户详情
if
(
this
.
current
==
0
)
{
if
(
this
.
customMsg
.
pageIndex
<
this
.
page_count
)
{
this
.
customMsg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
getCustomData
();
}
else
{
this
.
status
=
"nomore"
;
}
}
//加载订单列表
if
(
this
.
current
==
1
)
{
if
(
this
.
orderMsg
.
pageIndex
<
this
.
page_count2
)
{
this
.
orderMsg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
getOrder
();
}
else
{
this
.
status
=
"nomore"
;
}
}
if
(
this
.
current
==
2
)
{
if
(
this
.
viewMsg
.
pageIndex
<
this
.
page_count3
)
{
this
.
viewMsg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
getView
();
}
else
{
this
.
status
=
"nomore"
;
}
}
}
},
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
},
}
</
script
>
<
style
>
.cdetailStyle
{
background
:
#f3f4f6
;
}
</
style
>
pages/share-team/share-team.vue
View file @
2816875c
...
@@ -2,13 +2,28 @@
...
@@ -2,13 +2,28 @@
<view
class=
"cteamStyle"
:style=
"
{'height':contentHeight}">
<view
class=
"cteamStyle"
:style=
"
{'height':contentHeight}">
<view
style=
"width: 100%;height: 100%;"
>
<view
style=
"width: 100%;height: 100%;"
>
<u-tabs
:list=
"list"
name=
"GradeName"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
'mainColor'
></u-tabs>
<u-tabs
:list=
"list"
name=
"GradeName"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
'mainColor'
></u-tabs>
<view
style=
"width:100%;background:#fff;padding:20px 20px 0 20px;"
>
<u-search
:show-action=
"true"
v-model=
"msg2.Name"
placeholder=
"请输入用户昵称"
action-text=
"搜索"
@
custom=
"init2(1)"
@
search=
"init2(1)"
radius=
"40"
></u-search>
<view
class=
"cteam_Search"
>
<view
class=
"ctem_item"
@
click=
"getSort(0,0)"
:style=
"
{ color: msg2.SortNum == 0 || msg2.SortNum == 1 ? mainColor : '#222'}">
<text>
时间
</text>
<u-icon
v-if=
"msg2.SortNum==0||msg2.SortNum==1"
:name=
"msg2.SortNum == 0 ? 'descending' : 'ascending'"
size=
"36"
:color=
"msg2.SortNum == 0 || msg2.SortNum == 1 ? mainColor : '#222'"
></u-icon>
</view>
<view
@
click=
"getSort(2,1)"
class=
"ctem_item"
:style=
"
{ color: msg2.SortNum == 2 || msg2.SortNum == 3 ? mainColor : '#222'}">
<text>
客户人数
</text>
<u-icon
v-if=
"msg2.SortNum==2||msg2.SortNum==3"
:name=
"msg2.SortNum == 2 ? 'descending' : 'ascending'"
size=
"36"
:color=
"msg2.SortNum == 2 || msg2.SortNum == 3 ? mainColor : '#222'"
></u-icon>
</view>
</view>
</view>
<u-empty
v-if=
"g.length==0"
text=
"暂无数据"
mode=
"data"
></u-empty>
<u-empty
v-if=
"g.length==0"
text=
"暂无数据"
mode=
"data"
></u-empty>
<template
v-if=
"g.length > 0"
>
<template
v-if=
"g.length > 0"
>
<view
<view
style=
"
style=
"
height: calc(100vh -
5
0px);
height: calc(100vh -
16
0px);
width: calc(100vw);
width: calc(100vw);
overflow: hidden;
overflow: hidden;
margin-top:10px;
"
>
"
>
<scroll-view
<scroll-view
...
@@ -18,18 +33,18 @@
...
@@ -18,18 +33,18 @@
@
scrolltolower=
"lower"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
:style=
"
{ height: '100%' }">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
v-for=
"(item, index) in g"
:key=
"index"
class=
"listbox"
>
<view
v-for=
"(item, index) in g"
:key=
"index"
class=
"listbox"
@
click=
"goUrl(item.UserId)"
>
<view
class=
"box_top"
>
<view
class=
"box_top"
>
<u-avatar
:src=
"item.Photo"
size=
"64"
></u-avatar>
<u-avatar
:src=
"item.Photo"
size=
"64"
></u-avatar>
<view
class=
"box_r"
>
<view
class=
"box_r"
>
<view
style=
"width: 100%;display: flex;flex-direction: row;align-items: center;justify-content: space-between;"
>
<view
style=
"width: 100%;display: flex;flex-direction: row;align-items: center;
margin-bottom:3px;justify-content: space-between;"
>
<view
style=
"width: 190px;"
>
<view
style=
"width: 190px;"
>
<Text
class=
'l_name'
>
{{
item
.
UserName
}}
</Text>
<Text
class=
'l_name'
>
{{
item
.
UserName
}}
</Text>
</view>
</view>
<Text
style=
'font-size: 12px;'
>
推广
{{
item
.
GeneralizeNum
}}
人
</Text>
<Text
style=
'font-size: 12px;'
>
推广
{{
item
.
GeneralizeNum
}}
人
</Text>
</view>
</view>
<Text
style=
'font-size: 10px;color: #999999;'
>
{{
item
.
CreateDate
}}
</Text>
<Text
style=
'font-size: 10px;color: #999999;
font-size:12px;
'
>
{{
item
.
CreateDate
}}
</Text>
</view>
</view>
</view>
</view>
<view
class=
"box_b"
>
<view
class=
"box_b"
>
...
@@ -81,7 +96,8 @@
...
@@ -81,7 +96,8 @@
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
10
,
pageSize
:
10
,
FXGradeId
:
0
,
FXGradeId
:
0
,
Name
:
''
,
//昵称
SortNum
:
0
// 0时间降序 1时间升序 2人数倒序 3人数升序
},
},
page_count
:
1
,
page_count
:
1
,
status
:
"loadmore"
,
status
:
"loadmore"
,
...
@@ -149,8 +165,28 @@
...
@@ -149,8 +165,28 @@
}
}
);
);
},
},
init2
(){
//排序
getSort
(
sort
,
t
){
if
(
t
==
0
)
{
if
(
this
.
msg2
.
SortNum
==
0
)
{
this
.
msg2
.
SortNum
=
1
;
//升序
}
else
{
this
.
msg2
.
SortNum
=
0
;
//降序
}
}
if
(
t
==
1
)
{
if
(
this
.
msg2
.
SortNum
==
2
)
{
this
.
msg2
.
SortNum
=
3
;
//升序
}
else
{
this
.
msg2
.
SortNum
=
2
;
//降序
}
}
this
.
init2
(
1
);
},
init2
(
num
){
if
(
num
==
1
){
this
.
g
=
[];
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
});
});
...
@@ -158,8 +194,7 @@
...
@@ -158,8 +194,7 @@
{
{
url
:
'/api/AppletUser/GetUserMyTeamPageListForFX'
,
url
:
'/api/AppletUser/GetUserMyTeamPageListForFX'
,
data
:
this
.
msg2
data
:
this
.
msg2
},
},
(
res
)
=>
{
(
res
)
=>
{
uni
.
hideLoading
();
uni
.
hideLoading
();
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
...
@@ -167,7 +202,6 @@
...
@@ -167,7 +202,6 @@
if
(
this
.
page_count
==
1
)
{
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
this
.
status
=
"nomore"
;
}
}
}
}
);
);
},
},
...
@@ -219,16 +253,21 @@
...
@@ -219,16 +253,21 @@
}
}
}
else
{
}
else
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
status
=
"loading"
;
this
.
init
();
this
.
init
();
}
else
{
}
else
{
this
.
status
=
"nomore"
;
this
.
status
=
"nomore"
;
}
}
}
}
},
},
//跳转详情
goUrl
(
UserId
){
console
.
log
(
'点击'
);
uni
.
navigateTo
({
url
:
'/pages/share-team/share-detail?UserId='
+
UserId
});
}
}
}
}
}
</
script
>
</
script
>
...
@@ -258,11 +297,11 @@
...
@@ -258,11 +297,11 @@
width
:
100%
;
width
:
100%
;
background
:
#fff
;
background
:
#fff
;
padding
:
0
15px
;
padding
:
0
15px
;
margin-top
:
15px
;
/* margin-top: 15px; */
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
10px
;
}
}
.cteamStyle
.box_top
{
.cteamStyle
.box_top
{
width
:
100%
;
width
:
100%
;
...
@@ -275,18 +314,19 @@
...
@@ -275,18 +314,19 @@
}
}
.cteamStyle
.box_r
{
.cteamStyle
.box_r
{
width
:
calc
(
100vw
-
30
px
-
32px
-
20px
);
width
:
calc
(
100vw
-
25
px
-
32px
-
20px
);
height
:
32px
;
height
:
32px
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.box_r
.l_name
{
.
cteamStyle
.
box_r
.l_name
{
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
-webkit-box-orient
:
vertical
;
font-size
:
13px
;
}
}
.cteamStyle
.box_b
{
.cteamStyle
.box_b
{
width
:
100%
;
width
:
100%
;
...
@@ -300,4 +340,16 @@
...
@@ -300,4 +340,16 @@
border-radius
:
4px
;
border-radius
:
4px
;
margin
:
10px
0
;
margin
:
10px
0
;
}
}
.cteamStyle
.cteam_Search
{
display
:
flex
;
margin-top
:
10px
;
}
.cteamStyle
.ctem_item
{
height
:
40px
;
line-height
:
40px
;
flex
:
1
;
text-align
:
center
;
display
:
flex
;
justify-content
:
center
;
}
</
style
>
</
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