Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
71cc172a
Commit
71cc172a
authored
Apr 25, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页高保真
parent
ea7284f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
604 additions
and
625 deletions
+604
-625
index.vue
src/components/order/index.vue
+133
-139
index.vue
src/pages/index/index.vue
+471
-486
No files found.
src/components/order/index.vue
View file @
71cc172a
<
template
>
<
template
>
<view
class=
"order-cell"
>
<view
class=
"order-view"
@
click=
"handleClickCell"
>
<view
class=
"order-view"
@
click=
"handleClickCell"
>
<view
class=
"order-top-view"
>
<view
class=
"order-top-view"
>
<view
class=
"left-view"
>
<view
class=
"left-view"
>
<view
:class=
"['tag-view',
{'active': active}]">
<view
:class=
"['tag-view',
{'active': active}]">
{{
orderData
.
orderServiceType
}}
{{
orderData
.
orderServiceType
}}
</view>
<view
class=
"store-view"
>
{{
orderData
.
categoryName
}}
</view>
</view>
</view>
<view
class=
"
right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
<view
class=
"
store-view"
>
{{
orderData
.
categoryName
}}
</view>
</view>
</view>
<view
class=
"content-view"
>
<view
class=
"right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
>
</view>
<text>
{{
item
+
':'
}}
</text>
<view
class=
"content-view"
>
<text>
{{
orderData
[
key
]
}}
</text>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
>
<text>
{{
item
+
':'
}}
</text>
<text>
{{
orderData
[
key
]
}}
</text>
</view>
<view
class=
"address-view"
>
<view
class=
"address-left-view"
>
<image
class=
"address-image"
:src=
"dizhiImage"
mode=
"widthFix"
></image>
<text>
{{
orderData
.
contactAddress
}}
</text>
</view>
</view>
<view
class=
"address-view"
>
<view
v-if=
"showDistance"
>
<view
class=
"address-left-view"
>
{{
getDistance
(
orderData
.
contactAddressLatitud
,
orderData
.
contactAddressLongitud
)
}}
km
<image
class=
"address-image"
:src=
"dizhiImage"
mode=
"widthFix"
></image>
<text>
{{
orderData
.
contactAddress
}}
</text>
</view>
<view
v-if=
"showDistance"
>
{{
getDistance
(
orderData
.
contactAddressLatitud
,
orderData
.
contactAddressLongitud
)
}}
km
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
<view
class=
"reason-view"
v-if=
"showReason"
><text>
未通过原因:
</text>
<view
class=
"reason-view"
v-if=
"showReason"
><text>
未通过原因:
</text>
<text
class=
"reason-text"
>
{{
orderData
.
auditResults
.
remark
}}
</text>
<text
class=
"reason-text"
>
{{
orderData
.
auditResults
.
remark
}}
</text>
</view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<view>
<view>
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
v-if=
"showCountTime"
class=
"bottom-left-view"
>
<view
:class=
"['bottom-tag-view',
{'will': orderData.currentWillOverTime}]">
{{
tagText
}}
</view>
<view
:class=
"['bottom-tag-view',
{'will': orderData.currentWillOverTime}]">
{{
tagText
}}
</view>
<u-count-down
:timestamp=
"orderData.currentWillOverTime || orderData.currentOverTime"
<u-count-down
:timestamp=
"orderData.currentWillOverTime || orderData.currentOverTime"
font-size=
"44"
font-size=
"44"
color=
"#FF930D"
@
change=
"handleChange"
ref=
"order-count-down"
></u-count-down>
color=
"#FF930D"
@
change=
"handleChange"
ref=
"order-count-down"
></u-count-down>
</view>
</view>
<view
v-else-if=
"showTime"
>
<view
v-else-if=
"showTime"
>
<text>
{{
timeTitle
}}
</text>
<text>
{{
timeTitle
}}
</text>
<text>
{{
timeText
}}
</text>
<text>
{{
timeText
}}
</text>
</view>
</view>
</view>
<u-button
class=
"right-btn"
@
click
.
stop=
"handleClick"
:custom-style=
"buttonStyle"
type=
"primary"
shape=
"circle"
>
{{
orderText
}}
</u-button>
</view>
</view>
<u-button
class=
"right-btn"
@
click
.
stop=
"handleClick"
:custom-style=
"buttonStyle"
type=
"primary"
shape=
"circle"
>
{{
orderText
}}
</u-button>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -251,138 +249,134 @@
...
@@ -251,138 +249,134 @@
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.order-cell
{
.order-view
{
padding-bottom
:
20rpx
;
width
:
100%
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
padding
:
30rpx
;
margin-bottom
:
20rpx
;
.order-view
{
.order-top-view
{
width
:
100%
;
display
:
flex
;
background-color
:
#FFFFFF
;
align-items
:
center
;
border-radius
:
12rpx
;
justify-content
:
space-between
;
padding
:
30rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
.
order-top
-view
{
.
left
-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
20rpx
;
.left-view
{
display
:
flex
;
align-items
:
center
;
.tag-view
{
.tag-view
{
width
:
84rpx
;
width
:
84rpx
;
height
:
40rpx
;
height
:
40rpx
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
background-image
:
linear-gradient
(
to
right
,
#FF930D
,
#FFC174
);
background-image
:
linear-gradient
(
to
right
,
#FF930D
,
#FFC174
);
&
.active
{
background-image
:
linear-gradient
(
to
right
,
#2272FF
,
#47ABFF
);
}
}
.store-view
{
&
.active
{
color
:
#333333
;
background-image
:
linear-gradient
(
to
right
,
#2272FF
,
#47ABFF
);
font-size
:
36rpx
;
font-weight
:
bold
;
margin-left
:
20rpx
;
}
}
}
}
.right-view
{
.store-view
{
width
:
100rpx
;
height
:
40rpx
;
background-color
:
#F4F5F7
;
border-radius
:
20rpx
;
color
:
#333333
;
color
:
#333333
;
font-size
:
22rpx
;
font-size
:
36rpx
;
line-height
:
40rpx
;
font-weight
:
bold
;
margin-left
:
20rpx
;
}
}
}
}
.content-view
{
.right-view
{
.info-view
{
width
:
100rpx
;
text-align
:
left
;
height
:
40rpx
;
color
:
#333333
;
background-color
:
#F4F5F7
;
font-size
:
26rpx
;
border-radius
:
20rpx
;
margin-top
:
12rpx
;
color
:
#333333
;
margin-bottom
:
12rpx
;
font-size
:
22rpx
;
}
line-height
:
40rpx
;
}
}
.content-view
{
.info-view
{
text-align
:
left
;
color
:
#333333
;
font-size
:
26rpx
;
margin-top
:
12rpx
;
margin-bottom
:
12rpx
;
}
.address-view
{
.address-view
{
display
:
flex
;
align-items
:
flex-start
;
justify-content
:
space-between
;
color
:
#333333
;
font-size
:
24rpx
;
margin-top
:
12rpx
;
.address-left-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
flex-start
;
align-items
:
flex-start
;
justify-content
:
space-between
;
color
:
#333333
;
font-size
:
24rpx
;
margin-top
:
12rpx
;
.address-left-view
{
.address-image
{
display
:
flex
;
width
:
26rpx
;
align-items
:
center
;
height
:
28rpx
;
align-items
:
flex-start
;
margin-right
:
8rpx
;
flex-shrink
:
0
;
.address-image
{
margin-top
:
4rpx
;
width
:
26rpx
;
height
:
28rpx
;
margin-right
:
8rpx
;
flex-shrink
:
0
;
margin-top
:
4rpx
;
}
}
}
.address-right-view
{}
}
}
}
.line-view
{
.address-right-view
{}
background-color
:
#F4F5F7
;
height
:
2rpx
;
width
:
100%
;
margin-top
:
30rpx
;
}
}
}
.reason-view
{
.line-view
{
text-align
:
left
;
background-color
:
#F4F5F7
;
margin-top
:
30rpx
;
height
:
2rpx
;
font-size
:
26rpx
;
width
:
100%
;
color
:
#666666
;
margin-top
:
30rpx
;
}
.reason-text
{
.reason-view
{
color
:
#FA5A49
;
text-align
:
left
;
}
margin-top
:
30rpx
;
font-size
:
26rpx
;
color
:
#666666
;
.reason-text
{
color
:
#FA5A49
;
}
}
}
.bottom-view
{
.bottom-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
30rpx
;
.bottom-left-view
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
30rpx
;
.bottom-left-view
{
.bottom-tag-view
{
display
:
flex
;
width
:
52rpx
;
align-items
:
center
;
height
:
52rpx
;
border-radius
:
26rpx
;
.bottom-tag-view
{
line-height
:
56rpx
;
width
:
52rpx
;
color
:
#FFFFFF
;
height
:
52rpx
;
font-size
:
26rpx
;
border-radius
:
26rpx
;
background-color
:
#FA5A49
;
line-height
:
56rpx
;
margin-right
:
20rpx
;
color
:
#FFFFFF
;
font-size
:
26rpx
;
background-color
:
#FA5A49
;
margin-right
:
20rpx
;
&
.will
{
&
.will
{
background-color
:
#FF930D
;
background-color
:
#FF930D
;
}
}
}
}
}
.right-btn
{}
}
}
.right-btn
{}
}
}
}
}
</
style
>
</
style
>
src/pages/index/index.vue
View file @
71cc172a
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<!--
<view
style=
"width: 700rpx; height: 800rpx"
>
-->
<!--
<view
style=
"width: 700rpx; height: 800rpx"
>
-->
<!--
<view
class=
"title-view"
>
充电桩自营平台
</view>
-->
<!--
<view
class=
"title-view"
>
充电桩自营平台
</view>
-->
<u-navbar
<u-navbar
:is-back=
"false"
:is-fixed=
"false"
:background=
"
{ background: 'transparent' }" :border-bottom="false">
:is-back=
"false"
<text
class=
"title-view"
>
充电桩自营平台
</text>
:is-fixed=
"false"
</u-navbar>
:background=
"
{ background: 'transparent' }"
<!--
<u-swiper
:border-bottom="false"
>
<text
class=
"title-view"
>
充电桩自营平台
</text>
</u-navbar>
<!--
<u-swiper
:height=
"240"
:height=
"240"
:list=
"list"
:list=
"list"
:indicator-pos=
"indicatorPos"
:indicator-pos=
"indicatorPos"
...
@@ -18,485 +13,475 @@
...
@@ -18,485 +13,475 @@
:interval=
"3000"
:interval=
"3000"
@
click=
"clickSwiper"
@
click=
"clickSwiper"
>
>
</u-swiper>
-->
</u-swiper>
-->
<image
class=
"banner-image"
:src=
"bannerImage"
></image>
<image
class=
"banner-image"
:src=
"bannerImage"
></image>
<view
class=
"msg-view"
>
<view
class=
"msg-view"
>
<view
class=
"msg-title"
>
最新消息
</view>
<view
class=
"msg-title"
>
最新消息
</view>
<view
class=
"msg-list-view"
>
<view
class=
"msg-list-view"
>
<view
<view
class=
"msg-content"
v-for=
"(item, index) in messageList"
:key=
"index"
>
class=
"msg-content"
<view
class=
"msg-content-view"
>
v-for=
"(item, index) in messageList"
<view
class=
"left-view"
>
:key=
"index"
<image
class=
"msg-icon"
:src=
"msgStyleImage[item.content_type]"
></image>
>
<text
class=
"msg-text"
>
{{
item
.
title
}}
</text>
<view
class=
"msg-content-view"
>
</view>
<view
class=
"left-view"
>
<image
class=
"right-icon"
:src=
"shouyeyouImage"
></image>
<image
class=
"msg-icon"
:src=
"msgStyleImage[item.content_type]"
></image>
</view>
<text
class=
"msg-text"
>
{{
item
.
title
}}
</text>
<view
class=
"line-view"
v-if=
"index != 2"
></view>
</view>
</view>
<image
class=
"right-icon"
:src=
"shouyeyouImage"
></image>
</view>
</view>
</view>
<view
<!-- 订单推荐吸顶 -->
class=
"line-view"
<u-sticky>
v-if=
"index != 2"
<view
class=
"sticky"
>
></view>
<text>
订单推荐
</text>
</view>
</view>
</view>
</u-sticky>
</view>
<view
class=
"order-view"
>
<!-- 订单推荐吸顶 -->
<!-- 入驻成功之后显示推荐订单列表 -->
<u-sticky>
<view
class=
"order-list-view"
v-if=
"loaded"
>
<view
class=
"sticky"
>
<!-- 入驻前-->
<text>
订单推荐
</text>
<view
v-if=
"needSettled"
class=
"tip-view"
>
</view>
<view
class=
"tip-title"
>
当前订单(笔)
</view>
</u-sticky>
<view
class=
"tip-count"
>
{{
count
}}
</view>
<view
class=
"order-view"
>
<view
class=
"tip-other"
>
入驻通过后平台将向您推荐订单
</view>
<!-- 入驻成功之后显示推荐订单列表 -->
<u-button
class=
"settle-button"
type=
"primary"
shape=
"circle"
@
click=
"immediatelyIn"
<view
class=
"order-list-view"
v-if=
"loaded"
>
:custom-style=
"buttonStyle"
>
<!-- 入驻前-->
立即入驻
<view
v-if=
"needSettled"
class=
"tip-view"
>
</u-button>
<view
class=
"tip-title"
>
当前订单(笔)
</view>
</view>
<view
class=
"tip-count"
>
{{
count
}}
</view>
<view
v-else-if=
"!needSettled && orderList.length > 0"
class=
"order-item-view"
>
<view
class=
"tip-other"
>
入驻通过后平台将向您推荐订单
</view>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<u-button
<OrderCell
:orderData=
"item"
:orderType=
"0"
:location=
"location"
@
click=
"handleClick"
class=
"settle-button"
@
action=
"handleAction"
>
</OrderCell>
type=
"primary"
</view>
shape=
"circle"
<u-loadmore
:status=
"currentLoadStatus"
bgColor=
"#f2f2f2"
></u-loadmore>
@
click=
"immediatelyIn"
</view>
:custom-style=
"buttonStyle"
<!-- 入驻成功之后无推荐订单 -->
>
<view
v-else-if=
"!needSettled && orderList.length
<
=
0
"
class=
"no-order-view"
>
立即入驻
<image
class=
"no-order-image"
:src=
"wudingdanImage"
></image>
</u-button>
<text>
当前暂无订单
</text>
</view>
</view>
<view
</view>
v-else-if=
"!needSettled && orderList.length > 0"
</view>
class=
"order-item-view"
<!--
</view>
-->
>
<!--
</scroll-view>
-->
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<view
class=
"bottom-view"
>
<OrderCell
:orderData=
"item"
:orderType=
"0"
:location=
"location"
@
click=
"handleClick"
@
action=
"handleAction"
>
</OrderCell>
<view
class=
"bottom-line-view"
></view>
</view>
<view
class=
"bottom-text"
>
我也是有底线哒
</view>
<u-loadmore
<view
class=
"bottom-line-view"
></view>
:status=
"currentLoadStatus"
</view>
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
<!-- 入驻成功之后无推荐订单 -->
<view
v-else-if=
"!needSettled && orderList.length
<
=
0
"
class=
"no-order-view"
>
<image
class=
"no-order-image"
:src=
"wudingdanImage"
></image>
<text>
当前暂无订单
</text>
</view>
</view>
</view>
<!--
</view>
-->
<!--
</scroll-view>
-->
<view
class=
"bottom-view"
>
<view
class=
"bottom-line-view"
></view>
<view
class=
"bottom-text"
>
我也是有底线哒
</view>
<view
class=
"bottom-line-view"
></view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
util
from
"@/utils/util.js"
;
import
util
from
"@/utils/util.js"
;
const
app
=
getApp
();
const
app
=
getApp
();
import
OrderCell
from
"@/components/order/index.vue"
;
import
OrderCell
from
"@/components/order/index.vue"
;
export
default
{
export
default
{
components
:
{
components
:
{
OrderCell
,
OrderCell
,
},
},
data
()
{
data
()
{
return
{
return
{
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location
:
[
116.3896
,
39.91917
],
// 经纬度
location
:
[
116.3896
,
39.91917
],
// 经纬度
title
:
false
,
title
:
false
,
title
:
"Hello"
,
title
:
"Hello"
,
loaded
:
false
,
loaded
:
false
,
needSettled
:
true
,
needSettled
:
true
,
count
:
0
,
// 推荐订单数量
count
:
0
,
// 推荐订单数量
messageList
:
[],
messageList
:
[],
loadStatus
:
[
"more"
,
"loading"
,
"noMore"
],
loadStatus
:
[
"more"
,
"loading"
,
"noMore"
],
currentLoadStatus
:
"loading"
,
currentLoadStatus
:
"loading"
,
orderList
:
[],
orderList
:
[],
search
:
{
search
:
{
token
:
""
,
token
:
""
,
pageNumber
:
0
,
pageNumber
:
0
,
pageSize
:
10
,
pageSize
:
10
,
},
},
bottomLoading
:
false
,
bottomLoading
:
false
,
};
};
},
},
watch
:
{
watch
:
{
vuex_token
(
val
){
vuex_token
(
val
)
{
// 监听token变化,如果更新则重新加载页面数据
// 监听token变化,如果更新则重新加载页面数据
val
&&
this
.
initSettleInfo
()
val
&&
this
.
initSettleInfo
()
}
}
},
},
computed
:
{
computed
:
{
buttonStyle
()
{
buttonStyle
()
{
return
{
return
{
width
:
"400rpx"
,
width
:
"400rpx"
,
height
:
"104rpx"
,
height
:
"104rpx"
,
"font-size"
:
"32rpx"
,
"font-size"
:
"32rpx"
,
"font-weight"
:
"bold"
,
"font-weight"
:
"bold"
,
};
};
},
},
msgStyleImage
()
{
msgStyleImage
()
{
return
{
return
{
'1'
:
process
.
uniEnv
.
qn_base_url
+
"zhiding.png"
,
// 置顶
'1'
:
process
.
uniEnv
.
qn_base_url
+
"zhiding.png"
,
// 置顶
'2'
:
process
.
uniEnv
.
qn_base_url
+
"tongzhi.png"
,
// 通知
'2'
:
process
.
uniEnv
.
qn_base_url
+
"tongzhi.png"
,
// 通知
'3'
:
process
.
uniEnv
.
qn_base_url
+
"xiaoxi.png"
,
// 消息
'3'
:
process
.
uniEnv
.
qn_base_url
+
"xiaoxi.png"
,
// 消息
}
}
},
},
bannerImage
()
{
bannerImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'banner.png'
return
process
.
uniEnv
.
qn_base_url
+
'banner.png'
},
},
shouyeyouImage
()
{
shouyeyouImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'shouyeyou.png'
return
process
.
uniEnv
.
qn_base_url
+
'shouyeyou.png'
},
},
wudingdanImage
()
{
wudingdanImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'wudingdan.png'
return
process
.
uniEnv
.
qn_base_url
+
'wudingdan.png'
}
},
onLoad
()
{},
onShow
()
{
// 每次进入页面都刷新入驻状态
if
(
this
.
vuex_token
)
{
this
.
initSettleInfo
();
}
else
{
// 初始化订单数据
this
.
loadOrderList
();
}
},
onPullDownRefresh
()
{
console
.
log
(
'------下拉刷新------'
)
// 下拉刷洗
this
.
initSettleInfo
()
},
methods
:
{
handleClick
()
{
// 点击了cell
console
.
log
(
'点击了cell'
)
},
handleAction
()
{
// 点击了按钮
console
.
log
(
'点击了按钮'
)
},
async
initSettleInfo
()
{
let
self
=
this
;
const
callBack
=
(
vm
,
result
)
=>
{
// 后台自动判断入驻流程是否完成,前台通过status确定状态
if
(
result
&&
result
.
record
)
{
vm
.
loaded
=
true
;
vm
.
needSettled
=
result
.
needSettled
;
vm
.
status
=
Number
(
result
.
record
.
status
||
'0'
);
// vm.status = 8
}
};
await
app
.
getBaseInfo
(
self
,
callBack
);
// 加载消息列表
self
.
loadMessageList
();
self
.
loadOrderList
();
},
loadMessageList
()
{
let
self
=
this
;
self
.
$u
.
api
.
listByNotice
().
then
((
res
)
=>
{
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
3
)
{
self
.
messageList
=
res
.
data
.
slice
(
0
,
3
);
}
else
{
self
.
messageList
=
res
.
data
||
[];
}
}
else
{
console
.
log
(
res
.
message
,
"初始化消息列表异常"
);
}
});
},
loadOrderList
()
{
let
self
=
this
;
// 加载订单列表
self
.
search
.
token
=
self
.
vuex_token
;
self
.
$u
.
api
.
listByRecommendOrder
(
self
.
search
).
then
((
res
)
=>
{
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
self
.
orderList
.
push
().
apply
(
res
.
data
);
}
}
else
{
console
.
log
(
res
.
message
,
"初始化订单列表异常"
);
}
});
},
onRefresh
()
{
if
(
this
.
_freshing
)
return
;
this
.
_freshing
=
true
;
// 获取入驻状态
this
.
initSettleInfo
();
// 获取推荐订单及数量
// ....
setTimeout
(()
=>
{
// 数据加载完成更新入驻状态和推荐列表
this
.
triggered
=
false
;
this
.
_freshing
=
false
;
},
1000
);
},
onRestore
()
{
this
.
triggered
=
"restore"
;
},
reachBottom
()
{
console
.
log
(
"-----bottom will-----"
);
if
(
this
.
bottomLoading
||
this
.
currentLoadStatus
==
this
.
loadStatus
[
2
])
{
return
;
}
console
.
log
(
"-----bottom did-----"
);
this
.
bottomLoading
=
true
;
setTimeout
(()
=>
{
// 加载更多数据
// ...
this
.
orderList
.
push
(...[{},
{},
{},
{},
{},
{},
{},
{},
{},
{}]);
// 加载完成
this
.
currentLoadStatus
=
false
/*是否还有*/
?
this
.
loadStatus
[
1
]
:
this
.
loadStatus
[
2
];
this
.
$nextTick
(
function
()
{
this
.
bottomLoading
=
false
;
});
},
1000
);
},
// clickSwiper(index) {},
handleScroll
()
{
console
.
log
(
"-----scroll-------"
);
},
immediatelyIn
()
{
if
(
this
.
vuex_token
)
{
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
var
pageIndex
=
1
;
switch
(
this
.
status
)
{
case
1
:
case
2
:
case
3
:
case
4
:
pageIndex
=
2
;
break
;
case
8
:
pageIndex
=
3
;
break
;
case
5
:
case
6
:
pageIndex
=
4
;
break
;
case
7
:
pageIndex
=
5
;
break
;
default
:
pageIndex
=
1
;
break
;
}
uni
.
navigateTo
({
url
:
this
.
status
>
0
?
"/pages/settle/prompt?pageIndex="
+
pageIndex
:
"/pages/settle/index"
,
});
}
else
{
uni
.
navigateTo
({
url
:
"pages/login/index"
,
});
}
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.content
{
height
:
100vh
;
background-color
:
#f4f5f7
;
padding
:
0rpx
30rpx
0
30rpx
;
overflow-y
:
auto
;
.title-view
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
40rpx
;
}
.banner-image
{
width
:
730rpx
;
height
:
280rpx
;
margin-left
:
-14rpx
;
}
.msg-view
{
.msg-title
{
color
:
#333333
;
font-size
:
32rpx
;
font-weight
:
bold
;
padding
:
1rpx
0rpx
30rpx
0rpx
;
}
.msg-list-view
{
border-radius
:
12rpx
;
background-color
:
#ffffff
;
padding
:
12rpx
30rpx
;
height
:
252rpx
;
}
.msg-content
{
color
:
#333333
;
font-size
:
26rpx
;
.msg-content-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
20rpx
;
margin-bottom
:
20rpx
;
.left-view
{
display
:
flex
;
align-items
:
center
;
.msg-icon
{
width
:
80rpx
;
height
:
36rpx
;
margin-right
:
20rpx
;
}
.msg-text
{
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
448rpx
;
}
}
.right-icon
{
width
:
14rpx
;
height
:
24rpx
;
}
}
.line-view
{
height
:
2rpx
;
background-color
:
#f4f5f7
;
}
}
}
}
}
},
onLoad
()
{
.logo
{
},
height
:
200
rpx
;
onShow
()
{
width
:
100%
;
// 每次进入页面都刷新入驻状态
margin
:
0
rpx
auto
50
rpx
auto
;
if
(
this
.
vuex_token
)
{
this
.
initSettleInfo
();
}
else
{
// 初始化订单数据
this
.
loadOrderList
();
}
}
},
onPullDownRefresh
()
{
console
.
log
(
'------下拉刷新------'
)
// 下拉刷洗
this
.
initSettleInfo
()
},
methods
:
{
handleClick
()
{
// 点击了cell
console
.
log
(
'点击了cell'
)
},
handleAction
()
{
// 点击了按钮
console
.
log
(
'点击了按钮'
)
},
async
initSettleInfo
()
{
let
self
=
this
;
const
callBack
=
(
vm
,
result
)
=>
{
// 后台自动判断入驻流程是否完成,前台通过status确定状态
if
(
result
&&
result
.
record
)
{
vm
.
loaded
=
true
;
vm
.
needSettled
=
result
.
needSettled
;
vm
.
status
=
Number
(
result
.
record
.
status
||
'0'
);
// vm.status = 8
}
};
await
app
.
getBaseInfo
(
self
,
callBack
);
// 加载消息列表
self
.
loadMessageList
();
self
.
loadOrderList
();
},
loadMessageList
()
{
let
self
=
this
;
self
.
$u
.
api
.
listByNotice
().
then
((
res
)
=>
{
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
3
)
{
self
.
messageList
=
res
.
data
.
slice
(
0
,
3
);
}
else
{
self
.
messageList
=
res
.
data
||
[];
}
}
else
{
console
.
log
(
res
.
message
,
"初始化消息列表异常"
);
}
});
},
loadOrderList
()
{
let
self
=
this
;
// 加载订单列表
self
.
search
.
token
=
self
.
vuex_token
;
self
.
$u
.
api
.
listByRecommendOrder
(
self
.
search
).
then
((
res
)
=>
{
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
self
.
orderList
.
push
().
apply
(
res
.
data
);
}
}
else
{
console
.
log
(
res
.
message
,
"初始化订单列表异常"
);
}
});
},
onRefresh
()
{
if
(
this
.
_freshing
)
return
;
this
.
_freshing
=
true
;
// 获取入驻状态
this
.
initSettleInfo
();
// 获取推荐订单及数量
// ....
setTimeout
(()
=>
{
// 数据加载完成更新入驻状态和推荐列表
this
.
triggered
=
false
;
this
.
_freshing
=
false
;
},
1000
);
},
onRestore
()
{
this
.
triggered
=
"restore"
;
},
reachBottom
()
{
console
.
log
(
"-----bottom will-----"
);
if
(
this
.
bottomLoading
||
this
.
currentLoadStatus
==
this
.
loadStatus
[
2
])
{
return
;
}
console
.
log
(
"-----bottom did-----"
);
this
.
bottomLoading
=
true
;
setTimeout
(()
=>
{
// 加载更多数据
// ...
this
.
orderList
.
push
(...[{},
{},
{},
{},
{},
{},
{},
{},
{},
{}]);
// 加载完成
this
.
currentLoadStatus
=
false
/*是否还有*/
?
this
.
loadStatus
[
1
]
:
this
.
loadStatus
[
2
];
this
.
$nextTick
(
function
()
{
this
.
bottomLoading
=
false
;
});
},
1000
);
},
// clickSwiper(index) {},
handleScroll
()
{
console
.
log
(
"-----scroll-------"
);
},
immediatelyIn
()
{
if
(
this
.
vuex_token
)
{
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
var
pageIndex
=
1
;
switch
(
this
.
status
)
{
case
1
:
case
2
:
case
3
:
case
4
:
pageIndex
=
2
;
break
;
case
8
:
pageIndex
=
3
;
break
;
case
5
:
case
6
:
pageIndex
=
4
;
break
;
case
7
:
pageIndex
=
5
;
break
;
default
:
pageIndex
=
1
;
break
;
}
uni
.
navigateTo
({
url
:
this
.
status
>
0
?
"/pages/settle/prompt?pageIndex="
+
pageIndex
:
"/pages/settle/index"
,
});
}
else
{
uni
.
navigateTo
({
url
:
"pages/login/index"
,
});
}
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.text-area
{
display
:
flex
;
.content
{
justify-content
:
center
;
height
:
100vh
;
}
background-color
:
#f4f5f7
;
padding
:
0rpx
30rpx
0
30rpx
;
.title
{
overflow-y
:auto
;
font-size
:
36
rpx
;
.title-view
{
color
:
#8f8f94
;
color
:
#333333
;
}
font-weight
:
bold
;
font-size
:
40rpx
;
// .sticky-view {
}
// position: sticky;
// position: -webkit-sticky;
.banner-image
{
// top: 0rpx;
width
:
730rpx
;
// width: 100%;
height
:
280rpx
;
// height: 200rpx;
margin-left
:
-14rpx
;
// background-color: black;
}
// }
.msg-view
{
.sticky
{
.msg-title
{
background-color
:
#f4f5f7
;
color
:
#333333
;
color
:
#fff
;
font-size
:
32rpx
;
padding
:
24
rpx
;
font-weight
:
bold
;
text-align
:
left
;
padding
:
1rpx
0rpx
30rpx
0rpx
;
font-size
:
32rpx
;
}
font-weight
:
bold
;
color
:
#333333
;
.msg-list-view
{
padding
:
46rpx
0
28rpx
0
;
border-radius
:
12rpx
;
}
background-color
:
#ffffff
;
padding
:
12rpx
30rpx
;
.order-view
{
height
:
252rpx
;
text-align
:
center
;
}
.order-list-view
{
.msg-content
{
color
:
#333333
;
.tip-view
{
font-size
:
26rpx
;
padding
:
30rpx
;
background-color
:
#ffffff
;
.msg-content-view
{
border-radius
:
12rpx
;
display
:
flex
;
align-items
:
center
;
.tip-title
{
justify-content
:
space-between
;
font-size
:
32rpx
;
margin-top
:
20rpx
;
font-weight
:
bold
;
margin-bottom
:
20rpx
;
color
:
#333333
;
margin-top
:
30rpx
;
.left-view
{
}
display
:
flex
;
align-items
:
center
;
.tip-count
{
.msg-icon
{
color
:
#2272ff
;
width
:
80rpx
;
font-size
:
70rpx
;
height
:
36rpx
;
font-weight
:
bold
;
margin-right
:
20rpx
;
margin-top
:
50rpx
;
}
margin-bottom
:
20rpx
;
.msg-text
{
}
text-overflow
:
ellipsis
;
overflow
:
hidden
;
.tip-other
{
white-space
:
nowrap
;
font-size
:
28rpx
;
width
:
448rpx
;
color
:
#333333
;
}
margin-bottom
:
56rpx
;
}
}
}
.right-icon
{
width
:
14rpx
;
.order-item-view
{
height
:
24rpx
;
background-color
:
#F4F5F7
;
}
border-radius
:
12rpx
;
}
}
.line-view
{
.no-order-view
{
height
:
2rpx
;
display
:
flex
;
background-color
:
#f4f5f7
;
flex-direction
:
column
;
}
justify-content
:
center
;
}
align-items
:
center
;
}
color
:
#666666
;
}
font-size
:
28rpx
;
padding
:
30rpx
;
.logo
{
background-color
:
#ffffff
;
height
:
200
rpx
;
border-radius
:
12rpx
;
width
:
100%
;
min-height
:
460rpx
;
margin
:
0
rpx
auto
50
rpx
auto
;
}
.no-order-image
{
width
:
374rpx
;
.text-area
{
height
:
218rpx
;
display
:
flex
;
margin-top
:
70rpx
;
justify-content
:
center
;
margin-bottom
:
20rpx
;
}
}
}
.title
{
font-size
:
36
rpx
;
color
:
#8f8f94
;
}
// .sticky-view {
// position: sticky;
// position: -webkit-sticky;
// top: 0rpx;
// width: 100%;
// height: 200rpx;
// background-color: black;
// }
.sticky
{
background-color
:
#f4f5f7
;
color
:
#fff
;
padding
:
24
rpx
;
text-align
:
left
;
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
padding
:
46rpx
0
28rpx
0
;
}
.order-view
{
text-align
:
center
;
min-height
:
460rpx
;
.order-list-view
{
background-color
:
#ffffff
;
border-radius
:
12rpx
;
min-height
:
460rpx
;
padding
:
30rpx
;
margin-bottom
:
30rpx
;
.order-item-view
{
}
.no-order-view
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
color
:
#666666
;
font-size
:
28rpx
;
.no-order-image
{
width
:
374rpx
;
height
:
218rpx
;
margin-top
:
100rpx
;
margin-bottom
:
20rpx
;
}
}
}
}
.tip-view
{
.bottom-view
{
.tip-title
{
display
:
flex
;
font-size
:
32rpx
;
align-items
:
center
;
font-weight
:
bold
;
justify-content
:
space-between
;
color
:
#333333
;
padding
:
50rpx
40rpx
50rpx
40rpx
;
margin-top
:
30rpx
;
}
.bottom-line-view
{
background-color
:
#D5D5D5
;
.tip-count
{
height
:
2rpx
;
color
:
#2272ff
;
width
:
30%
;
font-size
:
70rpx
;
}
font-weight
:
bold
;
margin-top
:
50rpx
;
.bottom-text
{
margin-bottom
:
20rpx
;
color
:
#999999
;
}
font-size
:
24rpx
;
}
.tip-other
{
}
font-size
:
28rpx
;
</
style
>
color
:
#333333
;
margin-bottom
:
56rpx
;
}
}
}
}
.bottom-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
20rpx
40rpx
50rpx
40rpx
;
.bottom-line-view
{
background-color
:
#D5D5D5
;
height
:
2rpx
;
width
:
30%
;
}
.bottom-text
{
color
:
#999999
;
font-size
:
24rpx
;
}
}
</
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