ソースを参照

del: 为了移除反复对 crmeb.net 网站的调用,删了一批文件,有问题了恢复

joe 4 年 前
コミット
aa6f60ccce

+ 0 - 579
app/admin/controller/setting/SystemPlat.php

@@ -1,579 +0,0 @@
-<?php
-
-namespace app\admin\controller\setting;
-
-use app\admin\controller\AuthController;
-use app\admin\model\system\SystemConfig as ConfigModel;
-use app\models\system\Cache as CacheModel;
-use crmeb\services\{CacheService, ExpressService, FormBuilder, JsonService as Json, product\Product, UtilService};
-use EasyWeChat\Js\Js;
-use think\facade\Route as Url;
-use crmeb\services\CrmebPlatService;
-use crmeb\services\sms\Sms;
-use crmeb\services\express\Express;
-
-/**
- * crmeb 平台
- * Class SystemPlat
- * @package app\admin\controller\setting
- */
-class SystemPlat extends AuthController
-{
-    protected $account = NULL;
-
-    protected $secret = NULL;
-    /**
-     * @var $crmebPlatHandle
-     */
-    protected $crmebPlatHandle;
-    /**
-     * @var $smsHandle
-     */
-    protected $smsHandle;
-    /**
-     * @var $expressHandle
-     */
-    protected $expressHandle;
-    /**
-     * @var $productHandle
-     */
-    protected $productHandle;
-
-    protected $allowAction = ['index', 'verify', 'login', 'go_login', 'register', 'go_register', 'modify', 'go_modify', 'forget', 'go_forget', 'loginOut', 'meal', 'sms_temp'];
-
-    /**
-     * @var string
-     */
-    protected $cacheTokenPrefix = "_crmeb_plat";
-
-    protected $cacheKey;
-
-    protected function initialize()
-    {
-        parent::initialize();
-        $this->account = sys_config('sms_account');
-        $this->secret = sys_config('sms_token');
-        $config = ['account' => $this->account, 'secret' => $this->secret];
-        $this->crmebPlatHandle = new CrmebPlatService();
-        $this->smsHandle = new Sms('sms', $config);
-        $this->expressHandle = new Express('express', $config);
-        $this->productHandle = new Product('copy', $config);
-        $this->cacheKey = md5($this->account . '_' . $this->secret . $this->cacheTokenPrefix);
-    }
-
-    /**
-     * 显示资源列表
-     *
-     * @return \think\Response
-     */
-    public function index()
-    {
-        if (!CacheModel::getDbCache($this->cacheKey, '')) {
-            return redirect(Url('login')->build() . '?url=index');
-        }
-        [$out, $type] = UtilService::postMore([
-            ['out', 0],
-            ['type', 'sms']
-        ], null, true);
-        try {
-            $info = $this->crmebPlatHandle->info();
-        } catch (\Throwable $e) {
-            $info = [];
-        }
-        $this->assign('info', $info);
-        $this->assign('type', $type);
-        if ($out == 0 && $info) {
-            return $this->fetch();
-        } else {
-            $this->assign('account', $this->account);
-            $this->assign('password', $this->secret);
-            return $this->fetch('login');
-        }
-
-    }
-
-    /**
-     * 获取短信验证码
-     */
-    public function verify()
-    {
-        [$phone] = UtilService::postMore([
-            ['phone', '']
-        ], null, true);
-        if (!$phone) {
-            return Json::fail('请输入手机号');
-        }
-        if (!check_phone($phone)) {
-            return Json::fail('请输入正确的手机号');
-        }
-        $this->crmebPlatHandle->code($phone);
-        return Json::success('获取成功');
-    }
-
-    /**
-     * 登录页面
-     * @return string
-     * @throws \Exception
-     */
-    public function login()
-    {
-        $this->assign('account', $this->account);
-        $this->assign('password', $this->secret);
-        return $this->fetch();
-    }
-
-    /**
-     * 退出登录
-     * @return string
-     * @throws \Exception
-     */
-    public function loginOut()
-    {
-        CacheModel::delectDbCache($this->cacheKey);
-        return Json::success('退出成功', $this->crmebPlatHandle->loginOut());
-    }
-
-
-    /**
-     * 登录逻辑
-     */
-    public function go_login()
-    {
-        $data = UtilService::postMore([
-            ['account', ''],
-            ['password', '']
-        ]);
-        if (!$data['account']) {
-            return Json::fail('请输入账号');
-        }
-        if (!$data['password']) {
-            return Json::fail('请输入秘钥');
-        }
-        $this->save_basics(['sms_account' => $data['account'], 'sms_token' => $data['password']]);
-        $token = $this->crmebPlatHandle->login($data['account'], $data['password']);
-        CacheModel::setDbCache($this->cacheKey, $token, 0);
-        return Json::success('登录成功', $token);
-    }
-
-    /**
-     * 注册页面
-     * @return string
-     * @throws \Exception
-     */
-    public function register()
-    {
-        return $this->fetch();
-    }
-
-    /**
-     * 注册逻辑
-     */
-    public function go_register()
-    {
-        $data = UtilService::postMore([
-            ['account', ''],
-            ['phone', ''],
-            ['password', ''],
-            ['verify_code', ''],
-        ]);
-        if (!$data['account']) {
-            return Json::fail('请输入账号');
-        }
-        if (!$data['phone']) {
-            return Json::fail('请输入手机号');
-        }
-        if (!check_phone($data['phone'])) {
-            return Json::fail('请输入正确的手机号');
-        }
-        if (!$data['password']) {
-            return Json::fail('请设置秘钥');
-        }
-        if (strlen($data['password']) < 6 || strlen($data['password']) > 32) {
-            return Json::fail('密码长度6~32位');
-        }
-        if (!$data['verify_code']) {
-            return Json::fail('请先获取短信验证码');
-        }
-        $result = $this->crmebPlatHandle->register($data['account'], $data['phone'], $data['password'], $data['verify_code']);
-        $this->save_basics(['sms_account' => $data['account'], 'sms_token' => $data['password']]);
-        return Json::success('注册成功', $result);
-    }
-
-    /**
-     * 修改秘钥页面
-     * @return string
-     * @throws \Exception
-     */
-    public function modify()
-    {
-        $this->assign('account', $this->account);
-        return $this->fetch();
-    }
-
-    /**
-     * 修改秘钥逻辑
-     */
-    public function go_modify()
-    {
-        $data = UtilService::postMore([
-            ['account', ''],
-            ['phone', ''],
-            ['password', ''],
-            ['verify_code', ''],
-        ]);
-        if (!$data['account']) {
-            return Json::fail('请输入账号');
-        }
-        if (!$data['phone']) {
-            return Json::fail('请输入手机号');
-        }
-        if (!check_phone($data['phone'])) {
-            return Json::fail('请输入正确的手机号');
-        }
-        if (!$data['password']) {
-            return Json::fail('请设置秘钥');
-        }
-        if (strlen($data['password']) < 6 || strlen($data['password']) > 32) {
-            return Json::fail('密码长度6~32位');
-        }
-        if (!$data['verify_code']) {
-            return Json::fail('请先获取短信验证码');
-        }
-        $result = $this->crmebPlatHandle->modify($data['account'], $data['phone'], $data['password'], $data['verify_code']);
-        $this->save_basics(['sms_account' => $data['account'], 'sms_token' => $data['password']]);
-        return Json::success('修改成功', $result);
-    }
-
-    /**
-     * 找回账号
-     * @return string
-     * @throws \Exception
-     */
-    public function forget()
-    {
-        return $this->fetch();
-    }
-
-    /**
-     * 找回账号逻辑
-     */
-    public function go_fotget()
-    {
-        $data = $where = UtilService::postMore([
-            ['phone', ''],
-            ['verify_code', ''],
-        ]);
-        if (!isset($data['phone']) || $data['phone']) {
-            return Json::fail('请输入手机号');
-        }
-        if (!check_phone($data['phone'])) {
-            return Json::fail('请输入正确的手机号');
-        }
-        if (!isset($data['verify_code']) || $data['verify_code']) {
-            return Json::fail('请先获取短信验证码');
-        }
-        $result = $this->crmebPlatHandle->fotget($data['phone'], $data['verify_code']);
-        return Json::success('修改成功', $result);
-    }
-
-    /**
-     * 获取消费记录
-     */
-    public function record()
-    {
-        [$type, $page, $limit] = UtilService::getMore([
-            ['type', 'sms'],
-            ['page', 1],
-            ['limit', 20]
-        ], null, true);
-        $result = $this->crmebPlatHandle->record($type, $page, $limit);
-        if ($type == 'expr_query') {
-            $express = ExpressService::expressList();
-            $express = array_combine(array_column($express, 'code'), $express);
-            foreach ($result['data'] as $key => $value) {
-                $result['data'][$key]['name'] = $express[$value['code']]['name'] ?? '';
-                $result['data'][$key]['num'] = $value['content']['num'] ?? '';
-            }
-        }
-        return Json::successlayui($result);
-    }
-
-    /**
-     * @return string
-     * @throws \Exception
-     */
-    public function meal()
-    {
-        if (!CacheModel::getDbCache($this->cacheKey, '')) {
-            return redirect(Url('login')->build() . '?url=meal');
-        }
-        return $this->fetch();
-    }
-
-    /**
-     * 获取套餐列表
-     */
-    public function get_meal()
-    {
-        [$type] = UtilService::getMore([
-            ['type', 'sms']
-        ], null, true);
-        return Json::success($this->crmebPlatHandle->meal($type));
-    }
-
-    /**
-     * 获取支付二维码
-     * @return string
-     * @throws \Exception
-     */
-    public function pay()
-    {
-        [$meal_id, $price, $num, $type, $pay_type] = UtilService::postMore([
-            ['meal_id', 0],
-            ['price', ''],
-            ['num', 0],
-            ['type', ''],
-            ['pay_type', 'weixin']
-        ], null, true);
-        if (!$meal_id) {
-            return Json::fail('请选择套餐');
-        }
-        return Json::success($this->crmebPlatHandle->pay($type, $meal_id, $price, $num, $pay_type));
-    }
-
-
-    /**
-     * 保存一号通配置
-     */
-    public function save_basics($data)
-    {
-        if ($data) {
-            CacheService::clear();
-            foreach ($data as $k => $v) {
-                ConfigModel::edit(['value' => json_encode($v)], $k, 'menu_name');
-            }
-        }
-        return true;
-    }
-
-    /**
-     * 开通短信服务页面
-     * @return string
-     * @throws \Exception
-     */
-    public function sms_open()
-    {
-        try {
-            $info = $this->crmebPlatHandle->info();
-        } catch (\Throwable $e) {
-            $info = [];
-        }
-        $this->assign('info', $info);
-        return $this->fetch();
-    }
-
-    /**
-     * 处理开通短信服务
-     */
-    public function go_sms_open()
-    {
-        [$sign] = UtilService::postMore([
-            ['sign', '']
-        ], null, true);
-        if (!$sign) {
-            return Json::fail('请输入短信签名');
-        }
-        return Json::success('开通成功', $this->smsHandle->setSign($sign)->open());
-    }
-
-    /**
-     * 短信账户信息
-     */
-    public function sms_info()
-    {
-        return Json::success($this->smsHandle->info());
-    }
-
-    /**
-     * 修改签名页面
-     * @return string
-     * @throws \Exception
-     */
-    public function sms_modify()
-    {
-        return $this->fetch();
-    }
-
-    /**
-     * 处理修改签名
-     */
-    public function go_sms_modify()
-    {
-        [$sign] = UtilService::postMore([
-            ['sign', '']
-        ], null, true);
-        if (!$sign) {
-            return Json::fail('请输入短信签名');
-        }
-        return Json::success($this->smsHandle->modify($sign));
-    }
-
-    /**
-     * 短信模版页面
-     */
-    public function sms_temp()
-    {
-        if (!CacheModel::getDbCache($this->cacheKey, '')) {
-            return redirect(Url('login')->build() . '?url=sms_temp');
-        }
-        [$type] = UtilService::getMore([
-            ['type', 'temps'],
-        ], null, true);
-        $this->assign('type', $type);
-        return $this->fetch();
-    }
-
-    /**
-     * 显示创建资源表单页.
-     *
-     * @return string
-     * @throws \FormBuilder\exception\FormBuilderException
-     */
-    public function create()
-    {
-        $field = [
-            FormBuilder::input('title', '模板名称'),
-            FormBuilder::textarea('text', '模板内容示例', '您的验证码是:{$code},有效期为{$time}分钟。如非本人操作,可不用理会。(模板中的{$code}和{$time}需要替换成对应的变量,请开发者知晓。修改此项无效!)')->readonly(true),
-            FormBuilder::input('content', '模板内容')->type('textarea'),
-            FormBuilder::radio('type', '模板类型', 1)->options([['label' => '验证码', 'value' => 1], ['label' => '通知', 'value' => 2], ['label' => '推广', 'value' => 3]])
-        ];
-        $form = FormBuilder::make_post_form('申请短信模板', $field, Url::buildUrl('go_sms_temps_apply'), 2);
-        $this->assign(compact('form'));
-        return $this->fetch('public/form-builder');
-    }
-
-    /**
-     * 短信模版
-     */
-    public function get_sms_temps()
-    {
-        [$page, $limit, $temp_type] = UtilService::getMore([
-            ['page', 1],
-            ['limit', 20],
-            ['temp_type', ''],
-        ], null, true);
-        return Json::successlayui($this->smsHandle->temps($page, $limit, $temp_type));
-    }
-
-    /**
-     * 短信模版申请记录
-     */
-    public function get_sms_appls()
-    {
-        [$temp_type, $page, $limit] = UtilService::getMore([
-            ['temp_type', ''],
-            ['page', 1],
-            ['limit', 20]
-        ], null, true);
-        return Json::successlayui($this->smsHandle->applys($temp_type, $page, $limit));
-    }
-
-    /**
-     * 短信发送记录
-     */
-    public function sms_record()
-    {
-        [$record_id] = UtilService::getMore([
-            ['record_id', 0],
-        ], null, true);
-        return Json::success($this->smsHandle->record($record_id));
-    }
-
-    /**
-     * 模版申请页面
-     * @return string
-     * @throws \Exception
-     */
-    public function sms_temps_apply()
-    {
-        return $this->fetch();
-    }
-
-    /**
-     * 处理申请模版
-     */
-    public function go_sms_temps_apply()
-    {
-        [$type, $title, $content] = UtilService::getMore([
-            ['type', 1],
-            ['title', ''],
-            ['content', '']
-        ], null, true);
-        if (!$type) {
-            return Json::fail('请选择模版类型');
-        }
-        if (!$title) {
-            return Json::fail('请输入模版标题');
-        }
-        if (!$content) {
-            return Json::fail('请输入模版内容');
-        }
-        $this->smsHandle->apply($title, $content, $type);
-        return Json::success('申请成功');
-    }
-
-    /**
-     * 开通物流服务页面
-     * @return string
-     * @throws \Exception
-     */
-    public function express_open()
-    {
-        return $this->fetch();
-    }
-
-    /**
-     * 处理开通物流服务
-     */
-    public function go_express_open()
-    {
-        return Json::success('开通成功', $this->expressHandle->open());
-    }
-
-    /**
-     * 获取快递公司列表
-     */
-    public function express_list()
-    {
-        [$type, $page, $limit] = UtilService::postMore([
-            ['sign', 1],
-            ['page', 1],
-            ['limit', 10]
-        ], null, true);
-        return Json::success($this->expressHandle->express($type, $page, $limit));
-    }
-
-    /**
-     * 获取电子面单模版
-     */
-    public function express_temp()
-    {
-        [$com, $page, $limit] = UtilService::postMore([
-            ['com', 0],
-            ['page', 1],
-            ['limit', 10]
-        ], null, true);
-        if (!$com) {
-            return Json::fail('请选择快递');
-        }
-        return Json::success($this->expressHandle->temp($com, $page, $limit));
-    }
-
-    /**
-     * 开通复制商品
-     */
-    public function go_copy_open()
-    {
-        return Json::success($this->productHandle->open());
-    }
-}

