Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
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
android
uniapp_vedio
Commits
363d66de
Commit
363d66de
authored
Oct 10, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
aaa8a7cd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
216 additions
and
203 deletions
+216
-203
pages.json
vedio/pages.json
+1
-1
index.vue
vedio/pages/index/index.vue
+8
-10
my.vue
vedio/pages/my/my.vue
+17
-9
address.vue
vedio/pagesA/address/address.vue
+0
-180
vipPay.vue
vedio/pagesA/vipPay/vipPay.vue
+187
-0
payRecord.vue
vedio/pagesD/payRecord/payRecord.vue
+3
-3
No files found.
vedio/pages.json
View file @
363d66de
...
...
@@ -74,7 +74,7 @@
"subPackages"
:
[{
"root"
:
"pagesA"
,
"pages"
:
[{
"path"
:
"
address/address
"
,
"path"
:
"
vipPay/vipPay
"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarBackgroundColor"
:
"#2196f3"
,
...
...
vedio/pages/index/index.vue
View file @
363d66de
...
...
@@ -229,17 +229,15 @@
message
.
notify
(
'vedioId='
+
vedioId
);
},
handleBottomClose
()
{
//
this.post({
//
url: '/vedio/colseNewest',
//
showLoading: false,
//
success: ({
//
data
//
}) => {
//
}
//
});
this
.
post
({
url
:
'/vedio/colseNewest'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
}
});
this
.
newRecordBean
=
null
;
message
.
notify
(
'handleBottomClose'
);
navigateTo
(
`/pagesD/payRecord/payRecord`
)
}
}
};
...
...
vedio/pages/my/my.vue
View file @
363d66de
...
...
@@ -4,7 +4,7 @@
style=
"display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;padding-top: 30rpx;"
>
<image
class=
"avatar"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/bg_my_vip.png"
></image>
<view>
<view
style=
"font-size: 26rpx;color: black;margin-left: 20rpx;"
>
用户ID
:
{{
userBean
.
idcode
}}
</view>
<view
style=
"font-size: 26rpx;color: black;margin-left: 20rpx;"
>
用户ID
:
{{
userBean
.
idcode
}}
</view>
<view
style=
"font-size: 32rpx;color: black;font-weight: 777;margin-left: 20rpx;"
>
未登录
</view>
</view>
</view>
...
...
@@ -12,17 +12,18 @@
<view
style=
"display: flex;flex-direction: row;background: #f5ca86;margin: 20rpx;padding: 40rpx;border-radius:20rpx;align-items: center;justify-content:space-between;"
>
<view
style=
"display: flex;flex-direction: column;justify-content: center;"
>
<view
style=
"font-size: 34rpx;color: #5b1500;font-weight: 777;"
>
开通VIP会员
</view>
<view
style=
"font-size: 34rpx;color: #5b1500;font-weight: 777;"
>
{{
userBean
.
expireTime
<=
0
?
'开通VIP会员'
:
'VIP会员'
}}
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
style=
"font-size: 24rpx;color: #5b1500;margin-top: 12rpx;"
>
解锁全部短剧
</view>
<view
v-else
style=
"font-size: 24rpx;color: #5b1500;margin-top: 12rpx;"
>
到期时间:
{{
userBean
.
expireTime
*
1000
|
formatDate
(
'yyyy-MM-dd'
)
}}
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
style=
"width: 210rpx;height: 60rpx;background-color: #5b1500;border-radius:30rpx;color: white;font-size: 26rpx;justify-content: center;
align-items: center;display: flex;padding-bottom: 4rpx;margin-top: 30rpx;"
>
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
@
click=
"handleVipPay"
style=
"width: 210rpx;height: 60rpx;background-color: #5b1500;border-radius:30rpx;color: white;font-size: 26rpx;justify-content: center;
align-items: center;display: flex;padding-bottom: 4rpx;margin-top: 30rpx;"
>
立即开通
</view>
<view
v-else
style=
"width: 210rpx;height: 60rpx;padding-bottom: 4rpx;margin-top: 30rpx;"
>
...
...
@@ -47,8 +48,11 @@
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
</view>
<view
style=
"display: flex;justify-content: center;margin-top: 20rpx;font-size: 26rpx;color: gray;"
>
{{
versionName
}}
</view>
</view>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
...
...
@@ -74,7 +78,8 @@
mixins
:
[
common
],
data
()
{
return
{
userBean
:
null
userBean
:
null
,
versionName
:
app
.
globalData
.
versionName
};
},
methods
:
{
...
...
@@ -96,6 +101,9 @@
handlePayRecord
()
{
navigateTo
(
`/pagesD/payRecord/payRecord`
)
},
handleVipPay
()
{
navigateTo
(
`/pagesA/vipPay/vipPay`
)
},
handlePhone
()
{
}
...
...
vedio/pagesA/address/address.vue
deleted
100644 → 0
View file @
aaa8a7cd
<
template
>
<view
class=
"body"
>
<status-title
:showBack=
"true"
>
地址
</status-title>
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
<view
class=
"address-wrap"
>
<view
class=
"address-item"
v-for=
"(item, index) in dataList"
:key=
"index"
>
<view
class=
"flex"
style=
"padding: 20rpx 40rpx;justify-content: space-between;"
>
<view
class=
"flex1"
>
<view
class=
"mt-10"
style=
"color: #818283;"
>
{{
item
.
region
}}
</view>
<view
class=
"mt-10"
style=
"color: #000;font-size: 28rpx;"
>
{{
item
.
region
+
item
.
detail
}}
</view>
<view
class=
"flex mt-10"
>
<view
style=
"font-size: 28rpx;color: #000;"
>
{{
item
.
userName
}}
</view>
<view
class=
"ml-42"
style=
"color: #7F8081;font-size: 24rpx;"
>
{{
item
.
userMobile
}}
</view>
</view>
</view>
<u-icon
@
click=
"updateAddress(index)"
name=
"edit-pen-fill"
size=
"20"
/>
</view>
<view
v-show=
"index!=dataList.length-1"
class=
"line"
></view>
</view>
</view>
</z-paging>
<address-dialog
:data=
"updateData"
:showModal=
"showModal"
@
dismiss=
"dismiss"
@
confirm=
"confirm"
/>
<view
class=
"bottom"
:style=
"'padding-bottom: '+bottomSafePadding+'px;'"
>
<view
class=
"btn"
@
click=
"createNewAddress"
>
新增收货地址
</view>
</view>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
message
,
navigateBack
,
navigateTo
,
redirectTo
}
from
'@/utils/fun'
;
const
app
=
getApp
();
export
default
{
name
:
'address'
,
mixins
:
[
common
],
data
()
{
return
{
dataList
:
[],
showModal
:
false
,
updateData
:
{},
}
},
methods
:
{
onLoad
(
option
)
{},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/app/addressList'
,
data
:
{
session
:
app
.
globalData
.
token
,
page
:
page
,
size
:
size
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
dataList
=
data
.
list
}
});
},
createNewAddress
()
{
this
.
showModal
=
true
this
.
updateData
=
{}
this
.
updateData
.
type
=
0
},
updateAddress
(
val
)
{
this
.
showModal
=
true
this
.
updateData
=
{}
this
.
updateData
.
userName
=
this
.
dataList
[
val
].
userName
this
.
updateData
.
userMobile
=
this
.
dataList
[
val
].
userMobile
this
.
updateData
.
region
=
this
.
dataList
[
val
].
region
this
.
updateData
.
detail
=
this
.
dataList
[
val
].
detail
this
.
updateData
.
index
=
val
this
.
updateData
.
type
=
1
},
confirm
(
val
)
{
this
.
showModal
=
false
var
params
=
{}
if
(
val
.
type
==
0
)
{
params
=
{
session
:
app
.
globalData
.
token
,
userName
:
val
.
userName
,
userMobile
:
val
.
userMobile
,
region
:
val
.
region
,
detail
:
val
.
detail
,
}
this
.
post
({
url
:
'/app/addAddress'
,
data
:
params
,
showLoading
:
false
,
success
:
({
data
})
=>
{
message
.
notify
(
'新增地址成功'
)
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
}
});
}
else
{
params
=
{
session
:
app
.
globalData
.
token
,
userName
:
val
.
userName
,
userMobile
:
val
.
userMobile
,
region
:
val
.
region
,
detail
:
val
.
detail
,
addressId
:
this
.
dataList
[
val
.
index
].
id
,
}
this
.
post
({
url
:
'/app/updateAddress'
,
data
:
params
,
showLoading
:
false
,
success
:
({
data
})
=>
{
message
.
notify
(
'地址修改成功'
)
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
}
});
}
},
dismiss
()
{
this
.
showModal
=
false
}
}
}
</
script
>
<
style
lang=
"scss"
>
.body
{}
.address-wrap
{
border-radius
:
20rpx
;
background-color
:
#fff
;
font-size
:
30rpx
;
margin
:
30rpx
;
}
.line
{
background-color
:
#ccc
;
height
:
1rpx
;
width
:
100%
;
}
.bottom
{
padding
:
20rpx
0
;
background-color
:
#fff
;
width
:
100%
;
}
.btn
{
margin
:
0
auto
;
width
:
80%
;
font-size
:
28rpx
;
color
:
#fff
;
line-height
:
70rpx
;
height
:
70rpx
;
text-align
:
center
;
border-radius
:
10rpx
;
background-color
:
#F8425A
;
}
</
style
>
vedio/pagesA/vipPay/vipPay.vue
0 → 100644
View file @
363d66de
<
template
>
<view
class=
"body"
>
<view
class=
"section"
>
<view
class=
"title"
>
选择套餐
</view>
<view
class=
"pack-box"
>
<view
class=
"pack-item"
:class=
"[
{active: index==selectedIndex}]" v-for='(item, index) in vipList'
:key='index' @click="choosePack(item, index)">
<view
class=
"name row"
>
{{
item
.
title
}}
</view>
<view
class=
"price row"
>
¥
{{
item
.
firstPayPrice
}}
</view>
<view
class=
"origin row"
v-if=
'item.oldPrice'
>
原价:
{{
item
.
oldPrice
}}
</view>
<view
class=
"cut-down"
v-if=
'item.oldPrice-item.firstPayPrice>0'
>
立省
{{
item
.
oldPrice
-
item
.
firstPayPrice
}}
元
</view>
</view>
</view>
</view>
<view
class=
"section"
>
<button
class=
"apply-button"
@
click=
"handlePay"
>
立即开通
</button>
</view>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
message
,
navigateBack
,
navigateTo
,
redirectTo
}
from
'@/utils/fun'
;
const
app
=
getApp
();
export
default
{
name
:
'vipPay'
,
mixins
:
[
common
],
data
()
{
return
{
vipList
:
[],
selectedIndex
:
0
,
}
},
methods
:
{
loadData
()
{
this
.
post
({
url
:
'/vip/getVipProducts'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
vipList
=
data
.
list
}
});
},
choosePack
(
item
,
index
)
{
this
.
selectedIndex
=
index
;
},
handlePay
(){
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
message
.
notify
(
'vipBean 价格='
+
vipBean
.
firstPayPrice
);
// this.post({
// url: '/vip/getVipPayParams',
// data: {
// pid: vipBean.pid,
// payChannel: 'WEIXIN'
// },
// showLoading: false,
// success: ({
// data
// }) => {
// let wxParams = data.params
// // 发起微信支付
// }
// });
}
}
}
</
script
>
<
style
lang=
"scss"
>
.body
{
background-color
:
whitesmoke
;
display
:
flex
;
flex-direction
:
column
;
.section
{
padding
:
0
30rpx
;
display
:
flex
;
flex-direction
:
column
;
background
:
white
;
.title
{
font-size
:
32rpx
;
font-weight
:
700
;
color
:
#333
;
margin-bottom
:
30rpx
;
}
.pack-box
{
margin-left
:
40rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
.active
{
border
:
6rpx
solid
#fd5350
!
important
;
}
.pack-item
{
margin-bottom
:
15rpx
;
margin-right
:
40rpx
;
width
:
calc
(
33
.333333333%
-
40rpx
);
height
:
200rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-around
;
background
:
#f5f5f5
;
border
:
6rpx
solid
#f5f5f5
;
border-radius
:
10rpx
;
position
:
relative
;
.row
{
margin
:
8rpx
15rpx
;
marign-bottom
:
0
;
}
.row
:last-child
{
margin-bottom
:
8rpx
;
}
.name
{
font-size
:
26rpx
;
font-weight
:
700
;
color
:
#333
;
}
.price
{
font-size
:
30rpx
;
color
:
#fd5350
;
font-weight
:
700
;
}
.origin
{
font-size
:
22rpx
;
color
:
#333
;
text-decoration
:
line-through
;
}
.cut-down
{
position
:
absolute
;
top
:
0
;
right
:
0
;
color
:
#fff
;
background
:
#ff502f
;
font-size
:
22rpx
;
border-radius
:
15rpx
;
height
:
30rpx
;
line-height
:
30rpx
;
padding
:
0
10rpx
;
transform
:
translate
(
0
,
-50%
);
}
}
}
.apply-button
{
border-radius
:
50rpx
;
background
:
#e8c8ae
;
color
:
#8d5a29
;
margin
:
30rpx
auto
;
}
}
}
</
style
>
\ No newline at end of file
vedio/pagesD/payRecord/payRecord.vue
View file @
363d66de
...
...
@@ -5,9 +5,9 @@
<view
style=
"display: flex;flex-direction: row;justify-content:space-between;margin: 20rpx;background-color:white;border-radius:10rpx;padding: 20rpx;"
>
<view
style=
"display: flex;flex-direction: column;"
>
<view
style=
"font-size: 28rpx;color: black;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 16rpx;"
>
付款时间
:
{{
item
.
time
}}
</view>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 1rpx;"
>
订单编号
:
{{
item
.
orderid
}}
</view>
<view
style=
"font-size: 28rpx;color: black;"
>
{{
item
.
remarks
}}
</view>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 16rpx;"
>
付款时间
:
{{
item
.
create
time
}}
</view>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 1rpx;"
>
订单编号
:
{{
item
.
orderid
}}
</view>
</view>
<view
style=
"display: flex;align-items: center;margin-right: 8rpx;font-size: 36rpx;color: red;"
>
¥
{{
item
.
balance
}}
...
...
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