Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xinrenli-app
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
xinrenli-app
Commits
22681fd6
Commit
22681fd6
authored
Apr 12, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
倒计时,轮播图跳转
parent
61feeae6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
323 additions
and
274 deletions
+323
-274
demand/payment/index.vue
+54
-26
my/coupon/index.vue
+2
-2
my/invite/index.vue
+1
-1
my/login/login.vue
+4
-4
pages/demand/components/index.vue
+2
-2
pages/demand/index.vue
+1
-1
pages/home/index.vue
+259
-238
No files found.
demand/payment/index.vue
View file @
22681fd6
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</view>
</view>
<view
class=
"content-accomplish"
>
<view
class=
"content-accomplish"
>
<view
class=
""
>
<view
class=
""
>
截止1小时内支付完成
<text>
00:59:42
</text>
截止1小时内支付完成
<text>
{{
detailInfo
.
isEndTime
}}
</text>
</view>
</view>
<button
@
click=
"jump(2)"
>
立即支付
{{
sumPrice
}}
元
</button>
<button
@
click=
"jump(2)"
>
立即支付
{{
sumPrice
}}
元
</button>
</view>
</view>
...
@@ -52,7 +52,9 @@
...
@@ -52,7 +52,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
userDiscountList
}
from
'@/api/system/index.js'
import
{
userDiscountList
}
from
'@/api/system/index.js'
import
apiBaseConfig
from
'@/config/index.js'
;
import
apiBaseConfig
from
'@/config/index.js'
;
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -62,9 +64,12 @@
...
@@ -62,9 +64,12 @@
scrollTopHeader
:
0
,
scrollTopHeader
:
0
,
isUse
:
true
,
isUse
:
true
,
detailInfo
:
{},
//详情数据
detailInfo
:
{},
//详情数据
payInfo
:{},
payInfo
:
{},
discountList
:[]
discountList
:
[],
timer
:
""
,
//定时器
isEndTime
:
""
,
//倒计时要有个初始值
};
};
},
},
created
()
{
created
()
{
...
@@ -74,48 +79,71 @@
...
@@ -74,48 +79,71 @@
let
that
=
this
let
that
=
this
if
(
option
.
detailInfo
)
{
if
(
option
.
detailInfo
)
{
this
.
detailInfo
=
JSON
.
parse
(
decodeURIComponent
(
option
.
detailInfo
))
this
.
detailInfo
=
JSON
.
parse
(
decodeURIComponent
(
option
.
detailInfo
))
console
.
log
(
this
.
detailInfo
,
'读书'
)
}
}
this
.
timer
=
setInterval
(()
=>
{
let
allTime
=
0
;
let
h
=
that
.
detailInfo
.
isEndTime
.
substring
(
0
,
2
);
let
m
=
that
.
detailInfo
.
isEndTime
.
substring
(
3
,
5
);
let
s
=
that
.
detailInfo
.
isEndTime
.
substring
(
6
,
8
);
allTime
=
Number
(
h
)
*
60
*
60
+
Number
(
m
)
*
60
+
Number
(
s
);
if
(
allTime
<=
0
)
return
clearInterval
(
this
.
timer
);
//执行倒计时结束逻辑
allTime
--
;
h
=
parseInt
(
allTime
/
3600
)
<
10
?
'0'
+
String
(
parseInt
(
allTime
/
3600
))
:
parseInt
(
allTime
/
3600
);
m
=
parseInt
(
allTime
/
60
)
<
10
?
'0'
+
String
(
parseInt
(
allTime
/
60
))
:
parseInt
(
allTime
/
60
);
s
=
allTime
%
60
<
10
?
'0'
+
String
(
allTime
%
60
)
:
allTime
%
60
;
that
.
detailInfo
.
isEndTime
=
h
+
"时"
+
m
+
"分"
+
s
+
"秒"
;
},
1000
)
uni
.
$on
(
'payInfo'
,
res
=>
{
uni
.
$on
(
'payInfo'
,
res
=>
{
console
.
log
(
res
,
'打算今年'
);
that
.
payInfo
=
res
that
.
payInfo
=
res
})
})
},
},
onUnload
()
{
onUnload
()
{
uni
.
$off
(
'payInfo'
)
uni
.
$off
(
'payInfo'
)
},
},
computed
:{
computed
:
{
sumPrice
(){
sumPrice
()
{
let
that
=
this
let
that
=
this
// 1.判断优惠券是否有值并且价格大于优惠券时
// 1.判断优惠券是否有值并且价格大于优惠券时
// console.log(that.payInfo.fullSubtraction,that.detailInfo.actualAmount,'第三句话')
// console.log(that.payInfo.fullSubtraction,that.detailInfo.actualAmount,'第三句话')
if
(
that
.
payInfo
.
fullSubtraction
&&
Number
(
that
.
detailInfo
.
actualAmount
)
>
Number
(
that
.
payInfo
.
fullSubtraction
)){
if
(
that
.
payInfo
.
fullSubtraction
&&
Number
(
that
.
detailInfo
.
actualAmount
)
>
Number
(
that
.
payInfo
.
fullSubtraction
))
{
// console.log('优质',that.detailInfo.actualAmount - that.payInfo.fullSubtraction)
// console.log('优质',that.detailInfo.actualAmount - that.payInfo.fullSubtraction)
// 判断是否使用折扣(使用×折扣)
// 判断是否使用折扣(使用×折扣)
return
that
.
isUse
?
Number
((
that
.
detailInfo
.
actualAmount
-
that
.
payInfo
.
fullSubtraction
)
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
):
Number
(
that
.
detailInfo
.
actualAmount
-
that
.
payInfo
.
fullSubtraction
).
toFixed
(
2
)
return
that
.
isUse
?
Number
((
that
.
detailInfo
.
actualAmount
-
that
.
payInfo
.
fullSubtraction
)
*
that
}
else
{
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
)
:
Number
(
that
.
detailInfo
.
actualAmount
-
that
.
payInfo
if
(
that
.
discountList
.
length
&&
that
.
discountList
[
0
].
discountRatio
){
.
fullSubtraction
).
toFixed
(
2
)
return
that
.
detailInfo
.
actualAmount
&&
that
.
isUse
?
Number
(
that
.
detailInfo
.
actualAmount
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
)
:
that
.
detailInfo
.
actualAmount
}
else
{
}
else
{
if
(
that
.
discountList
.
length
&&
that
.
discountList
[
0
].
discountRatio
)
{
return
that
.
detailInfo
.
actualAmount
&&
that
.
isUse
?
Number
(
that
.
detailInfo
.
actualAmount
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
)
:
that
.
detailInfo
.
actualAmount
}
else
{
that
.
isUse
=
false
that
.
isUse
=
false
return
that
.
detailInfo
.
actualAmount
&&
that
.
isUse
?
Number
(
that
.
detailInfo
.
actualAmount
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
)
:
that
.
detailInfo
.
actualAmount
return
that
.
detailInfo
.
actualAmount
&&
that
.
isUse
?
Number
(
that
.
detailInfo
.
actualAmount
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
)
:
that
.
detailInfo
.
actualAmount
}
}
}
}
}
}
},
},
methods
:
{
methods
:
{
async
getDisCountList
(){
async
getDisCountList
()
{
const
data_back
=
await
userDiscountList
({
useStatus
:
0
})
const
data_back
=
await
userDiscountList
({
const
{
code
,
rows
,
total
}
=
data_back
useStatus
:
0
if
(
code
===
200
&&
total
>
0
){
})
const
{
code
,
rows
,
total
}
=
data_back
if
(
code
===
200
&&
total
>
0
)
{
this
.
discountList
=
rows
this
.
discountList
=
rows
this
.
isUse
=
true
this
.
isUse
=
true
}
else
{
}
else
{
this
.
isUse
=
false
this
.
isUse
=
false
}
}
},
},
jump
(
val
)
{
jump
(
val
)
{
let
that
=
this
let
that
=
this
if
(
val
==
1
)
{
if
(
val
==
1
)
{
...
@@ -124,9 +152,9 @@
...
@@ -124,9 +152,9 @@
});
});
}
else
{
}
else
{
let
orderQuery
=
{
let
orderQuery
=
{
orderId
:
that
.
detailInfo
.
id
,
//订单的id
orderId
:
that
.
detailInfo
.
id
,
//订单的id
couponId
:
that
.
payInfo
.
id
?
that
.
payInfo
.
id
:
''
,
//优惠券的id
couponId
:
that
.
payInfo
.
id
?
that
.
payInfo
.
id
:
''
,
//优惠券的id
discountId
:
that
.
isUse
&&
that
.
discountList
.
length
?
that
.
discountList
[
0
].
id
:
''
,
//折扣的id
discountId
:
that
.
isUse
&&
that
.
discountList
.
length
?
that
.
discountList
[
0
].
id
:
''
,
//折扣的id
}
}
this
.
$uniGo
.
navigateTo
({
this
.
$uniGo
.
navigateTo
({
url
:
`/demand/confirm/index?orderQuery=
${
encodeURIComponent
(
JSON
.
stringify
(
orderQuery
))}
&sumPrice=
${
that
.
sumPrice
}
&title=
${
this
.
detailInfo
.
title
}
`
url
:
`/demand/confirm/index?orderQuery=
${
encodeURIComponent
(
JSON
.
stringify
(
orderQuery
))}
&sumPrice=
${
that
.
sumPrice
}
&title=
${
this
.
detailInfo
.
title
}
`
...
...
my/coupon/index.vue
View file @
22681fd6
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<view
class=
"index"
>
<view
class=
"index"
>
<com-navbar
:title=
"title"
:titleStyle=
"
{ color: '#000000', fontSize: '32rpx' }" />
<com-navbar
:title=
"title"
:titleStyle=
"
{ color: '#000000', fontSize: '32rpx' }" />
<view
class=
"index-content"
v-if=
"useCouponList.length || couponLoseList.length"
>
<view
class=
"index-content"
v-if=
"useCouponList.length || couponLoseList.length"
>
<view
class=
"index-content-item"
v-for=
"(item,index) in useCouponList"
>
<view
class=
"index-content-item"
>
<view
class=
"index-content-item-nav baiyin-flex baiyin-flex-c-b"
>
<view
class=
"index-content-item-nav baiyin-flex baiyin-flex-c-b"
>
<text></text>
<text></text>
<view>
可用优惠券
{{
cantotal
}}
</view>
<view>
可用优惠券
{{
cantotal
}}
</view>
</view>
</view>
<view
class=
"index-content-item-qu"
@
click=
"optionData.type === 'pay'?jump(item):null"
>
<view
class=
"index-content-item-qu"
v-for=
"(item,index) in useCouponList"
@
click=
"optionData.type === 'pay'?jump(item):null"
>
<image
class=
"index-content-item-qu-bg"
src=
"@/static/icon/xy01.png"
mode=
""
></image>
<image
class=
"index-content-item-qu-bg"
src=
"@/static/icon/xy01.png"
mode=
""
></image>
<view
class=
"index-content-item-qu-bl"
>
<view
class=
"index-content-item-qu-bl"
>
<text
class=
"index-content-item-qu-bl-tl"
>
满减优惠券
</text>
<text
class=
"index-content-item-qu-bl-tl"
>
满减优惠券
</text>
...
...
my/invite/index.vue
View file @
22681fd6
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
var
eData
=
options
.
target
.
dataset
;
var
eData
=
options
.
target
.
dataset
;
console
.
log
(
eData
.
name
);
// shareBtn
console
.
log
(
eData
.
name
);
// shareBtn
// 此处可以修改 shareObj 中的内容
// 此处可以修改 shareObj 中的内容
shareObj
.
path
=
'/my/login/login?id=${that.$store.state.login.userInfo.user.id}'
;
shareObj
.
path
=
`/my/login/login?id=
${
that
.
$store
.
state
.
login
.
userInfo
.
user
.
id
}
`
;
}
}
console
.
log
(
"shareObj"
,
shareObj
)
console
.
log
(
"shareObj"
,
shareObj
)
// 返回shareObj
// 返回shareObj
...
...
my/login/login.vue
View file @
22681fd6
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
xcxCode
:
''
xcxCode
:
''
},
},
token
:
''
,
token
:
''
,
I
nviterId
:
''
,
//邀请人的id
i
nviterId
:
''
,
//邀请人的id
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
})
})
this
.
getUserInfo
()
this
.
getUserInfo
()
if
(
option
.
id
){
if
(
option
.
id
){
this
.
I
nviterId
=
option
.
id
this
.
i
nviterId
=
option
.
id
}
}
},
},
methods
:
{
methods
:
{
...
@@ -56,9 +56,9 @@
...
@@ -56,9 +56,9 @@
async
getSessionkeyAndOpenId
(
xcxCode
)
{
async
getSessionkeyAndOpenId
(
xcxCode
)
{
let
that
=
this
let
that
=
this
let
codeParams
=
{}
let
codeParams
=
{}
if
(
that
.
I
nviterId
){
if
(
that
.
i
nviterId
){
that
.
$set
(
codeParams
,
'xcxCode'
,
xcxCode
)
that
.
$set
(
codeParams
,
'xcxCode'
,
xcxCode
)
that
.
$set
(
codeParams
,
'
InviterId'
,
that
.
I
nviterId
)
that
.
$set
(
codeParams
,
'
inviterId'
,
that
.
i
nviterId
)
}
else
{
}
else
{
that
.
$set
(
codeParams
,
'xcxCode'
,
xcxCode
)
that
.
$set
(
codeParams
,
'xcxCode'
,
xcxCode
)
}
}
...
...
pages/demand/components/index.vue
View file @
22681fd6
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
<view
class=
"buttoncolor"
v-if=
"subscript == '3'"
>
<view
class=
"buttoncolor"
v-if=
"subscript == '3'"
>
<button
v-if=
"item.status == 3"
style=
"background: red;"
class=
"buttoncl"
<button
v-if=
"item.status == 3"
style=
"background: red;"
class=
"buttoncl"
@
click
.
stop=
"abolish(2,item)"
>
退款
</button>
@
click
.
stop=
"abolish(2,item)"
>
退款
</button>
<button
v-else-if=
"item.status == 5 || item.status == 6"
class=
"buttonclde buttonGray"
<button
v-else-if=
"item.status ==
4 || item.status ==
5 || item.status == 6"
class=
"buttonclde buttonGray"
@
click
.
stop=
"abolish(4,item)"
>
{{
item
.
status
==
5
?
'退款中'
:
'已退款
'
}}
</button>
@
click
.
stop=
"abolish(4,item)"
>
{{
item
.
status
==
4
?
'已完成'
:
item
.
status
==
5
?
'退款中'
:
item
.
status
==
6
?
'已退款'
:
'
'
}}
</button>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
</view>
</view>
</view>
</view>
...
...
pages/demand/index.vue
View file @
22681fd6
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
that
.
statusNeedList
=
[]
that
.
statusNeedList
=
[]
if
(
that
.
subscript
==
3
)
{
if
(
that
.
subscript
==
3
)
{
that
.
$delete
(
that
.
needInfo
,
"status"
)
that
.
$delete
(
that
.
needInfo
,
"status"
)
that
.
$set
(
that
.
needInfo
,
'statusList'
,
'3,5,6'
)
that
.
$set
(
that
.
needInfo
,
'statusList'
,
'3,
4,
5,6'
)
}
else
{
}
else
{
that
.
$delete
(
that
.
needInfo
,
"statusList"
)
that
.
$delete
(
that
.
needInfo
,
"statusList"
)
}
}
...
...
pages/home/index.vue
View file @
22681fd6
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<image
class=
"logo"
src=
"/static//icon/sytb.png"
></image>
<image
class=
"logo"
src=
"/static//icon/sytb.png"
></image>
<view
:style=
"
{ height: `calc(${globalData.statusBarHeight}rpx + 158rpx)` }">
</view>
<view
:style=
"
{ height: `calc(${globalData.statusBarHeight}rpx + 158rpx)` }">
</view>
<view
class=
"content-swiper"
>
<view
class=
"content-swiper"
>
<u-swiper
:list=
"swiperList"
keyName=
"img"
@
change=
"e => (current = e.current)"
:autoplay=
"true"
<u-swiper
circular
:list=
"swiperList"
keyName=
"img"
@
change=
"e => (current = e.current)"
:autoplay=
"true"
height=
"300rpx"
>
height=
"300rpx"
@
click=
"handleSwiper"
>
<view
slot=
"indicator"
class=
"indicator"
>
<view
slot=
"indicator"
class=
"indicator"
>
<view
class=
"indicator__dot"
v-for=
"(item, index) in swiperList"
:key=
"index"
<view
class=
"indicator__dot"
v-for=
"(item, index) in swiperList"
:key=
"index"
:class=
"[index === current && 'indicator__dot--active']"
></view>
:class=
"[index === current && 'indicator__dot--active']"
></view>
</view>
</view>
</u-swiper>
</u-swiper>
</view>
</view>
<view
class=
"content-matter"
>
<view
class=
"content-matter"
>
<view
class=
"content-matter-market"
>
<view
class=
"content-matter-market"
>
<view></view>
<view></view>
<view>
用户需求广场
</view>
<view>
用户需求广场
</view>
</view>
<view
class=
""
v-if=
"userNeedList && userNeedList.length"
>
<view
class=
"content-matter-marketplace"
v-for=
"(v , index) in userNeedList"
@
click=
"clickJump(v)"
:key=
"index"
>
<image
:src=
"v.fileVos[0].url"
mode=
""
></image>
<view
class=
"content-matter-marketplace-bazaar d-flex flex-column j-center"
>
<view
class=
""
>
{{
v
.
title
}}
</view>
<view
class=
""
>
说明:
{{
v
.
remark
?
v
.
remark
:
'暂无说明'
}}
</view>
<view
class=
""
>
<text>
维修时间:
</text>
<text>
{{
v
.
repairTime
|
formatDate
}}
</text>
</view>
</view>
</view>
</view>
<view
v-else
class=
"diagram"
>
<image
src=
"@/static/icon/qst.png"
mode=
""
></image>
<view
class=
""
>
暂无数据
</view>
</view>
</view>
<u-loadmore
v-if=
"userNeedList && userNeedList.length"
iconSize=
"50px"
@
loadmore=
"loadMore"
color=
"#6A6C6F"
fontSize=
"24rpx"
:nomore-text=
"nomoreText"
:loading-text=
"loadingText"
line
:status=
"loadStatus"
/>
<view
class=
""
v-if=
"userNeedList && userNeedList.length"
>
</view>
<view
class=
"content-matter-marketplace"
v-for=
"(v , index) in userNeedList"
@
click=
"clickJump(v)"
<com-navbar
:leftIcon=
"false"
:homeShow=
"false"
bgColor=
"transparent"
title=
"首页"
:key=
"index"
>
:titleStyle=
"
{ color: '#FFFFFF', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
<image
:src=
"v.pictureList[0].url"
mode=
""
></image>
<com-tabbar
:list=
"tabBarList"
></com-tabbar>
<view
class=
"content-matter-marketplace-bazaar d-flex flex-column j-center"
>
</view>
<view
class=
""
>
</
template
>
{{
v
.
title
}}
</view>
<view
class=
""
>
说明:
{{
v
.
remark
?
v
.
remark
:
'暂无说明'
}}
</view>
<view
class=
""
>
<text>
维修时间:
</text>
<text>
{{
v
.
repairTime
|
formatDate
}}
</text>
</view>
</view>
</view>
</view>
<view
v-else
class=
"diagram"
>
<image
src=
"@/static/icon/qst.png"
mode=
""
></image>
<view
class=
""
>
暂无数据
</view>
</view>
<u-loadmore
v-if=
"userNeedList && userNeedList.length"
iconSize=
"50px"
@
loadmore=
"loadMore"
color=
"#6A6C6F"
fontSize=
"24rpx"
:nomore-text=
"nomoreText"
:loading-text=
"loadingText"
line
:status=
"loadStatus"
/>
</view>
<com-navbar
:leftIcon=
"false"
:homeShow=
"false"
bgColor=
"transparent"
title=
"首页"
:titleStyle=
"
{ color: '#FFFFFF', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
<com-tabbar
:list=
"tabBarList"
></com-tabbar>
</view>
</
template
>
<
script
>
<
script
>
import
{
userNeedSquare
}
from
'@/api/system/index.js'
import
{
export
default
{
userNeedSquare
data
()
{
}
from
'@/api/system/index.js'
return
{
export
default
{
title
:
'Hello'
,
data
()
{
globalData
:
getApp
().
globalData
,
return
{
scrollTopHeader
:
0
,
title
:
'Hello'
,
tabBarList
:
[{
globalData
:
getApp
().
globalData
,
name
:
"首页"
,
// name
scrollTopHeader
:
0
,
icon
:
"/static/tabbar/tb1.png"
,
// 图标
swiperList
:
[
selectIcon
:
"/static/tabbar/td1.png"
,
// 选中图标
'https://cdn.uviewui.com/uview/swiper/swiper1.png'
,
url
:
"/pages/home/index"
,
// 页面路径
'https://cdn.uviewui.com/uview/swiper/swiper2.png'
,
type
:
'home'
'https://cdn.uviewui.com/uview/swiper/swiper3.png'
,
},
{
],
name
:
"我的需求"
,
// name
tabBarList
:
[{
icon
:
"/static/tabbar/tb2.png"
,
// 图标
name
:
"首页"
,
// name
selectIcon
:
"/static/tabbar/td2.png"
,
// 选中图标
icon
:
"/static/tabbar/tb1.png"
,
// 图标
url
:
"/pages/demand/index"
,
// 页面路径
selectIcon
:
"/static/tabbar/td1.png"
,
// 选中图标
type
:
'type'
url
:
"/pages/home/index"
,
// 页面路径
},
{
type
:
'home'
name
:
"发布"
,
// name
},
{
icon
:
"/static/tabbar/fb.png"
,
// 图标
name
:
"我的需求"
,
// name
selectIcon
:
"/static/tabbar/fb.png"
,
// 选中图标
icon
:
"/static/tabbar/tb2.png"
,
// 图标
url
:
"/pages/release/index"
,
// 页面路径
selectIcon
:
"/static/tabbar/td2.png"
,
// 选中图标
type
:
'type'
url
:
"/pages/demand/index"
,
// 页面路径
},
{
type
:
'type'
name
:
"动态"
,
},
{
icon
:
"/static/tabbar/tb3.png"
,
// 图标
name
:
"发布"
,
// name
selectIcon
:
"/static/tabbar/td3.png"
,
// 选中图标
icon
:
"/static/tabbar/fb.png"
,
// 图标
url
:
"/pages/order/index"
,
selectIcon
:
"/static/tabbar/fb.png"
,
// 选中图标
type
:
'type'
url
:
"/pages/release/index"
,
// 页面路径
},
{
type
:
'type'
name
:
"我的"
,
},
{
icon
:
"/static/tabbar/tb4.png"
,
// 图标
name
:
"动态"
,
selectIcon
:
"/static/tabbar/td4.png"
,
// 选中图标
icon
:
"/static/tabbar/tb3.png"
,
// 图标
url
:
"/pages/my/index"
,
selectIcon
:
"/static/tabbar/td3.png"
,
// 选中图标
type
:
'type'
url
:
"/pages/order/index"
,
type
:
'type'
},
{
name
:
"我的"
,
icon
:
"/static/tabbar/tb4.png"
,
// 图标
selectIcon
:
"/static/tabbar/td4.png"
,
// 选中图标
url
:
"/pages/my/index"
,
type
:
'type'
}],
}],
userNeedList
:
[],
//需求广场列表
userNeedList
:
[],
//需求广场列表
total
:
0
,
//列表总数
total
:
0
,
//列表总数
queryParams
:{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
},
},
loadStatus
:
'loading'
,
//加载时的状态(loadmore/ loading / nomore)
loadStatus
:
'loading'
,
//加载时的状态(loadmore/ loading / nomore)
loadingText
:
'正在加载'
,
loadingText
:
'正在加载'
,
nomoreText
:
'已经到底了'
nomoreText
:
'已经到底了'
}
}
},
},
onLoad
()
{
onLoad
()
{
this
.
getSquare
()
this
.
getSquare
()
},
},
onPageScroll
(
res
)
{
onPageScroll
(
res
)
{
this
.
scrollTopHeader
=
res
.
scrollTop
;
this
.
scrollTopHeader
=
res
.
scrollTop
;
},
},
onReachBottom
()
{
onReachBottom
()
{
let
that
=
this
let
that
=
this
if
(
that
.
total
<
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
that
.
nomore
=
'nomore'
if
(
that
.
total
<
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
that
.
nomore
=
'nomore'
that
.
queryParams
.
pageNum
++
that
.
queryParams
.
pageNum
++
that
.
getSquare
()
that
.
getSquare
()
},
},
methods
:
{
methods
:
{
getSquare
(){
getSquare
()
{
let
that
=
this
let
that
=
this
userNeedSquare
(
this
.
queryParams
).
then
(
res
=>
{
userNeedSquare
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
,
'需求广场'
)
console
.
log
(
res
,
'需求广场'
)
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
total
>
0
)
{
if
(
res
.
total
>
0
)
{
that
.
total
=
res
.
total
that
.
total
=
res
.
total
if
(
that
.
total
<=
that
.
queryParams
.
pageSize
)
{
if
(
that
.
total
<=
that
.
queryParams
.
pageSize
)
{
that
.
loadStatus
=
'nomore'
that
.
loadStatus
=
'nomore'
}
}
if
(
that
.
queryParams
.
pageNum
==
1
)
{
if
(
that
.
queryParams
.
pageNum
==
1
)
{
that
.
userNeedList
=
res
.
rows
that
.
userNeedList
=
res
.
rows
}
else
{
}
else
{
that
.
userNeedList
=
[...
that
.
userNeedList
,...
res
.
rows
]
that
.
userNeedList
=
[...
that
.
userNeedList
,
...
res
.
rows
]
}
}
}
}
}
}
})
})
},
clickJump
(
info
)
{
this
.
$uniGo
.
navigateTo
({
url
:
`/home/index/index?id=
${
info
.
id
}
`
});
},
},
loadMore
(){
clickJump
(
info
)
{
this
.
$uniGo
.
navigateTo
({
url
:
`/home/index/index?id=
${
info
.
id
}
`
});
},
handleSwiper
(
index
){
console
.
log
(
index
,
'下表'
)
let
data
=
{
id
:
"1645720411777540114"
}
let
subscript
=
1
this
.
$uniGo
.
navigateTo
({
url
:
`/demand/index/index?detailInfo=
${
encodeURIComponent
(
JSON
.
stringify
(
data
))}
&subscript=
${
subscript
}
`
// url: `/demand/index/index?subscript=${this.subscript}`
});
},
loadMore
()
{
console
.
log
(
'加载更多'
)
console
.
log
(
'加载更多'
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
page
{
page
{
background-color
:
#f3f4f6
;
background-color
:
#f3f4f6
;
}
}
</
style
>
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.content
{
.content
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
center
;
justify-content
:
center
;
&-swiper
{
&-swiper
{
height
:
280
rpx
;
height
:
280
rpx
;
background
:
#d8d8d8
;
background
:
#d8d8d8
;
border-radius
:
10
rpx
;
border-radius
:
10
rpx
;
overflow
:
hidden
;
overflow
:
hidden
;
width
:
calc
(
100%
-
20
rpx
*
2
);
width
:
calc
(
100%
-
20
rpx
*
2
);
margin
:
0
rpx
20
rpx
0
rpx
;
margin
:
0
rpx
20
rpx
0
rpx
;
}
}
&
-matter
{
&
-matter
{
margin
:
28
rpx
20
rpx
50
rpx
;
margin
:
28
rpx
20
rpx
50
rpx
;
&-market
{
&-market
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
20
rpx
;
margin-bottom
:
20
rpx
;
>
view
:
nth-child
(
1
)
{
>
view
:
nth-child
(
1
)
{
width
:
6
rpx
;
width
:
6
rpx
;
height
:
36
rpx
;
height
:
36
rpx
;
background
:
linear-gradient
(
180deg
,
#2C66FF
0%
,
#579FFF
100%
);
background
:
linear-gradient
(
180deg
,
#2C66FF
0%
,
#579FFF
100%
);
border-radius
:
3
rpx
;
border-radius
:
3
rpx
;
margin-right
:
14
rpx
;
margin-right
:
14
rpx
;
}
}
>
view
:nth-child
(
2
)
{
>
view
:nth-child
(
2
)
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#333333
;
color
:
#333333
;
}
}
}
}
&
-marketplace
{
&
-marketplace
{
display
:
flex
;
display
:
flex
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
border-radius
:
8
rpx
;
border-radius
:
8
rpx
;
padding
:
20
rpx
;
padding
:
20
rpx
;
margin-bottom
:
20
rpx
;
margin-bottom
:
20
rpx
;
>image
{
>image
{
width
:
170
rpx
;
width
:
170
rpx
;
height
:
170
rpx
;
height
:
170
rpx
;
margin-right
:
20
rpx
;
margin-right
:
20
rpx
;
}
}
&
-bazaar
{
&
-bazaar
{
width
:
460
rpx
;
width
:
460
rpx
;
>
view
:
nth-child
(
1
)
{
>
view
:
nth-child
(
1
)
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
700
;
font-weight
:
700
;
color
:
#333333
;
color
:
#333333
;
margin-top
:
8
rpx
;
margin-top
:
8
rpx
;
}
}
>
view
:nth-child
(
2
)
{
>
view
:nth-child
(
2
)
{
margin-top
:
6
rpx
;
margin-top
:
6
rpx
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#444444
;
color
:
#444444
;
}
}
>
view
:nth-child
(
3
)
{
>
view
:nth-child
(
3
)
{
margin-top
:
9
rpx
;
margin-top
:
9
rpx
;
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#5281FF
;
color
:
#5281FF
;
}
}
}
}
}
}
}
}
}
}
.logo
{
.logo
{
width
:
100%
;
width
:
100%
;
height
:
340
rpx
;
height
:
340
rpx
;
position
:
absolute
;
position
:
absolute
;
z-index
:
-1
;
z-index
:
-1
;
top
:
0%
;
top
:
0%
;
left
:
0%
;
left
:
0%
;
}
}
.text-area
{
.text-area
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
}
}
.title
{
.title
{
font-size
:
36
rpx
;
font-size
:
36
rpx
;
color
:
#8f8f94
;
color
:
#8f8f94
;
}
}
.diagram
{
.diagram
{
text-align
:
center
;
text-align
:
center
;
margin-top
:
335
rpx
;
margin-top
:
335
rpx
;
>image
{
>image
{
width
:
396
rpx
;
width
:
396
rpx
;
height
:
243
rpx
;
height
:
243
rpx
;
}
}
>
view
{
>
view
{
margin-top
:
20
rpx
;
margin-top
:
20
rpx
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#444444
;
color
:
#444444
;
}
}
}
}
</
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