修改提现配置

This commit is contained in:
邹景立 2021-03-16 14:28:13 +08:00
parent 9082e29903
commit 863f9bb5fe
6 changed files with 95 additions and 9 deletions

View File

@ -22,7 +22,7 @@ class UserTransfer extends Controller
private $table = 'DataUserTransfer';
/**
* 奖励提现配置
* 提现配置配置
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
@ -30,10 +30,35 @@ class UserTransfer extends Controller
public function config()
{
$this->skey = 'TransferRule';
$this->title = '奖励提现配置';
$this->title = '提现规则配置';
$this->_sysdata();
}
/**
* 微信提现配置
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function transfer()
{
$this->skey = 'TransferWxpay';
$this->title = '微信提现配置';
$this->_sysdata();
}
/**
* 配置数据处理
* @param string $tpl 模板文件
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
private function _sysdata($tpl = '')
{
if ($this->request->isGet()) {
$this->data = sysdata($this->skey);
$this->fetch();
$this->fetch($tpl);
} else {
sysdata($this->skey, $this->request->post());
$this->success('配置修改成功');

View File

@ -1,11 +1,16 @@
{extend name="../../admin/view/main"}
{block name="button"}
<!--{if auth('config')}-->
<a class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url('config')}">提现配置</a>
<!--{if auth('transfer')}-->
<a class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url('transfer')}">微信商户配置</a>
<!--{/if}-->
<!--{if auth('config')}-->
<a class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url('config')}">提现规则配置</a>
<!--{/if}-->
<!--{if auth('sync')}-->
<a class="layui-btn layui-btn-sm layui-btn-primary" data-queue="{:url('sync')}">打款服务</a>
<a class="layui-btn layui-btn-sm layui-btn-primary" data-queue="{:url('sync')}">后台打款服务</a>
<!--{/if}-->
{/block}

View File

@ -0,0 +1,54 @@
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
<div class="layui-card-body padding-left-40">
<div class="layui-form-item block relative">
<span class="color-green font-w7 label-required-prev">绑定公众号</span>
<span class="color-desc margin-left-5">Bind WeChat Type</span>
<div class="layui-textarea" style="min-height:auto;padding:12px 13px 13px">
{php} $data['wechat_type'] = $data['wechat_type'] ?? 'wxapp'; {/php}
{foreach ['wxapp'=>'微信小程序', 'wechat'=>'微信服务号'] as $k=>$v}
{if $k eq $data.wechat_type}
<input checked type='radio' name="wechat_type" value="{$k}" title="{$v}">
{else}
<input type='radio' name="wechat_type" value="{$k}" title="{$v}">
{/if}{/foreach}
</div>
<span class="help-block">请选择公众号类型,以决定用户 OPENID 字段,一定要保证与接口对应</span>
</div>
<label class="layui-form-item block relative">
<span class="color-green font-w7">微信商户号</span>
<span class="color-desc margin-left-5">WeChat Payment Number</span>
<input name="wechat_mch_id" maxlength="50" required placeholder="请输入微信商户号MCH_ID必填" value="{$data.wechat_mch_id|default=''}" class="layui-input">
<span class="help-block">微信商户编号,需要在微信商户平台获取,微信商户号 公众号APPID 匹配</span>
</label>
<label class="layui-form-item block relative">
<span class="color-green font-w7">微信商户密钥</span>
<span class="color-desc margin-left-5">WeChat Payment Secret Key</span>
<input name="wechat_mch_key" required maxlength="32" pattern=".{32}" placeholder="请输入32位微信商户密钥必填" value="{$data.wechat_mch_key|default=''}" class="layui-input">
<span class="help-block">微信商户密钥,需要在微信商户平台操作设置密码并获取密钥,建议定期更换密钥</span>
</label>
<label class="layui-form-item block relative">
<span class="color-green font-w7">微信商户密钥文件内容</span><span class="nowrap color-desc"> 需要填写文件的全部内容 </span>
<textarea required name="wechat_mch_key_text" placeholder="请输入微信商户 KEY 密钥内容" class="layui-textarea">{$data.wechat_mch_key_text|default=''}</textarea>
<span class="help-block">从商户平台上下载支付证书,解压并取得其中的 apiclient_key.pem 用记事本打开并复制文件内容填至此处</span>
</label>
<label class="layui-form-item block relative">
<span class="color-green font-w7">微信商户证书文件内容</span><span class="nowrap color-desc"> 需要填写文件的全部内容 </span>
<textarea required name="wechat_mch_cert_text" placeholder="请输入微信商户 CERT 证书内容" class="layui-textarea">{$data.wechat_mch_cert_text|default=''}</textarea>
<span class="help-block">从商户平台上下载支付证书,解压并取得其中的 apiclient_cert.pem 用记事本打开并复制文件内容填至此处</span>
</label>
</div>
<div class="hr-line-dashed"></div>
<div class="layui-form-item text-center">
<button class="layui-btn" type='submit'>保存数据</button>
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
</div>
</form>
<script>form.render();</script>

View File

@ -220,6 +220,7 @@ return array(
'app\\data\\controller\\UserDiscount' => $baseDir . '/app/data/controller/UserDiscount.php',
'app\\data\\controller\\UserMessage' => $baseDir . '/app/data/controller/UserMessage.php',
'app\\data\\controller\\UserNotify' => $baseDir . '/app/data/controller/UserNotify.php',
'app\\data\\controller\\UserRebate' => $baseDir . '/app/data/controller/UserRebate.php',
'app\\data\\controller\\UserTransfer' => $baseDir . '/app/data/controller/UserTransfer.php',
'app\\data\\controller\\UserUpgrade' => $baseDir . '/app/data/controller/UserUpgrade.php',
'app\\data\\controller\\api\\Auth' => $baseDir . '/app/data/controller/api/Auth.php',
@ -233,9 +234,9 @@ return array(
'app\\data\\controller\\api\\auth\\Address' => $baseDir . '/app/data/controller/api/auth/Address.php',
'app\\data\\controller\\api\\auth\\Balance' => $baseDir . '/app/data/controller/api/auth/Balance.php',
'app\\data\\controller\\api\\auth\\Center' => $baseDir . '/app/data/controller/api/auth/Center.php',
'app\\data\\controller\\api\\auth\\Config' => $baseDir . '/app/data/controller/api/auth/Config.php',
'app\\data\\controller\\api\\auth\\News' => $baseDir . '/app/data/controller/api/auth/News.php',
'app\\data\\controller\\api\\auth\\Order' => $baseDir . '/app/data/controller/api/auth/Order.php',
'app\\data\\controller\\api\\auth\\Rebate' => $baseDir . '/app/data/controller/api/auth/Rebate.php',
'app\\data\\service\\DataService' => $baseDir . '/app/data/service/DataService.php',
'app\\data\\service\\GoodsService' => $baseDir . '/app/data/service/GoodsService.php',
'app\\data\\service\\MessageService' => $baseDir . '/app/data/service/MessageService.php',

View File

@ -349,6 +349,7 @@ class ComposerStaticInit4f89fd0e0503ccf740f2fa5757825d7b
'app\\data\\controller\\UserDiscount' => __DIR__ . '/../..' . '/app/data/controller/UserDiscount.php',
'app\\data\\controller\\UserMessage' => __DIR__ . '/../..' . '/app/data/controller/UserMessage.php',
'app\\data\\controller\\UserNotify' => __DIR__ . '/../..' . '/app/data/controller/UserNotify.php',
'app\\data\\controller\\UserRebate' => __DIR__ . '/../..' . '/app/data/controller/UserRebate.php',
'app\\data\\controller\\UserTransfer' => __DIR__ . '/../..' . '/app/data/controller/UserTransfer.php',
'app\\data\\controller\\UserUpgrade' => __DIR__ . '/../..' . '/app/data/controller/UserUpgrade.php',
'app\\data\\controller\\api\\Auth' => __DIR__ . '/../..' . '/app/data/controller/api/Auth.php',
@ -362,9 +363,9 @@ class ComposerStaticInit4f89fd0e0503ccf740f2fa5757825d7b
'app\\data\\controller\\api\\auth\\Address' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Address.php',
'app\\data\\controller\\api\\auth\\Balance' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Balance.php',
'app\\data\\controller\\api\\auth\\Center' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Center.php',
'app\\data\\controller\\api\\auth\\Config' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Config.php',
'app\\data\\controller\\api\\auth\\News' => __DIR__ . '/../..' . '/app/data/controller/api/auth/News.php',
'app\\data\\controller\\api\\auth\\Order' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Order.php',
'app\\data\\controller\\api\\auth\\Rebate' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Rebate.php',
'app\\data\\service\\DataService' => __DIR__ . '/../..' . '/app/data/service/DataService.php',
'app\\data\\service\\GoodsService' => __DIR__ . '/../..' . '/app/data/service/GoodsService.php',
'app\\data\\service\\MessageService' => __DIR__ . '/../..' . '/app/data/service/MessageService.php',

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2021-03-12 15:07:09
// This file is automatically generated at:2021-03-16 14:08:18
declare (strict_types = 1);
return array (
0 => 'think\\admin\\Library',