mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改字段
This commit is contained in:
parent
0b6a9f8f13
commit
fa47f17415
@ -30,7 +30,7 @@ class Login extends Controller
|
||||
*/
|
||||
protected function initialize()
|
||||
{
|
||||
$this->type = input('api', UserService::APITYPE_WAP);
|
||||
$this->type = input('api', UserService::API_TYPE_WAP);
|
||||
if (empty(UserService::TYPES[$this->type])) {
|
||||
$this->error("接口通道[{$this->type}]未定义规则!");
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class Wechat extends Controller
|
||||
* 接口认证类型
|
||||
* @var string
|
||||
*/
|
||||
private $type = UserService::APITYPE_WECHAT;
|
||||
private $type = UserService::API_TYPE_WECHAT;
|
||||
|
||||
/**
|
||||
* 唯一绑定字段
|
||||
|
@ -21,7 +21,7 @@ class Wxapp extends Controller
|
||||
* 接口认证类型
|
||||
* @var string
|
||||
*/
|
||||
private $type = UserService::APITYPE_WXAPP;
|
||||
private $type = UserService::API_TYPE_WXAPP;
|
||||
|
||||
/**
|
||||
* 唯一绑定字段
|
||||
|
@ -293,7 +293,7 @@ class Order extends Auth
|
||||
if ($order['payment_status'] > 0) $this->error('已经完成支付');
|
||||
try {
|
||||
$openid = '';
|
||||
if (in_array($this->type, [UserService::APITYPE_WXAPP, UserService::APITYPE_WECHAT])) {
|
||||
if (in_array($this->type, [UserService::API_TYPE_WXAPP, UserService::API_TYPE_WECHAT])) {
|
||||
$openid = $this->user[UserService::TYPES[$this->type]['auth']] ?? '';
|
||||
if (empty($openid)) $this->error("发起支付失败");
|
||||
}
|
||||
|
@ -53,71 +53,71 @@ abstract class PaymentService
|
||||
'type' => 'BALANCE',
|
||||
'name' => '账号余额支付',
|
||||
'bind' => [
|
||||
UserService::APITYPE_WAP, UserService::APITYPE_WEB,
|
||||
UserService::APITYPE_WXAPP, UserService::APITYPE_WECHAT,
|
||||
UserService::APITYPE_IOSAPP, UserService::APITYPE_ANDROID,
|
||||
UserService::API_TYPE_WAP, UserService::API_TYPE_WEB,
|
||||
UserService::API_TYPE_WXAPP, UserService::API_TYPE_WECHAT,
|
||||
UserService::API_TYPE_IOSAPP, UserService::API_TYPE_ANDROID,
|
||||
],
|
||||
],
|
||||
self::PAYMENT_VOUCHER => [
|
||||
'type' => 'VOUCHER',
|
||||
'name' => '单据凭证支付',
|
||||
'bind' => [
|
||||
UserService::APITYPE_WAP, UserService::APITYPE_WEB,
|
||||
UserService::APITYPE_WXAPP, UserService::APITYPE_WECHAT,
|
||||
UserService::APITYPE_IOSAPP, UserService::APITYPE_ANDROID,
|
||||
UserService::API_TYPE_WAP, UserService::API_TYPE_WEB,
|
||||
UserService::API_TYPE_WXAPP, UserService::API_TYPE_WECHAT,
|
||||
UserService::API_TYPE_IOSAPP, UserService::API_TYPE_ANDROID,
|
||||
],
|
||||
],
|
||||
self::PAYMENT_WECHAT_WAP => [
|
||||
'type' => 'MWEB',
|
||||
'name' => '微信WAP支付',
|
||||
'bind' => [UserService::APITYPE_WAP],
|
||||
'bind' => [UserService::API_TYPE_WAP],
|
||||
],
|
||||
self::PAYMENT_WECHAT_APP => [
|
||||
'type' => 'APP',
|
||||
'name' => '微信APP支付',
|
||||
'bind' => [UserService::APITYPE_IOSAPP, UserService::APITYPE_ANDROID],
|
||||
'bind' => [UserService::API_TYPE_IOSAPP, UserService::API_TYPE_ANDROID],
|
||||
],
|
||||
self::PAYMENT_WECHAT_XCX => [
|
||||
'type' => 'JSAPI',
|
||||
'name' => '微信小程序支付',
|
||||
'bind' => [UserService::APITYPE_WXAPP],
|
||||
'bind' => [UserService::API_TYPE_WXAPP],
|
||||
],
|
||||
self::PAYMENT_WECHAT_GZH => [
|
||||
'type' => 'JSAPI',
|
||||
'name' => '微信公众号支付',
|
||||
'bind' => [UserService::APITYPE_WECHAT],
|
||||
'bind' => [UserService::API_TYPE_WECHAT],
|
||||
],
|
||||
self::PAYMENT_WECHAT_QRC => [
|
||||
'type' => 'NATIVE',
|
||||
'name' => '微信二维码支付',
|
||||
'bind' => [UserService::APITYPE_WEB],
|
||||
'bind' => [UserService::API_TYPE_WEB],
|
||||
],
|
||||
// 支付宝支持配置(不需要的直接注释)
|
||||
self::PAYMENT_ALIPAY_WAP => [
|
||||
'type' => '',
|
||||
'name' => '支付宝WAP支付',
|
||||
'bind' => [UserService::APITYPE_WAP],
|
||||
'bind' => [UserService::API_TYPE_WAP],
|
||||
],
|
||||
self::PAYMENT_ALIPAY_WEB => [
|
||||
'type' => '',
|
||||
'name' => '支付宝WEB支付',
|
||||
'bind' => [UserService::APITYPE_WEB],
|
||||
'bind' => [UserService::API_TYPE_WEB],
|
||||
],
|
||||
self::PAYMENT_ALIAPY_APP => [
|
||||
'type' => '',
|
||||
'name' => '支付宝APP支付',
|
||||
'bind' => [UserService::APITYPE_ANDROID, UserService::APITYPE_IOSAPP],
|
||||
'bind' => [UserService::API_TYPE_ANDROID, UserService::API_TYPE_IOSAPP],
|
||||
],
|
||||
// 汇聚支持配置(不需要的直接注释)
|
||||
self::PAYMENT_JOINPAY_XCX => [
|
||||
'type' => 'WEIXIN_XCX',
|
||||
'name' => '汇聚小程序支付',
|
||||
'bind' => [UserService::APITYPE_WXAPP],
|
||||
'bind' => [UserService::API_TYPE_WXAPP],
|
||||
],
|
||||
self::PAYMENT_JOINPAY_GZH => [
|
||||
'type' => 'WEIXIN_GZH',
|
||||
'name' => '汇聚公众号支付',
|
||||
'bind' => [UserService::APITYPE_WECHAT],
|
||||
'bind' => [UserService::API_TYPE_WECHAT],
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -13,39 +13,39 @@ use think\db\exception\DbException;
|
||||
*/
|
||||
class UserService extends Service
|
||||
{
|
||||
const APITYPE_WAP = 'wap';
|
||||
const APITYPE_WEB = 'web';
|
||||
const APITYPE_WXAPP = 'wxapp';
|
||||
const APITYPE_WECHAT = 'wechat';
|
||||
const APITYPE_IOSAPP = 'iosapp';
|
||||
const APITYPE_ANDROID = 'android';
|
||||
const API_TYPE_WAP = 'wap';
|
||||
const API_TYPE_WEB = 'web';
|
||||
const API_TYPE_WXAPP = 'wxapp';
|
||||
const API_TYPE_WECHAT = 'wechat';
|
||||
const API_TYPE_IOSAPP = 'iosapp';
|
||||
const API_TYPE_ANDROID = 'android';
|
||||
|
||||
const TYPES = [
|
||||
// 接口通道配置(不需要的直接注释)
|
||||
UserService::APITYPE_WAP => [
|
||||
UserService::API_TYPE_WAP => [
|
||||
'name' => '手机浏览器',
|
||||
'auth' => 'phone',
|
||||
],
|
||||
UserService::APITYPE_WEB => [
|
||||
UserService::API_TYPE_WEB => [
|
||||
'name' => '电脑浏览器',
|
||||
'auth' => 'phone',
|
||||
],
|
||||
UserService::APITYPE_IOSAPP => [
|
||||
'name' => '苹果应用',
|
||||
'auth' => 'phone',
|
||||
],
|
||||
UserService::APITYPE_ANDROID => [
|
||||
'name' => '安卓应用',
|
||||
'auth' => 'phone',
|
||||
],
|
||||
UserService::APITYPE_WXAPP => [
|
||||
UserService::API_TYPE_WXAPP => [
|
||||
'name' => '微信小程序',
|
||||
'auth' => 'openid1',
|
||||
],
|
||||
UserService::APITYPE_WECHAT => [
|
||||
UserService::API_TYPE_WECHAT => [
|
||||
'name' => '微信服务号',
|
||||
'auth' => 'openid2',
|
||||
],
|
||||
UserService::API_TYPE_IOSAPP => [
|
||||
'name' => '苹果APP应用',
|
||||
'auth' => 'phone',
|
||||
],
|
||||
UserService::API_TYPE_ANDROID => [
|
||||
'name' => '安卓APP应用',
|
||||
'auth' => 'phone',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -48,6 +48,9 @@
|
||||
// 背景图片切换
|
||||
$('[data-upload-image]').uploadFile(function (url) {
|
||||
image.src = url;
|
||||
console.log(cropper)
|
||||
// cropper.refresh();
|
||||
// cropper.resize();
|
||||
cropper.replace(url, true).reset();
|
||||
});
|
||||
// 保存设置参数
|
||||
|
@ -25,8 +25,8 @@
|
||||
<fieldset class="block">
|
||||
<legend><span class="layui-badge">团队结算</span></legend>
|
||||
<div class="layui-form-item">
|
||||
{php}$data['teams_type'] = $data['teams_type'] ?? 1;{/php}
|
||||
{foreach [1 => '实时结算',2 => '次月结算'] as $key=>$val}{if $data.teams_type eq $key}
|
||||
{php} $data['teams_type'] = $data['teams_type'] ?? 1; {/php}
|
||||
{foreach [1 => '实时结算', 2 => '次月结算'] as $key=>$val}{if $data.teams_type eq $key}
|
||||
<input checked class="layui-input" type="radio" name="teams_type" value="{$key}" title="{$val}">
|
||||
{else}
|
||||
<input class="layui-input" type="radio" name="teams_type" value="{$key}" title="{$val}">
|
||||
|
Loading…
x
Reference in New Issue
Block a user