Skip to content

Latest commit

 

History

History
453 lines (321 loc) · 8 KB

云打印.md

File metadata and controls

453 lines (321 loc) · 8 KB

云打印(YunPrint)

注:URL前缀为:http://localhost/YunPrint/public/

线上URL前缀为:http://yunprint.applinzi.com/YunPrint/public/index.php

用户(user)

登录接口

POST user/login/oklogin

参数名 参数类型 备注
username
password
{
    "errcode": "0",
    "errmsg": "登录成功",
    "data": {
        "id": 1,
        "username": "xzfff",
        "realname": "谢泽丰",
        "tel": "13125177868",
        "time": "2018-03-27 08:45:11"
    }
}

注册接口

POST user/login/register

参数名 参数类型 备注
username
password
realname
tel
{
    "errcode": "-1",
    "errmsg": "注册失败",
    "data": ""
}

注销登录

GET user/login/dellogin

上传文件

注:支持多文件上传

FILE user/upload/upload

{
    errcode: 0,
    errmsg: "上传成功",
    data: {
        1: {
        path: "E:\wamp\www\YunPrint\public\upload20180420/5cc0361fec164b0712db30f9ba837fef.docx",
        msg: 1,
        realname: "2018上学期值班表1.5.docx"
        }
    }
}

查看订单

GET user/order/showorder

{
    "errcode": "0",
    "errmsg": "获取成功",
    "data": [
        {
            "id": 1,
            "uid": 1,
            "sid": 1,
            "filenum": 2,
            "file1id": 1,
            "file2id": 2,
            "file3id": null,
            "status": 3,
            "createtime": "2018-04-20 22:45:24",
            "finishtime": null,
            "file1info": {
                "id": 1,
                "realname": "信息化建设项目立项申报书(1).docx",
                "savename": "20180420\\21b1a5015c667968646212b5131cd924.docx",
                "author": "朱孟岳",
                "time": "2018-04-20 23:12:18",
                "status": 1
            },
            "file2info": {
                "id": 2,
                "realname": "网络中心宣传部04.14docx.docx",
                "savename": "20180420\\ebb32f8bc55f137f47a25d3bb3e23682.docx",
                "author": "朱孟岳",
                "time": "2018-04-20 23:12:18",
                "status": 1
            },
            "file3info": null
        }
    ]
}

创建订单

POST user/order/createorder

参数名 参数类型 备注
sid
file1id int 文件id
file1num 打印份数
file1color 0-黑白 1-彩色
file1style 0-单面 1-双面
file2id
file2num
file2color
file2style
file3id
file3num
file3color
file3style
{
    "errcode": "0",
    "errmsg": "创建成功",
    "data": 1
}

取消订单

POST user/order/cancelorder

参数名 参数类型 备注
oid
{
    "errcode": "0",
    "errmsg": "已成功取消订单",
    "data": 1
}

完成订单

POST user/order/isfinish

参数名 参数类型 备注
oid
{
    "errcode": "0",
    "errmsg": "订单完成",
    "data": 1
}

获取所有商家

GET user/order/showstore

{
    "errcode": "0",
    "errmsg": "获取成功",
    "data": [
        {
            "id": 1,
            "storename": "升升C栋打印店",
            "place": "升升公寓C栋地下室打印店"
        }
    ]
}

获取个人文件

GET user/file/getmyfile

{
    "errcode": "0",
    "errmsg": "获取成功",
    "data": [
        {
            "id": 1,
            "filename": "信息化建设项目立项申报书(1).docx",
            "savename": "20180420\\21b1a5015c667968646212b5131cd924.docx",
            "author": "朱孟岳",
            "time": "2018-04-20 23:12:18",
            "status": 1
        }
    ]
}

获取云文件

GET user/file/getpublic/file

{
    "errcode": "0",
    "errmsg": "获取成功",
    "data": [
        {
            "id": 1,
            "filename": "信息化建设项目立项申报书(1).docx",
            "savename": "20180420\\21b1a5015c667968646212b5131cd924.docx",
            "author": "朱孟岳",
            "time": "2018-04-20 23:12:18",
            "status": 1
        }
    ]
}        

更新文件公开状态

POST user/file/ispublic

参数名 参数类型 备注
fid 文件id
status 0-非公开 1-公开
{
    "errcode": "0",
    "errmsg": "修改成功",
    "data": 1
}

商户(store)

登录接口

POST store/login/oklogin

参数名 参数类型 备注
username
password
{
    "errcode": "0",
    "errmsg": "登录成功",
    "data": {
        "id": 1,
        "username": "store1",
        "storename": "升升C栋打印店",
        "place": "升升公寓C栋地下室打印店",
        "tel": "1234567",
        "status": 0,
        "time": "2018-04-21 00:40:22"
    }
}

注册接口

POST store/login/register

参数名 参数类型 备注
username
password
storename 店名
place 店地址
tel
{
    "errcode": "0",
    "errmsg": "注册成功",
    "data": 1
}

注销登录

GET store/login/dellogin

查看订单

GET store/order/showorder

{
    "errcode": "0",
    "errmsg": "获取成功",
    "data": [
        {
            "id": 1,
            "uid": 1,
            "sid": 1,
            "filenum": 1,
            "file1id": 1,
            "file2id": 2,
            "file3id": 3,
            "remark": null,
            "status": 2,
            "createtime": "2018-04-21 01:18:12",
            "finishtime": null,
            "file1info": {
                "id": 1,
                "realname": "信息化建设项目立项申报书(1).docx",
                "savename": "20180420\\21b1a5015c667968646212b5131cd924.docx",
                "author": "朱孟岳",
                "time": "2018-04-20 23:12:18",
                "status": 1
            },
            "file2info": {
                "id": 2,
                "realname": "网络中心宣传部04.14docx.docx",
                "savename": "20180420\\ebb32f8bc55f137f47a25d3bb3e23682.docx",
                "author": "朱孟岳",
                "time": "2018-04-20 23:12:18",
                "status": 1
            },
            "file3info": {
                "id": 3,
                "realname": "信息化建设项目立项申报书(1).docx",
                "savename": "20180420\\dd3d7b3e444dbd9b522f0a3df83432dc.docx",
                "author": "朱孟岳",
                "time": "2018-04-20 23:17:56",
                "status": 1
            }
        }
    ]
}

更新订单状态

POST store/order/changestatus

参数名 参数类型 备注
oid 订单id
{
    "errcode": "0",
    "errmsg": "更新状态成功",
    "data": 1
}

修改商户信息

POST store/mine/editinfo

参数名 参数类型 备注
place
tel
qq
status
{
    "errcode": "0",
    "errmsg": "修改成功",
    "data": 1
}