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
61feeae6
Commit
61feeae6
authored
Apr 11, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选则优惠券时判断,修改时提示错误
parent
0d4e104b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
112 additions
and
51 deletions
+112
-51
components/chengpeng-audio/free-audio.vue
+8
-2
components/form.vue
+37
-14
components/record/record.vue
+5
-5
demand/index/index.vue
+13
-2
demand/payment/index.vue
+3
-3
my/coupon/index.vue
+21
-6
pages/demand/components/index.vue
+23
-16
pages/home/index.vue
+1
-2
pages/order/index.vue
+1
-1
No files found.
components/chengpeng-audio/free-audio.vue
View file @
61feeae6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<!-- 音频播放器组件 -->
<!-- 音频播放器组件 -->
<view
v-if=
'url'
class=
'flex justify-between a-center audio j-sb'
>
<view
v-if=
'url'
class=
'flex justify-between a-center audio j-sb'
>
<view
class=
"d-flex"
>
<view
class=
"d-flex"
>
<view
:class=
"status ? 'timeCheck' : ''"
class=
"font"
>
11
</view>
<view
:class=
"status ? 'timeCheck' : ''"
class=
"font"
v-if=
"duration.toFixed(0) > 0"
>
{{
duration
.
toFixed
(
0
)
}}
</view>
<view
class=
''
@
click=
'start(audioId)'
>
<view
class=
''
@
click=
'start(audioId)'
>
<image
:src=
'startPic'
class=
'icon'
v-show=
'!status'
></image>
<image
:src=
'startPic'
class=
'icon'
v-show=
'!status'
></image>
<image
:src=
'endPic'
class=
'icon'
v-show=
'status'
></image>
<image
:src=
'endPic'
class=
'icon'
v-show=
'status'
></image>
...
@@ -68,13 +68,16 @@
...
@@ -68,13 +68,16 @@
this
.
status
=
false
;
this
.
status
=
false
;
}
}
})
})
},
},
methods
:
{
methods
:
{
handleIconDel
()
{
handleIconDel
()
{
this
.
$emit
(
'delete'
)
this
.
$emit
(
'delete'
)
},
},
start
(
id
)
{
//点击播放
start
(
id
)
{
//点击播放
let
audioId
=
id
;
let
audioId
=
id
;
if
(
this
.
status
)
{
if
(
this
.
status
)
{
this
.
context
.
pause
();
this
.
context
.
pause
();
this
.
status
=
!
this
.
status
;
this
.
status
=
!
this
.
status
;
...
@@ -83,6 +86,7 @@
...
@@ -83,6 +86,7 @@
this
.
context
.
play
()
this
.
context
.
play
()
this
.
status
=
!
this
.
status
;
this
.
status
=
!
this
.
status
;
}
}
},
},
onCanplay
()
{
//进入可播放状态
onCanplay
()
{
//进入可播放状态
this
.
context
.
onCanplay
(()
=>
{
this
.
context
.
onCanplay
(()
=>
{
...
@@ -91,11 +95,13 @@
...
@@ -91,11 +95,13 @@
this
.
duration
=
this
.
context
.
duration
;
this
.
duration
=
this
.
context
.
duration
;
},
1000
)
},
1000
)
})
})
},
},
onTimeUpdate
()
{
//音频播放进度
onTimeUpdate
()
{
//音频播放进度
this
.
context
.
onTimeUpdate
(()
=>
{
this
.
context
.
onTimeUpdate
(()
=>
{
if
(
!
Number
.
isFinite
(
this
.
context
.
duration
))
{
if
(
!
Number
.
isFinite
(
this
.
context
.
duration
))
{
this
.
duration
=
this
.
context
.
currentTime
+
10
;
// this.duration = this.context.currentTime + 10;
this
.
duration
=
this
.
context
.
currentTime
;
this
.
currentTime
=
this
.
context
.
currentTime
;
this
.
currentTime
=
this
.
context
.
currentTime
;
}
else
{
}
else
{
this
.
duration
=
this
.
context
.
duration
;
this
.
duration
=
this
.
context
.
duration
;
...
...
components/form.vue
View file @
61feeae6
...
@@ -239,12 +239,20 @@
...
@@ -239,12 +239,20 @@
// 获取上传图片的值
// 获取上传图片的值
getPhotoList
(
data
)
{
getPhotoList
(
data
)
{
let
that
=
this
let
that
=
this
let
photoList
=
[]
if
(
that
.
formInfo
.
pictureList
){
that
.
formInfo
.
pictureList
.
push
({
that
.
formInfo
.
pictureList
.
push
({
url
:
data
.
url
,
url
:
data
.
url
,
fileType
:
'picture'
fileType
:
'picture'
})
})
// that.formInfo.pictureList = photoList
}
else
{
let
photoList
=
[]
photoList
.
push
({
url
:
data
.
url
,
fileType
:
'picture'
})
that
.
formInfo
.
pictureList
=
photoList
}
},
},
//删除照片
//删除照片
delPhotoItem
(
index
)
{
delPhotoItem
(
index
)
{
...
@@ -265,30 +273,43 @@
...
@@ -265,30 +273,43 @@
},
},
// 上传音频事件
// 上传音频事件
getVoiceList
(
data
)
{
getVoiceList
(
data
,
time
)
{
console
.
log
(
time
,
'总是从'
)
let
that
=
this
let
that
=
this
that
.
showPopup
=
false
that
.
showPopup
=
false
let
voiceList
=
[]
let
voiceList
=
[]
voiceList
.
push
({
voiceList
.
push
({
url
:
data
.
url
,
url
:
data
.
url
,
fileType
:
'voice'
fileType
:
'voice'
,
fileDesc
:
time
})
})
that
.
formInfo
.
voiceList
=
voiceList
that
.
formInfo
.
voiceList
=
voiceList
},
},
//确认修改和重新发布按钮
//确认修改和重新发布按钮
handleUpdateForm
()
{
handleUpdateForm
()
{
let
that
=
this
let
that
=
this
that
.
$refs
.
form
.
validate
().
then
(
res
=>
{
// that.$emit('submit', that.formInfo)
if
(
res
)
{
// that.$refs.form.validate().then(res => {
if
(
that
.
formInfo
.
pictureList
.
length
||
that
.
formInfo
.
videoList
.
length
||
that
.
formInfo
// if (res) {
.
voiceList
.
length
)
{
// console.log('金1111')
// 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('请完善信息')
// })
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
if
(
that
.
formInfo
.
pictureList
||
that
.
formInfo
.
videoList
||
that
.
formInfo
.
voiceList
)
{
that
.
$emit
(
'submit'
,
that
.
formInfo
)
that
.
$emit
(
'submit'
,
that
.
formInfo
)
}
else
{
}
else
{
uni
.
$u
.
toast
(
'图片、视频、音频选其一必填'
)
uni
.
$u
.
toast
(
'图片、视频、音频选其一必填'
)
}
}
}
}).
catch
(
errors
=>
{
}).
catch
(
errors
=>
{
uni
.
$u
.
toast
(
'
校验失败
'
)
uni
.
$u
.
toast
(
'
请完善信息
'
)
})
})
},
},
async
handleAdd
()
{
async
handleAdd
()
{
...
@@ -320,6 +341,7 @@
...
@@ -320,6 +341,7 @@
let
that
=
this
let
that
=
this
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
console
.
log
(
1
)
if
(
that
.
formInfo
.
pictureList
.
length
||
that
.
formInfo
.
videoList
.
length
||
that
.
formInfo
if
(
that
.
formInfo
.
pictureList
.
length
||
that
.
formInfo
.
videoList
.
length
||
that
.
formInfo
.
voiceList
.
length
)
{
.
voiceList
.
length
)
{
that
.
handleAdd
()
that
.
handleAdd
()
...
@@ -328,7 +350,7 @@
...
@@ -328,7 +350,7 @@
}
}
}
}
}).
catch
(
errors
=>
{
}).
catch
(
errors
=>
{
uni
.
$u
.
toast
(
'
校验失败
'
)
uni
.
$u
.
toast
(
'
请完善信息
'
)
})
})
// this.$emit('submit', this.formInfo)
// this.$emit('submit', this.formInfo)
},
},
...
@@ -424,9 +446,10 @@
...
@@ -424,9 +446,10 @@
top
:
-10
rpx
;
top
:
-10
rpx
;
right
:
-10
rpx
;
right
:
-10
rpx
;
}
}
.time-text
{
color
:
#666666
;
.time-text
{
font-size
:
24
rpx
;
color
:
#666666
;
font-size
:
24
rpx
;
}
}
@import
url("@/css/form.css")
;
@import
url("@/css/form.css")
;
...
...
components/record/record.vue
View file @
61feeae6
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<view
class=
"progress"
>
<view
class=
"progress"
>
<progress
:percent=
"time*(100/(duration/1000))"
border-radius=
"10"
color=
"#2C66FF"
stroke-width=
"8"
<progress
:percent=
"time*(100/(duration/1000))"
border-radius=
"10"
color=
"#2C66FF"
stroke-width=
"8"
backgroundColor=
"rgba(44,102,255,0.14)"
/>
backgroundColor=
"rgba(44,102,255,0.14)"
/>
<
text
class=
"txt"
>
最大录音时长(
{{
duration
/
1000
}}
秒 =
{{
duration
/
60000
}}
分钟)
</text
>
<
!--
<text
class=
"txt"
>
最大录音时长(
{{
duration
/
1000
}}
秒 =
{{
duration
/
60000
}}
分钟)
</text>
--
>
</view>
</view>
<view
class=
"anniu"
>
<view
class=
"anniu"
>
<view
class=
"d-flex j-sa"
>
<view
class=
"d-flex j-sa"
>
...
@@ -61,7 +61,6 @@
...
@@ -61,7 +61,6 @@
methods
:
{
methods
:
{
//上传录音按钮事件
//上传录音按钮事件
async
handleUpload
(){
async
handleUpload
(){
console
.
log
(
'山海关穿 '
,
this
.
uploadUrl
,
this
.
tempFilePath
)
let
that
=
this
let
that
=
this
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
a
=
wx
.
uploadFile
({
let
a
=
wx
.
uploadFile
({
...
@@ -76,10 +75,11 @@
...
@@ -76,10 +75,11 @@
const
{
const
{
data
data
}
=
JSON
.
parse
(
res
.
data
);
}
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
data
,
'大街上可能'
)
console
.
log
(
data
,
'大街上可能'
,
that
.
time
)
th
is
.
$emit
(
'getVal'
,
data
);
th
at
.
$emit
(
'getVal'
,
data
,
that
.
time
);
setTimeout
(()
=>
{
let
clear
=
setTimeout
(()
=>
{
clearTimeout
(
clear
)
resolve
(
data
.
url
)
resolve
(
data
.
url
)
// resolve(res.data.data)
// resolve(res.data.data)
},
1000
)
},
1000
)
...
...
demand/index/index.vue
View file @
61feeae6
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<view>
<view>
<view
class=
"content-photograph-photo"
v-if=
"detailData && detailData.pictureList && detailData.pictureList.length"
>
<view
class=
"content-photograph-photo"
v-if=
"detailData && detailData.pictureList && detailData.pictureList.length"
>
<image
class=
"content-photograph-photo-img"
:src=
"v.url"
mode=
""
<image
class=
"content-photograph-photo-img"
:src=
"v.url"
mode=
""
v-for=
"(v ,index) in detailData.pictureList"
:key=
"index"
></image>
v-for=
"(v ,index) in detailData.pictureList"
:key=
"index"
@
click=
"handlePreview(index)"
></image>
</view>
</view>
<view
class=
"noData-text"
v-else
>
暂无数据
</view>
<view
class=
"noData-text"
v-else
>
暂无数据
</view>
</view>
</view>
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
</view>
</view>
<!--
<u--textarea
v-model=
"value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
<!--
<u--textarea
v-model=
"value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
<view>
退款金额:
{{
detailData
.
refundAmount
}}
元
</view>
<view>
退款金额:
{{
detailData
.
refundAmount
}}
元
</view>
<view>
已扣除服务金额:
{{
detailData
.
payAmount
-
detailData
.
refundAmount
}}
元
</view>
<view>
已扣除服务金额:
{{
(
detailData
.
payAmount
-
detailData
.
refundAmount
).
toFixed
(
2
)
}}
元
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -135,6 +135,17 @@
...
@@ -135,6 +135,17 @@
that
.
detailData
=
data
that
.
detailData
=
data
}
}
},
},
handlePreview
(
index
){
let
that
=
this
var
pictureList
=
that
.
detailData
.
pictureList
.
map
(
item
=>
{
// item 获取到的图片地址
return
item
.
url
;
});
uni
.
previewImage
({
current
:
index
,
urls
:
pictureList
,
loop
:
true
})
}
}
}
}
}
...
...
demand/payment/index.vue
View file @
61feeae6
...
@@ -88,9 +88,9 @@
...
@@ -88,9 +88,9 @@
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
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
):
Number
(
that
.
detailInfo
.
actualAmount
-
that
.
payInfo
.
fullSubtraction
).
toFixed
(
2
)
}
else
{
}
else
{
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
let
that
=
this
let
that
=
this
if
(
val
==
1
)
{
if
(
val
==
1
)
{
this
.
$uniGo
.
navigateTo
({
this
.
$uniGo
.
navigateTo
({
url
:
`/my/coupon/index?type=pay`
url
:
`/my/coupon/index?type=pay
&price=
${
this
.
detailInfo
.
actualAmount
}
`
});
});
}
else
{
}
else
{
let
orderQuery
=
{
let
orderQuery
=
{
...
...
my/coupon/index.vue
View file @
61feeae6
<
template
>
<
template
>
<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"
v-for=
"(item,index) in useCouponList"
>
<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>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<view
class=
"index-content-item-qu-bl-rk-a index-content-item-qu-bl-rk-axl"
>
订单金额满
</view>
<view
class=
"index-content-item-qu-bl-rk-a index-content-item-qu-bl-rk-axl"
>
订单金额满
</view>
<view
class=
"index-content-item-qu-bl-rk-b index-content-item-qu-bl-rk-bxl"
>
{{
item
.
minUsed
}}
元
</view>
<view
class=
"index-content-item-qu-bl-rk-b index-content-item-qu-bl-rk-bxl"
>
{{
item
.
minUsed
}}
元
</view>
<view
class=
"index-content-item-qu-bl-rk-c index-content-item-qu-bl-rk-cxl"
>
可使用
</view>
<view
class=
"index-content-item-qu-bl-rk-c index-content-item-qu-bl-rk-cxl"
>
可使用
</view>
<view
class=
"index-content-item-qu-bl-rk-d index-content-item-qu-bl-rk-dxl"
>
去使用
</view>
<view
class=
"index-content-item-qu-bl-rk-d index-content-item-qu-bl-rk-dxl"
@
click=
"optionData.type === 'coupon'?jumpPay(item):null"
>
去使用
</view>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
onLoad
(
option
)
{
onLoad
(
option
)
{
let
self
=
this
;
let
self
=
this
;
self
.
optionData
=
option
;
self
.
optionData
=
option
;
console
.
log
(
option
)
console
.
log
(
option
,
'option'
)
self
.
initial
();
self
.
initial
();
self
.
getCoupon
()
self
.
getCoupon
()
self
.
getLoseCoupon
()
self
.
getLoseCoupon
()
...
@@ -147,7 +147,17 @@
...
@@ -147,7 +147,17 @@
}
}
},
},
jump
(
data
)
{
jump
(
data
)
{
if
(
data
.
minUsed
<=
this
.
optionData
.
price
){
uni
.
$emit
(
'payInfo'
,
data
)
uni
.
$emit
(
'payInfo'
,
data
)
uni
.
navigateBack
({
delta
:
1
});
}
else
{
uni
.
showToast
({
title
:
'请选择合适的优惠券'
,
icon
:
'none'
})
}
// 获取所有页面栈实例列表
// 获取所有页面栈实例列表
// let pages = getCurrentPages();
// let pages = getCurrentPages();
...
@@ -158,9 +168,14 @@
...
@@ -158,9 +168,14 @@
// prevPage.$vm.times = 100;
// prevPage.$vm.times = 100;
//uni.navigateTo跳转的返回,默认1为返回上一级
//uni.navigateTo跳转的返回,默认1为返回上一级
uni
.
navigateBack
({
delta
:
1
},
});
jumpPay
(){
// console.log('去适应')
this
.
$uniGo
.
redirectTo
({
url
:
'/pages/release/index'
})
}
}
}
}
};
};
...
...
pages/demand/components/index.vue
View file @
61feeae6
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
<view
class=
""
>
<view
class=
""
>
已沟通审核通过,待支付
<text>
{{
item
.
actualAmount
?
item
.
actualAmount
:
0
}}
元
</text>
已沟通审核通过,待支付
<text>
{{
item
.
actualAmount
?
item
.
actualAmount
:
0
}}
元
</text>
</view>
</view>
<view
class=
""
>
<view
class=
""
v-if=
"item.isEndTime"
>
截止1小时内支付完成
<text
v-if=
"isEndTime"
>
{{
isEndTime
}}
</text>
截止1小时内支付完成
<text
>
{{
item
.
isEndTime
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
""
@
click
.
stop=
"payment(item)"
>
<view
class=
""
@
click
.
stop=
"payment(item)"
>
...
@@ -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 == 6"
class=
"buttonclde buttonGray"
<button
v-else-if=
"item.status ==
5 || item.status ==
6"
class=
"buttonclde buttonGray"
@
click
.
stop=
"abolish(4,item)"
>
已退款
</button>
@
click
.
stop=
"abolish(4,item)"
>
{{
item
.
status
==
5
?
'退款中'
:
'已退款'
}}
</button>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
</view>
</view>
</view>
</view>
...
@@ -96,25 +96,30 @@
...
@@ -96,25 +96,30 @@
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
subscript
==
2
)
{
if
(
this
.
subscript
==
2
)
{
this
.
list
.
map
(
item
=>
{
this
.
list
.
map
(
(
item
,
index
)
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
showtime
(
item
.
modifyTime
)
this
.
showtime
(
item
,
index
)
},
1000
)
},
1000
)
})
})
}
}
},
},
beforeDestroy
()
{
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
},
methods
:
{
methods
:
{
showtime
(
modifyTime
)
{
showtime
(
item
,
index
)
{
let
that
=
this
//获取当前时间
//获取当前时间
var
curTime
=
new
Date
();
var
curTime
=
new
Date
();
var
curTimeDate
=
curTime
.
getTime
();
//当前时间戳
var
curTimeDate
=
curTime
.
getTime
();
//当前时间戳
// 发起支付的时间
// 发起支付的时间
var
startTime
=
new
Date
(
modifyTime
);
var
startTime
=
new
Date
(
item
.
modifyTime
);
// 发起支付的时间+1小时
// 发起支付的时间+1小时
var
addHour
=
startTime
.
setHours
(
startTime
.
getHours
()
+
1
)
var
addHour
=
startTime
.
setHours
(
startTime
.
getHours
()
+
1
)
console
.
log
(
addHour
,
'大伤脑筋'
)
//
console.log(addHour,'大伤脑筋')
console
.
log
(
new
Date
(
addHour
),
'大伤脑筋111'
)
//
console.log(new Date(addHour),'大伤脑筋111')
var
lefttime
=
addHour
-
curTimeDate
,
var
lefttime
=
addHour
-
curTimeDate
,
leftd
=
Math
.
floor
(
lefttime
/
(
1000
*
60
*
60
*
24
)),
//计算天数
leftd
=
Math
.
floor
(
lefttime
/
(
1000
*
60
*
60
*
24
)),
//计算天数
lefth
=
Math
.
floor
((
lefttime
/
(
1000
*
60
*
60
)
%
24
)
+
leftd
*
24
)
<
10
?
"0"
+
Math
.
floor
((
lefttime
/
lefth
=
Math
.
floor
((
lefttime
/
(
1000
*
60
*
60
)
%
24
)
+
leftd
*
24
)
<
10
?
"0"
+
Math
.
floor
((
lefttime
/
...
@@ -124,14 +129,15 @@
...
@@ -124,14 +129,15 @@
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
(
lefts
=
Math
.
floor
(
lefttime
/
1000
%
60
)
<
10
?
"0"
+
Math
.
floor
(
lefttime
/
1000
%
60
)
:
Math
.
floor
(
lefttime
/
1000
%
60
);
//计算秒数
lefttime
/
1000
%
60
);
//计算秒数
th
is
.
countdownh
=
lefth
//返回倒计时的字符串
th
at
.
countdownh
=
lefth
//返回倒计时的字符串
th
is
.
countdownm
=
leftm
//返回倒计时的字符串
th
at
.
countdownm
=
leftm
//返回倒计时的字符串
th
is
.
countdowns
=
lefts
//返回倒计时的字符串
th
at
.
countdowns
=
lefts
//返回倒计时的字符串
// 倒计时结束时,显示00:00:00
// 倒计时结束时,显示00:00:00
if
(
lefttime
<
0
)
{
if
(
lefttime
<
0
)
{
th
is
.
countdownh
=
this
.
countdownm
=
this
.
countdowns
=
"00"
th
at
.
countdownh
=
that
.
countdownm
=
that
.
countdowns
=
"00"
}
}
this
.
isEndTime
=
this
.
countdownh
+
'时'
+
this
.
countdownm
+
'分'
+
this
.
countdowns
+
'秒'
that
.
$set
(
item
,
'isEndTime'
,
that
.
countdownh
+
'时'
+
that
.
countdownm
+
'分'
+
that
.
countdowns
+
'秒'
)
// that.isEndTime = that.countdownh + '时' + that.countdownm + '分' + that.countdowns + '秒'
},
},
// 跳转详情页
// 跳转详情页
...
@@ -305,6 +311,7 @@
...
@@ -305,6 +311,7 @@
.buttonGray
{
.buttonGray
{
border
:
1
rpx
solid
#666666
!important
;
border
:
1
rpx
solid
#666666
!important
;
color
:
#666666
!important
;
color
:
#666666
!important
;
margin-right
:
20
rpx
;
}
}
.reject
{
.reject
{
...
...
pages/home/index.vue
View file @
61feeae6
...
@@ -101,7 +101,6 @@
...
@@ -101,7 +101,6 @@
this
.
getSquare
()
this
.
getSquare
()
},
},
onPageScroll
(
res
)
{
onPageScroll
(
res
)
{
// console.log('页面滚动了onPageScroll-app', res.scrollTop);
this
.
scrollTopHeader
=
res
.
scrollTop
;
this
.
scrollTopHeader
=
res
.
scrollTop
;
},
},
onReachBottom
()
{
onReachBottom
()
{
...
@@ -118,7 +117,7 @@
...
@@ -118,7 +117,7 @@
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
.
page
Num
){
if
(
that
.
total
<=
that
.
queryParams
.
page
Size
){
that
.
loadStatus
=
'nomore'
that
.
loadStatus
=
'nomore'
}
}
if
(
that
.
queryParams
.
pageNum
==
1
){
if
(
that
.
queryParams
.
pageNum
==
1
){
...
...
pages/order/index.vue
View file @
61feeae6
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
const
{
code
,
total
,
rows
}
=
data_back
;
const
{
code
,
total
,
rows
}
=
data_back
;
if
(
code
===
200
&&
total
>
0
)
{
if
(
code
===
200
&&
total
>
0
)
{
that
.
total
=
total
that
.
total
=
total
if
(
that
.
total
<
that
.
queryParams
.
pageSize
){
if
(
that
.
total
<
=
that
.
queryParams
.
pageSize
){
that
.
loadStatus
=
'nomore'
that
.
loadStatus
=
'nomore'
}
else
{
}
else
{
that
.
loadStatus
=
'loading'
that
.
loadStatus
=
'loading'
...
...
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