简要描述:

  • 用户登录接口

请求域名:

  • http://xx.com

请求URL:

GET/route=coupon.coupon.coupon-view(视图,传值模板id)
POST/route=coupon.coupon.edit(提交存储数据)

传参数说明:

参数名 类型 说明
category_ids[] arr
category_names[] arr
goods_ids[] arr
goods_names[] arr
store_ids[] arr
store_names[] arr
goods_id[] arr
goods_name[] arr
hotel_ids[] arr
hotel_names[] arr
以下数据 需要加数组 如:coupon[is_singleton]
display_order int 排序
name str 优惠券名称
status int 是否开启 : 1是 0否
use_type int 适用范围:0平台自营商品(不包含供应商商品) 1指定商品分类 2指定商品 4指定门店 7指定酒店 8兑换券
enough int 使用条件 - 订单金额
level_limit int 领取条件 - 会员等级id
time_limit int 使用时间限制 : 1天内有效(0 为不限时间使用) 0获得后
time_limit int 日期
time[starttime] int 开启时间(时间控件)
time[endtime] int 结束时间(时间控件)
is_complex int 使用方式 :1多张一起使用 0单张使用
get_type int 是否可领取 : 1可以 0不可以
get_max int 每人限领张数
total int 发放总数

备注:

返回示例:

正确时返回:

{
	result: 1,
	msg: "ok",
	data: {
		coupon: {
			id: 1,
			uniacid: 2,
			cat_id: 0,
			name: "全品类优惠券",
			get_type: 1,
			level_limit: -1,
			get_max: 1,
			use_type: 0,
			return_type: 0,
			bgcolor: "",
			enough: 0,
			coupon_type: 0,
			time_limit: 1,
			time_days: 1,
			time_start: "2017-07-12 00:00:00",
			time_end: "2017-07-14 00:00:00",
			coupon_method: 1,
			discount: "0.00",
			deduct: "1.00",
			back_type: 0,
			back_money: "",
			back_credit: "",
			back_redpack: "",
			back_when: 0,
			thumb: "",
			desc: null,
			total: 100,
			status: 1,
			money: "0.00",
			resp_desc: "亲爱的 [nickname], 您获得了 "[couponname]" 优惠券. ",
			resp_thumb: "images/2/2017/05/jyaGwABnYWxaiWxgxBT8vGTI8abgNl.jpg",
			resp_title: "亲爱的 [nickname], 恭喜您获得了优惠券 ",
			resp_url: "",
			credit: 0,
			usecredit2: 0,
			remark: "",
			descnoset: 0,
			display_order: 0,
			supplier_uid: 0,
			getcashier: 0,
			cashiersids: null,
			cashiersnames: null,
			category_ids: null,
			categorynames: null,
			goods_names: null,
			goods_ids: null,
			storeids: null,
			storenames: null,
			getstore: 0,
			getsupplier: 0,
			supplierids: null,
			suppliernames: null,
			createtime: 0,
			created_at: "2017-07-13 11:36:12",
			updated_at: "2017-07-13 16:05:26",
			deleted_at: null,
			is_complex: 0,
			plugin_id: 0
		},
		usetype: 0,
		category_ids: null,
		category_names: null,
		goods_ids: null,
		goods_names: null,
		memberlevels: [{
				id: 1,
				uniacid: 2,
				level: 1,
				level_name: "等级一",
				order_money: "100",
				order_count: "2",
				goods_id: "1,2",
				discount: "10",
				created_at: "1970-01-01 08:32:50",
				updated_at: "1970-01-01 08:32:50",
				deleted_at: null,
				is_default: 0,
				validity: 0,
				freight_reduction: "10",
				interests_rules: null,
				description: null,
				team_performance: null
			},
			{
				id: 10,
				uniacid: 2,
				level: 2,
				level_name: "会员等级二",
				order_money: null,
				order_count: null,
				goods_id: "64",
				discount: "",
				created_at: "2018-04-17 14:48:51",
				updated_at: "2018-04-17 14:48:51",
				deleted_at: null,
				is_default: 0,
				validity: 0,
				freight_reduction: null,
				interests_rules: null,
				description: null,
				team_performance: null
			},
			{
				id: 11,
				uniacid: 2,
				level: 3,
				level_name: "会员等级三",
				order_money: "100",
				order_count: null,
				goods_id: "0",
				discount: "",
				created_at: "1970-01-01 08:32:50",
				updated_at: "1970-01-01 08:32:50",
				deleted_at: null,
				is_default: 0,
				validity: 0,
				freight_reduction: "",
				interests_rules: null,
				description: null,
				team_performance: null
			},
			{
				id: 12,
				uniacid: 2,
				level: 4,
				level_name: "会员等级四",
				order_money: "10",
				order_count: "5",
				goods_id: "0",
				discount: "",
				created_at: "2018-04-17 14:59:48",
				updated_at: "2018-11-29 15:59:56",
				deleted_at: null,
				is_default: 0,
				validity: 0,
				freight_reduction: "",
				interests_rules: null,
				description: null,
				team_performance: null
			},
			{
				id: 13,
				uniacid: 2,
				level: 5,
				level_name: "会员等级五",
				order_money: null,
				order_count: null,
				goods_id: "65",
				discount: "",
				created_at: "2018-04-17 15:07:59",
				updated_at: "2018-04-17 15:07:59",
				deleted_at: null,
				is_default: 0,
				validity: 0,
				freight_reduction: null,
				interests_rules: null,
				description: null,
				team_performance: null
			},
			{
				id: 14,
				uniacid: 2,
				level: 7,
				level_name: "分销商",
				order_money: "100",
				order_count: null,
				goods_id: "0",
				discount: "",
				created_at: "2018-11-29 10:39:31",
				updated_at: "2018-11-29 14:54:33",
				deleted_at: null,
				is_default: 0,
				validity: 0,
				freight_reduction: "",
				interests_rules: null,
				description: null,
				team_performance: null
			},
			{
				id: 15,
				uniacid: 2,
				level: 8,
				level_name: "订单金额满",
				order_money: "10",
				order_count: null,
				goods_id: "0",
				discount: "",
				created_at: "2018-11-29 17:20:24",
				updated_at: "2018-11-29 17:20:24",
				deleted_at: null,
				is_default: 0,
				validity: 0,
				freight_reduction: "",
				interests_rules: null,
				description: null,
				team_performance: null
			},
			{
				id: 16,
				uniacid: 2,
				level: 9,
				level_name: "测试添加等级",
				order_money: "",
				order_count: "",
				goods_id: "2,64,68,72,78,79",
				discount: "3",
				created_at: "2019-08-06 16:10:06",
				updated_at: "2019-08-06 16:10:06",
				deleted_at: null,
				is_default: 0,
				validity: 3,
				freight_reduction: "3",
				interests_rules: null,
				description: null,
				team_performance: null
			}
		],
		timestart: 1499788800,
		timeend: 1499961600,
		hotel_is_open: 1,
		hotels: []
	}
}

