| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 | 
							- <?php
 
- # 小程序基本配置
 
- $config['type'] = 7;
 
- $config['token'] = array
 
- (
 
- 	'name' => '获取有赞的token',
 
- 	'method' => 'post',
 
- 	'json' => true,
 
- 	'url' => 'https://open.youzan.com/oauth/token?',
 
- 	'param' => array
 
- 	(
 
- 		'client_id' => 'appid',
 
- 		'client_secret' => 'secret',
 
- 		'grant_type' => 'silent',
 
- 		'kdt_id' => 'key',
 
- 	),
 
- 	//针对一些返回的名称,做转换
 
- 	'response' => array
 
- 	(
 
- 		'access_token' => 'token',
 
- 		'expires_in' => 'expires_in',
 
- 	),
 
- );
 
- $config['reg'] = array
 
- (
 
- 	'name' => '注册客户',
 
- 	'method' => 'post',
 
- 	'json' => false,
 
- 	'url' => 'https://open.youzan.com/api/oauthentry/youzan.scrm.customer/3.0.0/create?',
 
- 	'param' => array
 
- 	(
 
- 		'access_token' => 'token',
 
- 		'customer_create' => 'customer_create',
 
- 		'mobile' => 'mobile',
 
- 	),
 
- 	//针对一些返回的名称,做转换
 
- 	'response' => array
 
- 	(
 
- 		
 
- 	),
 
- );
 
- $config['card'] = array
 
- (
 
- 	'name' => '发放优惠券',
 
- 	'method' => 'post',
 
- 	'json' => false,
 
- 	'url' => 'https://open.youzan.com/api/oauthentry/youzan.ump.coupon/3.0.0/take?',
 
- 	'param' => array
 
- 	(
 
- 		'access_token' => 'token',
 
- 		'coupon_group_id' => 'coupon_group_id',
 
- 		'mobile' => 'mobile',
 
- 		'weixin_openid' => 'weixin_openid',
 
- 	),
 
- 	//针对一些返回的名称,做转换
 
- 	'response' => array
 
- 	(
 
- 		
 
- 	),
 
- );
 
- $config['card_create'] = array
 
- (
 
- 	'name' => '生成优惠券',
 
- 	'method' => 'post',
 
- 	'json' => false,
 
- 	'url' => 'https://open.youzan.com/api/oauthentry/youzan.ump.promocard/3.0.0/add?',
 
- 	'param' => array
 
- 	(
 
- 		'access_token' => 'token',
 
- 		'at_least' => 'at_least',
 
- 		'can_give_friend' => 'can_give_friend',
 
- 		'date_type' => 'date_type',
 
- 		'description' => 'description',
 
- 		'discount' => 'discount',
 
- 		'end_at' => 'end_at',
 
- 		'expire_notice' => 'expire_notice',
 
- 		'fixed_begin_term' => 'fixed_begin_term',
 
- 		'fixed_term' => 'fixed_term',
 
- 		'is_at_least' => 'is_at_least',
 
- 		'is_forbid_preference' => 'is_forbid_preference',
 
- 		'is_random' => 'is_random',
 
- 		'is_share' => 'is_share',
 
- 		'is_sync_weixin' => 'is_sync_weixin',
 
- 		'mark_tag_ids' => 'mark_tag_ids',
 
- 		'need_user_level' => 'need_user_level',
 
- 		'preferential_type' => 'preferential_type',
 
- 		'quota' => 'quota',
 
- 		'range_type' => 'range_type',
 
- 		'service_phone' => 'service_phone',
 
- 		'specify_item_ids' => 'specify_item_ids',
 
- 		'start_at' => 'start_at',
 
- 		'title' => 'title',
 
- 		'total' => 'total',
 
- 		'value' => 'value',
 
- 		'value_random_to' => 'value_random_to',
 
- 		'weixin_color' => 'weixin_color',
 
- 		'weixin_color_rgb' => 'weixin_color_rgb',
 
- 		'weixin_sub_title' => 'weixin_sub_title',
 
- 		'weixin_title' => 'weixin_title',
 
- 	),
 
- 	//针对一些返回的名称,做转换
 
- 	'response' => array
 
- 	(
 
- 		
 
- 	),
 
- );
 
- return $config;
 
 
  |