chore(src): 所有代码上传
This commit is contained in:
@@ -1,38 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
return [
|
||||
|
||||
// 自定义模板页面类型,格式:[ 'title' => '页面类型名称', 'name' => '页面标识', 'path' => '页面路径', 'value' => '页面数据,json格式' ]
|
||||
'template' => [],
|
||||
|
||||
// 后台自定义组件——装修
|
||||
'util' => [],
|
||||
|
||||
// 自定义页面路径
|
||||
'link' => [],
|
||||
|
||||
// 自定义图标库
|
||||
'icon_library' => [],
|
||||
|
||||
// uni-app 组件,格式:[ 'name' => '组件名称/文件夹名称', 'path' => '文件路径/目录路径' ],多个逗号隔开,自定义组件名称前缀必须是diy-,也可以引用第三方组件
|
||||
'component' => [],
|
||||
|
||||
// uni-app 页面,多个逗号隔开
|
||||
'pages' => [],
|
||||
|
||||
// 模板信息,格式:'title' => '模板名称', 'name' => '模板标识', 'cover' => '模板封面图', 'preview' => '模板预览图', 'desc' => '模板描述'
|
||||
'info' => [],
|
||||
|
||||
// 主题风格配色,格式可以自由定义扩展,【在uni-app中通过:this.themeStyle... 获取定义的颜色字段,例如:this.themeStyle.main_color】
|
||||
'theme' => [],
|
||||
|
||||
// 自定义页面数据,格式:[ 'title' => '页面名称', 'name' => "页面标识", 'value' => [页面数据,json格式] ]
|
||||
'data' => []
|
||||
<?php
|
||||
return [
|
||||
|
||||
// 自定义模板页面类型,格式:[ 'title' => '页面类型名称', 'name' => '页面标识', 'path' => '页面路径', 'value' => '页面数据,json格式' ]
|
||||
'template' => [],
|
||||
|
||||
// 后台自定义组件——装修
|
||||
'util' => [],
|
||||
|
||||
// 自定义页面路径
|
||||
'link' => [],
|
||||
|
||||
// 自定义图标库
|
||||
'icon_library' => [],
|
||||
|
||||
// uni-app 组件,格式:[ 'name' => '组件名称/文件夹名称', 'path' => '文件路径/目录路径' ],多个逗号隔开,自定义组件名称前缀必须是diy-,也可以引用第三方组件
|
||||
'component' => [],
|
||||
|
||||
// uni-app 页面,多个逗号隔开
|
||||
'pages' => [],
|
||||
|
||||
// 模板信息,格式:'title' => '模板名称', 'name' => '模板标识', 'cover' => '模板封面图', 'preview' => '模板预览图', 'desc' => '模板描述'
|
||||
'info' => [],
|
||||
|
||||
// 主题风格配色,格式可以自由定义扩展,【在uni-app中通过:this.themeStyle... 获取定义的颜色字段,例如:this.themeStyle.main_color】
|
||||
'theme' => [],
|
||||
|
||||
// 自定义页面数据,格式:[ 'title' => '页面名称', 'name' => "页面标识", 'value' => [页面数据,json格式] ]
|
||||
'data' => []
|
||||
];
|
||||
@@ -1,21 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
return [
|
||||
'name' => 'memberwithdraw',
|
||||
'title' => '会员提现',
|
||||
'description' => '会员提现',
|
||||
'type' => 'tool', //插件类型 system :系统插件(自动安装),promotion:扩展营销插件 tool:工具插件
|
||||
'status' => 1,
|
||||
'author' => '',
|
||||
'version' => '5.3.1',
|
||||
'version_no' => '525231212001',
|
||||
'content' => '',
|
||||
<?php
|
||||
return [
|
||||
'name' => 'memberwithdraw',
|
||||
'title' => '会员提现',
|
||||
'description' => '会员提现',
|
||||
'type' => 'tool', //插件类型 system :系统插件(自动安装),promotion:扩展营销插件 tool:工具插件
|
||||
'status' => 1,
|
||||
'author' => '',
|
||||
'version' => '5.3.1',
|
||||
'version_no' => '525231212001',
|
||||
'content' => '',
|
||||
];
|
||||
@@ -1,26 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
namespace addon\memberwithdraw\event;
|
||||
|
||||
/**
|
||||
* 应用安装
|
||||
*/
|
||||
class Install
|
||||
{
|
||||
/**
|
||||
* 执行安装
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return success();
|
||||
}
|
||||
<?php
|
||||
|
||||
namespace addon\memberwithdraw\event;
|
||||
|
||||
/**
|
||||
* 应用安装
|
||||
*/
|
||||
class Install
|
||||
{
|
||||
/**
|
||||
* 执行安装
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return success();
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
namespace addon\memberwithdraw\event;
|
||||
|
||||
/**
|
||||
* 应用卸载
|
||||
*/
|
||||
class UnInstall
|
||||
{
|
||||
/**
|
||||
* 执行卸载
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return error('', "系统插件不允许删除");
|
||||
}
|
||||
<?php
|
||||
|
||||
namespace addon\memberwithdraw\event;
|
||||
|
||||
/**
|
||||
* 应用卸载
|
||||
*/
|
||||
class UnInstall
|
||||
{
|
||||
/**
|
||||
* 执行卸载
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return error('', "系统插件不允许删除");
|
||||
}
|
||||
}
|
||||
@@ -1,61 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
namespace addon\memberwithdraw\model;
|
||||
|
||||
use app\model\BaseModel;
|
||||
use app\model\member\Withdraw as MemberWithdraw;
|
||||
|
||||
/**
|
||||
* 会员提现
|
||||
*/
|
||||
class Withdraw extends BaseModel
|
||||
{
|
||||
|
||||
/**
|
||||
* 转账
|
||||
* @param $condition
|
||||
*/
|
||||
public function transfer($id)
|
||||
{
|
||||
$withdraw_model = new MemberWithdraw();
|
||||
$info_result = $withdraw_model->getMemberWithdrawInfo([ [ "id", "=", $id ] ], "withdraw_no,account_number,realname,money,memo,transfer_type,site_id,applet_type,member_id");
|
||||
if (empty($info_result[ "data" ]))
|
||||
return $this->error();
|
||||
|
||||
$info = $info_result[ "data" ];
|
||||
if (!in_array($info[ "transfer_type" ], [ "wechatpay", "alipay" ]))
|
||||
return $this->error('', "当前提现方式不支持在线转账");
|
||||
|
||||
$pay_data = array (
|
||||
"id" => $id,
|
||||
"out_trade_no" => $info[ "withdraw_no" ],
|
||||
"real_name" => $info[ "realname" ],
|
||||
"amount" => $info[ "money" ],
|
||||
"desc" => "会员提现" . $info[ "memo" ],
|
||||
"transfer_type" => $info[ "transfer_type" ],
|
||||
"account_number" => $info[ "account_number" ],
|
||||
"site_id" => $info[ "site_id" ],
|
||||
"is_weapp" => $info[ "applet_type" ],
|
||||
"member_id" => $info[ 'member_id' ]
|
||||
);
|
||||
//调用在线转账借口
|
||||
$pay_result = event("PayTransfer", $pay_data, true);
|
||||
if (empty($pay_result)) {
|
||||
$pay_result = $this->error();
|
||||
}
|
||||
if ($pay_result[ "code" ] < 0) {
|
||||
return $pay_result;
|
||||
}
|
||||
//调用完成转账
|
||||
$result = $withdraw_model->transferFinish([ "id" => $id, "site_id" => $info[ "site_id" ] ]);
|
||||
return $result;
|
||||
}
|
||||
<?php
|
||||
|
||||
namespace addon\memberwithdraw\model;
|
||||
|
||||
use app\model\BaseModel;
|
||||
use app\model\member\Withdraw as MemberWithdraw;
|
||||
|
||||
/**
|
||||
* 会员提现
|
||||
*/
|
||||
class Withdraw extends BaseModel
|
||||
{
|
||||
|
||||
/**
|
||||
* 转账
|
||||
* @param $condition
|
||||
*/
|
||||
public function transfer($id)
|
||||
{
|
||||
$withdraw_model = new MemberWithdraw();
|
||||
$info_result = $withdraw_model->getMemberWithdrawInfo([ [ "id", "=", $id ] ], "withdraw_no,account_number,realname,money,memo,transfer_type,site_id,applet_type,member_id");
|
||||
if (empty($info_result[ "data" ]))
|
||||
return $this->error();
|
||||
|
||||
$info = $info_result[ "data" ];
|
||||
if (!in_array($info[ "transfer_type" ], [ "wechatpay", "alipay" ]))
|
||||
return $this->error('', "当前提现方式不支持在线转账");
|
||||
|
||||
$pay_data = array (
|
||||
"id" => $id,
|
||||
"out_trade_no" => $info[ "withdraw_no" ],
|
||||
"real_name" => $info[ "realname" ],
|
||||
"amount" => $info[ "money" ],
|
||||
"desc" => "会员提现" . $info[ "memo" ],
|
||||
"transfer_type" => $info[ "transfer_type" ],
|
||||
"account_number" => $info[ "account_number" ],
|
||||
"site_id" => $info[ "site_id" ],
|
||||
"is_weapp" => $info[ "applet_type" ],
|
||||
"member_id" => $info[ 'member_id' ]
|
||||
);
|
||||
//调用在线转账借口
|
||||
$pay_result = event("PayTransfer", $pay_data, true);
|
||||
if (empty($pay_result)) {
|
||||
$pay_result = $this->error();
|
||||
}
|
||||
if ($pay_result[ "code" ] < 0) {
|
||||
return $pay_result;
|
||||
}
|
||||
//调用完成转账
|
||||
$result = $withdraw_model->transferFinish([ "id" => $id, "site_id" => $info[ "site_id" ] ]);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -1,35 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
namespace addon\memberwithdraw\shop\controller;
|
||||
|
||||
use addon\memberwithdraw\model\Withdraw as WithdrawModel;
|
||||
use app\shop\controller\BaseShop;
|
||||
|
||||
/**
|
||||
* 会员提现
|
||||
*/
|
||||
class Withdraw extends BaseShop
|
||||
{
|
||||
|
||||
/**
|
||||
* 转账
|
||||
*/
|
||||
public function transfer()
|
||||
{
|
||||
if (request()->isJson()) {
|
||||
$id = input('id', 0);
|
||||
$withdraw_model = new WithdrawModel();
|
||||
$result = $withdraw_model->transfer($id);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
namespace addon\memberwithdraw\shop\controller;
|
||||
|
||||
use addon\memberwithdraw\model\Withdraw as WithdrawModel;
|
||||
use app\shop\controller\BaseShop;
|
||||
|
||||
/**
|
||||
* 会员提现
|
||||
*/
|
||||
class Withdraw extends BaseShop
|
||||
{
|
||||
|
||||
/**
|
||||
* 转账
|
||||
*/
|
||||
public function transfer()
|
||||
{
|
||||
if (request()->isJson()) {
|
||||
$id = input('id', 0);
|
||||
$withdraw_model = new WithdrawModel();
|
||||
$result = $withdraw_model->transfer($id);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user