@ -0,0 +1 @@ |
||||
dMgKR1mGvqBF38b1V0kUdgk5-VjQyTMD4e_6JYQ3H1s.B-eLfFcpH6T_cSzsbSDqDTq90Mwc_qgMrE4Wfb97J1c |
@ -0,0 +1,7 @@ |
||||
<html> |
||||
<head><title>404 Not Found</title></head> |
||||
<body> |
||||
<center><h1>404 Not Found</h1></center> |
||||
<hr><center>nginx</center> |
||||
</body> |
||||
</html> |
After Width: | Height: | Size: 362 KiB |
@ -0,0 +1,121 @@ |
||||
<?php |
||||
// +---------------------------------------------------------------------- |
||||
// | 商户功能模块默认配置 |
||||
// | name:功能模块名称 required:必填项(用于父级) enable:是否启动 children:子级 |
||||
// +---------------------------------------------------------------------- |
||||
|
||||
return [ |
||||
'store' => [ |
||||
'name' => '店铺管理', |
||||
'required' => true, |
||||
'children' => [ |
||||
// 'shop' => ['name' => '门店管理', 'enable' => true], // 未实现 |
||||
'page' => [ |
||||
'name' => '店铺页面', |
||||
'required' => true, |
||||
'children' => [ |
||||
'category' => ['name' => '分类模板', 'enable' => true] |
||||
] |
||||
], |
||||
'style' => [ |
||||
'name' => '店铺风格', |
||||
'required' => true, |
||||
'children' => [ |
||||
'theme' => ['name' => '主题风格', 'enable' => true] |
||||
] |
||||
], |
||||
] |
||||
], |
||||
'merchant' => [ |
||||
'name' => '商户管理', |
||||
'required' => true, |
||||
'children' => [ |
||||
'merchant' => ['name' => '商户管理', 'enable' => true], |
||||
'manage' => ['name' => '商户列表', 'enable' => true], |
||||
] |
||||
], |
||||
'goods' => [ |
||||
'name' => '商品管理', |
||||
'required' => true, |
||||
'children' => [ |
||||
'copy' => ['name' => '商品复制', 'enable' => true], |
||||
'import' => ['name' => '商品导入', 'enable' => true], |
||||
] |
||||
], |
||||
'order' => [ |
||||
'name' => '订单管理', |
||||
'required' => true, |
||||
'children' => [ |
||||
'updatePrice' => ['name' => '订单改价', 'enable' => true], |
||||
'printer' => ['name' => '小票打印', 'enable' => true], |
||||
'export' => ['name' => '订单导出', 'enable' => true], |
||||
'eorder' => ['name' => '电子面单', 'enable' => true], |
||||
] |
||||
], |
||||
'user' => [ |
||||
'name' => '会员管理', |
||||
'required' => true, |
||||
'children' => [ |
||||
'grade' => ['name' => '会员等级', 'enable' => true], |
||||
'balance' => ['name' => '余额记录', 'enable' => true], |
||||
] |
||||
], |
||||
'content' => [ |
||||
'name' => '内容管理', |
||||
'required' => true, |
||||
'children' => [ |
||||
'article' => ['name' => '文章管理', 'enable' => true], |
||||
'help' => ['name' => '帮助中心', 'enable' => true], |
||||
] |
||||
], |
||||
'market' => [ |
||||
'name' => '营销管理', |
||||
'required' => true, |
||||
'children' => [ |
||||
'coupon' => ['name' => '优惠券', 'enable' => true], |
||||
'recharge' => ['name' => '会员充值', 'enable' => true], |
||||
'points' => ['name' => '积分管理', 'enable' => true], // 1 |
||||
'recommended' => ['name' => '商品推荐', 'enable' => true], |
||||
'fullFree' => ['name' => '满额包邮', 'enable' => true], |
||||
] |
||||
], |
||||
'statistics' => [ |
||||
'name' => '数据统计', |
||||
'required' => true, |
||||
'children' => [ |
||||
'statistics' => ['name' => '数据概况', 'enable' => true], |
||||
] |
||||
], |
||||
'client' => [ |
||||
'name' => '客户端', |
||||
'required' => true, |
||||
'children' => [ |
||||
'mpWeixin' => ['name' => '微信小程序', 'enable' => true], |
||||
'wxofficial' => ['name' => '微信公众号', 'enable' => true], |
||||
// 'h5' => ['name' => 'H5端', 'enable' => true], |
||||
'mpAlipay' => ['name' => '支付宝小程序', 'enable' => true, 'isPlugin' => true, 'pluginName' => 'mpAlipay'], |
||||
] |
||||
], |
||||
'apps' => [ |
||||
'name' => '应用中心', |
||||
'required' => true, |
||||
'children' => [ |
||||
'dealer' => ['name' => '分销中心', 'enable' => true], |
||||
'bargain' => ['name' => '砍价活动', 'enable' => true], |
||||
'groupon' => ['name' => '多人拼团', 'enable' => true], |
||||
'sharp' => ['name' => '整点秒杀', 'enable' => true], |
||||
'live' => ['name' => '小程序直播', 'enable' => true], |
||||
'eorder' => ['name' => '电子面单', 'enable' => true], |
||||
'collector' => ['name' => '商品采集', 'enable' => true], |
||||
] |
||||
], |
||||
'setting' => [ |
||||
'name' => '设置', |
||||
'required' => true, |
||||
'children' => [ |
||||
'customer' => ['name' => '客服设置', 'enable' => true], |
||||
'storage' => ['name' => '上传设置', 'enable' => true], |
||||
'printer' => ['name' => '小票打印机', 'enable' => true], |
||||
] |
||||
], |
||||
]; |
@ -0,0 +1,39 @@ |
||||
<!doctype html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>恭喜,站点创建成功!</title> |
||||
<style> |
||||
.container { |
||||
width: 60%; |
||||
margin: 10% auto 0; |
||||
background-color: #f0f0f0; |
||||
padding: 2% 5%; |
||||
border-radius: 10px |
||||
} |
||||
|
||||
ul { |
||||
padding-left: 20px; |
||||
} |
||||
|
||||
ul li { |
||||
line-height: 2.3 |
||||
} |
||||
|
||||
a { |
||||
color: #20a53a |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container"> |
||||
<h1>恭喜, 站点创建成功!</h1> |
||||
<h3>这是默认index.html,本页面由系统自动生成</h3> |
||||
<ul> |
||||
<li>本页面在FTP根目录下的index.html</li> |
||||
<li>您可以修改、删除或覆盖本页面</li> |
||||
<li>FTP相关信息,请到“面板系统后台 > FTP” 查看</li> |
||||
</ul> |
||||
</div> |
||||
</body> |
||||
</html> |
@ -0,0 +1 @@ |
||||
FvHKEnIFHAcQ2wb9jN22ON1eQyHdVkDNI83uSekHqmk.B-eLfFcpH6T_cSzsbSDqDTq90Mwc_qgMrE4Wfb97J1c |
@ -0,0 +1 @@ |
||||
1f44b8d1439a98ca0ff1c46e42ab0b22 |
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,15 @@ |
||||
window.publicConfig = { |
||||
// 系统名称 APP_NAME: 'Sass',
|
||||
|
||||
// 必填: api地址, 换成自己的域名即可
|
||||
// 例如: https://www.你的域名.com/index.php?s=/store
|
||||
// BASE_API: '../index.php?s=/store',
|
||||
// BASE_API: 'http://www.yzshop.cn/index.php?s=/store',
|
||||
BASE_API: 'https://www.royaum.com.cn/index.php?s=/store', |
||||
|
||||
// 图片文件上传大小 (单位mb)
|
||||
uploadImageSize: 2, |
||||
|
||||
// 视频文件上传大小 (单位mb)
|
||||
uploadVideoSize: 20 |
||||
} |
@ -0,0 +1 @@ |
||||
[data-v-3c57eb08] .ant-form-item-control{padding-left:10px}.ant-form-item .ant-form-item[data-v-3c57eb08]{margin-bottom:0}[data-v-ea3bde88] .ant-form-item-control{padding-left:10px}.ant-form-item .ant-form-item[data-v-ea3bde88]{margin-bottom:0}.ant-modal-root[data-v-5ce7a04e]{background:#ccc}.ant-modal-root[data-v-5ce7a04e] .ant-modal-body{padding-bottom:8px}.ant-modal-root[data-v-5ce7a04e] .ant-modal-footer{padding-top:0}.search-form[data-v-5ce7a04e] .ant-form-item-control-wrapper{min-width:180px}.ant-form-item[data-v-ecac45ee]{margin-bottom:25px}[data-v-ecac45ee] .ant-form-item-control{padding-left:10px}[data-v-ecac45ee] .ant-form-item-control .ant-form-item-control{padding-left:0} |
@ -0,0 +1 @@ |
||||
.order-content[data-v-1dbebebe]{margin-bottom:70px}.order-content[data-v-1dbebebe] .ant-descriptions-item>span{vertical-align:middle}.order-content .o-divider[data-v-1dbebebe]{margin-bottom:32px}.order-content .order-progress[data-v-1dbebebe]{height:26px;line-height:26px;background:#f8f8f8;border-radius:13px;font-size:13px;text-align:center;position:relative}.order-content .order-progress[data-v-1dbebebe]:after,.order-content .order-progress[data-v-1dbebebe]:before{content:"";position:absolute;z-index:2;left:0;top:0;bottom:0;border-radius:13px;background:#d6893b}.order-content .order-progress[data-v-1dbebebe]:after{background:#fce4c0;z-index:1}.order-content .order-progress.progress-1[data-v-1dbebebe]:before{width:0}.order-content .order-progress.progress-1[data-v-1dbebebe]:after,.order-content .order-progress.progress-2[data-v-1dbebebe]:before{width:20%}.order-content .order-progress.progress-2[data-v-1dbebebe]:after,.order-content .order-progress.progress-3[data-v-1dbebebe]:before{width:40%}.order-content .order-progress.progress-3[data-v-1dbebebe]:after,.order-content .order-progress.progress-4[data-v-1dbebebe]:before{width:60%}.order-content .order-progress.progress-4[data-v-1dbebebe]:after{width:80%}.order-content .order-progress.progress-5[data-v-1dbebebe]:after,.order-content .order-progress.progress-5[data-v-1dbebebe]:before{width:100%}.order-content .order-progress.progress-5 li[data-v-1dbebebe]:nth-child(5){color:#fff}.order-content .order-progress li[data-v-1dbebebe]{width:20%;float:left;border-radius:13px;position:relative;z-index:3}.order-content .order-progress .tip[data-v-1dbebebe]{font-size:12px;padding-top:10px;color:#8c8c8c}.order-content .order-progress.progress-1 li[data-v-1dbebebe]:first-child,.order-content .order-progress.progress-2 li[data-v-1dbebebe]:first-child,.order-content .order-progress.progress-2 li[data-v-1dbebebe]:nth-child(2),.order-content .order-progress.progress-3 li[data-v-1dbebebe]:first-child,.order-content .order-progress.progress-3 li[data-v-1dbebebe]:nth-child(2),.order-content .order-progress.progress-3 li[data-v-1dbebebe]:nth-child(3),.order-content .order-progress.progress-4 li[data-v-1dbebebe]:first-child,.order-content .order-progress.progress-4 li[data-v-1dbebebe]:nth-child(2),.order-content .order-progress.progress-4 li[data-v-1dbebebe]:nth-child(3),.order-content .order-progress.progress-4 li[data-v-1dbebebe]:nth-child(4),.order-content .order-progress.progress-5 li[data-v-1dbebebe]:first-child,.order-content .order-progress.progress-5 li[data-v-1dbebebe]:nth-child(2),.order-content .order-progress.progress-5 li[data-v-1dbebebe]:nth-child(3),.order-content .order-progress.progress-5 li[data-v-1dbebebe]:nth-child(4){color:#fff}.order-content .goods-list[data-v-1dbebebe] table{table-layout:auto}.order-content .goods-list .order-price[data-v-1dbebebe]{padding:8px 20px;text-align:right}.order-content .actions .action-item[data-v-1dbebebe]{float:left;margin-right:8px}.hide-bar[data-v-1dbebebe] .ant-tabs-bar{display:none}[data-v-1dbebebe] .ant-tabs-bar{margin-bottom:20px}.deliver-goods-list .goods-item[data-v-1dbebebe]{position:relative;border-radius:4px;overflow:hidden;width:65px;height:65px;float:left;margin-right:15px}.deliver-goods-list .goods-img[data-v-1dbebebe]{display:block;width:100%;height:100%}.deliver-goods-list .title[data-v-1dbebebe]{position:absolute;bottom:0;width:100%;text-align:center;background:rgba(0,0,0,.6);color:#fff;padding:2px 0;font-size:12px} |
@ -0,0 +1 @@ |
||||
.ant-form-item[data-v-7234e17d]{margin-bottom:15px}[data-v-7234e17d] .ant-form-item-control{padding-left:10px}[data-v-7234e17d] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-7234e17d]{margin-top:50px!important}.ant-form-item[data-v-3e7e6095]{margin-bottom:15px}[data-v-3e7e6095] .ant-form-item-control{padding-left:10px}[data-v-3e7e6095] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-3e7e6095]{margin-top:60px!important}.ant-input-disabled[data-v-3e7e6095]{background-color:#fafafa;color:rgba(0,0,0,.45)}.ant-form-item[data-v-75e55880]{margin-bottom:15px}[data-v-75e55880] .ant-form-item-control{padding-left:10px}[data-v-75e55880] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-75e55880]{margin-top:60px!important}.ant-input-disabled[data-v-75e55880]{background-color:#fafafa;color:rgba(0,0,0,.45)}.ant-form-item[data-v-d288868c]{margin-bottom:20px}[data-v-d288868c] .ant-form-item-control{padding-left:10px}[data-v-d288868c] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-d288868c]{margin-top:60px!important}.ant-input-disabled[data-v-d288868c]{background-color:#fafafa;color:rgba(0,0,0,.45)}.ant-form-item[data-v-3025a70a]{margin-bottom:24px}[data-v-3025a70a] .ant-form-item-control{padding-left:10px}[data-v-3025a70a] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-3025a70a]{margin-top:60px!important}.ant-form-item[data-v-0284bdca]{margin-bottom:15px}[data-v-0284bdca] .ant-form-item-control{padding-left:10px}[data-v-0284bdca] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-0284bdca]{margin-top:60px!important}.ant-input-disabled[data-v-0284bdca]{background-color:#fafafa;color:rgba(0,0,0,.45)}[data-v-4c858f5a] .ant-form-item-control{padding-left:10px}[data-v-4c858f5a] .ant-form-item-control .ant-form-item-control{padding-left:0} |
@ -0,0 +1 @@ |
||||
.ant-form-item[data-v-fc97b166]{margin-bottom:25px}[data-v-fc97b166] .ant-form-item-control{padding-left:10px}[data-v-fc97b166] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-form-item[data-v-4f21524e]{margin-bottom:25px}[data-v-4f21524e] .ant-form-item-control{padding-left:10px}[data-v-4f21524e] .ant-form-item-control .ant-form-item-control{padding-left:0} |
@ -0,0 +1 @@ |
||||
.ant-card-body[data-v-2e1ff95f],.ant-card-body[data-v-9bca15c6],.ant-card-body[data-v-0795f10a]{padding:22px 29px 25px}.tab-list[data-v-0795f10a]{margin-right:20px}.ant-card-body[data-v-5960fe6e]{padding:22px 29px 25px}.tab-list[data-v-5960fe6e]{margin-right:20px}.preview-box[data-v-5960fe6e]{width:120px;height:80px;line-height:80px}.preview-box img[data-v-5960fe6e]{display:block;max-width:100%;max-height:100%}.ant-card-body[data-v-3c32653e]{padding:22px 29px 25px}.tab-list[data-v-3c32653e]{margin-right:20px}.content[data-v-3a6a9c49]{min-height:400px;overflow:auto}.content .recordContent[data-v-3a6a9c49]{height:100%}.kong[data-v-3a6a9c49]{height:20px} |
@ -0,0 +1 @@ |
||||
.ant-modal-root[data-v-34698004]{background:#ccc}.ant-modal-root[data-v-34698004] .ant-modal-body{padding-bottom:8px}.ant-modal-root[data-v-34698004] .ant-modal-footer{padding-top:0}.search-form[data-v-34698004] .ant-form-item-control-wrapper{min-width:180px}.poster-modal[data-v-294d4e2c]{min-height:200px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.poster-modal img[data-v-294d4e2c]{max-width:100%}.pagination[data-v-e4819f90]{margin-top:16px}.pagination .ant-pagination[data-v-e4819f90]{float:right}.ant-table table[data-v-e4819f90]{border:none;border-collapse:collapse}.ant-table .ant-table-thead>tr[data-v-e4819f90]{border:1px solid #e8e8e8}.ant-table tr.order-empty[data-v-e4819f90]{height:15px;border:1px solid #fff}.ant-table tr.order-empty td[data-v-e4819f90]{padding:0;border-right:none;border-left:none;background:none!important}.ant-table-thead>tr>th[data-v-e4819f90]{border-right:none;border-bottom:none;padding:12px 12px;font-weight:700}.ant-table-tbody>tr>td[data-v-e4819f90]{border-right:1px solid #e8e8e8;border-left:1px solid #e8e8e8;padding:12px 12px}.order-dealer .dealer-item[data-v-e4819f90]{float:left;margin-right:100px;font-size:13px}.order-dealer .dealer-item .am-text-right[data-v-e4819f90]{display:inline-block;width:80px;text-align:right}.ant-form-item[data-v-dba0c8a4]{margin-bottom:15px}[data-v-dba0c8a4] .ant-form-item-control{padding-left:10px}[data-v-dba0c8a4] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-dba0c8a4]{margin-top:60px!important}.my-form[data-v-dba0c8a4],.poster-preview[data-v-dba0c8a4]{float:left}.my-form[data-v-dba0c8a4]{margin-left:80px;min-width:800px;margin-top:20px}.poster-preview[data-v-dba0c8a4]{width:377px;height:auto;min-height:500px;margin:0 auto;border:1px solid #ccc;position:relative}.poster-preview img[data-v-dba0c8a4]{display:block;width:100%;height:auto}.poster-preview .backdrop img[data-v-dba0c8a4],.poster-preview .drag[data-v-dba0c8a4]{-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.poster-preview .drag[data-v-dba0c8a4]{position:absolute;cursor:pointer;white-space:nowrap;top:0}.poster-preview .drag.pre-avatar[data-v-dba0c8a4]{width:70px;height:70px}.poster-preview .drag.pre-avatar.circle img[data-v-dba0c8a4]{border-radius:100%}.poster-preview .drag.pre-nickName[data-v-dba0c8a4]{font-size:13x;line-height:1}.poster-preview .drag.pre-nickName span[data-v-dba0c8a4]{display:block}.poster-preview .drag.pre-qrcode[data-v-dba0c8a4]{width:100px;height:100px}.poster-preview .drag.pre-qrcode.circle img[data-v-dba0c8a4]{border-radius:100%}.pannel__right[data-v-dba0c8a4]{min-width:500px;max-width:800px}.m-colorPicker[data-v-dba0c8a4]{display:block;background-color:#fff;border:1px solid #d9d9d9;padding:6px 5px;width:66px}.m-colorPicker[data-v-dba0c8a4] .colorBtn{cursor:pointer;width:53px;height:20px;border:1px solid #000}.m-colorPicker[data-v-dba0c8a4] .box{left:-152px;top:35px}.ant-form-item[data-v-fce24a9a]{margin-bottom:15px}[data-v-fce24a9a] .ant-form-item-control{padding-left:10px}[data-v-fce24a9a] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-fce24a9a]{margin-top:60px!important}.ant-divider[data-v-fce24a9a]:before{width:10%}.ant-divider.first[data-v-fce24a9a]{margin-top:10px!important} |
@ -0,0 +1 @@ |
||||
.ant-form-item .ant-form-item[data-v-79faf411],.ant-form-item .ant-form-item[data-v-ef7f3db4]{margin-bottom:0}[data-v-093b7666] .ant-form-item-control{padding-left:10px}[data-v-093b7666] .ant-form-item-control .ant-form-item-control{padding-left:0} |
@ -0,0 +1 @@ |
||||
.guide-create[data-v-a15ec926]{max-width:1520px;margin:0 auto 40px auto}.guide-create .guide-item[data-v-a15ec926]{padding:18px 22px;background:#fffaf0;text-align:center;border-radius:5px}.guide-create .guide-item .title[data-v-a15ec926]{font-weight:600;font-size:18px;margin-top:3px;margin-bottom:15px}.guide-create .guide-item .describe[data-v-a15ec926]{margin-bottom:15px}.guide-create .guide-item .action[data-v-a15ec926] .ant-btn{width:105px}[data-v-078c8a1a] .ant-form-item-control{padding-left:10px}[data-v-078c8a1a] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-form-item .ant-form-item[data-v-078c8a1a]{margin-bottom:0}.ant-divider[data-v-078c8a1a]{margin-top:50px!important}.sku-batch[data-v-38e47ebc]{line-height:40px;margin-bottom:12px}.sku-batch .title[data-v-38e47ebc]{line-height:28px;margin-right:15px;font-size:13px}.sku-batch[data-v-38e47ebc] .ant-input,.sku-batch[data-v-38e47ebc] .ant-input-number{width:140px;margin-right:15px}.sku-batch[data-v-38e47ebc] .ant-input{width:140px}.sku-list[data-v-38e47ebc]{width:895px}.sku-list[data-v-38e47ebc] .ant-table-tbody>tr>td,.sku-list[data-v-38e47ebc] .ant-table-thead>tr>th{white-space:nowrap}.sku-list[data-v-38e47ebc] .ant-table-tbody>tr>td{padding:12px 18px}.sku-list[data-v-38e47ebc] .ant-input-number-sm,.sku-list[data-v-38e47ebc] .ant-input-sm{height:28px}.sku-list[data-v-38e47ebc] .ant-input-number-sm input{height:26px}[data-v-72d818ec] .ant-form-item-control{padding-left:10px}[data-v-72d818ec] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-form-item .ant-form-item[data-v-72d818ec]{margin-bottom:0}.ant-divider[data-v-72d818ec]{margin-top:50px!important}.ant-modal-root[data-v-091569fa]{background:#ccc}.ant-modal-root[data-v-091569fa] .ant-modal-body{padding-bottom:8px}.ant-modal-root[data-v-091569fa] .ant-modal-footer{padding-top:0}.search-form[data-v-091569fa] .ant-form-item-control-wrapper{min-width:180px}.ant-form-item[data-v-e659a0e2]{margin-bottom:25px}[data-v-e659a0e2] .ant-form-item-control{padding-left:10px}[data-v-e659a0e2] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-e659a0e2]{margin-top:60px!important} |
@ -0,0 +1 @@ |
||||
.card-title[data-v-3c696d4d]{font-size:14px;font-weight:700;margin-bottom:15px}.statistics[data-v-3c696d4d]{line-height:1}.statistics .ant-card .ant-card-body[data-v-3c696d4d]{height:100%;padding:30px 40px}.statistics .col-left[data-v-3c696d4d]{margin-right:25px;font-size:24px;color:#4799ff}.statistics .col-left .icon-body[data-v-3c696d4d]{width:58px;height:58px;border-radius:50%;background-color:#eff6ff}.statistics .col-right[data-v-3c696d4d]{margin-top:-5px}.statistics .col-right .keynote[data-v-3c696d4d]{font-size:26px}.pending[data-v-3c696d4d]{text-align:center;padding:15px 0}.pending .item[data-v-3c696d4d]{display:inline-block;padding:0 20px}.pending .item a[data-v-3c696d4d]{color:unset}.pending .item a[data-v-3c696d4d]:hover{color:#1890ff}.pending .name[data-v-3c696d4d]{font-weight:700;margin-bottom:10px;font-size:13.6px}.pending .value[data-v-3c696d4d]{font-weight:700;color:red;font-size:16px}.functions .item[data-v-3c696d4d]{display:block;padding:13px 20px;cursor:pointer}.functions .item[data-v-3c696d4d]:hover{color:#1890ff}.functions .name[data-v-3c696d4d]{font-size:13px;margin-left:10px}.functions .icon[data-v-3c696d4d]{width:28px;height:28px;color:#fff;font-size:13px;border-radius:5px}.overview a[data-v-3c696d4d]{color:unset}.overview a[data-v-3c696d4d]:hover{color:#1890ff}.overview .item[data-v-3c696d4d]{padding:13px 20px}.overview .col-left[data-v-3c696d4d]{color:#4799ff;font-size:28px;margin-right:35px}.overview .col-left .icon-body[data-v-3c696d4d]{width:58px;height:58px;border-radius:50%;background-color:#eff6ff}.overview .col-right .name[data-v-3c696d4d]{font-size:13px;color:#666}.overview .col-right .value[data-v-3c696d4d]{color:#000;font-size:24px}.overview .col-right .yesterday[data-v-3c696d4d]{display:none;font-size:12px;color:#999} |
@ -0,0 +1 @@ |
||||
.ant-form-item .ant-form-item[data-v-1f61d62d],.ant-form-item .ant-form-item[data-v-5981802f],.ant-form-item .ant-form-item[data-v-17179472]{margin-bottom:0}[data-v-1f61d62d] .ant-form-item-control{padding-left:10px}[data-v-1f61d62d] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-form-item .ant-form-item[data-v-6c768cd3]{margin-bottom:0}[data-v-6c768cd3] .ant-form-item-control{padding-left:10px}[data-v-6c768cd3] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-form-item .ant-form-item[data-v-41eeb0aa]{margin-bottom:0}[data-v-41eeb0aa] .ant-form-item-control{padding-left:10px}[data-v-41eeb0aa] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-card-body[data-v-71d94242]{padding:22px 29px 25px}.ant-form-item .ant-form-item[data-v-58595866]{margin-bottom:0}[data-v-58595866] .ant-form-item-control{padding-left:10px}[data-v-58595866] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-form-item .ant-form-item[data-v-c094d56a]{margin-bottom:0}[data-v-c094d56a] .ant-form-item-control{padding-left:10px}[data-v-c094d56a] .ant-form-item-control .ant-form-item-control{padding-left:0}.content[data-v-c094d56a]{color:#505050;line-height:1.6}.content .city-name[data-v-c094d56a]{font-size:12.5px;color:#7b7b7b}.table-wrapper,.table-wrapper[data-v-18cf4bce]{width:100%;overflow-x:auto;padding-bottom:20px}.pagination[data-v-18cf4bce]{margin-top:16px}.pagination .ant-pagination[data-v-18cf4bce]{float:right}.ant-table table[data-v-18cf4bce]{border:none;border-collapse:collapse}.ant-table .ant-table-thead>tr[data-v-18cf4bce]{border:1px solid #e8e8e8}.ant-table tr.order-empty[data-v-18cf4bce]{height:15px;border:1px solid #fff}.ant-table tr.order-empty td[data-v-18cf4bce]{padding:0;border-right:none;border-left:none;background:none!important}.ant-table-thead>tr>th[data-v-18cf4bce]{border-right:none;border-bottom:none;padding:12px 12px;font-weight:700}.ant-table-tbody>tr>td[data-v-18cf4bce]{border-right:1px solid #e8e8e8;border-left:1px solid #e8e8e8;padding:12px 12px} |
@ -0,0 +1 @@ |
||||
.header[data-v-febfd2ea]{margin-bottom:40px;text-align:center}.header .logo[data-v-febfd2ea]{height:56px;vertical-align:top;border-style:none;margin-bottom:20px}.header .title[data-v-febfd2ea]{font-size:20px;color:#6c7293;font-family:Avenir,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;margin:0}.user-layout-login label[data-v-febfd2ea]{font-size:13px}.user-layout-login[data-v-febfd2ea] .login-input .ant-input{border:none;background:rgba(235,237,242,.4);border-radius:5px;font-size:13px}.user-layout-login[data-v-febfd2ea] .ant-form-explain{margin-top:9px;color:rgba(0,0,0,.45)}.user-layout-login .login-button[data-v-febfd2ea]{padding:0 15px;font-size:16px;height:40px;width:100%;margin-top:20px;-webkit-box-shadow:0 4px 16px 0 rgba(34,185,255,.15);box-shadow:0 4px 16px 0 rgba(34,185,255,.15)}.user-layout-login .login-button[data-v-febfd2ea]:hover{-webkit-box-shadow:0 9px 16px 0 rgba(34,185,255,.25)!important;box-shadow:0 9px 16px 0 rgba(34,185,255,.25)!important}.user-layout-login .ant-alert-error[data-v-febfd2ea]{margin-bottom:24px;background-color:#fffbfb} |
@ -0,0 +1 @@ |
||||
.ant-card-body[data-v-11222ba2]{padding:22px 29px 25px}.tab-list[data-v-11222ba2]{margin-right:20px}.ant-card-body[data-v-736e4872]{padding:22px 29px 25px}.tab-list[data-v-736e4872]{margin-right:20px}.ant-card-body[data-v-6eee4686]{padding:22px 29px 25px}.tab-list[data-v-6eee4686]{margin-right:20px}.ant-card-body[data-v-964da69a]{padding:22px 29px 25px}.tab-list[data-v-964da69a]{margin-right:20px} |
@ -0,0 +1 @@ |
||||
[data-v-71cc8672] .ant-form-item-control{padding-left:10px}[data-v-71cc8672] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-71cc8672]{margin-top:60px!important}.ant-input-number[data-v-71cc8672]{width:160px}.input-text_right[data-v-71cc8672]{margin-left:10px}.radio-item[data-v-71cc8672]{margin-bottom:16px}[data-v-16c6d0b0] .ant-form-item-control{padding-left:10px}[data-v-16c6d0b0] .ant-form-item-control .ant-form-item-control{padding-left:0}[data-v-a6704cac] .ant-form-item-control{padding-left:10px}[data-v-a6704cac] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-form-item[data-v-2199021a]{margin-bottom:10px}[data-v-2199021a] .ant-form-item-control{padding-left:10px}[data-v-2199021a] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-2199021a]{margin-top:50px!important}[data-v-4479d0fc] .ant-form-item-control{padding-left:10px}[data-v-4479d0fc] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-divider[data-v-4479d0fc]{margin-top:50px!important}.table-rules .operation{text-align:right}.table-rules .operation a{font-size:13px;margin-left:6px}.table-rules .content{color:#505050;white-space:normal}.table-rules .content .city-name{font-size:12.5px;color:#7b7b7b}[data-v-1d463747] .ant-table-tbody>tr>td,[data-v-1d463747] .ant-table-thead>tr>th{padding:11px 16px}.ant-switch-small[data-v-1d463747]{min-width:38px;height:20px;line-height:14px}.ant-switch-small[data-v-1d463747] .ant-switch-inner{margin-right:3px;margin-left:20px;font-size:12px}.ant-switch-small[data-v-1d463747]:after{width:16px;height:16px}.payment-item[data-v-1d463747]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:22px}.payment-item .name[data-v-1d463747]{font-size:18px;color:#333;line-height:1;margin-bottom:20px;font-weight:700}.item-client[data-v-1d463747]{width:20%;min-width:180px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border:1px solid #e8e8e8;border-right:none}.item-method[data-v-1d463747]{width:80%;min-width:800px}.item-method .pay-method-item[data-v-1d463747]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.item-method .pay-method-item .pay-icon[data-v-1d463747]{font-size:24px;margin-right:8px}.item-method .select-template[data-v-1d463747]{width:200px}.ant-form-item[data-v-7840e2d5]{margin-bottom:15px}[data-v-7840e2d5] .ant-form-item-control{padding-left:10px}[data-v-7840e2d5] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-form-item[data-v-66391143]{margin-bottom:15px}[data-v-66391143] .ant-form-item-control{padding-left:10px}[data-v-66391143] .ant-form-item-control .ant-form-item-control{padding-left:0}[data-v-29ac8f6d] .ant-form-item-control{padding-left:10px}[data-v-29ac8f6d] .ant-form-item-control .ant-form-item-control{padding-left:0}.ant-checkbox-wrapper+.ant-checkbox-wrapper[data-v-74c84ca0]{margin-left:0}.ant-checkbox-wrapper[data-v-74c84ca0]{margin-right:14px;margin-bottom:18px}[data-v-74c84ca0] .ant-form-item-control{padding-left:10px}[data-v-74c84ca0] .ant-form-item-control .ant-form-item-control{padding-left:0} |
@ -0,0 +1 @@ |
||||
.sku-batch[data-v-7731882e]{line-height:40px;margin-bottom:12px}.sku-batch .title[data-v-7731882e]{line-height:28px;margin-right:15px;font-size:13px}.sku-batch[data-v-7731882e] .ant-input,.sku-batch[data-v-7731882e] .ant-input-number{width:120px;margin-right:15px}.sku-batch[data-v-7731882e] .ant-input{width:140px}.sku-list[data-v-7731882e]{width:895px}.sku-list[data-v-7731882e] .ant-table-tbody>tr>td,.sku-list[data-v-7731882e] .ant-table-thead>tr>th{white-space:nowrap}.sku-list[data-v-7731882e] .ant-table-tbody>tr>td{padding:12px 18px}.sku-list[data-v-7731882e] .ant-input-number-sm,.sku-list[data-v-7731882e] .ant-input-sm{height:28px}.sku-list[data-v-7731882e] .ant-input-number-sm input{height:26px}[data-v-272908ba] .ant-form-item-control{padding-left:10px}.ant-form-item .ant-form-item[data-v-272908ba]{margin-bottom:0}[data-v-1f4f7daa] .ant-form-item-control{padding-left:10px}.ant-form-item .ant-form-item[data-v-1f4f7daa]{margin-bottom:0}[data-v-351068a8] .ant-form-item-control{padding-left:10px}.ant-form-item .ant-form-item[data-v-351068a8]{margin-bottom:0}.times-checkbox[data-v-351068a8]{width:570px;margin-bottom:-12px}.times-checkbox[data-v-351068a8] .ant-checkbox-wrapper{margin-right:15px;margin-bottom:11px}[data-v-11743671] .ant-form-item-control{padding-left:10px}.ant-form-item .ant-form-item[data-v-11743671]{margin-bottom:0}.times-checkbox[data-v-11743671]{width:570px;margin-bottom:-12px}.times-checkbox[data-v-11743671] .ant-checkbox-wrapper{margin-right:15px;margin-bottom:11px}[data-v-9bbe13d4] .ant-form-item-control{padding-left:10px}.ant-form-item .ant-form-item[data-v-9bbe13d4]{margin-bottom:0}.times-checkbox[data-v-9bbe13d4]{width:570px;margin-bottom:-12px}.times-checkbox[data-v-9bbe13d4] .ant-checkbox-wrapper{margin-right:15px;margin-bottom:11px}.ant-form-item[data-v-3c797252]{margin-bottom:25px}[data-v-3c797252] .ant-form-item-control{padding-left:10px}[data-v-3c797252] .ant-form-item-control .ant-form-item-control{padding-left:0} |
@ -0,0 +1 @@ |
||||
.card-title[data-v-567e6d2a]{font-size:14px;font-weight:700;margin-bottom:15px}.overview a[data-v-567e6d2a]{color:unset}.overview a[data-v-567e6d2a]:hover{color:#1890ff}.overview .screen[data-v-567e6d2a]{margin-top:-22px;margin-bottom:30px;text-align:center}.overview .screen .shortcut-days[data-v-567e6d2a]{margin-left:10px;line-height:32px}.overview .screen .shortcut-days a[data-v-567e6d2a]{margin:0 3px}.overview .item[data-v-567e6d2a]{padding:13px 20px}.overview .col-left[data-v-567e6d2a]{color:#6af;font-size:28px;margin-right:35px}.overview .col-left.small[data-v-567e6d2a]{font-size:26px}.overview .col-left .icon-body[data-v-567e6d2a]{width:58px;height:58px;border-radius:50%;background-color:#eff6ff}.overview .col-right .name[data-v-567e6d2a]{font-size:13px;color:#666}.overview .col-right .value[data-v-567e6d2a]{color:#000;font-size:24px}.overview .col-right .yesterday[data-v-567e6d2a]{display:none;font-size:12px;color:#999}.ranking-img[data-v-567e6d2a]{text-align:center} |
@ -0,0 +1 @@ |
||||
.ant-form-item{margin-bottom:15px}.ant-modal-body[data-v-2bace808]{padding-top:0!important}.ant-form-item[data-v-2bace808]{margin-bottom:15px}.ant-tabs-nav .ant-tabs-tab[data-v-2bace808]{padding:10px 16px}.ant-card-body[data-v-0479cb85],.ant-card-body[data-v-ac058ce2]{padding:22px 29px 25px}.tab-list[data-v-ac058ce2]{margin-right:20px}.ant-card-body[data-v-903cffb6]{padding:22px 29px 25px}.tab-list[data-v-903cffb6]{margin-right:20px} |
After Width: | Height: | Size: 239 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.0 KiB |
@ -0,0 +1 @@ |
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["exception"],{cc89:function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t._self._c;return e("a-result",{attrs:{status:"404",title:"404","sub-title":"Sorry, the page you visited does not exist."},scopedSlots:t._u([{key:"extra",fn:function(){return[e("a-button",{attrs:{type:"primary"},on:{click:t.toHome}},[t._v("返回首页")])]},proxy:!0}])})},s=[],r={name:"Exception404",methods:{toHome:function(){this.$router.push({path:"/"})}}},u=r,i=o("2877"),a=Object(i["a"])(u,n,s,!1,null,null,null);e["default"]=a.exports}}]); |
@ -0,0 +1 @@ |
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["lang-zh-CN"],{2807:function(e,a,o){"use strict";o.r(a);var t=o("5530"),l=o("3579"),n=o("41b2"),r=o.n(n),c={today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},i={placeholder:"请选择时间"},d=i,m={lang:r()({placeholder:"请选择日期",rangePlaceholder:["开始日期","结束日期"]},c),timePickerLocale:r()({},d)};m.lang.ok="确 定";var s=m,p=s,h={locale:"zh-cn",Pagination:l["a"],DatePicker:s,TimePicker:d,Calendar:p,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",selectAll:"全选当页",selectInvert:"反选当页",sortTitle:"排序",expand:"展开行",collapse:"关闭行"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"}},u=h,k=o("5c3a"),T=o.n(k),Y={antLocale:u,momentName:"zh-cn",momentLocale:T.a},b={message:"-","menu.home":"主页","menu.dashboard":"仪表盘","menu.dashboard.analysis":"分析页","menu.dashboard.monitor":"监控页","menu.dashboard.workplace":"工作台"};a["default"]=Object(t["a"])(Object(t["a"])({},Y),b)}}]); |
@ -0,0 +1 @@ |
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["live"],{ea2d:function(e,t,a){"use strict";a.r(t);a("ac1f"),a("841c"),a("b0c0");var n=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-alert",{staticClass:"mb-15",attrs:{showIcon:!0,message:"微信小程序直播操作说明",banner:""}},[t("template",{slot:"description"},[t("p",[e._v(" 1. 登录 "),t("a",{attrs:{href:"https://mp.weixin.qq.com/",target:"_blank"}},[e._v("微信小程序运营平台")]),e._v(",点击左侧菜单栏 “直播”,点击 “创建直播间” 按钮。 ")]),t("p",[e._v('2. 点击本页面中的 "同步直播间" 按钮,将直播间列表导入商城系统中。')])])],2),t("div",{staticClass:"table-operator"},[t("a-row",[t("a-col",{attrs:{span:5}},[t("a-button",{directives:[{name:"action",rawName:"v-action:sync",arg:"sync"}],attrs:{type:"primary",icon:"sync"},on:{click:function(t){return e.handleSync()}}},[e._v("同步直播间")])],1),t("a-col",{staticClass:"flex flex-x-end",attrs:{span:11,offset:8}},[t("a-input-search",{staticStyle:{"max-width":"300px","min-width":"150px"},attrs:{placeholder:"请输入直播间名称/主播昵称"},on:{search:e.onSearch},model:{value:e.queryParam.search,callback:function(t){e.$set(e.queryParam,"search",t)},expression:"queryParam.search"}})],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"time",fn:function(a){return[t("p",[e._v("开始:"+e._s(a.start_time))]),t("p",[e._v("结束:"+e._s(a.end_time))])]}},{key:"live_status",fn:function(a){return[t("a-tag",{attrs:{color:e.LiveStatusColorEnum[a]}},[e._v(e._s(e.LiveStatusEnum[a].name))])]}},{key:"is_top",fn:function(a,n){return[t("a-tag",{staticClass:"cur-p",attrs:{color:a?"green":""},on:{click:function(t){return e.handleSetTop(n,a?0:1)}}},[e._v(e._s(a?"是":"否"))])]}}])})],1)},s=[],r=a("5530"),o=(a("d3b7"),a("2af9")),i=a("b775"),c={list:"/live.room/list",sync:"/live.room/sync",setTop:"/live.room/setTop"};function l(e){return Object(i["b"])({url:c.list,method:"get",params:e})}function u(e){return Object(i["b"])({url:c.sync,method:"post",data:e})}function d(e,t){return Object(i["b"])({url:c.setTop,method:"post",data:{id:e,isTop:t}})}var m=a("5c06"),h=new m["a"]([{key:101,name:"直播中",value:101},{key:102,name:"未开始",value:102},{key:103,name:"已结束",value:103},{key:104,name:"禁播",value:104},{key:105,name:"暂停中",value:105},{key:106,name:"异常",value:106},{key:107,name:"已过期",value:107}]),f={101:"green",102:"green",103:"red",104:"red",105:"orange",106:"red",107:"red"},p={name:"Index",components:{STable:o["d"]},data:function(){var e=this;return{queryParam:{search:void 0},isLoading:!1,LiveStatusEnum:h,LiveStatusColorEnum:f,columns:[{title:"直播间ID",dataIndex:"id"},{title:"直播间名称",dataIndex:"room_name"},{title:"主播昵称",dataIndex:"anchor_name",scopedSlots:{customRender:"anchor_name"}},{title:"直播时间",scopedSlots:{customRender:"time"}},{title:"直播状态",dataIndex:"live_status",scopedSlots:{customRender:"live_status"}},{title:"是否置顶",dataIndex:"is_top",scopedSlots:{customRender:"is_top"}},{title:"更新时间",dataIndex:"update_time"}],loadData:function(t){return l(Object(r["a"])(Object(r["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleSync:function(){var e=this;e.isLoading=!0,u().then((function(t){e.$message.success(t.message,1.5),e.queryParam.search=void 0,e.handleRefresh(!0)})).finally((function(){return e.isLoading=!1}))},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleSetTop:function(e,t){var a=this;if(!this.$auth("/apps/live/room/index.setTop"))return!1;var n=t?"":"取消",s=this.$confirm({title:"您确定要".concat(n,"置顶该直播间吗?"),onOk:function(){return d(e.id,t).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(){return s.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},v=p,y=a("2877"),_=Object(y["a"])(v,n,s,!1,null,null,null);t["default"]=_.exports}}]); |
@ -0,0 +1 @@ |
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["passport"],{"78ac":function(t,e,s){},"9b19":function(t,e,s){t.exports=s.p+"assets/logo.8907c177.svg"},cedc:function(t,e,s){"use strict";s.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main"},[t._m(0),e("a-form",{ref:"formLogin",staticClass:"user-layout-login",attrs:{id:"formLogin",form:t.form},on:{submit:t.handleSubmit}},[t.isLoginError?e("a-alert",{attrs:{type:"error",showIcon:"",message:t.loginErrorMsg}}):t._e(),e("a-form-item",[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!0,message:"您还没有输入用户名"}],validateTrigger:"change"}],expression:"[\n 'username',\n { rules: [{ required: true, message: '您还没有输入用户名' }], validateTrigger: 'change'}\n ]"}],staticClass:"login-input",attrs:{size:"large",type:"text",placeholder:"请输入用户名"}},[e("a-icon",{style:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),e("a-form-item",[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"您还没有输入用户密码"}],validateTrigger:"blur"}],expression:"[\n 'password',\n { rules: [{ required: true, message: '您还没有输入用户密码' }], validateTrigger: 'blur'}\n ]"}],staticClass:"login-input",attrs:{size:"large",type:"password",autocomplete:"false",placeholder:"请输入用户密码"}},[e("a-icon",{style:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",{staticStyle:{"margin-top":"24px"}},[e("a-button",{staticClass:"login-button",attrs:{size:"large",type:"primary",htmlType:"submit",loading:t.state.loginBtn,disabled:t.state.loginBtn}},[t._v("确定")])],1)],1)],1)},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"header"},[e("div",{staticClass:"logo"},[e("img",{staticClass:"logo",attrs:{src:s("9b19"),alt:"logo"}})]),e("p",{staticClass:"title"},[t._v("商城系统登录")])])}],a=s("5530"),o=(s("d3b7"),s("2f62")),n=s("ca00"),l={data:function(){return{isLoginError:!1,loginErrorMsg:"登录失败",form:this.$form.createForm(this),state:{loginBtn:!1}}},created:function(){},methods:Object(a["a"])(Object(a["a"])({},Object(o["b"])(["Login"])),{},{handleSubmit:function(t){var e=this;t.preventDefault();var s=this.form.validateFields,r=this.state,i=this.Login;r.loginBtn=!0,s(["username","password"],{force:!0},(function(t,s){if(t)setTimeout((function(){return r.loginBtn=!1}),100);else{var o=Object(a["a"])({},s);i(o).then((function(t){return e.loginSuccess(t)})).catch((function(t){return e.loginFailed(t)})).finally((function(){return r.loginBtn=!1}))}}))},loginSuccess:function(t){var e=this;this.isLoginError=!1,this.$message.success(t.message,1.5),setTimeout((function(){e.$router.push({path:"/"}),e.$notification.success({message:"欢迎",description:"".concat(Object(n["i"])(),",欢迎回来")})}),1e3)},loginFailed:function(t){this.isLoginError=!0,this.loginErrorMsg=t.message}})},c=l,u=(s("e79a"),s("2877")),g=Object(u["a"])(c,r,i,!1,null,"febfd2ea",null);e["default"]=g.exports},e79a:function(t,e,s){"use strict";s("78ac")}}]); |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 5.0 KiB |
@ -1,21 +1,21 @@ |
||||
# The MIT License (MIT) |
||||
|
||||
Copyright (c) 2016-2019 Riku Särkinen |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
||||
# The MIT License (MIT) |
||||
|
||||
Copyright (c) 2016-2019 Riku Särkinen |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
||||
|
@ -1,29 +1,29 @@ |
||||
{ |
||||
"name": "adbario/php-dot-notation", |
||||
"description": "PHP dot notation access to arrays", |
||||
"keywords": ["dotnotation", "arrayaccess"], |
||||
"homepage": "https://github.com/adbario/php-dot-notation", |
||||
"license": "MIT", |
||||
"authors": [ |
||||
{ |
||||
"name": "Riku Särkinen", |
||||
"email": "riku@adbar.io" |
||||
} |
||||
], |
||||
"require": { |
||||
"php": ">=5.5", |
||||
"ext-json": "*" |
||||
}, |
||||
"require-dev": { |
||||
"phpunit/phpunit": "^4.0|^5.0|^6.0", |
||||
"squizlabs/php_codesniffer": "^3.0" |
||||
}, |
||||
"autoload": { |
||||
"files": [ |
||||
"src/helpers.php" |
||||
], |
||||
"psr-4": { |
||||
"Adbar\\": "src" |
||||
} |
||||
} |
||||
} |
||||
{ |
||||
"name": "adbario/php-dot-notation", |
||||
"description": "PHP dot notation access to arrays", |
||||
"keywords": ["dotnotation", "arrayaccess"], |
||||
"homepage": "https://github.com/adbario/php-dot-notation", |
||||
"license": "MIT", |
||||
"authors": [ |
||||
{ |
||||
"name": "Riku Särkinen", |
||||
"email": "riku@adbar.io" |
||||
} |
||||
], |
||||
"require": { |
||||
"php": "^5.5 || ^7.0 || ^8.0", |
||||
"ext-json": "*" |
||||
}, |
||||
"require-dev": { |
||||
"phpunit/phpunit": "^4.8|^5.7|^6.6|^7.5|^8.5|^9.5", |
||||
"squizlabs/php_codesniffer": "^3.6" |
||||
}, |
||||
"autoload": { |
||||
"files": [ |
||||
"src/helpers.php" |
||||
], |
||||
"psr-4": { |
||||
"Adbar\\": "src" |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,23 +1,24 @@ |
||||
<?php |
||||
/** |
||||
* Dot - PHP dot notation access to arrays |
||||
* |
||||
* @author Riku Särkinen <riku@adbar.io> |
||||
* @link https://github.com/adbario/php-dot-notation |
||||
* @license https://github.com/adbario/php-dot-notation/blob/2.x/LICENSE.md (MIT License) |
||||
*/ |
||||
|
||||
use Adbar\Dot; |
||||
|
||||
if (! function_exists('dot')) { |
||||
/** |
||||
* Create a new Dot object with the given items |
||||
* |
||||
* @param mixed $items |
||||
* @return \Adbar\Dot |
||||
*/ |
||||
function dot($items) |
||||
{ |
||||
return new Dot($items); |
||||
} |
||||
} |
||||
<?php |
||||
/** |
||||
* Dot - PHP dot notation access to arrays |
||||
* |
||||
* @author Riku Särkinen <riku@adbar.io> |
||||
* @link https://github.com/adbario/php-dot-notation |
||||
* @license https://github.com/adbario/php-dot-notation/blob/2.x/LICENSE.md (MIT License) |
||||
*/ |
||||
|
||||
use Adbar\Dot; |
||||
|
||||
if (! function_exists('dot')) { |
||||
/** |
||||
* Create a new Dot object with the given items and optional delimiter |
||||
* |
||||
* @param mixed $items |
||||
* @param string $delimiter |
||||
* @return \Adbar\Dot |
||||
*/ |
||||
function dot($items, $delimiter = '.') |
||||
{ |
||||
return new Dot($items, $delimiter); |
||||
} |
||||
} |
||||
|
@ -1,65 +1,65 @@ |
||||
<?php |
||||
/* |
||||
* This document has been generated with |
||||
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.15|configurator |
||||
* you can change this configuration by importing this file. |
||||
*/ |
||||
|
||||
return PhpCsFixer\Config::create() |
||||
->setRiskyAllowed(true) |
||||
->setIndent(' ') |
||||
->setRules([ |
||||
'@PSR2' => true, |
||||
'@PhpCsFixer' => true, |
||||
'@Symfony:risky' => true, |
||||
'concat_space' => ['spacing' => 'one'], |
||||
'array_syntax' => ['syntax' => 'short'], |
||||
'array_indentation' => true, |
||||
'combine_consecutive_unsets' => true, |
||||
'method_separation' => true, |
||||
'single_quote' => true, |
||||
'declare_equal_normalize' => true, |
||||
'function_typehint_space' => true, |
||||
'hash_to_slash_comment' => true, |
||||
'include' => true, |
||||
'lowercase_cast' => true, |
||||
'no_multiline_whitespace_before_semicolons' => true, |
||||
'no_leading_import_slash' => true, |
||||
'no_multiline_whitespace_around_double_arrow' => true, |
||||
'no_spaces_around_offset' => true, |
||||
'no_unneeded_control_parentheses' => true, |
||||
'no_unused_imports' => true, |
||||
'no_whitespace_before_comma_in_array' => true, |
||||
'no_whitespace_in_blank_line' => true, |
||||
'object_operator_without_whitespace' => true, |
||||
'single_blank_line_before_namespace' => true, |
||||
'single_class_element_per_statement' => true, |
||||
'space_after_semicolon' => true, |
||||
'standardize_not_equals' => true, |
||||
'ternary_operator_spaces' => true, |
||||
'trailing_comma_in_multiline_array' => true, |
||||
'trim_array_spaces' => true, |
||||
'unary_operator_spaces' => true, |
||||
'whitespace_after_comma_in_array' => true, |
||||
'no_extra_consecutive_blank_lines' => [ |
||||
'curly_brace_block', |
||||
'extra', |
||||
'parenthesis_brace_block', |
||||
'square_brace_block', |
||||
'throw', |
||||
'use', |
||||
], |
||||
'binary_operator_spaces' => [ |
||||
'align_double_arrow' => true, |
||||
'align_equals' => true, |
||||
], |
||||
'braces' => [ |
||||
'allow_single_line_closure' => true, |
||||
], |
||||
]) |
||||
->setFinder( |
||||
PhpCsFixer\Finder::create() |
||||
->exclude('vendor') |
||||
->exclude('tests') |
||||
->in(__DIR__) |
||||
); |
||||
<?php |
||||
/* |
||||
* This document has been generated with |
||||
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.15|configurator |
||||
* you can change this configuration by importing this file. |
||||
*/ |
||||
|
||||
return PhpCsFixer\Config::create() |
||||
->setRiskyAllowed(true) |
||||
->setIndent(' ') |
||||
->setRules([ |
||||
'@PSR2' => true, |
||||
'@PhpCsFixer' => true, |
||||
'@Symfony:risky' => true, |
||||
'concat_space' => ['spacing' => 'one'], |
||||
'array_syntax' => ['syntax' => 'short'], |
||||
'array_indentation' => true, |
||||
'combine_consecutive_unsets' => true, |
||||
'method_separation' => true, |
||||
'single_quote' => true, |
||||
'declare_equal_normalize' => true, |
||||
'function_typehint_space' => true, |
||||
'hash_to_slash_comment' => true, |
||||
'include' => true, |
||||
'lowercase_cast' => true, |
||||
'no_multiline_whitespace_before_semicolons' => true, |
||||
'no_leading_import_slash' => true, |
||||
'no_multiline_whitespace_around_double_arrow' => true, |
||||
'no_spaces_around_offset' => true, |
||||
'no_unneeded_control_parentheses' => true, |
||||
'no_unused_imports' => true, |
||||
'no_whitespace_before_comma_in_array' => true, |
||||
'no_whitespace_in_blank_line' => true, |
||||
'object_operator_without_whitespace' => true, |
||||
'single_blank_line_before_namespace' => true, |
||||
'single_class_element_per_statement' => true, |
||||
'space_after_semicolon' => true, |
||||
'standardize_not_equals' => true, |
||||
'ternary_operator_spaces' => true, |
||||
'trailing_comma_in_multiline_array' => true, |
||||
'trim_array_spaces' => true, |
||||
'unary_operator_spaces' => true, |
||||
'whitespace_after_comma_in_array' => true, |
||||
'no_extra_consecutive_blank_lines' => [ |
||||
'curly_brace_block', |
||||
'extra', |
||||
'parenthesis_brace_block', |
||||
'square_brace_block', |
||||
'throw', |
||||
'use', |
||||
], |
||||
'binary_operator_spaces' => [ |
||||
'align_double_arrow' => true, |
||||
'align_equals' => true, |
||||
], |
||||
'braces' => [ |
||||
'allow_single_line_closure' => true, |
||||
], |
||||
]) |
||||
->setFinder( |
||||
PhpCsFixer\Finder::create() |
||||
->exclude('vendor') |
||||
->exclude('tests') |
||||
->in(__DIR__) |
||||
); |
||||
|
@ -1,148 +1,148 @@ |
||||
# CHANGELOG |
||||
|
||||
## 3.1.22 - 2021-05-11 |
||||
|
||||
- Deprecate `stream_for` method. |
||||
|
||||
## 3.1.21 - 2021-03-15 |
||||
|
||||
- Supported set proxy&timeout on request. |
||||
|
||||
## 3.1.20 - 2020-12-02 |
||||
|
||||
- Fix the warning when the Tea::merge method received empty arguments. |
||||
|
||||
## 3.1.19 - 2020-10-09 |
||||
|
||||
- Fix the error when the code value is a string. |
||||
|
||||
## 3.1.18 - 2020-09-28 |
||||
|
||||
- Require Guzzle Version 7.0 |
||||
|
||||
## 3.1.17 - 2020-09-24 |
||||
|
||||
- TeaUnableRetryError support get error info. |
||||
|
||||
## 3.1.16 - 2020-08-31 |
||||
|
||||
- Fix the Maximum function nesting level error when repeated network requests. |
||||
|
||||
## 3.1.15 - 2020-07-28 |
||||
|
||||
- Improved validatePattern method. |
||||
|
||||
## 3.1.14 - 2020-07-03 |
||||
|
||||
- Supported set properties of TeaError with `ErrorInfo`. |
||||
|
||||
## 3.1.13 - 2020-06-09 |
||||
|
||||
- Reduce dependencies. |
||||
|
||||
## 3.1.12 - 2020-05-13 |
||||
|
||||
- Add validate method. |
||||
- Supported validate maximun&minimun of property. |
||||
|
||||
## 3.1.11 - 2020-05-07 |
||||
|
||||
- Fixed error when class is undefined. |
||||
|
||||
## 3.1.10 - 2020-05-07 |
||||
|
||||
- Fixed error when '$item' of array is null |
||||
|
||||
## 3.1.9 - 2020-04-13 |
||||
|
||||
- TeaUnableRetryError add $lastException param. |
||||
|
||||
## 3.1.8 - 2020-04-02 |
||||
|
||||
- Added some static methods of Model to validate fields of Model. |
||||
|
||||
## 3.1.7 - 2020-03-27 |
||||
|
||||
- Improve Tea::isRetryable method. |
||||
|
||||
## 3.1.6 - 2020-03-25 |
||||
|
||||
- Fixed bug when body is StreamInterface. |
||||
|
||||
## 3.1.5 - 2020-03-25 |
||||
|
||||
- Improve Model.toMap method. |
||||
- Improve Tea.merge method. |
||||
- Fixed tests. |
||||
|
||||
## 3.1.4 - 2020-03-20 |
||||
|
||||
- Added Tea::merge method. |
||||
- Change Tea::isRetryable method. |
||||
|
||||
## 3.1.3 - 2020-03-20 |
||||
|
||||
- Model: added toModel method. |
||||
|
||||
## 3.1.2 - 2020-03-19 |
||||
|
||||
- Model constructor supported array type parameter. |
||||
|
||||
## 3.1.1 - 2020-03-18 |
||||
|
||||
- Fixed bug : set method failed. |
||||
- Fixed bug : get empty contents form body. |
||||
|
||||
## 3.1.0 - 2020-03-13 |
||||
|
||||
- TeaUnableRetryError add 'lastRequest' property. |
||||
- Change Tea.send() method return. |
||||
- Fixed Tea. allowRetry() method. |
||||
|
||||
## 3.0.0 - 2020-02-14 |
||||
- Rename package name. |
||||
|
||||
## 2.0.3 - 2020-02-14 |
||||
- Improved Exception. |
||||
|
||||
## 2.0.2 - 2019-09-11 |
||||
- Supported `String`. |
||||
|
||||
## 2.0.1 - 2019-08-15 |
||||
- Supported `IteratorAggregate`. |
||||
|
||||
## 2.0.0 - 2019-08-14 |
||||
- Design `Request` as a standard `PsrRequest`. |
||||
|
||||
## 1.0.10 - 2019-08-12 |
||||
- Added `__toString` for `Response`. |
||||
|
||||
## 1.0.9 - 2019-08-01 |
||||
- Updated `Middleware`. |
||||
|
||||
## 1.0.8 - 2019-07-29 |
||||
- Supported `TransferStats`. |
||||
|
||||
## 1.0.7 - 2019-07-27 |
||||
- Improved request. |
||||
|
||||
## 1.0.6 - 2019-07-23 |
||||
- Trim key for parameter. |
||||
|
||||
## 1.0.5 - 2019-07-23 |
||||
- Supported default protocol. |
||||
|
||||
## 1.0.4 - 2019-07-22 |
||||
- Added `toArray()`. |
||||
|
||||
## 1.0.3 - 2019-05-02 |
||||
- Improved `Request`. |
||||
|
||||
## 1.0.2 - 2019-05-02 |
||||
- Added getHeader/getHeaders. |
||||
|
||||
## 1.0.1 - 2019-04-02 |
||||
- Improved design. |
||||
|
||||
## 1.0.0 - 2019-05-02 |
||||
- Initial release of the AlibabaCloud Tea Version 1.0.0 on Packagist See <https://github.com/aliyun/tea-php> for more information. |
||||
# CHANGELOG |
||||
|
||||
## 3.1.22 - 2021-05-11 |
||||
|
||||
- Deprecate `stream_for` method. |
||||
|
||||
## 3.1.21 - 2021-03-15 |
||||
|
||||
- Supported set proxy&timeout on request. |
||||
|
||||
## 3.1.20 - 2020-12-02 |
||||
|
||||
- Fix the warning when the Tea::merge method received empty arguments. |
||||
|
||||
## 3.1.19 - 2020-10-09 |
||||
|
||||
- Fix the error when the code value is a string. |
||||
|
||||
## 3.1.18 - 2020-09-28 |
||||
|
||||
- Require Guzzle Version 7.0 |
||||
|
||||
## 3.1.17 - 2020-09-24 |
||||
|
||||
- TeaUnableRetryError support get error info. |
||||
|
||||
## 3.1.16 - 2020-08-31 |
||||
|
||||
- Fix the Maximum function nesting level error when repeated network requests. |
||||
|
||||
## 3.1.15 - 2020-07-28 |
||||
|
||||
- Improved validatePattern method. |
||||
|
||||
## 3.1.14 - 2020-07-03 |
||||
|
||||
- Supported set properties of TeaError with `ErrorInfo`. |
||||
|
||||
## 3.1.13 - 2020-06-09 |
||||
|
||||
- Reduce dependencies. |
||||
|
||||
## 3.1.12 - 2020-05-13 |
||||
|
||||
- Add validate method. |
||||
- Supported validate maximun&minimun of property. |
||||
|
||||
## 3.1.11 - 2020-05-07 |
||||
|
||||
- Fixed error when class is undefined. |
||||
|
||||
## 3.1.10 - 2020-05-07 |
||||
|
||||
- Fixed error when '$item' of array is null |
||||
|
||||
## 3.1.9 - 2020-04-13 |
||||
|
||||
- TeaUnableRetryError add $lastException param. |
||||
|
||||
## 3.1.8 - 2020-04-02 |
||||
|
||||
- Added some static methods of Model to validate fields of Model. |
||||
|
||||
## 3.1.7 - 2020-03-27 |
||||
|
||||
- Improve Tea::isRetryable method. |
||||
|
||||
## 3.1.6 - 2020-03-25 |
||||
|
||||
- Fixed bug when body is StreamInterface. |
||||
|
||||
## 3.1.5 - 2020-03-25 |
||||
|
||||
- Improve Model.toMap method. |
||||
- Improve Tea.merge method. |
||||
- Fixed tests. |
||||
|
||||
## 3.1.4 - 2020-03-20 |
||||
|
||||
- Added Tea::merge method. |
||||
- Change Tea::isRetryable method. |
||||
|
||||
## 3.1.3 - 2020-03-20 |
||||
|
||||
- Model: added toModel method. |
||||
|
||||
## 3.1.2 - 2020-03-19 |
||||
|
||||
- Model constructor supported array type parameter. |
||||
|
||||
## 3.1.1 - 2020-03-18 |
||||
|
||||
- Fixed bug : set method failed. |
||||
- Fixed bug : get empty contents form body. |
||||
|
||||
## 3.1.0 - 2020-03-13 |
||||
|
||||
- TeaUnableRetryError add 'lastRequest' property. |
||||
- Change Tea.send() method return. |
||||
- Fixed Tea. allowRetry() method. |
||||
|
||||
## 3.0.0 - 2020-02-14 |
||||
- Rename package name. |
||||
|
||||
## 2.0.3 - 2020-02-14 |
||||
- Improved Exception. |
||||
|
||||
## 2.0.2 - 2019-09-11 |
||||
- Supported `String`. |
||||
|
||||
## 2.0.1 - 2019-08-15 |
||||
- Supported `IteratorAggregate`. |
||||
|
||||
## 2.0.0 - 2019-08-14 |
||||
- Design `Request` as a standard `PsrRequest`. |
||||
|
||||
## 1.0.10 - 2019-08-12 |
||||
- Added `__toString` for `Response`. |
||||
|
||||
## 1.0.9 - 2019-08-01 |
||||
- Updated `Middleware`. |
||||
|
||||
## 1.0.8 - 2019-07-29 |
||||
- Supported `TransferStats`. |
||||
|
||||
## 1.0.7 - 2019-07-27 |
||||
- Improved request. |
||||
|
||||
## 1.0.6 - 2019-07-23 |
||||
- Trim key for parameter. |
||||
|
||||
## 1.0.5 - 2019-07-23 |
||||
- Supported default protocol. |
||||
|
||||
## 1.0.4 - 2019-07-22 |
||||
- Added `toArray()`. |
||||
|
||||
## 1.0.3 - 2019-05-02 |
||||
- Improved `Request`. |
||||
|
||||
## 1.0.2 - 2019-05-02 |
||||
- Added getHeader/getHeaders. |
||||
|
||||
## 1.0.1 - 2019-04-02 |
||||
- Improved design. |
||||
|
||||
## 1.0.0 - 2019-05-02 |
||||
- Initial release of the AlibabaCloud Tea Version 1.0.0 on Packagist See <https://github.com/aliyun/tea-php> for more information. |
||||
|
@ -1,13 +1,13 @@ |
||||
Copyright (c) 2009-present, Alibaba Cloud All rights reserved. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
Copyright (c) 2009-present, Alibaba Cloud All rights reserved. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
|
@ -1,16 +1,16 @@ |
||||
|
||||
## Installation |
||||
``` |
||||
composer require alibabacloud/tea --optimize-autoloader |
||||
``` |
||||
> Some users may not be able to install due to network problems, you can try to switch the Composer mirror. |
||||
|
||||
|
||||
## Changelog |
||||
Detailed changes for each release are documented in the [release notes](CHANGELOG.md). |
||||
|
||||
|
||||
## License |
||||
[Apache-2.0](LICENSE.md) |
||||
|
||||
Copyright (c) 2009-present, Alibaba Cloud All rights reserved. |
||||
|
||||
## Installation |
||||
``` |
||||
composer require alibabacloud/tea --optimize-autoloader |
||||
``` |
||||
> Some users may not be able to install due to network problems, you can try to switch the Composer mirror. |
||||
|
||||
|
||||
## Changelog |
||||
Detailed changes for each release are documented in the [release notes](CHANGELOG.md). |
||||
|
||||
|
||||
## License |
||||
[Apache-2.0](LICENSE.md) |
||||
|
||||
Copyright (c) 2009-present, Alibaba Cloud All rights reserved. |
||||
|
@ -1,80 +1,80 @@ |
||||
{ |
||||
"name": "alibabacloud/tea", |
||||
"homepage": "https://www.alibabacloud.com/", |
||||
"description": "Client of Tea for PHP", |
||||
"keywords": [ |
||||
"tea", |
||||
"client", |
||||
"alibabacloud", |
||||
"cloud" |
||||
], |
||||
"type": "library", |
||||
"license": "Apache-2.0", |
||||
"support": { |
||||
"source": "https://github.com/aliyun/tea-php", |
||||
"issues": "https://github.com/aliyun/tea-php/issues" |
||||
}, |
||||
"authors": [ |
||||
{ |
||||
"name": "Alibaba Cloud SDK", |
||||
"email": "sdk-team@alibabacloud.com", |
||||
"homepage": "http://www.alibabacloud.com" |
||||
} |
||||
], |
||||
"require": { |
||||
"php": ">=5.5", |
||||
"ext-curl": "*", |
||||
"ext-json": "*", |
||||
"ext-libxml": "*", |
||||
"ext-mbstring": "*", |
||||
"ext-openssl": "*", |
||||
"ext-simplexml": "*", |
||||
"ext-xmlwriter": "*", |
||||
"guzzlehttp/guzzle": "^6.3|^7.0", |
||||
"adbario/php-dot-notation": "^2.2" |
||||
}, |
||||
"require-dev": { |
||||
"symfony/dotenv": "^3.4", |
||||
"phpunit/phpunit": "*", |
||||
"symfony/var-dumper": "^3.4" |
||||
}, |
||||
"suggest": { |
||||
"ext-sockets": "To use client-side monitoring" |
||||
}, |
||||
"autoload": { |
||||
"psr-4": { |
||||
"AlibabaCloud\\Tea\\": "src" |
||||
} |
||||
}, |
||||
"autoload-dev": { |
||||
"psr-4": { |
||||
"AlibabaCloud\\Tea\\Tests\\": "tests" |
||||
} |
||||
}, |
||||
"config": { |
||||
"sort-packages": true, |
||||
"preferred-install": "dist", |
||||
"optimize-autoloader": true |
||||
}, |
||||
"prefer-stable": true, |
||||
"minimum-stability": "dev", |
||||
"scripts": { |
||||
"cs": "phpcs --standard=PSR2 -n ./", |
||||
"cbf": "phpcbf --standard=PSR2 -n ./", |
||||
"fixer": "php-cs-fixer fix ./", |
||||
"test": [ |
||||
"@clearCache", |
||||
"phpunit --colors=always" |
||||
], |
||||
"unit": [ |
||||
"@clearCache", |
||||
"phpunit --testsuite=Unit --colors=always" |
||||
], |
||||
"feature": [ |
||||
"@clearCache", |
||||
"phpunit --testsuite=Feature --colors=always" |
||||
], |
||||
"clearCache": "rm -rf cache/*", |
||||
"coverage": "open cache/coverage/index.html" |
||||
} |
||||
} |
||||
{ |
||||
"name": "alibabacloud/tea", |
||||
"homepage": "https://www.alibabacloud.com/", |
||||
"description": "Client of Tea for PHP", |
||||
"keywords": [ |
||||
"tea", |
||||
"client", |
||||
"alibabacloud", |
||||
"cloud" |
||||
], |
||||
"type": "library", |
||||
"license": "Apache-2.0", |
||||
"support": { |
||||
"source": "https://github.com/aliyun/tea-php", |
||||
"issues": "https://github.com/aliyun/tea-php/issues" |
||||
}, |
||||
"authors": [ |
||||
{ |
||||
"name": "Alibaba Cloud SDK", |
||||
"email": "sdk-team@alibabacloud.com", |
||||
"homepage": "http://www.alibabacloud.com" |
||||
} |
||||
], |
||||
"require": { |
||||
"php": ">=5.5", |
||||
"ext-curl": "*", |
||||
"ext-json": "*", |
||||
"ext-libxml": "*", |
||||
"ext-mbstring": "*", |
||||
"ext-openssl": "*", |
||||
"ext-simplexml": "*", |
||||
"ext-xmlwriter": "*", |
||||
"guzzlehttp/guzzle": "^6.3|^7.0", |
||||
"adbario/php-dot-notation": "^2.4" |
||||
}, |
||||
"require-dev": { |
||||
"symfony/dotenv": "^3.4", |
||||
"phpunit/phpunit": "*", |
||||
"symfony/var-dumper": "^3.4" |
||||
}, |
||||
"suggest": { |
||||
"ext-sockets": "To use client-side monitoring" |
||||
}, |
||||
"autoload": { |
||||
"psr-4": { |
||||
"AlibabaCloud\\Tea\\": "src" |
||||
} |
||||
}, |
||||
"autoload-dev": { |
||||
"psr-4": { |
||||
"AlibabaCloud\\Tea\\Tests\\": "tests" |
||||
} |
||||
}, |
||||
"config": { |
||||
"sort-packages": true, |
||||
"preferred-install": "dist", |
||||
"optimize-autoloader": true |
||||
}, |
||||
"prefer-stable": true, |
||||
"minimum-stability": "dev", |
||||
"scripts": { |
||||
"cs": "phpcs --standard=PSR2 -n ./", |
||||
"cbf": "phpcbf --standard=PSR2 -n ./", |
||||
"fixer": "php-cs-fixer fix ./", |
||||
"test": [ |
||||
"@clearCache", |
||||
"phpunit --colors=always" |
||||
], |
||||
"unit": [ |
||||
"@clearCache", |
||||
"phpunit --testsuite=Unit --colors=always" |
||||
], |
||||
"feature": [ |
||||
"@clearCache", |
||||
"phpunit --testsuite=Feature --colors=always" |
||||
], |
||||
"clearCache": "rm -rf cache/*", |
||||
"coverage": "open cache/coverage/index.html" |
||||
} |
||||
} |
||||
|
@ -1,47 +1,53 @@ |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea\Exception; |
||||
|
||||
use RuntimeException; |
||||
|
||||
/** |
||||
* Class TeaError. |
||||
*/ |
||||
class TeaError extends RuntimeException |
||||
{ |
||||
public $message = ''; |
||||
public $code = 0; |
||||
public $data; |
||||
public $name = ''; |
||||
private $errorInfo; |
||||
|
||||
/** |
||||
* TeaError constructor. |
||||
* |
||||
* @param array $errorInfo |
||||
* @param string $message |
||||
* @param int $code |
||||
* @param null|\Throwable $previous |
||||
*/ |
||||
public function __construct($errorInfo = [], $message = '', $code = 0, $previous = null) |
||||
{ |
||||
parent::__construct((string) $message, (int) $code, $previous); |
||||
$this->errorInfo = $errorInfo; |
||||
if (!empty($errorInfo)) { |
||||
$properties = ['name', 'message', 'code', 'data']; |
||||
foreach ($properties as $property) { |
||||
if (isset($errorInfo[$property])) { |
||||
$this->{$property} = $errorInfo[$property]; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @return array |
||||
*/ |
||||
public function getErrorInfo() |
||||
{ |
||||
return $this->errorInfo; |
||||
} |
||||
} |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea\Exception; |
||||
|
||||
use RuntimeException; |
||||
|
||||
/** |
||||
* Class TeaError. |
||||
*/ |
||||
class TeaError extends RuntimeException |
||||
{ |
||||
public $message = ''; |
||||
public $code = 0; |
||||
public $data; |
||||
public $name = ''; |
||||
public $statusCode; |
||||
public $description; |
||||
public $accessDeniedDetail; |
||||
private $errorInfo; |
||||
|
||||
/** |
||||
* TeaError constructor. |
||||
* |
||||
* @param array $errorInfo |
||||
* @param string $message |
||||
* @param int $code |
||||
* @param null|\Throwable $previous |
||||
*/ |
||||
public function __construct($errorInfo = [], $message = '', $code = 0, $previous = null) |
||||
{ |
||||
parent::__construct((string) $message, (int) $code, $previous); |
||||
$this->errorInfo = $errorInfo; |
||||
if (!empty($errorInfo)) { |
||||
$properties = ['name', 'message', 'code', 'data', 'description', 'accessDeniedDetail']; |
||||
foreach ($properties as $property) { |
||||
if (isset($errorInfo[$property])) { |
||||
$this->{$property} = $errorInfo[$property]; |
||||
if ($property === 'data' && isset($errorInfo['data']['statusCode'])) { |
||||
$this->statusCode = $errorInfo['data']['statusCode']; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @return array |
||||
*/ |
||||
public function getErrorInfo() |
||||
{ |
||||
return $this->errorInfo; |
||||
} |
||||
} |
||||
|
@ -1,21 +1,21 @@ |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea\Exception; |
||||
|
||||
/** |
||||
* Class TeaRetryError. |
||||
*/ |
||||
class TeaRetryError extends TeaError |
||||
{ |
||||
/** |
||||
* TeaRetryError constructor. |
||||
* |
||||
* @param string $message |
||||
* @param int $code |
||||
* @param null|\Throwable $previous |
||||
*/ |
||||
public function __construct($message = '', $code = 0, $previous = null) |
||||
{ |
||||
parent::__construct([], $message, $code, $previous); |
||||
} |
||||
} |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea\Exception; |
||||
|
||||
/** |
||||
* Class TeaRetryError. |
||||
*/ |
||||
class TeaRetryError extends TeaError |
||||
{ |
||||
/** |
||||
* TeaRetryError constructor. |
||||
* |
||||
* @param string $message |
||||
* @param int $code |
||||
* @param null|\Throwable $previous |
||||
*/ |
||||
public function __construct($message = '', $code = 0, $previous = null) |
||||
{ |
||||
parent::__construct([], $message, $code, $previous); |
||||
} |
||||
} |
||||
|
@ -1,41 +1,41 @@ |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea\Exception; |
||||
|
||||
use AlibabaCloud\Tea\Request; |
||||
|
||||
/** |
||||
* Class TeaUnableRetryError. |
||||
*/ |
||||
class TeaUnableRetryError extends TeaError |
||||
{ |
||||
private $lastRequest; |
||||
private $lastException; |
||||
|
||||
/** |
||||
* TeaUnableRetryError constructor. |
||||
* |
||||
* @param Request $lastRequest |
||||
* @param null|\Exception $lastException |
||||
*/ |
||||
public function __construct($lastRequest, $lastException = null) |
||||
{ |
||||
$error_info = []; |
||||
if (null !== $lastException && $lastException instanceof TeaError) { |
||||
$error_info = $lastException->getErrorInfo(); |
||||
} |
||||
parent::__construct($error_info, $lastException->getMessage(), $lastException->getCode(), $lastException); |
||||
$this->lastRequest = $lastRequest; |
||||
$this->lastException = $lastException; |
||||
} |
||||
|
||||
public function getLastRequest() |
||||
{ |
||||
return $this->lastRequest; |
||||
} |
||||
|
||||
public function getLastException() |
||||
{ |
||||
return $this->lastException; |
||||
} |
||||
} |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea\Exception; |
||||
|
||||
use AlibabaCloud\Tea\Request; |
||||
|
||||
/** |
||||
* Class TeaUnableRetryError. |
||||
*/ |
||||
class TeaUnableRetryError extends TeaError |
||||
{ |
||||
private $lastRequest; |
||||
private $lastException; |
||||
|
||||
/** |
||||
* TeaUnableRetryError constructor. |
||||
* |
||||
* @param Request $lastRequest |
||||
* @param null|\Exception $lastException |
||||
*/ |
||||
public function __construct($lastRequest, $lastException = null) |
||||
{ |
||||
$error_info = []; |
||||
if (null !== $lastException && $lastException instanceof TeaError) { |
||||
$error_info = $lastException->getErrorInfo(); |
||||
} |
||||
parent::__construct($error_info, $lastException->getMessage(), $lastException->getCode(), $lastException); |
||||
$this->lastRequest = $lastRequest; |
||||
$this->lastException = $lastException; |
||||
} |
||||
|
||||
public function getLastRequest() |
||||
{ |
||||
return $this->lastRequest; |
||||
} |
||||
|
||||
public function getLastException() |
||||
{ |
||||
return $this->lastException; |
||||
} |
||||
} |
||||
|
@ -1,68 +1,112 @@ |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea; |
||||
|
||||
class Helper |
||||
{ |
||||
/** |
||||
* @param string $content |
||||
* @param string $prefix |
||||
* @param string $end |
||||
* @param string[] $filter |
||||
* |
||||
* @return string|string[] |
||||
*/ |
||||
public static function findFromString($content, $prefix, $end, $filter = ['"', ' ']) |
||||
{ |
||||
$len = mb_strlen($prefix); |
||||
$pos = mb_strpos($content, $prefix); |
||||
if (false === $pos) { |
||||
return ''; |
||||
} |
||||
$pos_end = mb_strpos($content, $end, $pos); |
||||
$str = mb_substr($content, $pos + $len, $pos_end - $pos - $len); |
||||
|
||||
return str_replace($filter, '', $str); |
||||
} |
||||
|
||||
/** |
||||
* @param string $str |
||||
* |
||||
* @return bool |
||||
*/ |
||||
public static function isJson($str) |
||||
{ |
||||
json_decode($str); |
||||
|
||||
return \JSON_ERROR_NONE == json_last_error(); |
||||
} |
||||
|
||||
/** |
||||
* @return array |
||||
*/ |
||||
public static function merge(array $arrays) |
||||
{ |
||||
$result = []; |
||||
foreach ($arrays as $array) { |
||||
foreach ($array as $key => $value) { |
||||
if (\is_int($key)) { |
||||
$result[] = $value; |
||||
|
||||
continue; |
||||
} |
||||
|
||||
if (isset($result[$key]) && \is_array($result[$key])) { |
||||
$result[$key] = self::merge( |
||||
[$result[$key], $value] |
||||
); |
||||
|
||||
continue; |
||||
} |
||||
|
||||
$result[$key] = $value; |
||||
} |
||||
} |
||||
|
||||
return $result; |
||||
} |
||||
} |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea; |
||||
|
||||
class Helper |
||||
{ |
||||
/** |
||||
* @param string $content |
||||
* @param string $prefix |
||||
* @param string $end |
||||
* @param string[] $filter |
||||
* |
||||
* @return string|string[] |
||||
*/ |
||||
public static function findFromString($content, $prefix, $end, $filter = ['"', ' ']) |
||||
{ |
||||
$len = mb_strlen($prefix); |
||||
$pos = mb_strpos($content, $prefix); |
||||
if (false === $pos) { |
||||
return ''; |
||||
} |
||||
$pos_end = mb_strpos($content, $end, $pos); |
||||
$str = mb_substr($content, $pos + $len, $pos_end - $pos - $len); |
||||
|
||||
return str_replace($filter, '', $str); |
||||
} |
||||
|
||||
/** |
||||
* @param string $str |
||||
* |
||||
* @return bool |
||||
*/ |
||||
public static function isJson($str) |
||||
{ |
||||
json_decode($str); |
||||
|
||||
return \JSON_ERROR_NONE == json_last_error(); |
||||
} |
||||
|
||||
/** |
||||
* @param mixed $value |
||||
* |
||||
* @return bool |
||||
*/ |
||||
public static function isBytes($value) |
||||
{ |
||||
if (!\is_array($value)) { |
||||
return false; |
||||
} |
||||
$i = 0; |
||||
foreach ($value as $k => $ord) { |
||||
if ($k !== $i) { |
||||
return false; |
||||
} |
||||
if (!\is_int($ord)) { |
||||
return false; |
||||
} |
||||
if ($ord < 0 || $ord > 255) { |
||||
return false; |
||||
} |
||||
++$i; |
||||
} |
||||
|
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Convert a bytes to string(utf8). |
||||
* |
||||
* @param array $bytes |
||||
* |
||||
* @return string the return string |
||||
*/ |
||||
public static function toString($bytes) |
||||
{ |
||||
$str = ''; |
||||
foreach ($bytes as $ch) { |
||||
$str .= \chr($ch); |
||||
} |
||||
|
||||
return $str; |
||||
} |
||||
|
||||
/** |
||||
* @return array |
||||
*/ |
||||
public static function merge(array $arrays) |
||||
{ |
||||
$result = []; |
||||
foreach ($arrays as $array) { |
||||
foreach ($array as $key => $value) { |
||||
if (\is_int($key)) { |
||||
$result[] = $value; |
||||
|
||||
continue; |
||||
} |
||||
|
||||
if (isset($result[$key]) && \is_array($result[$key])) { |
||||
$result[$key] = self::merge( |
||||
[$result[$key], $value] |
||||
); |
||||
|
||||
continue; |
||||
} |
||||
|
||||
$result[$key] = $value; |
||||
} |
||||
} |
||||
|
||||
return $result; |
||||
} |
||||
} |
||||
|
@ -1,114 +1,114 @@ |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea; |
||||
|
||||
class Model |
||||
{ |
||||
protected $_name = []; |
||||
protected $_required = []; |
||||
|
||||
public function __construct($config = []) |
||||
{ |
||||
if (!empty($config)) { |
||||
foreach ($config as $k => $v) { |
||||
$this->{$k} = $v; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public function getName($name = null) |
||||
{ |
||||
if (null === $name) { |
||||
return $this->_name; |
||||
} |
||||
|
||||
return isset($this->_name[$name]) ? $this->_name[$name] : $name; |
||||
} |
||||
|
||||
public function toMap() |
||||
{ |
||||
$map = get_object_vars($this); |
||||
foreach ($map as $k => $m) { |
||||
if (0 === strpos($k, '_')) { |
||||
unset($map[$k]); |
||||
} |
||||
} |
||||
$res = []; |
||||
foreach ($map as $k => $v) { |
||||
$name = isset($this->_name[$k]) ? $this->_name[$k] : $k; |
||||
$res[$name] = $v; |
||||
} |
||||
|
||||
return $res; |
||||
} |
||||
|
||||
public function validate() |
||||
{ |
||||
$vars = get_object_vars($this); |
||||
foreach ($vars as $k => $v) { |
||||
if (isset($this->_required[$k]) && $this->_required[$k] && empty($v)) { |
||||
throw new \InvalidArgumentException("{$k} is required."); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public static function validateRequired($fieldName, $field, $val = null) |
||||
{ |
||||
if (true === $val && null === $field) { |
||||
throw new \InvalidArgumentException($fieldName . ' is required'); |
||||
} |
||||
} |
||||
|
||||
public static function validateMaxLength($fieldName, $field, $val = null) |
||||
{ |
||||
if (null !== $field && \strlen($field) > (int) $val) { |
||||
throw new \InvalidArgumentException($fieldName . ' is exceed max-length: ' . $val); |
||||
} |
||||
} |
||||
|
||||
public static function validateMinLength($fieldName, $field, $val = null) |
||||
{ |
||||
if (null !== $field && \strlen($field) < (int) $val) { |
||||
throw new \InvalidArgumentException($fieldName . ' is less than min-length: ' . $val); |
||||
} |
||||
} |
||||
|
||||
public static function validatePattern($fieldName, $field, $regex = '') |
||||
{ |
||||
if (null !== $field && '' !== $field && !preg_match("/^{$regex}$/", $field)) { |
||||
throw new \InvalidArgumentException($fieldName . ' is not match ' . $regex); |
||||
} |
||||
} |
||||
|
||||
public static function validateMaximum($fieldName, $field, $val) |
||||
{ |
||||
if (null !== $field && $field > $val) { |
||||
throw new \InvalidArgumentException($fieldName . ' cannot be greater than ' . $val); |
||||
} |
||||
} |
||||
|
||||
public static function validateMinimum($fieldName, $field, $val) |
||||
{ |
||||
if (null !== $field && $field < $val) { |
||||
throw new \InvalidArgumentException($fieldName . ' cannot be less than ' . $val); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @param array $map |
||||
* @param Model $model |
||||
* |
||||
* @return mixed |
||||
*/ |
||||
public static function toModel($map, $model) |
||||
{ |
||||
$names = $model->getName(); |
||||
$names = array_flip($names); |
||||
foreach ($map as $key => $value) { |
||||
$name = isset($names[$key]) ? $names[$key] : $key; |
||||
$model->{$name} = $value; |
||||
} |
||||
|
||||
return $model; |
||||
} |
||||
} |
||||
<?php |
||||
|
||||
namespace AlibabaCloud\Tea; |
||||
|
||||
class Model |
||||
{ |
||||
protected $_name = []; |
||||
protected $_required = []; |
||||
|
||||
public function __construct($config = []) |
||||
{ |
||||
if (!empty($config)) { |
||||
foreach ($config as $k => $v) { |
||||
$this->{$k} = $v; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public function getName($name = null) |
||||
{ |
||||
if (null === $name) { |
||||
return $this->_name; |
||||
} |
||||
|
||||
return isset($this->_name[$name]) ? $this->_name[$name] : $name; |
||||
} |
||||
|
||||
public function toMap() |
||||
{ |
||||
$map = get_object_vars($this); |
||||
foreach ($map as $k => $m) { |
||||
if (0 === strpos($k, '_')) { |
||||
unset($map[$k]); |
||||
} |
||||
} |
||||
$res = []; |
||||
foreach ($map as $k => $v) { |
||||
$name = isset($this->_name[$k]) ? $this->_name[$k] : $k; |
||||
$res[$name] = $v; |
||||
} |
||||
|
||||
return $res; |
||||
} |
||||
|
||||
public function validate() |
||||
{ |
||||
$vars = get_object_vars($this); |
||||
foreach ($vars as $k => $v) { |
||||
if (isset($this->_required[$k]) && $this->_required[$k] && empty($v)) { |
||||
throw new \InvalidArgumentException("{$k} is required."); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public static function validateRequired($fieldName, $field, $val = null) |
||||
{ |
||||
if (true === $val && null === $field) { |
||||
throw new \InvalidArgumentException($fieldName . ' is required'); |
||||
} |
||||
} |
||||
|
||||
public static function validateMaxLength($fieldName, $field, $val = null) |
||||
{ |
||||
if (null !== $field && \strlen($field) > (int) $val) { |
||||
throw new \InvalidArgumentException($fieldName . ' is exceed max-length: ' . $val); |
||||
} |
||||
} |
||||
|
||||
public static function validateMinLength($fieldName, $field, $val = null) |
||||
{ |
||||
if (null !== $field && \strlen($field) < (int) $val) { |
||||
throw new \InvalidArgumentException($fieldName . ' is less than min-length: ' . $val); |
||||
} |
||||
} |
||||
|
||||
public static function validatePattern($fieldName, $field, $regex = '') |
||||
{ |
||||
if (null !== $field && '' !== $field && !preg_match("/^{$regex}$/", $field)) { |
||||
throw new \InvalidArgumentException($fieldName . ' is not match ' . $regex); |
||||
} |
||||
} |
||||
|
||||
public static function validateMaximum($fieldName, $field, $val) |
||||
{ |
||||
if (null !== $field && $field > $val) { |
||||
throw new \InvalidArgumentException($fieldName . ' cannot be greater than ' . $val); |
||||
} |
||||
} |
||||
|
||||
public static function validateMinimum($fieldName, $field, $val) |
||||
{ |
||||
if (null !== $field && $field < $val) { |
||||
throw new \InvalidArgumentException($fieldName . ' cannot be less than ' . $val); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* @param array $map |
||||
* @param Model $model |
||||
* |
||||
* @return mixed |
||||
*/ |
||||
public static function toModel($map, $model) |
||||
{ |
||||
$names = $model->getName(); |
||||
$names = array_flip($names); |
||||
foreach ($map as $key => $value) { |
||||
$name = isset($names[$key]) ? $names[$key] : $key; |
||||
$model->{$name} = $value; |
||||
} |
||||
|
||||
return $model; |
||||
} |
||||
} |
||||
|