+ 0 - 65
app/admin/controller/sms/SmsAdmin.php

@@ -1,65 +0,0 @@
-<?php
-
-namespace app\admin\controller\sms;
-
-use app\admin\controller\AuthController;
-use app\admin\model\system\SystemConfig;
-use crmeb\services\{
-    CacheService, HttpService, JsonService, sms\Sms, UtilService
-};
-
-/**
- * 短信账号
- * Class SmsAdmin
- * @package app\admin\controller\sms
- */
-class SmsAdmin extends AuthController
-{
-    /**
-     * @return string
-     */
-    public function index()
-    {
-        return $this->fetch();
-    }
-
-    public function captcha()
-    {
-        if (!request()->isPost()) return JsonService::fail('发送失败');
-        $phone = request()->param('phone');
-        if (!trim($phone)) return JsonService::fail('请填写手机号');
-        $sms = new Sms('yunxin');
-        $res = json_decode(HttpService::getRequest($sms->getSmsUrl(), compact('phone')), true);
-        if (!isset($res['status']) && $res['status'] !== 200)
-            return JsonService::fail(isset($res['data']['message']) ? $res['data']['message'] : $res['msg']);
-        return JsonService::success(isset($res['data']['message']) ? $res['data']['message'] : '发送成功');
-    }
-
-    /**
-     * 修改/注册短信平台账号
-     */
-    public function save()
-    {
-        list($account, $password, $phone, $code, $url, $sign) = UtilService::postMore([
-            ['account', ''],
-            ['password', ''],
-            ['phone', ''],
-            ['code', ''],
-            ['url', ''],
-            ['sign', ''],
-        ], null, true);
-        $signLen = mb_strlen(trim($sign));
-        if (!strlen(trim($account))) return JsonService::fail('请填写账号');
-        if (!strlen(trim($password))) return JsonService::fail('请填写密码');
-        if (!$signLen) return JsonService::fail('请填写短信签名');
-        if ($signLen > 8) return JsonService::fail('短信签名最长为8位');
-        if (!strlen(trim($code))) return JsonService::fail('请填写验证码');
-        if (!strlen(trim($url))) return JsonService::fail('请填写域名');
-        $sms = new Sms('yunxin');
-        $status = $sms->register($account, md5(trim($password)), $url, $phone, $code, $sign);
-        if ($status['status'] == 400) return JsonService::fail('短信平台:' . $status['msg']);
-        CacheService::clear();
-        SystemConfig::setConfigSmsInfo($account, $password);
-        return JsonService::success('短信平台:' . $status['msg']);
-    }
-}

+ 0 - 82
app/admin/controller/sms/SmsPay.php

@@ -1,82 +0,0 @@
-<?php
-
-namespace app\admin\controller\sms;
-
-use think\facade\Route;
-use app\admin\controller\AuthController;
-use crmeb\services\{
-    sms\Sms, FormBuilder, JsonService, UtilService
-};
-
-/**
- * 短信购买
- * Class SmsPay
- * @package app\admin\controller\sms
- */
-class SmsPay extends AuthController
-{
-    /**
-     * @var Sms
-     */
-    protected $smsHandle;
-
-    protected function initialize()
-    {
-        parent::initialize(); // TODO: Change the autogenerated stub
-        $this->smsHandle = new Sms('yunxin', [
-            'sms_account' => sys_config('sms_account'),
-            'sms_token' => sys_config('sms_token'),
-            'site_url' => sys_config('site_url')
-        ]);
-    }
-
-    /**
-     * 显示资源列表
-     * @return string
-     */
-    public function index()
-    {
-        if (!$this->smsHandle->isLogin()) return redirect(url('sms.smsConfig/index').'?type=4&tab_id=18');
-        return $this->fetch();
-    }
-
-    /**
-     *  获取账号信息
-     */
-    public function number()
-    {
-        $countInfo = $this->smsHandle->count();
-        if ($countInfo['status'] == 400) return JsonService::fail($countInfo['msg']);
-        return JsonService::success($countInfo['data']);
-    }
-
-    /**
-     *  获取支付套餐
-     */
-    public function price()
-    {
-        list($page, $limit) = UtilService::getMore([
-            ['page', 1],
-            ['limit', 20],
-        ], null, true);
-        $mealInfo = $this->smsHandle->meal($page, $limit);
-        if ($mealInfo['status'] == 400) return JsonService::fail($mealInfo['msg']);
-        return JsonService::success($mealInfo['data']['data']);
-    }
-
-    /**
-     * 获取支付码
-     */
-    public function pay()
-    {
-        list($payType, $mealId, $price) = UtilService::postMore([
-            ['payType', 'weixin'],
-            ['mealId', 0],
-            ['price', 0],
-        ], null, true);
-        $payInfo = $this->smsHandle->pay($payType, $mealId, $price, $this->adminId);
-        if ($payInfo['status'] == 400) return JsonService::fail($payInfo['msg']);
-        return JsonService::success($payInfo['data']);
-    }
-
-}

+ 0 - 1008
app/admin/controller/store/CopyTaobao.php

