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
bf4400a5
Commit
bf4400a5
authored
Nov 28, 2023
by
qipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增VLOG收费
parent
1af0e48f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
217 additions
and
144 deletions
+217
-144
vlogList.vue
pages/vlog/vlogList/vlogList.vue
+217
-144
No files found.
pages/vlog/vlogList/vlogList.vue
View file @
bf4400a5
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
<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=
"hand
leDownload(item.productUrl
)"
>
下载视频
</button>
<button
v-else
class=
"btnn"
@
click=
"hand
Payment(item.productUrl,item.isPay,item.sellingPrice
)"
>
下载视频
</button>
<text
class=
"price"
>
¥
<text>
0
</text></text>
<text
class=
"price"
>
¥
<text>
{{
item
.
sellingPrice
}}
</text></text>
</view>
</view>
<view
style=
"clear: both;"
></view>
<view
style=
"clear: both;"
></view>
</view>
</view>
...
@@ -17,17 +17,23 @@
...
@@ -17,17 +17,23 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
openid
:
''
,
myVlogList
:
[],
//我的视频列表
myVlogList
:
[],
//我的视频列表
merchantId
:
''
,
//景区id
merchantId
:
''
,
//景区id
merchantIdOrder
:
''
,
//下单用merchantId
merchantMessage
:[],
//景区基础参数
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
merchantId
=
options
.
merchantId
this
.
merchantId
=
options
.
merchantId
this
.
merchantIdOrder
=
options
.
merchantIdOrder
||
'z0015605022691a5945bbe463141668c'
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
//获取openid
this
.
getMyVlogList
()
this
.
getMyVlogList
()
this
.
mearchLoadList
()
//调用参数
},
},
onShow
()
{
onShow
()
{
...
@@ -84,6 +90,73 @@
...
@@ -84,6 +90,73 @@
}
}
})
})
},
},
handPayment
(
productUrl
,
isPay
,
sellingPrice
){
//当前视频是否需要支付下载费用
//isPay 0为未支付 1为已支付
if
(
isPay
==
0
){
//originalPrice 原价 sellingPrice售价 settlementPrice结算价
this
.
upLoad
(
sellingPrice
)
}
else
{
handleDownload
(
productUrl
)
}
},
upLoad
(
sellingPrice
){
//下单
var
data
=
{
companyId
:
this
.
merchantMessage
[
0
].
companyId
||
''
,
//公司ID
orderMoney
:
sellingPrice
,
//订单总价
userId
:
this
.
openid
,
orderProductVo
:{},
//下单信息
orderType
:
11
,
//相册TYPE值
orderProductList
:[],
//景区下单信息
}
var
orderProductListData
=
{
buyNum
:
1
,
//购买数量
merchantId
:
this
.
merchantMessage
[
0
].
merchantId
||
''
,
orderType
:
11
,
//11相册
productId
:
this
.
merchantMessage
[
0
].
merchantExtendProjectId
||
''
,
productName
:
this
.
merchantMessage
[
0
].
merchantExtendProjectName
||
''
,
extendContent
:
''
,
unitPrice
:
sellingPrice
,
//产品单价
orderImgList
:[],
////订单图片
couponList
:[],
//券信息
}
var
extendContentData
=
{
openid
:
this
.
openid
,
projectAddress
:
this
.
merchantMessage
[
0
].
projectAddress
||
''
,
projectPhone
:
this
.
merchantMessage
[
0
].
projectPhone
||
''
,
}
orderProductListData
.
extendContent
=
JSON
.
stringify
(
extendContentData
)
data
.
orderProductList
.
push
(
orderProductListData
)
//data.orderProductVo = orderProductVo
this
.
$request
(
'orderc/photo/photoCreateOrder'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
uni
.
navigateTo
({
url
:
'../../payment/orderPayment/orderPayment?orderId='
+
res
.
data
.
id
+
'&albumOrderdetail=1'
})
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
mearchLoadList
(){
//调用参数
var
merchantIds
=
[]
merchantIds
.
push
(
this
.
merchantIdOrder
)
this
.
$request
(
'scenic/merchantExtendProject/loadList'
,{
merchantIds
:
merchantIds
,
merchantExtendProjectName
:
'vlog'
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
merchantMessage
=
res
.
data
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
handleDownload
(
url
)
{
// 下载功能
handleDownload
(
url
)
{
// 下载功能
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'下载中'
,
title
:
'下载中'
,
...
@@ -161,7 +234,7 @@
...
@@ -161,7 +234,7 @@
})
})
},
},
}
}
}
}
</
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