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
0d4e104b
Commit
0d4e104b
authored
Apr 10, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付时间倒计时,修改bug
parent
dcb62df5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
290 additions
and
201 deletions
+290
-201
components/evaluate.vue
+5
-5
components/form.vue
+68
-28
components/upload/aIndex.vue
+0
-4
demand/index/index.vue
+27
-24
home/index/index.vue
+24
-20
main.js
+10
-6
my/coupon/index.vue
+23
-1
order/detail/detail.vue
+56
-41
pages/demand/components/index.vue
+48
-22
pages/home/index.vue
+13
-2
pages/my/index.vue
+0
-0
pages/order/index.vue
+16
-48
No files found.
components/evaluate.vue
View file @
0d4e104b
...
...
@@ -86,11 +86,11 @@
return
item
.
url
;
});
console
.
log
(
photoList
,
'第三'
)
//
uni.previewImage({
//
current: inx,
//
urls: photoList,
//
loop: true
//
})
uni
.
previewImage
({
current
:
inx
,
urls
:
photoList
,
loop
:
true
})
}
}
...
...
components/form.vue
View file @
0d4e104b
...
...
@@ -30,7 +30,8 @@
<u-datetime-picker
ref=
"datePicker"
:formatter=
"formatter"
v-model=
"formInfo.repairTime"
:show=
"showTime"
mode=
"date"
@
confirm=
"handleConfirmDate"
@
cancel=
"handleClose"
>
</u-datetime-picker>
<input
type=
"text"
v-model=
"formInfo.repairTime"
placeholder=
"请选择时间"
>
<view
class=
"time-text"
>
{{
formInfo
.
repairTime
?
formInfo
.
repairTime
:
'请选择时间'
}}
</view>
<!--
<input
type=
"text"
v-model=
"formInfo.repairTime"
placeholder=
"请选择时间"
>
-->
<u-icon
name=
"arrow-down-fill"
color=
"#000000"
size=
"28"
></u-icon>
</view>
</u--input>
...
...
@@ -65,20 +66,20 @@
<view
class=
"form-item-name"
>
上传视频
</view>
</view>
<view>
<view
class=
"video-box"
style=
""
v-if=
"formInfo.videoList.length"
>
<video
id=
"myVideo"
:src=
"formInfo.videoList[0].url"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
<video
id=
"myVideo"
:src=
"formInfo.videoList[0].url"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
:show-fullscreen-btn=
'false'
></video>
<view
class=
"position-icon"
@
click=
"delVideoList"
>
<u-icon
name=
"close-circle-fill"
color=
"#D9001B"
size=
"32"
></u-icon>
</view>
</view>
<comUpload
v-else
:afterWidth=
"350"
@
getVal=
"getVideoList"
ref=
"videoRef"
:acceptType=
"acceptType"
:maxCount=
"1"
:multiple=
"isMultiple"
>
<comUpload
v-else
:afterWidth=
"350"
@
getVal=
"getVideoList"
ref=
"videoRef"
:acceptType=
"acceptType"
:maxCount=
"1"
:multiple=
"isMultiple"
>
</comUpload>
</view>
...
...
@@ -137,7 +138,12 @@
statusBtn
:
Number
,
detailData
:
Object
},
data
()
{
const
mobile
=
(
rule
,
value
,
callback
)
=>
{
return
/^1
[
3-9
]\d{9}
$/
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
'请输入正确的手机号码'
))
}
return
{
showTime
:
false
,
//时间选择器是否显示
acceptType
:
'video'
,
...
...
@@ -156,19 +162,36 @@
linkman
:
{
type
:
'string'
,
required
:
true
,
message
:
'请填写
备注说明
'
,
message
:
'请填写
联系人
'
,
trigger
:
[
'blur'
,
'change'
]
},
phone
:
[{
type
:
'string'
,
required
:
true
,
message
:
'请输入正确的联系人手机号码'
,
max
:
11
,
min
:
11
,
trigger
:
'blur'
},
{
// 自定义验证函数,见上说明
validator
:
mobile
,
message
:
'手机号码不正确'
,
// 触发器可以同时用blur和change
trigger
:
[
'change'
,
'blur'
],
}
],
repairAddress
:
{
type
:
'string'
,
required
:
true
,
message
:
'请填写
备注说明
'
,
message
:
'请填写
维修地址
'
,
trigger
:
[
'blur'
,
'change'
]
},
budget
:
{
type
:
'
string
'
,
type
:
'
number
'
,
required
:
true
,
message
:
'请填写
备注说明
'
,
message
:
'请填写
预算金额
'
,
trigger
:
[
'blur'
,
'change'
]
},
},
...
...
@@ -176,6 +199,11 @@
};
},
//如果是自己封装的组件就是mounted()
//如果不是组件就是onReady()
mounted
()
{
this
.
$refs
.
form
.
setRules
(
this
.
rules
);
},
watch
:
{
detailData
:
{
handler
(
newVal
,
oldVal
)
{
...
...
@@ -216,6 +244,7 @@
url
:
data
.
url
,
fileType
:
'picture'
})
// that.formInfo.pictureList = photoList
},
//删除照片
delPhotoItem
(
index
)
{
...
...
@@ -224,7 +253,6 @@
// 获取上传视频的值
getVideoList
(
data
)
{
let
that
=
this
console
.
log
(
data
,
'有的哈桑'
)
let
videoList
=
[]
videoList
.
push
({
url
:
data
.
url
,
...
...
@@ -232,27 +260,36 @@
})
that
.
formInfo
.
videoList
=
videoList
},
delVideoList
(){
console
.
log
(
'删除'
,
this
.
formInfo
.
videoList
)
delVideoList
()
{
this
.
formInfo
.
videoList
.
splice
(
0
,
1
)
console
.
log
(
'删除后'
,
this
.
formInfo
.
videoList
)
},
// 上传音频事件
getVoiceList
(
data
)
{
let
that
=
this
that
.
showPopup
=
false
console
.
log
(
data
,
'有的哈桑'
)
let
voiceList
=
[]
voiceList
.
push
({
url
:
data
.
url
,
fileType
:
'v
ideo
'
fileType
:
'v
oice
'
})
that
.
formInfo
.
voiceList
=
voiceList
},
//确认修改和重新发布按钮
handleUpdateForm
()
{
this
.
$emit
(
'submit'
,
this
.
formInfo
)
let
that
=
this
that
.
$refs
.
form
.
validate
().
then
(
res
=>
{
if
(
res
)
{
if
(
that
.
formInfo
.
pictureList
.
length
||
that
.
formInfo
.
videoList
.
length
||
that
.
formInfo
.
voiceList
.
length
)
{
that
.
$emit
(
'submit'
,
that
.
formInfo
)
}
else
{
uni
.
$u
.
toast
(
'图片、视频、音频选其一必填'
)
}
}
}).
catch
(
errors
=>
{
uni
.
$u
.
toast
(
'校验失败'
)
})
},
async
handleAdd
()
{
let
that
=
this
...
...
@@ -374,20 +411,23 @@
.video-box
{
width
:
373
rpx
;
height
:
210
rpx
;
position
:
relative
;
video{
width
:
100%
;
height
:
100%
position
:
relative
;
video
{
width
:
100%
;
height
:
100%
}
}
.position-icon
{
position
:
absolute
;
top
:
-10
rpx
;
right
:
-10
rpx
;
top
:
-10
rpx
;
right
:
-10
rpx
;
}
.time-text
{
color
:
#666666
;
font-size
:
24
rpx
;
}
@import
url("@/css/form.css")
;
...
...
components/upload/aIndex.vue
View file @
0d4e104b
...
...
@@ -84,8 +84,6 @@
async
afterRead
(
event
)
{
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let
lists
=
[].
concat
(
event
.
file
)
console
.
log
(
lists
,
'点九三'
)
let
fileListLen
=
this
[
`fileList
${
event
.
name
}
`
].
length
lists
.
map
((
item
)
=>
{
this
[
`fileList
${
event
.
name
}
`
].
push
({
...
...
@@ -115,11 +113,9 @@
'Authorization'
:
`Bearer
${
uni
.
getStorageSync
(
'token'
)}
`
},
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
,
'单价'
)
const
{
data
}
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
data
,
'大街上可能'
)
this
.
$emit
(
'getVal'
,
data
);
setTimeout
(()
=>
{
...
...
demand/index/index.vue
View file @
0d4e104b
...
...
@@ -24,34 +24,40 @@
<view
class=
""
>
预算金额
</view>
<view
class=
""
>
{{
detailData
.
budget
}}
</view>
</view>
<view
class=
"content-photograph"
v-if=
"detailData && detailData.pictureList && detailData.pictureList.length"
>
<view
class=
"content-photograph"
>
<view
class=
""
>
上传图片
</view>
<view
class=
"content-photograph-photo"
>
<image
class=
"content-photograph-photo-img"
:src=
"v.url"
mode=
""
v-for=
"(v ,index) in detailData.pictureList"
:key=
"index"
></image>
<view>
<view
class=
"content-photograph-photo"
v-if=
"detailData && detailData.pictureList && detailData.pictureList.length"
>
<image
class=
"content-photograph-photo-img"
:src=
"v.url"
mode=
""
v-for=
"(v ,index) in detailData.pictureList"
:key=
"index"
></image>
</view>
<view
class=
"noData-text"
v-else
>
暂无数据
</view>
</view>
</view>
<view
class=
"content-frequency"
v-if=
"detailData && detailData.videoList && detailData.videoList.length"
>
<view
class=
""
>
上传视频
</view>
<view
v-for=
"(v ,index) in detailData.videoList"
:key=
"index"
>
<video
id=
"myVideo"
:src=
"v.url"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
:show-fullscreen-btn=
'false'
></video>
<view
class=
"content-frequency"
>
<view
class=
""
>
上传视频
</view>
<view
v-if=
"detailData && detailData.videoList && detailData.videoList.length"
>
<view
v-for=
"(v ,index) in detailData.videoList"
:key=
"index"
>
<video
class=
"video-box"
id=
"myVideo"
:src=
"v.url"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
:show-fullscreen-btn=
'false'
></video>
</view>
</view>
<view
class=
"noData-text"
v-else
>
暂无数据
</view>
</view>
</view>
<view
class=
"content-voice"
v-if=
"detailData && detailData.voiceList && detailData.voiceList.length"
>
<view
class=
"content-voice"
>
<view
class=
""
>
语音描述
</view>
<!-- class="content-voice-audio" -->
<view
class=
"margin-y-two"
>
<free-audio
audioId=
'audio1'
:url=
'detailData.voiceList[0].url'
:isDel=
"false"
></free-audio>
<view
class=
"margin-y-two"
v-if=
"detailData && detailData.voiceList && detailData.voiceList.length"
>
<free-audio
audioId=
'audio1'
:url=
'detailData.voiceList[0].url'
:isDel=
"false"
></free-audio>
</view>
<view
class=
"noData-text"
v-else
>
暂无数据
</view>
</view>
<view
class=
"content-remarks"
>
<view
class=
""
>
...
...
@@ -63,7 +69,8 @@
<view
class=
"font-bold"
>
<text></text>
订单已驳回
</view>
<view
class=
"paddding-x-two"
>
驳回理由:
{{
detailData
&&
detailData
.
reasonsForRejection
?
detailData
.
reasonsForRejection
:
'暂无'
}}
</view>
<view
class=
"paddding-x-two"
>
驳回理由:
{{
detailData
&&
detailData
.
reasonsForRejection
?
detailData
.
reasonsForRejection
:
'暂无'
}}
</view>
<!--
<u--textarea
v-model=
"detailData.value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
</view>
<view
class=
"content-reject"
v-if=
"subscript == 3 && detailData.status== 5"
>
...
...
@@ -175,15 +182,11 @@
&
-frequency
{
padding
:
30
rpx
0
rpx
;
>view
{
display
:
flex
;
>video
{
.video-box
{
margin-top
:
20
rpx
;
width
:
373
rpx
;
height
:
210
rpx
;
}
}
}
&
-voice
{
...
...
home/index/index.vue
View file @
0d4e104b
...
...
@@ -16,24 +16,23 @@
{{
orderDetail
&&
orderDetail
.
actualAmount
?
orderDetail
.
actualAmount
:
''
}}
</view>
</view>
<view
class=
"content-photograph"
>
<view
class=
"content-photograph"
>
<view
class=
""
>
图片说明
</view>
<view
class=
"content-photograph-photo"
>
<view
class=
"content-photograph-photo"
v-if=
"orderDetail && orderDetail.pictureList.length"
>
<image
class=
"content-photograph-photo-graph"
:src=
"v.url"
mode=
""
v-for=
"(v ,index) in orderDetail.
fileVos"
:key=
"v.id"
v-if=
"v.fileType == 'picture'
"
></image>
v-for=
"(v ,index) in orderDetail.
pictureList"
:key=
"v.id
"
></image>
</view>
<view
class=
"noData-text"
>
暂无数据
</view>
<view
v-else
class=
"noData-text"
>
暂无数据
</view>
</view>
<view
class=
"content-frequency"
>
<view
class=
""
>
视频说明
</view>
<view
v-if=
"orderDetail && orderDetail.fileVos.length && v.fileType == 'video'"
v-for=
"(v ,index) in orderDetail.fileVos"
:key=
"v.id"
>
<video
v-if=
"v.fileType == 'video'"
id=
"myVideo"
:src=
"v.url"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
<view
v-if=
"orderDetail && orderDetail.videoList.length"
v-for=
"(v ,index) in orderDetail.videoList"
:key=
"v.id"
>
<video
:src=
"v.url"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
:show-fullscreen-btn=
'false'
></video>
</view>
<view
class=
"noData-text"
>
暂无数据
</view>
...
...
@@ -42,11 +41,11 @@
<view
class=
""
>
语音说明
</view>
<view
class=
"margin-top-two"
>
<free-audio
startPic=
'../../static/stopStatus.png'
endPic=
'../../static/startStatus.png'
audioId=
'audio1'
:url=
'path'
:isDel=
"false"
></free-audio>
<view
class=
"noData-text"
>
暂无数据
</view>
<view
class=
"margin-top-two"
v-if=
"orderDetail && orderDetail.voiceList.length"
>
<free-audio
startPic=
'../../static/stopStatus.png'
endPic=
'../../static/startStatus.png'
audioId=
'audio1'
:url=
'orderDetail.voiceList[0].url'
:isDel=
"false"
></free-audio>
</view>
<view
v-else
class=
"noData-text"
>
暂无数据
</view>
<!--
<view
class=
"content-voice-audio"
@
click=
"doPlay()"
></view>
-->
</view>
<view
class=
"content-remarks"
>
...
...
@@ -67,7 +66,7 @@
import
apiBaseConfig
from
'@/config/index.js'
;
import
freeAudio
from
'../../components/chengpeng-audio/free-audio.vue'
export
default
{
components
:{
components
:
{
freeAudio
},
data
()
{
...
...
@@ -75,12 +74,12 @@
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
scrollTopHeader
:
0
,
orderDetail
:{},
path
:
'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'
orderDetail
:
{},
path
:
'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'
};
},
onLoad
(
option
)
{
console
.
log
(
option
.
id
,
'结束'
)
console
.
log
(
option
.
id
,
'结束'
)
this
.
getDetailData
(
option
.
id
)
this
.
timer
=
null
;
this
.
innerAudioContext
=
uni
.
createInnerAudioContext
();
...
...
@@ -103,11 +102,16 @@
})
},
methods
:
{
async
getDetailData
(
id
){
async
getDetailData
(
id
)
{
let
that
=
this
const
data_back
=
await
orderDetailMsgNew
({
id
:
id
})
console
.
log
(
data_back
,
'返沪'
)
const
{
code
,
data
}
=
data_back
const
data_back
=
await
orderDetailMsgNew
({
id
:
id
})
console
.
log
(
data_back
,
'返沪'
)
const
{
code
,
data
}
=
data_back
that
.
orderDetail
=
data
// orderDetailMsgNew({id:id}).then(res=>{
// console.log(res.data,'详情')
...
...
main.js
View file @
0d4e104b
...
...
@@ -30,12 +30,16 @@ import commentList from '@/components/comment/comment.vue'
Vue
.
component
(
'comment-list'
,
commentList
)
// 时间过滤器
Vue
.
filter
(
'formatDate'
,
date
=>
{
let
newDate
=
new
Date
(
date
);
let
year
=
newDate
.
getFullYear
();
let
month
=
newDate
.
getMonth
().
toString
().
padStart
(
2
,
0
);
let
day
=
newDate
.
getDay
().
toString
().
padStart
(
2
,
0
);
return
year
+
'-'
+
month
+
'-'
+
day
;
Vue
.
filter
(
"formatDate"
,
(
date
)
=>
{
let
d
=
new
Date
(
date
);
let
month
=
(
d
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
d
.
getMonth
()
+
1
)
:
(
d
.
getMonth
()
+
1
);
let
day
=
d
.
getDate
()
<
10
?
'0'
+
d
.
getDate
()
:
d
.
getDate
();
let
hours
=
d
.
getHours
()
<
10
?
'0'
+
d
.
getHours
()
:
d
.
getHours
();
let
min
=
d
.
getMinutes
()
<
10
?
'0'
+
d
.
getMinutes
()
:
d
.
getMinutes
();
let
sec
=
d
.
getSeconds
()
<
10
?
'0'
+
d
.
getSeconds
()
:
d
.
getSeconds
();
let
times
;
times
=
d
.
getFullYear
()
+
'-'
+
month
+
'-'
+
day
;
return
times
})
uni
.
$u
.
setConfig
({
config
:
{
...
...
my/coupon/index.vue
View file @
0d4e104b
<
template
>
<view
class=
"index"
>
<com-navbar
:title=
"title"
:titleStyle=
"
{ color: '#000000', fontSize: '32rpx' }" />
<view
class=
"index-content"
>
<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-nav baiyin-flex baiyin-flex-c-b"
>
<text></text>
...
...
@@ -65,6 +65,12 @@
</view>
</view>
</view>
</view>
<view
v-else
class=
"diagram"
>
<image
src=
"@/static/icon/qst.png"
mode=
""
></image>
<view
class=
""
>
暂无优惠券
</view>
</view>
</view>
</template>
...
...
@@ -394,6 +400,22 @@
}
}
}
}
.diagram
{
text-align
:
center
;
margin-top
:
335
rpx
;
>image
{
width
:
396
rpx
;
height
:
243
rpx
;
}
>
view
{
margin-top
:
20
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#444444
;
}
}
}
</
style
>
order/detail/detail.vue
View file @
0d4e104b
...
...
@@ -2,10 +2,8 @@
<view>
<view
style=
"padding-bottom: 100rpx;"
>
<view
class=
"padding-x-four d-flex flex-wrap j-sb flex-content"
>
<view
v-for=
"item in 5"
>
<image
class=
"evaluateListImgItem"
src=
"https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
mode=
"scaleToFill"
></image>
<view
v-for=
"(item,index) in articleData.fileVos"
@
click=
"handlePreview(item,index)"
>
<image
class=
"evaluateListImgItem"
:src=
"item.url"
mode=
"scaleToFill"
></image>
</view>
</view>
<view
class=
"paddding-x-two"
>
...
...
@@ -13,10 +11,9 @@
<view
class=
"evaluate-title"
>
{{
articleData
.
title
}}
</view>
<view
class=
"d-flex a-center j-sb margin-top-two"
>
<view
class=
"d-flex a-center"
>
<image
class=
"img"
src=
"https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
mode=
"widthFix"
></image>
<view
class=
"evaluate-name"
>
{{
articleData
.
createUser
?
articleData
.
createUser
:
'官方'
}}
</view>
<image
class=
"img"
src=
"../../static/logoLogin.png"
mode=
"widthFix"
></image>
<view
class=
"evaluate-name"
>
{{
articleData
.
createUser
?
articleData
.
createUser
:
'官方发布'
}}
</view>
</view>
<view
class=
"eval-time"
>
发布于
{{
articleData
.
createTime
|
formatDate
}}
</view>
...
...
@@ -24,7 +21,7 @@
<view
class=
"evaluateText text-indent"
v-html=
"articleData.content"
></view>
</view>
</view>
<view
class=
"bgWhite"
>
<view
class=
"bgWhite"
v-if=
"userEvalList.length"
>
<view
class=
"padding-aval"
>
<comment-list
:personEvalList=
"userEvalList"
></comment-list>
</view>
...
...
@@ -41,21 +38,25 @@
</
template
>
<
script
>
import
{
articleDetail
,
userEvaluateGet
,
addUserEvaluate
}
from
'../../api/order/index.js'
import
{
articleDetail
,
userEvaluateGet
,
addUserEvaluate
}
from
'../../api/order/index.js'
export
default
{
data
()
{
return
{
articleData
:{},
userQuery
:{
pageNum
:
1
,
pageSize
:
10
,
articleId
:
null
articleData
:
{},
userQuery
:
{
pageNum
:
1
,
pageSize
:
10
,
articleId
:
null
},
userEvalList
:[],
evalQuery
:{
content
:
''
,
//评论的内容
articleId
:
''
,
//文章id
deleteStatus
:
0
userEvalList
:
[],
evalQuery
:
{
content
:
''
,
//评论的内容
articleId
:
''
,
//文章id
deleteStatus
:
0
}
}
},
...
...
@@ -64,55 +65,69 @@
this
.
getUserEvalList
(
option
.
id
)
},
methods
:
{
getDetail
(
id
){
getDetail
(
id
)
{
let
that
=
this
articleDetail
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
articleDetail
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
that
.
articleData
=
res
.
data
}
})
},
getUserEvalList
(
id
){
getUserEvalList
(
id
)
{
let
that
=
this
that
.
userQuery
.
articleId
=
id
userEvaluateGet
(
that
.
userQuery
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
total
>
0
)
{
userEvaluateGet
(
that
.
userQuery
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
total
>
0
)
{
this
.
userEvalList
=
res
.
rows
}
}
})
},
async
handleSend
(){
async
handleSend
()
{
let
that
=
this
if
(
that
.
evalQuery
.
content
)
{
that
.
$set
(
that
.
evalQuery
,
'content'
,
that
.
evalQuery
.
content
.
trim
())
that
.
$set
(
that
.
evalQuery
,
'articleId'
,
that
.
articleData
.
id
)
if
(
that
.
evalQuery
.
content
)
{
that
.
$set
(
that
.
evalQuery
,
'content'
,
that
.
evalQuery
.
content
.
trim
())
that
.
$set
(
that
.
evalQuery
,
'articleId'
,
that
.
articleData
.
id
)
const
data_back
=
await
addUserEvaluate
(
that
.
evalQuery
)
const
{
code
}
=
data_back
if
(
code
===
200
){
const
{
code
}
=
data_back
if
(
code
===
200
)
{
that
.
evalQuery
.
content
=
''
uni
.
showToast
({
title
:
'评论成功!'
,
icon
:
'none'
,
duration
:
2000
,
title
:
'评论成功!'
,
icon
:
'none'
,
duration
:
2000
,
success
()
{
let
clearTime
=
setTimeout
(()
=>
{
clearTimeout
(
clearTime
)
that
.
$uniGo
.
navigateBack
({
delta
:
1
delta
:
1
})
},
1000
)
}
})
}
}
else
{
}
else
{
return
uni
.
showToast
({
title
:
'不可发布空白内容'
,
icon
:
'none'
title
:
'不可发布空白内容'
,
icon
:
'none'
})
}
},
//图片预览
handlePreview
(
item
,
index
)
{
let
that
=
this
var
photoList
=
that
.
articleData
.
fileVos
.
map
(
item
=>
{
// item 获取到的图片地址
return
item
.
url
;
});
uni
.
previewImage
({
current
:
index
,
urls
:
photoList
,
loop
:
true
})
}
}
}
...
...
pages/demand/components/index.vue
View file @
0d4e104b
...
...
@@ -38,7 +38,7 @@
已沟通审核通过,待支付
<text>
{{
item
.
actualAmount
?
item
.
actualAmount
:
0
}}
元
</text>
</view>
<view
class=
""
>
截止1小时内支付完成
<text>
{{
isEndTime
}}
</text>
截止1小时内支付完成
<text
v-if=
"isEndTime"
>
{{
isEndTime
}}
</text>
</view>
</view>
<view
class=
""
@
click
.
stop=
"payment(item)"
>
...
...
@@ -47,8 +47,9 @@
</view>
<!-- // 已接单 -->
<view
class=
"buttoncolor"
v-if=
"subscript == '3'"
>
<button
v-if=
"item.status == 3"
style=
"background: red;"
class=
"buttoncl"
@
click
.
stop=
"abolish(2,item)"
>
退款
</button>
<button
v-else-if=
"item.status == 6"
class=
"buttonclde buttonGray"
<button
v-if=
"item.status == 3"
style=
"background: red;"
class=
"buttoncl"
@
click
.
stop=
"abolish(2,item)"
>
退款
</button>
<button
v-else-if=
"item.status == 6"
class=
"buttonclde buttonGray"
@
click
.
stop=
"abolish(4,item)"
>
已退款
</button>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
</view>
...
...
@@ -78,36 +79,60 @@
data
()
{
return
{
timer
:
""
,
//定时器
isEndTime
:
"
01:00:00
"
,
//倒计时要有个初始值
isEndTime
:
""
,
//倒计时要有个初始值
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
show
:
false
,
title
:
'确认取消订单吗'
,
titbut
:
'取消订单'
,
currentId
:
''
,
//当前的id
actualAmount
:
0
,
//实付金饿
actualAmount
:
0
,
//实付金额
countdownh
:
''
,
countdownm
:
''
,
countdowns
:
''
,
timer
:
null
,
//重复执行
}
},
mounted
()
{
this
.
timer
=
setInterval
(()
=>
{
this
.
countDown
()
},
1000
)
if
(
this
.
subscript
==
2
){
this
.
list
.
map
(
item
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
showtime
(
item
.
modifyTime
)
},
1000
)
})
}
},
methods
:
{
// 1小时倒计时
countDown
()
{
let
allTime
=
0
;
let
h
=
this
.
isEndTime
.
substring
(
0
,
2
);
let
m
=
this
.
isEndTime
.
substring
(
3
,
5
);
let
s
=
this
.
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
;
this
.
isEndTime
=
h
+
":"
+
m
+
":"
+
s
;
showtime
(
modifyTime
)
{
//获取当前时间
var
curTime
=
new
Date
();
var
curTimeDate
=
curTime
.
getTime
();
//当前时间戳
// 发起支付的时间
var
startTime
=
new
Date
(
modifyTime
);
// 发起支付的时间+1小时
var
addHour
=
startTime
.
setHours
(
startTime
.
getHours
()
+
1
)
console
.
log
(
addHour
,
'大伤脑筋'
)
console
.
log
(
new
Date
(
addHour
),
'大伤脑筋111'
)
var
lefttime
=
addHour
-
curTimeDate
,
leftd
=
Math
.
floor
(
lefttime
/
(
1000
*
60
*
60
*
24
)),
//计算天数
lefth
=
Math
.
floor
((
lefttime
/
(
1000
*
60
*
60
)
%
24
)
+
leftd
*
24
)
<
10
?
"0"
+
Math
.
floor
((
lefttime
/
(
1000
*
60
*
60
)
%
24
)
+
leftd
*
24
)
:
Math
.
floor
((
lefttime
/
(
1000
*
60
*
60
)
%
24
)
+
leftd
*
24
),
//计算小时数
leftm
=
Math
.
floor
(
lefttime
/
(
1000
*
60
)
%
60
)
<
10
?
"0"
+
Math
.
floor
(
lefttime
/
(
1000
*
60
)
%
60
)
:
Math
.
floor
(
lefttime
/
(
1000
*
60
)
%
60
),
//计算分钟数
lefts
=
Math
.
floor
(
lefttime
/
1000
%
60
)
<
10
?
"0"
+
Math
.
floor
(
lefttime
/
1000
%
60
)
:
Math
.
floor
(
lefttime
/
1000
%
60
);
//计算秒数
this
.
countdownh
=
lefth
//返回倒计时的字符串
this
.
countdownm
=
leftm
//返回倒计时的字符串
this
.
countdowns
=
lefts
//返回倒计时的字符串
// 倒计时结束时,显示00:00:00
if
(
lefttime
<
0
)
{
this
.
countdownh
=
this
.
countdownm
=
this
.
countdowns
=
"00"
}
this
.
isEndTime
=
this
.
countdownh
+
'时'
+
this
.
countdownm
+
'分'
+
this
.
countdowns
+
'秒'
},
// 跳转详情页
jump
(
data
)
{
...
...
@@ -276,7 +301,8 @@
color
:
#FD0100
;
line-height
:
44
rpx
;
}
.buttonGray
{
.buttonGray
{
border
:
1
rpx
solid
#666666
!important
;
color
:
#666666
!important
;
}
...
...
pages/home/index.vue
View file @
0d4e104b
...
...
@@ -107,15 +107,26 @@
onReachBottom
()
{
let
that
=
this
if
(
that
.
total
<
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
that
.
nomore
=
'nomore'
that
.
queryParams
.
pageNum
++
that
.
getSquare
()
},
methods
:
{
getSquare
(){
let
that
=
this
userNeedSquare
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
,
'需求广场'
)
if
(
res
.
code
==
200
){
if
(
res
.
total
>
0
){
this
.
userNeedList
=
res
.
rows
this
.
total
=
res
.
total
that
.
total
=
res
.
total
if
(
that
.
total
<=
that
.
queryParams
.
pageNum
){
that
.
loadStatus
=
'nomore'
}
if
(
that
.
queryParams
.
pageNum
==
1
){
that
.
userNeedList
=
res
.
rows
}
else
{
that
.
userNeedList
=
[...
that
.
userNeedList
,...
res
.
rows
]
}
}
}
})
...
...
pages/my/index.vue
View file @
0d4e104b
This diff is collapsed.
Click to expand it.
pages/order/index.vue
View file @
0d4e104b
...
...
@@ -11,6 +11,8 @@
暂无数据
</view>
</view>
<u-loadmore
iconSize=
"50px"
@
loadmore=
"loadMore"
color=
"#6A6C6F"
fontSize=
"24rpx"
:nomore-text=
"nomoreText"
:loading-text=
"loadingText"
line
:status=
"loadStatus"
/>
<com-navbar
:leftIcon=
"false"
:homeShow=
"false"
bgColor=
"#fff"
title=
"动态"
:titleStyle=
"
{ color: '#000', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
<com-tabbar
:list=
" [
{
...
...
@@ -63,57 +65,14 @@
},
articleList
:[],
//文章列表
total
:
0
,
//总数
evaluateList
:
[{
name
:
'马保国'
,
image
:
'https://slzh-oss.oss-cn-beijing.aliyuncs.com/usercenter/template/2c94809a787cec070179e01ec0ba02a9.jpg'
,
time
:
'2021.06.06'
,
content
:
'服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵'
,
imageList
:
[{
url
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
]
}],
personEvalList
:
[{
avatar
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
,
nickname
:
'李哈哈'
,
date
:
'2022-01-31'
,
content
:
'评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
{
avatar
:
'https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
,
nickname
:
'李小乖'
,
date
:
'2022-05-11'
,
content
:
'评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
{
avatar
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
,
nickname
:
'李哈哈'
,
date
:
'2022-01-31'
,
content
:
'评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
]
loadStatus
:
'loading'
,
//加载时的状态(loadmore/ loading / nomore)
loadingText
:
'正在加载'
,
nomoreText
:
'已经到底了'
}
},
onReachBottom
()
{
let
that
=
this
if
(
that
.
total
<=
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
if
(
that
.
total
<=
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
that
.
loadStatus
=
'nomore'
that
.
queryParams
.
pageNum
++
that
.
getArticleList
()
},
...
...
@@ -126,8 +85,17 @@
const
data_back
=
await
userArticleGet
(
that
.
queryParams
);
const
{
code
,
total
,
rows
}
=
data_back
;
if
(
code
===
200
&&
total
>
0
)
{
that
.
articleList
=
rows
that
.
total
=
total
if
(
that
.
total
<
that
.
queryParams
.
pageSize
){
that
.
loadStatus
=
'nomore'
}
else
{
that
.
loadStatus
=
'loading'
}
if
(
that
.
queryParams
.
pageNum
==
1
){
that
.
articleList
=
rows
}
else
{
that
.
articleList
=
[...
that
.
articleList
,...
rows
]
}
}
},
...
...
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