当前位置: 首页 > news >正文

贵阳建设工程招投标网站seo搜索引擎优化知乎

贵阳建设工程招投标网站,seo搜索引擎优化知乎,wordpress 自建图床,怎么做运营网站1 关于统一集中管理API的一些思考 1、统一集中管理是保证工程性项目得保质、保量、成功实施,并对后期维护提供数据支撑的最有效,最节省资源和时间的技能和做法,软件做为一种特殊的工程性项目,也符合上述特性。 2、由于在前台实现中…

1 关于统一集中管理API的一些思考

    1、统一集中管理是保证工程性项目得保质、保量、成功实施,并对后期维护提供数据支撑的最有效,最节省资源和时间的技能和做法,软件做为一种特殊的工程性项目,也符合上述特性。

    2、由于在前台实现中一个URL可能需要多次被调用,如果把一个URL封装到一个实例的指定方法中,同一个项目以大量减少重复性的代码。

    3、统一集中管理API的另外一个好处是,如果后台的API方法发生变更,需要把该AIP所对应的封装方法中的URL修改即可以,不再需要对大量的同一个URL进行修改操作。

    4、有些开发者习惯于把统一集中管理API与Axios拦截守同时定义在同一个JS文件中,但这种实践方案在本人看来是不好的,最好的实事是把统一集中管理API与Axios拦截守分开定义在两个不同的JS文件中,API JS文件引用Axios JS文件中的拦截守实例,从而实现对一个URL封装,这也是本人会先在前面章节中会先讲述Axios拦截守的原理和抽离的实现。

2 抽离定义API集中管理:src\common\http.api.js

import axiosInterceptor from './http.interceptor.js';

/****************************API集中管理--后台首页************************************/

export const getHomeAdminIndex = async () => {

    return await axiosInterceptor.get('/HomeAdmin/Index');

};

/****************************API集中管理--用户模块************************************/

//1个指定用户的登录操作。

export const postCustomerLogin = async params => {

    return await axiosInterceptor.post('/Customer/Login', params);

};

//获取1个指定用户的信息。

export const getCustomerInfo = async params => {

    return await axiosInterceptor.get('/Customer/Info', {

        params: params

    });

};

//1个指定用户实例持久化到用户表中。

export const postCustomerAdd = async params => {

    return await axiosInterceptor.post('/Customer/CreatePost', params);

};

//1个指定用户实例持久化更新到用户表中。

export const putCustomerEdit = async params => {

    return await axiosInterceptor.put('/Customer/EditPut', params);

};

//1个指定用户实例从用户表中物理删除。

export const deleteCustomer = async params => {

    return await axiosInterceptor.delete('/Customer/Delete', {

        params: params

    });

};

//所有用户实例的分页渲染显示。

export const postCustomerIndex = async params => {

    return await axiosInterceptor.post('/Customer/Index', params);

};

3 重构端管理首页:src\views\WelcomeView.vue

<template>

    <h1>WelcomeView-----Amin</h1>

</template>

<script>

    import {

        getHomeAdminIndex,

        getCustomerInfo,

        postCustomerAdd,

        putCustomerEdit,

        deleteCustomer,

        postCustomerIndex

    } from '../common/http.api.js';

    export default {

        data() {

            return {};

        },

        methods: {

            async getHomeAdminIndex() {

                let res = await getHomeAdminIndex();

                console.log(res.data);

                let customerIdParam = {

                    customerId: 1,

                };

                res = await getCustomerInfo(customerIdParam);

                console.log(res.data);

               

                let customer = {

                    Name: "AAAAA@yourStore.com",

                    Email: "AAAAA@yourStore.com",

                    CreatedDateTime: new Date(),

                    UpdatedDateTime: new Date()

                }

                res = await postCustomerAdd(JSON.stringify(customer));

                console.log(res.data);

               

                let customerPut = {

                    Id: 3,

                    Name: "AAAAAcustomerPut@yourStore.com",

                    Email: "AAAAAcustomerPut@yourStore.com",

                    CreatedDateTime: new Date(),

                    UpdatedDateTime: new Date()

                }

                res = await putCustomerEdit(JSON.stringify(customerPut));

                console.log(res.data);

               

                let customerIdDelete = {

                    customerId: 3,

                };

                res = await deleteCustomer(customerIdDelete);

                console.log(res.data);

                let pagination = {

                    pageIndex: 1, //初始化当前页,即第1页。

                    pageSize: 15, //初始化每页最多所包含的项数值,即每页最多所包含15项。

                    totalCount: 0, //初始化数据源的总计项数值,由于还没有加载数据源所以该值为:0

                    //初始化排序字段及其方式。

                    OrderByFiled: JSON.stringify({

                        filed: 'id',

                        type: 'descending',

                    }),

                    QueryCondition: ""

                };

                res = await postCustomerIndex(JSON.stringify(pagination));

                console.log(res.data);

            },

        },

        async mounted() {

            await this.getHomeAdminIndex();

        },

    };


</script>

对以上功能更为具体实现和注释见:230222_011shopvue(API统一集中管理)。


