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
9ab70baf
Commit
9ab70baf
authored
May 29, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
a8d16bc4
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
290 additions
and
530 deletions
+290
-530
my.vue
vedio/components/home/my.vue
+265
-250
pages.json
vedio/pages.json
+9
-1
home.vue
vedio/pages/home.vue
+14
-3
my.vue
vedio/pages/my/my.vue
+0
-266
readerRecord.vue
vedio/pagesD/readerRecord/readerRecord.vue
+1
-9
tabs-bar.scss
vedio/scss/tabs-bar.scss
+1
-1
No files found.
vedio/components/home/my.vue
View file @
9ab70baf
This diff is collapsed.
Click to expand it.
vedio/pages.json
View file @
9ab70baf
...
...
@@ -128,7 +128,7 @@
},
{
"path"
:
"dotRecord/dotRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"
看点
记录"
,
"navigationBarTitleText"
:
"
书豆
记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
...
...
@@ -141,6 +141,14 @@
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"readerRecord/readerRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"阅读记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
}]
}],
//
分包预载配置
...
...
vedio/pages/home.vue
View file @
9ab70baf
...
...
@@ -60,7 +60,7 @@
},
data
()
{
return
{
currentPage
:
0
currentPage
:
2
}
},
onLoad
(
options
)
{
...
...
@@ -70,8 +70,19 @@
}
},
onShow
()
{
this
.
loadComponentData
();
onShow
()
{
try
{
// 在子组件重写show()代替onShow()
if
(
this
.
currentPage
==
0
)
{
this
.
$refs
.
index
.
show
();
}
else
if
(
this
.
currentPage
==
1
)
{
this
.
$refs
.
recommend
.
show
();
}
else
if
(
this
.
currentPage
==
2
)
{
this
.
$refs
.
user
.
show
();
}
}
catch
(
e
)
{
}
},
mounted
()
{
// 渲染完成 初始化首页数据
...
...
vedio/pages/my/my.vue
deleted
100644 → 0
View file @
a8d16bc4
<
template
>
<view
class=
"body"
>
<!--
<scroll-view
:scroll-y=
"true"
>
-->
<z-paging
style=
"height: 100%;"
>
<view
:style=
"'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+statusBarHeight+'px;'"
>
<image
class=
"avatar"
src=
"@/static/logo-about.png"
></image>
<view>
<view
style=
"font-size: 32rpx;color: black;margin-left: 20rpx;"
>
用户ID:
{{
userBean
.
idcode
}}
</view>
</view>
<!--
<button
text=
"微信用户一键登录"
open-type=
"getPhoneNumber"
bindgetphonenumber=
"getPhoneNumber"
>
123123
</button>
-->
</view>
<view
v-if=
"userBean.showVipInner && os === 'android' "
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: 36rpx;color: #5b1500;font-weight: 777;"
>
{{
userBean
.
expireTime
<=
0
?
'开通VIP会员'
:
'VIP会员'
}}
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
style=
"font-size: 30rpx;color: #5b1500;margin-top: 12rpx;"
>
解锁全部小说
</view>
<view
v-else
style=
"font-size: 30rpx;color: #5b1500;margin-top: 12rpx;"
>
到期时间:
{{
userBean
.
expireTime
*
1000
|
formatDate
(
'yyyy-MM-dd'
)
}}
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
@
click=
"handleCoinPay"
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;"
>
</view>
</view>
<image
style=
"border-radius:10rpx; width: 130rpx;height: 100rpx;margin-right: 20rpx;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/bg_my_vip.png"
mode=
"scaleToFill"
></image>
</view>
<view
v-if=
"os === 'android' "
style=
"display: flex;height: 200rpx;margin: 20rpx;background: #f5ca86;border-radius: 20rpx;"
>
<view
style=
"flex-grow: 2; margin-left: 20rpx;"
>
<view
style=
"width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;"
>
<view
style=
"display: flex;align-items: center;"
>
<image
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_my_coin.png"
></image>
<view
style=
"font-size: 36rpx;font-weight: 777;"
>
看点充值
</view>
</view>
<view
style=
"font-size: 28rpx;color: #5b1500;margin-top: 20rpx;"
>
海量看点狂洒中,好剧等你来解锁
</view>
</view>
</view>
<view
style=
"width: 220rpx;"
>
<view
style=
"width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"
>
<view
style=
"font-size: 30rpx;color: #5b1500;margin-bottom: 20rpx;"
>
{{
userBean
.
point
}}
</view>
<view
@
click=
"handleCoinPay"
style=
"width: 160rpx;height: 60rpx;background-color: #5b1500;border-radius:30rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;"
>
去充值
</view>
</view>
</view>
</view>
<view
class=
"infobg"
style=
"margin: 20rpx;"
>
<view
v-if=
"userBean.showVipInner && os === 'android' "
class=
"item arrow"
@
click=
"handlePayRecord"
>
我的订单
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
v-if=
"os === 'android' "
class=
"item arrow"
@
click=
"handleDotRecord"
>
看点记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
v-if=
"os === 'android' "
class=
"item arrow"
@
click=
"handleUseDotRecord"
>
消费记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
class=
"item arrow"
@
click=
"handleWatchRecord"
>
观看记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
class=
"item arrow"
@
click=
"handlePhone"
>
联系客服
<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>
</z-paging>
<!--
</scroll-view>
-->
<coin-popup
:show=
"showAnimate"
@
close=
"showAnimate = false"
@
paySuccess=
"paySuccess"
>
</coin-popup>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
getToLocal
}
from
"@/utils/utils.js"
import
{
navigateTo
,
message
,
alert
,
loading
}
from
'@/utils/fun.js'
;
import
{
openUrl
}
from
'@/utils/app+.js'
;
const
app
=
getApp
();
export
default
{
name
:
'index'
,
mixins
:
[
common
],
data
()
{
return
{
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
userBean
:
{},
showAnimate
:
false
,
windowHeight
:
0
,
os
:
'android'
,
versionName
:
app
.
globalData
.
versionName
,
corpid
:
''
,
// 企业ID
curl
:
''
,
// 客服链接
};
},
methods
:
{
show
()
{
this
.
os
=
wx
.
getSystemInfoSync
().
platform
;
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
// loadData() {
this
.
post
({
url
:
'/user/baseMsg'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
userBean
=
data
;
}
});
},
hide
()
{
},
handleDotRecord
()
{
// 看点记录
navigateTo
(
`/pagesD/dotRecord/dotRecord`
)
},
handleUseDotRecord
()
{
// 看点消费记录
navigateTo
(
`/pagesD/useDotRecord/useDotRecord`
)
},
handleWatchRecord
()
{
navigateTo
(
`/pagesD/watchRecord/watchRecord`
)
},
handleCoinPay
()
{
this
.
showAnimate
=
true
;
},
handlePayRecord
()
{
navigateTo
(
`/pagesD/payRecord/payRecord`
)
},
handleVipPay
()
{
navigateTo
(
`/pagesA/vipPay/vipPay`
)
},
handlePhone
()
{
// if (this.corpid != '' && this.curl != '') {
// wx.openCustomerServiceChat({
// extInfo: {
// url: this.curl
// },
// corpId: this.corpid,
// success(res) {},
// fail(e) {
// console.log(e)
// }
// })
// } else {
// let that = this
// // 联系我们
// this.post({
// url: '/vedio/customerServiceNumbers',
// showLoading: false,
// success: ({
// data
// }) => {
// let datas = data.customerServiceNumbers.split(',')
// that.corpid = datas[0]
// that.curl = datas[1]
// wx.openCustomerServiceChat({
// extInfo: {
// url: that.curl
// },
// corpId: that.corpid,
// success(res) {},
// fail(e) {
// console.log(e)
// }
// })
// }
// });
// }
wx
.
makePhoneCall
({
phoneNumber
:
'4000969950'
,
success
:
function
(
res
)
{
console
.
log
(
'拨打电话成功!'
);
},
fail
:
function
(
res
)
{
console
.
log
(
'拨打电话失败!'
);
}
})
},
paySuccess
(
largeType
)
{
// largeType=vip 开通vip
// largeType=point 购买看点
if
(
wx
.
getSystemInfoSync
().
platform
==
'ios'
){
message
.
notify
(
'支付成功'
);
}
this
.
post
({
url
:
'/user/baseMsg'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
userBean
=
data
;
}
});
},
getPhoneNumber
(
e
)
{
console
.
log
(
e
.
detail
.
code
)
// 动态令牌
console
.
log
(
e
.
detail
.
errMsg
)
// 回调信息(成功失败都会返回)
console
.
log
(
e
.
detail
.
errno
)
// 错误码(失败时返回)
}
}
};
</
script
>
<
style
lang=
"scss"
>
@import
'@/scss/uni.scss'
;
.body
{
background-color
:
whitesmoke
;
}
.avatar
{
background-color
:
#d8d8d8
;
width
:
100rpx
;
height
:
100rpx
;
border-radius
:
50%
;
overflow
:
hidden
;
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}
</
style
>
\ No newline at end of file
vedio/pagesD/
watchRecord/watch
Record.vue
→
vedio/pagesD/
readerRecord/reader
Record.vue
View file @
9ab70baf
<
template
>
<view
class=
"body"
>
<!--
<status-title
:showBack=
"true"
>
阅读记录
</status-title>
-->
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
:defaultPageNo=
"1"
:defaultPageSize=
"500"
>
<view
style=
"font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 10rpx;"
>
最近阅读
</view>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
style=
"display: flex;flex-direction: row;justify-content:space-between;margin: 20rpx;"
>
<view
style=
"display: flex;align-items: center;"
@
click=
"handleInfo(item)"
>
...
...
@@ -36,11 +34,6 @@
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
getToLocal
}
from
"@/utils/utils.js"
import
{
navigateTo
,
message
,
...
...
@@ -121,8 +114,7 @@
};
</
script
>
<
style
lang=
"scss"
>
@import
'@/scss/uni.scss'
;
<
style
>
.body
{
background-color
:
whitesmoke
;
...
...
vedio/scss/tabs-bar.scss
View file @
9ab70baf
...
...
@@ -9,7 +9,7 @@
font-weight
:
bold
;
color
:
black
;
&
.active
{
color
:
#F
8425A
;
color
:
#F
ECF02
;
}
}
}
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