goods debug

feat/task1-c-wallet
devil_gong 2018-08-06 21:06:39 +08:00
parent 9a9942d7ab
commit 6473f7da31
10 changed files with 35 additions and 6 deletions

View File

@ -282,6 +282,7 @@ class GoodsController extends CommonController
'images' => isset($photo['data'][0]) ? $photo['data'][0] : '',
'photo_count' => count($photo['data']),
];
print_r($_POST);die;
// 添加/编辑
$m = D('Goods');

View File

@ -52,6 +52,9 @@ return array(
'goods_is_shelves_text' => '是否上下架',
'goods_is_shelves_tips' => '下架后用户不可见',
'goods_is_home_recommended_text' => '是否首页推荐',
'goods_is_home_recommended_tips' => '推荐后在首页展示',
'goods_images_text' => '相册',
'goods_images_tips' => '可拖拽图片进行排序',
'goods_images_format' => '请上传相册',

View File

@ -44,6 +44,7 @@
<th>{{:L('goods_title_text')}}</th>
<th>{{:L('goods_price_text')}}</th>
<th>{{:L('goods_is_shelves_text')}}</th>
<th>{{:L('goods_is_home_recommended_text')}}</th>
<th class="am-hide-sm-only">{{:L('goods_inventory_text')}}</th>
<th class="am-hide-sm-only">{{:L('goods_model_text')}}</th>
<th class="am-hide-sm-only">{{:L('common_create_time_name')}}</th>
@ -70,6 +71,9 @@
<td>
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_shelves'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Goods/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_shelves']}}"></a>
</td>
<td>
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_home_recommended'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Goods/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_home_recommended']}}"></a>
</td>
<td class="am-hide-sm-only">{{$v.inventory}} {{$v.inventory_unit}}</td>
<td class="am-hide-sm-only">{{$v.model}}</td>
<td class="am-hide-sm-only">{{$v.add_time}}</td>

View File

@ -124,6 +124,10 @@
<label class="block">{{:L('goods_is_shelves_text')}}<span class="fs-12 fw-100 cr-999">{{:L('goods_is_shelves_tips')}}</span></label>
<input name="is_shelves" value="1" type="checkbox" data-off-text="{{:L('common_operation_off_goods_text')}}" data-on-text="{{:L('common_operation_on_goods_text')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch <if condition="!empty($data) and $data['is_shelves'] eq 1">checked="true"</if> />
</div>
<div class="am-form-group">
<label class="block">{{:L('goods_is_home_recommended_text')}}<span class="fs-12 fw-100 cr-999">{{:L('goods_is_home_recommended_tips')}}</span></label>
<input name="is_home_recommended" value="1" type="checkbox" data-off-text="{{:L('common_operation_off_is_text')}}" data-on-text="{{:L('common_operation_on_is_text')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch <if condition="!empty($data) and $data['is_home_recommended'] eq 1">checked="true"</if> />
</div>
</div>
<div id="goods-nav-photo" class="division-block">
<label class="block nav-detail-title">{{:L('goods_nav_photo_name')}}<span class="fs-12 fw-100 cr-999">{{:L('goods_images_tips')}}</span></label>

View File

@ -51,7 +51,7 @@
<!-- save win end -->
<!-- list start -->
<div id="tree" class="m-t-15" data-rank="2">
<div id="tree" class="m-t-15" data-rank="3">
<div class="m-t-30 t-c">
<img src="__PUBLIC__/Common/Images/loading.gif" />
<p>{{:L('common_form_loading_tips')}}</p>

View File

@ -11,7 +11,7 @@ return array(
// 数据库配置信息
'DB_TYPE' => 'mysql', // 数据库类型
'DB_HOST' => '127.0.0.1', // 服务器地址
'DB_NAME' => 'shop', // 数据库名
'DB_NAME' => 'shopxo', // 数据库名
'DB_USER' => 'root', // 用户名
'DB_PWD' => 'root', // 密码
'DB_PORT' => 3306, // 端口

View File

@ -11,7 +11,7 @@ return array(
// 数据库配置信息
'DB_TYPE' => 'mysql', // 数据库类型
'DB_HOST' => '127.0.0.1', // 服务器地址
'DB_NAME' => 'shop', // 数据库名
'DB_NAME' => 'shopxo', // 数据库名
'DB_USER' => 'root', // 用户名
'DB_PWD' => 'root', // 密码
'DB_PORT' => 3306, // 端口

View File

@ -11,7 +11,7 @@ return array(
// 数据库配置信息
'DB_TYPE' => 'mysql', // 数据库类型
'DB_HOST' => '127.0.0.1', // 服务器地址
'DB_NAME' => 'boyuan', // 数据库名
'DB_NAME' => 'shopxo', // 数据库名
'DB_USER' => 'root', // 用户名
'DB_PWD' => 'gfx#ml@520', // 密码
'DB_PORT' => 3306, // 端口

View File

@ -11,7 +11,7 @@ return array(
// 数据库配置信息
'DB_TYPE' => 'mysql', // 数据库类型
'DB_HOST' => '127.0.0.1', // 服务器地址
'DB_NAME' => 'shop', // 数据库名
'DB_NAME' => 'shopxo', // 数据库名
'DB_USER' => 'root', // 用户名
'DB_PWD' => 'root', // 密码
'DB_PORT' => 3306, // 端口

View File

@ -739,6 +739,10 @@ $(function()
*/
$('#tree').on('click', '.tree-submit-add-node', function()
{
// 清空表单数据
tree_form_init();
// 父节点赋值
var id = parseInt($(this).data('id')) || 0;
$('#data-save-win').find('input[name="pid"]').val(id);
});
@ -787,6 +791,19 @@ $(function()
* @datetime 2016-12-25T22:11:34+0800
*/
$('.tree-submit-add').on('click', function()
{
tree_form_init();
});
/**
* 添加窗口初始化
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-08-06
* @desc description
*/
function tree_form_init()
{
// 更改窗口名称
$title = $('#data-save-win').find('.am-popup-title');
@ -824,7 +841,7 @@ $(function()
$(icon_tag).attr('src', $(icon_tag).data('default'));
}
}
});
}
/**
* [submit-ajax 公共数据ajax操作]