A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

开源项目码云地址:
https://gitee.com/kennana/mobile_account_book

登录界面Login.vue

request 请求
{
        username: String 用户名,
        password: String 密码
}
response 响应
{
        user_id: int,
        code: int 0表示成功,其他表示失败,
        token: string,
        data: {
                msg: "登录成功",
        }

}
如果用户没有注册过就去登录,要提醒用户去注册

注册页面Register.vue

request 请求
{
        username: String 用户名,
        password: String 密码
}
将用户名写入本地缓存中。
response 响应
{
        user_id: int,
        code: int 0表示成功,其他表示失败,
        token: string,
        data: {
                msg: "注册成功"
        }
}
将token写入缓存中
注册成功之后,跳转到登录页面
图片上传

request 请求
{
       
}
response 响应
{
       
}

记账页面AddInfo.vue

request 请求
{
        date: string 日期,
        morning: string 早餐花费,
        afternoon: string 午餐花费,
        evening: string 晚餐花费,
        other: string 其他花费,
        token: string token验证,
        userid: int 用户id
}

response 响应
{
        code: int 0表示成功,其他表示失败,
        data: {
                msg: '提示语'
        }
}

修改记账EditInfo.vue

request 初始化请求
{
        userid: int 用户id,
        editid: int 编辑id,
        token: string 验证,
}
reponse 初始化,返回特定的一条数据
{
        userid: int 用户id,
        editid: int 编辑id,
        code: int 0表示成功,其他表示失败,
        data: {
                data: {
                        date: string 日期,
                        morning: string 早餐花费,
                        afternoon: string 午餐花费,
                        evening: string 晚餐花费,
                        other: string 其他花费,
                },
                msg: "提示语"
        }
}

修改后request请求
{
        date: string 日期,
        morning: string 早餐花费,
        afternoon: string 午餐花费,
        evening: string 晚餐花费,
        other: string 其他花费,
        userid: int 用户id,
        editid: int 编辑id,
        token: string 验证,
}

修改后reponse响应
{
        userid: int 用户id,
        editid: int 编辑id,
        code: int 0表示成功,其他表示失败,
        data: {
                msg:"提示语",
        }
}

展示记账简略信息ShowInfo.vue

request 初始化请求
{
        userid: int 用户id,
        editid: int 编辑id,
        token: string 验证,
}
reponse 初始化,返回特定的一条数据
{
        userid: int 用户id,
        editid: int 编辑id,
        code: int 0表示成功,其他表示失败,
        data: {
                data: [
                        {
                                id: int ,
                                date: string 日期,
                                path: string头像
                        },
                        {
                                id: int ,
                                date: string 日期,
                                path: string头像
                        },
                        {
                                id: int ,
                                date: string 日期,
                                path: string头像
                        }
                ],
                msg: "提示语"
        }
}

修改后request请求
{
        date: string 日期,
        userid: int 用户id,
        editid: int 编辑id,
        token: string 验证,
}

修改后reponse响应
{
        userid: int 用户id,
        editid: int 编辑id,
        code: int 0表示成功,其他表示失败,
        data: {
                msg:"提示语",
        }
}

显示详细信息Info.vue

request 请求
{
        userid: int 用户id,
        infoid: int 信息id,
        token: string 验证,
}

response 响应
{
        userid: int 用户id,
        editid: int 编辑id,
        code: int 0表示成功,其他表示失败,
        data: {
                data: {
                        date: string 日期,
                        morning: string 早餐花费,
                        afternoon: string 午餐花费,
                        evening: string 晚餐花费,
                        other: string 其他花费,
                },
                msg: "提示语"
        }
}

写日记EditRiQi.vue

request 请求
{
        userid: int 用户id,
        content: string 日记内容,
        token: string 验证
}

reponse 响应
{
        userid: int 用户id,
        code: int 0表示成功,其他表示失败,
        data: {
                msg: "提示语"
        }
}
---------------------
转载,仅作分享,侵删
作者:Ken Coding
原文:https://blog.csdn.net/qq_36772866/article/details/85562203


1 个回复

倒序浏览
奈斯,加油
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马