公共接口(Common)
应用初始化数据配置[init]【免登录】
初始化应用配置数据
请求URL
http://www.yoursite.com/addons/shop/api.common/init
请求方法
GET
返回值
{
"code": 1,
"msg": "",
"time": "1623981505",
"data": {
"upload": {
"uploadurl": "http://www.fa.com/api/common/upload",
"cdnurl": "http://www.fa.com",
"savekey": "/uploads/{year}{mon}{day}/{filemd5}{.suffix}",
"maxsize": "10mb",
"mimetype": "jpg,png,bmp,jpeg,gif,zip,rar,xls,xlsx,wav,mp4,mp3,pdf",
"multiple": false,
"chunking": false,
"chunksize": 2097152,
"bucket": "local",
"multipart": [],
"storage": "local"
},
"__token__": "a7723dca908f7cd5314e0a74fab55cd3",
"swiper": [
{
"image": "http://www.fa.com/assets/addons/shop/img/swiper1.jpg",
"title": "旅游度假好去处",
"path": "/pages/my/my"
},
{
"image": "http://www.fa.com/assets/addons/shop/img/swiper2.jpg",
"title": "欢迎您的光临!",
"path": "/pages/my/my"
}
],
"order_timeout": "3600",
"notice": [
{
"title": "这是一条公告信息",
"path": "/pages/my/my"
}
],
"category_mode": "1",
"agreement": "注册协议",
"defaultpaytype": "wechat",
"navigate": [
{
"id": 1,
"name": "分类",
"size": 60,
"image": "grid",
"path": "/pages/category/list",
"switch": 1,
"weigh": 13,
"createtime": 1609402165,
"updatetime": 1623307929
},
{
"id": 2,
"name": "商品列表",
"size": 60,
"image": "list",
"path": "/pages/goods/goods",
"switch": 1,
"weigh": 2,
"createtime": 1609402235,
"updatetime": 1623307934
},
{
"id": 3,
"name": "我的收藏",
"size": 60,
"image": "heart",
"path": "/pages/my/collect",
"switch": 1,
"weigh": 2,
"createtime": 1609402235,
"updatetime": 1623307624
},
{
"id": 4,
"name": "购物车",
"size": 60,
"image": "shopping-cart",
"path": "/pages/cart/cart",
"switch": 1,
"weigh": 2,
"createtime": 1609402235,
"updatetime": 1623307669
},
{
"id": 5,
"name": "地址管理",
"size": 60,
"image": "map",
"path": "/pages/address/address",
"switch": 1,
"weigh": 2,
"createtime": 1609402235,
"updatetime": 1623307718
},
{
"id": 6,
"name": "订单列表",
"size": 60,
"image": "order",
"path": "/pages/order/list",
"switch": 1,
"weigh": 2,
"createtime": 1609402235,
"updatetime": 1623307804
},
{
"id": 7,
"name": "外部链接",
"size": 60,
"image": "attach",
"path": "https://www.baidu.com",
"switch": 1,
"weigh": 2,
"createtime": 1609402235,
"updatetime": 1623307843
},
{
"id": 8,
"name": "签到排行榜",
"size": 60,
"image": "integral",
"path": "/pages/signin/ranking",
"switch": 1,
"weigh": 2,
"createtime": 1609402235,
"updatetime": 1623307914
},
{
"id": 9,
"name": "测试",
"size": 60,
"image": "http://www.fa.com/assets/img/qrcode.png",
"path": "/pages/signin/signin",
"switch": 1,
"weigh": 1,
"createtime": 1623308082,
"updatetime": 1623308251
}
],
"navbar": {
"titleColor": "#fff",
"bgColor": {
"background": "#374486"
},
"backIconColor": "#fff",
"backTextStyle": {
"color": "#fff"
},
"titleSize": "35",
"isshow": true
},
"theme": {
"color": "#ffffff",
"bgColor": "#374486",
"ladder": 10,
"number": 9,
"border": 5
},
"tabbar": {
"color": "#999",
"selectColor": "#000",
"bgColor": "#ffffff",
"height": "100",
"borderTop": true,
"iconSize": "40",
"midButton": false,
"midButtonSize": "60",
"list": [
{
"image": "http://www.fa.com/assets/addons/shop/img/tabbar/home.png",
"selectedImage": "http://www.fa.com/assets/addons/shop/img/tabbar/home-hl.png",
"text": "首页",
"path": "/pages/index/index",
"midButton": false,
"count": 0,
"isDot": false,
"badgeColor": "#ffffff",
"badgeBgColor": "#374486"
},
{
"image": "http://www.fa.com/assets/addons/shop/img/tabbar/my.png",
"selectedImage": "http://www.fa.com/assets/addons/shop/img/tabbar/my-hl.png",
"text": "我的",
"path": "/pages/my/my",
"midButton": false,
"count": 0,
"isDot": false,
"badgeColor": "#ffffff",
"badgeBgColor": "#374486"
}
],
"isshow": true
}
}
}获取省市区数据[area]【免登录】
发送短信验证码
请求URL
http://www.yoursite.com/addons/shop/api.common/area
请求方法
GET
请求参数
| Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
|---|---|---|---|---|
| province | int | 是 | 省id | 1 |
| city | int | 是 | 市id | 2 |
返回值
{
"code": 1,
"msg": "",
"time": "1623981709",
"data": [
{
"value": 352,
"label": "呼和浩特市"
},
{
"value": 362,
"label": "包头市"
},
{
"value": 372,
"label": "乌海市"
},
{
"value": 376,
"label": "赤峰市"
},
{
"value": 389,
"label": "通辽市"
},
{
"value": 398,
"label": "鄂尔多斯市"
},
{
"value": 407,
"label": "呼伦贝尔市"
},
{
"value": 422,
"label": "巴彦淖尔市"
},
{
"value": 430,
"label": "乌兰察布市"
},
{
"value": 442,
"label": "兴安盟"
},
{
"value": 449,
"label": "锡林郭勒盟"
},
{
"value": 462,
"label": "阿拉善盟"
}
]
}
文档最后更新时间:2023-07-31 08:12:08
著作权归应用插件开发者所有,未经许可,禁止转载、复制此文档的任何内容。
未解决你的问题?请到问答社区「简单商城专区」反馈你遇到的问题