@@ -1,1008 +0,0 @@
-<?php
-/**
- * Project: 快速复制 淘宝、天猫、1688、京东 商品到CRMEB系统
- * Author: 有一片天 <810806442@qq.com>  微信:szktor
- * Date: 2019-04-25
- */
-
-namespace app\admin\controller\store;
-
-use app\admin\controller\AuthController;
-use think\exception\PDOException;
-use crmeb\traits\CurdControllerTrait;
-use crmeb\services\{CacheService, HttpService, JsonService, UtilService};
-use app\admin\model\system\{
-    SystemAttachment, SystemAttachmentCategory
-};
-use app\admin\model\store\{
-    StoreCategory as CategoryModel, StoreDescription, StoreProduct as ProductModel, StoreProductAttr, StoreProductCate
-};
-use crmeb\services\upload\Upload;
-use crmeb\services\product\Product;
-
-/**
- * 产品管理
- * Class StoreProduct
- * @package app\admin\controller\store
- */
-class CopyTaobao extends AuthController
-{
-
-    use CurdControllerTrait;
-
-    protected $bindModel = ProductModel::class;
-    //错误信息
-    protected $errorInfo = true;
-    //产品默认字段
-    protected $productInfo = [
-        'cate_id' => '',
-        'store_name' => '',
-        'store_info' => '',
-        'unit_name' => '件',
-        'price' => 0,
-        'keyword' => '',
-        'ficti' => 0,
-        'ot_price' => 0,
-        'give_integral' => 0,
-        'postage' => 0,
-        'cost' => 0,
-        'image' => '',
-        'slider_image' => '',
-        'add_time' => 0,
-        'stock' => 0,
-        'description' => '',
-        'soure_link' => '',
-        'temp_id' => 0
-    ];
-    //抓取网站主域名
-    protected $grabName = [
-        'taobao',
-        '1688',
-        'tmall',
-        'jd'
-    ];
-    //远程下载附件图片分类名称
-    protected $AttachmentCategoryName = '远程下载';
-
-    //cookie 采集前请配置自己的 cookie,获取方式浏览器登录平台,F12或查看元素 network->headers 查看Request Headers 复制cookie 到下面变量中
-    protected $webcookie = [
-        //淘宝
-        'taobao' => 'cookie: miid=8289590761042824660; thw=cn; cna=bpdDExs9KGgCAXuLszWnEXxS; hng=CN%7Czh-CN%7CCNY%7C156; tracknick=taobaorongyao; _cc_=WqG3DMC9EA%3D%3D; tg=0; enc=WQPStocTopRI3wEBOPpj8VUDkqSw4Ph81ASG9053SgG8xBMzaOuq6yMe8KD4xPBlNfQST7%2Ffsk9M9GDtGmn6iQ%3D%3D; t=4bab065740d964a05ad111f5057078d4; cookie2=1965ea371faf24b163093f31af4120c2; _tb_token_=5d3380e119d6e; v=0; mt=ci%3D-1_1; _m_h5_tk=61bf01c61d46a64c98209a7e50e9e1df_1572349453522; _m_h5_tk_enc=9d9adfcbd7af7e2274c9b331dc9bae9b; l=dBgc_jG4vxuski7DBOCgCuI8aj7TIIRAguPRwN0viOCKUxT9CgCDAJt5v8PWVNKO7t1nNetzvui3udLHRntW6KTK6MK9zd9snxf..; isg=BJWVXJ3FZGyiWUENfGCuywlwpJePOkncAk8hmRc6WoxbbrVg3-Jadf0uODL97mFc',
-        //阿里巴巴 1688
-        'alibaba' => '',
-        //天猫 可以和淘宝一样
-        'tmall' => 'cookie: miid=8289590761042824660; thw=cn; cna=bpdDExs9KGgCAXuLszWnEXxS; hng=CN%7Czh-CN%7CCNY%7C156; tracknick=taobaorongyao; _cc_=WqG3DMC9EA%3D%3D; tg=0; enc=WQPStocTopRI3wEBOPpj8VUDkqSw4Ph81ASG9053SgG8xBMzaOuq6yMe8KD4xPBlNfQST7%2Ffsk9M9GDtGmn6iQ%3D%3D; t=4bab065740d964a05ad111f5057078d4; cookie2=1965ea371faf24b163093f31af4120c2; _tb_token_=5d3380e119d6e; v=0; mt=ci%3D-1_1; _m_h5_tk=61bf01c61d46a64c98209a7e50e9e1df_1572349453522; _m_h5_tk_enc=9d9adfcbd7af7e2274c9b331dc9bae9b; l=dBgc_jG4vxuski7DBOCgCuI8aj7TIIRAguPRwN0viOCKUxT9CgCDAJt5v8PWVNKO7t1nNetzvui3udLHRntW6KTK6MK9zd9snxf..; isg=BJWVXJ3FZGyiWUENfGCuywlwpJePOkncAk8hmRc6WoxbbrVg3-Jadf0uODL97mFc',
-        //京东 可不用配置
-        'jd' => ''
-    ];
-
-    //请求平台名称 taobao alibaba tmall jd
-    protected $webnname = 'taobao';
-
-    /**
-     * 显示资源
-     * @return html
-     */
-    public function index()
-    {
-        $list = CategoryModel::getTierList(null, 1);
-        $menus = [];
-        foreach ($list as $menu) {
-            $menus[] = ['value' => $menu['id'], 'label' => $menu['html'] . $menu['cate_name'], 'disabled' => $menu['pid'] == 0];//,'disabled'=>$menu['pid']== 0];
-        }
-        $this->assign('menus', $menus);
-        $this->assign('is_layui', 1);
-        return $this->fetch();
-    }
-
-    /**
-     * 付费采集页面
-     * @return html
-     */
-    public function product()
-    {
-        $list = CategoryModel::getTierList(null, 1);
-        $menus = [];
-        foreach ($list as $menu) {
-            $menus[] = ['value' => $menu['id'], 'label' => $menu['html'] . $menu['cate_name'], 'disabled' => $menu['pid'] == 0];//,'disabled'=>$menu['pid']== 0];
-        }
-        $this->assign('menus', $menus);
-        $this->assign('is_layui', 1);
-        return $this->fetch();
-    }
-
-    /**
-     * 付费采集请求
-     */
-    public function get_product_info()
-    {
-        list($link, $type) = UtilService::postMore([
-            ['link', ''],
-            ['type', '']
-        ], $this->request, true);
-        $cache = app()->make(CacheService::class);
-        $product = new Product('copy', ['account' => sys_config('sms_account'), 'secret' => sys_config('sms_token')]);
-        $key = md5($link);
-        $info = $cache->get($key);
-        if(!$info){
-            $info = $product->goods($link);
-            $cache->set($key,$info,7200);
-        }
-        $info = array_merge($this->productInfo,$info);
-        return JsonService::successful($info);
-    }
-
-    /*
-     * 设置错误信息
-     * @param string $msg 错误信息
-     * */
-    public function setErrorInfo($msg = '')
-    {
-        $this->errorInfo = $msg;
-        return false;
-    }
-
-    /*
-     * 设置字符串字符集
-     * @param string $str 需要设置字符集的字符串
-     * @return string
-     * */
-    public function Utf8String($str)
-    {
-        $encode = mb_detect_encoding($str, array("ASCII", 'UTF-8', "GB2312", "GBK", 'BIG5'));
-        if (strtoupper($encode) == 'UTF-8') {
-
-        } else if (strtolower($encode) == 'cp936') {
-//            $str = iconv('latin1//IGNORE', 'utf-8', $str);
-            $str = mb_convert_encoding($str, 'utf-8', 'GBK');
-        } else {
-            $str = mb_convert_encoding($str, 'utf-8', $encode);
-        }
-        return $str;
-    }
-
-    /**
-     * 获取资源,并解析出对应的商品参数
-     * @return json
-     */
-    public function get_request_contents()
-    {
-        list($link) = UtilService::postMore([
-            ['link', '']
-        ], $this->request, true);
-        $url = $this->checkurl($link);
-        if ($url === false) return JsonService::fail($this->errorInfo);
-        $this->errorInfo = true;
-        $html = $this->curl_Get($url, 60);
-        if (!$html) return JsonService::fail('商品HTML信息获取失败');
-        $html = $this->Utf8String($html);
-        preg_match('/<title>([^<>]*)<\/title>/', $html, $title);
-        //商品标题
-        $this->productInfo['store_name'] = isset($title['1']) ? str_replace(['-淘宝网', '-tmall.com天猫', ' - 阿里巴巴', ' ', '-', '【图片价格品牌报价】京东', '京东', '【行情报价价格评测】'], '', trim($title['1'])) : '';
-        $this->productInfo['store_info'] = $this->productInfo['store_name'];
-        try {
-            //获取url信息
-            $pathinfo = pathinfo($url);
-            if (!isset($pathinfo['dirname'])) return JsonService::fail('解析URL失败');
-            //提取域名
-            $parse_url = parse_url($pathinfo['dirname']);
-            if (!isset($parse_url['host'])) return JsonService::fail('获取域名失败');
-            //获取第一次.出现的位置
-            $strLeng = strpos($parse_url['host'], '.') + 1;
-            //截取域名中的真实域名不带.com后的
-            $funsuffix = substr($parse_url['host'], $strLeng, strrpos($parse_url['host'], '.') - $strLeng);
-            if (!in_array($funsuffix, $this->grabName)) return JsonService::fail('您输入的地址不在复制范围内!');
-            //设拼接设置产品函数
-            $funName = "setProductInfo" . ucfirst($funsuffix);
-            //执行方法
-            if (method_exists($this, $funName))
-                $this->$funName($html);
-            else
-                return JsonService::fail('设置产品函数不存在');
-            if (!$this->productInfo['slider_image']) return JsonService::fail('未能获取到商品信息,请确保商品信息有效!');
-            return JsonService::successful($this->productInfo);
-        } catch (\Exception $e) {
-            return JsonService::fail('系统错误', ['line' => $e->getLine(), 'meass' => $e->getMessage()]);
-        }
-    }
-
-    /**
-     * 淘宝设置产品
-     * @param $html
-     */
-    public function setProductInfoTaobao($html)
-    {
-        $this->webnname = 'taobao';
-        //获取轮播图
-        $images = $this->getTaobaoImg($html);
-        $images = array_merge(is_array($images) ? $images : []);
-        $this->productInfo['slider_image'] = isset($images['gaoqing']) ? $images['gaoqing'] : (array)$images;
-        $this->productInfo['slider_image'] = array_slice($this->productInfo['slider_image'], 0, 5);
-        //获取产品详情请求链接
-        $link = $this->getTaobaoDesc($html);
-        //获取请求内容
-        $desc_json = HttpService::getRequest($link);
-        //转换字符集
-        $desc_json = $this->Utf8String($desc_json);
-        //截取掉多余字符
-        $this->productInfo['test'] = $desc_json;
-        $desc_json = str_replace('var desc=\'', '', $desc_json);
-        $desc_json = str_replace(["\n", "\t", "\r"], '', $desc_json);
-        $content = substr($desc_json, 0, -2);
-        $this->productInfo['description'] = $content;
-        //获取详情图
-        $description_images = $this->decodedesc($this->productInfo['description']);
-        $this->productInfo['description_images'] = is_array($description_images) ? $description_images : [];
-        $this->productInfo['image'] = is_array($this->productInfo['slider_image']) && isset($this->productInfo['slider_image'][0]) ? $this->productInfo['slider_image'][0] : '';
-    }
-
-    /**
-     * 天猫设置产品
-     * @param $html
-     */
-    public function setProductInfoTmall($html)
-    {
-        $this->webnname = 'tmall';
-        //获取轮播图
-        $images = $this->getTianMaoImg($html);
-        $images = array_merge(is_array($images) ? $images : []);
-        $this->productInfo['slider_image'] = $images;
-        $this->productInfo['slider_image'] = array_slice($this->productInfo['slider_image'], 0, 5);
-        $this->productInfo['image'] = is_array($this->productInfo['slider_image']) && isset($this->productInfo['slider_image'][0]) ? $this->productInfo['slider_image'][0] : '';
-        //获取产品详情请求链接
-        $link = $this->getTianMaoDesc($html);
-        //获取请求内容
-        $desc_json = HttpService::getRequest($link);
-        //转换字符集
-        $desc_json = $this->Utf8String($desc_json);
-        //截取掉多余字符
-        $desc_json = str_replace('var desc=\'', '', $desc_json);
-        $desc_json = str_replace(["\n", "\t", "\r"], '', $desc_json);
-        $content = substr($desc_json, 0, -2);
-        $this->productInfo['description'] = $content;
-        //获取详情图
-        $description_images = $this->decodedesc($this->productInfo['description']);
-        $this->productInfo['description_images'] = is_array($description_images) ? $description_images : [];
-    }
-
-    /**
-     * 1688设置产品
-     * @param $html
-     */
-    public function setProductInfo1688($html)
-    {
-        $this->webnname = 'alibaba';
-        //获取轮播图
-        $images = $this->get1688Img($html);
-        if (isset($images['gaoqing'])) {
-            $images['gaoqing'] = array_merge($images['gaoqing']);
-            $this->productInfo['slider_image'] = $images['gaoqing'];
-        } else
-            $this->productInfo['slider_image'] = $images;
-        if (!is_array($this->productInfo['slider_image'])) {
-            $this->productInfo['slider_image'] = [];
-        }
-        $this->productInfo['slider_image'] = array_slice($this->productInfo['slider_image'], 0, 5);
-        $this->productInfo['image'] = is_array($this->productInfo['slider_image']) && isset($this->productInfo['slider_image'][0]) ? $this->productInfo['slider_image'][0] : '';
-        //获取产品详情请求链接
-        $link = $this->get1688Desc($html);
-        //获取请求内容
-        $desc_json = HttpService::getRequest($link);
-        //转换字符集
-        $desc_json = $this->Utf8String($desc_json);
-        $this->productInfo['test'] = $desc_json;
-        //截取掉多余字符
-        $desc_json = str_replace('var offer_details=', '', $desc_json);
-        $desc_json = str_replace(["\n", "\t", "\r"], '', $desc_json);
-        $desc_json = substr($desc_json, 0, -1);
-        $descArray = json_decode($desc_json, true);
-        if (!isset($descArray['content'])) $descArray['content'] = '';
-        $this->productInfo['description'] = $descArray['content'];
-        //获取详情图
-        $description_images = $this->decodedesc($this->productInfo['description']);
-        $this->productInfo['description_images'] = is_array($description_images) ? $description_images : [];
-    }
-
-    /**
-     * JD设置产品
-     * @param string $html 网页内容
-     * */
-    public function setProductInfoJd($html)
-    {
-        $this->webnname = 'jd';
-        //获取产品详情请求链接
-        $desc_url = $this->getJdDesc($html);
-        //获取请求内容
-        $desc_json = HttpService::getRequest($desc_url);
-        //转换字符集
-        $desc_json = $this->Utf8String($desc_json);
-        //截取掉多余字符
-        if (substr($desc_json, 0, 8) == 'showdesc') $desc_json = str_replace('showdesc', '', $desc_json);
-        $desc_json = str_replace('data-lazyload=', 'src=', $desc_json);
-        $descArray = json_decode($desc_json, true);
-        if (!$descArray) $descArray = ['content' => ''];
-        //获取轮播图
-        $images = $this->getJdImg($html);
-        $images = array_merge(is_array($images) ? $images : []);
-        $this->productInfo['slider_image'] = $images;
-        $this->productInfo['image'] = is_array($this->productInfo['slider_image']) ? ($this->productInfo['slider_image'][0] ?? '') : '';
-        $this->productInfo['description'] = $descArray['content'];
-        //获取详情图
-        $description_images = $this->decodedesc($descArray['content']);
-        $this->productInfo['description_images'] = is_array($description_images) ? $description_images : [];
-    }
-
-    /**
-     * 检查淘宝,天猫,1688的商品链接
-     * @param $link
-     * @return bool|string
-     */
-    public function checkurl($link)
-    {
-        $link = strtolower(htmlspecialchars_decode($link));
-        if (!$link) return $this->setErrorInfo('请输入链接地址');
-        if (substr($link, 0, 4) != 'http') return $this->setErrorInfo('链接地址必须以http开头');
-        $arrLine = explode('?', $link);
-        if (!count($arrLine)) return $this->setErrorInfo('链接地址有误(ERR:1001)');
-        if (!isset($arrLine[1])) {
-            if (strpos($link, '1688') !== false && strpos($link, 'offer') !== false) return trim($arrLine[0]);
-            else if (strpos($link, 'item.jd') !== false) return trim($arrLine[0]);
-            else return $this->setErrorInfo('链接地址有误(ERR:1002)');
-        }
-        if (strpos($link, '1688') !== false && strpos($link, 'offer') !== false) return trim($arrLine[0]);
-        if (strpos($link, 'item.jd') !== false) return trim($arrLine[0]);
-        $arrLineValue = explode('&', $arrLine[1]);
-        if (!is_array($arrLineValue)) return $this->setErrorInfo('链接地址有误(ERR:1003)');
-        if (!strpos(trim($arrLine[0]), 'item.htm')) $this->setErrorInfo('链接地址有误(ERR:1004)');
-        //链接参数
-        $lastStr = '';
-        foreach ($arrLineValue as $k => $v) {
-            if (substr(strtolower($v), 0, 3) == 'id=') {
-                $lastStr = trim($v);
-                break;
-            }
-        }
-        if (!$lastStr) return $this->setErrorInfo('链接地址有误(ERR:1005)');
-        return trim($arrLine[0]) . '?' . $lastStr;
-    }
-
-    /*
-     * 保存图片保存产品信息
-     * */
-    public function save_product()
-    {
-        $data = UtilService::postMore([
-            ['cate_id', ''],
-            ['store_name', ''],
-            ['store_info', ''],
-            ['keyword', ''],
-            ['unit_name', ''],
-            ['image', ''],
-            ['slider_image', []],
-            ['price', ''],
-            ['ot_price', ''],
-            ['give_integral', ''],
-            ['postage', ''],
-            ['sales', ''],
-            ['ficti', ''],
-            ['stock', ''],
-            ['cost', ''],
-            ['description_images', []],
-            ['description', ''],
-            ['is_show', 0],
-            ['soure_link', ''],
-            ['temp_id', 0],
-        ]);
-
-        if (!$data['cate_id']) return JsonService::fail('请选择分类!');
-        if (!$data['store_name']) return JsonService::fail('请填写产品名称');
-        if (!$data['unit_name']) return JsonService::fail('请填写产品单位');
-        if (!$data['image']) return JsonService::fail('商品主图暂无,无法保存商品,您可选择其他链接进行复制产品');
-        if ($data['price'] == '' || $data['price'] < 0) return JsonService::fail('请输入产品售价');
-        if ($data['ot_price'] == '' || $data['ot_price'] < 0) return JsonService::fail('请输入产品市场价');
-        if ($data['stock'] == '' || $data['stock'] < 0) return JsonService::fail('请输入库存');
-        if (!$data['temp_id']) return JsonService::fail('请选择运费模板');
-        //查询附件分类
-        $AttachmentCategory = SystemAttachmentCategory::where('name', $this->AttachmentCategoryName)->find();
-        //不存在则创建
-        if (!$AttachmentCategory) $AttachmentCategory = SystemAttachmentCategory::create(['pid' => '0', 'name' => $this->AttachmentCategoryName, 'enname' => '']);
-        //生成附件目录
-        try {
-            if (make_path('attach', 3, true) === '')
-                return JsonService::fail('无法创建文件夹,请检查您的上传目录权限:' . app()->getRootPath() . 'public' . DS . 'uploads' . DS . 'attach' . DS);
-
-        } catch (\Exception $e) {
-            return JsonService::fail($e->getMessage() . '或无法创建文件夹,请检查您的上传目录权限:' . app()->getRootPath() . 'public' . DS . 'uploads' . DS . 'attach' . DS);
-        }
-        ini_set("max_execution_time", 600);
-        //开始图片下载处理
-        ProductModel::beginTrans();
-        try {
-            //放入主图
-            $images = [
-                ['w' => 305, 'h' => 305, 'line' => $data['image'], 'valuename' => 'image']
-            ];
-            //放入轮播图
-            foreach ($data['slider_image'] as $item) {
-                $value = ['w' => 640, 'h' => 640, 'line' => $item, 'valuename' => 'slider_image', 'isTwoArray' => true];
-                array_push($images, $value);
-            }
-            //执行下载
-            $res = $this->uploadImage($images, false, 0, $AttachmentCategory['id']);
-            if (!is_array($res)) return JsonService::fail($this->errorInfo ? $this->errorInfo : '保存图片失败');
-            if (isset($res['image'])) $data['image'] = $res['image'];
-            if (isset($res['slider_image'])) $data['slider_image'] = $res['slider_image'];
-            $data['slider_image'] = count($data['slider_image']) ? json_encode($data['slider_image']) : '';
-            //替换并下载详情里面的图片默认下载全部图片
-            $data['description'] = preg_replace('#<style>.*?</style>#is', '', $data['description']);
-            $data['description'] = $this->uploadImage($data['description_images'], $data['description'], 1, $AttachmentCategory['id']);
-            unset($data['description_images']);
-            $description = $data['description'];
-            unset($data['description']);
-            $data['add_time'] = time();
-            $cate_id = explode(',', $data['cate_id']);
-            //产品存在
-            if ($productInfo = ProductModel::where('soure_link', $data['soure_link'])->find()) {
-                $productInfo->slider_image = $data['slider_image'];
-                $productInfo->image = $data['image'];
-                $productInfo->store_name = $data['store_name'];
-                StoreDescription::saveDescription($description, $productInfo->id);
-                $productInfo->save();
-                ProductModel::commitTrans();
-                return JsonService::successful('商品存在,信息已被更新成功');
-            } else {
-                //不存在时新增
-                if ($productId = ProductModel::insertGetId($data)) {
-                    $cateList = [];
-                    foreach ($cate_id as $cid) {
-                        $cateList [] = ['product_id' => $productId, 'cate_id' => $cid, 'add_time' => time()];
-                    }
-                    StoreProductCate::insertAll($cateList);
-                    $attr = [
-                        [
-                            'value' => '规格',
-                            'detailValue' => '',
-                            'attrHidden' => '',
-                            'detail' => ['默认']
-                        ]
-                    ];
-                    $detail[0]['value1'] = '规格';
-                    $detail[0]['detail'] = ['规格' => '默认'];
-                    $detail[0]['price'] = $data['price'];
-                    $detail[0]['stock'] = $data['stock'];
-                    $detail[0]['cost'] = $data['cost'];
-                    $detail[0]['pic'] = $data['image'];
-                    $detail[0]['ot_price'] = $data['price'];
-                    $attr_res = StoreProductAttr::createProductAttr($attr, $detail, $productId);
-                    if ($attr_res) {
-                        StoreDescription::saveDescription($description, $productId);
-                        ProductModel::commitTrans();
-                        return JsonService::successful('生成产品成功');
-                    } else {
-                        ProductModel::rollbackTrans();
-                        return JsonService::fail(StoreProductAttr::getErrorInfo('生成产品失败'));
-                    }
-                } else {
-                    ProductModel::rollbackTrans();
-                    return JsonService::fail('生成产品失败');
-                }
-            }
-        } catch (PDOException $e) {
-            ProductModel::rollbackTrans();
-            return JsonService::fail('插入数据库错误', ['line' => $e->getLine(), 'messag' => $e->getMessage()]);
-        } catch (\Exception $e) {
-            ProductModel::rollbackTrans();
-            return JsonService::fail('系统错误', ['line' => $e->getLine(), 'messag' => $e->getMessage(), 'file' => $e->getFile()]);
-        }
-    }
-
-    /*
-     * 上传图片处理
-     * @param array $image 图片路径
-     * @param int $uploadType 上传方式 0=远程下载
-     * */
-    public function uploadImage(array $images = [], $html = '', $uploadType = 0, $AttachmentCategoryId = 0)
-    {
-        $uploadImage = [];
-        $siteUrl = sys_config('site_url');
-        switch ($uploadType) {
-            case 0:
-                foreach ($images as $item) {
-                    //下载图片文件
-                    if ($item['w'] && $item['h'])
-                        $uploadValue = $this->downloadImage($item['line'], '', 0, 30, $item['w'], $item['h']);
-                    else
-                        $uploadValue = $this->downloadImage($item['line']);
-                    //下载成功更新数据库
-                    if (is_array($uploadValue)) {
-                        //TODO 拼接图片地址
-                        if ($uploadValue['image_type'] == 1) $imagePath = $siteUrl . $uploadValue['path'];
-                        else $imagePath = $uploadValue['path'];
-                        //写入数据库
-                        if (!$uploadValue['is_exists'] && $AttachmentCategoryId) SystemAttachment::attachmentAdd($uploadValue['name'], $uploadValue['size'], $uploadValue['mime'], $imagePath, $imagePath, $AttachmentCategoryId, $uploadValue['image_type'], time(), 1);
-                        //组装数组
-                        if (isset($item['isTwoArray']) && $item['isTwoArray'])
-                            $uploadImage[$item['valuename']][] = $imagePath;
-                        else
-                            $uploadImage[$item['valuename']] = $imagePath;
-                    }
-                }
-                break;
-            case 1:
-                preg_match_all('#<img.*?src="([^"]*)"[^>]*>#i', $html, $match);
-                if (isset($match[1])) {
-                    foreach ($match[1] as $item) {
-                        if (is_int(strpos($item, 'http')))
-                            $arcurl = $item;
-                        else
-                            $arcurl = 'http://' . ltrim($item, '\//');
-                        $uploadValue = $this->downloadImage($arcurl);
-                        //下载成功更新数据库
-                        if (is_array($uploadValue)) {
-                            //TODO 拼接图片地址
-                            if ($uploadValue['image_type'] == 1) $imagePath = $siteUrl . $uploadValue['path'];
-                            else $imagePath = $uploadValue['path'];
-                            //写入数据库
-                            if (!$uploadValue['is_exists'] && $AttachmentCategoryId) SystemAttachment::attachmentAdd($uploadValue['name'], $uploadValue['size'], $uploadValue['mime'], $imagePath, $imagePath, $AttachmentCategoryId, $uploadValue['image_type'], time(), 1);
-                            //替换图片
-                            $html = str_replace($item, $imagePath, $html);
-                        } else {
-                            //替换掉没有下载下来的图片
-                            $html = preg_replace('#<img.*?src="' . $item . '"*>#i', '', $html);
-                        }
-                    }
-                }
-                return $html;
-                break;
-            default:
-                return $this->setErrorInfo('上传方式错误');
-                break;
-        }
-        return $uploadImage;
-    }
-
-    //提取商品描述中的所有图片
-    public function decodedesc($desc = '')
-    {
-        $desc = trim($desc);
-        if (!$desc) return '';
-        preg_match_all('/<img[^>]*?src="([^"]*?)"[^>]*?>/i', $desc, $match);
-        if (!isset($match[1]) || count($match[1]) <= 0) {
-            preg_match_all('/:url(([^"]*?));/i', $desc, $match);
-            if (!isset($match[1]) || count($match[1]) <= 0) return $desc;
-        } else {
-            preg_match_all('/:url(([^"]*?));/i', $desc, $newmatch);
-            if (isset($newmatch[1]) && count($newmatch[1]) > 0) $match[1] = array_merge($match[1], $newmatch[1]);
-        }
-        $match[1] = array_unique($match[1]); //去掉重复
-        foreach ($match[1] as $k => &$v) {
-            $_tmp_img = str_replace([')', '(', ';'], '', $v);
-            $_tmp_img = strpos($_tmp_img, 'http') ? $_tmp_img : 'http:' . $_tmp_img;
-            if (strpos($v, '?')) {
-                $_tarr = explode('?', $v);
-                $_tmp_img = trim($_tarr[0]);
-            }
-            $_urls = str_replace(['\'', '"'], '', $_tmp_img);
-            if ($this->_img_exists($_urls)) $v = $_urls;
-        }
-        return $match[1];
-    }
-
-    //获取京东商品组图
-    public function getJdImg($html = '')
-    {
-        //获取图片服务器网址
-        preg_match('/<img(.*?)id="spec-img"(.*?)data-origin=\"(.*?)\"[^>]*>/', $html, $img);
-        if (!isset($img[3])) return '';
-        $info = parse_url(trim($img[3]));
-        if (!$info['host']) return '';
-        if (!$info['path']) return '';
-        $_tmparr = explode('/', trim($info['path']));
-        $url = 'http://' . $info['host'] . '/' . $_tmparr[1] . '/' . str_replace(['jfs', ' '], '', trim($_tmparr[2]));
-        preg_match('/imageList:(.*?)"],/is', $html, $img);
-        if (!isset($img[1])) {
-            return '';
-        }
-        $_arr = explode(',', $img[1]);
-        foreach ($_arr as $k => &$v) {
-            $_str = $url . str_replace(['"', '[', ']', ' '], '', trim($v));
-            if (strpos($_str, '?')) {
-                $_tarr = explode('?', $_str);
-                $_str = trim($_tarr[0]);
-            }
-            if ($this->_img_exists($_str)) {
-                $v = $_str;
-            } else {
-                unset($_arr[$k]);
-            }
-        }
-        return array_unique($_arr);
-    }
-
-    //获取京东商品描述
-    public function getJdDesc($html = '')
-    {
-        preg_match('/,(.*?)desc:([^<>]*)\',/i', $html, $descarr);
-        if (!isset($descarr[1]) && !isset($descarr[2])) return '';
-        $tmpArr = explode(',', $descarr[2]);
-        if (count($tmpArr) > 0) {
-            $descarr[2] = trim($tmpArr[0]);
-        }
-        $replace_arr = ['\'', '\',', ' ', ',', '/*', '*/'];
-        if (isset($descarr[2])) {
-            $d_url = str_replace($replace_arr, '', $descarr[2]);
-            return $this->formatDescUrl(strpos($d_url, 'http') ? $d_url : 'http:' . $d_url);
-        }
-        $d_url = str_replace($replace_arr, '', $descarr[1]);
-        $d_url = $this->formatDescUrl($d_url);
-        $d_url = rtrim(rtrim($d_url, "?"), "&");
-        return substr($d_url, 0, 4) == 'http' ? $d_url : 'http:' . $d_url;
-    }
-
-    //处理下京东商品描述网址
-    public function formatDescUrl($url = '')
-    {
-        if (!$url) return '';
-        $url = substr($url, 0, 4) == 'http' ? $url : 'http:' . $url;
-        if (!strpos($url, '&')) {
-            $_arr = explode('?', $url);
-            if (!is_array($_arr) || count($_arr) <= 0) return $url;
-            return trim($_arr[0]);
-        } else {
-            $_arr = explode('&', $url);
-        }
-        if (!is_array($_arr) || count($_arr) <= 0) return $url;
-        unset($_arr[count($_arr) - 1]);
-        $new_url = '';
-        foreach ($_arr as $k => $v) {
-            $new_url .= $v . '&';
-        }
-        return !$new_url ? $url : $new_url;
-    }
-
-    //获取1688商品组图
-    public function get1688Img($html = '')
-    {
-        preg_match('/<ul class=\"nav nav-tabs fd-clr\">(.*?)<\/ul>/is', $html, $img);
-        if (!isset($img[0])) {
-            return '';
-        }
-        preg_match_all('/preview":"(.*?)\"\}\'>/is', $img[0], $arrb);
-        if (!isset($arrb[1]) || count($arrb[1]) <= 0) {
-            return '';
-        }
-        $thumb = [];
-        $gaoqing = [];
-        $res = ['thumb' => '', 'gaoqing' => ''];  //缩略图片和高清图片
-        foreach ($arrb[1] as $k => $v) {
-            $_str = str_replace(['","original":"'], '*', $v);
-            $_arr = explode('*', $_str);
-            if (is_array($_arr) && isset($_arr[0]) && isset($_arr[1])) {
-                if (strpos($_arr[0], '?')) {
-                    $_tarr = explode('?', $_arr[0]);
-                    $_arr[0] = trim($_tarr[0]);
-                }
-                if (strpos($_arr[1], '?')) {
-                    $_tarr = explode('?', $_arr[1]);
-                    $_arr[1] = trim($_tarr[0]);
-                }
-                if ($this->_img_exists($_arr[0])) $thumb[] = trim($_arr[0]);
-                if ($this->_img_exists($_arr[1])) $gaoqing[] = trim($_arr[1]);
-            }
-        }
-        $res = ['thumb' => array_unique($thumb), 'gaoqing' => array_unique($gaoqing)];  //缩略图片和高清图片
-        return $res;
-    }
-
-    //获取1688商品描述
-    public function get1688Desc($html = '')
-    {
-        preg_match('/data-tfs-url="([^<>]*)data-enable="true"/', $html, $descarr);
-        if (!isset($descarr[1])) return '';
-        return str_replace(['"', ' '], '', $descarr[1]);
-    }
-
-    //获取天猫商品组图
-    public function getTianMaoImg($html = '')
-    {
-        $pic_size = '430';
-        preg_match('/<img[^>]*id="J_ImgBooth"[^r]*rc=\"([^"]*)\"[^>]*>/', $html, $img);
-        if (isset($img[1])) {
-            $_arr = explode('x', $img[1]);
-            $filename = $_arr[count($_arr) - 1];
-            $pic_size = intval(substr($filename, 0, 3));
-        }
-        preg_match('|<ul id="J_UlThumb" class="tb-thumb tm-clear">(.*)</ul>|isU', $html, $match);
-        preg_match_all('/<img src="(.*?)" \//', $match[1], $images);
-        if (!isset($images[1])) return '';
-        foreach ($images[1] as $k => &$v) {
-            $tmp_v = trim($v);
-            $_arr = explode('x', $tmp_v);
-            $_fname = $_arr[count($_arr) - 1];
-            $_size = intval(substr($_fname, 0, 3));
-            if (strpos($tmp_v, '://')) {
-                $_arr = explode(':', $tmp_v);
-                $r_url = trim($_arr[1]);
-            } else {
-                $r_url = $tmp_v;
-            }
-            $str = str_replace($_size, $pic_size, $r_url);
-            if (strpos($str, '?')) {
-                $_tarr = explode('?', $str);
-                $str = trim($_tarr[0]);
-            }
-            $_i_url = strpos($str, 'http') ? $str : 'http:' . $str;
-            if ($this->_img_exists($_i_url)) {
-                $v = $_i_url;
-            } else {
-                unset($images[1][$k]);
-            }
-        }
-        return array_unique($images[1]);
-    }
-
-    //获取天猫商品描述
-    public function getTianMaoDesc($html = '')
-    {
-        preg_match('/descUrl":"([^<>]*)","httpsDescUrl":"/', $html, $descarr);
-        if (!isset($descarr[1])) {
-            preg_match('/httpsDescUrl":"([^<>]*)","fetchDcUrl/', $html, $descarr);
-            if (!isset($descarr[1])) return '';
-        }
-        return strpos($descarr[1], 'http') ? $descarr[1] : 'http:' . $descarr[1];
-    }
-
-    //获取淘宝商品组图
-    public function getTaobaoImg($html = '')
-    {
-        preg_match('/auctionImages([^<>]*)"]/', $html, $imgarr);
-        if (!isset($imgarr[1])) return '';
-        $arr = explode(',', $imgarr[1]);
-        foreach ($arr as $k => &$v) {
-            $str = trim($v);
-            $str = str_replace(['"', ' ', '', ':['], '', $str);
-            if (strpos($str, '?')) {
-                $_tarr = explode('?', $str);
-                $str = trim($_tarr[0]);
-            }
-            $_i_url = strpos($str, 'http') ? $str : 'http:' . $str;
-            if ($this->_img_exists($_i_url)) {
-                $v = $_i_url;
-            } else {
-                unset($arr[$k]);
-            }
-        }
-        return array_unique($arr);
-    }
-
-    //获取淘宝商品描述
-    public function getTaobaoDesc($html = '')
-    {
-        preg_match('/descUrl([^<>]*)counterApi/', $html, $descarr);
-        if (!isset($descarr[1])) return '';
-        $arr = explode(':', $descarr[1]);
-        $url = [];
-        foreach ($arr as $k => $v) {
-            if (strpos($v, '//')) {
-                $str = str_replace(['\'', ',', ' ', '?', ':'], '', $v);
-                $url[] = trim($str);
-            }
-        }
-        if ($url) {
-            return strpos($url[0], 'http') ? $url[0] : 'http:' . $url[0];
-        } else {
-            return '';
-        }
-    }
-
-    /**
-     * GET 请求
-     * @param string $url
-     */
-    public function curl_Get($url = '', $time_out = 25)
-    {
-        if (!$url) return '';
-        $ch = curl_init();
-        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查  
-        if (stripos($url, "https://") !== FALSE) {
-            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);  // 从证书中检查SSL加密算法是否存在
-        }
-        $headers = ['user-agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36'];
-        if ($this->webnname) {
-            $headers[] = $this->webcookie["$this->webnname"];
-        }
-
-        curl_setopt($ch, CURLOPT_URL, $url);
-        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
-        curl_setopt($ch, CURLOPT_TIMEOUT, $time_out);
-        $response = curl_exec($ch);
-        if ($error = curl_error($ch)) {
-            return false;
-        }
-        curl_close($ch);
-//        return mb_convert_encoding($response, 'utf-8', 'auto');
-        return $response;
-    }
-
-    //检测远程文件是否存在
-    public function _img_exists($url = '')
-    {
-        ini_set("max_execution_time", 0);
-        $str = @file_get_contents($url, 0, null, 0, 1);
-        if (strlen($str) <= 0) return false;
-        if ($str)
-            return true;
-        else
-            return false;
-    }
-
-    //TODO 下载图片
-    public function downloadImage($url = '', $name = '', $type = 0, $timeout = 30, $w = 0, $h = 0)
-    {
-        if (!strlen(trim($url))) return '';
-        if (!strlen(trim($name))) {
-            //TODO 获取要下载的文件名称
-            $downloadImageInfo = $this->getImageExtname($url);
-            if (!$this->checkExtname($url, $downloadImageInfo['ext_name'])) {
-                return JsonService::fail('文件后缀不合法');
-            }
-            $name = $downloadImageInfo['file_name'];
-            if (!strlen(trim($name))) return '';
-        }
-        //TODO 获取远程文件所采用的方法
-        if ($type) {
-            $ch = curl_init();
-            curl_setopt($ch, CURLOPT_URL, $url);
-            curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
-            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
-            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //TODO 跳过证书检查
-            if (stripos($url, "https://") !== FALSE) curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);  //TODO 从证书中检查SSL加密算法是否存在
-            curl_setopt($ch, CURLOPT_HTTPHEADER, array('user-agent:' . $_SERVER['HTTP_USER_AGENT']));
-            if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);//TODO 是否采集301、302之后的页面
-            $content = curl_exec($ch);
-            curl_close($ch);
-        } else {
-            try {
-                ob_start();
-                readfile($url);
-                $content = ob_get_contents();
-                ob_end_clean();
-            } catch (\Exception $e) {
-                return $e->getMessage();
-            }
-        }
-        $size = strlen(trim($content));
-        if (!$content || $size <= 2) return '图片流获取失败';
-        $date_dir = date('Y') . DS . date('m') . DS . date('d');
-        $upload_type = sys_config('upload_type', 1);
-        $upload = new Upload((int)$upload_type, [
-            'accessKey' => sys_config('accessKey'),
-            'secretKey' => sys_config('secretKey'),
-            'uploadUrl' => sys_config('uploadUrl'),
-            'storageName' => sys_config('storage_name'),
-            'storageRegion' => sys_config('storage_region'),
-        ]);
-        $info = $upload->to('attach/' . $date_dir)->validate()->stream($content, $name);
-        if ($info === false) {
-            return $upload->getError();
-        }
-        $imageInfo = $upload->getUploadInfo();
-        $date['path'] = str_replace('\\', '/', $imageInfo['dir']);
-        $date['name'] = $imageInfo['name'];
-        $date['size'] = $imageInfo['size'];
-        $date['mime'] = $imageInfo['type'];
-        $date['image_type'] = $upload_type;
-        $date['is_exists'] = false;
-        return $date;
-    }
-
-    //获取即将要下载的图片扩展名
-    public function getImageExtname($url = '', $ex = 'jpg')
-    {
-        $_empty = ['file_name' => '', 'ext_name' => $ex];
-        if (!$url) return $_empty;
-        if (strpos($url, '?')) {
-            $_tarr = explode('?', $url);
-            $url = trim($_tarr[0]);
-        }
-        $arr = explode('.', $url);
-        if (!is_array($arr) || count($arr) <= 1) return $_empty;
-        $ext_name = trim($arr[count($arr) - 1]);
-        $ext_name = !$ext_name ? $ex : $ext_name;
-        return ['file_name' => md5($url) . '.' . $ext_name, 'ext_name' => $ext_name];
-    }
-
-    /**
-     * 验证下载图片文件后缀
-     * @param string $url
-     * @param string $ex
-     * @return bool
-     */
-    public function checkExtname($url = '', $ex = 'jpg')
-    {
-        if (in_array($ex, ['jpg', 'jpeg', 'gif', 'png', 'swf', 'bmp', 'pcx', 'tif', 'tga', 'exif'])) {
-            return true;
-        }
-        return false;
-    }
-
-    /*
-      $filepath = 绝对路径,末尾有斜杠 /
-      $name = 图片文件名
-      $maxwidth 定义生成图片的最大宽度(单位:像素)
-      $maxheight 生成图片的最大高度(单位:像素)
-      $filetype 最终生成的图片类型(.jpg/.png/.gif)
-    */
-    public function resizeImage($filepath = '', $name = '', $maxwidth = 0, $maxheight = 0)
-    {
-        $pic_file = $filepath . $name; //图片文件
-        $img_info = getimagesize($pic_file); //索引 2 是图像类型的标记:1 = GIF,2 = JPG,3 = PNG,4 = SWF,5 = PSD,
-        if ($img_info[2] == 1) {
-            $im = imagecreatefromgif($pic_file); //打开图片
-            $filetype = '.gif';
-        } elseif ($img_info[2] == 2) {
-            $im = imagecreatefromjpeg($pic_file); //打开图片
-            $filetype = '.jpg';
-        } elseif ($img_info[2] == 3) {
-            $im = imagecreatefrompng($pic_file); //打开图片
-            $filetype = '.png';
-        } else {
-            return ['path' => $filepath, 'file' => $name, 'mime' => ''];
-        }
-        $file_name = md5('_tmp_' . microtime() . '_' . rand(0, 10)) . $filetype;
-        $pic_width = imagesx($im);
-        $pic_height = imagesy($im);
-        $resizewidth_tag = false;
-        $resizeheight_tag = false;
-        if (($maxwidth && $pic_width > $maxwidth) || ($maxheight && $pic_height > $maxheight)) {
-            if ($maxwidth && $pic_width > $maxwidth) {
-                $widthratio = $maxwidth / $pic_width;
-                $resizewidth_tag = true;
-            }
-            if ($maxheight && $pic_height > $maxheight) {
-                $heightratio = $maxheight / $pic_height;
-                $resizeheight_tag = true;
-            }
-            if ($resizewidth_tag && $resizeheight_tag) {
-                if ($widthratio < $heightratio)
-                    $ratio = $widthratio;
-                else
-                    $ratio = $heightratio;
-            }
-            if ($resizewidth_tag && !$resizeheight_tag)
-                $ratio = $widthratio;
-            if ($resizeheight_tag && !$resizewidth_tag)
-                $ratio = $heightratio;
-            $newwidth = $pic_width * $ratio;
-            $newheight = $pic_height * $ratio;
-            if (function_exists("imagecopyresampled")) {
-                $newim = imagecreatetruecolor($newwidth, $newheight);
-                imagecopyresampled($newim, $im, 0, 0, 0, 0, $newwidth, $newheight, $pic_width, $pic_height);
-            } else {
-                $newim = imagecreate($newwidth, $newheight);
-                imagecopyresized($newim, $im, 0, 0, 0, 0, $newwidth, $newheight, $pic_width, $pic_height);
-            }
-            if ($filetype == '.png') {
-                imagepng($newim, $filepath . $file_name);
-            } else if ($filetype == '.gif') {
-                imagegif($newim, $filepath . $file_name);
-            } else {
-                imagejpeg($newim, $filepath . $file_name);
-            }
-            imagedestroy($newim);
-        } else {
-            if ($filetype == '.png') {
-                imagepng($im, $filepath . $file_name);
-            } else if ($filetype == '.gif') {
-                imagegif($im, $filepath . $file_name);
-            } else {
-                imagejpeg($im, $filepath . $file_name);
-            }
-            imagedestroy($im);
-        }
-        @unlink($pic_file);
-        return ['path' => $filepath, 'file' => $file_name, 'mime' => $img_info['mime']];
-    }
-}