错误时返回:

 

data 返回参数说明:

参数名 类型 说明
name str 优惠卷名称
get_type int 是否可领取: 1可以 0不可以
level_limit int 领取条件 - 会员等级
get_max int 每人限领张数
use_type int 适用范围:0平台自营商品(不包含供应商商品) 1指定商品分类 2指定商品 4指定门店 7指定酒店 8兑换券
enough int 使用条件 - 订单金额
time_limit int 使用时间限制 :0 x天内有效 1 x内有效(时间段)
time_days int 天内有效(0 为不限时间使用)
time_start int 时间选择器,开始时间(格式:"2017-09-26 00:00:00")
time_end int 时间选择器,结束时间(格式:"2017-09-26 00:00:00")
coupon_method int 优惠方式: 1立减 2打折
discount int 打折值(x折)
deduct int 立减值 (x元)
total int 发放总数
status int 1开启 0 不开启
display_order str 排序
goods_names arr 商品名称数组格式
goods_ids arr 商品id数组格式
store_ids[] arr 门店id
store_names[] arr 门店名称
is_complex int 使用方式 : 0单张使用 1多张一起使用

|usetype |int |适用范围:0平台自营商品(不包含供应商商品) 1指定商品分类 2指定商品 4指定门店 7指定酒店 8兑换券| |category_ids |arr |选择分类ids| |category_names |arr |选择分类名称|

备注:

  • 更多返回错误代码请看首页的错误代码描述