API
GET /sell/buyer/product/list
参数
无
返回
{
"code": 0,
"msg": "成功",
"data": [
{
"name": "热榜",
"type": 1,
"foods": [
{
"id": "123456",
"name": "皮蛋粥",
"price": 1.2,
"description": "好吃的皮蛋粥",
"icon": "http://xxx.com",
}
]
},
{
"name": "好吃的",
"type": 2,
"foods": [
{
"id": "123457",
"name": "慕斯蛋糕",
"price": 10.9,
"description": "美味爽口",
"icon": "http://xxx.com",
}
]
}
]
}
POST /sell/buyer/order/create
参数
name: "张三"
phone: "18868822111"
address: "慕课网总部"
openid: "ew3euwhd7sjw9diwkq" //用户的微信openid
items: [{
productId: "1423113435324",
productQuantity: 2 //购买数量
}]
返回
{
"code": 0,
"msg": "成功",
"data": {
"orderId": "147283992738221"
}
}
GET /sell/buyer/order/list
参数
openid: 18eu2jwk2kse3r42e2e
page: 0 //从第0页开始
size: 10
返回
{
"code": 0,
"msg": "成功",
"data": [
{
"orderId": "161873371171128075",
"buyerName": "张三",
"buyerPhone": "18868877111",
"buyerAddress": "慕课网总部",
"buyerOpenid": "18eu2jwk2kse3r42e2e",
"orderAmount": 0,
"orderStatus": 0,
"payStatus": 0,
"createTime": 1490171219,
"updateTime": 1490171219,
"orderDetailList": null
},
{
"orderId": "161873371171128076",
"buyerName": "张三",
"buyerPhone": "18868877111",
"buyerAddress": "慕课网总部",
"buyerOpenid": "18eu2jwk2kse3r42e2e",
"orderAmount": 0,
"orderStatus": 0,
"payStatus": 0,
"createTime": 1490171219,
"updateTime": 1490171219,
"orderDetailList": null
}]
}
GET /sell/buyer/order/detail
参数
openid: 18eu2jwk2kse3r42e2e
orderId: 161899085773669363
返回
{
"code": 0,
"msg": "成功",
"data": {
"orderId": "161899085773669363",
"buyerName": "李四",
"buyerPhone": "18868877111",
"buyerAddress": "慕课网总部",
"buyerOpenid": "18eu2jwk2kse3r42e2e",
"orderAmount": 18,
"orderStatus": 0,
"payStatus": 0,
"createTime": 1490177352,
"updateTime": 1490177352,
"orderDetailList": [
{
"detailId": "161899085974995851",
"orderId": "161899085773669363",
"productId": "157875196362360019",
"productName": "招牌奶茶",
"productPrice": 9,
"productQuantity": 2,
"productIcon": "http://xxx.com",
"productImage": "http://xxx.com"
}
]
}
}
POST /sell/buyer/order/cancel
参数
openid: 18eu2jwk2kse3r42e2e
orderId: 161899085773669363
返回
{
"code": 0,
"msg": "成功",
"data": null
}
重定向到 /sell/wechat/authorize
参数
returnUrl: http://xxx.com/abc //【必填】
返回
http://xxx.com/abc?openid=oZxSYw5ldcxv6H0EU67GgSXOUrVg
DROP TABLE IF EXISTS `order_detail`;
CREATE TABLE `order_detail` (
`detail_id` VARCHAR(32) CHARACTER SET gbk NOT NULL,
`order_id` VARCHAR(32) CHARACTER SET gbk NOT NULL,
`product_id` VARCHAR(32) CHARACTER SET gbk NOT NULL,
`product_name` VARCHAR(64) CHARACTER SET gbk NOT NULL COMMENT '商品名称',
`product_price` DECIMAL(8,2) NOT NULL COMMENT '当前价格,单位分',
`product_quantity` INT(11) NOT NULL COMMENT '数量',
`product_icon` VARCHAR(512) CHARACTER SET gbk DEFAULT NULL COMMENT '小图',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`create_time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
`delete_status` INT(1) DEFAULT NULL COMMENT '类目是否删除标志:0代表已删除,1代表在用',
PRIMARY KEY (`detail_id`),
KEY `idx_order_id` (`order_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='订单详情表';
/*Data for the table `order_detail` */
INSERT INTO `order_detail`(`detail_id`,`order_id`,`product_id`,`product_name`,`product_price`,`product_quantity`,`product_icon`,`update_time`,`create_time`,`delete_status`) VALUES
('1071271558442103253','5744461558442103207','984325','老干妈炒饭+土豆丝',15.00,2,'tudousi.jpg','2019-05-22 11:51:06','2019-05-21 20:34:35',1),
('1176661558951472302','2040081558951472007','213545','手撕包菜',3.20,2,'/img/shousibaocai.jpg','2019-05-22 11:50:00','2019-05-27 18:04:06',1),
('1274301558441906770','4776591558441906680','542678','小炒肉',12.00,2,'/img/xiaochaorou.jpg','2019-05-22 11:49:17','2019-05-21 20:31:19',1),
('1513841557990869846','7181541557990869534','542678','小炒肉',12.00,2,'/img/xiaochaorou.jpg','2019-05-22 11:49:19','2019-05-16 15:14:00',1),
('2003311558442124569','3536451558442124476','984325','老干妈炒饭+土豆丝',15.00,1,'/img/tudousi.jpg','2019-05-22 11:51:55','2019-05-21 20:34:57',1),
('2260801558441976585','8584161558441976378','586794','扬州炒饭',12.50,1,'/img/yangzhouchaofan.jpg','2019-05-22 11:49:24','2019-05-21 20:32:29',1),
('2344211558442124711','3536451558442124476','213545','手撕包菜',3.20,4,'/img/shousibaocai.jpg','2019-05-22 11:49:27','2019-05-21 20:34:57',1),
('2639101558442117830','9529071558442117642','213545','手撕包菜',3.20,4,'/img/shousibaocai.jpg','2019-05-22 11:49:30','2019-05-21 20:34:50',1),
('2650351558002959094','5460551558002959032','984325','老干妈炒饭+土豆丝',15.00,2,'/img/tudousi.jpg','2019-05-22 11:51:58','2019-05-16 18:35:29',1),
('2878361558441871737','5558111558441871530','586794','扬州炒饭',12.50,2,'/img/yangzhouchaofan.jpg','2019-05-22 11:49:35','2019-05-21 20:30:44',1),
('3576091558441906938','4776591558441906680','984325','老干妈炒饭+土豆丝',15.00,3,'/img/tudousi.jpg','2019-05-22 11:52:00','2019-05-21 20:31:19',1),
('3805541558442262869','2080371558442262820','984325','老干妈炒饭+土豆丝',15.00,2,'/img/tudousi.jpg','2019-05-22 11:52:04','2019-05-21 20:37:15',1),
('3892031558441950063','5607961558441950018','542678','小炒肉',12.00,2,'/img/xiaochaorou.jpg','2019-05-22 11:47:44','2019-05-21 20:32:02',1),
('4153421558442092180','9712741558442092137','541235','油焖茄子',5.50,1,'/img/youmenqiezi.jpg','2019-05-22 11:47:54','2019-05-21 20:34:24',1),
('4376221558002959444','5460551558002959032','542678','小炒肉',12.00,1,'/img/xiaochaorou.jpg','2019-05-22 11:48:00','2019-05-16 18:35:30',1),
('4471981558441872042','5558111558441871530','541235','油焖茄子',5.50,1,'/img/youmenqiezi.jpg','2019-05-22 11:48:02','2019-05-21 20:30:44',1),
('4509581557990015392','9769011557990015106','542678','小炒肉',12.00,3,'/img/xiaochaorou.jpg','2019-05-22 11:48:06','2019-05-16 14:59:46',1),
('5060561558442092329','9712741558442092137','586794','扬州炒饭',12.50,1,'/img/yangzhouchaofan.jpg','2019-05-22 11:48:09','2019-05-21 20:34:24',1),
('5094091558442103396','5744461558442103207','586794','扬州炒饭',12.50,1,'/img/yangzhouchaofan.jpg','2019-05-22 11:48:12','2019-05-21 20:34:35',1),
('5554741558442117689','9529071558442117642','984325','老干妈炒饭+土豆丝',15.00,2,'/img/tudousi.jpg','2019-05-22 11:52:07','2019-05-21 20:34:50',1),
('5701571558951472074','2040081558951472007','984325','老干妈炒饭+土豆丝',15.00,2,'/img/tudousi.jpg','2019-05-22 11:50:13','2019-05-27 18:04:06',1),
('6298051558442263011','2080371558442262820','213545','手撕包菜',3.20,3,'/img/shousibaocai.jpg','2019-05-22 11:48:17','2019-05-21 20:37:15',1),
('6907771558442254535','7275191558442254488','984325','老干妈炒饭+土豆丝',15.00,1,'/img/tudousi.jpg','2019-05-22 11:52:10','2019-05-21 20:37:07',1),
('7111461558442267941','5535771558442267757','213545','手撕包菜',3.20,2,'/img/shousibaocai.jpg','2019-05-22 11:48:23','2019-05-21 20:37:20',1),
('7193701558442258978','5390911558442258789','213545','手撕包菜',3.20,3,'/img/shousibaocai.jpg','2019-05-22 11:48:27','2019-05-21 20:37:11',1),
('7324721558441950206','5607961558441950018','984325','老干妈炒饭+土豆丝',15.00,3,'/img/tudousi.jpg','2019-05-22 11:52:16','2019-05-21 20:32:02',1),
('7540821558442267802','5535771558442267757','984325','老干妈炒饭+土豆丝',15.00,2,'/img/tudousi.jpg','2019-05-22 11:52:20','2019-05-21 20:37:20',1),
('7619921557990015232','9769011557990015106','213545','手撕包菜',3.20,2,'/img/shousibaocai.jpg','2019-05-22 11:48:37','2019-05-16 14:59:46',1),
('7658381558442258833','5390911558442258789','984325','老干妈炒饭+土豆丝',15.00,1,'/img/tudousi.jpg','2019-05-22 11:52:25','2019-05-21 20:37:11',1),
('7749601558442254673','7275191558442254488','213545','手撕包菜',3.20,4,'/img/shousibaocai.jpg','2019-05-22 11:48:43','2019-05-21 20:37:07',1),
('8422541558442004559','2428081558442004371','586794','扬州炒饭',12.50,1,'/img/yangzhouchaofan.jpg','2019-05-22 11:48:47','2019-05-21 20:32:57',1),
('9115851557990869683','7181541557990869534','213545','手撕包菜',3.20,1,'/img/shousibaocai.jpg','2019-05-22 11:48:49','2019-05-16 15:14:00',1),
('9393911558442004417','2428081558442004371','541235','油焖茄子',5.50,1,'/img/youmenqiezi.jpg','2019-05-22 11:48:51','2019-05-21 20:32:56',1),
('9817611558441976422','8584161558441976378','542678','小炒肉',12.00,2,'/img/xiaochaorou.jpg','2019-05-22 11:48:52','2019-05-21 20:32:28',1);
DROP TABLE IF EXISTS `order_master`;
CREATE TABLE `order_master` (
`order_id` VARCHAR(32) CHARACTER SET gbk NOT NULL,
`buyer_name` VARCHAR(32) CHARACTER SET gbk NOT NULL COMMENT '买家名字',
`buyer_phone` VARCHAR(32) CHARACTER SET gbk NOT NULL COMMENT '买家电话',
`buyer_address` VARCHAR(128) CHARACTER SET gbk NOT NULL COMMENT '买家地址',
`buyer_openid` VARCHAR(64) CHARACTER SET gbk NOT NULL COMMENT '买家微信openid',
`order_amount` DECIMAL(8,2) NOT NULL COMMENT '订单总金额',
`order_status` INT(3) NOT NULL DEFAULT '0' COMMENT '订单状态, 默认为新下单',
`pay_status` INT(3) NOT NULL DEFAULT '0' COMMENT '支付状态, 默认未支付',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`create_time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
`delete_status` INT(1) DEFAULT NULL COMMENT '类目是否删除标志:0代表已删除,1代表在用',
PRIMARY KEY (`order_id`),
KEY `idx_buyer_openid` (`buyer_openid`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='订单主表';
INSERT INTO `order_master`(`order_id`,`buyer_name`,`buyer_phone`,`buyer_address`,`buyer_openid`,`order_amount`,`order_status`,`pay_status`,`update_time`,`create_time`,`delete_status`) VALUES
('2040081558951472007','吕小布','154352654523','beijing','fdasfw325',36.40,0,1,'2019-05-27 18:04:06','2019-05-27 18:04:06',1),
('2080371558442262820','吕小布','154352654523','beijing','fdasfw325',39.60,1,1,'2019-05-21 20:37:15','2019-05-21 20:37:15',1),
('2428081558442004371','mark','13676879001','new york','4312542fsdfw',18.00,2,1,'2019-05-21 20:32:57','2019-05-21 20:32:57',1),
('3536451558442124476','张益达','1654674789','beijing','reqwrwqt65426',27.80,2,1,'2019-05-21 20:34:57','2019-05-21 20:34:57',1),
('4776591558441906680','李四','1235345468','深圳南沙','rewqty4325g',69.00,2,1,'2019-05-21 20:31:19','2019-05-21 20:31:19',1),
('5390911558442258789','吕小布','154352654523','beijing','fdasfw325',24.60,1,1,'2019-05-21 20:37:11','2019-05-21 20:37:11',1),
('5460551558002959032','张三','18868822111','慕课网总部','ew3euwhd7sjw9diwkq',42.00,1,1,'2019-05-16 18:35:30','2019-05-16 18:35:30',1),
('5535771558442267757','吕小布','154352654523','beijing','fdasfw325',36.40,1,1,'2019-05-21 20:37:20','2019-05-21 20:37:20',1),
('5558111558441871530','李四','1235345468','深圳南沙','rewqty4325g',30.50,2,1,'2019-05-21 20:30:44','2019-05-21 20:30:44',1),
('5607961558441950018','mark','13676879001','new york','4312542fsdfw',69.00,0,1,'2019-05-21 20:32:02','2019-05-21 20:32:02',1),
('5744461558442103207','张益达','1654674789','beijing','reqwrwqt65426',42.50,1,1,'2019-05-21 20:34:35','2019-05-21 20:34:35',1),
('7181541557990869534','张三','18868822111','慕课网总部','ew3euwhd7sjw9diwkq',27.20,1,1,'2019-05-16 15:14:00','2019-05-16 15:14:00',1),
('7275191558442254488','吕小布','154352654523','beijing','fdasfw325',27.80,0,1,'2019-05-21 20:37:07','2019-05-21 20:37:07',1),
('8584161558441976378','mark','13676879001','new york','4312542fsdfw',36.50,0,1,'2019-05-21 20:32:29','2019-05-21 20:32:29',1),
('9529071558442117642','张益达','1654674789','beijing','reqwrwqt65426',42.80,0,1,'2019-05-21 20:34:50','2019-05-21 20:34:50',1),
('9712741558442092137','张益达','1654674789','beijing','reqwrwqt65426',18.00,0,1,'2019-05-21 20:34:24','2019-05-21 20:34:24',1),
('9769011557990015106','张三','18868822111','慕课网总部','ew3euwhd7sjw9diwkq',42.40,0,1,'2019-05-16 19:40:45','2019-05-16 14:59:46',1);
DROP TABLE IF EXISTS `product_category`;
CREATE TABLE `product_category` (
`category_id` INT(11) NOT NULL AUTO_INCREMENT,
`category_name` VARCHAR(32) CHARACTER SET gbk NOT NULL COMMENT '类目名字',
`category_type` INT(2) NOT NULL COMMENT '类目类型',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`creat_time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
`delete_status` INT(1) DEFAULT NULL COMMENT '类目是否删除标志:0代表已删除,1代表在用',
PRIMARY KEY (`category_id`),
UNIQUE KEY `category_type` (`category_type`)
) ENGINE=INNODB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='商品类目表';
INSERT INTO `product_category`(`category_id`,`category_name`,`category_type`,`update_time`,`creat_time`,`delete_status`) VALUES
(1,'蔬菜类',2,'2019-05-23 12:50:38','2019-05-13 13:36:32',1),
(2,'炒饭类',4,'2019-05-23 12:50:39','2019-05-13 18:54:13',1),
(3,'肉类',3,'2019-05-23 12:50:40','2019-05-13 18:56:00',1),
(4,'热销榜',5,'2019-05-23 12:50:41','2019-05-14 16:28:39',1),
(6,'生鲜',1,'2019-05-23 15:58:52','2019-05-23 15:58:52',0),
(7,'零食',7,'2019-05-23 19:05:22','2019-05-23 19:05:22',1);
DROP TABLE IF EXISTS `product_info`;
CREATE TABLE `product_info` (
`product_id` VARCHAR(32) CHARACTER SET gbk NOT NULL COMMENT '商品ID',
`product_name` VARCHAR(64) CHARACTER SET gbk NOT NULL COMMENT '商品名字',
`product_price` DECIMAL(10,2) NOT NULL COMMENT '商品单价',
`product_stock` INT(11) NOT NULL COMMENT '商品数量',
`product_statu` INT(11) NOT NULL COMMENT '商品状态:1代表正常,0代表下架',
`product_description` VARCHAR(64) CHARACTER SET gbk NOT NULL COMMENT '商品描述',
`product_icon` VARCHAR(512) CHARACTER SET gbk NOT NULL COMMENT '商品log',
`category_type` INT(2) NOT NULL COMMENT '类目类型',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`creat_time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
`delete_status` INT(1) DEFAULT NULL COMMENT '类目是否删除标志:0代表已删除,1代表在用',
PRIMARY KEY (`product_id`,`creat_time`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='商品信息表';
INSERT INTO `product_info`(`product_id`,`product_name`,`product_price`,`product_stock`,`product_statu`,`product_description`,`product_icon`,`category_type`,`update_time`,`creat_time`,`delete_status`) VALUES
('213545','手撕包菜',3.20,181,1,'蔬菜','/img/shousibaocai.jpg',2,'2019-05-22 11:50:00','2019-05-14 16:43:18',1),
('541235','油焖茄子',5.50,149,1,'蔬菜','/img/youmenqiezi.jpg',2,'2019-05-22 11:50:03','2019-05-14 16:44:59',1),
('542678','小炒肉',12.00,199,1,'肉类','/img/xiaochaorou.jpg',3,'2019-05-22 11:50:04','2019-05-14 16:48:54',1),
('586794','扬州炒饭',12.50,97,1,'炒饭类','/img/yangzhouchaofan.jpg',4,'2019-05-22 11:50:07','2019-05-14 16:49:50',1),
('6423291558580209416','烧鸭',16.00,200,1,'北京烧鸭,地道','/img/shaoya.jpg',3,'2019-05-23 10:56:25','2019-05-23 10:56:25',1),
('894327','老干妈炒饭+中杯可乐',18.00,150,1,'热卖套餐','/img/laoganmachaofan.jpg',5,'2019-05-22 11:50:09','2019-05-14 16:52:41',1),
('9078981558580310465','烤鸭',16.00,200,1,'北京烧鸭,地道','/img/shaoya.jpg',3,'2019-05-23 10:58:04','2019-05-23 10:58:04',1),
('984325','老干妈炒饭+土豆丝',15.00,133,1,'热卖套餐','/img/tudousi.jpg',5,'2019-05-22 11:50:13','2019-05-14 16:52:02',1);
DROP TABLE IF EXISTS `seller_info`;
CREATE TABLE `seller_info` (
`id` VARCHAR(32) CHARACTER SET gbk NOT NULL,
`username` VARCHAR(32) CHARACTER SET gbk NOT NULL,
`password` VARCHAR(32) CHARACTER SET gbk NOT NULL,
`openid` VARCHAR(64) CHARACTER SET gbk NOT NULL COMMENT '微信openid',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`create_time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
`delete_status` INT(1) DEFAULT NULL COMMENT '类目是否删除标志:0代表已删除,1代表在用',
PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='卖家信息表';
INSERT INTO `seller_info`(`id`,`username`,`password`,`openid`,`update_time`,`create_time`,`delete_status`) VALUES
('432155','mark','123456','abc','2019-05-26 15:39:53','2019-05-26 15:39:31',1),
('542367','jack','234556','owD2P1XCwKnKbTxh_Nv5dtem2owk','2019-05-26 21:17:10','2019-05-26 21:11:59',1);
snsapi_base作用域授权,用户无任何感知直接通过授权,只能获取用户的账号
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd9ab1a7c38812400&
redirect_uri=http://foxm.natapp1.cc/weixin/test
&response_type=code
&scope=snsapi_base
&state=123#wechat_redirect
snsapi_userinfo作用域方式授权,需要用户点击确认登录,而且会获取用户的姓名、年龄、性别等信息
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd9ab1a7c38812400
&redirect_uri=http://foxm.natapp1.cc/weixin/test
&response_type=code
&scope=snsapi_userinfo
&state=123#wechat_redirect
{
"access_token":"21_yxxCdYlOGGwornfWwLRTv_CvNebB3PoEpBzC0Z0Od-Wcfy69JDxu18D1GPomXdb2MENQ1tPWMIM4qsRaNyvaKjFqq55q_3N0mGRXOrpH-7Q",
"expires_in":7200,
"refresh_token":"21_UG8MOapmcafML_Ojm1dB_EiGKLbv3ZDgS4PgSePbKEjw6FWyGAcS9NM_eMy3UFSeUqdhJ4iw1Ds0r9yLXxZsvkOL-OHo2dfgGL3bPsQXyCU",
"openid":"owD2P1XCwKnKbTxh_Nv5dtem2owk",
"scope":"snsapi_userinfo"
}
{
"openid":" OPENID",
" nickname": NICKNAME,
"sex":"1",
"province":"PROVINCE"
"city":"CITY",
"country":"COUNTRY",
"headimgurl": "http://thirdwx.qlogo.cn/mmopen/g3MonUZtNHkdmzicIlibx6iaFqAc56vxLSUfpb6n5WKSYVY0ChQKkiaJSgQ1dZuTOgvLLrhJbERQQ4eMsv84eavHiaiceqxibJxCfHe/46",
"privilege":[ "PRIVILEGE1" "PRIVILEGE2" ],
"unionid": "o6_bmasdasdsad6_2sgVt7hMZOPfL"
}
http:GET(请使用https协议) https://api.weixin.qq.com/sns/auth?access_token=ACCESS_TOKEN&openid=OPENID
微信网页授权官方文档
微信授权参考博客:接入微信公众号包含(测试)整体流程
公众平台:公众号、订阅号(个人可用,没有支付功能)、小程序(个人版小程序没有支付功能)
开放平台:面向开发者和企业,主要用于第三方软件的微信授权登录,个人可以注册但是没有一些权限接口,比如微信扫码登录
授权:公众平台的授权与开放平台的授权不同,授权面向的对象不一样,一个是公众平台,一个是第三方公司,授权获取的openid不同