+ 1 - 1
app/models/system/Cache.php

@@ -7,7 +7,7 @@ use crmeb\basic\BaseModel;
 
 /**
  * 数据缓存
- * Class Express
+ * Class Cache
  * @package app\models\system
  */
 class Cache extends BaseModel

+ 7 - 7
crmeb/basic/BaseExpress.php

@@ -32,38 +32,38 @@ abstract class BaseExpress extends BaseStorage
     }
 
     /**
-     * 놓迦뺏
+     *
      * @param array $config
      * @return mixed|void
      */
     protected function initialize(array $config = [])
     {
-//        parent::initialize($config);
+        //parent::initialize($config);
     }
 
 
     /**
-     * 역繫륩蛟
+     *
      * @return mixed
      */
     abstract public function open();
 
-    /**膠직瀏吏
+    /*
      * @return mixed
      */
     abstract public function query($com, $num);
 
-    /**든綾충데
+    /**
      * @return mixed
      */
     abstract public function dump($data);
 
-    /**우뒵무鱇
+    /*
      * @return mixed
      */
     //abstract public function express($type, $page, $limit);
 
-    /**충데친겼
+    /**
      * @return mixed
      */
     abstract public function temp($com, $page, $limit);

+ 0 - 50
crmeb/basic/BaseProduct.php