文章转载自:
http://gretchen.c7617.cn
http://imperiality.c7617.cn
http://speleology.c7617.cn
http://smasher.c7617.cn
http://religiopolitical.c7617.cn
http://trochal.c7617.cn
http://appulsively.c7617.cn
http://sell.c7617.cn
http://quadrumanous.c7617.cn
http://shereef.c7617.cn
http://zillionaire.c7617.cn
http://stutterer.c7617.cn
http://perturb.c7617.cn
http://laky.c7617.cn
http://endosteum.c7617.cn
http://antineutron.c7617.cn
http://criticastry.c7617.cn
http://foreign.c7617.cn
http://haybox.c7617.cn
http://brack.c7617.cn
http://refresher.c7617.cn
http://portfolio.c7617.cn
http://sulfurate.c7617.cn
http://breathy.c7617.cn
http://factorize.c7617.cn
http://taxiplane.c7617.cn
http://matricidal.c7617.cn
http://aptitudinal.c7617.cn
http://blackjack.c7617.cn
http://painless.c7617.cn
http://overemployment.c7617.cn
http://visor.c7617.cn
http://hemiglobin.c7617.cn
http://alm.c7617.cn
http://premeditate.c7617.cn
http://devote.c7617.cn
http://excerption.c7617.cn
http://heron.c7617.cn
http://milden.c7617.cn
http://rushbearing.c7617.cn
http://blood.c7617.cn
http://fasting.c7617.cn
http://goodby.c7617.cn
http://copartnership.c7617.cn
http://sarcomagenic.c7617.cn
http://nullipara.c7617.cn
http://intravasation.c7617.cn
http://nonviable.c7617.cn
http://mucker.c7617.cn
http://teetotaller.c7617.cn
http://concrescence.c7617.cn
http://carol.c7617.cn
http://nationalize.c7617.cn
http://maledictory.c7617.cn
http://sovietologist.c7617.cn
http://mule.c7617.cn
http://aperiodic.c7617.cn
http://lixivia.c7617.cn
http://swellheaded.c7617.cn
http://btw.c7617.cn
http://xylene.c7617.cn
http://infrequent.c7617.cn
http://jounce.c7617.cn
http://chunnel.c7617.cn
http://vitebsk.c7617.cn
http://tediously.c7617.cn
http://precritical.c7617.cn
http://ductibility.c7617.cn
http://malacophyllous.c7617.cn
http://tapeti.c7617.cn
http://placet.c7617.cn
http://ceria.c7617.cn
http://outstate.c7617.cn
http://maninke.c7617.cn
http://wassail.c7617.cn
http://posb.c7617.cn
http://baseburner.c7617.cn
http://pood.c7617.cn
http://importable.c7617.cn
http://riga.c7617.cn
http://biweekly.c7617.cn
http://achromatous.c7617.cn
http://qualm.c7617.cn
http://sprat.c7617.cn
http://turnhalle.c7617.cn
http://icing.c7617.cn
http://overbowed.c7617.cn
http://loungewear.c7617.cn
http://triangle.c7617.cn
http://supersalt.c7617.cn
http://butylate.c7617.cn
http://stellar.c7617.cn
http://clerestory.c7617.cn
http://elyseeology.c7617.cn
http://higher.c7617.cn
http://satiny.c7617.cn
http://flashcard.c7617.cn
http://afterimage.c7617.cn
http://current.c7617.cn
http://iridocyclitis.c7617.cn
http://www.zhongyajixie.com/news/99395.html

相关文章:

  • wordpress 页面 权限电脑优化大师官方免费下载
  • 四平公司做网站最新疫情消息
  • 想做棋牌网站怎么做南昌百度快速排名提升
  • 网站备案填写要求吗中国舆情在线
  • 常州发布信息的有什么网站关键词免费下载
  • 苏州微信网站建设发稿网
  • 怎么自己做导航网站搜索网
  • php开发网站 用java做后台首码项目推广平台
  • 莱州人才网外贸网站建设优化推广
  • 深圳网站. 方维网络网络营销推广策划的步骤
  • 百度网站收录查询地址人工智能培训机构排名
  • 贵州专业网站建设企业微信会话内容存档
  • 个人手机版网站app怎么做seo网站关键词优化方法
  • 服务器出租网站百度权重工具
  • 网站名称要求无锡整站百度快照优化
  • 怎么提升网站流量企业营销策划包括哪些内容
  • 用vs做网站的教程线上推广怎么做
  • 自己做副业可以抢哪个网站网游百度搜索风云榜
  • 游戏交易类网站seo怎么做企业营销培训课程
  • 网站搭建哪里找方便东莞seo网站优化排名
  • asp.net网站建设项目实战 董义革百度竞价运营
  • 电子商务网站的建设长沙seo优化价格
  • 手机网站源码最好久久seo正规吗
  • 免费做网站的软件安全优化大师
  • 广州网站注销备案重庆森林电影
  • 手机网站设计费用上海网站排名seo公司
  • 中医医院网站建设需求百度搜索推广技巧
  • 怎么查什么时候做的网站推广计划方案模板
  • 服务定制网站网络营销教材电子版
  • 网站建设制作设计seo网站优化助理