Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
Project
Project
Details
Activity
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
wangqinghua
party-build-cloud
Commits
cd26404a
Commit
cd26404a
authored
Jun 22, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
fbc7fe38
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
12 deletions
+30
-12
ionic.config.json
ionic.config.json
+1
-1
search-new.html
src/pages/home-pages/search-new/search-new.html
+1
-1
search-new.ts
src/pages/home-pages/search-new/search-new.ts
+28
-9
discover.ts
src/pages/tabs/discover/discover.ts
+0
-1
No files found.
ionic.config.json
View file @
cd26404a
...
...
@@ -7,7 +7,7 @@
"proxies"
:
[
{
"path"
:
"/wisdomgroup"
,
"proxyUrl"
:
"http://47.103.3
5.21
6:8080/wisdomgroup"
"proxyUrl"
:
"http://47.103.3
3.19
6:8080/wisdomgroup"
}
]
}
src/pages/home-pages/search-new/search-new.html
View file @
cd26404a
...
...
@@ -3,7 +3,7 @@
<ion-navbar>
<div
class=
"search-header"
>
<ion-input
type=
"text"
placeholder=
"按姓名搜索"
[(
ngModel
)]="
searchObj
.
title
"
></ion-input>
<span
class=
"clear"
(
click
)="
search
()"
>
搜索
</span>
<span
class=
"clear"
(
click
)="
search
Value
()"
>
搜索
</span>
</div>
</ion-navbar>
</ion-navbar>
...
...
src/pages/home-pages/search-new/search-new.ts
View file @
cd26404a
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
Component
,
ViewChild
}
from
'@angular/core'
;
import
{
I
nfiniteScrollContent
,
I
onicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
TabsService
}
from
"../../tabs/tabs.service"
;
import
{
StuffDetailPage
}
from
"../stuff-detail/stuff-detail"
;
import
{
AppGlobal
}
from
"../../../service/http.service"
;
...
...
@@ -11,15 +11,18 @@ import {AppGlobal} from "../../../service/http.service";
templateUrl
:
'search-new.html'
,
})
export
class
SearchNewPage
{
@
ViewChild
(
InfiniteScrollContent
)
infiniteScrollContent
:
InfiniteScrollContent
;
picture
:
string
=
AppGlobal
.
domain
+
'/wisdomgroup'
;
newList
=
[];
page
Size
:
number
=
1
;
page
Num
:
number
=
1
;
searchObj
=
{
title
:
''
,
stuffType
:
null
,
//类型:(1图文,2视频)
order
:
'desc'
,
//asc升序 desc 降序
}
};
totalNum
:
number
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
tabs
:
TabsService
)
{
...
...
@@ -42,10 +45,15 @@ export class SearchNewPage {
}
}
searchValue
(){
this
.
pageNum
=
1
;
this
.
search
();
}
//查询列表
search
()
{
const
data
=
{
pageNum
:
this
.
page
Size
,
pageNum
:
this
.
page
Num
,
pageCount
:
10
,
isRecent
:
0
,
obj
:
this
.
searchObj
,
...
...
@@ -53,6 +61,7 @@ export class SearchNewPage {
this
.
tabs
.
stuffPage
(
data
).
subscribe
(
(
res
)
=>
{
this
.
newList
=
res
.
data
.
list
;
this
.
totalNum
=
res
.
data
.
total
;
this
.
newList
.
forEach
(
e
=>
{
if
(
e
.
attachments
&&
e
.
attachments
.
length
>
0
)
{
e
.
path
=
e
.
attachments
[
0
].
path
;
...
...
@@ -65,7 +74,8 @@ export class SearchNewPage {
//下拉刷新
doRefresh
(
e
)
{
this
.
pageSize
=
1
;
this
.
infiniteScrollContent
.
inf
.
enable
(
true
);
this
.
pageNum
=
1
;
this
.
search
();
setTimeout
(()
=>
{
e
.
complete
();
...
...
@@ -74,22 +84,31 @@ export class SearchNewPage {
//上拉加载
doInfinite
(
e
)
{
this
.
pageSize
++
;
console
.
log
(
this
.
totalNum
)
console
.
log
(
this
.
newList
.
length
)
if
(
this
.
totalNum
==
this
.
newList
.
length
){
console
.
log
(
'done'
)
e
.
enable
(
false
);
return
false
;
}
this
.
pageNum
++
;
const
data
=
{
page
Size
:
this
.
pageSize
,
page
Num
:
this
.
pageNum
,
pageCount
:
10
,
isRecent
:
0
,
obj
:
this
.
searchObj
,
};
this
.
tabs
.
stuffPage
(
data
).
subscribe
(
(
res
)
=>
{
this
.
totalNum
=
res
.
data
.
total
;
res
.
data
.
list
.
forEach
(
e
=>
{
if
(
e
.
attachments
&&
e
.
attachments
.
length
>
0
)
{
e
.
path
=
e
.
attachments
[
0
].
path
;
e
.
resourceType
=
e
.
attachments
[
0
].
resourceType
;
}
this
.
newList
.
push
(
e
);
})
});
e
.
complete
();
}
)
}
...
...
src/pages/tabs/discover/discover.ts
View file @
cd26404a
...
...
@@ -621,7 +621,6 @@ export class DiscoverPage {
img
.
src
=
canvas
.
toDataURL
(
"image/png"
);
img
.
setAttribute
(
"crossOrigin"
,
'Anonymous'
)
img
.
onload
=
()
=>
{
// console.log(img);
e
.
target
.
setAttribute
(
"poster"
,
canvas
.
toDataURL
(
"image/png"
));
}
}
...
...
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