@@ -1,50 +0,0 @@
-<?php
-/**
- * author:  songtao<375177628@qq.com>
- * Date: 2020/09/21
- */
-
-namespace crmeb\basic;
-
-use crmeb\services\AccessTokenServeService;
-
-/**
- * Class BaseProduct
- * @package crmeb\basic
- */
-abstract class BaseProduct extends BaseStorage
-{
-
-    /**
-     * access_token
-     * @var null
-     */
-    protected $accessToken = NULL;
-
-
-    public function __construct(string $name, AccessTokenServeService $accessTokenServeService, string $configFile)
-    {
-        $this->accessToken = $accessTokenServeService;
-    }
-
-    /**
-     * 初始化
-     * @param array $config
-     * @return mixed|void
-     */
-    protected function initialize(array $config = [])
-    {
-//        parent::initialize($config);
-    }
-
-    /**
-     * 开通服务
-     * @return mixed
-     */
-    abstract public function open();
-
-    /**复制商品
-     * @return mixed
-     */
-    abstract public function goods($url);
-}

+ 0 - 90
crmeb/basic/BaseSmss.php

@@ -1,90 +0,0 @@
-<?php
-/**
- * author:  songtao<375177628@qq.com>
- * Date: 2020/09/21
- */
-
-namespace crmeb\basic;
-
-use crmeb\services\AccessTokenServeService;
-
-/**
- * Class BaseSmss
- * @package crmeb\basic
- */
-abstract class BaseSmss extends BaseStorage
-{
-
-    /**
-     * access_token
-     * @var null
-     */
-    protected $accessToken = NULL;
-
-
-    public function __construct(string $name, AccessTokenServeService $accessTokenServeService, string $configFile)
-    {
-        $this->accessToken = $accessTokenServeService;
-        $this->name = $name;
-        $this->configFile = $configFile;
-        $this->initialize();
-    }
-
-    /**
-     * @param array $config
-     * @return mixed|void
-     */
-    protected function initialize(array $config = [])
-    {
-//        parent::initialize($config);
-    }
-
-
-    /**
-     * 开通服务
-     * @return mixed
-     */
-    abstract public function open();
-
-    /**
-     * 修改
-     * @return mixed
-     */
-    abstract public function modify($sign);
-
-    /**
-     * 信息
-     * @return mixed
-     */
-    abstract public function info();
-
-    /**
-     * 发送短信
-     * @return mixed
-     */
-    abstract public function send($phone, $templateId, $data);
-
-    /**
-     * 模版
-     * @return mixed
-     */
-    abstract public function temps($page, $limit);
-
-    /**
-     * 申请模版
-     * @return mixed
-     */
-    abstract public function apply($title, $content, $type);
-
-    /**
-     * 申请模版记录
-     * @return mixed
-     */
-    abstract public function applys($temp_type, $page, $limit);
-
-    /**
-     * 发送记录
-     * @return mixed
-     */
-    abstract public function record($record_id);
-}

