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
a779a283
Commit
a779a283
authored
Jan 02, 2025
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
0afa8f4f
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
975 additions
and
673 deletions
+975
-673
App.vue
vedio/App.vue
+18
-10
Book.js
vedio/common/models/Book.js
+9
-7
WechatRecord.js
vedio/common/models/WechatRecord.js
+14
-0
index.js
vedio/common/services/index.js
+2
-1
page-route.js
vedio/common/services/page-route.js
+6
-31
banner.vue
vedio/components/banner/banner.vue
+1
-1
bookcity.vue
vedio/components/bookcity/bookcity.vue
+7
-7
bookcity-list.vue
vedio/components/bookcity/components/bookcity-list.vue
+1
-1
index.js
vedio/components/bookcity/services/index.js
+12
-9
bookshelf-list.vue
vedio/components/bookshelf/components/bookshelf-list.vue
+2
-2
charge-dialog.vue
vedio/components/charge-dialog/charge-dialog.vue
+421
-0
recommend-list.vue
vedio/components/recommend-list/recommend-list.vue
+14
-14
warehouse-list.vue
vedio/components/warehouse/components/warehouse-list.vue
+3
-2
warehouse.vue
vedio/components/warehouse/warehouse.vue
+0
-3
warehousetemp.vue
vedio/components/warehouse/warehousetemp.vue
+0
-165
manifest.json
vedio/manifest.json
+14
-17
recommend-pop.vue
...page-subs/sub_A/book-content/components/recommend-pop.vue
+2
-2
recommend-pop.vue
...subs/sub_A/book-long-content/components/recommend-pop.vue
+167
-163
recommond-item.vue
...page-subs/sub_A/book-search/components/recommond-item.vue
+130
-130
search-result.vue
.../page-subs/sub_A/book-search/components/search-result.vue
+1
-1
pages.json
vedio/pages.json
+21
-80
readerRecord.vue
vedio/pagesD/readerRecord/readerRecord.vue
+4
-3
readme.md
vedio/readme.md
+0
-23
novelManager.js
vedio/utils/novelManager.js
+125
-0
utils.js
vedio/utils/utils.js
+1
-1
No files found.
vedio/App.vue
View file @
a779a283
...
...
@@ -2,8 +2,16 @@
import
{
PAKEAGE_NAME
}
from
'./utils/utils.js'
;
import
checkUpdate
from
'./utils/update.js'
;
// #ifdef MP-WEIXIN
const
novelPlugin
=
requirePlugin
(
'novel-plugin'
)
const
NovelManager
=
require
(
'@/utils/novelManager.js'
)
// #endif
export
default
{
usingComponents
:
{
"charge-dialog"
:
"/components/charge-dialog/charge-dialog"
},
onLaunch
:
function
(
options
)
{
// #ifdef APP-PLUS
//设置2.4秒后主动关闭,最多设置6秒
...
...
@@ -22,6 +30,7 @@
// #endif
this
.
globalData
.
windowWidth
=
res
.
windowWidth
;
// 抖音
// #ifdef MP-TOUTIAO
this
.
globalData
.
statusBarHeight
=
0
;
...
...
@@ -53,19 +62,18 @@
console
.
log
(
e
);
}
// checkUpdate(this);
},
onShow
:
function
(
options
)
{
this
.
globalData
.
resetLogin
=
true
},
onHide
:
function
()
{
this
.
globalData
.
resetLogin
=
false
// #ifdef MP-WEIXIN
novelPlugin
.
onPageLoad
(
this
.
_onNovelLoad
.
bind
(
this
))
// #endif
},
methods
:
{
_onNovelLoad
(
info
)
{
const
novelManager
=
new
NovelManager
()
novelManager
.
_onNovelLoad
(
info
)
},
},
globalData
:
{
resetLogin
:
false
,
statusBarHeight
:
0
,
titleBarHeight
:
43
,
titlePadding
:
8
,
...
...
vedio/common/models/Book.js
View file @
a779a283
...
...
@@ -28,10 +28,11 @@ export default class Book {
bookLegumes
,
lockRate
,
shortis
,
articleChapterList
,
freeNum
,
carouselUrl
,
isChecked
articleChapterList
,
freeNum
,
carouselUrl
,
isChecked
,
wechatRecord
,
}
=
param
||
{}
this
.
id
=
id
;
this
.
title
=
title
;
...
...
@@ -42,6 +43,7 @@ export default class Book {
}).
sort
((
a
,
b
)
=>
{
return
a
.
sort
-
b
.
sort
})
:
[];
this
.
wechatRecord
=
wechatRecord
this
.
author
=
author
;
this
.
isStick
=
isStick
;
this
.
isOriginal
=
isOriginal
;
...
...
@@ -61,9 +63,9 @@ export default class Book {
this
.
isUnlock
=
isUnlock
;
this
.
bookLegumes
=
bookLegumes
;
this
.
lockRate
=
lockRate
;
this
.
shortis
=
shortis
;
this
.
freeNum
=
freeNum
;
this
.
carouselUrl
=
carouselUrl
;
this
.
shortis
=
shortis
;
this
.
freeNum
=
freeNum
;
this
.
carouselUrl
=
carouselUrl
;
this
.
isChecked
=
isChecked
;
this
.
articleChapterList
=
articleChapterList
;
}
...
...
vedio/common/models/WechatRecord.js
0 → 100644
View file @
a779a283
export
default
class
Label
{
constructor
(
param
)
{
const
{
id
,
name
,
type
,
sort
,
clickVolume
}
=
param
||
{}
this
.
id
=
id
;
this
.
name
=
name
;
this
.
type
=
type
;
}
}
\ No newline at end of file
vedio/common/services/index.js
View file @
a779a283
...
...
@@ -319,7 +319,8 @@ function getRecommendV1(flag, quantity, callback) {
url
:
`/book/recommendv1`
,
data
:
{
flag
:
flag
,
quantity
:
quantity
quantity
:
quantity
,
reader
:
true
},
callback
})
...
...
vedio/common/services/page-route.js
View file @
a779a283
...
...
@@ -3,6 +3,10 @@ const {
ENUM_MESSAGE_PAGE_TYPE
}
=
require
(
"../../static/enums/enum_value"
);
import
{
navigateToNovel
}
from
'@/utils/novelManager.js'
;
// 搜索页面
function
gotoBookSearchPage
(
searchType
=
ENUM_SEARCH_TYPE
.
WAREHOUSE
,
keyword
)
{
uni
.
navigateTo
({
...
...
@@ -17,37 +21,8 @@ function gotoBookSearchPage(searchType = ENUM_SEARCH_TYPE.WAREHOUSE, keyword) {
}
// 文章详情
function
gotoBookContentPage
(
bookId
,
shortis
)
{
if
(
shortis
&&
shortis
==
0
)
{
gotoShortBookContentPage
(
bookId
)
}
else
{
gotoLongBookContentPage
(
bookId
)
}
}
// 短篇文章详情
function
gotoShortBookContentPage
(
bookId
)
{
// 短篇小说
uni
.
navigateTo
({
url
:
`/page-subs/sub_A/book-content/book-content`
,
success
:
(
res
)
=>
{
res
.
eventChannel
.
emit
(
"openBookContentPage"
,
{
bookId
})
}
})
}
// 长篇文章详情
function
gotoLongBookContentPage
(
bookId
)
{
uni
.
navigateTo
({
url
:
`/page-subs/sub_A/book-long-content/book-long-content`
,
success
:
(
res
)
=>
{
res
.
eventChannel
.
emit
(
"openBookContentPage"
,
{
bookId
})
}
})
function
gotoBookContentPage
(
wxId
,
customId
)
{
navigateToNovel
(
wxId
,
customId
)
}
// 文章封面
...
...
vedio/components/banner/banner.vue
View file @
a779a283
...
...
@@ -27,7 +27,7 @@
},
methods
:
{
handleBanner
(
e
)
{
gotoBookContentPage
(
e
.
id
,
e
.
shortis
)
gotoBookContentPage
(
e
.
wechatRecord
.
wxId
,
e
.
id
)
},
initData
()
{
this
.
refreshList
();
...
...
vedio/components/bookcity/bookcity.vue
View file @
a779a283
...
...
@@ -8,12 +8,12 @@
</scroll-view>
</
template
>
<
script
>
import
{
gotoBookContentPage
}
from
'../../common/services/page-route'
import
{
getFirstShow
<
script
>
import
{
gotoBookContentPage
}
from
'../../common/services/page-route'
import
{
getFirstShow
}
from
"./services/index.js"
import
RecommendList
from
"../recommend-list/recommend-list.vue"
;
import
Banner
from
"../banner/banner.vue"
;
...
...
@@ -51,7 +51,7 @@
setTimeout
(()
=>
{
// 匹配用户直接跳转小说
if
(
data
.
articleMsg
!=
null
)
{
gotoBookContentPage
(
data
.
articleMsg
.
id
,
data
.
articleMsg
.
shortis
);
gotoBookContentPage
(
data
.
articleMsg
.
wechatRecord
.
wxId
,
data
.
articleMsg
.
id
);
}
},
800
);
}
...
...
vedio/components/bookcity/components/bookcity-list.vue
View file @
a779a283
...
...
@@ -63,7 +63,7 @@
return
}
gotoBookContentPage
(
e
.
detail
.
data
.
id
,
e
.
detail
.
data
.
shortis
)
gotoBookContentPage
(
e
.
detail
.
data
.
wechatRecord
.
wxId
,
e
.
detail
.
id
)
}
}
}
...
...
vedio/components/bookcity/services/index.js
View file @
a779a283
...
...
@@ -3,13 +3,16 @@ import {
apiPOST
}
from
"../../../common/utils/apiRequest.js"
function
getFirstShow
(
callback
)
{
apiPOST
({
url
:
"/book/firstArticle"
,
callback
})
}
module
.
exports
=
{
getFirstShow
function
getFirstShow
(
callback
)
{
apiPOST
({
url
:
"/book/firstArticle"
,
data
:
{
reader
:
true
},
callback
})
}
module
.
exports
=
{
getFirstShow
}
\ No newline at end of file
vedio/components/bookshelf/components/bookshelf-list.vue
View file @
a779a283
...
...
@@ -93,7 +93,7 @@
return
}
gotoBookContentPage
(
e
.
detail
.
data
.
id
,
e
.
detail
.
data
.
shortis
)
gotoBookContentPage
(
e
.
detail
.
data
.
wechatRecord
.
wxId
,
e
.
detail
.
id
)
},
showEditBarR
(
e
)
{
this
.
showEditBar
=
e
...
...
@@ -126,7 +126,7 @@
deleteCollect
()
{
let
str
=
''
for
(
let
i
=
0
;
i
<
this
.
dataList
.
length
;
i
++
)
{
if
(
this
.
dataList
[
i
].
isChecked
)
{
if
(
this
.
dataList
[
i
].
isChecked
)
{
if
(
this
.
dataList
[
i
].
id
)
{
str
+=
(
this
.
dataList
[
i
].
id
+
','
)
}
...
...
vedio/components/charge-dialog/charge-dialog.vue
0 → 100644
View file @
a779a283
<
template
>
<view
style=
"position: relative;"
>
<view
v-if=
"agreeFlag"
style=
"width: 100%;height: 100%;background-color: black;opacity: 0.8;display: flex;position: absolute;z-index: 100;color: white;flex-direction: column;align-items: center;padding:40rpx 0;"
>
<text
style=
"font-size: 30rpx;width: 90%;white-space:pre-wrap"
>
{{
agreeText
}}
</text>
<image
@
click=
"agreeFlag=false"
style=
"width: 30rpx;height: 30rpx;margin-top:150rpx;"
src=
"@/static/index/ic_quit_white.png"
></image>
</view>
<view
class=
"body"
style=
"height: 60%;"
>
<scroll-view
scroll-y
>
<view
style=
"display: flex;flex-direction: column;"
>
<view
style=
"display: flex;flex-direction: row;"
>
<view
v-if=
"agreementDto != null"
@
click=
"handleUnsign"
style=
"margin-top: 12rpx;margin-left: 10rpx;"
>
自动续费管理>
</view>
<view
style=
"margin-top: 12rpx;margin-left: auto;display: flex;flex-direction: row;"
>
<view
@
click=
"handleAgree"
style=
"margin-right: 10rpx;"
>
付费须知>
</view>
<image
@
click=
"handleClickClose"
style=
"width: 30rpx;height: 30rpx;display: flex;align-items: right;margin-top: 20rpx;margin-left: auto;margin-right: 20rpx;margin-bottom: 10rpx;"
src=
"@/static/index/ic_quit_white.png"
></image>
</view>
</view>
</view>
<view
class=
"section"
>
<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
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
class=
"price row"
>
{{
item
.
firstPayPrice
<=
0
?
'免费试用'
:
item
.
firstPayPrice
+
'元'
}}
</view>
<view
class=
"name row"
v-if=
"item.title!=null&&item.title!=''"
>
{{
item
.
title
}}
</view>
<view
class=
"origin row"
v-if=
"item.remarks!=null&&item.remarks!=''"
>
{{
item
.
remarks
}}
</view>
</view>
<view
class=
"cut-down"
v-if=
'item.topTitle!=null&&item.topTitle.length>0'
>
{{
item
.
topTitle
}}
</view>
<view
v-if=
"index==selectedIndex"
style=
"position: absolute;bottom: 0;right: 0;"
>
<image
mode=
"scaleToFill"
style=
"width: 100rpx;height: 100rpx;display: flex;align-items: right;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_loading.gif"
>
</image>
</view>
</view>
</view>
</view>
<text
class=
"trialStyle"
v-show=
"hintText!=null&&hintText!=''"
>
{{
hintText
}}
</text>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
style=
"font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;"
>
订单中如有疑问,请在个人中心联系客服
</view>
</view>
</scroll-view>
</view>
</view>
</
template
>
<
script
>
const
novelPlugin
=
requirePlugin
(
'novel-plugin'
)
const
NovelManager
=
require
(
'@/utils/novelManager.js'
)
import
{
message
,
navigateTo
}
from
'@/utils/fun'
;
import
{
apiPOST
}
from
"../common/utils/apiRequest.js"
export
default
{
data
()
{
return
{
vipList
:
[],
selectedIndex
:
0
,
agreeFlag
:
false
,
agreeText
:
"付费须知
\n\n
1、看点和会员属于虚拟商品,一经购买不可退换
\n\n
2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;
\n\n
3、充值看点一般5分钟内到账,如未到账请在“我的”页面联系客服;"
userBean
:
{},
agreementDto
:
null
,
hintText
:
''
,
os
:
'android'
,
titleText
:
'超多精彩小说一键解锁'
,
showClone
:
false
,
};
},
props
:
{
novelManagerId
:
{
type
:
Number
,
value
:
-
1
},
bookId
:
{
type
:
String
,
value
:
''
},
chapterIndex
:
{
type
:
Number
,
value
:
-
1
},
chapterId
:
{
type
:
String
,
value
:
''
},
originalId
:
{
type
:
String
,
value
:
''
}
},
created
()
{
this
.
handleShow
()
},
methods
:
{
// 支付完成回调
paySuccess
(
largeType
)
{
this
.
$emit
(
'paySuccess'
,
largeType
);
this
.
handleClose
();
},
unlock
()
{
// 取出对应的阅读器实例
const
novelManager
=
novelPlugin
.
getNovelManager
(
this
.
properties
.
novelManagerId
)
// 告诉阅读器这一章已解锁
novelManager
.
paymentCompleted
()
},
handleShow
()
{
let
that
=
this
;
if
(
wx
.
getSystemInfoSync
().
platform
===
'ios'
)
{
this
.
os
=
'ios'
;
}
this
.
post
({
url
:
'/vip/getVipProducts/cyc'
,
data
:
{
bookId
:
that
.
vedioId
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
vipList
=
data
.
list
;
if
(
data
.
list
!=
null
)
{
this
.
hintText
=
this
.
vipList
[
0
].
trailRemark
;
for
(
let
i
=
0
;
i
<
data
.
list
.
length
;
i
++
)
{
if
(
data
.
list
[
i
].
activityType
==
1
)
{
this
.
selectedIndex
=
i
;
break
;
}
}
}
}
});
this
.
post
({
url
:
'/vip/getOrderList'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
console
.
log
(
"agreement="
,
data
.
agreement
);
if
(
data
.
agreement
==
undefined
)
{
this
.
agreementDto
=
null
;
}
else
{
this
.
agreementDto
=
data
.
agreement
;
}
}
});
},
handleUnsign
()
{
if
(
this
.
agreementDto
)
{
let
params
=
JSON
.
stringify
(
this
.
agreementDto
)
navigateTo
(
`/pagesA/unsign/unsign?params=`
+
params
)
}
},
handleAgree
()
{
this
.
agreeFlag
=
true
},
handleClickClose
()
{
this
.
$emit
(
'clickClose'
);
this
.
$emit
(
'close'
);
},
handleClose
()
{
this
.
$emit
(
'close'
);
},
choosePack
(
item
,
index
)
{
this
.
selectedIndex
=
index
;
if
(
this
.
vipList
[
this
.
selectedIndex
].
trailRemark
!=
null
)
{
this
.
hintText
=
this
.
vipList
[
this
.
selectedIndex
].
trailRemark
;
}
else
{
this
.
hintText
=
''
;
}
this
.
handlePay
();
},
handlePay
()
{
let
that
=
this
;
var
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
if
(
this
.
os
==
'ios'
)
{
message
.
notify
(
'暂不支持ios系统~'
);
}
else
{
this
.
post
({
url
:
'/vip/getVipPayParams/wechat'
,
data
:
{
pid
:
vipBean
.
pid
,
payChannel
:
'WEIXIN'
},
showLoading
:
true
,
success
:
({
data
})
=>
{
if
(
vipBean
.
firstPayPrice
==
0
)
{
//签约
that
.
wxSign
(
data
,
vipBean
.
largeType
);
}
else
{
//普通支付
that
.
wxPay
(
data
,
vipBean
.
largeType
);
}
}
});
}
},
wxPay
(
wxData
,
largeType
)
{
let
wxParams
=
wxData
.
params
;
let
that
=
this
;
// 发起微信支付
wx
.
requestPayment
({
timeStamp
:
wxParams
.
timeStamp
,
nonceStr
:
wxParams
.
nonceStr
,
package
:
wxParams
.
packageStr
,
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
wxData
.
tidStr
);
},
fail
(
res
)
{}
})
},
wxSign
(
wxData
,
largeType
)
{
let
wxParams
=
wxData
.
params
;
let
that
=
this
;
// 发起微信签约
wx
.
navigateToMiniProgram
({
appId
:
"wxbd687630cd02ce1d"
,
path
:
'pages/index/index'
,
extraData
:
wxData
.
params
,
success
(
res
)
{
console
.
log
(
"wxSign suc="
,
res
);
if
(
res
.
return_code
==
'SUCCESS'
)
{
console
.
log
(
"wxSign suc1111"
);
// 成功跳转到签约小程序
that
.
queryOrderStatus
(
largeType
,
wxData
.
tidStr
);
}
else
{
// 签约失败
console
.
log
(
"wxSign fail22222"
);
}
},
fail
(
res
)
{
// 未成功跳转到签约小程序
console
.
log
(
"wxSign fail=3333"
,
res
);
}
})
},
queryOrderStatus
(
largeType
,
tid
)
{
let
that
=
this
;
this
.
post
({
data
:
{
tid
:
tid
},
url
:
'/vip/queryVipOrder'
,
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
paySuccess
(
largeType
);
}
});
}
},
watch
:
{
show
:
{
handler
:
function
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
this
.
handleShow
();
}
},
immediate
:
true
}
}
};
</
script
>
<
style
lang=
"scss"
>
.body
{
padding
:
10rpx
0
30rpx
0
;
border-radius
:
20rpx
20rpx
0
0
;
background-color
:
white
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.section
{
display
:
flex
;
flex-direction
:
column
;
// background: white;
}
.pack-box
{
margin-top
:
25rpx
;
margin-left
:
18rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
flex-wrap
:
wrap
;
.active
{
background-color
:
#f4c98b
!
important
;
border
:
6rpx
solid
#fd5350
!
important
;
}
.pack-item
{
margin-bottom
:
25rpx
;
margin-right
:
22rpx
;
width
:
calc
(
45%
);
height
:
190rpx
;
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
{
width
:
calc
(
90%
);
text-align
:
center
;
font-size
:
29rpx
;
color
:
#333
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.price
{
font-size
:
40rpx
;
color
:
#fd5350
;
font-weight
:
700
;
}
.origin
{
color
:
#5A3C0F
;
// background: #5a1505;
background-image
:
linear-gradient
(
90deg
,
#F3DEBE
,
#EAC180
);
font-size
:
22rpx
;
border-radius
:
20rpx
;
height
:
30rpx
;
line-height
:
30rpx
;
padding-top
:
4rpx
;
padding-bottom
:
3rpx
;
padding-left
:
16rpx
;
padding-right
:
16rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.cut-down
{
position
:
absolute
;
top
:
0
;
color
:
#fff
;
background
:
#ff502f
;
font-size
:
22rpx
;
border-radius
:
15rpx
;
height
:
30rpx
;
line-height
:
30rpx
;
padding-top
:
6rpx
;
padding-bottom
:
3rpx
;
padding-left
:
16rpx
;
padding-right
:
16rpx
;
transform
:
translate
(
0
,
-50%
);
}
}
}
.trialStyle
{
display
:
flex
;
align-items
:
center
;
font-size
:
30rpx
;
color
:
darkgray
;
margin-left
:
20rpx
;
margin-right
:
20rpx
;
word-wrap
:
break-word
;
word-break
:
break-all
;
white-space
:
pre-line
;
}
</
style
>
\ No newline at end of file
vedio/components/recommend-list/recommend-list.vue
View file @
a779a283
...
...
@@ -25,8 +25,8 @@
</view>
<view
class=
"rowitem"
v-else-if=
"listType==2"
>
<!-- 新书推荐 -->
<book-list-item3
class=
"item2"
v-for=
'(item, index) in dataList'
:key=
'index'
:item=
'item'
:showClose=
'false'
@
tapItem=
'tapItem($event, index)'
>
<book-list-item3
class=
"item2"
v-for=
'(item, index) in dataList'
:key=
'index'
:item=
'item'
:showClose=
'false'
@
tapItem=
'tapItem($event, index)'
>
</book-list-item3>
</view>
<view
class=
"columnitem"
v-else-if=
"listType==3"
>
...
...
@@ -113,7 +113,7 @@
})
},
tapItem
(
e
,
index
)
{
gotoBookContentPage
(
e
.
detail
.
data
.
id
,
e
.
detail
.
data
.
shortis
)
gotoBookContentPage
(
e
.
detail
.
data
.
wechatRecord
.
wxId
,
e
.
detail
.
data
.
id
)
},
}
}
...
...
@@ -165,17 +165,17 @@
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
padding-left
:
20rpx
;
.item2
{
width
:
47%
;
margin-bottom
:
20rpx
;
margin-right
:
20rpx
;
}
.item
:last-child
{
margin-right
:
0
;
}
padding-left
:
20rpx
;
.item2
{
width
:
47%
;
margin-bottom
:
20rpx
;
margin-right
:
20rpx
;
}
.item
:last-child
{
margin-right
:
0
;
}
.item
{
width
:
22%
;
...
...
vedio/components/warehouse/components/warehouse-list.vue
View file @
a779a283
...
...
@@ -39,7 +39,8 @@
computed
:
{
requestParam
:
function
()
{
return
{
categoryId
:
this
.
category
.
value
categoryId
:
this
.
category
.
value
,
reader
:
true
}
}
},
...
...
@@ -64,7 +65,7 @@
})
},
tapItem
(
e
,
index
)
{
gotoBookContentPage
(
e
.
detail
.
data
.
id
,
e
.
detail
.
data
.
shortis
)
gotoBookContentPage
(
e
.
detail
.
data
.
wechatRecord
.
wxId
,
e
.
detail
.
data
.
id
)
},
tapClose
(
e
,
index
)
{
// TODO 仓库点击关闭按钮,弹窗选择关闭原因
...
...
vedio/components/warehouse/warehouse.vue
View file @
a779a283
...
...
@@ -22,9 +22,6 @@
import
WarehouseList
from
"./components/warehouse-list.vue"
;
import
SystemInfoMixin
from
"../../common/mixins/system-info-mixin.js"
;
import
Category
from
"./models/Category.js"
;
import
{
gotoBookContentPage
}
from
'../../common/services/page-route'
import
{
getCategorys
}
from
"./services/index.js"
...
...
vedio/components/warehouse/warehousetemp.vue
deleted
100644 → 0
View file @
0afa8f4f
<
template
>
<view
style=
"padding-top: 50rpx;"
>
<profile-header
:userInfo=
'userInfo'
></profile-header>
<CategoryBar
id=
'category'
:range=
'categorys'
:current=
'currentIndex'
@
change=
'changeCategory'
@
ready=
'readyCategory'
></CategoryBar>
<view
:style=
"[listStyle]"
v-if=
'showEmpty'
>
<c-empty
emptyTitle=
"暂无数据"
></c-empty>
</view>
<view
:style=
"[listStyle]"
v-else
>
<swiper
:style=
"[listStyle]"
:indicator-dots=
"false"
:autoplay=
"false"
:current=
"currentIndex"
@
change=
"changeSwiper"
>
<swiper-item
v-for=
'(item, index) in categorys'
:key=
'index'
>
<WarehouseList
ref=
'bookList'
:category=
'item'
:height=
'listHeight'
></WarehouseList>
</swiper-item>
</swiper>
</view>
<c-login></c-login>
</view>
</
template
>
<
script
>
import
ProfileHeader
from
"./components/profile-headertemp.vue"
;
import
{
watchUserInfoChange
,
refreshUserInfo
}
from
"../../common/services/userServices.js"
import
CategoryBar
from
"./components/category-bar.vue"
;
import
WarehouseList
from
"./components/warehouse-list.vue"
;
import
SystemInfoMixin
from
"../../common/mixins/system-info-mixin.js"
;
import
Category
from
"./models/Category.js"
;
import
{
getCategorys
}
from
"./services/index.js"
import
{
isEmpty
}
from
"../../common/utils/util"
;
import
{
readStorage
,
saveStorage
}
from
'../../common/utils/storageUtil'
;
export
default
{
mixins
:
[
SystemInfoMixin
],
components
:
{
CategoryBar
,
ProfileHeader
,
WarehouseList
},
data
()
{
return
{
userInfo
:
null
,
listHeight
:
0
,
categorys
:
[],
currentIndex
:
0
};
},
onLoad
()
{
},
computed
:
{
showEmpty
:
function
()
{
return
isEmpty
(
this
.
categorys
);
},
listStyle
:
function
()
{
return
{
height
:
`
${
this
.
listHeight
}
px`
}
},
categroyChange
:
function
()
{
const
{
categorys
,
currentIndex
}
=
this
;
return
{
categorys
,
currentIndex
}
}
},
watch
:
{
categroyChange
:
{
handler
:
function
(
n
,
o
)
{
this
.
$nextTick
(()
=>
{
let
ref
=
this
.
$refs
.
bookList
;
if
(
ref
)
{
ref
[
n
.
currentIndex
].
initRefresh
();
}
})
},
deep
:
true
}
},
methods
:
{
show
(){
console
.
log
(
"123123123"
)
this
.
getCategoryData
();
watchUserInfoChange
((
info
)
=>
{
this
.
userInfo
=
info
.
userInfo
},
this
);
this
.
refreshUserData
();
},
hide
()
{
},
readyCategory
()
{
setTimeout
(()
=>
{
this
.
initHeight
()
},
300
)
},
getCategoryData
()
{
getCategorys
((
success
,
data
)
=>
{
if
(
success
)
{
let
result
=
data
?
data
.
map
(
item
=>
{
return
new
Category
(
item
)
}).
sort
((
a
,
b
)
=>
{
return
a
.
sort
-
b
.
sort
})
:
[];
result
.
unshift
(
new
Category
({
name
:
"全部"
,
id
:
""
}))
this
.
categorys
=
result
;
}
})
},
initHeight
()
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
// query.select("#navi").boundingClientRect();
// query.select("#search").boundingClientRect();
query
.
select
(
"#category"
).
boundingClientRect
();
query
.
exec
((
res
)
=>
{
let
result
=
0
;
res
.
forEach
(
item
=>
{
result
=
result
+
item
.
height
;
})
this
.
listHeight
=
this
.
windowHeight
-
result
;
})
},
changeCategory
(
e
)
{
this
.
changeCurrent
(
e
.
index
);
},
changeSwiper
(
e
)
{
this
.
changeCurrent
(
e
.
detail
.
current
);
},
changeCurrent
(
index
)
{
if
(
index
!=
this
.
currentIndex
)
{
this
.
currentIndex
=
index
;
}
},
refreshUserData
()
{
if
(
this
.
userInfo
)
{
refreshUserInfo
();
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
.name
{
font-size
:
34rpx
;
font-weight
:
700
;
}
</
style
>
\ No newline at end of file
vedio/manifest.json
View file @
a779a283
...
...
@@ -145,7 +145,18 @@
"optimization"
:
{
"subPackages"
:
true
},
"lazyCodeLoading"
:
"requiredComponents"
//
依赖按需注入
"plugins"
:
{
"novel-plugin"
:
{
"version"
:
"latest"
,
"provider"
:
"wx293c4b6097a8a4d0"
,
"genericsImplementation"
:
{
"novel"
:
{
"charge-dialog"
:
"/components/charge-dialog/charge-dialog"
}
}
}
}
//
"lazyCodeLoading"
:
"requiredComponents"
//
依赖按需注入
},
"mp-alipay"
:
{
"usingComponents"
:
true
,
...
...
@@ -164,7 +175,7 @@
"uniStatistics"
:
{
"enable"
:
false
},
"appid"
:
"
ttd50ba3b64a3c2deb01
"
"appid"
:
""
},
"uniStatistics"
:
{
"enable"
:
false
,
...
...
@@ -215,18 +226,4 @@
"enable"
:
false
}
}
}
//
"devServer"
:
{
//
"proxy"
:
{
//
"/https://nft-web.tech-mints.com"
:
{
//
"target"
:
"https://nft-web.tech-mints.com"
,
//
"changeOrgin"
:
true
,
//是否跨域
//
"seure"
:
true
,
//是否支持https协议的代理
//
"pathRewrite"
:
{
//
"^/https://nft-web.tech-mints.com"
:
"/"
,
//
"^/zs-ui/hap/https://nft-web.tech-mints.com"
:
"/"
//
}
//
}
//
},
//
"https"
:
true
//
}
\ No newline at end of file
}
\ No newline at end of file
vedio/page-subs/sub_A/book-content/components/recommend-pop.vue
View file @
a779a283
...
...
@@ -129,8 +129,8 @@
// 在C页面内 navigateBack,将返回A页面
uni
.
navigateBack
({
delta
:
2
});
gotoBookContentPage
(
item
.
id
,
item
.
shortis
);
});
gotoBookContentPage
(
item
.
wechatRecord
.
wxId
,
item
.
id
);
}
}
}
...
...
vedio/page-subs/sub_A/book-long-content/components/recommend-pop.vue
View file @
a779a283
...
...
@@ -4,50 +4,53 @@
<view
class=
"section"
>
<view
class=
"title"
>
99%读过这本书的人还在读
</view>
<view
class=
"book-list-item"
v-for=
'(item, index) in dataList'
:key=
'index'
:item=
'item'
@
click=
"tapItem(item)"
>
<view
class=
"cover-box item"
>
<image
v-if=
"item.avatar===''"
class=
"cover"
src=
"/static/images/logo.png"
mode=
"aspectFill"
></image>
<image
v-else
class=
"cover"
:src=
"item.avatar"
mode=
"aspectFill"
></image>
</view>
<view
class=
"c-flex_column"
>
<view
class=
"c-flex_row c-justify_between row"
>
<view
class=
"c-flex_column c-justify_center item"
>
<view
class=
"title2"
>
{{
item
.
title
}}
</view>
</view>
</view>
<view
class=
"c-flex_row row"
>
<view
class=
"c-flex_column c-justify_between content c-flex_1 item"
>
<view
class=
"desc row"
>
{{
item
.
summary
}}
</view>
<view
class=
"c-flex_row c-align_center label-box row"
>
<slot
name=
"footer"
>
<view
class=
"label label-color-1"
v-if=
"item.categoryName!=null&&item.categoryName!=''"
>
{{
item
.
categoryName
}}
</view>
<view
class=
"label label-color-2"
v-for=
'(label, labelIndex) in item.tagList'
:key=
'labelIndex'
>
{{
label
.
name
}}
</view>
</slot>
</view>
</view>
</view>
</view>
<view
style=
"display: flex;margin: auto;width: 200rpx;"
>
<button
class=
"btn2"
>
去阅读
</button>
</view>
</view>
<view
class=
"book-list-item"
v-for=
'(item, index) in dataList'
:key=
'index'
:item=
'item'
@
click=
"tapItem(item)"
>
<view
class=
"cover-box item"
>
<image
v-if=
"item.avatar===''"
class=
"cover"
src=
"/static/images/logo.png"
mode=
"aspectFill"
>
</image>
<image
v-else
class=
"cover"
:src=
"item.avatar"
mode=
"aspectFill"
></image>
</view>
<view
class=
"c-flex_column"
>
<view
class=
"c-flex_row c-justify_between row"
>
<view
class=
"c-flex_column c-justify_center item"
>
<view
class=
"title2"
>
{{
item
.
title
}}
</view>
</view>
</view>
<view
class=
"c-flex_row row"
>
<view
class=
"c-flex_column c-justify_between content c-flex_1 item"
>
<view
class=
"desc row"
>
{{
item
.
summary
}}
</view>
<view
class=
"c-flex_row c-align_center label-box row"
>
<slot
name=
"footer"
>
<view
class=
"label label-color-1"
v-if=
"item.categoryName!=null&&item.categoryName!=''"
>
{{
item
.
categoryName
}}
</view>
<view
class=
"label label-color-2"
v-for=
'(label, labelIndex) in item.tagList'
:key=
'labelIndex'
>
{{
label
.
name
}}
</view>
</slot>
</view>
</view>
</view>
</view>
<view
style=
"display: flex;margin: auto;width: 200rpx;"
>
<button
class=
"btn2"
>
去阅读
</button>
</view>
</view>
</view>
</view>
</uni-popup>
</
template
>
<
script
>
<
script
>
import
SystemInfoMixin
from
"../../../../common/mixins/system-info-mixin.js"
;
import
{
gotoBookContentPage
...
...
@@ -100,8 +103,7 @@
}
}
},
onUnload
()
{
},
onUnload
()
{},
mounted
()
{
this
.
requestPackData
();
},
...
...
@@ -117,18 +119,18 @@
this
.
showPop
=
false
;
},
requestPackData
()
{
getBookRecommendData
(
this
.
bookId
,(
success
,
data
)
=>
{
if
(
success
)
{
this
.
dataList
=
data
.
records
;
getBookRecommendData
(
this
.
bookId
,
(
success
,
data
)
=>
{
if
(
success
)
{
this
.
dataList
=
data
.
records
;
}
})
},
tapItem
(
item
)
{
// 在C页面内 navigateBack,将返回A页面
uni
.
navigateBack
({
delta
:
2
});
gotoBookContentPage
(
item
.
id
,
item
.
shortis
);
})
},
tapItem
(
item
)
{
// 在C页面内 navigateBack,将返回A页面
uni
.
navigateBack
({
delta
:
2
});
gotoBookContentPage
(
item
.
wechatRecord
.
wxId
,
item
.
id
);
}
}
}
...
...
@@ -231,117 +233,119 @@
margin
:
30rpx
auto
;
}
}
}
.book-list-item
{
display
:
flex
;
flex-direction
:
row
;
padding-top
:
14rpx
;
padding-bottom
:
14rpx
;
.row
{
margin-bottom
:
20rpx
;
}
.row
:last-child
{
margin-bottom
:
0
;
}
.item
{
margin-right
:
20rpx
;
}
.item
:last-child
{
margin-right
:
0
;
}
.title
{
font-size
:
32rpx
;
font-weight
:
700
;
color
:
#333
;
}
.close-button
{
border-radius
:
10rpx
;
border
:
2rpx
solid
#999
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
width
:
40rpx
;
height
:
30rpx
;
position
:
relative
;
.cover
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
width
:
70rpx
;
height
:
70rpx
;
transform
:
translate
(
-50%
,
-50%
);
z-index
:
2
;
background
:
transparent
;
}
}
.desc
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
font-size
:
26rpx
;
color
:
#999
}
.label-box
{
flex-wrap
:
wrap
;
.label
{
padding
:
5rpx
10rpx
;
font-size
:
20rpx
;
margin-right
:
20rpx
;
border-radius
:
10rpx
;
}
.label-color-1
{
background
:
#faefe6
;
color
:
#cc6008
;
}
.label-color-2
{
color
:
#3d99fd
;
background
:
#d8ebff
;
}
.label-color-3
{
background
:
#ff8787
;
color
:
#ff3737
;
}
}
}
.cover-box
{
.cover
{
width
:
150rpx
;
height
:
200rpx
;
border-radius
:
15rpx
;
}
}
.title2
{
font-size
:
32rpx
;
font-weight
:
700
;
color
:
#333
;
}
.btn2
{
color
:
#d98c5c
;
border
:
#DCBD3B
solid
1rpx
;
width
:
140rpx
;
font-size
:
24rpx
;
text-align
:
center
;
border-radius
:
80rpx
;
height
:
40rpx
;
line-height
:
40rpx
;
}
.book-list-item
{
display
:
flex
;
flex-direction
:
row
;
padding-top
:
14rpx
;
padding-bottom
:
14rpx
;
.row
{
margin-bottom
:
20rpx
;
}
.row
:last-child
{
margin-bottom
:
0
;
}
.item
{
margin-right
:
20rpx
;
}
.item
:last-child
{
margin-right
:
0
;
}
.title
{
font-size
:
32rpx
;
font-weight
:
700
;
color
:
#333
;
}
.close-button
{
border-radius
:
10rpx
;
border
:
2rpx
solid
#999
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
width
:
40rpx
;
height
:
30rpx
;
position
:
relative
;
.cover
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
width
:
70rpx
;
height
:
70rpx
;
transform
:
translate
(
-50%
,
-50%
);
z-index
:
2
;
background
:
transparent
;
}
}
.desc
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
font-size
:
26rpx
;
color
:
#999
}
.label-box
{
flex-wrap
:
wrap
;
.label
{
padding
:
5rpx
10rpx
;
font-size
:
20rpx
;
margin-right
:
20rpx
;
border-radius
:
10rpx
;
}
.label-color-1
{
background
:
#faefe6
;
color
:
#cc6008
;
}
.label-color-2
{
color
:
#3d99fd
;
background
:
#d8ebff
;
}
.label-color-3
{
background
:
#ff8787
;
color
:
#ff3737
;
}
}
}
.cover-box
{
.cover
{
width
:
150rpx
;
height
:
200rpx
;
border-radius
:
15rpx
;
}
}
.title2
{
font-size
:
32rpx
;
font-weight
:
700
;
color
:
#333
;
}
.btn2
{
color
:
#d98c5c
;
border
:
#DCBD3B
solid
1rpx
;
width
:
140rpx
;
font-size
:
24rpx
;
text-align
:
center
;
border-radius
:
80rpx
;
height
:
40rpx
;
line-height
:
40rpx
;
}
</
style
>
\ No newline at end of file
vedio/page-subs/sub_A/book-search/components/recommond-item.vue
View file @
a779a283
<
template
>
<view
class=
"recommond-item"
@
click=
"tapItem"
>
<view
class=
"cover-box item"
>
<image
class=
"cover"
:src=
"item.avatar"
mode=
"aspectFill"
></image>
</view>
<view
class=
"info-box item"
>
<view
class=
"row"
>
<view
class=
"title"
>
{{
item
.
title
}}
</view>
</view>
<view
class=
"row"
>
<view
class=
"desc"
>
{{
item
.
summary
}}
</view>
</view>
<view
class=
"row author-box"
>
<uni-icons
type=
'icon-author'
custom-prefix=
"readiconfont"
size=
'20'
color=
'#378eff'
></uni-icons>
<view
class=
"name"
>
{{
item
.
author
}}
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
gotoBookContentPage
}
from
'../../../../common/services/page-route'
export
default
{
props
:
{
item
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
:
function
()
{
return
{
imageError
:
true
}
},
methods
:
{
tapItem
()
{
gotoBookContentPage
(
this
.
item
.
id
,
this
.
item
.
shortis
);
},
loadImage
()
{
this
.
imageError
=
false
},
errorImage
()
{
this
.
imageError
=
true
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
.recommond-item
{
padding
:
20rpx
;
display
:
flex
;
flex-direction
:
row
;
.item
{
margin-right
:
20rpx
;
}
.item
:last-child
{
margin-right
:
0
;
}
.row
{
margin-bottom
:
20rpx
;
}
.row
:last-child
{
margin-bottom
:
0
;
}
.cover-box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
.cover
{
width
:
140rpx
;
height
:
180rpx
;
border-radius
:
15rpx
;
}
}
.info-box
{
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
.title
{
font-size
:
32rpx
;
font-weight
:
700
;
color
:
#333
;
}
.desc
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
font-size
:
24rpx
;
color
:
#999
}
.author-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
height
:
50rpx
;
line-height
:
50rpx
;
.name
{
font-size
:
26rpx
;
color
:
#378eff
;
margin-left
:
15rpx
;
}
}
}
}
<
template
>
<view
class=
"recommond-item"
@
click=
"tapItem"
>
<view
class=
"cover-box item"
>
<image
class=
"cover"
:src=
"item.avatar"
mode=
"aspectFill"
></image>
</view>
<view
class=
"info-box item"
>
<view
class=
"row"
>
<view
class=
"title"
>
{{
item
.
title
}}
</view>
</view>
<view
class=
"row"
>
<view
class=
"desc"
>
{{
item
.
summary
}}
</view>
</view>
<view
class=
"row author-box"
>
<uni-icons
type=
'icon-author'
custom-prefix=
"readiconfont"
size=
'20'
color=
'#378eff'
></uni-icons>
<view
class=
"name"
>
{{
item
.
author
}}
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
gotoBookContentPage
}
from
'../../../../common/services/page-route'
export
default
{
props
:
{
item
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
:
function
()
{
return
{
imageError
:
true
}
},
methods
:
{
tapItem
()
{
gotoBookContentPage
(
this
.
item
.
wechatRecord
.
wxId
,
this
.
item
.
id
);
},
loadImage
()
{
this
.
imageError
=
false
},
errorImage
()
{
this
.
imageError
=
true
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
.recommond-item
{
padding
:
20rpx
;
display
:
flex
;
flex-direction
:
row
;
.item
{
margin-right
:
20rpx
;
}
.item
:last-child
{
margin-right
:
0
;
}
.row
{
margin-bottom
:
20rpx
;
}
.row
:last-child
{
margin-bottom
:
0
;
}
.cover-box
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
.cover
{
width
:
140rpx
;
height
:
180rpx
;
border-radius
:
15rpx
;
}
}
.info-box
{
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
.title
{
font-size
:
32rpx
;
font-weight
:
700
;
color
:
#333
;
}
.desc
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
font-size
:
24rpx
;
color
:
#999
}
.author-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
height
:
50rpx
;
line-height
:
50rpx
;
.name
{
font-size
:
26rpx
;
color
:
#378eff
;
margin-left
:
15rpx
;
}
}
}
}
</
style
>
\ No newline at end of file
vedio/page-subs/sub_A/book-search/components/search-result.vue
View file @
a779a283
...
...
@@ -79,7 +79,7 @@
})
},
tapItem
(
e
,
index
)
{
gotoBookContentPage
(
e
.
detail
.
data
.
id
,
e
.
detail
.
data
.
shortis
)
gotoBookContentPage
(
e
.
detail
.
data
.
wechatRecord
.
wxId
,
e
.
detail
.
data
.
id
)
},
}
}
...
...
vedio/pages.json
View file @
a779a283
...
...
@@ -7,39 +7,18 @@
"^nx-(.*)"
:
"@/nProX/$1/$1.vue"
//
匹配nProX内的vue文件
}
},
"pages"
:
[
//
#ifndef
APP-PLUS
{
"path"
:
"pages/loading"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
}
"pages"
:
[{
"path"
:
"pages/loading"
},
//
#endif
{
"path"
:
"pages/home"
,
"style"
:
{
"navigationBarTitleText"
:
"河狸故事汇"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"河狸故事汇"
}
},
{
"path"
:
"pages/brower/brower"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
"path"
:
"pages/brower/brower"
},
{
"path"
:
"pages/index"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
"path"
:
"pages/index"
}
],
//
分包配置
...
...
@@ -48,35 +27,23 @@
"pages"
:
[{
"path"
:
"vipPay/vipPay"
,
"style"
:
{
"navigationBarTitleText"
:
"会员中心"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"会员中心"
}
},
{
"path"
:
"cdkey/cdkey"
,
"style"
:
{
"navigationBarTitleText"
:
"兑换会员"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"兑换会员"
}
},
{
"path"
:
"unsign/unsign"
,
"style"
:
{
"navigationBarTitleText"
:
"管理自动续费"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"管理自动续费"
}
},{
},
{
"path"
:
"vipAppPay/vipAppPay"
,
"style"
:
{
"navigationBarTitleText"
:
"会员中心"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"会员中心"
}
}
]
...
...
@@ -86,76 +53,48 @@
"path"
:
"book-search/book-search"
,
"style"
:
{
"navigationBarTitleText"
:
"书籍搜索"
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"book-content/book-content"
,
"style"
:
{
"navigationBarTitleText"
:
"阅读"
,
"enablePullDownRefresh"
:
true
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"book-long-content/book-long-content"
,
"style"
:
{
"navigationBarTitleText"
:
"阅读"
,
"enablePullDownRefresh"
:
true
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"book-cover/book-cover"
,
"style"
:
{
"navigationBarTitleText"
:
"封面"
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"enablePullDownRefresh"
:
false
}
}]
},
{
"root"
:
"pagesD"
,
"pages"
:
[{
"path"
:
"payRecord/payRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"我的订单"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"我的订单"
}
},
{
"path"
:
"dotRecord/dotRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"书豆记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"书豆记录"
}
},
{
"path"
:
"useDotRecord/useDotRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"消费记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"消费记录"
}
},
{
"path"
:
"readerRecord/readerRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"阅读记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTitleText"
:
"阅读记录"
}
}]
}],
...
...
@@ -168,8 +107,10 @@
}
},
"globalStyle"
:
{
"backgroundColor"
:
"#f
5f5f5
"
,
"backgroundColor"
:
"#f
fffff
"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
,
"app-plus"
:
{
"bounce"
:
"none"
,
"scrollIndicator"
:
"none"
...
...
vedio/pagesD/readerRecord/readerRecord.vue
View file @
a779a283
...
...
@@ -69,7 +69,8 @@
url
:
'/book/readRecordList'
,
data
:
{
page
,
size
size
,
reader
:
true
},
showLoading
:
false
,
success
:
({
...
...
@@ -80,8 +81,8 @@
});
},
handleInfo
(
item
)
{
gotoBookContentPage
(
item
.
id
,
item
.
shortis
)
gotoBookContentPage
(
item
.
wechatRecord
.
wxId
,
item
.
id
)
// var bookId = item.id;
// uni.navigateTo({
// url: `/page-subs/sub_A/book-content/book-content`,
...
...
vedio/readme.md
deleted
100644 → 0
View file @
0afa8f4f
| 平台 | 账号 |
| ---- | ---- |
|
[
微信开放平台
](
https://open.weixin.qq.com/
)
| |
|
[
DCloud开发者
](
https://dev.dcloud.net.cn/
)
| 1359763362@qq.com |
┌─uniCloud 云空间目录,阿里云为uniCloud-aliyun,腾讯云为uniCloud-tcb(详见uniCloud)
│─components 符合vue组件规范的uni-app组件目录
│ └─comp-a.vue 可复用的a组件
├─hybrid App端存放本地html文件的目录,详见
├─platforms 存放各平台专用页面的目录,详见
├─pages 业务页面文件存放的目录
│ ├─index
│ │ └─index.vue index页面
│ └─list
│ └─list.vue list页面
├─static 存放应用引用的本地静态资源(如图片、视频等)的目录,注意:静态资源只能存放于此
├─uni_modules 存放
[
uni_module
](
/uni_modules
)
规范的插件。
├─wxcomponents 存放小程序组件的目录,详见
├─main.js Vue初始化入口文件
├─App.vue 应用配置,用来配置App全局样式以及监听 应用生命周期
├─manifest.json 配置应用名称、appid、logo、版本等打包信息,详见
├─pages.json 配置页面路由、导航条、选项卡等页面类信息,详见
└─uni.scss 这里是uni-app内置的常用样式变量
\ No newline at end of file
vedio/utils/novelManager.js
0 → 100644
View file @
a779a283
import
{
apiPOST
}
from
"../common/utils/apiRequest.js"
var
novelPlugin
=
requirePlugin
(
"novel-plugin"
);
// 点击按钮触发此函数跳转到播放器页面
function
navigateToNovel
(
wxId
,
customId
)
{
wx
.
redirectTo
({
url
:
`plugin-private://wx293c4b6097a8a4d0/pages/novel/index?bookId=
${
wxId
}
&customServerParams=
${
customId
}
`
})
}
const
proto
=
{
_onNovelLoad
(
data
)
{
const
novelManager
=
novelPlugin
.
getNovelManager
(
data
.
id
)
// this.nm = novelManager
novelPlugin
.
setLoggerConfig
({
info
:
true
,
debug
:
true
,
log
:
true
,
warn
:
true
,
error
:
true
,
})
const
customId
=
novelManager
.
getCustomServerParams
()
this
.
getContent
(
customId
).
then
(
res
=>
{
novelManager
.
setContents
({
contents
:
res
.
chapter
})
})
// 调整分享参数
novelManager
.
setShareParams
({
title
:
'xxx'
,
imageUrl
:
'xxx'
})
novelManager
.
onUserTriggerEvent
((
obj
)
=>
{
console
.
log
(
'onUserTriggerEvent----->'
+
obj
.
event_id
)
//开始阅读书籍时
if
(
obj
.
event_id
===
'start_read'
)
{
this
.
nm_report
(
customId
)
}
//点击“加入书架”
if
(
obj
.
event_id
===
'click_addbookshelf'
)
{
this
.
nm_collect
(
customId
)
}
})
},
getContent
(
customId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
apiPOST
({
url
:
'/book/info'
,
data
:
{
id
:
customId
,
reader
:
true
},
callback
:
(
success
,
data
)
=>
{
if
(
success
)
{
resolve
({
chapter
:
data
.
wechatRecord
.
wxChapter
})
}
else
{
reject
(
''
)
}
}
})
})
},
// 加入书架
nm_collect
(
customId
)
{
apiPOST
({
url
:
'/book/collect'
,
data
:
{
articleId
:
customId
}
});
},
// 删除书架
nm_uncollect
(
customId
)
{
apiPOST
({
url
:
'/book/collectCancel'
,
data
:
{
articleId
:
customId
}
});
},
// 添加阅读记录
nm_report
(
articleId
)
{
apiPOST
({
url
:
'/book/addReadRecord'
,
data
:
{
articleId
},
success
:
(
res
)
=>
{
console
.
log
(
'ssssssss'
)
},
fail
:
(
res
)
=>
{
console
.
log
(
'eeeeeee'
)
}
})
},
// 解锁剧集
unlockSerial
()
{
}
}
function
NovelManager
()
{
var
newProto
=
Object
.
assign
({},
proto
)
for
(
const
k
in
newProto
)
{
if
(
typeof
newProto
[
k
]
===
'function'
)
{
this
[
k
]
=
newProto
[
k
].
bind
(
this
)
}
}
}
NovelManager
.
navigateToNovel
=
navigateToNovel
module
.
exports
=
NovelManager
\ No newline at end of file
vedio/utils/utils.js
View file @
a779a283
export
const
PAKEAGE_NAME
=
'com.mints.wxhelistory'
export
const
VERSION_CODE
=
'1.0.
5
'
export
const
VERSION_CODE
=
'1.0.
0
'
// export const PAKEAGE_NAME = 'com.test.test'
export
function
trim
(
str
)
{
...
...
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