简要描述:

  • 用户登录接口

请求域名:

  • http://xx.com

请求URL:

GET/route=coupon.coupon.index(视图)
POST/route=coupon.coupon.coupon-data(获取数据)

传参数说明:

参数名 类型 说明
keyword str 优惠券名称
gettype int 领取中心是否显示 :0不显示 1显示
timesearchswtich str 时间搜索 :0 不搜索时间区间 1 搜索时间区间
time[start] int 开始时间
time[end] int 结束时间
page int 分页

备注:

返回示例:

正确时返回:

{
	result: 1,
	msg: "ok",
	data: {
		list: {
			total: 6,
			per_page: 10,
			current_page: 1,
			last_page: 1,
			next_page_url: null,
			prev_page_url: null,
			from: 1,
			to: 6,
			data: [{
					id: 6,
					uniacid: 2,
					cat_id: 0,
					name: "关闭后,用户无法领取, 但是已经被领取的可以继续使用关闭后,用户无法领取, 但是已经被领取的可以继续使用关闭后,用户无法领取, 但是已经被领取的可以继续使用",
					get_type: 1,
					level_limit: -1,
					get_max: 2,
					use_type: 2,
					return_type: 0,
					bgcolor: "",
					enough: 50,
					coupon_type: 0,
					time_limit: 0,
					time_days: 3,
					time_start: "2017-09-26 00:00:00",
					time_end: "2017-10-03 00:00:00",
					coupon_method: 1,
					discount: "0.00",
					deduct: "20.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], 您获得了 1 张 "[couponname]" 优惠券. ",
					resp_thumb: "images/2/2017/08/zZzf0V1SHDf39z9qBZTus91tGr22Hg.png",
					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: [
						"区域分红测试"
					],
					goods_ids: [
						"63"
					],
					storeids: null,
					storenames: null,
					getstore: 0,
					getsupplier: 0,
					supplierids: null,
					suppliernames: null,
					createtime: 0,
					created_at: "2017-09-26 15:37:38",
					updated_at: "2017-12-19 14:04:39",
					deleted_at: null,
					is_complex: 0,
					plugin_id: 0,
					gettotal: 45,
					usetotal: 3,
					lasttotal: 55
				},
				{
					id: 5,
					uniacid: 2,
					cat_id: 0,
					name: "优惠券测试",
					get_type: 1,
					level_limit: -1,
					get_max: -1,
					use_type: 0,
					return_type: 0,
					bgcolor: "",
					enough: 100,
					coupon_type: 0,
					time_limit: 0,
					time_days: 1,
					time_start: "2017-09-26 00:00:00",
					time_end: "2017-10-03 00:00:00",
					coupon_method: 1,
					discount: "0.00",
					deduct: "10.00",
					back_type: 0,
					back_money: "",
					back_credit: "",
					back_redpack: "",
					back_when: 0,
					thumb: "",
					desc: null,
					total: -1,
					status: 1,
					money: "0.00",
					resp_desc: "",
					resp_thumb: "",
					resp_title: "",
					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: [
						"爱心值测试"
					],
					goods_ids: [
						"64"
					],
					storeids: null,
					storenames: null,
					getstore: 0,
					getsupplier: 0,
					supplierids: null,
					suppliernames: null,
					createtime: 0,
					created_at: "2017-09-26 13:56:52",
					updated_at: "2017-09-26 15:14:15",
					deleted_at: null,
					is_complex: 0,
					plugin_id: 0,
					gettotal: 28,
					usetotal: 14,
					lasttotal: 0
				},
				{
					id: 2,
					uniacid: 2,
					cat_id: 0,
					name: "指定分类",
					get_type: 1,
					level_limit: -1,
					get_max: 1,
					use_type: 2,
					return_type: 0,
					bgcolor: "",
					enough: 0,
					coupon_type: 0,
					time_limit: 0,
					time_days: 1,
					time_start: "2017-07-13 00:00:00",
					time_end: "2017-07-20 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: "",
					resp_thumb: "",
					resp_title: "",
					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 16:07:16",
					updated_at: "2017-09-20 10:56:39",
					deleted_at: null,
					is_complex: 0,
					plugin_id: 0,
					gettotal: 3,
					usetotal: 0,
					lasttotal: 97
				},
				{
					id: 4,
					uniacid: 2,
					cat_id: 0,
					name: "12",
					get_type: 1,
					level_limit: -1,
					get_max: 11,
					use_type: 0,
					return_type: 0,
					bgcolor: "",
					enough: 0,
					coupon_type: 0,
					time_limit: 0,
					time_days: 10,
					time_start: "2017-08-16 00:00:00",
					time_end: "2017-08-23 00:00:00",
					coupon_method: 1,
					discount: "0.00",
					deduct: "10.00",
					back_type: 0,
					back_money: "",
					back_credit: "",
					back_redpack: "",
					back_when: 0,
					thumb: "",
					desc: null,
					total: 0,
					status: 1,
					money: "0.00",
					resp_desc: "",
					resp_thumb: "",
					resp_title: "",
					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-08-16 15:49:45",
					updated_at: "2017-08-16 15:49:45",
					deleted_at: null,
					is_complex: 0,
					plugin_id: 0,
					gettotal: 1,
					usetotal: 0,
					lasttotal: 0
				},
				{
					id: 3,
					uniacid: 2,
					cat_id: 0,
					name: "满100减10",
					get_type: 1,
					level_limit: -1,
					get_max: -1,
					use_type: 0,
					return_type: 0,
					bgcolor: "",
					enough: 100,
					coupon_type: 0,
					time_limit: 0,
					time_days: 1,
					time_start: "2017-07-14 00:00:00",
					time_end: "2017-07-21 00:00:00",
					coupon_method: 1,
					discount: "0.00",
					deduct: "10.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: "",
					resp_thumb: "",
					resp_title: "",
					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-14 14:21:18",
					updated_at: "2017-07-17 19:09:21",
					deleted_at: null,
					is_complex: 0,
					plugin_id: 0,
					gettotal: 39,
					usetotal: 7,
					lasttotal: 61
				},
				{
					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,
					gettotal: 2,
					usetotal: 0,
					lasttotal: 98
				}
			]
		},
		total: 6
	}
}

错误时返回:

 

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多张一起使用

备注:

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