+ 1 - 1
crmeb/services/AccessTokenServeService.php

@@ -42,7 +42,7 @@ class AccessTokenServeService extends HttpService
     /**
      * @var string
      */
-    protected $apiHost = 'http://sms.crmeb.net/api/';
+    protected $apiHost = 'http://sms.crmebxxx.net/api/';
 
     const USER_LOGIN = "user/login";
 

+ 0 - 245
crmeb/services/CrmebPlatService.php

@@ -1,245 +0,0 @@
-<?php
-/**
- * @author: zhypy<214681832@qq.com>
- * @day: 2020/10/15
- */
-
-namespace crmeb\services;
-
-
-class CrmebPlatService
-{
-    /**
-     * 验证码
-     */
-    const PLAT_CODE = 'user/code';
-    /**
-     * 平台注册
-     */
-    const PLAT_OPEN = 'user/register';
-    /**
-     * 用户信息
-     */
-    const PLAT_USER_INFO = 'user/info';
-    /**
-     * 修改密码
-     */
-    const PLAT_USER_MODIFY = 'user/modify';
-    /**
-     * 找回秘钥
-     */
-    const PLAT_USER_FORGET = 'user/forget';
-    /**
-     * 消费记录
-     */
-    const PLAT_BILL = 'user/bill';
-    /**
-     * 用量记录
-     */
-    const PlAT_RRCORD = 'user/record';
-    /**
-     * 套餐列表
-     */
-    const MEAL_LIST = 'meal/list';
-    /**
-     * 支付二维码
-     */
-    const MEAL_CODE = 'meal/code';
-    /**
-     * 账号
-     * @var null
-     */
-    protected $account = NULL;
-    /**
-     * 秘钥
-     * @var null
-     */
-    protected $sercet = NULL;
-    /**
-     * access_token
-     * @var null
-     */
-    protected $accessToken = NULL;
-
-
-    public function __construct($account = '', $sercet = '')
-    {
-        $this->accessToken = $this->getAccessToken($account, $sercet);
-    }
-
-    protected function getAccessToken($account, $sercet)
-    {
-        $this->account = $account ? $account : sys_config('sms_account');
-        $this->sercet = $sercet ? $sercet : sys_config('sms_token');
-        return new AccessTokenServeService($this->account, $this->sercet);
-    }
-
-    /**
-     * 获取验证码
-     * @param $phone
-     * @return bool|mixed
-     */
-    public function code($phone)
-    {
-        $param = [
-            'phone' => $phone
-        ];
-        return $this->accessToken->httpRequest(self::PLAT_CODE, $param, 'POST', false);
-    }
-
-    /**
-     * 注册
-     * @param $account
-     * @param $phone
-     * @param $password
-     * @param $verify_code
-     * @return bool
-     */
-    public function register($account, $phone, $password, $verify_code)
-    {
-        $param = [
-            'account' => $account,
-            'phone' => $phone,
-            'password' => md5($password),
-            'verify_code' => $verify_code
-        ];
-        $result = $this->accessToken->httpRequest(self::PLAT_OPEN, $param, 'POST', false);
-        return $result;
-    }
-
-    /**
-     * 登录
-     * @param $account
-     * @param $secret
-     * @return mixed
-     */
-    public function login($account, $secret)
-    {
-        $token = $this->getAccessToken($account, $secret)->getToken();
-        return $token;
-    }
-
-    /**
-     * 退出登录
-     * @param $account
-     * @param $secret
-     * @return mixed
-     */
-    public function loginOut()
-    {
-        return $this->accessToken->destroyToken();
-    }
-
-    /**
-     * 用户详情
-     * @return mixed
-     */
-    public function info()
-    {
-        $result = $this->accessToken->httpRequest(self::PLAT_USER_INFO);
-        return $result;
-    }
-
-    /**
-     * 修改秘钥
-     * @param $account
-     * @param $phone
-     * @param $password
-     * @param $verify_code
-     * @return bool
-     */
-    public function modify($account, $phone, $password, $verify_code)
-    {
-        $param = [
-            'account' => $account,
-            'phone' => $phone,
-            'password' => md5($password),
-            'verify_code' => $verify_code
-        ];
-        return $this->accessToken->httpRequest(self::PLAT_USER_MODIFY, $param, 'POST', false);
-    }
-
-    /**
-     * 找回秘钥
-     * @param $phone
-     * @param $verify_code
-     * @return mixed
-     */
-    public function forget($phone, $verify_code)
-    {
-        $param = [
-            'phone' => $phone,
-            'verify_code' => $verify_code
-        ];
-        $result = $this->accessToken->httpRequest(self::PLAT_USER_FORGET, $param, 'POST', false);
-        return $result;
-    }
-
-    /**
-     * 获取消费记录
-     * @param int $page
-     * @param int $limit
-     * @return mixed
-     */
-    public function bill($page = 0, $limit = 10)
-    {
-        $param = [
-            'page' => $page,
-            'limit' => $limit
-        ];
-        $result = $this->accessToken->httpRequest(self::PLAT_BILL, $param);
-        return $result;
-    }
-
-    /**
-     * 获取用量记录
-     * @param string $type
-     * @param int $page
-     * @param int $limit
-     * @return array|mixed
-     */
-    public function record($type = 'sms', $page = 0, $limit = 10)
-    {
-        $param = [
-            'type' => $type,
-            'page' => $page,
-            'limit' => $limit
-        ];
-        $result = $this->accessToken->httpRequest(self::PlAT_RRCORD, $param);
-        return $result;
-    }
-
-    /**
-     * 套餐列表
-     * @param string $type
-     * @return array|bool|mixed
-     */
-    public function meal($type = 'sms')
-    {
-        $param = [
-            'type' => $type
-        ];
-        return $this->accessToken->httpRequest(self::MEAL_LIST, $param);
-    }
-
-    /**
-     * 获取支付二维码
-     * @param $type
-     * @param $meal_id
-     * @param $price
-     * @param $num
-     * @param string $pay_type
-     * @return array|mixed
-     */
-    public function pay($type, $meal_id, $price, $num, $pay_type = 'weixin')
-    {
-        $param = [
-            'type' => $type,
-            'meal_id' => $meal_id,
-            'price' => $price,
-            'num' => $num,
-            'pay_type' => $pay_type
-        ];
-        return $this->accessToken->httpRequest(self::MEAL_CODE, $param);
-    }
-}

