Coder Social home page Coder Social logo

iuroc-image-site's Introduction

IURoc Image

IURoc 图片网

快速开始

注意启动路径,按顺序执行代码

  • 开发环境配置完成后

    # 环境配置完成后,快速启动开发环境
    npm run dev1
    npm run dev2
  • 未配置开发环境

    # 新建终端
    cd backend           # 后端部分
    mvn clean install    # 清除并安装
    mvn spring-boot:run  # 启动开发环境
    # 新建终端
    cd frontend  # 前端部分
    npm install  # 安装依赖模块
    npm run dev  # 启动开发环境
  • 下载解压图片资源

    • 点击下载压缩包
    • 将压缩包内 image 目录解压到 resources 目录,形成类似 resources/image/1.jpg 的路径。

通过浏览器访问 http://localhost:5173/ 访问前端站点。

API 文档

HTTP 接口

  • Cookie 自动登录
    • 请求地址:/api/login
    • 请求方式:GET
    • 请求表头
      • Cookie: token=xxx
  • 表单手动登录
    • 请求地址:/api/login
    • 请求方式:POST
    • 请求参数
      • username:账号
      • password:密码
  • 注册账号
    • 请求地址:/api/register
    • 请求方式:POST
    • 请求参数
      • username:账号
      • password:密码

AjaxRes 类

// 用法一
AjaxRes res = new AjaxRes();
res.setCode(AjaxRes.SUCCESS);
res.setMessage("响应描述");
res.setData("响应数据");
return res;
// 用法二
AjaxRes res = new AjaxRes();
res.setSuccess("响应描述").setData("响应数据");
return res;
// setSuccess() == setCode(AjaxRes.SUCCESS)
AjaxRes res1 = new AjaxRes().setSuccess();

// setSuccess("描述") == setCode(AjaxRes.SUCCESS).setMessage("描述")
AjaxRes res2 = new AjaxRes().setSuccess("响应描述");

// AjaxRes 类的所有成员方法均可以链式调用
AjaxRes res3 = new AjaxRes().setSuccess().setData("响应数据");

// 所有成员方法均可按需使用
AjaxRes res4 = new AjaxRes().setData("响应数据");

iuroc-image-site's People

Contributors

iuroc avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.