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
64d49eb9
Commit
64d49eb9
authored
May 31, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
afe8cef8
Changes
35
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
1923 additions
and
2683 deletions
+1923
-2683
App.vue
vedio/App.vue
+6
-2
index.js
vedio/common/services/index.js
+325
-322
userServices.js
vedio/common/services/userServices.js
+28
-17
apiRequest.js
vedio/common/utils/apiRequest.js
+26
-23
storageUtil.js
vedio/common/utils/storageUtil.js
+42
-33
book-search-box.vue
vedio/components/book-search-box/book-search-box.vue
+64
-63
bookshelf-list.vue
vedio/components/bookshelf/components/bookshelf-list.vue
+4
-3
c-list.vue
vedio/components/c-list/c-list.vue
+2
-2
warehouse-list.vue
vedio/components/warehouse/components/warehouse-list.vue
+2
-2
index.js
vedio/components/warehouse/services/index.js
+1
-1
warehouse.vue
vedio/components/warehouse/warehouse.vue
+8
-8
develop.js
vedio/config/env/develop.js
+1
-1
product.js
vedio/config/env/product.js
+1
-1
book-content.vue
vedio/page-subs/sub_A/book-content/book-content.vue
+24
-19
detail-buy.vue
vedio/page-subs/sub_A/book-content/components/detail-buy.vue
+9
-9
vip-pop.vue
vedio/page-subs/sub_A/book-content/components/vip-pop.vue
+5
-5
index.js
vedio/page-subs/sub_A/book-content/services/index.js
+110
-101
search-header-bar.vue
...e-subs/sub_A/book-search/components/search-header-bar.vue
+115
-114
search-placeholder.vue
...-subs/sub_A/book-search/components/search-placeholder.vue
+2
-1
search-result.vue
.../page-subs/sub_A/book-search/components/search-result.vue
+88
-88
index.js
vedio/page-subs/sub_A/book-search/services/index.js
+72
-65
vip-apply.vue
vedio/page-subs/sub_B/vip-apply/vip-apply.vue
+5
-5
home.vue
vedio/pages/home.vue
+1
-1
loading.vue
vedio/pages/loading.vue
+18
-8
common.scss
vedio/scss/common.scss
+13
-0
changelog.md
vedio/uni_modules/uni-easyinput/changelog.md
+113
-0
common.js
..._modules/uni-easyinput/components/uni-easyinput/common.js
+54
-0
uni-easyinput.vue
.../uni-easyinput/components/uni-easyinput/uni-easyinput.vue
+693
-0
package.json
vedio/uni_modules/uni-easyinput/package.json
+88
-0
changelog.md
vedio/uni_modules/yingbing-flip/changelog.md
+0
-10
flip.wxs
vedio/uni_modules/yingbing-flip/components/modules/flip.wxs
+0
-367
flip_bindingx.js
...modules/yingbing-flip/components/modules/flip_bindingx.js
+0
-546
yingbing-flip.vue
.../yingbing-flip/components/yingbing-flip/yingbing-flip.vue
+0
-420
util.js
vedio/uni_modules/yingbing-flip/js_sdk/util.js
+0
-446
utils.js
vedio/utils/utils.js
+3
-0
No files found.
vedio/App.vue
View file @
64d49eb9
<
script
>
import
{
PAKEAGE_NAME
}
from
'./utils/utils.js'
;
import
checkUpdate
from
'./utils/update.js'
;
export
default
{
onLaunch
:
function
(
options
)
{
...
...
@@ -86,7 +89,7 @@
bottomSafePadding
:
12
,
h5Url
:
'https://api.mints-id.com/index.html'
,
baseUrl
:
'https://dx.mints-tech.cn/minip-api/miniApi'
,
// baseUrl: 'http://192.168.110.
71:8301/minip-api
/miniApi',
// baseUrl: 'http://192.168.110.
42:8303
/miniApi',
titleButtonWidth
:
38
,
token
:
''
,
userId
:
0
,
...
...
@@ -96,7 +99,7 @@
versionName
:
'v 1.0.0'
,
auth
:
false
,
// 三要素实名认证
userInfo
:
null
,
pkgName
:
'com.duben.dybookhm'
pkgName
:
PAKEAGE_NAME
}
};
</
script
>
...
...
@@ -118,4 +121,5 @@
@import
'./scss/agreement.scss'
;
@import
"@/uni_modules/uview-ui/index.scss"
;
@import
'@/uni.scss'
;
@import
'@/static/readiconfont.css'
;
</
style
>
\ No newline at end of file
vedio/common/services/index.js
View file @
64d49eb9
...
...
@@ -162,10 +162,13 @@ function getSystemDict(types = [], callback) {
* @param {Object} callback
*/
function
collectionBook
(
isCollected
,
bookId
,
callback
)
{
let
url
=
isCollected
?
'/
readSystem/v1/collect/collect'
:
"/readSystem/v1/collect/cancel"
;
url
=
`
${
url
}
?articleId=
${
bookId
}
`
api
GET
({
let
url
=
isCollected
?
'/
book/collect'
:
"/book/collectCancel"
;
// url = `${url}?articleId=${bookId}`
api
POST
({
url
,
data
:
{
articleId
:
bookId
},
callback
})
}
...
...
vedio/common/services/userServices.js
View file @
64d49eb9
...
...
@@ -14,8 +14,12 @@ import {
import
User
from
"../models/User.js"
;
import
{
isEmpty
,
isNotEmpty
isNotEmpty
,
}
from
"../utils/util.js"
;
import
{
PAKEAGE_NAME
}
from
"../../utils/utils.js"
;
import
{
printError
}
from
"../utils/printUtil.js"
;
...
...
@@ -50,12 +54,14 @@ function successHandler(url, param, res, callback) {
}
})
}
if
(
res
.
status
!=
200
)
{
toastMessage
(
`服务器异常,
${
res
.
status
}
`
)
printError
(
"请求失败"
,
url
,
param
,
res
.
status
,
res
.
errMsg
);
console
.
log
(
res
)
if
(
res
.
statusCode
!=
200
)
{
toastMessage
(
`服务器异常,
${
res
.
statusCode
}
`
)
printError
(
"请求失败"
,
url
,
param
,
res
.
statusCode
,
res
.
errMsg
);
if
(
typeof
callback
==
'function'
)
callback
(
false
,
res
.
errMsg
)
}
else
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
status
==
200
)
{
if
(
typeof
callback
==
'function'
)
callback
(
true
,
res
.
data
.
data
)
}
else
if
(
res
.
data
.
code
==
401
)
{
tokenExpireFn
()
...
...
@@ -103,7 +109,10 @@ function refreshUserInfo() {
name
:
userData
.
username
,
nickName
:
userData
.
nickname
,
avater
:
userData
.
avatar
,
isVip
:
userData
.
expireTime
>
0
})
console
.
log
(
user
)
console
.
log
(
userData
)
saveNickname
(
userData
.
nickname
);
saveUserInfo
(
user
);
// 存储用户数据
postNotification
(
KEY_NOTIFICATION_LOGIN_SUCCESS
);
// 通知登录成功
...
...
@@ -139,7 +148,7 @@ function postPhone(data, callback) {
function
requestToken
(
data
,
callback
)
{
let
url
=
`
${
config
[
"BASE_URL"
]}
/user/ttLogin`
;
let
header
=
{
pkg
Name
:
'com.duben.dybookhm'
,
pkg
name
:
PAKEAGE_NAME
,
token
:
``
}
uni
.
request
({
...
...
@@ -158,9 +167,10 @@ function requestToken(data, callback) {
// 请求用户数据
function
requestUserInfo
(
callback
)
{
let
url
=
`
${
config
[
'BASE_URL'
]}
/
system/user/getCurrentUserInfo
`
;
let
url
=
`
${
config
[
'BASE_URL'
]}
/
user/baseMsg
`
;
let
header
=
{
Authorization
:
`
${
readToken
()}
`
token
:
`
${
readToken
()}
`
,
pkgname
:
PAKEAGE_NAME
}
uni
.
request
({
url
,
...
...
@@ -221,7 +231,8 @@ function saveToken(token) {
function
readToken
()
{
if
(
!
LOCAL_TOKEN
)
{
LOCAL_TOKEN
=
readStorage
(
KEY_STORAGE_TOKEN
)
// LOCAL_TOKEN = readStorage(KEY_STORAGE_TOKEN)
LOCAL_TOKEN
=
readStorage
(
'token'
)
}
return
LOCAL_TOKEN
;
}
...
...
vedio/common/utils/apiRequest.js
View file @
64d49eb9
...
...
@@ -9,8 +9,11 @@ import {
printError
,
}
from
"./printUtil.js"
import
{
appendParam
appendParam
,
}
from
"./util"
;
import
{
PAKEAGE_NAME
}
from
"../../utils/utils"
;
import
{
addNormalNotificationObserver
,
removeNotificationObserver
...
...
@@ -65,11 +68,11 @@ let apiRequest = function({
let
option
=
{};
// 请求参数
// url 处理
let
handlerUrl
=
`
${
config
[
"BASE_URL"
]}${
urlModule
?
urlModule
:
""
}${
url
}
`
;
if
(
handlerUrl
.
indexOf
(
"?"
)
==
-
1
)
{
handlerUrl
=
`
${
handlerUrl
}
?t=
${
new
Date
().
getTime
()}
`
;
}
else
{
handlerUrl
=
`
${
handlerUrl
}
&t=
${
new
Date
().
getTime
()}
`
;
}
//
if (handlerUrl.indexOf("?") == -1) {
//
handlerUrl = `${handlerUrl}?t=${new Date().getTime()}`;
//
} else {
//
handlerUrl = `${handlerUrl}&t=${new Date().getTime()}`;
//
}
option
=
{
url
:
handlerUrl
,
method
...
...
@@ -97,7 +100,7 @@ let apiRequest = function({
return
;
}
option
.
header
=
{
pkgName
:
'com.duben.dybookhm'
,
pkgName
:
PAKEAGE_NAME
,
token
:
`
${
token
}
`
}
// header处理
...
...
@@ -238,7 +241,7 @@ function apiUPLOAD({
option
.
url
=
`
${
option
.
url
}
?t=
${
new
Date
().
getTime
()}
`
;
// 路径
option
.
header
=
{
pkgName
:
'com.duben.dybookhm'
,
pkgName
:
PAKEAGE_NAME
,
token
:
`
${
token
}
`
}
if
(
header
)
{
...
...
@@ -312,14 +315,14 @@ function successHandler(originQuery, requestTask, res) {
tokenExpireFn
();
}
else
{
if
(
typeof
res
.
data
==
'string'
)
res
.
data
=
JSON
.
parse
(
res
.
data
);
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
status
==
200
)
{
printDebug
(
"请求结果"
,
originQuery
.
url
,
res
.
data
.
data
);
if
(
typeof
originQuery
.
callback
==
'function'
)
originQuery
.
callback
(
true
,
res
.
data
.
data
);
}
else
if
(
res
.
data
.
code
==
401
)
{
}
else
if
(
res
.
data
.
status
==
401
)
{
tokenExpireFn
()
if
(
typeof
originQuery
.
callback
==
'function'
)
originQuery
.
callback
(
false
,
res
.
data
.
msg
);
}
else
{
toastMessage
(
res
.
data
.
message
?
res
.
data
.
message
:
res
.
data
.
code
?
res
.
data
.
code
:
"未知错误"
);
toastMessage
(
res
.
data
.
message
?
res
.
data
.
message
:
res
.
data
.
status
?
res
.
data
.
status
:
"未知错误"
);
printError
(
"请求失败"
,
originQuery
.
url
,
res
.
data
.
message
);
if
(
typeof
originQuery
.
callback
==
'function'
)
originQuery
.
callback
(
false
,
res
.
data
.
message
);
}
...
...
vedio/common/utils/storageUtil.js
View file @
64d49eb9
...
...
@@ -26,8 +26,17 @@ function removeStorage(key) {
}
}
function
clearStorage
(
key
)
{
try
{
return
uni
.
clearStorageSync
(
key
);
}
catch
(
error
)
{
printError
(
"remove storage 错误"
,
error
.
errMsg
,
key
);
}
}
module
.
exports
=
{
saveStorage
,
readStorage
,
removeStorage
removeStorage
,
clearStorage
}
\ No newline at end of file
vedio/components/book-search-box/book-search-box.vue
View file @
64d49eb9
...
...
@@ -5,7 +5,7 @@
<uni-icons
type=
'search'
size=
'28'
color=
"#e5e5e5"
></uni-icons>
</view>
<input
class=
"item c-flex_1"
placeholder=
"搜索书名/作者名"
disabled
/>
<view
class=
"
button item"
>
<view
class=
"
mbutton item"
>
搜索
</view>
</view>
...
...
@@ -42,6 +42,7 @@
padding
:
10rpx
20rpx
;
.search-zone
{
width
:
100%
;
border-radius
:
35rpx
;
background
:
#fff
;
padding
:
4rpx
;
...
...
@@ -51,10 +52,10 @@
margin-left
:
20rpx
;
}
.button
{
.mbutton
{
width
:
100rpx
;
height
:
70rpx
;
line-height
:
70rpx
;
width
:
120rpx
;
text-align
:
center
;
color
:
#fff
;
background
:
#007aff
;
...
...
vedio/components/bookshelf/components/bookshelf-list.vue
View file @
64d49eb9
<
template
>
<view>
<c-list
ref=
'list'
:showShelfEmpty=
"true"
flag=
'bookshelf'
:needLogin=
"true"
:height=
"height"
url=
'/
v1/collec
t/'
:param=
"requestParam"
@
change=
'changeData'
>
<c-list
ref=
'list'
:showShelfEmpty=
"true"
flag=
'bookshelf'
:needLogin=
"true"
:height=
"height"
url=
'/
book/collectLis
t/'
:param=
"requestParam"
@
change=
'changeData'
method=
"POST"
>
<book-list-item
v-for=
'(item, index) in dataList'
:key=
'index'
:item=
'item'
@
tapItem=
'tapItem($event, index)'
@
close=
'tapClose($event, index)'
>
<template
v-slot:footer
>
...
...
@@ -59,7 +59,8 @@
}
},
changeData
(
e
)
{
this
.
dataList
=
e
.
detail
.
data
.
map
(
item
=>
{
console
.
log
(
e
)
this
.
dataList
=
e
.
detail
.
data
.
list
.
map
(
item
=>
{
return
new
BookshelfBookItem
(
item
)
})
},
...
...
vedio/components/c-list/c-list.vue
View file @
64d49eb9
vedio/components/warehouse/components/warehouse-list.vue
View file @
64d49eb9
<
template
>
<view>
<c-list
ref=
'list'
flag=
'warehouse'
method=
"POST"
:height=
"height"
url=
'/
v1/article
/'
:param=
"requestParam"
<c-list
ref=
'list'
flag=
'warehouse'
method=
"POST"
:height=
"height"
url=
'/
book/articleList
/'
:param=
"requestParam"
@
change=
'changeData'
>
<book-list-item
v-for=
'(item, index) in dataList'
:key=
'index'
:item=
'item'
:showClose=
'false'
@
tapItem=
'tapItem($event, index)'
@
close=
'tapClose($event, index)'
>
...
...
@@ -39,7 +39,7 @@
computed
:
{
requestParam
:
function
()
{
return
{
tag
Id
:
this
.
category
.
value
category
Id
:
this
.
category
.
value
}
}
},
...
...
vedio/components/warehouse/services/index.js
View file @
64d49eb9
...
...
@@ -5,7 +5,7 @@ import {
function
getCategorys
(
callback
)
{
apiPOST
({
url
:
"/
v1/tag
/"
,
url
:
"/
book/categoryList
/"
,
callback
})
}
...
...
vedio/components/warehouse/warehouse.vue
View file @
64d49eb9
...
...
@@ -89,7 +89,7 @@
show
()
{
setTimeout
(()
=>
{
// 匹配用户直接跳转小说
var
bookId
=
uni
.
getStorageSync
(
'firstBookId'
)
var
bookId
=
uni
.
getStorageSync
(
'firstBookId'
)
if
(
bookId
!=
''
)
{
gotoBookContentPage
(
bookId
);
uni
.
setStorage
({
...
...
@@ -120,7 +120,7 @@
getCategoryData
()
{
getCategorys
((
success
,
data
)
=>
{
if
(
success
)
{
let
result
=
data
?
data
.
map
(
item
=>
{
let
result
=
data
.
records
?
data
.
records
.
map
(
item
=>
{
return
new
Category
(
item
)
}).
sort
((
a
,
b
)
=>
{
return
a
.
sort
-
b
.
sort
...
...
vedio/config/env/develop.js
View file @
64d49eb9
...
...
@@ -9,7 +9,7 @@ const {
}
}
=
require
(
"../configEnum"
);
export
default
{
// BASE_URL: "http://192.168.110.
6:8800
",
// BASE_URL: "http://192.168.110.
42:8303/miniApi
",
BASE_URL
:
"https://dx.mints-tech.cn/minip-api/miniApi"
,
BASE_URL_MODULE
:
""
,
BASE_SOCKET_URL
:
""
,
...
...
vedio/config/env/product.js
View file @
64d49eb9
...
...
@@ -9,7 +9,7 @@ const {
}
}
=
require
(
"../configEnum"
);
export
default
{
// BASE_URL: "http
s://book.mints-id.com
",
// BASE_URL: "http
://192.168.110.42:8303/miniApi
",
BASE_URL
:
"https://dx.mints-tech.cn/minip-api/miniApi"
,
BASE_URL_MODULE
:
""
,
BASE_SOCKET_URL
:
""
,
...
...
vedio/page-subs/sub_A/book-content/book-content.vue
View file @
64d49eb9
<
template
>
<
view
:style=
"[bgStyle]"
>
<
z-paging
:style=
"[bgStyle]"
>
<c-empty
v-if=
'showEmpty'
></c-empty>
<template
v-else
>
<detail-warn></detail-warn>
...
...
@@ -24,7 +24,7 @@
</button>
</view>
</popup>
</
view
>
</
z-paging
>
</template>
<
script
>
...
...
@@ -127,6 +127,11 @@
if
(
info
.
userInfo
)
{
addReadRecord
(
this
.
bookId
)
}
console
.
log
(
info
)
console
.
log
(
this
.
userInfo
)
// this.showVipOpen = data.openVips
// // 用户变动,需要刷新数据
// this.$nextTick(() => {
// uni.startPullDownRefresh({})
...
...
@@ -246,10 +251,10 @@
},
// 文章数据刷新
refreshBookData
(
bookId
)
{
getOpens
((
success
,
data
)
=>
{
// this.showBeanOpen = data.openBeans
this
.
showVipOpen
=
data
.
openVips
})
//
getOpens((success, data) => {
//
// this.showBeanOpen = data.openBeans
//
this.showVipOpen = data.openVips
//
})
getBookDetailData
(
bookId
,
(
success
,
data
)
=>
{
setTimeout
(()
=>
{
uni
.
stopPullDownRefresh
();
...
...
vedio/page-subs/sub_A/book-content/components/detail-buy.vue
View file @
64d49eb9
...
...
@@ -168,15 +168,15 @@
this
.
imageError
=
true
},
refreshPackData
()
{
getPackData
((
success
,
data
)
=>
{
if
(
success
)
{
this
.
vipPackList
=
data
.
map
(
item
=>
{
let
result
=
new
Pack
(
item
);
result
.
isBeanPack
=
false
;
return
result
;
})
}
})
//
getPackData((success, data) => {
//
if (success) {
//
this.vipPackList = data.map(item => {
//
let result = new Pack(item);
//
result.isBeanPack = false;
//
return result;
//
})
//
}
//
})
getBookBeanPackData
((
success
,
data
)
=>
{
if
(
success
)
{
this
.
beanPackList
=
data
.
map
(
item
=>
{
...
...
vedio/page-subs/sub_A/book-content/components/vip-pop.vue
View file @
64d49eb9
...
...
@@ -120,11 +120,11 @@
this
.
showPop
=
false
;
},
refrehsPackData
()
{
getPackData
((
success
,
data
)
=>
{
this
.
packList
=
data
.
map
(
item
=>
{
return
new
Pack
(
item
);
})
})
//
getPackData((success, data) => {
//
this.packList = data.map(item => {
//
return new Pack(item);
//
})
//
})
},
choosePack
(
item
,
index
)
{
this
.
selectedIndex
=
index
;
...
...
vedio/page-subs/sub_A/book-content/services/index.js
View file @
64d49eb9
...
...
@@ -19,7 +19,10 @@ import {
*/
function
getBookDetailData
(
bookId
,
callback
)
{
apiPOST
({
url
:
`/v1/article/info?id=
${
bookId
}
`
,
url
:
`/book/info`
,
data
:
{
id
:
bookId
},
callback
})
}
...
...
@@ -28,9 +31,12 @@ function getBookDetailData(bookId, callback) {
* @param {Object} bookId
* @param {Object} callback
*/
function
getBookRecommendData
(
bookId
,
callback
)
{
function
getBookRecommendData
(
bookId
,
callback
)
{
apiPOST
({
url
:
`/v1/article/recommend?id=
${
bookId
}
`
,
url
:
`/book/recommend`
,
data
:
{
id
:
bookId
},
callback
})
}
...
...
@@ -39,8 +45,11 @@ function getBookRecommendData(bookId,callback) {
* @param {Object} callback
*/
function
addReadRecord
(
bookId
,
callback
)
{
apiGET
({
url
:
`/readSystem/system/readRecord/addReadRecord?articleId=
${
bookId
}
`
,
apiPOST
({
url
:
`/book/addReadRecord`
,
data
:
{
articleId
:
bookId
},
callback
})
}
...
...
vedio/page-subs/sub_A/book-search/components/search-header-bar.vue
View file @
64d49eb9
<
template
>
<view
class=
"search-header-bar"
>
<view
class=
"input-box item c-flex_1"
>
<uni-easyinput
:value=
'searchKeyword'
placeholder=
"请输入书名或者作者名"
:focus=
'focus'
:styles=
"inputStyles"
confirmType=
"search"
trim=
"all"
:inputBorder=
"true"
@
clear=
'clearInput'
@
change=
'changeInput'
></uni-easyinput>
<uni-easyinput
v-model=
"searchKeyword"
placeholder=
"请输入书名或者作者名"
:focus=
'focus'
confirmType=
"search"
trim=
"all"
:inputBorder=
"true"
@
clear=
"clearInput"
@
change=
"changeInput"
@
confirm=
"changeInput"
></uni-easyinput>
</view>
<view
class=
"button-box item"
@
click=
"tapSearch"
>
<view
class=
"title"
>
...
...
vedio/page-subs/sub_A/book-search/components/search-placeholder.vue
View file @
64d49eb9
...
...
@@ -26,6 +26,7 @@
import
{
saveSearchHistory
,
watchSearchHistoryChange
,
clearSearchHistory
,
removeSearchHistoryChangeWatch
,
getHotRecommondData
,
}
from
"../services/index.js"
...
...
@@ -68,7 +69,7 @@
},
methods
:
{
tapDeleteHistory
()
{
saveSearchHistory
([]
)
clearSearchHistory
(
)
},
tapItem
(
e
,
flag
)
{
this
.
$emit
(
'chooseKeyword'
,
{
...
...
vedio/page-subs/sub_A/book-search/components/search-result.vue
View file @
64d49eb9
<
template
>
<c-list
ref=
"list"
flag=
'search'
:needLogin=
"needLogin"
:height=
"height"
:url=
'requestUrl'
:param=
'requestParam'
<c-list
ref=
"list"
flag=
'search'
method=
"POST"
:needLogin=
"needLogin"
:height=
"height"
:url=
'requestUrl'
:param=
'requestParam'
@
change=
'changeData'
>
<book-list-item
v-for=
'(item, index) in dataList'
:key=
'index'
:item=
'item'
:showClose=
"false"
@
tapItem=
'tapItem($event, index)'
>
...
...
@@ -40,7 +40,7 @@
},
data
:
function
()
{
return
{
dataList
:
null
dataList
:
null
,
}
},
computed
:
{
...
...
@@ -50,7 +50,7 @@
requestUrl
:
function
()
{
return
!
this
.
searchType
||
this
.
searchType
.
value
==
ENUM_SEARCH_TYPE
.
WAREHOUSE
.
value
?
"/book/articleList/"
:
"/
readSystem/v1/collect/"
"/
book/collect/"
},
requestParam
:
function
()
{
return
{
...
...
vedio/page-subs/sub_A/book-search/services/index.js
View file @
64d49eb9
...
...
@@ -5,7 +5,8 @@ import {
}
from
"../../../../common/utils/notificationCenter"
;
import
{
readStorage
,
saveStorage
saveStorage
,
clearStorage
}
from
"../../../../common/utils/storageUtil"
;
const
KEY_STORAGE_SEARCH_HISTORY
=
"KEY_STORAGE_SEARCH_HISTORY"
;
const
KEY_NOTIFICATION_SEARCH_HISTORY_CHANGE
=
'KEY_NOTIFICATION_SEARCH_HISTORY_CHANGE'
;
...
...
@@ -23,6 +24,11 @@ function saveSearchHistory(keyword) {
noticeSearchHistoryChange
(
result
);
}
function
clearSearchHistory
()
{
clearStorage
(
KEY_STORAGE_SEARCH_HISTORY
);
noticeSearchHistoryChange
([]);
}
function
readSearchHistory
()
{
let
result
=
readStorage
(
KEY_STORAGE_SEARCH_HISTORY
);
return
result
||
[]
...
...
@@ -58,6 +64,7 @@ module.exports = {
*/
saveSearchHistory
,
readSearchHistory
,
clearSearchHistory
,
watchSearchHistoryChange
,
removeSearchHistoryChangeWatch
,
/**
...
...
vedio/page-subs/sub_B/vip-apply/vip-apply.vue
View file @
64d49eb9
...
...
@@ -134,11 +134,11 @@
})
},
refrehsPackData
()
{
getPackData
((
success
,
data
)
=>
{
this
.
packList
=
data
.
map
(
item
=>
{
return
new
Pack
(
item
);
})
})
//
getPackData((success, data) => {
//
this.packList = data.map(item => {
//
return new Pack(item);
//
})
//
})
},
choosePack
(
item
,
index
)
{
this
.
selectedIndex
=
index
;
...
...
vedio/pages/home.vue
View file @
64d49eb9
...
...
@@ -110,6 +110,6 @@
<
style
lang=
"scss"
>
.body
{
height
:
100%
;
background-color
:
white
;
//
background-color: white;
}
</
style
>
\ No newline at end of file
vedio/pages/loading.vue
View file @
64d49eb9
...
...
@@ -69,6 +69,16 @@
});
}
// app.globalData.userId = data.idcode;
// uni.setStorage({
// key: 'token',
// data: 'D6E76AC8E89ABE548B56568B8814D578D6980EAB68926EB1E7C07BF9E96A316F5F433703067DF5142735505C42F58997'
// });
// setTimeout(() => {
// redirectTo('home');
// }, 1000);
// return
tt
.
login
({
force
:
true
,
success
(
res
)
{
...
...
vedio/scss/common.scss
View file @
64d49eb9
...
...
@@ -301,3 +301,16 @@ body {
padding
:
0
16rpx
;
display
:
inline-block
;
}
.c-flex_row
{
display
:
flex
;
flex-direction
:
row
;
}
.c-align_center
{
align-items
:
center
;
}
.c-flex_1
{
flex
:
1
;
}
\ No newline at end of file
vedio/uni_modules/uni-easyinput/changelog.md
0 → 100644
View file @
64d49eb9
## 1.1.18(2024-04-11)
-
修复 easyinput组件双向绑定问题
## 1.1.17(2024-03-28)
-
修复 在头条小程序下丢失事件绑定的问题
## 1.1.16(2024-03-20)
-
修复 在密码输入情况下 清除和小眼睛覆盖bug 在edge浏览器下显示双眼睛bug
## 1.1.15(2024-02-21)
-
新增 左侧插槽:left
## 1.1.14(2024-02-19)
-
修复 onBlur的emit传值错误
## 1.1.12(2024-01-29)
-
补充 adjust-position文档属性补充
## 1.1.11(2024-01-29)
-
补充 adjust-position属性传递值:(Boolean)当键盘弹起时,是否自动上推页面
## 1.1.10(2024-01-22)
-
去除 移除无用的log输出
## 1.1.9(2023-04-11)
-
修复 vue3 下 keyboardheightchange 事件报错的bug
## 1.1.8(2023-03-29)
-
优化 trim 属性默认值
## 1.1.7(2023-03-29)
-
新增 cursor-spacing 属性
## 1.1.6(2023-01-28)
-
新增 keyboardheightchange 事件,可监听键盘高度变化
## 1.1.5(2022-11-29)
-
优化 主题样式
## 1.1.4(2022-10-27)
-
修复 props 中背景颜色无默认值的bug
## 1.1.0(2022-06-30)
-
新增 在 uni-forms 1.4.0 中使用可以在 blur 时校验内容
-
新增 clear 事件,点击右侧叉号图标触发
-
新增 change 事件 ,仅在输入框失去焦点或用户按下回车时触发
-
优化 组件样式,组件获取焦点时高亮显示,图标颜色调整等
## 1.0.5(2022-06-07)
-
优化 clearable 显示策略
## 1.0.4(2022-06-07)
-
优化 clearable 显示策略
## 1.0.3(2022-05-20)
-
修复 关闭图标某些情况下无法取消的 bug
## 1.0.2(2022-04-12)
-
修复 默认值不生效的 bug
## 1.0.1(2022-04-02)
-
修复 value 不能为 0 的 bug
## 1.0.0(2021-11-19)
-
优化 组件 UI,并提供设计资源,详见:
[
https://uniapp.dcloud.io/component/uniui/resource
](
https://uniapp.dcloud.io/component/uniui/resource
)
-
文档迁移,详见:
[
https://uniapp.dcloud.io/component/uniui/uni-easyinput
](
https://uniapp.dcloud.io/component/uniui/uni-easyinput
)
## 0.1.4(2021-08-20)
-
修复 在 uni-forms 的动态表单中默认值校验不通过的 bug
## 0.1.3(2021-08-11)
-
修复 在 uni-forms 中重置表单,错误信息无法清除的问题
## 0.1.2(2021-07-30)
-
优化 vue3 下事件警告的问题
## 0.1.1
-
优化 errorMessage 属性支持 Boolean 类型
## 0.1.0(2021-07-13)
-
组件兼容 vue3,如何创建 vue3 项目,详见
[
uni-app 项目支持 vue3 介绍
](
https://ask.dcloud.net.cn/article/37834
)
## 0.0.16(2021-06-29)
-
修复 confirmType 属性(仅 type="text" 生效)导致多行文本框无法换行的 bug
## 0.0.15(2021-06-21)
-
修复 passwordIcon 属性拼写错误的 bug
## 0.0.14(2021-06-18)
-
新增 passwordIcon 属性,当 type=password 时是否显示小眼睛图标
-
修复 confirmType 属性不生效的问题
## 0.0.13(2021-06-04)
-
修复 disabled 状态可清出内容的 bug
## 0.0.12(2021-05-12)
-
新增 组件示例地址
## 0.0.11(2021-05-07)
-
修复 input-border 属性不生效的问题
## 0.0.10(2021-04-30)
-
修复 ios 遮挡文字、显示一半的问题
## 0.0.9(2021-02-05)
-
调整为 uni_modules 目录规范
-
优化 兼容 nvue 页面
vedio/uni_modules/uni-easyinput/components/uni-easyinput/common.js
0 → 100644
View file @
64d49eb9
/**
* @desc 函数防抖
* @param func 目标函数
* @param wait 延迟执行毫秒数
* @param immediate true - 立即执行, false - 延迟执行
*/
export
const
debounce
=
function
(
func
,
wait
=
1000
,
immediate
=
true
)
{
let
timer
;
return
function
()
{
let
context
=
this
,
args
=
arguments
;
if
(
timer
)
clearTimeout
(
timer
);
if
(
immediate
)
{
let
callNow
=
!
timer
;
timer
=
setTimeout
(()
=>
{
timer
=
null
;
},
wait
);
if
(
callNow
)
func
.
apply
(
context
,
args
);
}
else
{
timer
=
setTimeout
(()
=>
{
func
.
apply
(
context
,
args
);
},
wait
)
}
}
}
/**
* @desc 函数节流
* @param func 函数
* @param wait 延迟执行毫秒数
* @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发
*/
export
const
throttle
=
(
func
,
wait
=
1000
,
type
=
1
)
=>
{
let
previous
=
0
;
let
timeout
;
return
function
()
{
let
context
=
this
;
let
args
=
arguments
;
if
(
type
===
1
)
{
let
now
=
Date
.
now
();
if
(
now
-
previous
>
wait
)
{
func
.
apply
(
context
,
args
);
previous
=
now
;
}
}
else
if
(
type
===
2
)
{
if
(
!
timeout
)
{
timeout
=
setTimeout
(()
=>
{
timeout
=
null
;
func
.
apply
(
context
,
args
)
},
wait
)
}
}
}
}
vedio/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
0 → 100644
View file @
64d49eb9
This diff is collapsed.
Click to expand it.
vedio/uni_modules/
yingbing-flip
/package.json
→
vedio/uni_modules/
uni-easyinput
/package.json
View file @
64d49eb9
{
"id"
:
"
yingbing-flip
"
,
"displayName"
:
"
好用翻页组件
"
,
"version"
:
"1.
0.4
"
,
"description"
:
"
高性能翻页组件
"
,
"id"
:
"
uni-easyinput
"
,
"displayName"
:
"
uni-easyinput 增强输入框
"
,
"version"
:
"1.
1.18
"
,
"description"
:
"
Easyinput 组件是对原生input组件的增强
"
,
"keywords"
:
[
"翻页"
"uni-ui"
,
"uniui"
,
"input"
,
"uni-easyinput"
,
"输入框"
],
"repository"
:
"https://git
ee.com/yingbing-developer/yingbing-flip.git
"
,
"repository"
:
"https://git
hub.com/dcloudio/uni-ui
"
,
"engines"
:
{
"HBuilderX"
:
"
^3.1.0
"
"HBuilderX"
:
""
},
"dcloudext"
:
{
"type"
:
"component-vue"
,
"directories"
:
{
"example"
:
"../../temps/example_temps"
},
"dcloudext"
:
{
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
...
...
@@ -28,52 +34,53 @@
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
""
"npmurl"
:
"https://www.npmjs.com/package/@dcloudio/uni-ui"
,
"type"
:
"component-vue"
},
"uni_modules"
:
{
"dependencies"
:
[],
"dependencies"
:
[
"uni-scss"
,
"uni-icons"
],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"y"
"aliyun"
:
"y"
,
"alipay"
:
"n"
},
"client"
:
{
"Vue"
:
{
"vue2"
:
"u"
,
"vue3"
:
"u"
},
"App"
:
{
"app-vue"
:
"
u
"
,
"app-nvue"
:
"
u
"
"app-vue"
:
"
y
"
,
"app-nvue"
:
"
y
"
},
"H5-mobile"
:
{
"Safari"
:
"
u
"
,
"Android Browser"
:
"
u
"
,
"微信浏览器(Android)"
:
"
u
"
,
"QQ浏览器(Android)"
:
"
u
"
"Safari"
:
"
y
"
,
"Android Browser"
:
"
y
"
,
"微信浏览器(Android)"
:
"
y
"
,
"QQ浏览器(Android)"
:
"
y
"
},
"H5-pc"
:
{
"Chrome"
:
"
u
"
,
"IE"
:
"
u
"
,
"Edge"
:
"
u
"
,
"Firefox"
:
"
u
"
,
"Safari"
:
"
u
"
"Chrome"
:
"
y
"
,
"IE"
:
"
y
"
,
"Edge"
:
"
y
"
,
"Firefox"
:
"
y
"
,
"Safari"
:
"
y
"
},
"小程序"
:
{
"微信"
:
"u"
,
"阿里"
:
"u"
,
"百度"
:
"u"
,
"字节跳动"
:
"u"
,
"QQ"
:
"u"
,
"钉钉"
:
"u"
,
"快手"
:
"u"
,
"飞书"
:
"u"
,
"京东"
:
"u"
"微信"
:
"y"
,
"阿里"
:
"y"
,
"百度"
:
"y"
,
"字节跳动"
:
"y"
,
"QQ"
:
"y"
},
"快应用"
:
{
"华为"
:
"u"
,
"联盟"
:
"u"
},
"Vue"
:
{
"vue2"
:
"y"
,
"vue3"
:
"y"
}
}
}
...
...
vedio/uni_modules/yingbing-flip/changelog.md
deleted
100644 → 0
View file @
afe8cef8
## 1.0.4(2023-09-02)
*
解决插槽中有scroll-view等滚动组件时滑动报错的问题
## 1.0.3(2023-08-23)
*
解决APP-NVUE端resetLoading不生效的问题
## 1.0.2(2023-07-25)
*
解决竖直翻页时,点击上下2侧翻页不准确得问题
## 1.0.1(2023-07-24)
*
解决APP-NVUE无法点击左右2侧翻页得问题
## 1.0.0(2023-07-22)
*
第一次更新
vedio/uni_modules/yingbing-flip/components/modules/flip.wxs
deleted
100644 → 0
View file @
afe8cef8
This diff is collapsed.
Click to expand it.
vedio/uni_modules/yingbing-flip/components/modules/flip_bindingx.js
deleted
100644 → 0
View file @
afe8cef8
This diff is collapsed.
Click to expand it.
vedio/uni_modules/yingbing-flip/components/yingbing-flip/yingbing-flip.vue
deleted
100644 → 0
View file @
afe8cef8
This diff is collapsed.
Click to expand it.
vedio/uni_modules/yingbing-flip/js_sdk/util.js
deleted
100644 → 0
View file @
afe8cef8
This diff is collapsed.
Click to expand it.
vedio/utils/utils.js
View file @
64d49eb9
export
const
PAKEAGE_NAME
=
'com.duben.dybookhm'
export
function
trim
(
str
)
{
return
str
?
str
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
""
)
:
''
}
...
...
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