+ 0 - 229
crmeb/services/SMSService.php

@@ -1,229 +0,0 @@
-<?php
-
-namespace crmeb\services;
-
-/**
- * 短信服务
- * Class SMSService
- * @package crmeb\services
- */
-class SMSService
-{
-
-    // 短信账号
-    private static $SMSAccount;
-
-    // 短信token
-    private static $SMSToken;
-
-    public static $status;
-
-    // 短信请求地址
-    private static $SMSUrl = 'https://sms.crmeb.net/api/';
-
-    //短信支付回调地址
-    private static $payNotify;
-    //验证码
-    const VERIFICATION_CODE = 518076;
-    //支付成功
-    const PAY_SUCCESS_CODE = 520268;
-    //发货提醒
-    const DELIVER_GOODS_CODE = 520269;
-    //确认收货提醒
-    const TAKE_DELIVERY_CODE = 520271;
-    //管理员下单提醒
-    const ADMIN_PLACE_ORDER_CODE = 520272;
-    //管理员退货提醒
-    const ADMIN_RETURN_GOODS_CODE = 520274;
-    //管理员支付成功提醒
-    const ADMIN_PAY_SUCCESS_CODE = 520273;
-    //管理员确认收货
-    const ADMIN_TAKE_DELIVERY_CODE = 520422;
-
-    public function __construct()
-    {
-        self::$status = strlen(sys_config('sms_account')) != 0 ?? false && strlen(sys_config('sms_token')) != 0 ?? false;
-    }
-
-    public static function getConstants($code = '')
-    {
-        $oClass = new \ReflectionClass(__CLASS__);
-        $stants = $oClass->getConstants();
-        if ($code) return isset($stants[$code]) ? $stants[$code] : '';
-        else return $stants;
-    }
-
-    private static function auto()
-    {
-        self::$SMSAccount = sys_config('sms_account');
-        self::$SMSToken = md5(self::$SMSAccount . md5(sys_config('sms_token')));
-        self::$payNotify = sys_config('site_url') . '/api/sms/pay/notify';
-    }
-
-    /**
-     * 验证码接口
-     * @return string
-     */
-    public static function code()
-    {
-        return self::$SMSUrl . 'sms/captcha';
-    }
-
-
-    /**
-     * 短信注册
-     * @param $account
-     * @param $password
-     * @param $url
-     * @param $phone
-     * @param $code
-     * @param $sign
-     * @return mixed
-     */
-    public static function register($account, $password, $url, $phone, $code, $sign)
-    {
-        self::auto();
-        $data['account'] = $account;
-        $data['password'] = $password;
-        $data['url'] = $url;
-        $data['phone'] = $phone;
-        $data['sign'] = $sign;
-        $data['code'] = $code;
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/register', $data), true);
-    }
-
-    /**
-     * 公共短信模板列表
-     * @param array $data
-     * @return mixed
-     */
-    public static function publictemp(array $data)
-    {
-        self::auto();
-        $data['account'] = self::$SMSAccount;
-        $data['token'] = self::$SMSToken;
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/publictemp', $data), true);
-    }
-
-    /**
-     * 公共短信模板添加
-     * @param $id
-     * @param $tempId
-     * @return mixed
-     */
-    public static function use($id, $tempId)
-    {
-        self::auto();
-        $data['account'] = self::$SMSAccount;
-        $data['token'] = self::$SMSToken;
-        $data['id'] = $id;
-        $data['tempId'] = $tempId;
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/use', $data), true);
-    }
-
-    /**
-     * 发送短信
-     * @param $phone
-     * @param $template
-     * @param $param
-     * @return bool|string
-     */
-    public static function send($phone, $template, array $param)
-    {
-        self::auto();
-        $data['uid'] = self::$SMSAccount;
-        $data['token'] = self::$SMSToken;
-        $data['mobile'] = $phone;
-        $data['template'] = $template;
-        $data['param'] = json_encode($param);
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/send', $data), true);
-    }
-
-    /**
-     * 账号信息
-     * @return mixed
-     */
-    public static function count()
-    {
-        self::auto();
-        $data['account'] = self::$SMSAccount;
-        $data['token'] = self::$SMSToken;
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/userinfo', $data), true);
-    }
-
-    /**
-     * 支付套餐
-     * @param $page
-     * @param $limit
-     * @return mixed
-     */
-    public static function meal($page, $limit)
-    {
-        $data['page'] = $page;
-        $data['limit'] = $limit;
-        return json_decode(HttpService::getRequest(self::$SMSUrl . 'sms/meal', $data), true);
-    }
-
-    /**
-     * 支付码
-     * @param $payType
-     * @param $mealId
-     * @param $price
-     * @param $attach
-     * @return mixed
-     */
-    public static function pay($payType, $mealId, $price, $attach)
-    {
-        self::auto();
-        $data['uid'] = self::$SMSAccount;
-        $data['token'] = self::$SMSToken;
-        $data['payType'] = $payType;
-        $data['mealId'] = $mealId;
-        $data['notify'] = self::$payNotify;
-        $data['price'] = $price;
-        $data['attach'] = $attach;
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/mealpay', $data), true);
-    }
-
-    /**
-     * 申请模板消息
-     * @param $title
-     * @param $content
-     * @param $type
-     * @return mixed
-     */
-    public static function apply($title, $content, $type)
-    {
-        self::auto();
-        $data['account'] = self::$SMSAccount;
-        $data['token'] = self::$SMSToken;
-        $data['title'] = $title;
-        $data['content'] = $content;
-        $data['type'] = $type;
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/apply', $data), true);
-    }
-
-    /**
-     * 短信模板列表
-     * @param $data
-     * @return mixed
-     */
-    public static function template($data)
-    {
-        self::auto();
-        $data['account'] = self::$SMSAccount;
-        $data['token'] = self::$SMSToken;
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/template', $data), true);
-    }
-
-    /**
-     * 获取短息记录状态
-     * @param $record_id
-     * @return mixed
-     */
-    public static function getStatus($record_id)
-    {
-        $data['record_id'] = json_encode($record_id);
-        return json_decode(HttpService::postRequest(self::$SMSUrl . 'sms/status', $data), true);
-    }
-}

+ 0 - 1
crmeb/services/express/Express.php

