提交 16983958 编写于 作者: D devil_gong

应用优化

上级 986f5248
......@@ -129,14 +129,23 @@ class Plugins extends Common
// 当前操作名称
$module_name = 'plugins';
// 模块组
$group = 'admin';
// 控制器静态文件状态css,js
$module_css = $module_name.DS.'css'.DS.$plugins_name.DS.$plugins_control;
$module_css = $module_name.DS.'css'.DS.$plugins_name.DS.$group.DS.$plugins_control;
$module_css .= file_exists(ROOT_PATH.'static'.DS.$module_css.'.'.$plugins_action.'.css') ? '.'.$plugins_action.'.css' : '.css';
$this->assign('module_css', file_exists(ROOT_PATH.'static'.DS.$module_css) ? $module_css : '');
$module_js = $module_name.DS.'js'.DS.$plugins_name.DS.$plugins_control;
$module_js = $module_name.DS.'js'.DS.$plugins_name.DS.$group.DS.$plugins_control;
$module_js .= file_exists(ROOT_PATH.'static'.DS.$module_js.'.'.$plugins_action.'.js') ? '.'.$plugins_action.'.js' : '.js';
$this->assign('module_js', file_exists(ROOT_PATH.'static'.DS.$module_js) ? $module_js : '');
// 应用公共css,js
$plugins_css = $module_name.DS.'css'.DS.$plugins_name.DS.$group.DS.'common.css';
$this->assign('plugins_css', file_exists(ROOT_PATH.'static'.DS.$plugins_css) ? $plugins_css : '');
$plugins_js = $module_name.DS.'js'.DS.$plugins_name.DS.$group.DS.'common.js';
$this->assign('plugins_js', file_exists(ROOT_PATH.'static'.DS.$plugins_js) ? $plugins_js : '');
}
}
?>
\ No newline at end of file
......@@ -62,9 +62,14 @@
<!-- 项目公共 -->
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js"></script>
<!-- 控制器 -->
<!-- 应用插件公共js -->
{{if !empty($plugins_js)}}
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$plugins_js}}?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}
<!-- 当前控制器js -->
{{if !empty($module_js)}}
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_js}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_js}}?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}
<!-- js钩子 -->
......
......@@ -12,6 +12,9 @@
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/css/common.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/admin/{{$default_theme}}/css/common.css" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/admin/{{$default_theme}}/css/iconfontmenu.css" />
{{if !empty($plugins_css)}}
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$plugins_css}}" />
{{/if}}
{{if !empty($module_css)}}
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_css}}" />
{{/if}}
......
......@@ -123,14 +123,23 @@ class Plugins extends Common
// 当前操作名称
$module_name = 'plugins';
// 模块组
$group = 'index';
// 控制器静态文件状态css,js
$module_css = $module_name.DS.'css'.DS.$plugins_name.DS.$plugins_control;
$module_css = $module_name.DS.'css'.DS.$plugins_name.DS.$group.DS.$plugins_control;
$module_css .= file_exists(ROOT_PATH.'static'.DS.$module_css.'.'.$plugins_action.'.css') ? '.'.$plugins_action.'.css' : '.css';
$this->assign('module_css', file_exists(ROOT_PATH.'static'.DS.$module_css) ? $module_css : '');
$module_js = $module_name.DS.'js'.DS.$plugins_name.DS.$plugins_control;
$module_js = $module_name.DS.'js'.DS.$plugins_name.DS.$group.DS.$plugins_control;
$module_js .= file_exists(ROOT_PATH.'static'.DS.$module_js.'.'.$plugins_action.'.js') ? '.'.$plugins_action.'.js' : '.js';
$this->assign('module_js', file_exists(ROOT_PATH.'static'.DS.$module_js) ? $module_js : '');
// 应用公共css,js
$plugins_css = $module_name.DS.'css'.DS.$plugins_name.DS.$group.DS.'common.css';
$this->assign('plugins_css', file_exists(ROOT_PATH.'static'.DS.$plugins_css) ? $plugins_css : '');
$plugins_js = $module_name.DS.'js'.DS.$plugins_name.DS.$group.DS.'common.js';
$this->assign('plugins_js', file_exists(ROOT_PATH.'static'.DS.$plugins_js) ? $plugins_js : '');
}
}
?>
\ No newline at end of file
......@@ -75,7 +75,12 @@
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/index/{{$default_theme}}/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
<!-- 控制器 -->
<!-- 应用插件公共js -->
{{if !empty($plugins_js)}}
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$plugins_js}}?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}
<!-- 当前控制器js -->
{{if !empty($module_js)}}
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_js}}?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}
......
......@@ -24,6 +24,9 @@
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/css/common.css?v={{:MyC('home_static_cache_version')}}" />
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/index/{{$default_theme}}/css/common.css?v={{:MyC('home_static_cache_version')}}" />
{{if !empty($plugins_css)}}
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$plugins_css}}?v={{:MyC('home_static_cache_version')}}" />
{{/if}}
{{if !empty($module_css)}}
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_css}}?v={{:MyC('home_static_cache_version')}}" />
{{/if}}
......
......@@ -64,7 +64,7 @@
<p class="line-price">¥{{$v.price}}</p>
</td>
<td>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-ajax" data-url="{{:MyUrl('index/userfavor/cancel')}}" data-id="{{$v.goods_id}}" data-view="delete">取消</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block am-icon-paint-brush submit-ajax" data-url="{{:MyUrl('index/userfavor/cancel')}}" data-id="{{$v.goods_id}}" data-view="delete"> 取消</button>
</td>
</tr>
{{/foreach}}
......
......@@ -64,7 +64,7 @@
<p class="line-price">¥{{$v.price}}</p>
</td>
<td>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('index/usergoodsbrowse/delete')}}" data-id="{{$v.id}}" data-view="delete">删除</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block am-icon-trash-o submit-delete" data-url="{{:MyUrl('index/usergoodsbrowse/delete')}}" data-id="{{$v.id}}" data-view="delete"> 删除</button>
</td>
</tr>
{{/foreach}}
......
......@@ -49,11 +49,11 @@ class Hook extends Controller
switch($params['hook_name'])
{
case 'plugins_css' :
$ret = __MY_ROOT_PUBLIC__.'static/plugins/css/commononlineservice/style.css';
$ret = __MY_ROOT_PUBLIC__.'static/plugins/css/commononlineservice/index/style.css';
break;
case 'plugins_js' :
$ret = __MY_ROOT_PUBLIC__.'static/plugins/js/commononlineservice/style.js';
$ret = __MY_ROOT_PUBLIC__.'static/plugins/js/commononlineservice/index/style.js';
break;
case 'plugins_view_common_bottom' :
......
......@@ -50,11 +50,11 @@ class Hook extends Controller
switch($params['hook_name'])
{
case 'plugins_css' :
$ret = __MY_ROOT_PUBLIC__.'static/plugins/css/commonrightnavigation/style.css';
$ret = __MY_ROOT_PUBLIC__.'static/plugins/css/commonrightnavigation/index/style.css';
break;
case 'plugins_js' :
$ret = __MY_ROOT_PUBLIC__.'static/plugins/js/commonrightnavigation/style.js';
$ret = __MY_ROOT_PUBLIC__.'static/plugins/js/commonrightnavigation/index/style.js';
break;
case 'plugins_view_common_bottom' :
......
......@@ -85,7 +85,7 @@ class Hook extends Controller
$ret = $this->IsNormal($params);
if($ret['code'] == 0)
{
return __MY_ROOT_PUBLIC__.'static/plugins/css/footercustomerservice/style.css';
return __MY_ROOT_PUBLIC__.'static/plugins/css/footercustomerservice/index/style.css';
}
return '';
}
......
......@@ -37,7 +37,7 @@ class Hook
{
// css
case 'plugins_css' :
$ret = __MY_ROOT_PUBLIC__.'static/plugins/css/freightfee/style.css';
$ret = __MY_ROOT_PUBLIC__.'static/plugins/css/freightfee/index/style.css';
break;
// 运费计算
......
......@@ -53,7 +53,7 @@ class Hook extends Controller
switch($params['hook_name'])
{
case 'plugins_css' :
$ret = __MY_ROOT_PUBLIC__.'static/plugins/css/membershiplevel/style.css';
$ret = __MY_ROOT_PUBLIC__.'static/plugins/css/membershiplevel/index/style.css';
break;
// 商品数据处理后
......
......@@ -39,13 +39,13 @@ class Hook extends Controller
{
case 'plugins_css' :
$ret = [
__MY_ROOT_PUBLIC__.'static/plugins/css/share/iconfont.css',
__MY_ROOT_PUBLIC__.'static/plugins/css/share/style.css',
__MY_ROOT_PUBLIC__.'static/plugins/css/share/index/iconfont.css',
__MY_ROOT_PUBLIC__.'static/plugins/css/share/index/style.css',
];
break;
case 'plugins_js' :
$ret = __MY_ROOT_PUBLIC__.'static/plugins/js/share/style.js';
$ret = __MY_ROOT_PUBLIC__.'static/plugins/js/share/index/style.js';
break;
case 'plugins_view_common_bottom' :
......
......@@ -23,10 +23,10 @@
<div class="user-content">
<div class="user-content-body">
<!-- user menu start -->
{{include file="../../../plugins/view/wallet/wallet/nav" /}}
{{include file="../../../plugins/view/wallet/public/nav" /}}
<!-- user menu end -->
<form class="am-form form-validation" method="post" action="{{:PluginsHomeUrl('wallet', 'wallet', 'index')}}" request-type="form">
<form class="am-form form-validation" method="post" action="{{:PluginsHomeUrl('wallet', 'cash', 'index')}}" request-type="form">
<div class="thin">
<div class="am-input-group am-input-group-sm am-fl so">
<input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="申请单号" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
......@@ -56,7 +56,7 @@
</td>
<td>
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
<a href="{{:PluginsHomeUrl('wallet', 'wallet', 'index')}}" class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</a>
<a href="{{:PluginsHomeUrl('wallet', 'cash', 'index')}}" class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</a>
</td>
</tr>
</tbody>
......
<!-- 导航 -->
<ul class="am-nav am-nav-pills">
<li {{if !isset($plugins_action) or (isset($plugins_action) and $plugins_action eq 'index')}}class="am-active"{{/if}}>
<li {{if !isset($plugins_control) or (isset($plugins_control) and $plugins_control eq 'wallet')}}class="am-active"{{/if}}>
<a href="{{:PluginsHomeUrl('wallet', 'wallet', 'index')}}">账户余额</a>
</li>
<li {{if isset($plugins_action) and $plugins_action eq 'recharge'}}class="am-active"{{/if}}>
<a href="{{:PluginsHomeUrl('wallet', 'wallet', 'recharge')}}">充值明细</a>
<li {{if isset($plugins_control) and $plugins_control eq 'recharge'}}class="am-active"{{/if}}>
<a href="{{:PluginsHomeUrl('wallet', 'recharge', 'index')}}">充值明细</a>
</li>
<li {{if isset($plugins_action) and $plugins_action eq 'cash'}}class="am-active"{{/if}}>
<a href="{{:PluginsHomeUrl('wallet', 'wallet', 'cash')}}">余额提现</a>
<li {{if isset($plugins_control) and $plugins_control eq 'cash'}}class="am-active"{{/if}}>
<a href="{{:PluginsHomeUrl('wallet', 'cash', 'index')}}">余额提现</a>
</li>
<div class="am-topbar-right">
{{if in_array($plugins_action, ['index', 'recharge'])}}
{{if in_array($plugins_control, ['wallet', 'recharge'])}}
<button class="am-btn am-btn-secondary am-topbar-btn am-btn-sm am-icon-shield" data-am-modal="{target: '#plugins-recharge-pay-modal', width: 260, height: 130}"> 在线充值</button>
{{/if}}
{{if in_array($plugins_action, ['index', 'cash'])}}
{{if in_array($plugins_control, ['wallet', 'cash'])}}
<a class="am-btn am-btn-success am-topbar-btn am-btn-sm am-icon-money"> 申请提现</a>
{{/if}}
</div>
</ul>
<!-- 账户信息 -->
<div class="am-alert am-alert-secondary" data-am-alert>
{{if empty($wallet_error)}}
<div class="am-alert am-alert-secondary" data-am-alert>
<div class="available">
<span>可用金额</span>
<span class="integral-value">{{$user.integral}}</span>
<span class="integral-value">{{$user_wallet.normal_money}}</span>
<em></em>
<span class="integral-tips">正常可以使用的金额</span>
</div>
<div class="locking">
<span>冻结金额</span>
<span class="integral-value">{{$user.locking_integral}}</span>
<span class="integral-value">{{$user_wallet.frozen_money}}</span>
<em></em>
<span class="integral-tips">一般积分交易中、提现、交易并未完成,锁定相应的积分</span>
</div>
</div>
</div>
{{else /}}
<div class="am-alert am-alert-warning" data-am-alert>
{{$wallet_error}}
</div>
{{/if}}
<!-- 充值窗口 -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="plugins-recharge-pay-modal">
......@@ -43,7 +49,7 @@
<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
</div>
<div class="am-modal-bd">
<form class="am-form form-validation-plugins-recharge-modal" action="{{:PluginsHomeUrl('wallet', 'wallet', 'rechargecreate')}}" method="POST" request-type="ajax-fun" request-value="PluginsRechargeBack">
<form class="am-form form-validation-plugins-recharge-modal" action="{{:PluginsHomeUrl('wallet', 'recharge', 'create')}}" method="POST" request-type="ajax-fun" request-value="PluginsRechargeBack">
<label>充值金额</label>
<div class="am-input-group am-input-group-sm">
<input type="number" autocomplete="off" name="money" step="0.01" class="am-radius" placeholder="充值金额" data-validation-message="请输入充值金额" required />
......@@ -52,7 +58,7 @@
</span>
</div>
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">提交</button>
</form>
</div>
</div>
......@@ -62,12 +68,17 @@
<div class="am-popup" id="plugins-recharge-pay-popup">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">支付方式</h4>
<h4 class="am-popup-title">支付确认</h4>
<span data-am-modal-close class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<form class="am-form form-validation-plugins-recharge-popup" action="{{:PluginsHomeUrl('wallet', 'wallet', 'pay')}}" method="POST" request-type="ajax-fun" request-value="PluginsRechargePayBack">
<div class="business-item ">
<form class="am-form form-validation-plugins-recharge-popup" action="{{:PluginsHomeUrl('wallet', 'recharge', 'pay')}}" method="POST" request-type="ajax-fun" request-value="PluginsRechargePayBack">
<div class="base">
<p>充值单号:<span class="recharge-no">...</span></p>
<p class="price">充值金额:<strong>...</strong></p>
</div>
<div class="business-item">
<label>支付选择</label>
{{if !empty($buy_payment_list)}}
<ul class="payment-list" data-type="payment">
{{foreach $buy_payment_list as $payment}}
......@@ -77,6 +88,7 @@
<img src="{{$payment.logo}}" />
{{/if}}
<span>{{$payment.name}}</span>
<i class="icon-active"></i>
</li>
{{/if}}
{{/foreach}}
......@@ -90,7 +102,7 @@
<div class="am-form-group am-form-group-refreshing">
<input type="hidden" name="recharge_id" value="" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认支付</button>
</div>
</form>
</div>
......@@ -108,7 +120,11 @@ function PluginsRechargeBack(e)
{
$('#plugins-recharge-pay-modal').modal('close');
var $popup = $('#plugins-recharge-pay-popup');
$popup.find('.business-item ul li').removeClass('selected');
$popup.find('input[name="payment_id"]').val('');
$popup.find('input[name="recharge_id"]').val(e.data.recharge_id);
$popup.find('.base .recharge-no').text(e.data.recharge_no);
$popup.find('.base .price strong').text(''+e.data.money);
$popup.modal('open');
} else {
Prompt(e.msg);
......
......@@ -23,7 +23,7 @@
<div class="user-content">
<div class="user-content-body">
<!-- user menu start -->
{{include file="../../../plugins/view/wallet/wallet/nav" /}}
{{include file="../../../plugins/view/wallet/public/nav" /}}
<!-- user menu end -->
<form class="am-form form-validation" method="post" action="{{:PluginsHomeUrl('wallet', 'wallet', 'recharge')}}" request-type="form">
......@@ -54,15 +54,16 @@
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr>
<tr id="data-list-{{$v.id}}">
<td>{{$v.recharge_no}}</td>
<td>{{$v.money}}</td>
<td class="money">+{{$v.money}}</td>
<td>{{$v.status_text}}</td>
<td class="am-hide-sm-only">{{$v.payment_name}}</td>
<td class="am-hide-sm-only">{{$v.pay_time_text}}</td>
<td class="am-hide-sm-only">{{$v.add_time_text}}</td>
<td>
<button class="am-btn am-btn-success am-topbar-btn am-btn-sm am-icon-shield recharge-submit" data-value="{{$v.id}}"> 继续支付</button>
<button class="am-btn am-btn-success am-btn-xs am-radius am-icon-shield recharge-submit" data-value="{{$v.id}}" data-recharge-no="{{$v.recharge_no}}" data-money="{{$v.money}}"> 支付</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:PluginsHomeUrl('wallet', 'recharge', 'delete')}}" data-id="{{$v.id}}" data-view="delete"> 删除</button>
</td>
</tr>
{{/foreach}}
......
......@@ -23,7 +23,7 @@
<div class="user-content">
<div class="user-content-body">
<!-- user menu start -->
{{include file="../../../plugins/view/wallet/wallet/nav" /}}
{{include file="../../../plugins/view/wallet/public/nav" /}}
<!-- user menu end -->
<form class="am-form form-validation" method="post" action="{{:PluginsHomeUrl('wallet', 'wallet', 'index')}}" request-type="form">
......
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\plugins\wallet;
use app\plugins\wallet\Common;
use app\plugins\wallet\BusinessService;
use app\service\PluginsService;
/**
* 钱包 - 余额提现
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Cash extends Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-03-15
* @desc description
*/
public function __construct()
{
parent::__construct();
}
/**
* 余额提现
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function index($params = [])
{
// 参数
$params = input();
$params['user'] = $this->user;
$this->assign('data_list', []);
// 参数
$this->assign('params', $params);
return $this->fetch('../../../plugins/view/wallet/cash/index');
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\plugins\wallet;
use think\Controller;
use app\service\UserService;
use app\service\PaymentService;
use app\plugins\wallet\service\WalletService;
/**
* 钱包 - 公共
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Common extends Controller
{
protected $user;
protected $user_wallet;
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-03-15
* @desc description
*/
public function __construct()
{
parent::__construct();
// 用户信息
$this->user = UserService::LoginUserInfo();
// 登录校验
if(empty($this->user))
{
if(IS_AJAX)
{
exit(json_encode(DataReturn('登录失效,请重新登录', -400)));
} else {
return $this->redirect('index/user/logininfo');
}
}
// 发起支付 - 支付方式
$this->assign('buy_payment_list', PaymentService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]));
// 用户钱包信息
$this->user_wallet = WalletService::UserWallet(['user'=>$this->user]);
$this->assign('user_wallet', $this->user_wallet['data']);
// 用户钱包状态
$wallet_error = '';
if(isset($this->user_wallet['code']) and $this->user_wallet['code'] == 0)
{
if(!isset($this->user_wallet['data']['status']) || $this->user_wallet['data']['status'] != 0)
{
$wallet_error = array_key_exists($this->user_wallet['data']['status'], WalletService::$wallet_status_list) ? '用户钱包[ '.WalletService::$wallet_status_list[$this->user_wallet['data']['status']]['name'].' ]' : '用户钱包状态异常错误';
}
} else {
$wallet_error = isset($this->user_wallet['msg']) ? $this->user_wallet['msg'] : '用户钱包异常错误';
}
$this->assign('wallet_error', $wallet_error);
// 所有ajax请求校验用户钱包状态
if(IS_AJAX && !empty($wallet_error))
{
exit(json_encode(DataReturn($wallet_error, -50)));
}
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\plugins\membershiplevel;
use think\Controller;
use app\plugins\membershiplevel\Service;
use app\service\PluginsService;
/**
* 会员等级管理插件 - 管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Level extends Controller
{
/**
* 等级页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-02-07T08:21:54+0800
* @param [array] $params [输入参数]
*/
public function index($params = [])
{
$ret = Service::LevelDataList();
if($ret['code'] == 0)
{
$this->assign('data_list', $ret['data']);
$this->assign('params', $params);
return $this->fetch('../../../plugins/view/membershiplevel/level/index');
} else {
return $ret['msg'];
}
}
/**
* 等级编辑
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-02-07T08:21:54+0800
* @param [array] $params [输入参数]
*/
public function saveinfo($params = [])
{
// 数据
$data = [];
if(!empty($params['id']))
{
$data_params = [
'get_id' => $params['id'],
];
$ret = Service::LevelDataList($data_params);
$data = empty($ret['data']) ? [] : $ret['data'];
}
$this->assign('data', $data);
return $this->fetch('../../../plugins/view/membershiplevel/level/saveinfo');
}
/**
* 等级保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-02-07T08:21:54+0800
* @param [array] $params [输入参数]
*/
public function save($params = [])
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
return Service::LevelDataSave($params);
}
/**
* 等级状态更新
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
* @param [array] $params [输入参数]
*/
public function statusupdate($params = [])
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params['data_field'] = 'level_list';
return Service::DataStatusUpdate($params);
}
/**
* 等级删除
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
* @param [array] $params [输入参数]
*/
public function delete($params = [])
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params['data_field'] = 'level_list';
return Service::DataDelete($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\plugins\wallet;
use app\plugins\wallet\Common;
use app\plugins\wallet\service\BaseService;
/**
* 钱包 - 充值
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Recharge extends Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-03-15
* @desc description
*/
public function __construct()
{
parent::__construct();
}
/**
* 充值明细
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function index($params = [])
{
// 参数
$params['user'] = $this->user;
// 分页
$number = MyC('admin_page_number', 10, true);
// 条件
$where = BaseService::RechargeListWhere($params);
// 获取总数
$total = BaseService::RechargeTotal($where);
// 分页
$page_params = array(
'number' => $number,
'total' => $total,
'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => PluginsHomeUrl('wallet', 'recharge', 'index'),
);
$page = new \base\Page($page_params);
$this->assign('page_html', $page->GetPageHtml());
// 获取列表
$data_params = array(
'm' => $page->GetPageStarNumber(),
'n' => $number,
'where' => $where,
);
$data = BaseService::RechargeList($data_params);
$this->assign('data_list', $data['data']);
// 参数
$this->assign('params', $params);
return $this->fetch('../../../plugins/view/wallet/recharge/index');
}
/**
* 充值订单创建
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function create($params = [])
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 用户
$params['user'] = $this->user;
return BaseService::RechargeCreate($params);
}
/**
* 支付
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function pay($params = [])
{
// 用户
$params['user'] = $this->user;
return BaseService::Pay($params);
}
/**
* 支付状态校验
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function paycheck($params = [])
{
if(input('post.'))
{
$params['user'] = $this->user;
return BaseService::RechargePayCheck($params);
} else {
$this->assign('msg', '非法访问');
return $this->fetch('public/tips_error');
}
}
/**
* 支付同步页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-04-29
* @desc description
* @param [array] $params [输入参数]
*/
public function respond($params = [])
{
$this->assign('msg', '支付失败');
return $this->fetch('public/pay_error');
}
/**
* 支付异步通知
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-04-29
* @desc description
* @param [array] $params [输入参数]
*/
public function notify($params = [])
{
$this->assign('msg', '支付成功');
return $this->fetch('public/pay_success');
}
/**
* 充值纪录删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-14
* @desc description
* @param [array] $params [输入参数]
*/
public function delete($params = [])
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始处理
$params['user'] = $this->user;
return BaseService::RechargeDelete($params);
}
}
?>
\ No newline at end of file
......@@ -10,25 +10,20 @@
// +----------------------------------------------------------------------
namespace app\plugins\wallet;
use think\Controller;
use app\plugins\wallet\Service;
use app\plugins\wallet\Common;
use app\plugins\wallet\BusinessService;
use app\service\PluginsService;
use app\service\UserService;
use app\service\IntegralService;
use app\service\PaymentService;
/**
* 我的钱包 - 钱包
* 钱包 - 账户明细
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Wallet extends Controller
class Wallet extends Common
{
private $user;
/**
* 构造方法
* @author Devil
......@@ -40,23 +35,6 @@ class Wallet extends Controller
public function __construct()
{
parent::__construct();
// 用户信息
$this->user = UserService::LoginUserInfo();
// 登录校验
if(empty($this->user))
{
if(IS_AJAX)
{
exit(json_encode(DataReturn('登录失效,请重新登录', -400)));
} else {
return $this->redirect('index/user/logininfo');
}
}
// 发起支付 - 支付方式
$this->assign('buy_payment_list', PaymentService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]));
}
/**
......@@ -109,201 +87,5 @@ class Wallet extends Controller
$this->assign('params', $params);
return $this->fetch('../../../plugins/view/wallet/wallet/index');
}
/**
* 充值明细
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function recharge($params = [])
{
// 参数
$params['user'] = $this->user;
// 分页
$number = MyC('admin_page_number', 10, true);
// 条件
$where = Service::RechargeListWhere($params);
// 获取总数
$total = Service::RechargeTotal($where);
// 分页
$page_params = array(
'number' => $number,
'total' => $total,
'where' => $params,
'page' => isset($params['page']) ? intval($params['page']) : 1,
'url' => PluginsHomeUrl('wallet', 'wallet', 'recharge'),
);
$page = new \base\Page($page_params);
$this->assign('page_html', $page->GetPageHtml());
// 获取列表
$data_params = array(
'm' => $page->GetPageStarNumber(),
'n' => $number,
'where' => $where,
);
$data = Service::RechargeList($data_params);
$this->assign('data_list', $data['data']);
// 参数
$this->assign('params', $params);
return $this->fetch('../../../plugins/view/wallet/wallet/recharge');
}
/**
* 余额提现
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function cash($params = [])
{
// 参数
$params = input();
$params['user'] = $this->user;
$this->assign('data_list', []);
// 参数
$this->assign('params', $params);
return $this->fetch('../../../plugins/view/wallet/wallet/cash');
}
/**
* 充值订单创建
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function rechargecreate($params = [])
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 用户
$params['user'] = $this->user;
return Service::RechargeCreate($params);
}
/**
* 支付
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function pay($params = [])
{
// 用户
$params['user'] = $this->user;
return Service::Pay($params);
}
/**
* 支付状态校验
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function paycheck($params = [])
{
if(input('post.'))
{
$params['user'] = $this->user;
return Service::RechargePayCheck($params);
} else {
$this->assign('msg', '非法访问');
return $this->fetch('public/tips_error');
}
}
/**
* 支付同步页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-04-29
* @desc description
* @param [array] $params [输入参数]
*/
public function respond($params = [])
{
$this->assign('msg', '支付失败');
return $this->fetch('public/pay_error');
}
/**
* 支付异步通知
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-04-29
* @desc description
* @param [array] $params [输入参数]
*/
public function notify($params = [])
{
$this->assign('msg', '支付成功');
return $this->fetch('public/pay_success');
}
/**
* 宠物解绑
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function untying($params = [])
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 用户
$params['user_id'] = $this->user['id'];
return Service::PetsUntying($params);
}
/**
* 丢失提供信息添加/编辑
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public function helpsave($params = [])
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 用户
$params['user_id'] = $this->user['id'];
return Service::HelpSave($params);
}
}
?>
\ No newline at end of file
......@@ -15,3 +15,34 @@ CREATE TABLE `s_plugins_wallet_recharge` (
KEY `status` (`status`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='钱包充值 - 应用';
# 钱包
CREATE TABLE `s_plugins_wallet` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
`status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '状态(0正常, 1异常, 2已注销)',
`normal_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '有效金额(包含赠送金额)',
`frozen_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '冻结金额',
`give_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '赠送金额(所有赠送金额总计)',
`add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
`upd_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `status` (`status`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='钱包 - 应用';
# 钱包日志
CREATE TABLE `s_plugins_wallet_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
`wallet_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '钱包id',
`business_type` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '业务类型(-1未知, 0充值, 1提现, 2消费)',
`operation_type` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '操作类型(-1未知, 0减少, 1增加)',
`money_type` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '操作类型(-1未知, 0正常, 1冻结)',
`money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '操作金额',
`msg` char(200) NOT NULL DEFAULT '' COMMENT '变更说明',
`add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`),
KEY `wallet_id` (`wallet_id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='钱包日志 - 应用';
\ No newline at end of file
......@@ -8,7 +8,7 @@
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\plugins\wallet;
namespace app\plugins\wallet\service;
use think\Db;
use app\service\PluginsService;
......@@ -16,13 +16,13 @@ use app\service\ResourcesService;
use app\service\PaymentService;
/**
* 会员等级服务层
* 基础服务层
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Service
class BaseService
{
// 基础数据附件字段
public static $base_config_attachment_field = [
......@@ -41,7 +41,7 @@ class Service
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-04-30T00:13:14+0800
* @param array $params [description]
* @param [array] $params [输入参数]
*/
public static function RechargeList($params = [])
{
......@@ -118,7 +118,7 @@ class Service
// 关键字
if(!empty($params['keywords']))
{
$where[] = ['recharge_no', 'like', '%'.$params['keywords'].'%'];
$where[] = ['recharge_no', '=', $params['keywords']];
}
return $where;
......@@ -176,8 +176,8 @@ class Service
return DataReturn('添加成功',0, [
'recharge_id' => $recharge_id,
'recharge_no' => $data['recharge_no'],
'money' => $data['money'],
]);
//return self::Pay($params);
}
return DataReturn('添加失败', -100);
}
......@@ -269,7 +269,7 @@ class Service
{
$call_back_url = $url.'_respond.php';
} else {
$call_back_url = PluginsHomeUrl('wallet', 'wallet', 'respond', ['paymentname'=>$payment[0]['payment']]);
$call_back_url = PluginsHomeUrl('wallet', 'recharge', 'respond', ['paymentname'=>$payment[0]['payment']]);
if(stripos($call_back_url, '?') !== false)
{
$call_back_url = $url.'_respond.php';
......@@ -287,7 +287,7 @@ class Service
'notify_url' => $url.'_notify.php',
'call_back_url' => $call_back_url,
'site_name' => MyC('home_site_name', 'ShopXO', true),
'ajax_url' => PluginsHomeUrl('wallet', 'wallet', 'paycheck')
'ajax_url' => PluginsHomeUrl('wallet', 'recharge', 'paycheck')
);
$pay_name = 'payment\\'.$payment[0]['payment'];
$ret = (new $pay_name($payment[0]['config']))->Pay($pay_data);
......@@ -337,9 +337,51 @@ class Service
}
if($recharge['status'] == 1)
{
return DataReturn('支付成功', 0, ['url'=>PluginsHomeUrl('wallet', 'wallet', 'recharge')]);
return DataReturn('支付成功', 0, ['url'=>PluginsHomeUrl('wallet', 'recharge', 'index')]);
}
return DataReturn('支付中', -300);
}
/**
* 充值纪录删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-14
* @desc description
* @param [array] $params [输入参数]
*/
public static function RechargeDelete($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'id',
'error_msg' => '删除数据id有误',
],
[
'checked_type' => 'empty',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 删除
$where = [
'id' => intval($params['id']),
'user_id' => $params['user']['id']
];
if(Db::name('PluginsWalletRecharge')->where($where)->delete())
{
return DataReturn('删除成功', 0);
}
return DataReturn('删除失败或资源不存在', -100);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\plugins\wallet\service;
use think\Db;
use app\service\PluginsService;
use app\service\ResourcesService;
use app\service\PaymentService;
/**
* 钱包服务层
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class WalletService
{
// 钱包状态
public static $wallet_status_list = [
0 => ['value' => 0, 'name' => '正常', 'checked' => true],
1 => ['value' => 1, 'name' => '异常'],
2 => ['value' => 2, 'name' => '已注销'],
];
/**
* 用户钱包
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-04-30
* @desc description
* @param [array] $params [输入参数]
*/
public static function UserWallet($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'user',
'error_msg' => '用户信息有误',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 获取钱包, 不存在则创建
$wallet = Db::name('PluginsWallet')->where(['user_id' => $params['user']['id']])->find();
if(empty($wallet))
{
$data = [
'user_id' => $params['user']['id'],
'status' => 0,
'add_time' => time(),
];
$wallet_id = Db::name('PluginsWallet')->insertGetId($data);
if($wallet_id > 0)
{
$wallet = Db::name('PluginsWallet')->find($wallet_id);
} else {
return DataReturn('钱包添加失败', -100);
}
}
return DataReturn('操作成功', 0, $wallet);
}
}
?>
\ No newline at end of file
......@@ -658,6 +658,12 @@ php;
if(\base\FileUtil::CreateDir($app_static_css_dir) !== true)
{
return DataReturn('应用静态目录创建失败[css]', -10);
} else {
// 后端css目录创建
if(\base\FileUtil::CreateDir($app_static_css_dir.DS.'admin') !== true)
{
return DataReturn('应用静态目录创建失败[css/admin]', -10);
}
}
// 编辑模式下不生成后端文件
......@@ -685,7 +691,7 @@ php;
}
// css创建
if(@file_put_contents($app_static_css_dir.DS.'admin.css', $admin_css) === false)
if(@file_put_contents($app_static_css_dir.DS.'admin'.DS.'admin.css', $admin_css) === false)
{
return DataReturn('应用静态文件创建失败[admin-css]', -11);
}
......@@ -712,8 +718,14 @@ php;
return DataReturn('应用视图文件创建失败[index-view]', -11);
}
// 前端css目录创建
if(\base\FileUtil::CreateDir($app_static_css_dir.DS.'index') !== true)
{
return DataReturn('应用静态目录创建失败[css/index]', -10);
}
// css创建
if(@file_put_contents($app_static_css_dir.DS.'index.css', $index_css) === false)
if(@file_put_contents($app_static_css_dir.DS.'index'.DS.'index.css', $index_css) === false)
{
return DataReturn('应用静态文件创建失败[index-css]', -11);
}
......@@ -722,7 +734,7 @@ php;
} else {
\base\FileUtil::UnlinkFile($app_dir.DS.'Index.php');
\base\FileUtil::UnlinkDir(APP_PATH.'plugins'.DS.'view'.DS.trim($params['plugins']).DS.'index');
\base\FileUtil::UnlinkFile($app_static_css_dir.DS.'index.css');
\base\FileUtil::UnlinkFile($app_static_css_dir.DS.'index'.DS.'index.css');
}
return DataReturn('创建成功', 0);
......
......@@ -992,7 +992,7 @@ function ConfirmNetworkAjax(e)
AMUI.dialog.confirm({
title: title,
content: msg,
onConfirm: function(e)
onConfirm: function(result)
{
AjaxRequest(e);
},
......
/* 筛选 */
.thin, .pay-list { overflow:hidden; }
.thin { overflow:hidden; }
.thin .so { width:66%; }
.thin_sub { font-weight:100; margin:10px 0px 0px 10px; cursor: pointer; }
.so-list { width:100%; margin-top: 10px; }
......@@ -32,10 +32,32 @@
}
/**
* 列表
* 导航
*/
.user-content-body .data-list {
margin-top: 10px;
.user-content-body .am-nav {
border-bottom: 1px solid #eee;
}
.user-content-body .am-nav li {
margin-bottom: -1px;
}
.user-content-body .am-nav li a {
font-size: 14px;
}
.user-content-body .am-nav .am-active {
border-bottom: 2px solid #ed5565;
}
.user-content-body .am-nav > li > a:hover, .user-content-body .am-nav > li > a:focus {
background: transparent;
}
.user-content-body .am-nav .am-topbar-right {
margin-right: 0;
}
.user-content-body .am-nav .am-topbar-right .am-btn:not(:last-child) {
margin-right: 5px;
}
.user-content-body .am-nav .am-topbar-right .am-topbar-btn {
margin-top: 0;
}
/**
......@@ -67,35 +89,6 @@
margin-left: 10px;
}
/**
* 导航
*/
.user-content-body .am-nav {
border-bottom: 1px solid #eee;
}
.user-content-body .am-nav li {
margin-bottom: -1px;
}
.user-content-body .am-nav li a {
font-size: 14px;
}
.user-content-body .am-nav .am-active {
border-bottom: 2px solid #ed5565;
}
.user-content-body .am-nav > li > a:hover, .user-content-body .am-nav > li > a:focus {
background: transparent;
}
.user-content-body .am-nav .am-topbar-right {
margin-right: 0;
}
.user-content-body .am-nav .am-topbar-right .am-btn:not(:last-child) {
margin-right: 5px;
}
.user-content-body .am-nav .am-topbar-right .am-topbar-btn {
margin-top: 0;
}
/**
* 业务弹窗
*/
......@@ -104,7 +97,8 @@
.user-content-body .business-item ul { padding: 5px 1px; overflow: hidden; }
.user-content-body .business-item ul li { border:1px solid transparent ;overflow: hidden; float: left; cursor: pointer; padding: 5px; border: 1px solid #eee; margin: 0 10px 10px 0; background: #fff; }
.user-content-body .business-item ul li img { width: 36px; height: 36px; }
.user-content-body .business-item ul li:hover, .user-content-body .business-item ul li.selected { border-color: #e23f36 ; position: relative; box-shadow: 0px 0 0px 1px #e23f36; }
.user-content-body .business-item ul li:hover, .user-content-body .business-item ul li.selected { border-color: #e4383c ; position: relative; box-shadow: 0px 0 0px 1px #e4383c; }
.user-content-body .business-item li.selected i.icon-active { position: absolute; width: 10px; height: 10px; font-size: 0; line-height: 0; right: 0px; bottom: 0px; background: url(../../images/wallet/sys_item_selected.gif) no-repeat right bottom; }
@media only screen and (min-width:640px) {
.user-content-body .business-item ul li {width:calc(33% - 5px); }
.user-content-body .business-item ul li:nth-child(3n) { margin-right: 0; }
......@@ -129,3 +123,27 @@
margin-left: -10000px;
position: absolute;
}
#plugins-recharge-pay-popup .base {
margin-bottom: 15px;
padding: 5px 10px;
background: #f6f6f6;
border: 1px solid #efefef;
}
#plugins-recharge-pay-popup .base p {
line-height: 24px;
}
#plugins-recharge-pay-popup .base .recharge-no {
font-weight: 700;
color: #666;
}
/**
* 列表
*/
.user-content-body .data-list {
margin-top: 10px;
}
.user-content-body .data-list .money {
color: #E4393C;
}
\ No newline at end of file
$(function()
{
// 表单初始化
if($('form.form-validation-plugins-recharge-modal').length > 0)
{
FromInit('form.form-validation-plugins-recharge-modal');
}
if($('form.form-validation-plugins-recharge-popup').length > 0)
{
FromInit('form.form-validation-plugins-recharge-popup');
}
// 混合列表选择
$('.business-item ul li').on('click', function()
......@@ -17,18 +23,4 @@ $(function()
}
$('form.form-validation-plugins-recharge-popup input[name='+$(this).parent().data('type')+'_id]').val(value).blur();
});
// 充值列表支付发起事件
$('.recharge-submit').on('click', function()
{
var recharge_id = $(this).data('value') || null;
var $popup = $('#plugins-recharge-pay-popup');
if(recharge_id != null)
{
$popup.find('input[name="recharge_id"]').val(recharge_id);
$popup.modal('open');
} else {
Prompt('充值id有误');
}
});
});
\ No newline at end of file
$(function()
{
// 充值列表支付发起事件
$('.recharge-submit').on('click', function()
{
var recharge_id = $(this).data('value') || null;
var recharge_no = $(this).data('recharge-no') || null;
var money = $(this).data('money') || null;
var $popup = $('#plugins-recharge-pay-popup');
if(recharge_id != null && recharge_no != null && money != null)
{
$popup.find('.business-item ul li').removeClass('selected');
$popup.find('input[name="payment_id"]').val('');
$popup.find('input[name="recharge_id"]').val(recharge_id);
$popup.find('.base .recharge-no').text(recharge_no);
$popup.find('.base .price strong').text(''+money);
$popup.modal('open');
} else {
Prompt('充值参数有误');
}
});
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册