Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-11-06 15:57:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85c531bde8d8ece6f55c8526773d62d996c0b74d
85c531bd
1 parent
ed15f8f0
新增联系方式接口获取
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
src/api/hager.js
src/views/concat.vue
src/api/hager.js
View file @
85c531b
...
...
@@ -26,6 +26,7 @@ const Api = {
SEARCH
:
'/srv/?a=search'
,
DOWN_EMAIL
:
'/srv/?a=down_email'
,
DOWN_ZIP
:
'/srv/?a=down_zip'
,
CONCAT
:
'/srv/?a=contact'
,
};
export
const
honorAPI
=
(
params
)
=>
fn
(
fetch
.
get
(
Api
.
HONOR
,
params
));
...
...
@@ -56,3 +57,5 @@ export const searchAPI = (params) => fn(fetch.get(Api.SEARCH, params));
export
const
downEmailAPI
=
(
params
)
=>
fn
(
fetch
.
post
(
Api
.
DOWN_EMAIL
,
params
));
export
const
downZipAPI
=
(
params
)
=>
fn
(
fetch
.
post
(
Api
.
DOWN_ZIP
,
params
));
export
const
concatAPI
=
(
params
)
=>
fn
(
fetch
.
get
(
Api
.
CONCAT
,
params
));
...
...
src/views/concat.vue
View file @
85c531b
<!--
* @Date: 2024-10-18 09:31:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-0
5 11:34:09
* @LastEditTime: 2024-11-0
6 15:56:52
* @FilePath: /hager/src/views/concat.vue
* @Description: 联系我们
-->
...
...
@@ -70,8 +70,9 @@
<script>
import mixin from 'common/mixin';
import hagerBox from '@/components/common/hagerBox';
import telData from '@/common/telData';
import { cloneDeep } from 'lodash-es'
// import telData from '@/common/telData';
import { cloneDeep } from 'lodash-es';
import { concatAPI } from "@/api/hager.js";
export default {
components: { hagerBox },
...
...
@@ -82,13 +83,16 @@ export default {
mini_concat_list: [],
}
},
mounted () {
this.concat_list = cloneDeep(telData);
this.mini_concat_list = cloneDeep(telData);
async mounted () {
const { code, data } = await concatAPI();
if (code) {
this.concat_list = cloneDeep(data);
this.mini_concat_list = cloneDeep(data);
// PC端将list中的元素分成两组, 构造显示结构
this.concat_list.forEach(item => {
item.list = this.splitListIntoPairs(item.list);
});
}
},
methods: {
splitListIntoPairs (list) {
...
...
Please
register
or
login
to post a comment