@@ -17,7 +17,6 @@ use think\facade\Config;
 /**
  * Class Express
  * @package crmeb\services\express
- * @mixin \crmeb\services\express\storage\Express
  */
 class Express extends BaseManager
 {

+ 0 - 1
crmeb/services/express/storage/Express.php

@@ -9,7 +9,6 @@
 namespace crmeb\services\express\storage;
 use crmeb\basic\BaseExpress;
 use crmeb\exceptions\ApiException;
-use crmeb\services\AccessTokenServeService;
 
 /**
  * Class Express

+ 0 - 60
crmeb/services/product/Product.php

@@ -1,60 +0,0 @@
-<?php
-/**
- * Created by PhpStorm
- * User: song
- * Date: 2020/9/28/0028
- * Time: 16:14
- */
-
-namespace crmeb\services\product;
-
-use crmeb\basic\BaseManager;
-use crmeb\services\AccessTokenServeService;
-use think\facade\Config;
-use think\Container;
-
-
-/**
- * Class Product
- * @package crmeb\services\product
- * @mixin \crmeb\services\product\storage\Copy
- */
-class Product extends BaseManager
-{
-    /**
-     * 空间名
-     * @var string
-     */
-    protected $namespace = '\\crmeb\\services\\product\\storage\\';
-
-    /**
-     * 默认驱动
-     * @return mixed
-     */
-    protected function getDefaultDriver()
-    {
-        return Config::get('product.default', 'copy');
-    }
-
-    /**
-     * 获取类的实例
-     * @param $class
-     * @return mixed|void
-     */
-    protected function invokeClass($class)
-    {
-        if (!class_exists($class)) {
-            throw new \RuntimeException('class not exists: ' . $class);
-        }
-        $this->getConfigFile();
-
-        if (!$this->config) {
-            $this->config = Config::get($this->configFile . '.stores.' . $this->name, []);
-        }
-        $handleAccessToken = new AccessTokenServeService($this->config['account'] ?? '', $this->config['secret'] ?? '');
-        $handle = Container::getInstance()->invokeClass($class, [$this->name, $handleAccessToken, $this->configFile]);
-        $this->config = [];
-        return $handle;
-    }
-
-}

+ 0 - 56
crmeb/services/product/storage/Copy.php

@@ -1,56 +0,0 @@
-<?php
-/**
- * Created by PhpStorm
- * User: song
- * Date: 2020/9/28/0028
- * Time: 16:14
- */
-
-namespace crmeb\services\product\storage;
-
-use crmeb\basic\BaseProduct;
-
-
-/**
- * Class Copy
- * @package crmeb\services\product\storage
- */
-class Copy extends BaseProduct
-{
-
-    /**
-     * 是否开通
-     */
-    const PRODUCT_OPEN = 'copy/open';
-    /**
-     * 获取详情
-     */
-    const PRODUCT_GOODS = 'copy/goods';
-
-    /** 初始化
-     * @param array $config
-     */
-    protected function initialize(array $config = [])
-    {
-        parent::initialize($config);
-    }
-
-    /** 是否开通复制
-     * @return mixed
-     */
-    public function open()
-    {
-        return $this->accessToken->httpRequest(self::PRODUCT_OPEN, []);
-    }
-
-    /** 复制商品
-     * @return mixed
-     */
-    public function goods($url)
-    {
-        $param['url'] = $url;
-        return $this->accessToken->httpRequest(self::PRODUCT_GOODS, $param);
-    }
-
-
-}

+ 1 - 2
crmeb/services/sms/Sms.php

@@ -9,7 +9,7 @@ namespace crmeb\services\sms;
 
 use crmeb\basic\BaseManager;
 use crmeb\services\AccessTokenServeService;
-use crmeb\services\sms\storage\Yunxin;
+use crmeb\services\sms\storage\Aliyun;
 use think\Container;
 use think\facade\Config;
 
@@ -17,7 +17,6 @@ use think\facade\Config;
 /**
  * Class Sms
  * @package crmeb\services\sms
- * @mixin Yunxin
  */
 class Sms extends BaseManager
 {

+ 0 - 232
crmeb/services/sms/storage/Sms.php

@@ -1,232 +0,0 @@
-<?php
-/**
- * Created by PhpStorm
- * User: song
- * Date: 2020/9/28/0028
- * Time: 16:14
- */
-
-namespace crmeb\services\sms\storage;
-
-use crmeb\basic\BaseSmss;
-use crmeb\services\AccessTokenServeService;
-use think\exception\ValidateException;
-use think\facade\Config;
-
-
-/**
- * Class Copy
- * @package crmeb\services\product\storage
- */
-class Sms extends BaseSmss
-{
-
-    /**
-     * 开通
-     */
-    const SMS_OPEN = 'sms_v2/open';
-    /**
-     * 修改签名
-     */
-    const SMS_MODIFY = 'sms_v2/modify';
-    /**
-     * 用户信息
-     */
-    const SMS_INFO = 'sms_v2/info';
-    /**
-     * 发送短信
-     */
-    const SMS_SEND = 'sms_v2/send';
-    /**
-     * 短信模板
-     */
-    const SMS_TEMPS = 'sms_v2/temps';
-    /**
-     * 申请模板
-     */
-    const SMS_APPLY = 'sms_v2/apply';
-    /**
-     * 模板记录
-     */
-    const SMS_APPLYS = 'sms_v2/applys';
-    /**
-     * 发送记录
-     */
-    const SMS_RECORD = 'sms_v2/record';
-
-    /**
-     * 短信签名
-     * @var string
-     */
-    protected $sign = '';
-    /**
-     * 模板id
-     * @var array
-     */
-    protected $templateIds = [];
-
-    public function __construct()
-    {
-        $this->accessToken = $this->getAccessToken();
-        $this->templateIds = Config::get('sms.stores.sms.template_id', []);
-    }
-
-    protected function getAccessToken()
-    {
-        $this->account = sys_config('sms_account');
-        $this->sercet = sys_config('sms_token');
-        return new AccessTokenServeService($this->account, $this->sercet);
-    }
-
-    /** 初始化
-     * @param array $config
-     */
-    protected function initialize(array $config = [])
-    {
-        parent::initialize($config);
-    }
-
-    /**
-     * 提取模板code
-     * @param string $templateId
-     * @return null
-     */
-    protected function getTemplateCode(string $templateId)
-    {
-        return $this->templateIds[$templateId] ?? null;
-    }
-
-    /**
-     * 设置签名
-     * @param $sign
-     * @return $this
-     */
-    public function setSign($sign)
-    {
-        $this->sign = $sign;
-        return $this;
-    }
-
-    /**
-     * 开通服务
-     * @return array|bool|mixed
-     */
-    public function open()
-    {
-        $param = [
-            'sign' => $this->sign
-        ];
-        return $this->accessToken->httpRequest(self::SMS_OPEN, $param);
-    }
-
-    /**
-     * 修改签名
-     * @param $sign
-     * @return array|bool|mixed
-     */
-    public function modify($sign)
-    {
-        $param = [
-            'sign' => $sign
-        ];
-        return $this->accessToken->httpRequest(self::SMS_MODIFY, $param);
-    }
-
-    /**
-     * 获取用户信息
-     * @return array|bool|mixed
-     */
-    public function info()
-    {
-        return $this->accessToken->httpRequest(self::SMS_INFO, []);
-    }
-
-    /**
-     * 短信模版
-     * @param int $page
-     * @param int $limit
-     * @param $temp_type
-     * @return array|bool|mixed
-     */
-    public function temps($page = 1, $limit = 10, $temp_type = '')
-    {
-        $param = [
-            'page' => $page,
-            'limit' => $limit,
-            'temp_type' => $temp_type
-        ];
-        return $this->accessToken->httpRequest(self::SMS_TEMPS, $param);
-    }
-
-    /**
-     * 申请模版
-     * @param $title
-     * @param $content
-     * @param $type
-     * @return array|bool|mixed
-     */
-    public function apply($title, $content, $type)
-    {
-        $param = [
-            'title' => $title,
-            'content' => $content,
-            'type' => $type
-        ];
-        return $this->accessToken->httpRequest(self::SMS_APPLY, $param);
-    }
-
-    /**
-     * 申请记录
-     * @param $temp_type
-     * @param int $page
-     * @param int $limit
-     * @return array|bool|mixed
-     */
-    public function applys($temp_type, $page, $limit)
-    {
-        $param = [
-            'temp_type' => $temp_type,
-            'page' => $page,
-            'limit' => $limit
-        ];
-        return $this->accessToken->httpRequest(self::SMS_APPLYS, $param);
-    }
-
-    /**
-     * 发送短信
-     * @param $phone
-     * @param $template
-     * @param $param
-     * @return bool|string
-     */
-    public function send($phone, $templateId, $data = [])
-    {
-        if (!$phone) {
-            throw new ValidateException('手机号不能为空');
-        }
-        $param = [
-            'phone' => $phone
-        ];
-        $param['temp_id'] = $this->getTemplateCode($templateId);
-        if (is_null($param['temp_id'])) {
-            throw new ValidateException('模版ID不存在');
-        }
-        $param['param'] = json_encode($data);
-        return [
-            'data' => $this->accessToken->httpRequest(self::SMS_SEND, $param)
-        ];
-    }
-
-    /**
-     * 发送记录
-     * @param $record_id
-     * @return array|bool|mixed
-     */
-    public function record($record_id)
-    {
-        $param = [
-            'record_id' => $record_id
-        ];
-        return $this->accessToken->httpRequest(self::SMS_RECORD, $param);
-    }
-}

+ 0 - 255
crmeb/services/sms/storage/Yunxin.php

@@ -1,255 +0,0 @@
-<?php
-
-namespace crmeb\services\sms\storage;
-
-use crmeb\basic\BaseSms;
-use crmeb\services\HttpService;
-
-/**
- * 云信短信服务
- * Class SMSService
- * @package crmeb\services
- */
-class Yunxin extends BaseSms
-{
-
-    /**
-     * 短信账号
-     * @var string
-     */
-    protected $smsAccount;
-
-    /**
-     * 短信token
-     * @var string
-     */
-    protected $smsToken;
-
-    /**
-     * 是否登陆
-     * @var bool
-     */
-    protected $status;
-
-    /**
-     * 短信请求地址
-     * @var string
-     */
-    protected $smsUrl = 'https://sms.crmeb.net/api/';
-
-    /**
-     * 短信支付回调地址
-     * @var string
-     */
-    protected $payNotify;
-
-    /**
-     * 初始化
-     * @param array $config
-     * @return mixed|void
-     */
-    protected function initialize(array $config)
-    {
-        parent::initialize($config);
-        $this->smsAccount = $config['sms_account'] ?? null;
-        $this->smsToken = $config['sms_token'] ?? null;
-        $this->payNotify = ($config['site_url'] ?? '') . '/api/sms/pay/notify';
-        if ($this->smsAccount && $this->smsToken) {
-            $this->status = true;
-            $this->smsToken = md5($this->smsAccount . md5($this->smsToken));
-        } else {
-            $this->status = false;
-        }
-    }
-
-    /**
-     * 登陆状态
-     * @return bool
-     */
-    public function isLogin()
-    {
-        return $this->status;
-    }
-
-    /**
-     * 验证码接口
-     * @return string
-     */
-    public function getSmsUrl()
-    {
-        return $this->smsUrl . 'sms/captcha';
-    }
-
-
-    /**
-     * 短信注册
-     * @param $account
-     * @param $password
-     * @param $url
-     * @param $phone
-     * @param $code
-     * @param $sign
-     * @return mixed
-     */
-    public function register($account, $password, $url, $phone, $code, $sign)
-    {
-        $data['account'] = $account;
-        $data['password'] = $password;
-        $data['url'] = $url;
-        $data['phone'] = $phone;
-        $data['sign'] = $sign;
-        $data['code'] = $code;
-        return json_decode(HttpService::postRequest($this->smsUrl . 'sms/register', $data), true);
-    }
-
-    /**
-     * 公共短信模板列表
-     * @param array $data
-     * @return mixed
-     */
-    public function publictemp(array $data)
-    {
-        $data['account'] = $this->smsAccount;
-        $data['token'] = $this->smsToken;
-        return json_decode(HttpService::postRequest($this->smsUrl . 'sms/publictemp', $data), true);
-    }
-
-    /**
-     * 公共短信模板添加
-     * @param $id
-     * @param $tempId
-     * @return mixed
-     */
-    public function use($id, $tempId)
-    {
-        $data['account'] = $this->smsAccount;
-        $data['token'] = $this->smsToken;
-        $data['id'] = $id;
-        $data['tempId'] = $tempId;
-        return json_decode(HttpService::postRequest($this->smsUrl . 'sms/use', $data), true);
-    }
-
-    /**
-     * 发送短信
-     * @param $phone
-     * @param $template
-     * @param $param
-     * @return bool|string
-     */
-    public function send(string $phone, string $templateId, array $data = [])
-    {
-        if (!$phone) {
-            return $this->setError('Mobile number cannot be empty');
-        }
-        if (!$this->smsAccount) {
-            return $this->setError('Account does not exist');
-        }
-        if (!$this->smsToken) {
-            return $this->setError('Access token does not exist');
-        }
-        $formData['uid'] = $this->smsAccount;
-        $formData['token'] = $this->smsToken;
-        $formData['mobile'] = $phone;
-        $formData['template'] = $this->getTemplateCode($templateId);
-        if (is_null($formData['template'])) {
-            return $this->setError('Missing template number');
-        }
-        $formData['param'] = json_encode($data);
-        $resource = json_decode(HttpService::postRequest($this->smsUrl . 'sms/send', $formData), true);
-        if ($resource['status'] === 400) {
-            return $this->setError($resource['msg']);
-        }
-        return $resource;
-    }
-
-    /**
-     * 账号信息
-     * @return mixed
-     */
-    public function count()
-    {
-        return json_decode(HttpService::postRequest($this->smsUrl . 'sms/userinfo', [
-            'account' => $this->smsAccount,
-            'token' => $this->smsToken
-        ]), true);
-    }
-
-    /**
-     * 支付套餐
-     * @param $page
-     * @param $limit
-     * @return mixed
-     */
-    public function meal($page, $limit)
-    {
-        return json_decode(HttpService::getRequest($this->smsUrl . 'sms/meal', [
-            'page' => $page,
-            'limit' => $limit
-        ]), true);
-    }
-
-    /**
-     * 支付码
-     * @param $payType
-     * @param $mealId
-     * @param $price
-     * @param $attach
-     * @return mixed
-     */
-    public function pay($payType, $mealId, $price, $attach)
-    {
-        $data['uid'] = $this->smsAccount;
-        $data['token'] = $this->smsToken;
-        $data['payType'] = $payType;
-        $data['mealId'] = $mealId;
-        $data['notify'] = $this->payNotify;
-        $data['price'] = $price;
-        $data['attach'] = $attach;
-        return json_decode(HttpService::postRequest($this->smsUrl . 'sms/mealpay', $data), true);
-    }
-
-    /**
-     * 申请模板消息
-     * @param $title
-     * @param $content
-     * @param $type
-     * @return mixed
-     */
-    public function apply($title, $content, $type)
-    {
-        $data['account'] = $this->smsAccount;
-        $data['token'] = $this->smsToken;
-        $data['title'] = $title;
-        $data['content'] = $content;
-        $data['type'] = $type;
-        return json_decode(HttpService::postRequest($this->smsUrl . 'sms/apply', $data), true);
-    }
-
-    /**
-     * 短信模板列表
-     * @param $data
-     * @return mixed
-     */
-    public function template($data)
-    {
-        return json_decode(HttpService::postRequest($this->smsUrl . 'sms/template', $data + [
-                'account' => $this->smsAccount, 'token' => $this->smsToken
-            ]), true);
-    }
-
-    /**
-     * 获取短息记录状态
-     * @param $record_id
-     * @return mixed
-     */
-    public function getStatus(array $record_id)
-    {
-        $data['record_id'] = json_encode($record_id);
-        $res = json_decode(HttpService::postRequest($this->smsUrl . 'sms/status', $data), true);
-        if ($res['status'] != 200) {
-            return $this->setError('查询失败');
-        } else {
-            return $res['data'] ?? [];
-        }
-    }
-}

+ 0 - 6
vendor/xaboy/form-builder/README.md

@@ -33,12 +33,6 @@ PHP表单生成器,快速生成现代化的form表单。包含复选框、单
 >如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢!
 >本项目还在不断开发完善中,如有建议或问题请[在这里提出](https://github.com/xaboy/form-builder/issues/new)
 
-
-## 演示项目
-[开源的高品质微信商城](http://github.crmeb.net/u/xaboy)
-
-演示地址: [http://demo25.crmeb.net](http://demo25.crmeb.net) 账号:demo 密码:crmeb.com
-
 ## 使用建议
 1. 建议将静态资源加载方式从 CDN 加载修改为自己本地资源或自己信任的 CDN [静态资源链接](https://github.com/xaboy/form-builder/blob/master/src/Form.php#L89)
 2. 建议根据自己的业务逻辑重写默认的表单生成页 [默认表单生成页](https://github.com/xaboy/form-builder/tree/master/src/view)