5.0, // 默认发送配置 'default' => [ // 网关调用策略,默认:顺序调用 'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class, // 默认可用的发送网关 'gateways' => [ 'yunpian', 'aliyun', ], ], // 可用的网关配置 'gateways' => [ 'errorlog' => [ 'file' => runtime_path() . '/logs/' . date('Ymd') . '/easy-sms.log', ], 'aliyun' => [ 'access_key_id' => 'LTAI5t7mhH3ij2cNWs1zhPmv', 'access_key_secret' => 'gqo2wMpvi8h5bDBmCpMje6BaiXvcPu', 'sign_name' => '里海科技', ], //... ], ]; try { $easySms = new EasySms($config); $template = getenv('SMS_TEMPLATE'); $a = $easySms->send(18715753257, [ 'content' => '您的验证码为: 6379', 'template' => $template, 'data' => [ 'code' => 6379 ], ]); // d($a); }catch (NoGatewayAvailableException $exception){ throw new \Exception($exception->getExceptions()); } d($a,getenv('SMS_TEMPLATE')); $all_where['paid'] = 1; d(OrderLogic::dayPayPrice($all_where,date('Y-m-d',time()))); $uid=9; $a= PushService::push('wechat_mmp_'.$uid, $uid, ['type'=>'INDUSTRYMEMBERS','msg'=>'支付超时,订单已被取消,请重新提交订单','data'=>['id'=>5]]); return json($a); try { $a = new WechatTemplate(); $a->NewQuotationNotification(['openid' => 'ocqhF6UfFQXE-SbzbP5YVQJlQAh0', 'data1' => '阿萨', 'data2' => date('Y-m-d H:i:s'), 'data3' => '占山', 'data3' => 18982406440]); } catch (Exception $e) { d($e); } d(22); $auth_code = $this->request->get('code'); $pay = (new PayService()); $order = [ 'description' => '条码商品', 'out_trade_no' => (string)time(), 'payer' => [ 'auth_code' => (string)$auth_code ], 'amount' => [ 'total' => 1, ], 'scene_info' => [ "store_info" => [ 'id' => '1' ] ], ]; try { $a = $pay->wechat->pos($order); } catch (\Exception $th) { d($th); } d($a); $params = ['store_id' => 2, 'pay_type' => 17]; $a = StoreOrderLogic::createOrder([1], 0, null, $params); d($a); return json(['msg' => create_password(123456, '11d3')]); } /** * @notes 下载文件 */ public function download() { $params = (new GenerateTableValidate())->goCheck('download'); $result = GeneratorLogic::download($params['file']); if (false === $result) { return $this->fail(GeneratorLogic::getError() ?: '下载失败'); } return response()->download($result, 'webman-curd.zip'); } /** * @notes 获取app更新信息 */ public function app_update() { $find = Db::name('app_update')->where('type', 2)->order('id', 'desc')->findOrEmpty(); return $this->success('ok', $find); } /** * @notes 获取省列表 */ public function province() { $list = Db::name('geo_province')->select()->toArray(); return $this->success('ok', $list); } /** * @notes 获取市列表 */ public function city() { $province_code = $this->request->get('province_code'); $list = Db::name('geo_city')->where('province_code', $province_code)->select()?->toArray(); return $this->success('ok', $list); } /** * @notes 获取区列表 */ public function area() { $city_code = $this->request->get('city_code'); $list = Db::name('geo_area')->where('city_code', $city_code)->select()?->toArray(); return $this->success('ok', $list); } /** * @notes 获取街道列表 */ public function street() { $area_code = $this->request->get('area_code'); $list = Db::name('geo_street')->where('area_code', $area_code)->select()?->toArray(); return $this->success('ok', $list); } /** * @notes 获取村列表 */ public function village() { $area_code = $this->request->get('street_code'); $list = Db::name('geo_village')->where('street_code', $area_code)->select()?->toArray(); return $this->success('ok', $list); } /** * @notes 获取队列表 */ public function brigade() { $list = Db::name('geo_brigade')->select()?->toArray(); return $this->success('ok', $list); } /** * @notes 获取队列表 */ public function config() { $store_id = getenv('STORE_ID') ?? 1; $find = SystemStore::where('id', $store_id)->find(); $list = [ 'id' => $find['id'], 'store_name' => $find['name'], ]; return $this->success('ok', $list); } }