Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
df5e45a9
Commit
df5e45a9
authored
Dec 01, 2023
by
qipeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chargeback' into develop
parents
46416077
98c41c05
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
326 additions
and
203 deletions
+326
-203
myPhotoAlbum.vue
pages/album/myPhotoAlbum/myPhotoAlbum.vue
+2
-1
applyAfterSale.vue
pages/my/order/afterSale/applyAfterSale/applyAfterSale.vue
+81
-50
electronicTicket.vue
pages/my/order/electronicTicket/electronicTicket.vue
+3
-3
orderList.vue
pages/my/order/orderList/orderList.vue
+3
-3
myVlog.vue
pages/vlog/myVlog/myVlog.vue
+13
-0
vlogList.vue
pages/vlog/vlogList/vlogList.vue
+224
-146
No files found.
pages/album/myPhotoAlbum/myPhotoAlbum.vue
View file @
df5e45a9
...
@@ -438,7 +438,8 @@ export default {
...
@@ -438,7 +438,8 @@ export default {
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
checkType
==
true
){
if
(
item
.
checkType
==
true
){
var
imgList
=
{
var
imgList
=
{
imgUrl
:
item
.
faceSourceUrl
||
item
.
faceAiUrl
imgUrl
:
item
.
faceSourceUrl
||
item
.
faceAiUrl
,
imgType
:
0
,
}
}
orderProductListData
.
orderImgList
.
push
(
imgList
)
orderProductListData
.
orderImgList
.
push
(
imgList
)
}
}
...
...
pages/my/order/afterSale/applyAfterSale/applyAfterSale.vue
View file @
df5e45a9
...
@@ -11,20 +11,21 @@
...
@@ -11,20 +11,21 @@
</view>
</view>
<view
class=
"ticket-timer"
>
游玩当日
{{
orderRefundRuleTimer
}}
之前未使用可退
</view>
<view
class=
"ticket-timer"
>
游玩当日
{{
orderRefundRuleTimer
}}
之前未使用可退
</view>
</view>
</view>
<
!--
<
view
class=
"apply-user general-Box"
>
<view
class=
"apply-user general-Box"
>
<view
class=
"user-title"
>
<view
class=
"user-title"
>
<view
class=
"title-name"
>
用户选择
</view>
<view
class=
"title-name"
>
用户选择
</view>
<u-checkbox
@
change=
"checkedAll"
v-model=
"applyClickAll"
>
全选
</u-checkbox>
<checkbox-group
@
change=
"checkedAll"
>
<label>
<checkbox
value=
"val"
:checked=
"applyClickAll"
style=
"transform:scale(0.7);"
class=
"list-uCheck"
:class=
"applyClickAll==true?'list-uCheckAct':''"
/>
全选
</label>
</checkbox-group>
</view>
</view>
<u-checkbox-group
@
change=
"checkboxGroupChange"
>
<checkbox-group
@
change=
"checkboxGroupChange"
v-if=
"applyUserListType"
>
<u-checkbox
<label
style=
"margin-right: 15rpx;margin-bottom: 15rpx;"
v-for=
"(item,index) in applyUserList"
:key=
"index"
>
@
change=
"checkboxChange"
<checkbox
:value=
"item.id"
:checked=
"item.checkType"
style=
"transform:scale(0.7);"
class=
"list-uCheck"
:class=
"item.checkType==true?'list-uCheckAct':''"
/>
{{
item
.
name
}}
v-model=
"item.checked"
</label>
v-for=
"(item, index) in applyUserList"
:key=
"index"
</checkbox-group>
:name=
"item.name"
</view>
>
{{
item
.
name
}}
</u-checkbox>
</u-checkbox-group>
</view>
-->
<view
class=
"apply-moneyBox general-Box"
>
<view
class=
"apply-moneyBox general-Box"
>
<view
class=
"moneyBox-list"
>
<view
class=
"moneyBox-list"
>
<view
class=
"list-name"
>
订单实付
</view>
<view
class=
"list-name"
>
订单实付
</view>
...
@@ -32,7 +33,7 @@
...
@@ -32,7 +33,7 @@
</view>
</view>
<view
class=
"moneyBox-list"
>
<view
class=
"moneyBox-list"
>
<view
class=
"list-name"
>
退款金额
</view>
<view
class=
"list-name"
>
退款金额
</view>
<view
class=
"list-money list-clolrOrange"
>
¥
{{
parseFloat
(
orderInfo
.
pdOrderMoney
)
-
parseFloat
(
orderInfo
.
refundFee
)
}}
</view>
<view
class=
"list-money list-clolrOrange"
>
¥
{{
orderInfo
.
unitPrice
*
refundNum
}}
</view>
</view>
</view>
</view>
</view>
<view
class=
"apply-cause general-Box"
>
<view
class=
"apply-cause general-Box"
>
...
@@ -71,15 +72,17 @@ export default {
...
@@ -71,15 +72,17 @@ export default {
merchantId
:
''
,
//景区ID
merchantId
:
''
,
//景区ID
applyClickAll
:
false
,
//是否全选
applyClickAll
:
false
,
//是否全选
applyUserList
:[
applyUserList
:[
{
//
{
name
:
'张三'
,
//
name:'张三',
checked
:
false
,
//
checked:false,
},
//
},
{
//
{
name
:
'李四'
,
//
name:'李四',
checked
:
false
,
//
checked:false,
},
//
},
],
//用户信息
],
//用户信息
applyUserListType
:
true
,
refundNum
:
0
,
//选择多少人
causeList
:[
causeList
:[
{
{
name
:
'更改出行日期'
,
name
:
'更改出行日期'
,
...
@@ -116,7 +119,7 @@ export default {
...
@@ -116,7 +119,7 @@ export default {
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
id
=
option
.
orderId
||
''
this
.
id
=
option
.
orderId
||
''
this
.
openId
=
uni
.
getStorageSync
(
'openid'
)
//openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ
this
.
openId
=
uni
.
getStorageSync
(
'openid'
)
//openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ
//this.openId = 'o
roHZ5FaUQ_SOOC_uQQP92fJpBRE
'//oh2UV1lyYABHMZ1rMlgjhVHyyYDQ oroHZ5FaUQ_SOOC_uQQP92fJpBRE
//this.openId = 'o
h2UV1lyYABHMZ1rMlgjhVHyyYDQ
'//oh2UV1lyYABHMZ1rMlgjhVHyyYDQ oroHZ5FaUQ_SOOC_uQQP92fJpBRE
this
.
getDetail
()
this
.
getDetail
()
},
},
methods
:
{
methods
:
{
...
@@ -153,15 +156,22 @@ export default {
...
@@ -153,15 +156,22 @@ export default {
})
})
return
false
return
false
}
}
var
orderTouristVoList
=
[]
this
.
applyUserList
.
forEach
((
item
)
=>
{
if
(
item
.
checkType
==
true
){
orderTouristVoList
.
push
(
item
)
}
})
var
data
=
{
var
data
=
{
orderId
:
this
.
orderInfo
.
id
,
orderId
:
this
.
orderInfo
.
id
,
userId
:
this
.
openId
,
userId
:
this
.
openId
,
refundReason
:
this
.
reason
,
refundReason
:
this
.
reason
,
refundNum
:
this
.
orderInfo
.
order
Num
,
refundNum
:
this
.
refund
Num
,
refundMoney
:
parseFloat
(
this
.
orderInfo
.
pdOrderMoney
)
-
parseFloat
(
this
.
orderInfo
.
depositReceived
)
,
refundMoney
:
this
.
orderInfo
.
unitPrice
*
this
.
refundNum
,
pdRefundMoney
:
parseFloat
(
this
.
orderInfo
.
pdOrderMoney
)
,
pdRefundMoney
:
this
.
orderInfo
.
unitPrice
*
this
.
refundNum
,
refundType
:
0
,
refundType
:
0
,
pdRefundFee
:
this
.
orderInfo
.
depositReceived
,
pdRefundFee
:
this
.
orderInfo
.
depositReceived
,
orderTouristVoList
:
orderTouristVoList
,
}
}
this
.
$request
(
'order/userOrder/refundTicket'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'order/userOrder/refundTicket'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
if
(
res
.
code
==
'00'
){
...
@@ -223,6 +233,16 @@ export default {
...
@@ -223,6 +233,16 @@ export default {
if
(
this
.
getNowTime
()
>
this
.
orderRefundRuleTimer
){
if
(
this
.
getNowTime
()
>
this
.
orderRefundRuleTimer
){
this
.
orderRefundRuleTimerType
=
true
this
.
orderRefundRuleTimerType
=
true
}
}
this
.
orderInfo
.
orderTouristList
.
forEach
((
item
)
=>
{
item
[
'checkType'
]
=
false
})
this
.
applyUserList
=
[]
this
.
orderInfo
.
orderTouristList
.
forEach
((
item
)
=>
{
if
(
item
.
visitorStatus
==
0
||
item
.
visitorStatus
==
4
){
this
.
applyUserList
.
push
(
item
)
}
})
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
...
@@ -235,32 +255,35 @@ export default {
...
@@ -235,32 +255,35 @@ export default {
clickNewFun
(
labelNum
){
clickNewFun
(
labelNum
){
this
.
causeNum
=
labelNum
this
.
causeNum
=
labelNum
},
},
// // 选中某个复选框时,由checkbox时触发 可以获取当前选择值的所有信息
checkboxGroupChange
(
e
){
//刷新显示
// checkboxChange(e) {
this
.
applyUserListType
=
false
// // console.log(e)
this
.
applyUserList
.
forEach
((
item
)
=>
{
// },
item
.
checkType
=
false
// // 选中任一checkbox时,由checkbox-group触发 已经选择了多少选项
e
.
detail
.
value
.
forEach
(
item2
=>
{
// checkboxGroupChange(e) {
if
(
item
.
id
==
item2
){
// // console.log(e)
this
.
$set
(
item
,
'checkType'
,
true
)
// if(this.applyUserList.length==e.length){
}
// this.applyClickAll = true
})
// }else{
})
// this.applyClickAll =false
this
.
refundNum
=
e
.
detail
.
value
.
length
// }
this
.
applyUserListType
=
true
// },
},
// // 全选
checkedAll
(
e
){
//全选
// checkedAll(e) {
if
(
this
.
applyClickAll
==
false
){
// console.log(e)
this
.
applyClickAll
=
true
// if(e.value==true){
this
.
applyUserList
.
forEach
((
item
)
=>
{
// this.applyUserList.map(val => {
item
.
checkType
=
true
// val.checked = true
})
// })
this
.
refundNum
=
this
.
applyUserList
.
length
// }else{
}
else
{
// this.applyUserList.map(val => {
this
.
applyClickAll
=
false
// val.checked = false
this
.
applyUserList
.
forEach
((
item
)
=>
{
// })
item
.
checkType
=
false
// }
})
// },
this
.
refundNum
=
0
}
},
getNowTime
()
{
//获取当前时间(HH-MM-SS)
getNowTime
()
{
//获取当前时间(HH-MM-SS)
var
date
=
new
Date
()
var
date
=
new
Date
()
var
seperator1
=
'-'
var
seperator1
=
'-'
...
@@ -361,6 +384,14 @@ export default {
...
@@ -361,6 +384,14 @@ export default {
/
deep
/
.u-checkbox__label
{
/
deep
/
.u-checkbox__label
{
width
:
160rpx
;
width
:
160rpx
;
}
}
.list-uCheckAct
{
/
deep
/
.wx-checkbox-input
,
/
deep
/
.uni-checkbox-input
{
background-color
:
#3688FF
!
important
;
border-color
:
#3688FF
!
important
;
color
:
#ffffff
!
important
;
}
}
}
}
.apply-moneyBox
{
.apply-moneyBox
{
padding
:
0
24rpx
0
24rpx
;
padding
:
0
24rpx
0
24rpx
;
...
...
pages/my/order/electronicTicket/electronicTicket.vue
View file @
df5e45a9
...
@@ -339,10 +339,10 @@
...
@@ -339,10 +339,10 @@
</
template
>
</
template
>
<
template
v-else-if=
"orderInfo.isRefund==2"
>
随时可退
</
template
>
<
template
v-else-if=
"orderInfo.isRefund==2"
>
随时可退
</
template
>
<
template
v-if=
"ticketStatus"
>
<
template
v-if=
"ticketStatus"
>
<view
class=
"list-btnRefund"
v-if=
"orderInfo.orderStatus==2&&orderInfo.isRefund!=0&&ticketStatus==0"
@
click=
"refundJump(orderInfo.id)"
>
退款/售后
</view>
<view
class=
"list-btnRefund"
v-if=
"orderInfo.orderStatus==2&&orderInfo.isRefund!=0&&ticketStatus==0
||orderInfo.orderStatus==7&&orderInfo.isRefund!=0&&ticketStatus==0
"
@
click=
"refundJump(orderInfo.id)"
>
退款/售后
</view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<view
class=
"list-btnRefund"
v-if=
"orderInfo.orderStatus==2&&orderInfo.isRefund!=0"
@
click=
"refundJump(orderInfo.id)"
>
退款/售后
</view>
<view
class=
"list-btnRefund"
v-if=
"orderInfo.orderStatus==2&&orderInfo.isRefund!=0
||orderInfo.orderStatus==7&&orderInfo.isRefund!=0
"
@
click=
"refundJump(orderInfo.id)"
>
退款/售后
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -635,7 +635,7 @@ export default {
...
@@ -635,7 +635,7 @@ export default {
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//this.id = "z00167956572219584dc15634b62cf75"
//this.id = "z00167956572219584dc15634b62cf75"
this
.
openId
=
uni
.
getStorageSync
(
'openid'
)
//openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ
this
.
openId
=
uni
.
getStorageSync
(
'openid'
)
//openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ
//this.openId = 'o
roHZ5FaUQ_SOOC_uQQP92fJpBRE
'//'oh2UV1lyYABHMZ1rMlgjhVHyyYDQ' oroHZ5FaUQ_SOOC_uQQP92fJpBRE
//this.openId = 'o
h2UV1lyYABHMZ1rMlgjhVHyyYDQ
'//'oh2UV1lyYABHMZ1rMlgjhVHyyYDQ' oroHZ5FaUQ_SOOC_uQQP92fJpBRE
this
.
getDetail
()
this
.
getDetail
()
},
},
onUnload
()
{
onUnload
()
{
...
...
pages/my/order/orderList/orderList.vue
View file @
df5e45a9
...
@@ -147,7 +147,7 @@
...
@@ -147,7 +147,7 @@
<template
v-if=
"item.subOrderType!=4"
>
<template
v-if=
"item.subOrderType!=4"
>
<view
class=
"block-button"
v-if=
"item.orderStatus==1||item.orderStatus==2||item.orderStatus==4||item.orderStatus==5||item.orderStatus==10"
@
click
.
stop=
"orderJump(item.id,item.orderType)"
>
{{
item
.
orderStatus
==
2
?
'去使用'
:
'查看详情'
}}
</view>
<view
class=
"block-button"
v-if=
"item.orderStatus==1||item.orderStatus==2||item.orderStatus==4||item.orderStatus==5||item.orderStatus==10"
@
click
.
stop=
"orderJump(item.id,item.orderType)"
>
{{
item
.
orderStatus
==
2
?
'去使用'
:
'查看详情'
}}
</view>
</
template
>
</
template
>
<view
class=
"block-button"
v-if=
"item.orderStatus==2&&item.isRefund!=0"
@
click
.
stop=
"refundJump(item.id)"
>
退款/售后
</view>
<view
class=
"block-button"
v-if=
"item.orderStatus==2&&item.isRefund!=0
||item.orderStatus==7&&item.isRefund!=0
"
@
click
.
stop=
"refundJump(item.id)"
>
退款/售后
</view>
<view
class=
"block-button"
v-if=
"item.orderStatus==5"
>
评价
</view>
<view
class=
"block-button"
v-if=
"item.orderStatus==5"
>
评价
</view>
</template>
</template>
<view
class=
"block-button block-buttonOrange"
v-if=
"item.orderStatus==0"
>
去支付
</view>
<view
class=
"block-button block-buttonOrange"
v-if=
"item.orderStatus==0"
>
去支付
</view>
...
@@ -440,7 +440,7 @@ export default {
...
@@ -440,7 +440,7 @@ export default {
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
openId
=
uni
.
getStorageSync
(
'openid'
)
this
.
openId
=
uni
.
getStorageSync
(
'openid'
)
//this.openId = 'o
roHZ5FaUQ_SOOC_uQQP92fJpBRE
'//oh2UV1lyYABHMZ1rMlgjhVHyyYDQ oroHZ5FaUQ_SOOC_uQQP92fJpBRE
//this.openId = 'o
h2UV1lyYABHMZ1rMlgjhVHyyYDQ
'//oh2UV1lyYABHMZ1rMlgjhVHyyYDQ oroHZ5FaUQ_SOOC_uQQP92fJpBRE
this
.
orderStatus
=
option
.
orderStatus
||
''
this
.
orderStatus
=
option
.
orderStatus
||
''
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
this
.
getData
(
1
)
this
.
getData
(
1
)
...
@@ -686,7 +686,7 @@ export default {
...
@@ -686,7 +686,7 @@ export default {
this
.
configShow
=
false
this
.
configShow
=
false
},
},
orderJump
(
orderId
,
orderType
){
//-------------------订单详情跳转
orderJump
(
orderId
,
orderType
){
//-------------------订单详情跳转
if
(
orderType
==
11
){
if
(
orderType
==
11
||
orderType
==
12
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/album/albumOrderdetail/albumOrderdetail?orderId='
+
orderId
url
:
'/pages/album/albumOrderdetail/albumOrderdetail?orderId='
+
orderId
})
})
...
...
pages/vlog/myVlog/myVlog.vue
View file @
df5e45a9
...
@@ -10,6 +10,9 @@
...
@@ -10,6 +10,9 @@
<text>
{{
item
.
merchantName
}}
</text>
<text>
{{
item
.
merchantName
}}
</text>
</view>
</view>
</view>
</view>
<navigator
url=
"../vlogface/vlogface"
class=
"btnn"
>
<view>
点击获取我的Vlog
</view>
</navigator>
</view>
</view>
<view
v-else-if=
"vlogList.length===0 && show===false"
class=
"empty"
>
<view
v-else-if=
"vlogList.length===0 && show===false"
class=
"empty"
>
<view
class=
"row"
>
<view
class=
"row"
>
...
@@ -120,6 +123,16 @@ export default {
...
@@ -120,6 +123,16 @@ export default {
}
}
}
}
}
}
.btnn
{
display
:
inline-block
;
font-size
:
28rpx
;
border-radius
:
40rpx
;
background-color
:
#fff
;
padding
:
20rpx
40rpx
;
margin
:
30rpx
0
;
font-weight
:
bold
;
color
:
#333
;
}
}
}
.empty
{
.empty
{
...
...
pages/vlog/vlogList/vlogList.vue
View file @
df5e45a9
...
@@ -5,10 +5,11 @@
...
@@ -5,10 +5,11 @@
<video
class=
"video"
:src=
"item.productUrl"
:poster=
"item.thumbImageUrl"
@
error=
"error"
object-fit=
"fill"
<video
class=
"video"
:src=
"item.productUrl"
:poster=
"item.thumbImageUrl"
@
error=
"error"
object-fit=
"fill"
play-btn-position=
"center"
:id=
"index"
@
play=
"playing(index)"
></video>
play-btn-position=
"center"
:id=
"index"
@
play=
"playing(index)"
></video>
<view
class=
""
>
<view
class=
""
>
<button
v-if=
"item.shareNumber===0"
:data-productUrl=
"item.productUrl"
:data-productId=
"item.productId"
class=
"btnn"
<!--
<button
v-if=
"item.shareNumber===0"
:data-productUrl=
"item.productUrl"
:data-productId=
"item.productId"
class=
"btnn"
open-type=
"share"
>
分享下载
</button>
open-type=
"share"
>
分享下载
</button>
-->
<button
v-else
class=
"btnn"
@
click=
"handleDownload(item.productUrl)"
>
下载视频
</button>
<!-- v-else -->
<text
class=
"price"
>
¥
<text>
0
</text></text>
<button
class=
"btnn"
@
click=
"handPayment(item.productUrl,item.isPay,item.sellingPrice)"
>
下载视频
</button>
<text
class=
"price"
>
¥
<text>
{{
item
.
sellingPrice
}}
</text></text>
</view>
</view>
<view
style=
"clear: both;"
></view>
<view
style=
"clear: both;"
></view>
</view>
</view>
...
@@ -17,151 +18,228 @@
...
@@ -17,151 +18,228 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
myVlogList
:
[],
//我的视频列表
openid
:
''
,
merchantId
:
''
,
//景区id
myVlogList
:
[],
//我的视频列表
}
merchantId
:
''
,
//景区id
},
merchantIdOrder
:
''
,
//下单用merchantId
onLoad
(
options
)
{
merchantMessage
:[],
//景区基础参数
this
.
merchantId
=
options
.
merchantId
}
this
.
getMyVlogList
()
},
},
onLoad
(
options
)
{
onShow
()
{
this
.
merchantId
=
options
.
merchantId
this
.
merchantIdOrder
=
options
.
merchantIdOrder
||
'z0015605022691a5945bbe463141668c'
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
//获取openid
this
.
getMyVlogList
()
this
.
mearchLoadList
()
//调用参数
},
onShow
()
{
},
},
onUnload
()
{
//退出页面
onUnload
()
{
//退出页面
},
},
onHide
()
{},
onHide
()
{},
onReady
()
{},
onReady
()
{},
onShareAppMessage
(
res
)
{
//分享
onShareAppMessage
(
res
)
{
//分享
let
productId
=
res
.
target
.
dataset
.
productid
let
productId
=
res
.
target
.
dataset
.
productid
let
productUrl
=
res
.
target
.
dataset
.
producturl
let
productUrl
=
res
.
target
.
dataset
.
producturl
if
(
res
.
from
===
'button'
)
{
if
(
res
.
from
===
'button'
)
{
this
.
$request
(
'wechatUser/myPage/updateVlogRecord'
,
{
this
.
$request
(
'wechatUser/myPage/updateVlogRecord'
,
{
productId
,
productId
,
openid
:
uni
.
getStorageSync
(
'openid'
)
openid
:
uni
.
getStorageSync
(
'openid'
)
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
'00'
)
{
if
(
res
.
code
===
'00'
)
{
this
.
getMyVlogList
()
this
.
getMyVlogList
()
}
}
})
})
return
{
return
{
title
:
'胖丁旅行'
,
title
:
'胖丁旅行'
,
type
:
4
,
type
:
4
,
path
:
'/pages/vlog/share/share?url='
+
productUrl
,
path
:
'/pages/vlog/share/share?url='
+
productUrl
,
}
}
}
else
{
}
else
{
return
{
return
{
title
:
'胖丁旅行'
,
title
:
'胖丁旅行'
,
type
:
4
,
type
:
4
,
path
:
'/pages/vlog/vlogIndex/vlogIndex'
,
path
:
'/pages/vlog/vlogIndex/vlogIndex'
,
}
}
}
}
},
},
methods
:
{
methods
:
{
getMyVlogList
()
{
//获取景区vlog列表
getMyVlogList
()
{
//获取景区vlog列表
this
.
$request
(
'wechatUser/myPage/getVlogRecord'
,
{
this
.
$request
(
'wechatUser/myPage/getVlogRecord'
,
{
openid
:
uni
.
getStorageSync
(
'openid'
),
openid
:
uni
.
getStorageSync
(
'openid'
),
productType
:
0
productType
:
0
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
'00'
)
{
if
(
res
.
code
===
'00'
)
{
res
.
data
.
forEach
(
item
=>
{
//获取当前景区视频列表
res
.
data
.
forEach
(
item
=>
{
//获取当前景区视频列表
if
(
this
.
merchantId
===
item
.
merchantId
)
{
if
(
this
.
merchantId
===
item
.
merchantId
)
{
this
.
myVlogList
=
item
.
vlogList
this
.
myVlogList
=
item
.
vlogList
}
}
})
})
}
}
})
})
},
},
playing
(
e
)
{
//控制只播放当前video
playing
(
e
)
{
//控制只播放当前video
this
.
myVlogList
.
forEach
((
item
,
index
)
=>
{
this
.
myVlogList
.
forEach
((
item
,
index
)
=>
{
if
(
e
!==
index
)
{
if
(
e
!==
index
)
{
uni
.
createVideoContext
(
index
.
toString
()).
pause
()
uni
.
createVideoContext
(
index
.
toString
()).
pause
()
}
}
})
})
},
},
handleDownload
(
url
)
{
// 下载功能
handPayment
(
productUrl
,
isPay
,
sellingPrice
){
//当前视频是否需要支付下载费用
uni
.
showLoading
({
//isPay 0为未支付 1为已支付
title
:
'下载中'
,
if
(
isPay
==
0
){
//originalPrice 原价 sellingPrice售价 settlementPrice结算价
mask
:
true
this
.
upLoad
(
sellingPrice
,
productUrl
)
})
}
else
{
let
fileName
=
new
Date
().
valueOf
()
//获取时间戳
this
.
handleDownload
(
productUrl
)
uni
.
downloadFile
({
//下载文件资源到本地
}
url
,
},
filePath
:
wx
.
env
.
USER_DATA_PATH
+
'/'
+
fileName
+
'.mp4'
,
//filePath指定文件下载后存储的路径,wx.env.USER_DATA_PATH,时间戳为文件名
upLoad
(
sellingPrice
,
productUrl
){
//下单
success
:
res
=>
{
//下载到本地成功
var
data
=
{
let
filePath
=
res
.
filePath
companyId
:
this
.
merchantMessage
[
0
].
companyId
||
''
,
//公司ID
uni
.
saveVideoToPhotosAlbum
({
//保存视频到系统相册。
orderMoney
:
sellingPrice
,
//订单总价
filePath
,
userId
:
this
.
openid
,
success
:
file
=>
{
//保存成功
orderProductVo
:{},
//下单信息
//删除本地缓存
orderType
:
12
,
// vlogTYPE值
let
fileMgr
=
uni
.
getFileSystemManager
()
orderProductList
:[],
//景区下单信息
fileMgr
.
unlink
({
}
filePath
:
wx
.
env
.
USER_DATA_PATH
+
'/'
+
fileName
+
'.mp4'
,
var
orderProductListData
=
{
})
buyNum
:
1
,
//购买数量
uni
.
showToast
({
merchantId
:
this
.
merchantMessage
[
0
].
merchantId
||
''
,
title
:
'下载成功'
,
orderType
:
12
,
// 12vlog
icon
:
'success'
,
productId
:
this
.
merchantMessage
[
0
].
merchantExtendProjectId
||
''
,
mask
:
true
productName
:
this
.
merchantMessage
[
0
].
merchantExtendProjectName
||
''
,
})
extendContent
:
''
,
},
unitPrice
:
sellingPrice
,
//产品单价
fail
:
err
=>
{
orderImgList
:[],
////订单图片
uni
.
hideLoading
()
couponList
:[],
//券信息
//拒绝授权时显示
}
if
(
err
.
errMsg
===
'saveVideoToPhotosAlbum:fail auth deny'
)
{
var
imgList
=
{
uni
.
showModal
({
imgUrl
:
productUrl
,
title
:
'提示'
,
imgType
:
1
,
content
:
'需要您授权保存相册'
,
}
showCancel
:
false
,
orderProductListData
.
orderImgList
.
push
(
imgList
)
success
:
data
=>
{
var
extendContentData
=
{
//打开权限设置
openid
:
this
.
openid
,
uni
.
openSetting
({
projectAddress
:
this
.
merchantMessage
[
0
].
projectAddress
||
''
,
success
:
setting
=>
{
projectPhone
:
this
.
merchantMessage
[
0
].
projectPhone
||
''
,
if
(
setting
.
authSetting
[
'scope.writePhotosAlbum'
])
{
}
uni
.
showModal
({
orderProductListData
.
extendContent
=
JSON
.
stringify
(
extendContentData
)
title
:
'提示'
,
data
.
orderProductList
.
push
(
orderProductListData
)
content
:
'获取权限成功,再次点击下载即可保存'
,
//data.orderProductVo = orderProductVo
showCancel
:
false
,
this
.
$request
(
'orderc/photo/photoCreateOrder'
,
data
).
then
((
res
)
=>
{
})
if
(
res
.
code
==
'00'
){
}
else
{
uni
.
navigateTo
({
uni
.
showModal
({
url
:
'../../payment/orderPayment/orderPayment?orderId='
+
res
.
data
.
id
+
'&albumOrderdetail=1'
title
:
'提示'
,
})
ontent
:
'获取权限失败,将无法保存到相册哦'
,
}
else
{
showCancel
:
false
uni
.
showToast
({
})
title
:
res
.
message
,
}
icon
:
'none'
},
})
})
}
}
})
})
},
}
mearchLoadList
(){
//调用参数
}
var
merchantIds
=
[]
})
merchantIds
.
push
(
this
.
merchantIdOrder
)
},
this
.
$request
(
'scenic/merchantExtendProject/loadList'
,{
fail
:
err
=>
{
//下载失败
merchantIds
:
merchantIds
,
uni
.
hideLoading
()
merchantExtendProjectName
:
'vlog'
if
(
err
.
errMsg
==
'downloadFile:fail createDownloadTask:fail url not in domain list'
)
{
}).
then
((
res
)
=>
{
uni
.
showToast
({
if
(
res
.
code
==
'00'
){
title
:
'服务器错误,请联系相关管理员'
,
this
.
merchantMessage
=
res
.
data
icon
:
'none'
,
}
else
{
mask
:
true
uni
.
showToast
({
})
title
:
res
.
message
,
}
icon
:
'none'
}
})
})
}
},
})
error
(
e
)
{
//视频播放出错触发函数
},
uni
.
showModal
({
handleDownload
(
url
)
{
// 下载功能
content
:
e
.
target
.
errMsg
,
uni
.
showLoading
({
showCancel
:
false
title
:
'下载中'
,
})
mask
:
true
},
})
}
let
fileName
=
new
Date
().
valueOf
()
//获取时间戳
}
uni
.
downloadFile
({
//下载文件资源到本地
url
,
filePath
:
wx
.
env
.
USER_DATA_PATH
+
'/'
+
fileName
+
'.mp4'
,
//filePath指定文件下载后存储的路径,wx.env.USER_DATA_PATH,时间戳为文件名
success
:
res
=>
{
//下载到本地成功
let
filePath
=
res
.
filePath
uni
.
saveVideoToPhotosAlbum
({
//保存视频到系统相册。
filePath
,
success
:
file
=>
{
//保存成功
//删除本地缓存
let
fileMgr
=
uni
.
getFileSystemManager
()
fileMgr
.
unlink
({
filePath
:
wx
.
env
.
USER_DATA_PATH
+
'/'
+
fileName
+
'.mp4'
,
})
uni
.
showToast
({
title
:
'下载成功'
,
icon
:
'success'
,
mask
:
true
})
},
fail
:
err
=>
{
uni
.
hideLoading
()
//拒绝授权时显示
if
(
err
.
errMsg
===
'saveVideoToPhotosAlbum:fail auth deny'
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'需要您授权保存相册'
,
showCancel
:
false
,
success
:
data
=>
{
//打开权限设置
uni
.
openSetting
({
success
:
setting
=>
{
if
(
setting
.
authSetting
[
'scope.writePhotosAlbum'
])
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'获取权限成功,再次点击下载即可保存'
,
showCancel
:
false
,
})
}
else
{
uni
.
showModal
({
title
:
'提示'
,
ontent
:
'获取权限失败,将无法保存到相册哦'
,
showCancel
:
false
})
}
},
})
}
})
}
}
})
},
fail
:
err
=>
{
//下载失败
uni
.
hideLoading
()
if
(
err
.
errMsg
==
'downloadFile:fail createDownloadTask:fail url not in domain list'
)
{
uni
.
showToast
({
title
:
'服务器错误,请联系相关管理员'
,
icon
:
'none'
,
mask
:
true
})
}
}
})
},
error
(
e
)
{
//视频播放出错触发函数
uni
.
showModal
({
content
:
e
.
target
.
errMsg
,
showCancel
:
false
})
},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
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