diff --git a/app/admin/view/default/public/module/form_table.html b/app/admin/view/default/public/module/form_table.html index ad53adae6..2af8e0993 100644 --- a/app/admin/view/default/public/module/form_table.html +++ b/app/admin/view/default/public/module/form_table.html @@ -10,12 +10,12 @@ - +

{{:MyLang('buy.confirm_delivery_address_name')}} @@ -117,7 +117,7 @@ 'msg' => MyLang('buy.no_address_info_tips'), 'icon' => $attachment_host.'/static/common/images/no-address.png', ])}} - +

{{/if}}
@@ -453,17 +453,17 @@ {{/php}} - + {{if $goods['original_price'] gt 0}}

{{$currency_symbol}}{{$goods.original_price}}

{{/if}} -

{{$currency_symbol}}{{$goods.price}}

+

{{$currency_symbol}}{{$goods.price}}

{{$goods.stock}} {{$goods.inventory_unit}} - {{$currency_symbol}}{{$goods.total_price}} + {{$currency_symbol}}{{$goods.total_price}} {{/foreach}} @@ -505,12 +505,11 @@ - - + -
+
{{if $v['order_base']['total_price'] neq $v['order_base']['actual_price']}} - {{$currency_symbol}}{{$v.order_base.total_price}} + {{$currency_symbol}}{{$v.order_base.total_price}} {{/if}} {{:MyLang('buy.goods_item_total_name')}} diff --git a/app/index/view/default/cart/index.html b/app/index/view/default/cart/index.html index 547650ecf..57ac1f8c4 100755 --- a/app/index/view/default/cart/index.html +++ b/app/index/view/default/cart/index.html @@ -372,8 +372,7 @@ {{else /}}
- - +

{{:MyLang('cart.no_cart_data_tips')}}

    diff --git a/app/index/view/default/config.json b/app/index/view/default/config.json index b7dd99083..da29eb6ed 100755 --- a/app/index/view/default/config.json +++ b/app/index/view/default/config.json @@ -1,6 +1,6 @@ { "name":"默认主题", - "ver":"3.0.0", + "ver":"3.0.1", "author":"Devil", "home":"https://shopxo.net/" } \ No newline at end of file diff --git a/app/index/view/default/module/goods/slider/base.html b/app/index/view/default/module/goods/slider/base.html index 89349b34d..a965723db 100644 --- a/app/index/view/default/module/goods/slider/base.html +++ b/app/index/view/default/module/goods/slider/base.html @@ -55,7 +55,7 @@ {{/php}} - {{$v.title}} + {{$v.title}} diff --git a/app/index/view/default/module/goods/slider/piece.html b/app/index/view/default/module/goods/slider/piece.html index eed9d9919..700a68bc4 100644 --- a/app/index/view/default/module/goods/slider/piece.html +++ b/app/index/view/default/module/goods/slider/piece.html @@ -53,7 +53,7 @@ {{/php}} - {{$v.title}} + {{$v.title}} diff --git a/app/index/view/default/public/footer_nav.html b/app/index/view/default/public/footer_nav.html index 96a60caac..37b8311aa 100755 --- a/app/index/view/default/public/footer_nav.html +++ b/app/index/view/default/public/footer_nav.html @@ -77,7 +77,7 @@
  • 友情链接
  • {{foreach $link_list as $v}}
  • - {{$v.name}} + {{$v.name}}
  • {{/foreach}}
