Commit 49e5e208 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsales

# Conflicts:
#	Application/Home/View/public/header.html
parents 18a5a589 c25840e6
<?php <?php
return array( return array(
'LOAD_EXT_CONFIG' => 'config_db,config_url,config_pwd,config_param,config_supplier,chain_config,footstone_config,config_pcb', 'LOAD_EXT_CONFIG' => 'config_db,config_url',
'VAR_PAGE' => 'p', 'VAR_PAGE' => 'p',
'APP_SUB_DOMAIN_DEPLOY' => true, 'APP_SUB_DOMAIN_DEPLOY' => true,
'APP_SUB_DOMAIN_RULES' => array( 'APP_SUB_DOMAIN_RULES' => array(
......
<?php
return array(
'DB_TYPE' => 'mysql', // 数据库类型
'DB_HOST' => '192.168.2.232', // 服务器地址
'DB_NAME' => 'liexin', // 数据库名
'DB_USER' => 'liexin', // 用户名
'DB_PWD' => 'liexin#zsyM', // 密码
'DB_PORT' => '3306', // 端口
'DB_PREFIX' => 'lie_', // 数据库表前缀
'DB_PARAMS' => array(), // 数据库连接参数
'DB_DEBUG' => true, // 数据库调试模式 开启后可以记录SQL日志
'DB_FIELDS_CACHE' => true, // 启用字段缓存
'DB_CHARSET' => 'utf8', // 数据库编码默认采用utf8
'DB_DEPLOY_TYPE' => 0, // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'DB_RW_SEPARATE' => false, // 数据库读写是否分离 主从式有效
'DB_MASTER_NUM' => 1, // 读写分离后 主服务器数量
'DB_SLAVE_NO' => '', // 指定从服务器序号
'DB_OTHER' => array(
'CMS' => array(
'db_type' => 'mysql',
'db_user' => 'ichuntcms',
'db_pwd' => 'ichuntcms#zsyM',
'db_host' => '192.168.2.232',
'db_port' => '3306',
'db_name' => 'ichuntcms',
'db_charset'=>'utf8',
),
'FS' => array(
'db_type' => 'mysql',
'db_user' => 'spu',
'db_pwd' => 'spu',
'db_host' => '192.168.1.234',
'db_port' => '3306',
'db_name' => 'liexin_spu',
'db_charset'=>'utf8',
),
),
/*撮合数据库*/
"MATCHES_DB_CONFIG" => array(
'db_type' => 'mysql',
'db_user' => 'matches',
'db_pwd' => 'matches#zsyM',
'db_host' => 'db1.ichunt.com',
'db_port' => '3306',
'db_name' => 'matches',
'db_prefix' => 'lie_',
'db_charset'=>'utf8',
),
//数据中心mysql 后面记得要拼接数据库名称
'SUPPLIER_CENTER_MYSQL' => 'mysql://root:HuntxB9#zsyM@192.168.2.232:3306/',
//Mongo
'DB_MONGO' => array(
'db_type' => 'mongo',
'db_user' => 'ichunt',
'db_pwd' => 'huntmon6699',
'db_host' => '192.168.1.237',
'db_port' => '27017',
'db_name' => 'logs',
'db_charset'=>'utf8',
),
'SUPPLIER_CENTER_DB_CONFIG' => array(
/* 数据库配置 */
'db_type' => 'mongo', // 数据库类型
'db_host' => '192.168.1.237',// 服务器地址
'db_name' => 'ichunt', // 数据库名
'db_user' => 'ichunt', // 用户名
'db_pwd' => 'huntmon6699', // 密码
'db_port' => '27017', // 端口
'db_prefix' => '', // 数据库表前缀
),
//REDIS
'REDIS_HOST' => '192.168.1.235,192.168.1.237',
'REDIS_PORT' => 6379,
'REDIS_PASSWORD' => 'icDb29mLy2s',
'REDIS_RW_SEPARATE' => true,
'DATA_CACHE_TIMEOUT'=> false,
'DATA_CACHE_PERSISTENT' => false,
//基石系统redis
'FS_REDIS_HOST'=>'192.168.1.235,192.168.1.237',
'FS_REDIS_PORT' => 6379,
'FS_REDIS_PASSWORD' => 'icDb29mLy2s',
//spu与sku的数据库连接
'SPU_SKU_MYSQL' => 'mysql://spu:spu@192.168.1.234:3306/',
//rabbitmq链接信息
'RABBITMQ_FLAG'=>true,//为true时打开记录信息
'RABBITMQ_CONFIG'=>array(
"host" => "192.168.2.232",
"port" => "5672",
"user_name" => "guest",
"password" => "guest",
),
//神策
'RABBITMQ_SENSOR_CONFIG'=>array(
"host" => "192.168.2.232",
"port" => "5672",
"user_name" => "guest",
"password" => "guest",
'vhost'=>'/'
),
);
\ No newline at end of file
...@@ -13,18 +13,18 @@ return array( ...@@ -13,18 +13,18 @@ return array(
'__PUBLIC__' => STATIC_DOMAIN, '__PUBLIC__' => STATIC_DOMAIN,
//非必须登录 //非必须登录
//登录、注册、找回密码、登录状态、绑定第三方账户 //登录、注册、找回密码、登录状态、绑定第三方账户
'authapi' => 'authapi.icsales.com', 'authapi' => 'http://authapi.icsales.cc',
//非必须登录 //非必须登录
//询价中心、后台首页(部分接口)、抢单专区、后台搜索、前台搜索 //询价中心、后台首页(部分接口)、抢单专区、后台搜索、前台搜索
'soapi' => 'soapi.icsales.com', 'soapi' => 'http://soapi.icsales.cc',
//必须登录 //必须登录
//登录会员信息、会员认证(包含但不限于新增认证、认证列表)、积分、账户设置、站内消息通知 //登录会员信息、会员认证(包含但不限于新增认证、认证列表)、积分、账户设置、站内消息通知
'userapi' => 'userapi.icsales.com', 'userapi' => 'http://userapi.icsales.cc',
//非必须登录:商详 //非必须登录:商详
//必须登录:我的商品列表、编辑、新增、删除、下架、上架、批量上传、商品数量统计、批量上传任务状态 //必须登录:我的商品列表、编辑、新增、删除、下架、上架、批量上传、商品数量统计、批量上传任务状态
'goodsapi' => 'goodsapi.icsales.com', 'goodsapi' => 'http://goodsapi.icsales.cc',
//必须登录:我的询价列表、询价下架and上架、询价详情、询价数量统计、发布询价 报价列表、报价详情(询报价相关)、报价数量统计、发布报价 //必须登录:我的询价列表、询价下架and上架、询价详情、询价数量统计、发布询价 报价列表、报价详情(询报价相关)、报价数量统计、发布报价
'inquiryapi' => 'inquiryapi.icsales.com' 'inquiryapi' => 'http://inquiryapi.icsales.cc'
), ),
'URL_MAP_RULES' => array(//静态路由 'URL_MAP_RULES' => array(//静态路由
......
<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends Controller
{
public function _initialize()
{
$datas['logo'] = $this->apiBaseCache('pc_logo_set'); // logo
$datas['bottom_qrcode'] = $this->apiBaseCache('pc_bottom_qrcode'); // 底部二维码
foreach ($datas as $k => $v) {
$this->assign($k, $v['data']);
}
}
/**
* 通过bcat_id获取CMS分类数据 --- 图片、文字等
* @param [type] $tags [标签]
* @param [type] $where [搜索条件,用&连接,如:a=1&b=2]
* @param [type] $limit [数量]
* @return [type] [description]
*/
public function apiBaseCache($tags, $where='', $limit=1)
{
$cms = D('Home/Scms');
$datas = $cms->getBaseList($tags, $where, $limit);
if (!empty($datas)) {
return $this->apiReturn(0, '', $datas);
} else {
return $this->apiReturn(7004, '未找到数据');
}
}
/**
* 统一格式返回
* @param integer $code [description]
* @param string $msg [description]
* @param array $extend [description]
* @return [type] [description]
*/
protected function apiReturn($code = 0, $msg = '', $extend = array())
{
$data = array(
'err_code' => $code,
'err_msg' => $msg,
'data' => $extend,
);
if(isset($_GET['callback']) && !empty($_GET['callback'])){
echo $_GET['callback'].'('.json_encode($data).')';exit;
}else{
return $data;exit;
}
}
}
\ No newline at end of file
<?php <?php
namespace Home\Controller; namespace Home\Controller;
use Think\Controller; use Home\Controller\BaseController;
class IndexController extends Controller class IndexController extends BaseController
{ {
/** /**
...@@ -12,6 +11,12 @@ class IndexController extends Controller ...@@ -12,6 +11,12 @@ class IndexController extends Controller
*/ */
public function index() public function index()
{ {
$datas['cooperation_pf'] = $this->apiBaseCache('pc_home_cooperation_pf', '', ''); // 合作平台
foreach ($datas as $k => $v) {
$this->assign($k, $v['data']);
}
$this->display('Index/index'); $this->display('Index/index');
} }
......
<?php
/**
* 获取CMS缓存
*/
namespace Home\Model;
class ScmsModel
{
/**
* 获取bcat_id
* @param [type] $key [键]
* @param integer $type [取值类型:1-通过tags,2-通过tem_id(楼层类目)]
* @return [type] [description]
*/
public function getBcatId($key, $type=1)
{
return $type == 1 ? S_cms('icsales:lie_base_cat:tags', $key, 'bcat_id') : S_cms('icsales:lie_base_cat:tem_id:'.$key);
}
/**
* 获取base数据
* @param [type] $key [键]
* @param string $limit [限制数量]
* @param integer $type [取值类型:1-通过bcat_id, 2-通过tem_id,3-通过model_id]
* @return [type] $condition [搜索条件,用&连接,如:a=1&b=2]
* @param [type] $table [表名]
* @return [type] [description]
*/
public function getBase($key, $limit='', $condition='', $type=1, $table='lie_base')
{
if ($type == 1)
$datas = S_cms('icsales:'.$table.':bcat_id:'.$key, '', '', 'sort');
else if ($type == 2)
$datas = S_cms('icsales:'.$table.':tem_id:'.$key, '', '', 'sort');
else
$datas = S_cms('icsales:'.$table.':model_id:'.$key, '', '', 'sort');
if (!$datas) return $datas;
if ($condition) {
parse_str($condition, $arr); // 解析条件,输出数组
$isTrue = true;
$datas = array_filter($datas, function($base) use ($arr, $isTrue) {
foreach ($arr as $k=>$v) {
if (isset($base[$k]) && $base[$k] != $v) { // 判断每个搜索条件是否存在且值相等,若不相等,则过滤对应的datas数组值
$isTrue = false;
}
}
return $isTrue;
});
array_multisort($datas); // 重新索引
}
$datas = $limit ? array_slice($datas, 0, $limit) : $datas;
return $datas;
}
/**
* 获取Base表配置内容
* @param [type] $tags [tags值]
* @param string $where [条件]
* @param string $limit [限制数量]
* @return [type] [description]
*/
public function getBaseList($tags, $where='', $limit=1)
{
$bcat_id = $this->getBcatId($tags); // 分类ID
return $this->getBase($bcat_id, $limit, $where);
}
/**
* 获取楼层模板
* @param [type] $key [键]
* @return [type] [description]
*/
public function getTemplate($key)
{
return S_cms('icsales:lie_template:tag:'.$key, '', '', 'sort');
}
/**
* 获取模块
* @param [type] $field [字段值]
* @param string $column [指定列]
* @return [type] [description]
*/
public function getModel($field, $column='')
{
return $column ? S_cms('icsales:lie_model:model_key', $field, $column) : S_cms('icsales:lie_model:model_key', $field);
}
/**
* 获取导航
* @param integer $model_id [所属模块ID]
* @param integer $parent_id [所属父级ID] <先查找模块下所有导航,遍历后,根据nav_id查找对应子级>
* @return [type] [description]
*/
public function getNavigation($model_id, $parent_id=0)
{
return $parent_id == 0 ? S_cms('icsales:lie_navigation:model_id:'.$model_id, '', '', 'sort') : S_cms('icsales:lie_navigation:model_id:'.$model_id.':parent_id:'.$parent_id, '', '', 'sort');
}
/**
* 获取帮助中心分类
* @param integer $model_id [所属模块ID]
* @param integer $parent_id [所属父级ID] <先查找模块下所有分类,遍历后,根据hccat_id查找对应子级>
* @return [type] [description]
*/
public function getHelpCenterCat($model_id, $parent_id=0)
{
return $parent_id == 0 ? S_cms('icsales:lie_help_center_cat:model_id:'.$model_id, '', '', 'sort') : S_cms('icsales:lie_help_center_cat:model_id:'.$model_id.':parent_id:'.$parent_id, '', '', 'sort');
}
/**
* 获取帮助中心内容
* @param [type] $hccat_id [帮助中心分类ID]
* @return [type] [description]
*/
public function getHelpCenter($hccat_id)
{
return S_cms('icsales:lie_help_center:hccat_id:'.$hccat_id, '', '', 'sort');
}
/**
* 获取底部链接分类
* @param integer $fcat_key [所属模块ID]
* @param integer $column [指定字段]
* @param integer $parent_id [所属父级ID] <先查找模块下所有分类,遍历后,根据fcat_id查找对应子级>
* @return [type] [description]
*/
public function getFooterLinkCat($fcat_key, $column='', $parent_id=0)
{
return $parent_id == 0 ? S_cms('icsales:lie_footer_link_cat:fcat_key', $fcat_key, $column, 'sort') : S_cms('icsales:lie_footer_link_cat:parent_id:'.$parent_id, '', '', 'sort');
}
/**
* 获取底部链接内容
* @param [type] $fcat_id [帮助中心分类ID]
* @return [type] [description]
*/
public function getFooterLink($fcat_id)
{
return S_cms('icsales:lie_footer_link:fcat_id:'.$fcat_id, '', '', 'sort');
}
/**
* 获取页面分类
* @param integer $model_id [所属模块ID]
* @return [type] [description]
*/
public function getPageCat($model_id)
{
return S_cms('icsales:lie_page_cat:model_id:'.$model_id);
}
/**
* 获取页面内容
* @param [type] $pagecat_id [页面分类ID]
* @return [type] [description]
*/
public function getPage($pagecat_id)
{
return S_cms('icsales:lie_page:pagecat_id:'.$pagecat_id);
}
/************************************** 信宏泰配置 **************************************/
/**
* 获取公司
* @return [type] [description]
*/
public function getCompany()
{
return S_cms('icsales:xht:lie_company', '', '', 'sort');
}
/**
* 获取公司信息
* @param [type] $com_id [公司ID]
* @return [type] [description]
*/
public function getCompanyInfo($com_id)
{
return S_cms('icsales:xht:lie_company_info:com_id:'.$com_id, '', '', 'sort');
}
/**
* 获取公司图片
* @param [type] $com_id [公司ID]
* @return [type] [description]
*/
public function getCompanyImg($com_id)
{
return S_cms('icsales:xht:lie_company_img:com_id:'.$com_id, '', '', 'sort');
}
}
\ No newline at end of file
...@@ -26,60 +26,57 @@ ...@@ -26,60 +26,57 @@
<span class="icon iconfont iconjuxing19 va-m"></span> <span class="icon iconfont iconjuxing19 va-m"></span>
<span>上传的商品有图片,搜索排名会优先排前</span> <span>上传的商品有图片,搜索排名会优先排前</span>
</div> </div>
<div class="form_content clr"> <div class="form_content layui-form clr">
<div class="form_left fl layui-form"> <div class="form_left fl layui-form">
<div class="xh input_div "> <div class="xh input_div ">
<span class="input_title lineBlock">*型号:</span> <span class="input_title lineBlock">*型号:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" placeholder="请输入商品型号" class="input boxsiz"> <input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz" lay-verify="required">
</div> </div>
</div> </div>
<div class="brand input_div "> <div class="brand input_div ">
<span class="input_title lineBlock">*品牌:</span> <span class="input_title lineBlock">*品牌:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" placeholder="请输入品牌(必填)" class="input boxsiz"> <input type="text" name="brand_name" placeholder="请输入品牌" class="input boxsiz" lay-verify="required">
</div> </div>
</div> </div>
<div class="fz input_div "> <div class="fz input_div ">
<span class="input_title lineBlock">封装:</span> <span class="input_title lineBlock">封装:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" placeholder="请输入封装" class="input boxsiz"> <input type="text" name="encap" placeholder="请输入封装" class="input boxsiz">
</div> </div>
</div> </div>
<div class="num input_div "> <div class="num input_div ">
<span class="input_title lineBlock">*库存:</span> <span class="input_title lineBlock">*库存:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" placeholder="请输入需求数量(必填)" class="input boxsiz"> <input type="text" name="stock" placeholder="请输入需求数量" class="input boxsiz" lay-verify="required">
</div> </div>
</div> </div>
<div class="price input_div "> <div class="price input_div ">
<span class="input_title lineBlock">*单价:</span> <span class="input_title lineBlock">*单价:</span>
<div class="input_parent"> <div class="input_parent">
<input type="text" placeholder="请输入接受价格" class="input boxsiz price_input"> <input type="text" name="price" placeholder="请输入接受价格" class="input boxsiz price_input" lay-verify="required">
<div class="rmb layui-form"> <div class="rmb layui-form">
<select name="city" lay-verify="required"> <select name="city" lay-verify="required">
<option value=""></option> <option value="1">RMB</option>
<option value="0">北京</option> <option value="2">USD</option>
<option value="1">上海</option>
<option value="2">广州</option>
<option value="3">深圳</option>
<option value="4">杭州</option>
</select> </select>
</div> </div>
</div> </div>
</div> </div>
<div class="hq input_div "> <div class="hq input_div">
<span class="input_title lineBlock">*货期:</span> <span class="input_title lineBlock">*货期:</span>
<div class="input_parent"> <div class="input_parent" id="delivery">
<input type="radio" name="sex" value="现货" title="现货"> <input type="radio" name="delivery_time" lay-filter="delivery" value="现货" title="现货">
<input type="radio" name="sex" value="期货" title="期货" checked> <input type="radio" name="delivery_time" lay-filter="delivery" value="期货" title="期货" checked id="daytext">
<input type="text" placeholder="输入时间" class="boxsiz day_input input"> <div class="lineBlock" id="day">
<i class="day"></i> <input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number" name="day">
<i class="day"></i>
</div>
</div> </div>
</div> </div>
<div class="btn_div"> <div class="btn_div">
<span class="lineBlock fb btn">发布</span> <span class="lineBlock fb btn" lay-submit lay-filter="add">发布</span>
<span class="lineBlock cz btn btn_border">重置</span> <span class="lineBlock cz btn btn_border">重置</span>
</div> </div>
</div> </div>
...@@ -97,6 +94,13 @@ ...@@ -97,6 +94,13 @@
</div> </div>
</div> </div>
<include file="public/foot" /> <include file="public/foot" />
<script src="__PUBLIC__/js/goodmanage/uploadsingle.js"></script>
<script type="text/html" id="deliveryHtml">
{{# if (d== 1) { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number" name="day">
<i class="day"></i>
{{# } }}
</script>
</body> </body>
</html> </html>
\ No newline at end of file
<script src="__PUBLIC__/js/global/x_public.min.js" type="text/javascript"></script> <script src="__PUBLIC__/js/global/x_public.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/global/api.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/global/global.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/layui/layui.all.js"></script> <script src="__PUBLIC__/js/layui/layui.all.js"></script>
<script src="__PUBLIC__/js/global/global.min.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="keywords" content="" /> <meta name="keywords" content=""/>
<meta name="description" content="" /> <meta name="description" content=""/>
<meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1; user-scalable=0;" /> <meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1; user-scalable=0;"/>
<title>IC业务助手</title> <title>IC业务助手</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common/base.css"> <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common/base.css">
<!--[if IE 8]> <!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common/ie.css"> <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common/ie.css">
<![endif]--> <![endif]-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/layui/css/layui.css">
<script>
var auth = 'authapi',
so = 'soapi',
user = 'userapi',
goods = 'goodsapi',
inquiry = 'inquiryapi';
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/layui/css/layui.css"> <link rel="stylesheet" type="text/css" href="__PUBLIC__/js/layui/css/layui.css">
\ No newline at end of file
<?php
return array(
//'配置项'=>'配置值'
);
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
<?php
return array(
//'配置项'=>'配置值'
);
\ No newline at end of file
\ No newline at end of file
<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller
{
public function index()
{
$this->show('<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: "微软雅黑"; color: #333;font-size:24px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px } a,a:hover{color:blue;}</style><div style="padding: 24px 48px;"> <h1>:)</h1><p>欢迎使用 <b>ThinkPHP</b>!</p><br/>版本 V{$Think.version}</div><script type="text/javascript" src="http://ad.topthink.com/Public/static/client.js"></script><thinkad id="ad_55e75dfae343f5a1"></thinkad><script type="text/javascript" src="http://tajs.qq.com/stats?sId=9347272" charset="UTF-8"></script>','utf-8');
}
}
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
{"version":3,"sources":["chat.less"],"names":[],"mappings":"AAAA,aACI;EACI,kBAAA;;AAFR,aACI,SAGI;EACI,kBAAA;EACA,SAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;;AAVZ,aACI,SAGI,aAQI;EACI,YAAA;EACA,+BAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;EACA,sBAAA;;AAEA,aAnBZ,SAGI,aAQI,aAQK;EACG,UAAA;;AArBpB,aACI,SAGI,aAQI,aAYI;EACI,gBAAA;EACA,0BAAA;;AA1BpB,aACI,SAGI,aAQI,aAkBI;EACI,uBAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;;AAEA,aAnChB,SAGI,aAQI,aAkBI,iBAMK;AACD,aApChB,SAGI,aAQI,aAkBI,iBAOK;EACG,yCAAA;;AAtCxB,aACI,SAGI,aAQI,aAkBI,iBAWI;EACI,YAAA;EACA,WAAA;EACA,sBAAA;;AA5CxB,aACI,SAGI,aAQI,aAkBI,iBAiBI;EACI,kBAAA;EACA,MAAA;EACA,WAAA;EACA,UAAA;EACA,SAAA;;AAGI,aAtDxB,SAGI,aAQI,aAkBI,iBAiBI,YAOI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,KAGG;EACI,iBAAA;;AAJR,aAxJpB,SAGI,aAiGI,cAoCI,aAaI,aAGK,KAGG,gBAGI;EACI,yBAAA;;AAKZ,aApKpB,SAGI,aAiGI,cAoCI,aAaI,aAeK;EACG,iBAAA;;AADJ,aApKpB,SAGI,aAiGI,cAoCI,aAaI,aAeK,MAGG;EACI,kBAAA;;AAJR,aApKpB,SAGI,aAiGI,cAoCI,aAaI,aAeK,MAGG,gBAGI;EACI,yBAAA;;AA5KpC,aACI,SAGI,aAiGI,cAoCI,aAaI,aA2BI;EACI,YAAA;EACA,WAAA;EACA,sBAAA;;AApL5B,aACI,SAGI,aAiGI,cAoCI,aAaI,aAkCI,gBACI;EACI,qBAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,kBAAA;;AA9LhC,aACI,SAGI,aAiGI,cAoCI,aAaI,aAkCI,gBAUI;EACI,eAAA;EACA,cAAA;EACA,kBAAA","file":"chat.css"} {"version":3,"sources":["chat.less"],"names":[],"mappings":"AAAA,aACI;EACI,kBAAA;;AAFR,aACI,SAGI;EACI,kBAAA;EACA,SAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;;AAVZ,aACI,SAGI,aAQI;EACI,YAAA;EACA,+BAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;EACA,sBAAA;;AAEA,aAnBZ,SAGI,aAQI,aAQK;EACG,UAAA;;AArBpB,aACI,SAGI,aAQI,aAYI;EACI,gBAAA;EACA,0BAAA;;AA1BpB,aACI,SAGI,aAQI,aAkBI;EACI,uBAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;;AAEA,aAnChB,SAGI,aAQI,aAkBI,iBAMK;AACD,aApChB,SAGI,aAQI,aAkBI,iBAOK;EACG,yCAAA;;AAtCxB,aACI,SAGI,aAQI,aAkBI,iBAWI;EACI,YAAA;EACA,WAAA;EACA,sBAAA;;AA5CxB,aACI,SAGI,aAQI,aAkBI,iBAiBI;EACI,kBAAA;EACA,MAAA;EAC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ASK;EACG,UAAA;;AAxJxB,aACI,SAGI,aAiGI,cAyCI,aAaI;EACI,gBAAA;;AAEA,aA7JpB,SAGI,aAiGI,cAyCI,aAaI,aAGK;EACG,gBAAA;;AADJ,aA7JpB,SAGI,aAiGI,cAyCI,aAaI,aAGK,KAGG;EACI,iBAAA;;AAJR,aA7JpB,SAGI,aAiGI,cAyCI,aAaI,aAGK,KAGG,gBAGI;EACI,yBAAA;;AAKZ,aAzKpB,SAGI,aAiGI,cAyCI,aAaI,aAeK;EACG,iBAAA;;AADJ,aAzKpB,SAGI,aAiGI,cAyCI,aAaI,aAeK,MAGG;EACI,kBAAA;;AAJR,aAzKpB,SAGI,aAiGI,cAyCI,aAaI,aAeK,MAGG,gBAGI;EACI,yBAAA;;AAjLpC,aACI,SAGI,aAiGI,cAyCI,aAaI,aA2BI;EACI,YAAA;EACA,WAAA;EACA,sBAAA;;AAzL5B,aACI,SAGI,aAiGI,cAyCI,aAaI,aAkCI,gBACI;EACI,qBAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,kBAAA;;AAnMhC,aACI,SAGI,aAiGI,cAyCI,aAaI,aAkCI,gBAUI;EACI,eAAA;EACA,cAAA;EACA,kBAAA","file":"chat.css"}
\ No newline at end of file \ No newline at end of file
...@@ -101,15 +101,15 @@ ...@@ -101,15 +101,15 @@
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
} }
.good_manage_content .filter_section .layui-form { .good_manage_content .filter_section .layui-form-style {
margin-right: 20px; margin-right: 20px;
} }
.good_manage_content .filter_section .layui-form .layui-form-select { .good_manage_content .filter_section .layui-form-style .layui-form-select {
display: inline-block; display: inline-block;
width: 170px; width: 170px;
vertical-align: middle; vertical-align: middle;
} }
.good_manage_content .filter_section .layui-form .layui-form-select input { .good_manage_content .filter_section .layui-form-style .layui-form-select input {
border-radius: 4px; border-radius: 4px;
} }
.good_manage_content .filter_section .heng { .good_manage_content .filter_section .heng {
...@@ -232,3 +232,4 @@ ...@@ -232,3 +232,4 @@
.good_manage_content .good_data .data_list .data_item .xj.fb { .good_manage_content .good_data .data_list .data_item .xj.fb {
color: #0D84D1; color: #0D84D1;
} }
/*# sourceMappingURL=goodmanage.css.map */
\ No newline at end of file
{"version":3,"sources":["goodmanage.less"],"names":[],"mappings":"AAAA;EACI,eAAA;;AADJ,oBAGI;EACI,eAAA;;AAJR,oBAOI;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;;AAVR,oBAOI,YAKI;EACI,aAAA;EACA,kBAAA;;AAdZ,oBAOI,YAKI,IAII;EACI,eAAA;EACA,gBAAA;;AAlBhB,oBAOI,YAKI,IASI;EACI,eAAA;EACA,cAAA;;AAGJ,oBAnBR,YAKI,IAcK,QACG;EACI,cAAA;;AAIR,oBAzBR,YAKI,IAoBK,UACG;EACI,cAAA;;AAIR,oBA/BR,YAKI,IA0BK,QACG;EACI,cAAA;;AAxCpB,oBAOI,YAsCI;EACI,kBAAA;EACA,SAAA;EACA,YAAA;EACA,UAAA;EACA,yBAAA;;AAEA,oBA7CR,YAsCI,aAOK;EACG,YAAA;;AAIJ,oBAlDR,YAsCI,aAYK;EACG,YAAA;;AA1DhB,oBAgEI;EACI,YAAA;EACA,sBAAA;EACA,gBAAA;EACA,eAAA;EACA,cAAA;EACA,eAAA;EACA,iBAAA;;AAvER,oBAgEI,gBASI;EACI,mBAAA;EACA,kBAAA;;AA3EZ,oBAgEI,gBASI,WAII;EACI,UAAA;EACA,QAAA;EACA,kBAAA;EACA,QAAA;;AAjFhB,oBAgEI,gBASI,WAWI;EACI,YAAA;EACA,kBAAA;EACA,yBAAA;EACA,eAAA;EACA,UAAA;EACA,iBAAA;;AAIJ,mBAAqC;EAArC,oBA9BR,gBASI,WAsBQ;IACI,UAAA;;;AAhGpB,oBAgEI,gBASI,WA2BI;EACI,WAAA;;AArGhB,oBAgEI,gBAyCI,UACI;EACI,YAAA;EACA,8BAAA;EACA,yBAAA;EACA,eAAA;EACA,WAAA;EACA,cAAA;EACA,iBAAA;;AAj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,UAAA;;AAlOpB,oBAiLI,WACI,WAGI,WA4CI,KAGI;EACI,cAAA;;AArOxB,oBAiLI,WACI,WAGI,WAoDI;EACI,UAAA;;AA1OpB,oBAiLI,WACI,WAGI,WAoDI,aAGI;EACI,YAAA;EACA,WAAA;EACA,sBAAA;EACA,iBAAA;;AAGJ,oBAlEhB,WACI,WAGI,WAoDI,aAUK,GACG;EACI,yBAAA;;AAIR,oBAxEhB,WACI,WAGI,WAoDI,aAgBK,GACG;EACI,yBAAA;;AA3P5B,oBAiLI,WACI,WAGI,WAoDI,aAsBI;EACI,cAAA;;AAhQxB,oBAiLI,WACI,WAGI,WA+EI;EACI,UAAA;;AArQpB,oBAiLI,WACI,WAGI,WAoFI;EACI,cAAA;EACA,UAAA;;AAGJ,mBAAqC;EAArC,oBA7FZ,WACI,WAGI,WA4FQ;IACI,UAAA;;EAJR,oBA7FZ,WACI,WAGI,WAgGQ;IACI,UAAA;;EARR,oBA7FZ,WACI,WAGI,WAoGQ;IACI,UAAA;;EAZR,oBA7FZ,WACI,WAGI,WAwGQ;IACI,aAAA;;;AA9RxB,oBAiLI,WACI,WAGI,WA6GI;EACI,cAAA;EACA,eAAA;;AApSpB,oBAiLI,WACI,WAGI,WAkHI;EACI,cAAA;EACA,eAAA;EACA,iBAAA;;AAEA,oBA3HhB,WACI,WAGI,WAkHI,IAKK;EACG,cAAA","file":"goodmanage.css"}
\ No newline at end of file
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
} }
} }
.layui-form { .layui-form-style {
margin-right: 20px; margin-right: 20px;
.layui-form-select { .layui-form-select {
......
/**
* 登录、注册、找回密码、登录状态、绑定第三方账户(非必须登录)
* auth => 'authapi.icsales.com'
*
* 询价中心、后台首页(部分接口)、抢单专区、后台搜索、前台搜索(非必须登录)
* so => 'soapi.icsales.com'
*
* 登录会员信息、会员认证(包含但不限于新增认证、认证列表)、积分、账户设置、站内消息通知(必须登录)
* user => 'userapi.icsales.com'
*
* 必须登录:我的商品列表、编辑、新增、删除、下架、上架、批量上传、商品数量统计、批量上传任务状态(非必须登录:商详)
* goods => 'goodsapi.icsales.com'
*
* 我的询价列表、询价下架and上架、询价详情、询价数量统计、发布询价 报价列表、报价详情(询报价相关)、报价数量统计、发布报价(必须登录)
* inquiry => 'inquiryapi.icsales.com
*/
(function (window) {
apis = {
/**
* 商品列表
*/
goodsInfo: goods + '/goods/info',
/**
* 商品搜索
*/
goodsSearch: goods + '/goods/search',
/**
* 商品数量
*/
goodsCount: goods + '/goods/count',
/**
* 商品新增
*/
goodsAdd: goods + '/goods/add',
/**
* 商品修改
*/
goodsSave: goods + '/goods/save'
};
if (typeof define === "function" && define.amd) {
return apis;
} else {
window.apis = apis;
}
})(window);
; ;!function () {
! function () {
window.IcController = { window.IcController = {
init: function () { init: function () {
this.mounted(this).handleBind(this); this.mounted(this).handleBind(this);
}, },
getData: function (url, type, param, callback, loading) { getData: function (url, type, param, callback) {
var index; var index = layer.load(1,{
offset: ['50%', "50%"], shade: false
if (loading == false) { })
index = null;
} else {
index = layer.load(1);
}
var platform = { var platform = {
pf: 20 pf: 20,
token: '1298dc6f00a017d9e94fc1e57792625d'
} }
var params = $.extend({}, platform, param); var params = $.extend({}, platform, param);
//跨域模式切换 兼容
var dataTypeXpx = "json";
if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)) {
dataTypeXpx = "jsonp";
}
var cookieHostname = window.location.hostname.split(".")[1] + "." + window.location.hostname.split(".")[2];
$.ajax({ $.ajax({
type: type, type: type,
url: url, url: url,
...@@ -54,6 +57,7 @@ ...@@ -54,6 +57,7 @@
}) })
}(); }();
//工具类
(function (window) { (function (window) {
Util = { Util = {
/** /**
...@@ -124,7 +128,7 @@ ...@@ -124,7 +128,7 @@
* @param val * @param val
* @returns {string} * @returns {string}
*/ */
getDateStr(val) { getDateStr:function (val) {
var dd = new Date(); var dd = new Date();
dd.setDate(dd.getDate() + val); dd.setDate(dd.getDate() + val);
var y = dd.getFullYear(); var y = dd.getFullYear();
...@@ -139,10 +143,12 @@ ...@@ -139,10 +143,12 @@
window.Util = Util; window.Util = Util;
} }
})(window); })(window);
//api列表 //api列表
(function (window) { (function (window) {
Api = { Api = {
login:"sy" login: "sy"
}; };
if (typeof define === "function" && define.amd) { if (typeof define === "function" && define.amd) {
return Api; return Api;
...@@ -151,12 +157,6 @@ ...@@ -151,12 +157,6 @@
} }
})(window); })(window);
//跨域模式切换 兼容
// var dataTypeXpx = "json";
// if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)) {
// dataTypeXpx = "jsonp";
// }
// var cookieHostname = window.location.hostname.split(".")[1] + "." + window.location.hostname.split(".")[2];
//form序列化json //form序列化json
$.fn.serializeJson = function () { $.fn.serializeJson = function () {
......
!function () {
window.GoodManage = {
init: function () {
this.created(this).mounted(this).listData(this, {offset: 10, p: 1}, 1).handleBind(this);
},
created: function (opt) {
//日期控件初始化
layui.laydate.render({
elem: '#start_time',
theme: '#0D84D1'
});
layui.laydate.render({
elem: '#end_time',
theme: '#0D84D1'
});
return this;
},
mounted: function (opt) {
//商品数量获取
IcController.getData(apis.goodsCount, 'POST', null, function (res) {
var getTpl = countHtml.innerHTML;
layui.laytpl(getTpl).render(res.count, function (html) {
$(".good_total").empty().html(html);
});
});
return this;
},
listData: function (opt, params, curr) {
//商品列表初始化
IcController.getData(apis.goodsInfo, 'POST', params, function (res) {
var getTpl = listHtml.innerHTML;
if (res.errcode == 0) {
layui.laytpl(getTpl).render(res.goods_list, function (html) {
$("#listData").empty().html(html);
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.total,
limit: 10,
curr: curr,
jump: function (obj, first) {
if (!first) {
//分页回调调用
var json = {
p: obj.curr
}
var param = $.extend({}, params, json);
opt.mounted(opt, param, obj.curr);
}
}
});
});
} else if (res.errcode == 110001) {
layui.laytpl(getTpl).render([], function (html) {
$("#listData").empty().html(html);
});
}
});
return this;
},
handleBind: function (opt) {
//搜索
layui.form.on('submit(search)', function (data) {
IcController.getData(apis.goodsSearch, 'POST', data.field, function (res) {
});
});
return this;
},
}, $(function () {
GoodManage.init();
})
}();
\ No newline at end of file
!function () {
window.UploadSingle = {
isClick: false,
init: function () {
this.created(this).mounted(this).handleBind(this);
},
created: function (opt) {
return this;
},
mounted: function (opt, params, curr) {
return this;
},
handleBind: function (opt) {
//货期选择
layui.form.on('radio(delivery)', function (data) {
var val = 1;
if (data.value == '期货') {
val = 1
} else if (data.value == '现货') {
val = 2;
}
var getTpl = deliveryHtml.innerHTML;
layui.laytpl(getTpl).render(val, function (html) {
$("#day").empty().html(html);
});
});
//天数同步数据
$(document).on('input propertychange', 'input[name="day"]', function () {
var val = $(this).val();
$("#daytext").val(val + '天');
});
//上传商品
layui.form.on('submit(add)', function (data) {
$(data.elem).addClass("layui-btn-disabled");
if (!opt.isClick) {
opt.isClick = true;
IcController.getData(apis.goodsAdd, 'POST', data.field, function (res) {
if (res.errcode == 0) {
layer.msg('上传商品成功', {time: 2000}, function () {
window.location.href = '/goodmanage';
});
} else {
layer.msg(res.errmsg);
opt.isClick = false;
}
});
}
});
return this;
},
}, $(function () {
UploadSingle.init();
})
}();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment