Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
B
bjgee
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
shangbj
bjgee
Commits
24bd6bd4
Commit
24bd6bd4
authored
Sep 02, 2018
by
shangbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
替换axios
parent
8ed69f71
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
93 additions
and
68 deletions
+93
-68
_id.vue
pages/engineering/drinkingWater/_id.vue
+5
-3
index.vue
pages/engineering/drinkingWater/index.vue
+6
-4
_id.vue
pages/engineering/hospitalSewage/_id.vue
+5
-3
index.vue
pages/engineering/hospitalSewage/index.vue
+5
-4
_id.vue
pages/engineering/mediumWater/_id.vue
+5
-3
index.vue
pages/engineering/mediumWater/index.vue
+6
-4
_id.vue
pages/news/_id.vue
+3
-3
index.vue
pages/news/index.vue
+5
-5
disinfectant.vue
pages/product/disinfectant.vue
+3
-2
_id.vue
pages/product/disinfectant/_id.vue
+5
-3
index.vue
pages/product/disinfectant/index.vue
+6
-4
equipment.vue
pages/product/equipment.vue
+3
-2
_id.vue
pages/product/equipment/_id.vue
+5
-3
index.vue
pages/product/equipment/index.vue
+6
-4
ozonizer.vue
pages/product/ozonizer.vue
+3
-2
_id.vue
pages/product/ozonizer/_id.vue
+5
-3
index.vue
pages/product/ozonizer/index.vue
+6
-4
_id.vue
pages/qualifications/_id.vue
+5
-3
index.vue
pages/qualifications/index.vue
+6
-9
No files found.
pages/engineering/drinkingWater/_id.vue
View file @
24bd6bd4
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
async
asyncData
({
app
,
params
,
error
})
{
const
details
=
await
app
.
$axios
.
$
get
(
`/api/engineering/detail/drinkingWater/
${
params
.
id
}
`
);
const
{
data
}
=
await
axios
.
get
(
`/api/engineering/detail/drinkingWater/
${
params
.
id
}
`
);
if
(
d
etails
.
result
){
if
(
d
ata
.
result
){
return
{
details
:
d
etails
.
data
};
return
{
details
:
d
ata
.
data
};
}
else
{
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
}
...
...
pages/engineering/drinkingWater/index.vue
View file @
24bd6bd4
...
@@ -22,9 +22,11 @@
...
@@ -22,9 +22,11 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
data
=
await
app
.
$axios
.
$
get
(
'/api/engineering?pageIndex=1&pageSize=20&type=simplify&engineeringType=drinkingWater'
);
const
{
data
}
=
await
axios
.
get
(
'/api/engineering?pageIndex=1&pageSize=20&type=simplify&engineeringType=drinkingWater'
);
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
},
},
data
(){
data
(){
...
@@ -34,9 +36,9 @@ export default {
...
@@ -34,9 +36,9 @@ export default {
},
},
methods
:{
methods
:{
handleCurrentChange
(
page
){
handleCurrentChange
(
page
){
this
.
$axios
.
$
get
(
`/api/engineering?pageIndex=
${
page
}
&pageSize=20&type=simplify&engineeringType=drinkingWater`
).
then
(
res
=>
{
axios
.
get
(
`/api/engineering?pageIndex=
${
page
}
&pageSize=20&type=simplify&engineeringType=drinkingWater`
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
data
.
result
)
{
this
.
data
=
res
.
data
;
this
.
data
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
data
=
[];
this
.
data
=
[];
}
}
...
...
pages/engineering/hospitalSewage/_id.vue
View file @
24bd6bd4
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
async
asyncData
({
app
,
params
,
error
})
{
const
details
=
await
app
.
$axios
.
$
get
(
`/api/engineering/detail/hospitalSewage/
${
params
.
id
}
`
);
const
{
data
}
=
await
axios
.
get
(
`/api/engineering/detail/hospitalSewage/
${
params
.
id
}
`
);
if
(
d
etails
.
result
){
if
(
d
ata
.
result
){
return
{
details
:
d
etails
.
data
};
return
{
details
:
d
ata
.
data
};
}
else
{
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
}
...
...
pages/engineering/hospitalSewage/index.vue
View file @
24bd6bd4
...
@@ -22,9 +22,10 @@
...
@@ -22,9 +22,10 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
data
=
await
app
.
$axios
.
$
get
(
'/api/engineering?pageIndex=1&pageSize=20&type=simplify&engineeringType=hospitalSewage'
);
const
{
data
}
=
await
axios
.
get
(
'/api/engineering?pageIndex=1&pageSize=20&type=simplify&engineeringType=hospitalSewage'
);
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
},
},
data
(){
data
(){
...
@@ -34,9 +35,9 @@ export default {
...
@@ -34,9 +35,9 @@ export default {
},
},
methods
:{
methods
:{
handleCurrentChange
(
page
){
handleCurrentChange
(
page
){
this
.
$axios
.
$
get
(
`/api/engineering?pageIndex=
${
page
}
&pageSize=20&type=simplify&engineeringType=hospitalSewage`
).
then
(
res
=>
{
axios
.
get
(
`/api/engineering?pageIndex=
${
page
}
&pageSize=20&type=simplify&engineeringType=hospitalSewage`
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
data
.
result
)
{
this
.
data
=
res
.
data
;
this
.
data
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
data
=
[];
this
.
data
=
[];
}
}
...
...
pages/engineering/mediumWater/_id.vue
View file @
24bd6bd4
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
async
asyncData
({
app
,
params
,
error
})
{
const
details
=
await
app
.
$axios
.
$
get
(
`/api/engineering/detail/mediumWater/
${
params
.
id
}
`
);
const
{
data
}
=
await
axios
.
get
(
`/api/engineering/detail/mediumWater/
${
params
.
id
}
`
);
if
(
d
etails
.
result
){
if
(
d
ata
.
result
){
return
{
details
:
d
etails
.
data
};
return
{
details
:
d
ata
.
data
};
}
else
{
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
}
...
...
pages/engineering/mediumWater/index.vue
View file @
24bd6bd4
...
@@ -22,9 +22,11 @@
...
@@ -22,9 +22,11 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
data
=
await
app
.
$axios
.
$
get
(
'/api/engineering?pageIndex=1&pageSize=20&type=simplify&engineeringType=mediumWater'
);
const
{
data
}
=
await
axios
.
get
(
'/api/engineering?pageIndex=1&pageSize=20&type=simplify&engineeringType=mediumWater'
);
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
},
},
data
(){
data
(){
...
@@ -34,9 +36,9 @@ export default {
...
@@ -34,9 +36,9 @@ export default {
},
},
methods
:{
methods
:{
handleCurrentChange
(
page
){
handleCurrentChange
(
page
){
this
.
$axios
.
$
get
(
`/api/engineering?pageIndex=
${
page
}
&pageSize=20&type=simplify&engineeringType=mediumWater`
).
then
(
res
=>
{
axios
.
get
(
`/api/engineering?pageIndex=
${
page
}
&pageSize=20&type=simplify&engineeringType=mediumWater`
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
data
.
result
)
{
this
.
data
=
res
.
data
;
this
.
data
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
data
=
[];
this
.
data
=
[];
}
}
...
...
pages/news/_id.vue
View file @
24bd6bd4
...
@@ -10,9 +10,9 @@
...
@@ -10,9 +10,9 @@
import
axios
from
'~/plugins/axios'
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
async
asyncData
({
app
,
params
,
error
})
{
const
details
=
await
axios
.
get
(
`/api/news/detail/
${
params
.
id
}
`
);
const
{
data
}
=
await
axios
.
get
(
`/api/news/detail/
${
params
.
id
}
`
);
if
(
d
etails
.
d
ata
.
result
){
if
(
data
.
result
){
return
{
details
:
d
etails
.
d
ata
.
data
};
return
{
details
:
data
.
data
};
}
else
{
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
}
...
...
pages/news/index.vue
View file @
24bd6bd4
...
@@ -26,8 +26,8 @@ import axios from '~/plugins/axios'
...
@@ -26,8 +26,8 @@ import axios from '~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
newData
=
await
axios
.
get
(
'/api/news?pageIndex=1&pageSize=20&type=simplify'
);
const
{
data
}
=
await
axios
.
get
(
'/api/news?pageIndex=1&pageSize=20&type=simplify'
);
return
{
newData
:
newData
.
data
.
data
||
[]
,
total
:
newData
.
data
.
total
}
return
{
newData
:
data
.
data
||
[]
,
total
:
data
.
total
}
},
},
data
(){
data
(){
return
{
return
{
...
@@ -36,9 +36,9 @@ export default {
...
@@ -36,9 +36,9 @@ export default {
},
},
methods
:{
methods
:{
handleCurrentChange
(
page
){
handleCurrentChange
(
page
){
this
.
$axios
.
$
get
(
`/api/news?pageIndex=
${
page
}
&pageSize=20&type=simplify`
).
then
(
res
=>
{
axios
.
get
(
`/api/news?pageIndex=
${
page
}
&pageSize=20&type=simplify`
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
data
.
result
)
{
this
.
newData
=
res
.
data
;
this
.
newData
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
newData
=
[];
this
.
newData
=
[];
}
}
...
...
pages/product/disinfectant.vue
View file @
24bd6bd4
...
@@ -20,11 +20,12 @@
...
@@ -20,11 +20,12 @@
<
script
>
<
script
>
import
ProductImgList
from
'~/components/ProductImgList.vue'
import
ProductImgList
from
'~/components/ProductImgList.vue'
import
ContactUs
from
'~/components/ContactUs.vue'
import
ContactUs
from
'~/components/ContactUs.vue'
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
columnData
=
await
app
.
$axios
.
$
get
(
'/api/product'
);
const
{
data
}
=
await
axios
.
get
(
'/api/product'
);
return
{
columnData
:
columnD
ata
}
return
{
columnData
:
d
ata
}
},
},
components
:{
components
:{
ProductImgList
,
ProductImgList
,
...
...
pages/product/disinfectant/_id.vue
View file @
24bd6bd4
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
async
asyncData
({
app
,
params
,
error
})
{
const
details
=
await
app
.
$axios
.
$
get
(
`/api/product/detail/disinfectant/
${
params
.
id
}
`
);
const
{
data
}
=
await
axios
.
get
(
`/api/product/detail/disinfectant/
${
params
.
id
}
`
);
if
(
d
etails
.
result
){
if
(
d
ata
.
result
){
return
{
details
:
d
etails
.
data
};
return
{
details
:
d
ata
.
data
};
}
else
{
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
}
...
...
pages/product/disinfectant/index.vue
View file @
24bd6bd4
...
@@ -22,9 +22,11 @@
...
@@ -22,9 +22,11 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
data
=
await
app
.
$axios
.
$
get
(
'/api/product?pageIndex=1&pageSize=20&type=simplify&productType=disinfectant'
);
const
{
data
}
=
await
axios
.
get
(
'/api/product?pageIndex=1&pageSize=20&type=simplify&productType=disinfectant'
);
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
},
},
data
(){
data
(){
...
@@ -34,9 +36,9 @@ export default {
...
@@ -34,9 +36,9 @@ export default {
},
},
methods
:{
methods
:{
handleCurrentChange
(
page
){
handleCurrentChange
(
page
){
this
.
$axios
.
$
get
(
`/api/product?pageIndex=
${
page
}
&pageSize=20&type=simplify&productType=disinfectant`
).
then
(
res
=>
{
axios
.
get
(
`/api/product?pageIndex=
${
page
}
&pageSize=20&type=simplify&productType=disinfectant`
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
data
.
result
)
{
this
.
data
=
res
.
data
;
this
.
data
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
data
=
[];
this
.
data
=
[];
}
}
...
...
pages/product/equipment.vue
View file @
24bd6bd4
...
@@ -20,11 +20,12 @@
...
@@ -20,11 +20,12 @@
<
script
>
<
script
>
import
ProductImgList
from
'~/components/ProductImgList.vue'
import
ProductImgList
from
'~/components/ProductImgList.vue'
import
ContactUs
from
'~/components/ContactUs.vue'
import
ContactUs
from
'~/components/ContactUs.vue'
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
columnData
=
await
app
.
$axios
.
$
get
(
'/api/product'
);
const
{
data
}
=
await
axios
.
get
(
'/api/product'
);
return
{
columnData
:
columnD
ata
}
return
{
columnData
:
d
ata
}
},
},
components
:{
components
:{
ProductImgList
,
ProductImgList
,
...
...
pages/product/equipment/_id.vue
View file @
24bd6bd4
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
async
asyncData
({
app
,
params
,
error
})
{
const
details
=
await
app
.
$axios
.
$
get
(
`/api/product/detail/equipment/
${
params
.
id
}
`
);
const
{
data
}
=
await
axios
.
get
(
`/api/product/detail/equipment/
${
params
.
id
}
`
);
if
(
d
etails
.
result
){
if
(
d
ata
.
result
){
return
{
details
:
d
etails
.
data
};
return
{
details
:
d
ata
.
data
};
}
else
{
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
}
...
...
pages/product/equipment/index.vue
View file @
24bd6bd4
...
@@ -22,9 +22,11 @@
...
@@ -22,9 +22,11 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
data
=
await
app
.
$axios
.
$
get
(
'/api/product?pageIndex=1&pageSize=20&type=simplify&productType=equipment'
);
const
{
data
}
=
await
axios
.
get
(
'/api/product?pageIndex=1&pageSize=20&type=simplify&productType=equipment'
);
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
},
},
data
(){
data
(){
...
@@ -34,9 +36,9 @@ export default {
...
@@ -34,9 +36,9 @@ export default {
},
},
methods
:{
methods
:{
handleCurrentChange
(
page
){
handleCurrentChange
(
page
){
this
.
$axios
.
$
get
(
`/api/product?pageIndex=
${
page
}
&pageSize=20&type=simplify&productType=equipment`
).
then
(
res
=>
{
axios
.
get
(
`/api/product?pageIndex=
${
page
}
&pageSize=20&type=simplify&productType=equipment`
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
data
.
result
)
{
this
.
data
=
res
.
data
;
this
.
data
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
data
=
[];
this
.
data
=
[];
}
}
...
...
pages/product/ozonizer.vue
View file @
24bd6bd4
...
@@ -20,11 +20,12 @@
...
@@ -20,11 +20,12 @@
<
script
>
<
script
>
import
ProductImgList
from
'~/components/ProductImgList.vue'
import
ProductImgList
from
'~/components/ProductImgList.vue'
import
ContactUs
from
'~/components/ContactUs.vue'
import
ContactUs
from
'~/components/ContactUs.vue'
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
columnData
=
await
app
.
$axios
.
$
get
(
'/api/product'
);
const
{
data
}
=
await
axios
.
get
(
'/api/product'
);
return
{
columnData
:
columnD
ata
}
return
{
columnData
:
d
ata
}
},
},
components
:{
components
:{
ProductImgList
,
ProductImgList
,
...
...
pages/product/ozonizer/_id.vue
View file @
24bd6bd4
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
async
asyncData
({
app
,
params
,
error
})
{
const
details
=
await
app
.
$axios
.
$
get
(
`/api/product/detail/ozonizer/
${
params
.
id
}
`
);
const
{
data
}
=
await
axios
.
get
(
`/api/product/detail/ozonizer/
${
params
.
id
}
`
);
if
(
d
etails
.
result
){
if
(
d
ata
.
result
){
return
{
details
:
d
etails
.
data
};
return
{
details
:
d
ata
.
data
};
}
else
{
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
}
...
...
pages/product/ozonizer/index.vue
View file @
24bd6bd4
...
@@ -22,9 +22,11 @@
...
@@ -22,9 +22,11 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
data
=
await
app
.
$axios
.
$
get
(
'/api/product?pageIndex=1&pageSize=20&type=simplify&productType=ozonizer'
);
const
{
data
}
=
await
axios
.
get
(
'/api/product?pageIndex=1&pageSize=20&type=simplify&productType=ozonizer'
);
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
},
},
data
(){
data
(){
...
@@ -34,9 +36,9 @@ export default {
...
@@ -34,9 +36,9 @@ export default {
},
},
methods
:{
methods
:{
handleCurrentChange
(
page
){
handleCurrentChange
(
page
){
this
.
$axios
.
$
get
(
`/api/product?pageIndex=
${
page
}
&pageSize=20&type=simplify&productType=ozonizer`
).
then
(
res
=>
{
axios
.
get
(
`/api/product?pageIndex=
${
page
}
&pageSize=20&type=simplify&productType=ozonizer`
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
data
.
result
)
{
this
.
data
=
res
.
data
;
this
.
data
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
data
=
[];
this
.
data
=
[];
}
}
...
...
pages/qualifications/_id.vue
View file @
24bd6bd4
...
@@ -6,11 +6,13 @@
...
@@ -6,11 +6,13 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
,
params
,
error
})
{
async
asyncData
({
app
,
params
,
error
})
{
const
details
=
await
app
.
$axios
.
$
get
(
`/api/qualifications/detail/
${
params
.
id
}
`
);
const
{
data
}
=
await
axios
.
get
(
`/api/qualifications/detail/
${
params
.
id
}
`
);
if
(
d
etails
.
result
){
if
(
d
ata
.
result
){
return
{
details
:
d
etails
.
data
};
return
{
details
:
d
ata
.
data
};
}
else
{
}
else
{
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
return
error
({
message
:
'页面不存在'
,
statusCode
:
404
})
}
}
...
...
pages/qualifications/index.vue
View file @
24bd6bd4
...
@@ -21,21 +21,18 @@
...
@@ -21,21 +21,18 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
axios
from
'~/plugins/axios'
export
default
{
export
default
{
async
asyncData
({
app
})
{
async
asyncData
({
app
})
{
const
data
=
await
app
.
$axios
.
$
get
(
'/api/qualifications?pageIndex=1&pageSize=20&type=simplify'
);
const
{
data
}
=
await
axios
.
get
(
'/api/qualifications?pageIndex=1&pageSize=20&type=simplify'
);
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
return
{
data
:
data
.
data
||
[]
,
total
:
data
.
total
}
},
},
data
(){
return
{
}
},
methods
:{
methods
:{
handleCurrentChange
(
page
){
handleCurrentChange
(
page
){
this
.
$axios
.
$
get
(
`/api/qualifications?pageIndex=
${
page
}
&pageSize=20&type=simplify`
).
then
(
res
=>
{
axios
.
get
(
`/api/qualifications?pageIndex=
${
page
}
&pageSize=20&type=simplify`
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
data
.
result
)
{
this
.
data
=
res
.
data
;
this
.
data
=
res
.
data
.
data
;
}
else
{
}
else
{
this
.
data
=
[];
this
.
data
=
[];
}
}
...
...
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