提交 a692a1ae 编写于 作者: D Devil

2.0.0开发启动

上级 38903e8a
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\ConfigService;
use app\service\ResourcesService;
/**
* 协议管理
......@@ -54,7 +55,7 @@ class Agreement extends Common
$this->assign('data', ConfigService::ConfigList());
// 编辑器文件存放地址
$this->assign('editor_path_type', 'agreement');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('agreement'));
// 导航/视图
$nav_type = input('nav_type', 'register');
......
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\AppCenterNavService;
use app\service\ResourcesService;
/**
* 手机管理-用户中心导航管理
......@@ -138,9 +139,11 @@ class AppCenterNav extends Common
$this->assign('common_platform_type', lang('common_platform_type'));
$this->assign('common_app_event_type', lang('common_app_event_type'));
// 编辑器文件存放地址
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('app_center_nav'));
// 数据
unset($params['id']);
$this->assign('editor_path_type', 'app_center_nav');
$this->assign('params', $params);
$this->assign('data', $data);
return $this->fetch();
......
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\AppHomeNavService;
use app\service\ResourcesService;
/**
* 手机管理-首页导航管理
......@@ -138,9 +139,11 @@ class AppHomeNav extends Common
$this->assign('common_platform_type', lang('common_platform_type'));
$this->assign('common_app_event_type', lang('common_app_event_type'));
// 编辑器文件存放地址
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('app_nav'));
// 数据
unset($params['id']);
$this->assign('editor_path_type', 'app_nav');
$this->assign('params', $params);
$this->assign('data', $data);
return $this->fetch();
......
......@@ -12,6 +12,7 @@ namespace app\admin\controller;
use think\facade\Hook;
use app\service\ArticleService;
use app\service\ResourcesService;
/**
* 文章管理
......@@ -150,7 +151,7 @@ class Article extends Common
]));
// 编辑器文件存放地址
$this->assign('editor_path_type', 'article');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('article'));
// 数据
unset($params['id']);
......
......@@ -13,6 +13,7 @@ namespace app\admin\controller;
use think\facade\Hook;
use app\service\BrandService;
use app\service\BrandCategoryService;
use app\service\ResourcesService;
/**
* 品牌管理
......@@ -155,7 +156,7 @@ class Brand extends Common
]));
// 编辑器文件存放地址
$this->assign('editor_path_type', 'brand');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('brand'));
// 数据
unset($params['id']);
......
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\ExpressService;
use app\service\ResourcesService;
/**
* 快递管理
......@@ -53,7 +54,7 @@ class Express extends Common
$this->assign('common_is_enable_list', lang('common_is_enable_list'));
// 编辑器文件存放地址
$this->assign('editor_path_type', 'express');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('express'));
return $this->fetch();
}
......
......@@ -15,6 +15,7 @@ use app\service\GoodsService;
use app\service\RegionService;
use app\service\BrandService;
use app\service\GoodsParamsService;
use app\service\ResourcesService;
/**
* 商品管理
......@@ -229,7 +230,7 @@ class Goods extends Common
]));
// 编辑器文件存放地址
$this->assign('editor_path_type', 'goods');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('goods'));
// 数据
unset($params['id'], $params['is_copy']);
......
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\GoodsService;
use app\service\ResourcesService;
/**
* 分类管理
......@@ -59,7 +60,7 @@ class GoodsCategory extends Common
$this->assign('goods_category_list', GoodsService::GoodsCategoryAll());
// 编辑器文件存放地址
$this->assign('editor_path_type', 'goods_category');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('goods_category'));
return $this->fetch();
}
......
......@@ -12,6 +12,7 @@ namespace app\admin\controller;
use app\service\PaymentService;
use app\service\StoreService;
use app\service\ResourcesService;
/**
* 支付方式管理
......@@ -101,7 +102,7 @@ class Payment extends Common
$this->assign('params', $params);
// 编辑器文件存放地址
$this->assign('editor_path_type', 'payment');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('payment'));
return $this->fetch();
}
......
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\PluginsService;
use app\service\ResourcesService;
/**
* 应用调用入口
......@@ -91,7 +92,7 @@ class Plugins extends Common
$this->PluginsViewInit($pluginsname, $pluginscontrol, $pluginsaction);
// 编辑器文件存放地址定义
$this->assign('editor_path_type', 'plugins_'.$pluginsname);
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('plugins_'.$pluginsname));
// 调用
$ret = PluginsService::PluginsControlCall($pluginsname, $pluginscontrol, $pluginsaction, 'admin', $params);
......
......@@ -12,6 +12,7 @@ namespace app\admin\controller;
use app\service\StoreService;
use app\service\PluginsAdminService;
use app\service\ResourcesService;
/**
* 应用管理
......@@ -123,7 +124,7 @@ class Pluginsadmin extends Common
return $this->fetch('first_step');
} else {
// 编辑器文件存放地址
$this->assign('editor_path_type', 'plugins_'.$params['plugins']);
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('plugins_'.$params['plugins']));
// 唯一标记
$this->assign('plugins', $params['plugins']);
......
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\QuickNavService;
use app\service\ResourcesService;
/**
* 快捷导航管理
......@@ -143,7 +144,7 @@ class QuickNav extends Common
$this->assign('params', $params);
// 编辑器文件存放地址
$this->assign('editor_path_type', 'quick_nav');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('quick_nav'));
return $this->fetch();
}
......
......@@ -13,6 +13,7 @@ namespace app\admin\controller;
use app\service\ConfigService;
use app\service\GoodsService;
use app\service\SiteService;
use app\service\ResourcesService;
/**
* 站点设置
......@@ -123,7 +124,7 @@ class Site extends Common
}
// 编辑器文件存放地址
$this->assign('editor_path_type', 'common');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('common'));
// 视图
$view = 'site/'.$this->nav_type.'/'.$this->view_type;
......
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\SlideService;
use app\service\ResourcesService;
/**
* 轮播图片管理
......@@ -139,9 +140,11 @@ class Slide extends Common
$this->assign('common_platform_type', lang('common_platform_type'));
$this->assign('common_app_event_type', lang('common_app_event_type'));
// 编辑器文件存放地址
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('slide'));
// 数据
unset($params['id']);
$this->assign('editor_path_type', 'slide');
$this->assign('params', $params);
$this->assign('data', $data);
return $this->fetch();
......
......@@ -11,6 +11,7 @@
namespace app\admin\controller;
use app\service\UserAddressService;
use app\service\ResourcesService;
/**
* 用户地址管理
......@@ -146,7 +147,7 @@ class UserAddress extends Common
// 编辑器文件存放地址
if(!empty($data['user_id']))
{
$this->assign('editor_path_type', UserAddressService::EditorAttachmentPathType($data['user_id']));
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue(UserAddressService::EditorAttachmentPathType($data['user_id'])));
}
// 数据
......
......@@ -12,6 +12,7 @@ namespace app\admin\controller;
use think\facade\Hook;
use app\service\WarehouseService;
use app\service\ResourcesService;
/**
* 仓库管理
......@@ -141,7 +142,7 @@ class Warehouse extends Common
$this->assign('is_load_baidu_map_api', 1);
// 编辑器文件存放地址
$this->assign('editor_path_type', 'warehouse');
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('warehouse'));
// 数据
unset($params['id']);
......
......@@ -251,6 +251,15 @@ class Goods
'form_type' => 'section',
],
],
[
'label' => '销量',
'view_type' => 'field',
'view_key' => 'sales_count',
'is_sort' => 1,
'search_config' => [
'form_type' => 'section',
],
],
[
'label' => '访问次数',
'view_type' => 'field',
......
......@@ -77,7 +77,7 @@
<div class="am-form-group">
<label>{{$data.common_app_weixin_liveplayer_ver.name}}</label>
<div class="am-alert am-alert-warning">
<p>1. 获取最新组件版本号,默认[ 1.2.5 ]</p>
<p>1. 获取最新组件版本号,默认[ 1.2.7 ]</p>
<p>2. 登录微信小程序平台,左侧导航[ 直播 ],申请直播权限后等待审核通过方可使用</p>
<p>3. 点击左侧导航[ 小程序直播->接入说明 ],找到[ 使用方法说明->1. 【直播组件】如何引入 ],json 代码串[ plugins->live-player-plugin ]参数下的[ version ]的值填入</p>
<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/live-player-plugin.html" target="_blank">去获取组件版本号 <i class="am-icon-external-link"></i></a>
......
......@@ -57,6 +57,7 @@
<th>{{$line_v.name}}</th>
{{/foreach}}
<th>销售金额</th>
<th>库存</th>
<th>重量</th>
<th>编码</th>
<th>条形码</th>
......@@ -75,6 +76,7 @@
{{case base}}
<td class="am-text-middle">{{$v.data.price}}</td>
<td class="am-text-middle">{{$v.data.inventory}}</td>
<td class="am-text-middle">{{if $v['data']['weight'] gt 0}}{{$v.data.weight}}{{/if}}</td>
<td class="am-text-middle">{{$v.data.coding}}</td>
<td class="am-text-middle">{{$v.data.barcode}}</td>
......
......@@ -95,7 +95,7 @@
<div class="am-form-group">
<label>品牌</label>
<br />
<select name="brand_id" class="am-radius chosen-select" data-placeholder="请选择..." data-validation-message="请至少选择一个商品分类">
<select name="brand_id" class="am-radius chosen-select" data-placeholder="请选择..." data-validation-message="请选择品牌">
{{if !empty($brand_list)}}
<option value="0">请选择...</option>
{{foreach $brand_list as $v}}
......@@ -154,7 +154,7 @@
</select>
</div>
<div class="am-form-group am-form-file">
<label class="block">封面图片<span class="am-form-group-label-tips">留空则取相册第一张图</span></label>
<label class="block">封面图片<span class="am-form-group-label-tips">留空则取相册第一张图、建议800*800px</span></label>
<ul class="plug-file-upload-view goods-recommended-images-view" data-form-name="images" data-max-number="1" data-dialog-type="images">
{{if !empty($data['images'])}}
<li>
......@@ -185,44 +185,46 @@
<!-- 参数 -->
<div id="goods-nav-parameters" class="division-block">
<label class="block nav-detail-title">商品参数</label>
{{include file="public/goodsparamstemplate/tips" /}}
<!-- 通过配置生成商品参数 -->
<div class="am-dropdown" id="parameters-quick-container" data-am-dropdown>
<span class="business-operations-submit am-dropdown-toggle parameters-quick-add">
<span>快捷操作</span>
<i class="am-icon-caret-down"></i>
</span>
<div class="am-dropdown-content parameters-quick-config">
<div class="am-margin-bottom-sm">
<select class="am-radius chosen-select goods-template-params-select" data-placeholder="请选择模板..." data-validation-message="选择商品参数模板">
{{if !empty($goods_template_list) and is_array($goods_template_list)}}
<option value="">请选择模板...</option>
{{foreach $goods_template_list as $v}}
<option value="{{:urlencode(json_encode($v['config_data'], JSON_UNESCAPED_UNICODE))}}">{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
<div class="am-margin-left-xs">
{{include file="public/goodsparamstemplate/tips" /}}
<!-- 通过配置生成商品参数 -->
<div class="am-dropdown" id="parameters-quick-container" data-am-dropdown>
<span class="business-operations-submit am-dropdown-toggle parameters-quick-add">
<span>快捷操作</span>
<i class="am-icon-caret-down"></i>
</span>
<div class="am-dropdown-content parameters-quick-config">
<div class="am-margin-bottom-sm">
<select class="am-radius chosen-select goods-template-params-select" data-placeholder="请选择模板..." data-validation-message="选择商品参数模板">
{{if !empty($goods_template_list) and is_array($goods_template_list)}}
<option value="">请选择模板...</option>
{{foreach $goods_template_list as $v}}
<option value="{{:urlencode(json_encode($v['config_data'], JSON_UNESCAPED_UNICODE))}}">{{$v.name}}</option>
{{/foreach}}
{{/if}}
</select>
</div>
<textarea rows="5" placeholder="粘贴商品参数配置信息"></textarea>
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block am-margin-top-sm">确认</button>
</div>
<textarea rows="5" placeholder="粘贴商品参数配置信息"></textarea>
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block am-margin-top-sm">确认</button>
</div>
<!-- 复制操作 -->
<span class="business-operations-submit am-margin-left-sm parameters-quick-copy">
<i class="am-icon-copy"></i>
<span>复制配置</span>
</span>
<!-- 清空操作 -->
<span class="business-operations-submit am-margin-left-sm parameters-quick-remove">
<i class="am-icon-times"></i>
<span>清空参数</span>
</span>
</div>
<!-- 复制操作 -->
<span class="business-operations-submit am-margin-left-sm parameters-quick-copy">
<i class="am-icon-copy"></i>
<span>复制配置</span>
</span>
<!-- 清空操作 -->
<span class="business-operations-submit am-margin-left-sm parameters-quick-remove">
<i class="am-icon-times"></i>
<span>清空参数</span>
</span>
{{include file="public/goodsparamstemplate/table" /}}
</div>
<!-- 相册 -->
<div id="goods-nav-photo" class="division-block">
<label class="block nav-detail-title">商品相册<span class="am-form-group-label-tips">可拖拽图片进行排序,建议图片尺寸一致、最多30张</span></label>
<label class="block nav-detail-title">商品相册<span class="am-form-group-label-tips">可拖拽图片进行排序,建议图片尺寸一致800*800px、最多30张</span></label>
<ul class="plug-file-upload-view goods-photo-view" data-form-name="photo[]" data-max-number="30" data-dialog-type="images">
{{if !empty($data['photo'])}}
{{foreach $data.photo as $v}}
......@@ -234,7 +236,7 @@
{{/foreach}}
{{/if}}
</ul>
<div class="plug-file-upload-submit" data-view-tag="ul.goods-photo-view">+上传相册</div>
<div class="plug-file-upload-submit am-margin-left-xs" data-view-tag="ul.goods-photo-view">+上传相册</div>
</div>
<!-- 视频 -->
......@@ -494,7 +496,6 @@
{{include file="public/footer" /}}
<!-- footer end -->
<!-- 拖拽排序初始化 -->
<script type="text/javascript">
// 规格扩展返回处理
function SpecificationsExtendsBack(data)
......
<!-- 规格快捷操作 -->
<div class="spec-quick am-margin-bottom-lg">
<div class="am-alert am-alert-warning am-radius" data-am-alert>
快捷操作可以快速创建商品SKU,大量节省SKU编辑时间,快捷操作数据不影响SKU数据,仅生成的时候重新覆盖SKU。
<div class="am-margin-left-xs">
<div class="am-alert am-alert-warning am-radius" data-am-alert>
快捷操作可以快速创建商品SKU,大量节省SKU编辑时间,快捷操作数据不影响SKU数据,仅生成的时候重新覆盖SKU。
</div>
<span class="business-operations-submit quick-spec-title-add">+快捷操作</span>
<span class="business-operations-submit am-margin-left-sm am-icon-gg quick-spec-created">生成规格</span>
</div>
<span class="business-operations-submit quick-spec-title-add">+快捷操作</span>
<span class="business-operations-submit am-margin-left-sm am-icon-gg quick-spec-created">生成规格</span>
<div class="goods-specifications business-form-group" {{if empty($data['spec_base'])}}style="display: none;"{{/if}}>
<table class="am-table am-table-bordered am-table-centered am-table-striped am-table-hover table-thead-beautify">
<thead>
......@@ -42,8 +44,10 @@
</div>
<!-- 规格常规操作 -->
<span class="business-operations-submit specifications-nav-title-add">+添加规格</span>
<span class="business-operations-submit am-margin-left-sm specifications-nav-set-all am-icon-cogs" data-am-modal="{target: '#spec-popup-all-operation'}"> 高级批量设置</span>
<div class="am-margin-left-xs">
<span class="business-operations-submit specifications-nav-title-add">+添加规格</span>
<span class="business-operations-submit am-margin-left-sm specifications-nav-set-all am-icon-cogs" data-am-modal="{target: '#spec-popup-all-operation'}"> 高级批量设置</span>
</div>
<div class="goods-specifications business-form-group am-form-group-refreshing am-padding-top-sm">
<!-- 规格列表 -->
<div class="specifications-container am-scrollable-horizontal">
......@@ -102,10 +106,13 @@
</td>
<td class="am-text-middle">
<input type="hidden" name="specifications_extends[]" value="" class="line-extend-input" />
<span class="am-text-xs cr-blue c-p line-extend-btn">编辑</span>
<a href="javascript:;" class="am-text-xs am-text-secondary line-extend-btn">编辑</a>
</td>
<td class="am-text-middle">
<!--operation-->
<a href="javascript:;" class="am-text-xs am-text-secondary am-margin-right-sm line-move" data-type="top">上移</a>
<a href="javascript:;" class="am-text-xs am-text-secondary am-margin-right-sm line-move" data-type="bottom">下移</a>
<a href="javascript:;" class="am-text-xs am-text-secondary am-margin-right-xs line-copy">复制</a>
<a href="javascript:;" class="am-text-xs am-text-danger line-remove">移除</a>
</td>
</tr>
{{/if}}
......@@ -140,13 +147,13 @@
</td>
<td class="am-text-middle">
<input type="hidden" name="specifications_extends[]" value="{{$v.data.extends}}" class="line-extend-input" />
<span class="am-text-xs cr-blue c-p line-extend-btn">编辑</span>
<a href="javascript:;" class="am-text-xs am-text-secondary line-extend-btn">编辑</a>
</td>
<td class="am-text-middle">
<span class="am-text-xs cr-blue c-p am-margin-right-sm line-move" data-type="top">上移</span>
<span class="am-text-xs cr-blue c-p am-margin-right-sm line-move" data-type="bottom">下移</span>
<span class="am-text-xs cr-blue c-p am-margin-right-xs line-copy">复制</span>
<span class="am-text-xs cr-red c-p line-remove">移除</span>
<a href="javascript:;" class="am-text-xs am-text-secondary am-margin-right-sm line-move" data-type="top">上移</a>
<a href="javascript:;" class="am-text-xs am-text-secondary am-margin-right-sm line-move" data-type="bottom">下移</a>
<a href="javascript:;" class="am-text-xs am-text-secondary am-margin-right-xs line-copy">复制</a>
<a href="javascript:;" class="am-text-xs am-text-danger line-remove">移除</a>
</td>
{{/case}}
{{/switch}}
......
......@@ -62,7 +62,7 @@
<div class="am-form-group">
<label>回复时间</label>
<input type="text" name="reply_time" class="am-form-field am-radius Wdate" placeholder="生日" data-validation-message="生日格式有误" {{if !empty($data)}} value="{{if isset($data['reply_time_time'])}}{{$data.reply_time_time}}{{/if}}"{{/if}} onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" autocomplete="off" />
<input type="text" name="reply_time" class="am-form-field am-radius Wdate" placeholder="生日" data-validation-message="回复时间格式有误" {{if !empty($data)}} value="{{if isset($data['reply_time_time'])}}{{$data.reply_time_time}}{{/if}}"{{/if}} onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" autocomplete="off" />
</div>
<div class="am-form-group">
......
......@@ -14,7 +14,7 @@
<!--表列表数据 -->
<div class="business-form-group am-padding-top-0">
<div class="parameters-container am-margin-top-sm am-scrollable-horizontal">
<div class="parameters-container am-margin-top-sm">
<table class="am-table am-table-bordered am-table-centered am-table-striped am-table-hover am-margin-bottom-sm parameters-table table-thead-beautify am-margin-bottom-0">
<thead>
<tr>
......@@ -44,9 +44,9 @@
<input type="text" name="parameters_value[]" placeholder="参数值" value="{{$pv.value}}" maxlength="200" data-validation-message="请填写参数值" />
</td>
<td class="am-text-middle">
<span class="am-text-xs cr-blue c-p am-margin-right-sm line-move" data-type="top">上移</span>
<span class="am-text-xs cr-blue c-p am-margin-right-sm line-move" data-type="bottom">下移</span>
<span class="am-text-xs cr-red c-p line-remove">移除</span>
<a href="javascript:;" class="am-text-xs am-text-secondary am-margin-right-sm line-move" data-type="top">上移</a>
<a href="javascript:;" class="am-text-xs am-text-secondary am-margin-right-sm line-move" data-type="bottom">下移</a>
<a href="javascript:;" class="am-text-xs am-text-danger line-remove">移除</a>
</td>
</tr>
{{/foreach}}
......
......@@ -229,7 +229,7 @@
{{/case}}
{{case status}}
<!-- 数据状态操作按钮组件 -->
{{if !empty($t['key_field']) and !empty($t['post_url']) and !empty($data_list[$i][$t['key_field']])}}
{{if !empty($t['key_field']) and !empty($t['post_url']) and !empty($data_list[$i][$t['key_field']]) and array_key_exists($t['view_key'], $data_list[$i])}}
<a href="javascript:;"
class="am-icon-btn am-icon-check submit-state {{if $data_list[$i][$t['view_key']] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url="{{$t.post_url}}"
......
......@@ -15,6 +15,7 @@ use app\service\PaymentService;
use app\service\OrderService;
use app\service\GoodsCommentsService;
use app\service\ConfigService;
use app\service\ResourcesService;
/**
* 我的订单
......@@ -177,7 +178,7 @@ class Order extends Common
// 返回数据
$result = [
'data' => $data['data'][0],
'editor_path_type' => 'order_comments-'.$this->user['id'].'-'.$data['data'][0]['id'],
'editor_path_type' => ResourcesService::EditorPathTypeValue('order_comments-'.$this->user['id'].'-'.$data['data'][0]['id']),
];
return BaseService::DataReturn($result);
}
......
......@@ -12,6 +12,7 @@ namespace app\api\controller;
use app\service\BaseService;
use app\service\OrderAftersaleService;
use app\service\ResourcesService;
/**
* 订单售后
......@@ -138,7 +139,7 @@ class Orderaftersale extends Common
'return_money_goods_reason' => empty($return_money_goods_reason) ? [] : explode("\n", $return_money_goods_reason),
'aftersale_type_list' => lang('common_order_aftersale_type_list'),
'return_goods_address' => MyC('home_order_aftersale_return_goods_address', '管理员未填写', true),
'editor_path_type' => OrderAftersaleService::EditorAttachmentPathType($this->user['id'], $order_id, $order_detail_id),
'editor_path_type' => ResourcesService::EditorPathTypeValue(OrderAftersaleService::EditorAttachmentPathType($this->user['id'], $order_id, $order_detail_id)),
];
return BaseService::DataReturn($result);
}
......
......@@ -13,6 +13,7 @@ namespace app\api\controller;
use app\service\BaseService;
use app\service\ConfigService;
use app\service\UserAddressService;
use app\service\ResourcesService;
/**
* 用户地址
......@@ -73,7 +74,7 @@ class UserAddress extends Common
// 返回数据
$result = [
'data' => empty($data['data']) ? null : $data['data'],
'editor_path_type' => UserAddressService::EditorAttachmentPathType($this->user['id']),
'editor_path_type' => ResourcesService::EditorPathTypeValue(UserAddressService::EditorAttachmentPathType($this->user['id'])),
];
return BaseService::DataReturn($result);
}
......
......@@ -359,6 +359,7 @@ function FormModulePath($params = [])
{
// 参数变量
$path = '';
$group = request()->module();
$controller = request()->controller();
$action = request()->action();
......@@ -370,7 +371,13 @@ function FormModulePath($params = [])
// 控制器和方法默认值处理
$controller = empty($params['pluginscontrol']) ? 'index' : $params['pluginscontrol'];
$action = empty($params['pluginsaction']) ? 'index' : $params['pluginsaction'];
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.ucfirst($controller);
// 是否定义模块组
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.$group.'\\'.ucfirst($controller);
if(!class_exists($path))
{
$path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.ucfirst($controller);
}
}
} else {
$path = '\app\\'.request()->module().'\form\\'.$controller;
......@@ -1126,7 +1133,7 @@ function MyUrl($path, $params=[])
function PluginsHomeUrl($plugins_name, $plugins_control = '', $plugins_action = '', $params = [])
{
// 控制器和方法都为index的时候置空、缩短url地址
if($plugins_control == 'index' && $plugins_action == 'index')
if($plugins_control == 'index' && $plugins_action == 'index' && empty($params))
{
$plugins_control = '';
$plugins_action = '';
......
......@@ -394,7 +394,7 @@ class Common extends Controller
$this->assign('common_bottom_nav_list', NavigationService::BottomNavigation(['user'=>$this->user]));
// 编辑器文件存放地址
$this->assign('editor_path_type', empty($this->user['id']) ? 'public' : 'user-'.$this->user['id']);
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue(empty($this->user['id']) ? 'public' : 'user-'.$this->user['id']));
// 分类展示层级模式
$this->assign('category_show_level', MyC('common_show_goods_category_level', 3, true));
......
......@@ -144,7 +144,7 @@ class Order extends Common
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('订单评论', 1));
// 编辑器文件存放地址
$this->assign('editor_path_type', 'order_comments-'.$this->user['id'].'-'.$data['id']);
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('order_comments-'.$this->user['id'].'-'.$data['id']));
return $this->fetch();
} else {
$this->assign('msg', '没有相关数据');
......
......@@ -12,6 +12,7 @@ namespace app\index\controller;
use app\service\OrderAftersaleService;
use app\service\SeoService;
use app\service\ResourcesService;
/**
* 订单售后
......@@ -138,7 +139,7 @@ class Orderaftersale extends Common
$this->assign('common_order_aftersale_type_list', lang('common_order_aftersale_type_list'));
// 编辑器文件存放地址
$this->assign('editor_path_type', OrderAftersaleService::EditorAttachmentPathType($this->user['id'], $order_id, $order_detail_id));
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue(OrderAftersaleService::EditorAttachmentPathType($this->user['id'], $order_id, $order_detail_id)));
// 订单售后搜索form key
$this->assign('form_search_keywords_form_key', 'f0p');
......
......@@ -11,6 +11,7 @@
namespace app\index\controller;
use app\service\PluginsService;
use app\service\ResourcesService;
/**
* 应用调用入口
......@@ -79,7 +80,7 @@ class Plugins extends Common
$this->PluginsViewInit($pluginsname, $pluginscontrol, $pluginsaction);
// 编辑器文件存放地址定义
$this->assign('editor_path_type', 'plugins_'.$pluginsname);
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('plugins_'.$pluginsname));
// 调用
$ret = PluginsService::PluginsControlCall($pluginsname, $pluginscontrol, $pluginsaction, 'index', $params);
......
......@@ -12,6 +12,7 @@ namespace app\index\controller;
use app\service\SeoService;
use app\service\UserAddressService;
use app\service\ResourcesService;
/**
* 用户地址管理
......@@ -79,7 +80,7 @@ class UserAddress extends Common
}
// 编辑器文件存放地址
$this->assign('editor_path_type', UserAddressService::EditorAttachmentPathType($this->user['id']));
$this->assign('editor_path_type', ResourcesService::EditorPathTypeValue(UserAddressService::EditorAttachmentPathType($this->user['id'])));
// 加载百度地图api
$this->assign('is_load_baidu_map_api', 1);
......
{
"name":"默认主题",
"ver":"1.9.3",
"ver":"2.0.0",
"author":"Devil",
"home":"https://shopxo.net/"
}
\ No newline at end of file
......@@ -126,7 +126,7 @@
<!-- 楼层-主内容 -->
<div class="home-floor">
<!-- 楼层 -->
{{if !empty($goods_floor_list)}}
{{if !empty($goods_floor_list) and is_array($goods_floor_list)}}
{{foreach $goods_floor_list as $key=>$floor}}
<!-- 首页楼层顶部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
......@@ -156,7 +156,7 @@
<p class="floor-title">{{$floor.name}}</p>
<p class="floor-desc">{{$floor.vice_name}}</p>
<div class="today-brands ">
{{if !empty($floor['config_keywords'])}}
{{if !empty($floor['config_keywords']) and is_array($floor['config_keywords'])}}
{{foreach $floor.config_keywords as $wd}}
<a href="{{:MyUrl('index/search/index', ['wd'=>StrToAscii($wd)])}}" target="_blank">{{$wd}}</a>
{{/foreach}}
......@@ -192,7 +192,7 @@
<div class="am-u-sm-3 aggregation" {{if !empty($floor['bg_color'])}}style="background-color:{{$floor.bg_color}};"{{else /}}style="background-color:#eaeaea;"{{/if}}>
<div class="word">
{{if !empty($floor['items'])}}
{{if !empty($floor['items']) and is_array($floor['items'])}}
{{foreach $floor.items as $category_key=>$category}}
<a href="{{:MyUrl('index/search/index', ['category_id'=>$category['id']])}}" class="outer" target="_blank">{{:mb_substr($category['name'], 0, 4, 'utf-8')}}</a>
{{/foreach}}
......@@ -231,7 +231,7 @@
</div>
<div class="goods-list">
{{if !empty($floor['goods'])}}
{{if !empty($floor['goods']) and is_array($floor['goods'])}}
{{foreach $floor.goods as $goods_key=>$goods}}
<div class="goods-items">
<a href="{{$goods.goods_url}}" target="_blank" class="am-block am-text-center">
......
......@@ -229,7 +229,7 @@
{{/case}}
{{case status}}
<!-- 数据状态操作按钮组件 -->
{{if !empty($t['key_field']) and !empty($t['post_url']) and !empty($data_list[$i][$t['key_field']])}}
{{if !empty($t['key_field']) and !empty($t['post_url']) and !empty($data_list[$i][$t['key_field']]) and array_key_exists($t['view_key'], $data_list[$i])}}
<a href="javascript:;"
class="am-icon-btn am-icon-check submit-state {{if $data_list[$i][$t['view_key']] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url="{{$t.post_url}}"
......
......@@ -32,6 +32,7 @@ return array(
'1.9.1' => array('value' => '1.9.1', 'name' => 'v1.9.1'),
'1.9.2' => array('value' => '1.9.2', 'name' => 'v1.9.2'),
'1.9.3' => array('value' => '1.9.3', 'name' => 'v1.9.3'),
'2.0.0' => array('value' => '2.0.0', 'name' => 'v2.0.0'),
),
// 用户注册类型列表
......
......@@ -576,7 +576,7 @@ class AppMiniService
if(is_array($data) && isset($data['plugins']))
{
$data['plugins']['live-player-plugin'] = [
'version' => MyC('common_app_weixin_liveplayer_ver', '1.2.5', true),
'version' => MyC('common_app_weixin_liveplayer_ver', '1.2.7', true),
'provider' => 'wx2b03c6e691cd7370',
];
if(file_put_contents($file, JsonFormat($data)) === false)
......
......@@ -135,11 +135,31 @@ class BrandService
* @version 1.0.0
* @date 2018-09-19
* @desc description
* @param [int] $brand_id [地区id]
* @param [array|int] $brand_ids [快递id]
*/
public static function BrandName($brand_id = 0)
public static function BrandName($brand_ids = 0)
{
return empty($brand_id) ? null : Db::name('Brand')->where(['id'=>intval($brand_id)])->value('name');
if(empty($brand_ids))
{
return null;
}
// 参数处理查询数据
if(is_array($brand_ids))
{
$brand_ids = array_filter(array_unique($brand_ids));
}
if(!empty($brand_ids))
{
$data = Db::name('Brand')->where(['id'=>$brand_ids])->column('name', 'id');
}
// id数组则直接返回
if(is_array($brand_ids))
{
return empty($data) ? [] : $data;
}
return (!empty($data) && is_array($data) && array_key_exists($brand_ids, $data)) ? $data[$brand_ids] : null;
}
/**
......
......@@ -453,6 +453,21 @@ class GoodsService
$is_params = (isset($params['is_params']) && $params['is_params'] == true) ? true : false;
$data_key_field = empty($params['data_key_field']) ? 'id' : $params['data_key_field'];
// 字段列表
$keys = ArrayKeys($data);
// 品牌名称
if(in_array('brand_id', $keys))
{
$brand_list = BrandService::BrandName(array_column($data, 'brand_id'));
}
// 产地名称
if(in_array('place_origin', $keys))
{
$place_origin_list = RegionService::RegionName(array_column($data, 'place_origin'));
}
// 开始处理数据
foreach($data as &$v)
{
......@@ -538,13 +553,13 @@ class GoodsService
// 产地
if(isset($v['place_origin']))
{
$v['place_origin_name'] = empty($v['place_origin']) ? null : RegionService::RegionName($v['place_origin']);
$v['place_origin_name'] = (!empty($place_origin_list) && is_array($place_origin_list) && array_key_exists($v['place_origin'], $place_origin_list)) ? $place_origin_list[$v['place_origin']] : null;
}
// 品牌
if(isset($v['brand_id']))
{
$v['brand_name'] = empty($v['brand_id']) ? null : BrandService::BrandName($v['brand_id']);
$v['brand_name'] = (!empty($brand_list) && is_array($brand_list) && array_key_exists($v['brand_id'], $brand_list)) ? $brand_list[$v['brand_id']] : null;
}
// 时间
......@@ -1780,52 +1795,8 @@ class GoodsService
// 捕获异常
try {
// 删除商品
if(!Db::name('Goods')->where(['id'=>$params['ids']])->delete())
{
throw new \Exception('商品删除失败');
}
// 商品规格
if(Db::name('GoodsSpecType')->where(['goods_id'=>$params['ids']])->delete() === false)
{
throw new \Exception('规格类型删除失败');
}
if(Db::name('GoodsSpecValue')->where(['goods_id'=>$params['ids']])->delete() === false)
{
throw new \Exception('规格值删除失败');
}
if(Db::name('GoodsSpecBase')->where(['goods_id'=>$params['ids']])->delete() === false)
{
throw new \Exception('规格基础删除失败');
}
// 相册
if(Db::name('GoodsPhoto')->where(['goods_id'=>$params['ids']])->delete() === false)
{
throw new \Exception('相册删除失败');
}
// app内容
if(Db::name('GoodsContentApp')->where(['goods_id'=>$params['ids']])->delete() === false)
{
throw new \Exception('手机端内容删除失败');
}
// 商品参数
if(Db::name('GoodsParams')->where(['goods_id'=>$params['ids']])->delete() === false)
{
throw new \Exception('规格参数删除失败');
}
// 商品关联仓库信息+库存
if(Db::name('WarehouseGoods')->where(['goods_id'=>$params['ids']])->delete() === false)
{
throw new \Exception('仓库商品删除失败');
}
if(Db::name('WarehouseGoodsSpec')->where(['goods_id'=>$params['ids']])->delete() === false)
{
throw new \Exception('仓库商品库存删除失败');
}
// 删除商品操作
self::GoodsDeleteHandle($params['ids']);
// 商品删除钩子
$hook_name = 'plugins_service_goods_delete';
......@@ -1833,7 +1804,7 @@ class GoodsService
'hook_name' => $hook_name,
'is_backend' => true,
'params' => $params,
'data_ids' => $params['ids'],
'goods_ids' => $params['ids'],
]);
// 提交事务
......@@ -1845,6 +1816,65 @@ class GoodsService
}
}
/**
* 商品删除操作
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-01-27
* @desc description
* @param [array] $goods_ids [商品id]
*/
public static function GoodsDeleteHandle($goods_ids)
{
// 删除商品
if(!Db::name('Goods')->where(['id'=>$goods_ids])->delete())
{
throw new \Exception('商品删除失败');
}
// 商品规格
if(Db::name('GoodsSpecType')->where(['goods_id'=>$goods_ids])->delete() === false)
{
throw new \Exception('规格类型删除失败');
}
if(Db::name('GoodsSpecValue')->where(['goods_id'=>$goods_ids])->delete() === false)
{
throw new \Exception('规格值删除失败');
}
if(Db::name('GoodsSpecBase')->where(['goods_id'=>$goods_ids])->delete() === false)
{
throw new \Exception('规格基础删除失败');
}
// 相册
if(Db::name('GoodsPhoto')->where(['goods_id'=>$goods_ids])->delete() === false)
{
throw new \Exception('相册删除失败');
}
// app内容
if(Db::name('GoodsContentApp')->where(['goods_id'=>$goods_ids])->delete() === false)
{
throw new \Exception('手机端内容删除失败');
}
// 商品参数
if(Db::name('GoodsParams')->where(['goods_id'=>$goods_ids])->delete() === false)
{
throw new \Exception('规格参数删除失败');
}
// 商品关联仓库信息+库存
if(Db::name('WarehouseGoods')->where(['goods_id'=>$goods_ids])->delete() === false)
{
throw new \Exception('仓库商品删除失败');
}
if(Db::name('WarehouseGoodsSpec')->where(['goods_id'=>$goods_ids])->delete() === false)
{
throw new \Exception('仓库商品库存删除失败');
}
}
/**
* 商品状态更新
* @author Devil
......@@ -1880,12 +1910,40 @@ class GoodsService
return DataReturn($ret, -1);
}
// 数据更新
if(Db::name('Goods')->where(['id'=>intval($params['id'])])->update([$params['field']=>intval($params['state']), 'upd_time'=>time()]))
{
// 启动事务
Db::startTrans();
// 捕获异常
try {
// 基础参数
$goods_id = intval($params['id']);
$field = $params['field'];
$status = intval($params['state']);
// 数据更新
if(!Db::name('Goods')->where(['id'=>$goods_id])->update([$field=>$status, 'upd_time'=>time()]))
{
throw new \Exception('操作失败');
}
// 商品删除钩子
$hook_name = 'plugins_service_goods_field_status_update';
Hook::listen($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'params' => $params,
'goods_id' => $goods_id,
'field' => $field,
'status' => $status,
]);
// 提交事务
Db::commit();
return DataReturn('操作成功');
} catch(\Exception $e) {
Db::rollback();
return DataReturn($e->getMessage(), -1);
}
return DataReturn('操作失败', -100);
}
/**
......
......@@ -28,11 +28,31 @@ class RegionService
* @version 1.0.0
* @date 2018-09-19
* @desc description
* @param [int] $region_id [地区id]
* @param [array|int] $region_ids [地区id]
*/
public static function RegionName($region_id = 0)
public static function RegionName($region_ids = 0)
{
return empty($region_id) ? null : Db::name('Region')->where(['id'=>intval($region_id)])->value('name');
if(empty($region_ids))
{
return null;
}
// 参数处理查询数据
if(is_array($region_ids))
{
$region_ids = array_filter(array_unique($region_ids));
}
if(!empty($region_ids))
{
$data = Db::name('Region')->where(['id'=>$region_ids])->column('name', 'id');
}
// id数组则直接返回
if(is_array($region_ids))
{
return empty($data) ? [] : $data;
}
return (!empty($data) && is_array($data) && array_key_exists($region_ids, $data)) ? $data[$region_ids] : null;
}
/**
......
......@@ -603,7 +603,7 @@ class ResourcesService
'currency_name' => config('shopxo.currency_name'),
];
// 货币符号钩子
// 钩子
$hook_name = 'plugins_service_currency_data';
Hook::listen($hook_name, [
'hook_name' => $hook_name,
......@@ -627,5 +627,32 @@ class ResourcesService
$res = self::CurrencyData();
return empty($res['currency_symbol']) ? config('shopxo.currency_symbol') : $res['currency_symbol'];
}
/**
* 编辑器文件存放地址
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-01-27
* @desc description
* @param [string] $value [位置路径名称([ - ]作为目录分隔符)]
*/
public static function EditorPathTypeValue($value)
{
// 当前操作名称, 兼容插件模块名称
$module_name = strtolower(request()->module());
$controller_name = strtolower(request()->controller());
$action_name = strtolower(request()->action());
// 钩子
$hook_name = 'plugins_service_editor_path_type_'.$module_name.'_'.$controller_name.'_'.$action_name;
Hook::listen($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'value' => &$value,
]);
return $value;
}
}
?>
\ No newline at end of file
......@@ -11,6 +11,7 @@
namespace app\service;
use think\Db;
use think\facade\Hook;
use app\service\ResourcesService;
use app\service\GoodsService;
use app\service\UserService;
......@@ -839,7 +840,6 @@ class WarehouseGoodsService
foreach($res['value'] as $v)
{
$inventory = self::WarehouseGoodsSpecInventory($goods_id, str_replace(GoodsService::$goods_spec_to_string_separator, '', $v['value']));
if(Db::name('GoodsSpecBase')->where(['id'=>$v['base_id'], 'goods_id'=>$goods_id])->update(['inventory'=>$inventory]) === false)
{
return DataReturn('商品规格库存同步失败', -20);
......@@ -857,6 +857,18 @@ class WarehouseGoodsService
return DataReturn('商品库存同步失败', -21);
}
// 商品仓库库存修改钩子
$hook_name = 'plugins_service_warehouse_goods_inventory_sync';
$ret = HookReturnHandle(Hook::listen($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'goods_id' => $goods_id
]));
if(isset($ret['code']) && $ret['code'] != 0)
{
return $ret;
}
return DataReturn('更新成功', 0);
}
......@@ -953,6 +965,21 @@ class WarehouseGoodsService
return DataReturn('仓库商品库存扣减失败['.$warehouse_id.'-'.$goods_id.'('.$buy_number.')]', -12);
}
// 商品库存扣除钩子
$hook_name = 'plugins_service_warehouse_goods_inventory_deduct';
$ret = HookReturnHandle(Hook::listen($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'order_id' => $order_id,
'goods_id' => $goods_id,
'spec' => $spec,
'buy_number' => $buy_number,
]));
if(isset($ret['code']) && $ret['code'] != 0)
{
return $ret;
}
return DataReturn('扣除成功', 0);
}
......@@ -1003,6 +1030,21 @@ class WarehouseGoodsService
return DataReturn('仓库商品库存回滚失败['.$warehouse_id.'-'.$goods_id.'('.$buy_number.')]', -12);
}
// 商品库存回滚钩子
$hook_name = 'plugins_service_warehouse_goods_inventory_rollback';
$ret = HookReturnHandle(Hook::listen($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'order_id' => $order_id,
'goods_id' => $goods_id,
'spec' => $spec,
'buy_number' => $buy_number,
]));
if(isset($ret['code']) && $ret['code'] != 0)
{
return $ret;
}
return DataReturn('回滚成功', 0);
}
}
......
+=========================================================+
ShopXO 2.0.0 Release --- http://shopxo.net
+=========================================================+
全局
1. 编辑器路径统一调用
2. 商品状态改变、订单库存扣除+回滚新增钩子
3. 支付宝支付插件优化
4. 现金支付插件优化、新增自定义支付信息
web端
1.
小程序
1.
插件
1.
+=========================================================+
ShopXO 1.9.3 Release 20210113 http://shopxo.net
+=========================================================+
......
......@@ -19,7 +19,7 @@ return [
// 应用地址
'app_host' => '',
// 应用调试模式
'app_debug' => false,
'app_debug' => true,
// 应用Trace
'app_trace' => false,
// 是否支持多模块
......
......@@ -123,7 +123,7 @@ class Alipay
}
// 配置信息
if(empty($this->config))
if(empty($this->config) || empty($this->config['appid']) || empty($this->config['rsa_public']) || empty($this->config['rsa_private']) || empty($this->config['out_rsa_public']))
{
return DataReturn('支付缺少配置', -1);
}
......@@ -320,7 +320,27 @@ class Alipay
// 支付状态
if(!empty($data['trade_no']) && isset($data['total_amount']) && $data['total_amount'] > 0)
{
if((!isset($data['trade_status']) && isset($data['method']) && $data['method'] == 'alipay.trade.page.pay.return') || (in_array($data['trade_status'], ['TRADE_SUCCESS', 'TRADE_FINISHED'])))
$status = false;
if(isset($data['trade_status']))
{
if(in_array($data['trade_status'], ['TRADE_SUCCESS', 'TRADE_FINISHED']))
{
$status = true;
}
} else {
switch($data['method'])
{
// pc、h5
case 'alipay.trade.wap.pay.return' :
case 'alipay.trade.page.pay.return' :
if(isset($data['seller_id']))
{
$status = true;
}
break;
}
}
if($status)
{
return DataReturn('支付成功', 0, $this->ReturnData($data));
}
......
......@@ -123,7 +123,7 @@ class AlipayMini
}
// 配置信息
if(empty($this->config))
if(empty($this->config) || empty($this->config['appid']) || empty($this->config['rsa_public']) || empty($this->config['rsa_private']) || empty($this->config['out_rsa_public']))
{
return DataReturn('支付缺少配置', -1);
}
......
......@@ -50,15 +50,58 @@ class CashPayment
// 基础信息
$base = [
'name' => '现金支付', // 插件名称
'version' => '1.0.0', // 插件版本
'version' => '2.0.0', // 插件版本
'apply_version' => '不限', // 适用系统版本描述
'desc' => '现金方式支付货款', // 插件描述(支持html)
'desc' => '现金方式支付货款、支持配置自定义支付信息', // 插件描述(支持html)
'author' => 'Devil', // 开发者
'author_url' => 'http://shopxo.net/', // 开发者主页
];
// 配置信息
$element = [
[
'element' => 'select',
'title' => '自定义支付信息展示',
'desc' => '仅web端有效',
'message' => '请选择是否开启自定义支付',
'name' => 'is_custom_pay',
'is_multiple' => 0,
'element_data' => [
['value'=>0, 'name'=>'关闭'],
['value'=>1, 'name'=>'开启'],
],
],
[
'element' => 'textarea',
'name' => 'content',
'placeholder' => '自定义文本',
'title' => '自定义文本',
'desc' => '可换行、一行一条数据',
'is_required' => 0,
'rows' => 6,
'message' => '请填写自定义文本',
],
[
'element' => 'input',
'type' => 'text',
'default' => '',
'name' => 'tips',
'placeholder' => '特别提示信息',
'title' => '特别提示信息',
'is_required' => 0,
'message' => '请填写特别提示信息',
],
[
'element' => 'input',
'type' => 'text',
'default' => '',
'name' => 'images_url',
'placeholder' => '图片地址',
'title' => '图片地址',
'desc' => '可自定义图片展示',
'is_required' => 0,
'message' => '请填写图片自定义的地址',
],
];
return [
......@@ -78,6 +121,62 @@ class CashPayment
*/
public function Pay($params = [])
{
// 是否开启了自定义支付信息
if(!empty($this->config) && isset($this->config['is_custom_pay']) && $this->config['is_custom_pay'] == 1)
{
$html = '<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>支付信息</title>
<style>
body{color:#333;}
h1 {text-align:center;}
h1,.content {margin-top:50px;}
.content { text-align: left;margin:0 auto;max-width:800px;height:auto;border: 6px solid #eee;padding: 20px;}
ul {margin:0 0 15px 0;padding:0;background: #f5f5f5;border: 1px solid #eaeaea;}
ul li {list-style-type:none;line-height:42px;font-size:16px;padding: 0 10px;}
ul li:not(:last-child) {border-bottom: 1px solid #eee;}
.content img {width: 100%;}
.content .tips {margin-bottom: 15px;font-size: 14px;background: #ffddaa;border: 1px solid #ffb342;color: #875100;padding: 5px 10px;line-height: 22px;}
</style>
</head>
<body>
<h1>按照以下支付信息进行打款</h1>
<div class="content">';
// 文本信息
if(!empty($this->config['content']))
{
$html .= '<ul>';
$content = explode("\n", $this->config['content']);
foreach($content as $v)
{
$html .= '<li>'.$v.'</li>';
}
$html .= '</ul>';
}
// 特别提示文字
if(!empty($this->config['tips']))
{
$html .= '<p class="tips">'.$this->config['tips'].'</p>';
}
// 图片信息
if(!empty($this->config['images_url']))
{
$html .= '<img src="'.$this->config['images_url'].'" alt="支付信息" />';
}
$html .= '</div>
</body>
</html>';
die($html);
}
// 默认方式
$url = $params['call_back_url'].'?';
$url .= 'out_trade_no='.$params['order_no'];
$url .= '&subject='.$params['name'];
......
......@@ -13,13 +13,21 @@
if(version_compare(PHP_VERSION,'5.6.0','<')) die('PHP版本最低 5.6.0');
// 系统版本
define('APPLICATION_VERSION', 'v1.9.3');
define('APPLICATION_VERSION', 'v2.0.0');
// 定义系统目录分隔符
define('DS', '/');
// HTTP类型
define('__MY_HTTP__', ((!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') || (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') || (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) || (!empty($_SERVER['HTTP_FROM_HTTPS']) && $_SERVER['HTTP_FROM_HTTPS'] !== 'off') || (!empty($_SERVER['HTTP_X_CLIENT_SCHEME']) && $_SERVER['HTTP_X_CLIENT_SCHEME'] == 'https') || (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'https')) ? 'https' : 'http');
define('__MY_HTTP__', (
(!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')
|| (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
|| (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && (strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off' || $_SERVER['HTTP_FRONT_END_HTTPS'] == 'https'))
|| (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)
|| (!empty($_SERVER['HTTP_FROM_HTTPS']) && $_SERVER['HTTP_FROM_HTTPS'] !== 'off')
|| (!empty($_SERVER['HTTP_X_CLIENT_SCHEME']) && $_SERVER['HTTP_X_CLIENT_SCHEME'] == 'https')
|| (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'https')
) ? 'https' : 'http');
// 根目录
$my_root = empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'], 1, strrpos($_SERVER['SCRIPT_NAME'], '/'));
......
......@@ -60,7 +60,6 @@ select {height:28px !important;}
.t-l {text-align:left;}
.t-r {text-align:right;}
.o-h { overflow: hidden; }
.submit-state { font-size: 16px; width: 25px; height: 25px; line-height: 25px; }
input:hover, select:hover, textarea:hover, .chosen-choices:hover, .chosen-single:hover,.am-tagsinput:hover, button.colorpicker-submit:hover { border-style:solid; border-width:1px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; border:1px solid #4FACF5 !important; box-shadow:0 0 5px #4FACF5 !important; }
.am-input-group-sm > .am-input-group-btn > .am-btn,
.am-input-group-sm > .am-form-field,
......@@ -628,13 +627,6 @@ table.am-table .am-btn-danger:hover {
text-align: center;
z-index: 1;
right: 0;
background: #fff;
-webkit-box-shadow: 0px 0px 1px #ddd;
-moz-box-shadow: 0px 0px 1px #ddd;
box-shadow: 0px 0px 1px #ddd;
-webkit-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3);
-moz-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3);
box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3);
}
.parameters-table thead tr > th:last-child {
background: #f5f7fa;
......
......@@ -554,7 +554,7 @@ $(function()
var index = parseInt(Math.random()*1000001);
var html = '<tr>';
html += '<td class="am-text-middle">';
html += '<i class="am-close am-close-spin quick-title-remove">×</i>';
html += '<i class="am-close quick-title-remove">×</i>';
html += '<input type="text" name="spec_base_title_'+index+'" placeholder="规格名" />';
html += '</td>';
html += '<td class="spec-quick-td-value am-cf">';
......@@ -573,7 +573,7 @@ $(function()
var index = $(this).data('index');
var html = '<div class="am-fl am-margin-xs value-item">';
html += '<input type="text" class="am-fl" name="spec_base_value_'+index+'[]" placeholder="规格值" />';
html += '<i class="am-close am-close-spin quick-value-remove">×</i>';
html += '<i class="am-close quick-value-remove">×</i>';
html += '</div>';
$(this).parent().before(html);
});
......
......@@ -200,6 +200,12 @@ iframe { border: 0; }
color: #333;
border: 1px dashed #666;
}
.submit-state {
font-size: 16px;
width: 25px;
height: 25px;
line-height: 25px;
}
/**
* 地图提示
......
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.3</view>
<view class="text">Powered by ShopXO v2.0.0</view>
</view>
</template>
\ No newline at end of file
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.3</view>
<view class="text">Powered by ShopXO v2.0.0</view>
</view>
</template>
\ No newline at end of file
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.3</view>
<view class="text">Powered by ShopXO v2.0.0</view>
</view>
</template>
\ No newline at end of file
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.3</view>
<view class="text">Powered by ShopXO v2.0.0</view>
</view>
</template>
\ No newline at end of file
......@@ -74,7 +74,7 @@ App({
// 请求地址
request_url: "{{request_url}}",
// request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/',
request_url: 'https://uniapp.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",
......
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.3</view>
<view class="text">Powered by ShopXO v2.0.0</view>
</view>
</template>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册