初始化代码
This commit is contained in:
111
app/publics/controller/AdminTmpl.php
Normal file
111
app/publics/controller/AdminTmpl.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
namespace app\publics\controller;
|
||||
use app\card\model\User;
|
||||
use app\publics\model\TmplConfig;
|
||||
use app\AdminRest;
|
||||
use app\publics\service\PublicsService;
|
||||
use longbingcore\permissions\AdminMenu;
|
||||
use longbingcore\wxcore\WxSetting;
|
||||
use longbingcore\wxcore\WxTmpl;
|
||||
use think\App;
|
||||
|
||||
|
||||
class AdminTmpl extends AdminRest
|
||||
{
|
||||
|
||||
protected $model;
|
||||
public function __construct(App $app) {
|
||||
parent::__construct($app);
|
||||
|
||||
$this->model = new TmplConfig();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2019-12-26 15:40
|
||||
* @功能说明: 添加模版消息 并返回模版id
|
||||
*/
|
||||
public function getTmplId(){
|
||||
|
||||
$input = $this->_input;
|
||||
//实列化模版订阅通知库类;
|
||||
$service_model = new WxTmpl($this->_uniacid);
|
||||
|
||||
$dis['id'] = $input['id'];
|
||||
//生成模版消息
|
||||
$tmpl_data = $service_model::addtmpl($dis);
|
||||
//返回结果
|
||||
if(isset($tmpl_data['errcode'])&&$tmpl_data['errcode']==0){
|
||||
//修改数据库
|
||||
$this->model->tmplUpdate($dis,['tmpl_id'=>$tmpl_data['priTmplId']]);
|
||||
|
||||
return $this->success($tmpl_data['priTmplId']);
|
||||
}else{
|
||||
return $this->error($tmpl_data['errmsg']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2019-12-30 11:08
|
||||
* @功能说明:生成数据库模版消息
|
||||
*/
|
||||
public function tmpList(){
|
||||
//获取模块名
|
||||
$input = $this->_input;
|
||||
|
||||
$tmpl_data = [] ;
|
||||
if(isset($input['model_name'])){
|
||||
$tmpl_data = PublicsService::getTmplByModelName($this->_uniacid , $input['model_name']) ;
|
||||
}
|
||||
return $this->success($tmpl_data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author jingshuixian
|
||||
* @DataTime: 2020/1/15 11:16
|
||||
* @功能说明:获取所有有权限的订阅消息配置列表
|
||||
*/
|
||||
public function tmpLists(){
|
||||
|
||||
$authModelList = AdminMenu::getAuthList($this->_uniacid);
|
||||
$tmpl_data = [] ;
|
||||
foreach ($authModelList as $key => $item ){
|
||||
|
||||
$modelTmplData = PublicsService::getTmplByModelName($this->_uniacid , $key ) ;
|
||||
|
||||
$tmpl_data = array_merge($tmpl_data , $modelTmplData ) ;
|
||||
|
||||
}
|
||||
|
||||
return $this->success($tmpl_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2019-12-26 18:38
|
||||
* @功能说明:商城模块编辑
|
||||
*/
|
||||
public function tmplUpdate(){
|
||||
$input = $this->_input;
|
||||
if(!empty($input)&&is_array($input)){
|
||||
foreach ($input as $value){
|
||||
$res = $this->model->tmplUpdate(['id'=>$value['id']],['tmpl_id'=>$value['tmpl_id'],'kidList'=>$value['kidList']]);
|
||||
}
|
||||
return $this->success($res);
|
||||
}else{
|
||||
return $this->error('参数错误');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
71
app/publics/controller/HttpAsyn.php
Normal file
71
app/publics/controller/HttpAsyn.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
namespace app\publics\controller;
|
||||
use app\BaseController;
|
||||
use app\card\service\UserService;
|
||||
use app\farm\model\CollageStart;
|
||||
use think\facade\Db;
|
||||
use think\facade\Log;
|
||||
use think\facade\Request;
|
||||
|
||||
class HttpAsyn extends BaseController {
|
||||
|
||||
|
||||
public function message(){
|
||||
|
||||
|
||||
$param = Request::param();
|
||||
|
||||
$data = json_decode($param['message'],true) ;
|
||||
|
||||
//try{
|
||||
switch ( $action = $data['action'] )
|
||||
{
|
||||
//发送消息服务通知
|
||||
case 'sendMessageWxServiceNotice':
|
||||
longbingSendMessageWxServiceNotice($data['message']);
|
||||
break;
|
||||
//发送普通服务通知
|
||||
case 'SendWxServiceNotice':
|
||||
longbingSendWxServiceNotice($data['count_id']);
|
||||
break;
|
||||
//发送普通服务通知
|
||||
case 'longbingSendWxServiceNotice':
|
||||
longbingSendWxServiceNotice($data['count_id']);
|
||||
break;
|
||||
case 'longbingSendWxServiceNoticeBase':
|
||||
longbingSendWxServiceNoticeBase($data['data']);
|
||||
break;
|
||||
case 'updatecollectionRate':
|
||||
//updatecollectionRate($data['client_id']);
|
||||
break;
|
||||
case 'updateCustomerRate':
|
||||
//updateCustomerRate($data['page'] ,$data['page_count']);
|
||||
break;
|
||||
case 'longbingCreateWxCode':
|
||||
longbingCreateWxCode($data['uniacid'] ,$data['data'] ,$data['page'] ,$data['type']);
|
||||
break;
|
||||
case 'longbingCreateSharePng':
|
||||
UserService::createHeaderQr($data['uniacid'],['staff_id'=> $data['user_id']]);
|
||||
longbingCreateSharePng($data['gData'] ,$data['user_id'] ,$data['uniacid']);
|
||||
break;
|
||||
case 'longbingSaveFormId':
|
||||
longbingSaveFormId($data['data']);
|
||||
break;
|
||||
case 'longbingCreateHeaderQr':
|
||||
UserService::createHeaderQr($data['uniacid'],['staff_id'=> $data['user_id']]);
|
||||
break;
|
||||
|
||||
case 'collageFailCancelOrder':
|
||||
|
||||
$collage_model = new CollageStart();
|
||||
|
||||
$collage_model->initAtv($data['pay_config']);
|
||||
break;
|
||||
}
|
||||
//}catch(Exception $e)
|
||||
//{}
|
||||
echo 'message ok ';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
40
app/publics/controller/IndexTmpl.php
Normal file
40
app/publics/controller/IndexTmpl.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
namespace app\publics\controller;
|
||||
use app\ApiRest;
|
||||
|
||||
use app\publics\model\TmplConfig;
|
||||
use longbingcore\wxcore\WxTmpl;
|
||||
use think\App;
|
||||
|
||||
|
||||
class IndexTmpl extends ApiRest
|
||||
{
|
||||
|
||||
protected $model;
|
||||
public function __construct(App $app) {
|
||||
parent::__construct($app);
|
||||
|
||||
$this->model = new TmplConfig();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2019-12-26 15:40
|
||||
* @功能说明: 获取模版消息
|
||||
*/
|
||||
public function getTmplId(){
|
||||
$input = $this->_input;
|
||||
$dis[] = ['uniacid','=',$this->_uniacid];
|
||||
$dis[] = ['tmpl_id','<>',0];
|
||||
$dis[] = ['tmpl_name','in',$input['tmpl_name']];
|
||||
$data = $this->model->tmplIdList($dis);
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
178
app/publics/controller/IndexWxPay.php
Normal file
178
app/publics/controller/IndexWxPay.php
Normal file
@@ -0,0 +1,178 @@
|
||||
<?php
|
||||
namespace app\shop\controller;
|
||||
use app\AdminRest;
|
||||
use app\ApiRest;
|
||||
use think\App;
|
||||
use app\shop\controller\IndexPayResunt;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
class IndexWxPay extends ApiRest
|
||||
{
|
||||
|
||||
protected $app;
|
||||
public function __construct ( App $app )
|
||||
{
|
||||
$this->app = $app;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $paymentApp
|
||||
* @param $openid
|
||||
* @param $uniacid
|
||||
* @param $body
|
||||
* @param $attach
|
||||
* @param $totalprice
|
||||
* @throws \WxPayException
|
||||
* 支付
|
||||
*/
|
||||
public function createWeixinPay($paymentApp , $openid , $uniacid , $body , $attach,$totalprice){
|
||||
global $_GPC, $_W;
|
||||
$setting['mini_appid'] = $paymentApp['app_id'];
|
||||
$setting['mini_appsecrept'] = $paymentApp['secret'];
|
||||
$setting['mini_mid'] = $paymentApp['payment']['merchant_id'];
|
||||
$setting['mini_apicode'] = $paymentApp['payment']['key'];
|
||||
$setting['apiclient_cert'] = $paymentApp['payment']['cert_path'];
|
||||
$setting['apiclient_cert_key'] = $paymentApp['payment']['key_path'];
|
||||
define('WX_APPID', $setting['mini_appid']);
|
||||
define('WX_MCHID', $setting['mini_mid']);
|
||||
define('WX_KEY', $setting['mini_apicode']);
|
||||
define('WX_APPSECRET', $setting['mini_appsecrept']);
|
||||
define('WX_SSLCERT_PATH', $setting['apiclient_cert']);
|
||||
define('WX_SSLKEY_PATH', $setting['apiclient_cert_key']);
|
||||
define('WX_CURL_PROXY_HOST', '0.0.0.0');
|
||||
define('WX_CURL_PROXY_PORT', 0);
|
||||
define('WX_REPORT_LEVENL', 0);
|
||||
|
||||
|
||||
require_once PAY_PATH . "/weixinpay/lib/WxPay.Api.php";
|
||||
require_once PAY_PATH . "/weixinpay/example/WxPay.JsApiPay.php";
|
||||
|
||||
$tools = new \JsApiPay();
|
||||
$input = new \WxPayUnifiedOrder();
|
||||
|
||||
$input->SetBody($body);
|
||||
$input->SetAttach(json_encode($attach));
|
||||
$input->SetOut_trade_no($attach['out_trade_no']);
|
||||
$input->SetTotal_fee($totalprice *100);
|
||||
$input->SetTime_start(date("YmdHis"));
|
||||
|
||||
$param_arr=[
|
||||
'i' => $uniacid,
|
||||
't' => $_GPC['t'],
|
||||
'v' => $_GPC['v'],
|
||||
'n' => APP_MODEL_NAME
|
||||
];
|
||||
$reply_path=json_encode($param_arr);
|
||||
//需要判断 是否是微擎的版本
|
||||
if(defined('IS_WEIQIN')){
|
||||
$path = "https://" . $_SERVER['HTTP_HOST'] ."/addons/".APP_MODEL_NAME."/core2/app/Common/wexinPay.php?params=".$reply_path;
|
||||
$paths = "https://" . $_SERVER['HTTP_HOST'] ."/addons/".APP_MODEL_NAME."/core2/app/Common/wexinPay.php?ck=789";
|
||||
$a = @file_get_contents($paths);
|
||||
if($a != 1){
|
||||
$this->errorMsg('发起支付失败');
|
||||
}
|
||||
}else{
|
||||
$path = "https://" . $_SERVER['HTTP_HOST'] ."/wexinPay.php?params=".$reply_path;
|
||||
$paths = "https://" . $_SERVER['HTTP_HOST'] ."/wexinPay.php?ck=789";
|
||||
$a = @file_get_contents($paths);
|
||||
if($a != 1){
|
||||
$this->errorMsg('发起支付失败');
|
||||
}
|
||||
}
|
||||
$this ->lb_logOutput('BaseApiPath:-----'.$path);
|
||||
$input->SetNotify_url($path);
|
||||
$input->SetTrade_type("JSAPI");
|
||||
$input->SetOpenid($openid);
|
||||
$order = \WxPayApi::unifiedOrder($input);
|
||||
if(!empty($order['return_code'])&&$order['return_code'] == 'FAIL'){
|
||||
$this->errorMsg($order['return_msg']);
|
||||
}
|
||||
$jsApiParameters = $tools->GetJsApiParameters($order);
|
||||
|
||||
$jsApiParameters = json_decode($jsApiParameters, true) ;
|
||||
if (!empty($jsApiParameters['return_code']))
|
||||
$this->errorMsg( '发起支付失败');
|
||||
return $jsApiParameters;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
* @param int $flag
|
||||
* @return void|null
|
||||
* 打印数据
|
||||
*/
|
||||
|
||||
public function lb_logOutput($data,$flag=0) {
|
||||
if($flag==0){
|
||||
return ;
|
||||
}
|
||||
//数据类型检测
|
||||
if (is_array($data)) {
|
||||
$data = json_encode($data);
|
||||
}
|
||||
$filename = "./".date("Y-m-d").".log";
|
||||
$str = date("Y-m-d H:i:s")." $data"."\r\n";
|
||||
file_put_contents($filename, $str, FILE_APPEND|LOCK_EX);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付回调
|
||||
*/
|
||||
|
||||
public function returnPay(){
|
||||
|
||||
$this->lb_logOutput("in--mingpianNotify");
|
||||
$xmlData = file_get_contents('php://input');
|
||||
if(empty($xmlData)){
|
||||
$xmlData = 'empty xmlData';
|
||||
}
|
||||
$this->lb_logOutput('xmlData in mingpian:-----'.$xmlData);
|
||||
|
||||
$this->lb_logOutput("in-mingpian2");
|
||||
global $_GPC;
|
||||
$xmlData = file_get_contents('php://input');
|
||||
$this->lb_logOutput('in-mingpian-$xmlData:-----'.$xmlData);
|
||||
//获取配置
|
||||
|
||||
if(defined( 'IS_WEIQIN' )){
|
||||
$uniacid=$_GPC['i'];
|
||||
}else{
|
||||
$uniacid = $_GET['i'];
|
||||
}
|
||||
|
||||
$paymentApp = $this->payConfig($uniacid);
|
||||
// dump($paymentApp);exit;
|
||||
$this->lb_logOutput('in-mingpian-uniacid:-----'.$uniacid);
|
||||
|
||||
$setting['mini_appid'] = $paymentApp['app_id'];
|
||||
$setting['mini_appsecrept'] = $paymentApp['secret'];
|
||||
$setting['mini_mid'] = $paymentApp['payment']['merchant_id'];
|
||||
$setting['mini_apicode'] = $paymentApp['payment']['key'];
|
||||
$setting['apiclient_cert'] = $paymentApp['payment']['cert_path'];
|
||||
$setting['apiclient_cert_key'] = $paymentApp['payment']['key_path'];
|
||||
|
||||
define('WX_APPID', $setting['mini_appid']);
|
||||
define('WX_MCHID', $setting['mini_mid']);
|
||||
define('WX_KEY', $setting['mini_apicode']);
|
||||
define('WX_APPSECRET', $setting['mini_appsecrept']);
|
||||
define('WX_SSLCERT_PATH', $setting['apiclient_cert']);
|
||||
define('WX_SSLKEY_PATH', $setting['apiclient_cert_key']);
|
||||
define('WX_CURL_PROXY_HOST', '0.0.0.0');
|
||||
define('WX_CURL_PROXY_PORT', 0);
|
||||
define('WX_REPORT_LEVENL', 0);
|
||||
require_once PAY_PATH.'/weixinpay/lib/WxOrderNotify.php';
|
||||
$WxPay = new \WxOrderNotify($this->app);
|
||||
$WxPay->Handle(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
17
app/publics/controller/Pay.php
Normal file
17
app/publics/controller/Pay.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace app\publics\controller;
|
||||
use app\BaseController;
|
||||
use app\card\service\UserService;
|
||||
use think\facade\Log;
|
||||
use think\facade\Request;
|
||||
|
||||
class Pay extends BaseController {
|
||||
|
||||
|
||||
public function notify(){
|
||||
|
||||
echo 'message ok ';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
252
app/publics/controller/SomeThing.php
Normal file
252
app/publics/controller/SomeThing.php
Normal file
@@ -0,0 +1,252 @@
|
||||
<?php
|
||||
namespace app\publics\controller;
|
||||
use app\AdminRest;
|
||||
use app\ApiRest;
|
||||
|
||||
use app\card\model\Job;
|
||||
use app\dynamic\model\CardUser;
|
||||
use app\dynamic\model\UserInfo;
|
||||
use app\publics\model\TmplConfig;
|
||||
use app\shop\model\AdminCompany;
|
||||
use app\shop\model\AdminGoods;
|
||||
use app\shop\model\AdminShopSpe;
|
||||
use app\shop\model\AdminShopSpePrice;
|
||||
use app\shop\model\AdminShopType;
|
||||
use app\shop\model\Goods;
|
||||
use app\shop\model\GoodsSpe;
|
||||
use app\shop\model\GoodsSpePrice;
|
||||
use longbingcore\wxcore\WxTmpl;
|
||||
use think\App;
|
||||
|
||||
|
||||
class SomeThing extends AdminRest
|
||||
{
|
||||
|
||||
protected $model;
|
||||
public function __construct(App $app) {
|
||||
parent::__construct($app);
|
||||
// $this->type_model = new AdminShopType();
|
||||
// $this->company_model = new AdminCompany();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2019-12-26 15:40
|
||||
* @功能说明: 获取模版消息
|
||||
*/
|
||||
public function getCompany(){
|
||||
$dis[] = ['status' ,'=',1];
|
||||
$dis[] = ['uniacid','=',$this->_uniacid];
|
||||
$data = $this->company_model->companySelect($dis);
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* User: chenniang
|
||||
* Date: 2019-11-29 17:28
|
||||
* @return void
|
||||
* descption:获取员工
|
||||
*/
|
||||
public function getStaffInfo(){
|
||||
$input = $this->_input;
|
||||
$user_model = new UserInfo();
|
||||
$user_info = new CardUser();
|
||||
// $data = [];
|
||||
$dis[] = ['is_staff','=',1];
|
||||
$dis[] = ['uniacid','=',$this->_uniacid];
|
||||
if(!empty($input['name'])){
|
||||
$dis[] = ['name','like',"%".$input['name']."%"];
|
||||
}
|
||||
$data = $user_model->where($dis)->field('fans_id as id,name')->select();
|
||||
if(!empty($data)){
|
||||
foreach ($data as &$v){
|
||||
if(empty($v['name'])){
|
||||
$v['name'] = $user_info->where(['id'=>$v['id']])->value('nickName');
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-05-18 16:29
|
||||
* @功能说明:职位列表
|
||||
*/
|
||||
public function jobList(){
|
||||
|
||||
$job_model = new Job();
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
$dis[] = ['uniacid','=',$this->_uniacid];
|
||||
|
||||
$dis[] = !empty($input['status'])?['status','>',0]:['status','>',-1];
|
||||
|
||||
$list = $job_model->where($dis)->order('top desc')->field('id,name')->select();
|
||||
|
||||
return $this->success($list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-09-03 15:16
|
||||
* @功能说明:获取平台所有的用户
|
||||
*/
|
||||
public function getAllUser(){
|
||||
|
||||
$user_info = new CardUser();
|
||||
|
||||
$dis = [
|
||||
|
||||
'uniacid' => $this->_uniacid
|
||||
|
||||
];
|
||||
//只查id和昵称,一般用于下拉框
|
||||
$data = $user_info->where($dis)->field('id,nickName')->select()->toArray();
|
||||
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-12-08 13:47
|
||||
* @功能说明:商品列表
|
||||
*/
|
||||
public function goodsSelect(){
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
$goods_model = new Goods();
|
||||
|
||||
$spe_price_model = new GoodsSpePrice();
|
||||
|
||||
$dis[] = ['status','=',1];
|
||||
|
||||
$dis[] = ['uniacid','=',$this->_uniacid];
|
||||
|
||||
if(!empty($input['title'])){
|
||||
|
||||
$dis[] = ['name','like','%'.$input['title'].'%'];
|
||||
}
|
||||
|
||||
$data = $goods_model->where($dis)->order('top desc,id desc')->paginate($input['limit'])->toArray();
|
||||
|
||||
if(!empty($data['data'])){
|
||||
|
||||
foreach ($data['data'] as &$v){
|
||||
//总库存
|
||||
$v['stock'] = $spe_price_model->getGoodsStock($v['id']);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $this->success($data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $goods_id
|
||||
* @功能说明:商品规格
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-01-19 14:26
|
||||
*/
|
||||
public function goodsSpeList(){
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
$spe_model = new GoodsSpe();
|
||||
|
||||
$spe_price_model = new GoodsSpePrice();
|
||||
|
||||
$goods_id = $input['goods_id'];
|
||||
|
||||
$dis['goods_id'] = $goods_id;
|
||||
|
||||
$dis['status'] = 1;
|
||||
|
||||
$data['text'] = $spe_model->goodsSpe($dis);
|
||||
|
||||
$data['price'] = $spe_price_model->goodsSpePrice($dis);
|
||||
|
||||
if(!empty($data['price'])){
|
||||
|
||||
foreach ($data['price'] as &$v){
|
||||
|
||||
$v['title'] = $v['spe_name_text'];
|
||||
|
||||
$v['true_id'] = $v['id'];
|
||||
|
||||
$v['id'] = implode(',',$v['spe_array_text']);
|
||||
|
||||
}
|
||||
}
|
||||
return $this->success($data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-01-30 11:00
|
||||
* @功能说明:获取商品规格
|
||||
*/
|
||||
public function getSpePrice(){
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
$dis[] = ['uniacid','=',$this->_uniacid];
|
||||
|
||||
$dis[] = ['goods_id','=',$input['goods_id']];
|
||||
|
||||
$dis[] = ['status','>',-1];
|
||||
|
||||
$spe_price_model = new AdminShopSpePrice();
|
||||
|
||||
$data = $spe_price_model->goodsSpePrice($dis);
|
||||
|
||||
if(!empty($data)){
|
||||
|
||||
foreach ($data as &$v){
|
||||
|
||||
$v['spe_content'] = $v['spe_name_text'].':'.$v['price'];
|
||||
|
||||
$v['spe_price_id']= $v['id'];
|
||||
}
|
||||
}
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2022-02-22 17:11
|
||||
* @功能说明:生成二维码
|
||||
*/
|
||||
public function getQr(){
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
$uniacid = $this->_uniacid;
|
||||
|
||||
$data = longbingCreateWxCode($uniacid,$input,$input['page']);
|
||||
|
||||
$data = transImagesOne($data ,['qr_path'] ,$uniacid);
|
||||
|
||||
$qr = $data['qr_path'];
|
||||
|
||||
return $qr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user