team34宠物医院接口文档

获取商品列表

var that=this;
that.$axios({
	method: "GET",
	url: GLOBAL.baseURL+"/pethospital/goods/list"
})
.then(res=>{
	//后台返回数据
})

后台返回数据样例

{
    "msg": "success",
    "code": 0,
    "page": {
        "totalCount": 0,
        "pageSize": 10,
        "totalPage": 0,
        "currPage": 1,
        "list": [
            {
                "goodsId": 1,
                "goodsName": "佩玛思特狗粮深海鱼油通用型幼犬粮15kg金毛泰迪佩玛斯特30斤主粮",
                "goodsImg": "https://img.alicdn.com/imgextra/i3/498177478/O1CN01bJvt15256yNiY7iaV_!!498177478-0-lubanu-s.jpg_430x430q90.jpg",
                "goodsPrice": 489,
                "goodsStock": 21312,
                "goodsSales": 3213
            }
        ]
    }
}

查询商品

var that=this;
that.$axios({
	method: "GET",
	url: GLOBAL.baseURL+"/pethospital/goods/info",
	params:{
		s:that.select_word
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0,
    "goods": [
        {
            "goodsId": 1,
            "goodsName": "佩玛思特狗粮深海鱼油通用型幼犬粮15kg金毛泰迪佩玛斯特30斤主粮",
            "goodsImg": "https://img.alicdn.com/imgextra/i3/498177478/O1CN01bJvt15256yNiY7iaV_!!498177478-0-lubanu-s.jpg_430x430q90.jpg",
            "goodsPrice": 489,
            "goodsStock": 21312,
            "goodsSales": 3213
        }
    ]
}

添加商品

var that=this;
that.$axios({
	method: "POST",
	url: GLOBAL.baseURL+"/pethospital/goods/save",
	data:{
		goodsName:that.goods_name,
		goodsImg:that.goods_img,
		goodsPrice:that.goods_price,
		goodsStock:that.goods_stock
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0
}

删除商品

var that=this;
that.$axios({
	method: "POST",
	url: GLOBAL.baseURL+"/pethospital/goods/delete",
	data:{
	//goodsIds 是一个数组,商品id的数组
		goodsIds:that.goodsIds
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0
}

修改商品信息

var that=this;
that.$axios({
	method: "POST",
	url: GLOBAL.baseURL+"/pethospital/goods/update",
	data:{
	//需要修改哪个信息就修改传哪个参数
		goodsId:that.goodsId  //这个参数必须要
		goodsName:that.goods_name,
		goodsImg:that.goods_img,
		goodsPrice:that.goods_price,
		goodsStock:that.goods_stock
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0
}

会员列表

var that=this;
that.$axios({
	method: "GET",
	url: GLOBAL.baseURL+"/pethospital/member/list"
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0,
    "page": {
        "totalCount": 0,
        "pageSize": 10,
        "totalPage": 0,
        "currPage": 1,
        "list": [
            {
                "id": 1,
                "data": "2020-06-01 16:00:00",
                "name": "赵婧",
                "phone": "13562527548",
                "petName": "贝贝",
                "type": "博美"
            },
            {
                "id": 2,
                "data": "2020-06-24 16:00:00",
                "name": "陈婷",
                "phone": "15632524875",
                "petName": "扣扣",
                "type": "斗牛"
            },
            {
                "id": 3,
                "data": "2020-06-30 16:00:00",
                "name": "何丽",
                "phone": "13562547849",
                "petName": "豆豆",
                "type": "美短"
            },
            {
                "id": 4,
                "data": "2020-07-07 16:00:00",
                "name": "李莉",
                "phone": "154785658525",
                "petName": "花花",
                "type": "阿拉斯加"
            },
            {
                "id": 5,
                "data": "2020-07-26 16:00:00",
                "name": "zhangsan",
                "phone": "ssss",
                "petName": "sss",
                "type": "金毛"
            }
        ]
    }
}

修改会员信息

var that=this;
that.$axios({
	method: "POST",
	url: GLOBAL.baseURL+"/pethospital/memeber/update",
	data:{
	//需要修改哪个信息就修改传哪个参数
		id:that.id  // 会员id这个参数必须要
		name:that.name,
		phone:that.phone,
		petName:that.petName,
		type:that.type
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0
}

添加会员

var that=this;
that.$axios({
	method: "POST",
	url: GLOBAL.baseURL+"/pethospital/memeber/save",
	data:{
		name:that.name,
		phone:that.phone,
		petName:that.petName,
		type:that.type
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0
}

删除会员

var that=this;
that.$axios({
	method: "POST",
	url: GLOBAL.baseURL+"/pethospital/memeber/delete",
	data:{
		Ids:that.Ids ///会员id的数组
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0
}

查询会员

var that=this;
that.$axios({
	method: "GET",
	url: GLOBAL.baseURL+"/pethospital/goods/info",
	params:{
		s:that.select_word
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0,
    "member": [
        {
            "id": 6,
            "data": "2020-07-27 16:00:00",
            "name": "qsg",
            "phone": "123534534",
            "petName": "rocket",
            "type": "金毛"
        }
    ]
}

获取交易列表

var that=this;
that.$axios({
	method: "GET",
	url: GLOBAL.baseURL+"/pethospital/deal/list"
})
.then(res=>{
	//后台返回数据
})

后台返回数据样例

{
    "msg": "success",
    "code": 0,
    "page": {
        "totalCount": 0,
        "pageSize": 10,
        "totalPage": 0,
        "currPage": 1,
        "list": [
            {
                "id": 1,
                "data": "2020-06-30 16:00:00",
                "name": "梁超",
                "petName": "贝贝",
                "type": "博美",
                "therapeuticRegimen": "绝育",
                "cases": "手术后住院观察1天",
                "status": false
            },
            {
                "id": 2,
                "data": "2020-07-01 16:00:00",
                "name": "崔雷",
                "petName": "丽丽",
                "type": "金毛",
                "therapeuticRegimen": "眼角被咬伤,轻微化脓",
                "cases": "消炎药,清理伤口,包扎",
                "status": true
            },
            {
                "id": 3,
                "data": "2020-07-07 16:00:00",
                "name": "韩磊",
                "petName": "安安",
                "type": "英短",
                "therapeuticRegimen": "绝育",
                "cases": "手术后住院观察1天",
                "status": true
            }
        ]
    }
}

查询交易信息

var that=this;
that.$axios({
	method: "GET",
	url: GLOBAL.baseURL+"/pethospital/deal/info",
	params:{
		s:that.select_word
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "deal": [
        {
            "id": 1,
            "data": "2020-06-30 16:00:00",
            "name": "梁超",
            "petName": "贝贝",
            "type": "博美",
            "therapeuticRegimen": "绝育",
            "cases": "手术后住院观察1天",
            "status": false
        }
    ],
    "code": 0
}

换班信息列表

var that=this;
that.$axios({
	method: "GET",
	url: GLOBAL.baseURL+"/pethospital/shiftchange/list"
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0,
    "page": {
        "totalCount": 0,
        "pageSize": 10,
        "totalPage": 0,
        "currPage": 1,
        "list": [
            {
                "id": 1,
                "dutyPersonId": 1,
                "dutyPersonName": "骄傲是你的",
                "actualPersonId": 2,
                "actualPersonName": "的撒厚度啥的",
                "changeReason": "打算打算阿松大撒大是大苏打",
                "changeTime": "2020-01-02"
            }
        ]
    }
}

查询换班信息信息

var that=this;
that.$axios({
	method: "GET",
	url: GLOBAL.baseURL+"/pethospital/shiftchange/info",
	params:{
		s:that.select_word
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0,
    "shiftChange": [
        {
            "id": 1,
            "dutyPersonId": 1,
            "dutyPersonName": "骄傲是你的",
            "actualPersonId": 2,
            "actualPersonName": "的撒厚度啥的",
            "changeReason": "打算打算阿松大撒大是大苏打",
            "changeTime": "2020-01-02"
        }
    ]
}

修改换班信息

var that=this;
that.$axios({
	method: "POST",
	url: GLOBAL.baseURL+"/pethospital/goods/update",
	data:{
	//需要修改哪个信息就修改传哪个参数
		id:that.id  //这个参数必须要
		dutyPersonId:that.dutyPersonId,
		dutyPersonName:that.dutyPersonName,
		actualPersonId:that.actualPersonId,
		actualPersonName:that.actualPersonName,
		changeReason:that.changeReason,
		changeTime:that.changeTimes
	}
})
.then(res=>{
	//后台返回数据
})

后台返回样例

{
    "msg": "success",
    "code": 0
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值