diff --git a/app/index/view/default/public/goods_category.html b/app/index/view/default/public/goods_category.html index 02b18438d..ea9728280 100755 --- a/app/index/view/default/public/goods_category.html +++ b/app/index/view/default/public/goods_category.html @@ -15,8 +15,8 @@ {{foreach $goods_category_list as $k=>$v}}
  • {{if $category_show_level gt 1}} - - + + {{/if}}
    diff --git a/app/index/view/default/public/module/form_table.html b/app/index/view/default/public/module/form_table.html index d2eb3b47b..55106cdbf 100644 --- a/app/index/view/default/public/module/form_table.html +++ b/app/index/view/default/public/module/form_table.html @@ -10,12 +10,12 @@ -
    - +
    {{:MyLang('userintegral.base_normal_title')}}
    @@ -15,7 +15,7 @@
    - +
    {{:MyLang('userintegral.base_locking_title')}}
    diff --git a/app/service/ConstService.php b/app/service/ConstService.php index 2ed7b7d38..78ddff6e7 100644 --- a/app/service/ConstService.php +++ b/app/service/ConstService.php @@ -120,6 +120,7 @@ class ConstService '2.3.2' => ['value' => '2.3.2', 'name' => 'v2.3.2'], '2.3.3' => ['value' => '2.3.3', 'name' => 'v2.3.3'], '3.0.0' => ['value' => '3.0.0', 'name' => 'v3.0.0'], + '3.0.1' => ['value' => '3.0.1', 'name' => 'v3.0.1'], ], // 搜索排序方式 diff --git a/app/service/GoodsService.php b/app/service/GoodsService.php index c232eba44..79753c596 100755 --- a/app/service/GoodsService.php +++ b/app/service/GoodsService.php @@ -2264,10 +2264,32 @@ class GoodsService { $base = Db::name('GoodsSpecBase')->find($goods_service_goods_spec_base_static_data[$key]); } else { - // 有规格值 - $base = []; - if(!empty($spec)) + // 商品信息 + $info = Db::name('Goods')->where(['id'=>$goods_id])->field('id,title,is_exist_many_spec')->find(); + if(empty($info)) { + return DataReturn('【'.$goods_id.'】'.MyLang('no_goods'), -1); + } + + // 规格值校验处理 + $base = []; + if(empty($spec)) + { + // 没有指定规格、但是商品已存在规则则报错 + if($info['is_exist_many_spec'] == 1) + { + return DataReturn('【'.$info['title'].'】'.MyLang('common_service.goods.base_spec_not_choice_tips'), -1); + } + + // 单个规则则直接获取规格基础 + $base = Db::name('GoodsSpecBase')->where($where)->find(); + } else { + // 指定规格规格、但是商品没有规格则报错 + if($info['is_exist_many_spec'] == 0) + { + return DataReturn('【'.$info['title'].'】'.MyLang('common_service.goods.base_spec_empty_tips'), -1); + } + // 获取规格值基础值id $where['value'] = $spec; $ids = Db::name('GoodsSpecValue')->where($where)->column('goods_spec_base_id'); @@ -2304,8 +2326,6 @@ class GoodsService } } } - } else { - $base = Db::name('GoodsSpecBase')->where($where)->find(); } if(!empty($base)) { diff --git a/app/service/OrderService.php b/app/service/OrderService.php index 45bf0a103..bc759e57e 100755 --- a/app/service/OrderService.php +++ b/app/service/OrderService.php @@ -2005,7 +2005,7 @@ class OrderService $ret = ParamsChecked($params, $p); if($ret !== true) { - throw new \Exception($ret['msg']); + throw new \Exception($ret); } // 用户类型 @@ -2045,7 +2045,7 @@ class OrderService $ret = ParamsChecked($params, $p); if($ret !== true) { - throw new \Exception($ret['msg']); + throw new \Exception($ret); } break; @@ -2061,7 +2061,7 @@ class OrderService $ret = ParamsChecked($params, $p); if($ret !== true) { - throw new \Exception($ret['msg']); + throw new \Exception($ret); } // 校验 @@ -2076,42 +2076,59 @@ class OrderService } break; } - // 订单更新 - $upd_data = [ - 'status' => 3, - 'express_id' => isset($params['express_id']) ? intval($params['express_id']) : 0, - 'express_number' => isset($params['express_number']) ? $params['express_number'] : '', - 'delivery_time' => time(), - 'upd_time' => time(), - ]; - if(!Db::name('Order')->where($where)->update($upd_data)) - { - throw new \Exception(MyLang('delivery_fail')); - } - // 库存扣除 - $ret = BuyService::OrderInventoryDeduct(['order_id'=>$order['id'], 'opt_type'=>'delivery']); - if($ret['code'] != 0) - { - throw new \Exception($ret['msg']); - } - - // 用户消息 - $lang = MyLang('common_service.order.order_delivery_message_data'); - MessageService::MessageAdd($order['user_id'], $lang['title'], $lang['desc'], self::BusinessTypeName(), $order['id']); - - // 订单状态日志 - $creator = isset($params['creator']) ? intval($params['creator']) : 0; - $creator_name = isset($params['creator_name']) ? htmlentities($params['creator_name']) : ''; - self::OrderHistoryAdd($order['id'], $upd_data['status'], $order['status'], MyLang('delivery_title'), $creator, $creator_name); - - // 完成 - return DataReturn(MyLang('delivery_success'), 0); + // 发货更新操作 + return self::OrderDeliveryUpdateHandle($order, $params); } catch(\Exception $e) { return DataReturn($e->getMessage(), -1); } } + /** + * 订单发货更新处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-09-30 + * @desc description + * @param [array] $order [订单信息] + * @param [array] $params[输入参数] + */ + public static function OrderDeliveryUpdateHandle($order, $params = []) + { + // 订单更新 + $upd_data = [ + 'status' => 3, + 'express_id' => isset($params['express_id']) ? intval($params['express_id']) : 0, + 'express_number' => isset($params['express_number']) ? $params['express_number'] : '', + 'delivery_time' => time(), + 'upd_time' => time(), + ]; + if(!Db::name('Order')->where(['id'=>$order['id']])->update($upd_data)) + { + return DataReturn(MyLang('delivery_fail'), -1); + } + + // 库存扣除 + $ret = BuyService::OrderInventoryDeduct(['order_id'=>$order['id'], 'opt_type'=>'delivery']); + if($ret['code'] != 0) + { + return $ret; + } + + // 用户消息 + $lang = MyLang('common_service.order.order_delivery_message_data'); + MessageService::MessageAdd($order['user_id'], $lang['title'], $lang['desc'], self::BusinessTypeName(), $order['id']); + + // 订单状态日志 + $creator = isset($params['creator']) ? intval($params['creator']) : 0; + $creator_name = isset($params['creator_name']) ? htmlentities($params['creator_name']) : ''; + self::OrderHistoryAdd($order['id'], $upd_data['status'], $order['status'], MyLang('delivery_title'), $creator, $creator_name); + + // 完成 + return DataReturn(MyLang('delivery_success'), 0); + } + /** * 订单收货 * @author Devil diff --git a/app/service/UserService.php b/app/service/UserService.php index 08873de14..23ece21ed 100755 --- a/app/service/UserService.php +++ b/app/service/UserService.php @@ -397,12 +397,15 @@ class UserService * @param [string] $where_field [字段名称] * @param [string] $where_value [字段值] * @param [string] $field [指定字段] + * @param [array] $params [输入参数] */ - public static function UserPlatformInfo($where_field, $where_value, $field = '*') + public static function UserPlatformInfo($where_field, $where_value, $field = '*', $params = []) { + $system_type = empty($params['system_type_name']) ? SYSTEM_TYPE : $params['system_type_name']; + $platform = empty($params['platform']) ? APPLICATION_CLIENT_TYPE : $params['platform']; $where = [ - ['system_type', '=', SYSTEM_TYPE], - ['platform', '=', APPLICATION_CLIENT_TYPE], + ['system_type', '=', $system_type], + ['platform', '=', $platform], [$where_field, '=', $where_value], ]; return Db::name('UserPlatform')->where($where)->field($field)->find(); @@ -418,8 +421,9 @@ class UserService * @param [string] $where_field [字段名称] * @param [string] $where_value [字段值] * @param [string] $field [指定字段] + * @param [array] $params [输入参数] */ - public static function UserInfo($where_field, $where_value, $field = '*') + public static function UserInfo($where_field, $where_value, $field = '*', $params = []) { // 用户平台表结构 $structure = ResourcesService::TableStructureData('UserPlatform'); @@ -446,9 +450,11 @@ class UserService } // 查询用户信息 + $system_type = empty($params['system_type_name']) ? SYSTEM_TYPE : $params['system_type_name']; + $platform = empty($params['platform']) ? APPLICATION_CLIENT_TYPE : $params['platform']; $where = [ - ['up.system_type', '=', SYSTEM_TYPE], - ['up.platform', '=', APPLICATION_CLIENT_TYPE], + ['up.system_type', '=', $system_type], + ['up.platform', '=', $platform], [$where_field, '=', $where_value], ['u.is_delete_time', '=', 0], ['u.is_logout_time', '=', 0], @@ -503,8 +509,9 @@ class UserService if($where_field != 'id') { $system_type = empty($params['system_type_name']) ? SYSTEM_TYPE : $params['system_type_name']; + $platform = empty($params['platform']) ? APPLICATION_CLIENT_TYPE : $params['platform']; $where[] = ['system_type', '=', $system_type]; - $where[] = ['platform', '=', APPLICATION_CLIENT_TYPE]; + $where[] = ['platform', '=', $platform]; } $data['upd_time'] = time(); return Db::name('UserPlatform')->where($where)->update($data); @@ -792,13 +799,14 @@ class UserService * @datetime 2017-03-09T11:37:43+0800 * @param [int] $user_id [用户id] * @param [array] $user [用户信息] + * @param [array] $params [输入参数] * @return [boolean] [记录成功true, 失败false] */ - public static function UserLoginRecord($user_id = 0, $user = []) + public static function UserLoginRecord($user_id = 0, $user = [], $params = []) { if(!empty($user_id) && empty($user)) { - $user = self::UserHandle(self::UserInfo('id', $user_id)); + $user = self::UserHandle(self::UserInfo('id', $user_id, '*', $params)); } if(!empty($user)) { @@ -1291,7 +1299,7 @@ class UserService $body_html = []; // 用户登录后钩子 - $user = self::UserHandle(self::UserInfo('id', $user_id)); + $user = self::UserHandle(self::UserInfo('id', $user_id, '*', $params)); // 会员码生成处理 if(empty($user['number_code'])) @@ -2687,12 +2695,12 @@ class UserService * @param [array] $data [用户信息] * @param [array] $params [输入参数] */ - public static function UserBaseHandle($data, $params) + public static function UserBaseHandle($data, $params = []) { // 系统类型 if(empty($data['system_type'])) { - $data['system_type'] = SYSTEM_TYPE; + $data['system_type'] = empty($params['system_type_name']) ? SYSTEM_TYPE : $params['system_type_name']; } // 基础参数处理 diff --git a/changelog.txt b/changelog.txt index 71ca028ff..6c82fc6f1 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,19 @@ ++=========================================================+ + ShopXO 3.0.1 Release 20230903 http://shopxo.net ++=========================================================+ +1. 订单管理再次支付默认选中上一次的支付方式 +2. 订单发货业务模块拆分 +3. 订单确认页面导航和合计样式错位修复 +4. 用户服务层基础方法优化,扩展性更高 +5. 友情链接标题未显示修复并去除title属性 +6. 富文本图片去除title属性 +7. 公共title忽略图片标签 +8. 购物车无数据提示icon错误修复 +9. 订单确认页面地址切换样式错位优化 +10. 动态数据表格支持头部class唯一表示 + + + +=========================================================+ ShopXO 3.0.0 Release 20230828 http://shopxo.net +=========================================================+ diff --git a/public/core.php b/public/core.php index 938cef2fa..dc988c5c7 100755 --- a/public/core.php +++ b/public/core.php @@ -10,7 +10,7 @@ // +---------------------------------------------------------------------- // 系统版本 -define('APPLICATION_VERSION', 'v3.0.0'); +define('APPLICATION_VERSION', 'v3.0.1'); // 检测PHP环境 if(version_compare(PHP_VERSION,'7.4.0','<')) diff --git a/public/static/admin/default/js/order.js b/public/static/admin/default/js/order.js index 225478a80..cfe110376 100755 --- a/public/static/admin/default/js/order.js +++ b/public/static/admin/default/js/order.js @@ -39,16 +39,20 @@ $(function() var $form_pay = $('form.form-validation-pay'); $(document).on('click', '.submit-pay', function() { - $form_pay.find('input[name=id]').val($(this).data('id')); var payment_id = parseInt($(this).data('payment-id') || 0); - if($('.payment-items-'+payment_id).length > 0) + $form_pay.find('input[name=id]').val($(this).data('id')); + $form_pay.find('input[name=payment_id]').val(0); + $form_pay.find('ul.payment-list li').each(function(k, v) { - $form_pay.find('input[name=payment_id]').val(payment_id); - $('.payment-items-'+payment_id).addClass('selected').siblings('li').removeClass('selected'); - } else { - $form_pay.find('input[name=payment_id]').val(0); - $('ul.payment-list li.selected').removeClass('selected'); - } + var temp = parseInt($(this).data('value') || 0); + if(temp == payment_id) + { + $(this).addClass('selected'); + $form_pay.find('input[name=payment_id]').val(payment_id); + } else { + $(this).removeClass('selected'); + } + }); }); // 支付操作表单 $form_pay.find('button[type=submit]').on('click', function() diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index 0e6bebf0b..96c7ad5ef 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -495,6 +495,7 @@ form.am-form .am-form-group.am-form-icon { } .common-prompt .am-close { font-size: 1.8rem; + color: #666; } .common-prompt i{ position: absolute; @@ -506,19 +507,16 @@ form.am-form .am-form-group.am-form-icon { background-color: #FFEBE0; border-color: #EB5E12; color: #EB5E12; - /* box-shadow: 0 0.2rem 0.4rem #fef0f0, 0 0 0.6rem rgba(0, 0, 0, 0); */ } .common-prompt.am-alert-warning { background-color: #FFF6E3; border-color: #FAAD14; color: #FAAD14; - /* box-shadow: 0 0.2rem 0.4rem #ffe7d5, 0 0 0.6rem rgba(0, 0, 0, 0); */ } .common-prompt.am-alert-success { background: #E9FFF0; border-color: #38b865; color: #38B865; - /* box-shadow: 0 0.2rem 0.4rem #e3fbd6, 0 0 0.6rem rgba(0, 0, 0, 0); */ } .common-prompt .prompt-content { text-align: left; font-size: 1.2rem; } .common-prompt .prompt-msg { @@ -1097,7 +1095,7 @@ button.colorpicker-submit img { * 表格-基础样式 */ .am-table-scrollable-horizontal { - border: 0.1rem solid rgba(0,0,0,.02); + border: 0.1rem solid rgba(0,0,0,.04); position: relative; } .am-table-scrollable-horizontal .form-table-no-data { @@ -1219,14 +1217,11 @@ button.colorpicker-submit img { /** * 表格-用户信息 */ -.am-form-table-data-container ul.user-base { - padding-top: 0.2rem; -} .am-form-table-data-container ul.user-base li { - line-height: 1.2rem; + line-height: 1.4rem; } .am-form-table-data-container ul.user-base li:first-child { - margin-bottom: 0.7rem; + margin-bottom: 0.5rem; } .am-form-table-data-container ul.user-base .user-number-code .am-dropdown-content { min-width: 10rem; diff --git a/public/static/common/lib/assets/css/amazeui.css b/public/static/common/lib/assets/css/amazeui.css index 9204526a0..0ed4a15dc 100755 --- a/public/static/common/lib/assets/css/amazeui.css +++ b/public/static/common/lib/assets/css/amazeui.css @@ -3392,7 +3392,7 @@ fieldset[disabled] .am-checkbox-inline { text-decoration: none; line-height: 1.2rem; background-color: #fff; - border: 0.1rem solid rgba(0,0,0,.02); + border: 0.1rem solid rgba(0,0,0,.06); border-radius: 0; margin-bottom: 0.5rem; margin-right: 0.5rem; @@ -4014,6 +4014,7 @@ fieldset[disabled] .am-checkbox-inline { text-align: center; background-color: #999999; border-radius: 0; + border: 0; } .am-badge:empty { display: none; diff --git a/public/static/index/default/css/buy.css b/public/static/index/default/css/buy.css index 4a2456850..27a0ab8ee 100755 --- a/public/static/index/default/css/buy.css +++ b/public/static/index/default/css/buy.css @@ -15,19 +15,6 @@ border: 0; } -.buy-items table tbody tr td .buy-point-discharge { - display: flex; - flex-flow: row wrap; - justify-content: center; - align-items: center; -} - -.buy-items table tbody tr td .buy-point-discharge-sum { - display: flex; - flex-flow: row nowrap; - align-items: center; -} - .warehouse-info { display: flex; align-items: center; @@ -214,7 +201,7 @@ ul.address-list li .user-base .address-detail .user { /*合计*/ .buy-order-nav .box { float: left; - width: calc(100% - 12rem); + width: calc(100% - 14rem); height: 5rem; line-height: 5rem; text-align: left; diff --git a/public/static/index/default/css/common.css b/public/static/index/default/css/common.css index aa727783d..1d0624a10 100755 --- a/public/static/index/default/css/common.css +++ b/public/static/index/default/css/common.css @@ -1184,7 +1184,7 @@ ul.am-dropdown-content>li>a:focus { } .mixed-tips-content { - margin-top: 0.5rem; + margin: 0.5rem 0 0 2rem; } .mixed-tips-content h1 { @@ -1381,7 +1381,8 @@ ul.am-dropdown-content>li>a:focus { .friendship-list ul li.title { font-weight: 500; font-size: 1.4rem; - color: #FFFFFF; + color: #333; + margin-right: 2rem; } /** diff --git a/public/static/index/default/css/index.css b/public/static/index/default/css/index.css index 57e2754fd..3884dcf19 100755 --- a/public/static/index/default/css/index.css +++ b/public/static/index/default/css/index.css @@ -25,7 +25,7 @@ ul, li, ol {list-style: none;} .floor {position: relative; } /*小标签*/ -.aggregation .word{overflow: hidden; padding: 2rem 1.5rem; margin: 1.5rem;background: rgba(255,255,255,0.6);} +.aggregation .word{overflow: hidden; padding: 2rem 1.5rem; margin: 1.5rem;background: rgba(255,255,255,0.6); width: calc(100% - 3rem); } .word .outer {margin: 0.5rem; width: calc(50% - 1.4rem); height: 2.6rem; line-height: 2.6rem; text-align: center;color: #666666;display: inline-block; border: 0.1rem solid #cecece; text-decoration: none; overflow: hidden;} /*楼层左侧*/ @@ -224,5 +224,5 @@ ul, li, ol {list-style: none;} @media only screen and (min-width: 641px) { .category-content .category{background: rgba(238,238,238,.32); } /*楼层左侧*/ - .aggregation .word{ padding: 0.5rem 1rem; position: absolute;bottom: 0;} + .aggregation .word{ padding: 0.5rem 1rem; position: absolute;bottom: 0; } } \ No newline at end of file diff --git a/public/static/index/default/css/module.css b/public/static/index/default/css/module.css index aaaf1291c..7c215a235 100644 --- a/public/static/index/default/css/module.css +++ b/public/static/index/default/css/module.css @@ -202,12 +202,8 @@ .module-goods-list-base .item .goods-info { width: 14rem; - border-radius: 0.4rem; - overflow: hidden; - display: inline-block; - background-size: cover; - background-position: center; - background-repeat: no-repeat; + height: 14rem; + border-radius: var(--border-radius); } .module-goods-list-base .item .goods-info img { @@ -310,6 +306,7 @@ @media only screen and (min-width: 1600px) { .module-goods-list-base .item .goods-info { width: 16rem; + height: 16rem; } } diff --git a/public/static/index/default/images/empty-cart.png b/public/static/index/default/images/empty-cart.png new file mode 100644 index 000000000..7804b8c5a Binary files /dev/null and b/public/static/index/default/images/empty-cart.png differ diff --git a/public/static/index/default/images/preview.jpg b/public/static/index/default/images/preview.jpg old mode 100755 new mode 100644 index 7cc0d5a88..74f29903b Binary files a/public/static/index/default/images/preview.jpg and b/public/static/index/default/images/preview.jpg differ diff --git a/public/static/index/default/js/order.js b/public/static/index/default/js/order.js index 56589d260..f77e017f5 100755 --- a/public/static/index/default/js/order.js +++ b/public/static/index/default/js/order.js @@ -12,14 +12,18 @@ $(function() ids = ids.join(','); } $('form.pay-form input[name=ids]').val(ids); - if((payment_id || null) != null && $('.payment-items-'+payment_id).length > 0) + $('form.pay-form input[name=payment_id]').val(0); + $('form.pay-form ul.payment-list li').each(function(k, v) { - $('form.pay-form input[name=payment_id]').val(payment_id); - $('.payment-items-'+payment_id).addClass('selected').siblings('li').removeClass('selected'); - } else { - $('form.pay-form input[name=payment_id]').val(0); - $('ul.payment-list li.selected').removeClass('selected'); - } + var temp = parseInt($(this).data('value') || 0); + if(temp == payment_id) + { + $(this).addClass('selected'); + $('form.pay-form input[name=payment_id]').val(payment_id); + } else { + $(this).removeClass('selected'); + } + }); } // 支付操作 $(document).on('click', '.submit-pay', function() @@ -68,7 +72,10 @@ $(function() // 是否自动打开支付窗口 if($pay_popup.data('is-auto') == 1) { - $pay_popup.modal(); + setTimeout(function() + { + $('.submit-pay').trigger('click'); + }, 100); } // 是否自动提交支付表单