切换导航条
此项目
正在载入...
登录
郭盛
/
community
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
刘朕
5 years ago
提交
595f6870a0cf65f4eb0399f1a19aa608878eca20
2 个父辈
19417cfd
3a514535
1 个管道 的构建
通过
耗费 0 秒
合并分支 'liuzhen' 到 'master'
Liuzhen 查看合并请求
!50
变更
21
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
21 个修改的文件
包含
722 行增加
和
69 行删除
.gitignore
addons/qiniu/config.php
application/admin/controller/store/StoreInform.php
application/admin/lang/zh-cn/store/store_inform.php
application/admin/model/Store.php
application/admin/model/store/StoreInform.php
application/admin/validate/store/StoreInform.php
application/admin/view/litestoregoods/add.html
application/admin/view/litestoregoods/edit.html
application/admin/view/litestoregoods/index.html
application/admin/view/store/store_inform/add.html
application/admin/view/store/store_inform/edit.html
application/admin/view/store/store_inform/index.html
application/api/controller/Goods.php
application/api/controller/Store.php
application/api/model/LitestoreGoods.php
application/extra/site.php
application/index/controller/Ajax.php
public/api.html
public/assets/js/backend/litestoregoods.js
public/assets/js/backend/store/store_inform.js
.gitignore
查看文件 @
595f687
/runtime/*
/public/uploads/*
/public/api.html
.idea
*.log
*.css.map
...
...
addons/qiniu/config.php
查看文件 @
595f687
...
...
@@ -9,7 +9,7 @@ return array (
'content'
=>
array
(
),
'value'
=>
'
VtPQ3I4f_L39nE-15QoxLSaRXZnN-tf02WOci4S0
'
,
'value'
=>
'
drQGgFF_trxaC7ECJb3cOgJxeAQE9r-MqMGAJ4ZH
'
,
'rule'
=>
'required'
,
'msg'
=>
''
,
'tip'
=>
'请在个人中心 > 密钥管理中获取 > AK'
,
...
...
@@ -24,7 +24,7 @@ return array (
'content'
=>
array
(
),
'value'
=>
'
p1Lj4scI7pQBmJFe_KOSiGYOLH1AJbvAzOSRr_qf
'
,
'value'
=>
'
xXbhOHTMniaU_6JgRf4q69gHH-B2ZLaznsSjuzks
'
,
'rule'
=>
'required'
,
'msg'
=>
''
,
'tip'
=>
'请在个人中心 > 密钥管理中获取 > SK'
,
...
...
@@ -39,7 +39,7 @@ return array (
'content'
=>
array
(
),
'value'
=>
'c
aiyunpan
'
,
'value'
=>
'c
ommunity-use
'
,
'rule'
=>
'required'
,
'msg'
=>
''
,
'tip'
=>
'存储空间名称'
,
...
...
@@ -59,7 +59,7 @@ return array (
'https://upload-na0.qiniup.com'
=>
'北美 https://upload-na0.qiniup.com'
,
'https://upload-as0.qiniup.com'
=>
'东南亚 https://upload-as0.qiniup.com'
,
),
'value'
=>
'https://upload-z
0
.qiniup.com'
,
'value'
=>
'https://upload-z
2
.qiniup.com'
,
'rule'
=>
'required'
,
'msg'
=>
''
,
'tip'
=>
'推荐选择最近的地址'
,
...
...
@@ -74,7 +74,7 @@ return array (
'content'
=>
array
(
),
'value'
=>
'http://c
loud.caiyunpan
.brotop.cn'
,
'value'
=>
'http://c
ommunity.qiniu
.brotop.cn'
,
'rule'
=>
'required'
,
'msg'
=>
''
,
'tip'
=>
'未绑定CDN的话可使用七牛分配的测试域名'
,
...
...
application/admin/controller/store/StoreInform.php
0 → 100644
查看文件 @
595f687
<?php
namespace
app\admin\controller\store
;
use
app\common\controller\Backend
;
/**
* 商家发布信息管理
*
* @icon fa fa-circle-o
*/
class
StoreInform
extends
Backend
{
/**
* StoreInform模型对象
* @var \app\admin\model\store\StoreInform
*/
protected
$model
=
null
;
public
function
_initialize
()
{
parent
::
_initialize
();
$this
->
model
=
new
\app\admin\model\store\StoreInform
;
$this
->
view
->
assign
(
"typeList"
,
$this
->
model
->
getTypeList
());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public
function
index
()
{
//当前是否为关联查询
$this
->
relationSearch
=
true
;
//设置过滤方法
$this
->
request
->
filter
([
'strip_tags'
,
'trim'
]);
if
(
$this
->
request
->
isAjax
())
{
//如果发送的来源是Selectpage,则转发到Selectpage
if
(
$this
->
request
->
request
(
'keyField'
))
{
return
$this
->
selectpage
();
}
list
(
$where
,
$sort
,
$order
,
$offset
,
$limit
)
=
$this
->
buildparams
();
$total
=
$this
->
model
->
with
([
'store'
])
->
where
(
$where
)
->
order
(
$sort
,
$order
)
->
count
();
$list
=
$this
->
model
->
with
([
'store'
])
->
where
(
$where
)
->
order
(
$sort
,
$order
)
->
limit
(
$offset
,
$limit
)
->
select
();
foreach
(
$list
as
$row
)
{
$row
->
getRelation
(
'store'
)
->
visible
([
'store_name'
]);
}
$list
=
collection
(
$list
)
->
toArray
();
$result
=
array
(
"total"
=>
$total
,
"rows"
=>
$list
);
return
json
(
$result
);
}
return
$this
->
view
->
fetch
();
}
}
...
...
application/admin/lang/zh-cn/store/store_inform.php
0 → 100644
查看文件 @
595f687
<?php
return
[
'User_id'
=>
'用户id'
,
'Store_id'
=>
'商家id'
,
'Content'
=>
'详细内容'
,
'Images'
=>
'图片'
,
'House_ids'
=>
'推广社区'
,
'Type'
=>
'推广类型'
,
'Type 1'
=>
'红包推送信息'
,
'Type 2'
=>
'一般信息'
,
'Score'
=>
'发布所用积分'
,
'Red_package'
=>
'红包总金额'
,
'Number'
=>
'红包数量'
,
'Single'
=>
'单个红包金额'
,
'Get'
=>
'已领取数量'
,
'Surplus'
=>
'剩余数量'
,
'Views'
=>
'浏览量'
,
'Createtime'
=>
'生成时间'
,
'Updatetime'
=>
'更新时间'
,
'Store.store_name'
=>
'店铺名称'
];
...
...
application/admin/model/Store.php
0 → 100644
查看文件 @
595f687
<?php
namespace
app\admin\model\store
;
use
think\Model
;
class
Store
extends
Model
{
// 表名
protected
$name
=
'store'
;
}
...
...
application/admin/model/store/StoreInform.php
0 → 100644
查看文件 @
595f687
<?php
namespace
app\admin\model\store
;
use
think\Model
;
class
StoreInform
extends
Model
{
// 表名
protected
$name
=
'store_inform'
;
// 自动写入时间戳字段
protected
$autoWriteTimestamp
=
'int'
;
// 定义时间戳字段名
protected
$createTime
=
'createtime'
;
protected
$updateTime
=
'updatetime'
;
protected
$deleteTime
=
false
;
// 追加属性
protected
$append
=
[
'type_text'
];
public
function
getTypeList
()
{
return
[
'1'
=>
__
(
'Type 1'
),
'2'
=>
__
(
'Type 2'
)];
}
public
function
getTypeTextAttr
(
$value
,
$data
)
{
$value
=
$value
?
$value
:
(
isset
(
$data
[
'type'
])
?
$data
[
'type'
]
:
''
);
$list
=
$this
->
getTypeList
();
return
isset
(
$list
[
$value
])
?
$list
[
$value
]
:
''
;
}
public
function
store
()
{
return
$this
->
belongsTo
(
'app\admin\model\Store'
,
'store_id'
,
'id'
,
[],
'LEFT'
)
->
setEagerlyType
(
0
);
}
}
...
...
application/admin/validate/store/StoreInform.php
0 → 100644
查看文件 @
595f687
<?php
namespace
app\admin\validate\store
;
use
think\Validate
;
class
StoreInform
extends
Validate
{
/**
* 验证规则
*/
protected
$rule
=
[
];
/**
* 提示消息
*/
protected
$message
=
[
];
/**
* 验证场景
*/
protected
$scene
=
[
'add'
=>
[],
'edit'
=>
[],
];
}
...
...
application/admin/view/litestoregoods/add.html
查看文件 @
595f687
...
...
@@ -21,12 +21,12 @@
<input
id=
"c-goods_name"
data-rule=
"required"
class=
"form-control form-control"
name=
"row[goods_name]"
type=
"text"
value=
""
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Category_id')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-category_id"
data-rule=
"required"
data-source=
"litestorecategory/selectpage"
class=
"form-control selectpage form-control"
name=
"row[category_id]"
type=
"text"
value=
""
>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-category_id" data-rule="required" data-source="litestorecategory/selectpage" class="form-control selectpage form-control" name="row[category_id]" type="text" value="">-->
<!-- </div>-->
<!-- </div>-->
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Images')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
...
...
@@ -146,27 +146,27 @@
<input
id=
"c-stock_num"
class=
"form-control form-control"
name=
"spec[stock_num]"
type=
"number"
value=
"100"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
商品重量(Kg):
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-goods_weight"
class=
"form-control form-control"
name=
"spec[goods_weight]"
type=
"number"
value=
"1"
>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">商品重量(Kg):</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-goods_weight" class="form-control form-control" name="spec[goods_weight]" type="number" value="1">-->
<!-- </div>-->
<!-- </div>-->
</div>
<!-- 商品规格属性 end -->
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Deduct_stock_type')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<select
id=
"c-deduct_stock_type"
data-rule=
"required"
class=
"form-control selectpicker"
name=
"row[deduct_stock_type]"
>
{foreach name="deductStockTypeList" item="vo"}
<option
value=
"{$key}"
{
in
name=
"key"
value=
"20"
}
selected
{/
in
}
>
{$vo}
</option>
{/foreach}
</select>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Deduct_stock_type')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- -->
<!-- <select id="c-deduct_stock_type" data-rule="required" class="form-control selectpicker" name="row[deduct_stock_type]">-->
<!-- {foreach name="deductStockTypeList" item="vo"}-->
<!-- <option value="{$key}" {in name="key" value="20"}selected{/in}>{$vo}</option>-->
<!-- {/foreach}-->
<!-- </select>-->
</div>
</div>
<!-- </div>-->
<!-- </div>-->
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Content')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
...
...
application/admin/view/litestoregoods/edit.html
查看文件 @
595f687
...
...
@@ -18,12 +18,12 @@
<input
id=
"c-goods_name"
data-rule=
"required"
class=
"form-control form-control"
name=
"row[goods_name]"
type=
"text"
value=
"{$row.goods_name}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Category_id')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-category_id"
data-rule=
"required"
data-source=
"litestorecategory/selectpage"
class=
"form-control selectpage form-control"
name=
"row[category_id]"
type=
"text"
value=
"{$row.category_id}"
>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-category_id" data-rule="required" data-source="litestorecategory/selectpage" class="form-control selectpage form-control" name="row[category_id]" type="text" value="{$row.category_id}">-->
<!-- </div>-->
<!-- </div>-->
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Images')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
...
...
@@ -143,27 +143,27 @@
<input
id=
"c-stock_num"
class=
"form-control form-control"
name=
"spec[stock_num]"
type=
"number"
value=
"{$row.spec.0.stock_num}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
商品重量(Kg):
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-goods_weight"
class=
"form-control form-control"
name=
"spec[goods_weight]"
type=
"number"
value=
"{$row.spec.0.goods_weight}"
>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">商品重量(Kg):</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-goods_weight" class="form-control form-control" name="spec[goods_weight]" type="number" value="{$row.spec.0.goods_weight}">-->
<!-- </div>-->
<!-- </div>-->
</div>
<!-- 商品规格属性 end -->
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Deduct_stock_type')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<select
id=
"c-deduct_stock_type"
data-rule=
"required"
class=
"form-control selectpicker"
name=
"row[deduct_stock_type]"
>
{foreach name="deductStockTypeList" item="vo"}
<option
value=
"{$key}"
{
in
name=
"key"
value=
"$row.deduct_stock_type"
}
selected
{/
in
}
>
{$vo}
</option>
{/foreach}
</select>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Deduct_stock_type')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- -->
<!-- <select id="c-deduct_stock_type" data-rule="required" class="form-control selectpicker" name="row[deduct_stock_type]">-->
<!-- {foreach name="deductStockTypeList" item="vo"}-->
<!-- <option value="{$key}" {in name="key" value="$row.deduct_stock_type"}selected{/in}>{$vo}</option>-->
<!-- {/foreach}-->
<!-- </select>-->
</div>
</div>
<!-- </div>-->
<!-- </div>-->
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Content')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
...
...
application/admin/view/litestoregoods/index.html
查看文件 @
595f687
...
...
@@ -10,15 +10,15 @@
<a
href=
"javascript:;"
class=
"btn btn-success btn-add {:$auth->check('litestoregoods/add')?'':'hide'}"
title=
"{:__('Add')}"
><i
class=
"fa fa-plus"
></i>
{:__('Add')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-success btn-edit btn-disabled disabled {:$auth->check('litestoregoods/edit')?'':'hide'}"
title=
"{:__('Edit')}"
><i
class=
"fa fa-pencil"
></i>
{:__('Edit')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-danger btn-del btn-disabled disabled {:$auth->check('litestoregoods/del')?'':'hide'}"
title=
"{:__('Delete')}"
><i
class=
"fa fa-trash"
></i>
{:__('Delete')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-danger btn-import {:$auth->check('litestoregoods/import')?'':'hide'}"
title=
"{:__('Import')}"
id=
"btn-import-file"
data-url=
"ajax/upload"
data-mimetype=
"csv,xls,xlsx"
data-multiple=
"false"
><i
class=
"fa fa-upload"
></i>
{:__('Import')}
</a
>
<!-- <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('litestoregoods/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>--
>
<div
class=
"dropdown btn-group {:$auth->check('litestoregoods/multi')?'':'hide'}"
>
<a
class=
"btn btn-primary btn-more dropdown-toggle btn-disabled disabled"
data-toggle=
"dropdown"
><i
class=
"fa fa-cog"
></i>
{:__('More')}
</a>
<ul
class=
"dropdown-menu text-left"
role=
"menu"
>
<li><a
class=
"btn btn-link btn-multi btn-disabled disabled"
href=
"javascript:;"
data-params=
"status=normal"
><i
class=
"fa fa-eye"
></i>
{:__('Set to normal')}
</a></li>
<li><a
class=
"btn btn-link btn-multi btn-disabled disabled"
href=
"javascript:;"
data-params=
"status=hidden"
><i
class=
"fa fa-eye-slash"
></i>
{:__('Set to hidden')}
</a></li>
</ul>
</div>
<!-- <div class="dropdown btn-group {:$auth->check('litestoregoods/multi')?'':'hide'}">-->
<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<!-- <ul class="dropdown-menu text-left" role="menu">-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
<!-- </ul>-->
<!-- </div>-->
</div>
<table
id=
"table"
class=
"table table-striped table-bordered table-hover table-nowrap"
data-operate-edit=
"{:$auth->check('litestoregoods/edit')}"
...
...
application/admin/view/store/store_inform/add.html
0 → 100644
查看文件 @
595f687
<form
id=
"add-form"
class=
"form-horizontal"
role=
"form"
data-toggle=
"validator"
method=
"POST"
action=
""
>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('User_id')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-user_id"
data-rule=
"required"
data-source=
"user/user/index"
data-field=
"nickname"
class=
"form-control selectpage"
name=
"row[user_id]"
type=
"text"
value=
""
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Store_id')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-store_id"
data-rule=
"required"
data-source=
"store/index"
class=
"form-control selectpage"
name=
"row[store_id]"
type=
"text"
value=
""
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Content')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-content"
data-rule=
"required"
class=
"form-control"
name=
"row[content]"
type=
"text"
value=
"''"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Images')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"input-group"
>
<input
id=
"c-images"
data-rule=
"required"
class=
"form-control"
size=
"50"
name=
"row[images]"
type=
"textarea"
>
<div
class=
"input-group-addon no-border no-padding"
>
<span><button
type=
"button"
id=
"plupload-images"
class=
"btn btn-danger plupload"
data-input-id=
"c-images"
data-mimetype=
"image/gif,image/jpeg,image/png,image/jpg,image/bmp"
data-multiple=
"true"
data-preview-id=
"p-images"
><i
class=
"fa fa-upload"
></i>
{:__('Upload')}
</button></span>
<span><button
type=
"button"
id=
"fachoose-images"
class=
"btn btn-primary fachoose"
data-input-id=
"c-images"
data-mimetype=
"image/*"
data-multiple=
"true"
><i
class=
"fa fa-list"
></i>
{:__('Choose')}
</button></span>
</div>
<span
class=
"msg-box n-right"
for=
"c-images"
></span>
</div>
<ul
class=
"row list-inline plupload-preview"
id=
"p-images"
></ul>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('House_ids')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-house_ids"
data-rule=
"required"
data-source=
"house/index"
data-multiple=
"true"
class=
"form-control selectpage"
name=
"row[house_ids]"
type=
"text"
value=
""
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Type')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<select
id=
"c-type"
data-rule=
"required"
class=
"form-control selectpicker"
name=
"row[type]"
>
{foreach name="typeList" item="vo"}
<option
value=
"{$key}"
{
in
name=
"key"
value=
"1"
}
selected
{/
in
}
>
{$vo}
</option>
{/foreach}
</select>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Score')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-score"
data-rule=
"required"
class=
"form-control"
name=
"row[score]"
type=
"number"
value=
"0"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Red_package')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-red_package"
class=
"form-control"
name=
"row[red_package]"
type=
"number"
value=
"0"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Number')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-number"
class=
"form-control"
name=
"row[number]"
type=
"number"
value=
"0"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Single')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-single"
class=
"form-control"
name=
"row[single]"
type=
"number"
value=
"0"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Get')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-get"
class=
"form-control"
name=
"row[get]"
type=
"number"
value=
"0"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Surplus')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-surplus"
class=
"form-control"
name=
"row[surplus]"
type=
"number"
value=
"0"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Views')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-views"
class=
"form-control"
name=
"row[views]"
type=
"number"
value=
"0"
>
</div>
</div>
<div
class=
"form-group layer-footer"
>
<label
class=
"control-label col-xs-12 col-sm-2"
></label>
<div
class=
"col-xs-12 col-sm-8"
>
<button
type=
"submit"
class=
"btn btn-success btn-embossed disabled"
>
{:__('OK')}
</button>
<button
type=
"reset"
class=
"btn btn-default btn-embossed"
>
{:__('Reset')}
</button>
</div>
</div>
</form>
...
...
application/admin/view/store/store_inform/edit.html
0 → 100644
查看文件 @
595f687
<form
id=
"edit-form"
class=
"form-horizontal"
role=
"form"
data-toggle=
"validator"
method=
"POST"
action=
""
>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('User_id')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-user_id"
data-rule=
"required"
data-source=
"user/user/index"
data-field=
"nickname"
class=
"form-control selectpage"
name=
"row[user_id]"
type=
"text"
value=
"{$row.user_id|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Store_id')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-store_id"
data-rule=
"required"
data-source=
"store/index"
class=
"form-control selectpage"
name=
"row[store_id]"
type=
"text"
value=
"{$row.store_id|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Content')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-content"
data-rule=
"required"
class=
"form-control"
name=
"row[content]"
type=
"text"
value=
"{$row.content|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Images')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"input-group"
>
<input
id=
"c-images"
data-rule=
"required"
class=
"form-control"
size=
"50"
name=
"row[images]"
type=
"textarea"
value=
"{$row.images|htmlentities}"
>
<div
class=
"input-group-addon no-border no-padding"
>
<span><button
type=
"button"
id=
"plupload-images"
class=
"btn btn-danger plupload"
data-input-id=
"c-images"
data-mimetype=
"image/gif,image/jpeg,image/png,image/jpg,image/bmp"
data-multiple=
"true"
data-preview-id=
"p-images"
><i
class=
"fa fa-upload"
></i>
{:__('Upload')}
</button></span>
<span><button
type=
"button"
id=
"fachoose-images"
class=
"btn btn-primary fachoose"
data-input-id=
"c-images"
data-mimetype=
"image/*"
data-multiple=
"true"
><i
class=
"fa fa-list"
></i>
{:__('Choose')}
</button></span>
</div>
<span
class=
"msg-box n-right"
for=
"c-images"
></span>
</div>
<ul
class=
"row list-inline plupload-preview"
id=
"p-images"
></ul>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('House_ids')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-house_ids"
data-rule=
"required"
data-source=
"house/index"
data-multiple=
"true"
class=
"form-control selectpage"
name=
"row[house_ids]"
type=
"text"
value=
"{$row.house_ids|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Type')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<select
id=
"c-type"
data-rule=
"required"
class=
"form-control selectpicker"
name=
"row[type]"
>
{foreach name="typeList" item="vo"}
<option
value=
"{$key}"
{
in
name=
"key"
value=
"$row.type"
}
selected
{/
in
}
>
{$vo}
</option>
{/foreach}
</select>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Score')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-score"
data-rule=
"required"
class=
"form-control"
name=
"row[score]"
type=
"number"
value=
"{$row.score|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Red_package')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-red_package"
class=
"form-control"
name=
"row[red_package]"
type=
"number"
value=
"{$row.red_package|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Number')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-number"
class=
"form-control"
name=
"row[number]"
type=
"number"
value=
"{$row.number|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Single')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-single"
class=
"form-control"
name=
"row[single]"
type=
"number"
value=
"{$row.single|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Get')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-get"
class=
"form-control"
name=
"row[get]"
type=
"number"
value=
"{$row.get|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Surplus')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-surplus"
class=
"form-control"
name=
"row[surplus]"
type=
"number"
value=
"{$row.surplus|htmlentities}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Views')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-views"
class=
"form-control"
name=
"row[views]"
type=
"number"
value=
"{$row.views|htmlentities}"
>
</div>
</div>
<div
class=
"form-group layer-footer"
>
<label
class=
"control-label col-xs-12 col-sm-2"
></label>
<div
class=
"col-xs-12 col-sm-8"
>
<button
type=
"submit"
class=
"btn btn-success btn-embossed disabled"
>
{:__('OK')}
</button>
<button
type=
"reset"
class=
"btn btn-default btn-embossed"
>
{:__('Reset')}
</button>
</div>
</div>
</form>
...
...
application/admin/view/store/store_inform/index.html
0 → 100644
查看文件 @
595f687
<div
class=
"panel panel-default panel-intro"
>
{:build_heading()}
<div
class=
"panel-body"
>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade active in"
id=
"one"
>
<div
class=
"widget-body no-padding"
>
<div
id=
"toolbar"
class=
"toolbar"
>
<a
href=
"javascript:;"
class=
"btn btn-primary btn-refresh"
title=
"{:__('Refresh')}"
><i
class=
"fa fa-refresh"
></i>
</a>
<a
href=
"javascript:;"
class=
"btn btn-success btn-add {:$auth->check('store/store_inform/add')?'':'hide'}"
title=
"{:__('Add')}"
><i
class=
"fa fa-plus"
></i>
{:__('Add')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-success btn-edit btn-disabled disabled {:$auth->check('store/store_inform/edit')?'':'hide'}"
title=
"{:__('Edit')}"
><i
class=
"fa fa-pencil"
></i>
{:__('Edit')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-danger btn-del btn-disabled disabled {:$auth->check('store/store_inform/del')?'':'hide'}"
title=
"{:__('Delete')}"
><i
class=
"fa fa-trash"
></i>
{:__('Delete')}
</a>
<a
href=
"javascript:;"
class=
"btn btn-danger btn-import {:$auth->check('store/store_inform/import')?'':'hide'}"
title=
"{:__('Import')}"
id=
"btn-import-file"
data-url=
"ajax/upload"
data-mimetype=
"csv,xls,xlsx"
data-multiple=
"false"
><i
class=
"fa fa-upload"
></i>
{:__('Import')}
</a>
<div
class=
"dropdown btn-group {:$auth->check('store/store_inform/multi')?'':'hide'}"
>
<a
class=
"btn btn-primary btn-more dropdown-toggle btn-disabled disabled"
data-toggle=
"dropdown"
><i
class=
"fa fa-cog"
></i>
{:__('More')}
</a>
<ul
class=
"dropdown-menu text-left"
role=
"menu"
>
<li><a
class=
"btn btn-link btn-multi btn-disabled disabled"
href=
"javascript:;"
data-params=
"status=normal"
><i
class=
"fa fa-eye"
></i>
{:__('Set to normal')}
</a></li>
<li><a
class=
"btn btn-link btn-multi btn-disabled disabled"
href=
"javascript:;"
data-params=
"status=hidden"
><i
class=
"fa fa-eye-slash"
></i>
{:__('Set to hidden')}
</a></li>
</ul>
</div>
</div>
<table
id=
"table"
class=
"table table-striped table-bordered table-hover table-nowrap"
data-operate-edit=
"{:$auth->check('store/store_inform/edit')}"
data-operate-del=
"{:$auth->check('store/store_inform/del')}"
width=
"100%"
>
</table>
</div>
</div>
</div>
</div>
</div>
...
...
application/api/controller/Goods.php
查看文件 @
595f687
...
...
@@ -134,7 +134,7 @@ class Goods extends Api
$param
=
(
new
GoodsValidate
())
->
goCheck
(
'common'
);
$page
=
$param
[
'page'
];
$field
=
'*'
;
$order
=
'createtime'
;
$order
=
[
'goods_sort'
=>
'DESC'
,
'createtime'
=>
'DESC'
]
;
$basic_where
=
[
'goods_status'
=>
'10'
,
'is_delete'
=>
'0'
...
...
application/api/controller/Store.php
查看文件 @
595f687
...
...
@@ -80,6 +80,62 @@ class Store extends Api
}
/**
* 提现规则
* @ApiWeigh (89)
*
* @ApiTitle (提现规则)
* @ApiSummary (提现规则)
* @ApiMethod (POST)
* @ApiRoute (/api/store/withdraw_rule)
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功',
"data": {
"withdraw_rule": 入驻协议,
}
})
*/
public
function
withdraw_rule
()
{
if
(
$this
->
request
->
isPost
()){
$return
=
[
'withdraw_rule'
=>
config
(
'site.withdraw_rule'
)
];
$this
->
success
(
'成功'
,
$return
);
}
}
/**
* 商家余额
* @ApiWeigh (88)
*
* @ApiTitle (商家余额)
* @ApiSummary (商家余额)
* @ApiMethod (POST)
* @ApiRoute (/api/store/money)
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功',
"data": {
"money": 入驻协议,
}
})
*/
public
function
money
()
{
if
(
$this
->
request
->
isPost
()){
$return
=
[
'money'
=>
$this
->
auth
->
score
/
config
(
'site.withdraw_percent'
)
];
$this
->
success
(
'成功'
,
$return
);
}
}
/**
* 行业列表
* @ApiWeigh (80)
*
...
...
@@ -333,6 +389,53 @@ class Store extends Api
}
/**
* 店铺信息
* @ApiWeigh (36)
*
* @ApiTitle (店铺信息)
* @ApiSummary (店铺信息)
* @ApiMethod (POST)
* @ApiRoute (/api/store/store_center)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
'code':'1',
'msg':'返回成功',
"data": {
"store": {
"id": 1,
"user_id": 1,
"store_name": "123",
"mobile": "13911111111",
"store_icon": "http://cloud.caiyunpan.brotop.cn/assets/img/qrcode.png",
"province": "213",
"city": "2123",
"region": "123123",
"images": "/assets/img/qrcode.png,/assets/img/qrcode.png",
"content": "测试店铺详情",
"user_info": {
"id": 1,
"username": "admin"
},
"image_arr": [
"http://cloud.caiyunpan.brotop.cn/assets/img/qrcode.png",
"http://cloud.caiyunpan.brotop.cn/assets/img/qrcode.png"
]
}
}
})
*/
public
function
store_center
()
{
$store
=
$this
->
get_store
();
$return
=
[
'store'
=>
$store
];
$this
->
success
(
'成功'
,
$return
);
}
/**
* 店铺信息更新
* @ApiWeigh (35)
*
...
...
@@ -487,7 +590,7 @@ class Store extends Api
'out_trade_no'
=>
$order_sn
,
'total_fee'
=>
1
,
// $param['money'] * 100
'spbill_create_ip'
=>
request
()
->
ip
(),
// 可选,如不传该参数,SDK 将会自动获取相应 IP 地址
'notify_url'
=>
url
(
'index/ajax/notify'
,[],
true
,
true
),
// 支付结果通知网址,如果不设置则会使用配置里的默认地址
'notify_url'
=>
url
(
'index/ajax/
store_order_
notify'
,[],
true
,
true
),
// 支付结果通知网址,如果不设置则会使用配置里的默认地址
'openid'
=>
Db
::
name
(
'third'
)
->
where
(
'user_id'
,
$this
->
auth
->
id
)
->
value
(
'openid'
),
];
$order
=
new
Order
(
$attributes
);
...
...
@@ -554,7 +657,7 @@ class Store extends Api
$store
=
$this
->
get_store
();
$page
=
$param
[
'page'
];
$where
=
[
'where'
=>
[
'store_id'
=>
$store
[
'id'
]],
'where'
=>
[
'store_id'
=>
$store
[
'id'
]
,
'type'
=>
1
],
'with'
=>
[
'user_info'
]
];
$order
=
[
'createtime'
=>
'DESC'
];
...
...
application/api/model/LitestoreGoods.php
查看文件 @
595f687
...
...
@@ -7,4 +7,5 @@ namespace app\api\model;
class
LitestoreGoods
extends
Base
{
}
\ No newline at end of file
...
...
application/extra/site.php
查看文件 @
595f687
...
...
@@ -39,4 +39,5 @@ return array (
'settled'
=>
'上架入驻协议'
,
'send_score'
=>
'800'
,
'withdraw_percent'
=>
'100'
,
'withdraw_rule'
=>
'提现规则文字内容'
,
);
\ No newline at end of file
...
...
application/index/controller/Ajax.php
查看文件 @
595f687
...
...
@@ -6,8 +6,8 @@ use addons\litestore\model\Litestoreorder;
use
addons\third\model\Third
;
use
addons\wechat\library\Config
as
ConfigService
;
use
app\common\controller\Frontend
;
use
EasyWeChat\Foundation\Application
;
use
EasyWeChat\Foundation\Application
as
WXPAY_APP
;
use
EasyWeChat\Foundation\Application
;
use
think\Db
;
use
think\Lang
;
...
...
@@ -18,7 +18,7 @@ use think\Lang;
class
Ajax
extends
Frontend
{
protected
$noNeedLogin
=
[
'lang'
,
'callback_for_wxgzh'
,
'store_notify'
,
'notify'
,
'refund_notify'
];
protected
$noNeedLogin
=
[
'lang'
,
'callback_for_wxgzh'
,
'store_notify'
,
'
store_order_notify'
,
'
notify'
,
'refund_notify'
];
protected
$noNeedRight
=
[
'*'
];
protected
$layout
=
''
;
public
function
_initialize
()
...
...
@@ -97,6 +97,60 @@ class Ajax extends Frontend
}
/**
* 店铺申请回调
*/
public
function
store_order_notify
()
{
$app
=
new
Application
(
ConfigService
::
load
());
$response
=
$app
->
payment
->
handleNotify
(
function
(
$notify
,
$successful
){
/*这里是支付回调逻辑处理,一下是DEMO*/
// 使用通知里的 "微信支付订单号" 或者 "商户订单号" 去自己的数据库找到订单
$out_trade_no
=
$notify
->
out_trade_no
;
$info
=
Db
::
name
(
'store_order'
)
->
where
([
'order_sn'
=>
$out_trade_no
])
->
find
();
if
(
!
$info
)
{
// 如果订单不存在
return
'Order not exist.'
;
// 告诉微信,我已经处理完了,订单没找到,别再通知我了
}
// 检查订单是否已经更新过支付状态
if
(
$info
[
'transaction_id'
])
{
// 假设订单字段“支付时间”不为空代表已经支付
return
true
;
// 已经支付成功了就不再更新了
}
$store
=
Db
::
name
(
'store'
)
->
where
(
'id'
,
$info
[
'store_id'
])
->
find
();
// 用户是否支付成功
if
(
$successful
)
{
Db
::
startTrans
();
// 回填微信的订单号
$update
[
'transaction_id'
]
=
$notify
->
transaction_id
;
$update
[
'status'
]
=
2
;
//付款成功
$update
[
'pay_time'
]
=
time
();
//更新状态: 已购买
$res_order
=
Db
::
name
(
'store_order'
)
->
where
([
'id'
=>
$info
[
'id'
]])
->
update
(
$update
);
// 新增关联社区
$update
=
[
'house_ids'
=>
$store
[
'house_ids'
]
.
','
.
$info
[
'house_ids'
]
];
$res_store
=
Db
::
name
(
'store'
)
->
where
(
'id'
,
$info
[
'store_id'
])
->
update
(
$update
);
if
(
!
$res_order
||
!
$res_store
)
{
Db
::
rollback
();
return
false
;
// 返回处理完成
}
Db
::
commit
();
}
else
{
// 用户支付失败
$update
[
'transaction_id'
]
=
$notify
->
transaction_id
;
$update
[
'status'
]
=
6
;
//异常-支付失败
Db
::
name
(
'deposit_order'
)
->
where
([
'id'
=>
$info
[
'id'
]])
->
update
(
$update
);
return
false
;
// 返回处理完成
}
return
true
;
// 返回处理完成
});
$response
->
send
();
}
/**
* 支付回调
*/
public
function
notify
(){
...
...
public/api.html
已删除
100644 → 0
查看文件 @
19417cf
此 diff 太大无法显示。
public/assets/js/backend/litestoregoods.js
查看文件 @
595f687
...
...
@@ -27,16 +27,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','template','litestoreg
{
checkbox
:
true
},
{
field
:
'goods_id'
,
title
:
__
(
'Goods_id'
)},
{
field
:
'goods_name'
,
title
:
__
(
'Goods_name'
)},
{
field
:
'category.name'
,
title
:
__
(
'Category.name'
)},
{
field
:
'category_id'
,
visible
:
false
,
title
:
__
(
'Category_id'
)},
// {field: 'category.name', title: __('Category.name')},
// {field: 'category_id', visible:false,title: __('Category_id')},
{
field
:
'images'
,
title
:
__
(
'Images'
),
formatter
:
Table
.
api
.
formatter
.
images
},
{
field
:
'spec_type'
,
title
:
__
(
'Spec_type'
),
searchList
:
{
"10"
:
__
(
'Spec_type 10'
),
"20"
:
__
(
'Spec_type 20'
)},
formatter
:
Table
.
api
.
formatter
.
normal
},
{
field
:
'deduct_stock_type'
,
title
:
__
(
'Deduct_stock_type'
),
searchList
:
{
"10"
:
__
(
'Deduct_stock_type 10'
),
"20"
:
__
(
'Deduct_stock_type 20'
)},
formatter
:
Table
.
api
.
formatter
.
normal
},
{
field
:
'freight.name'
,
title
:
__
(
'Freight.name'
)},
// {field: 'deduct_stock_type', title: __('Deduct_stock_type'), searchList: {"10":__('Deduct_stock_type 10'),"20":__('Deduct_stock_type 20')}, formatter: Table.api.formatter.normal},
// {field: 'freight.name', title: __('Freight.name')},
{
field
:
'sales_initial'
,
title
:
__
(
'Sales_initial'
)},
{
field
:
'sales_actual'
,
title
:
__
(
'Sales_actual'
)},
{
field
:
'goods_sort'
,
title
:
__
(
'Goods_sort'
)},
{
field
:
'delivery_id'
,
title
:
__
(
'Delivery_id'
)},
//
{field: 'delivery_id', title: __('Delivery_id')},
{
field
:
'goods_status'
,
title
:
__
(
'Goods_status'
),
searchList
:
{
"10"
:
__
(
'Goods_status 10'
),
"20"
:
__
(
'Goods_status 20'
)},
formatter
:
Table
.
api
.
formatter
.
status
},
{
field
:
'is_delete'
,
title
:
__
(
'Is_delete'
),
searchList
:
{
"0"
:
__
(
'Is_delete 0'
),
"1"
:
__
(
'Is_delete 1'
)},
formatter
:
Table
.
api
.
formatter
.
normal
},
{
field
:
'createtime'
,
title
:
__
(
'Createtime'
),
operate
:
'RANGE'
,
addclass
:
'datetimerange'
,
formatter
:
Table
.
api
.
formatter
.
datetime
},
...
...
public/assets/js/backend/store/store_inform.js
0 → 100644
查看文件 @
595f687
define
([
'jquery'
,
'bootstrap'
,
'backend'
,
'table'
,
'form'
],
function
(
$
,
undefined
,
Backend
,
Table
,
Form
)
{
var
Controller
=
{
index
:
function
()
{
// 初始化表格参数配置
Table
.
api
.
init
({
extend
:
{
index_url
:
'store/store_inform/index'
+
location
.
search
,
add_url
:
'store/store_inform/add'
,
edit_url
:
'store/store_inform/edit'
,
del_url
:
'store/store_inform/del'
,
multi_url
:
'store/store_inform/multi'
,
table
:
'store_inform'
,
}
});
var
table
=
$
(
"#table"
);
// 初始化表格
table
.
bootstrapTable
({
url
:
$
.
fn
.
bootstrapTable
.
defaults
.
extend
.
index_url
,
pk
:
'id'
,
sortName
:
'id'
,
columns
:
[
[
{
checkbox
:
true
},
{
field
:
'id'
,
title
:
__
(
'Id'
)},
{
field
:
'user_id'
,
title
:
__
(
'User_id'
)},
{
field
:
'store_id'
,
title
:
__
(
'Store_id'
)},
{
field
:
'content'
,
title
:
__
(
'Content'
)},
{
field
:
'house_ids'
,
title
:
__
(
'House_ids'
)},
{
field
:
'type'
,
title
:
__
(
'Type'
),
searchList
:
{
"1"
:
__
(
'Type 1'
),
"2"
:
__
(
'Type 2'
)},
formatter
:
Table
.
api
.
formatter
.
normal
},
{
field
:
'score'
,
title
:
__
(
'Score'
),
operate
:
'BETWEEN'
},
{
field
:
'red_package'
,
title
:
__
(
'Red_package'
),
operate
:
'BETWEEN'
},
{
field
:
'number'
,
title
:
__
(
'Number'
)},
{
field
:
'single'
,
title
:
__
(
'Single'
),
operate
:
'BETWEEN'
},
{
field
:
'get'
,
title
:
__
(
'Get'
)},
{
field
:
'surplus'
,
title
:
__
(
'Surplus'
)},
{
field
:
'views'
,
title
:
__
(
'Views'
)},
{
field
:
'createtime'
,
title
:
__
(
'Createtime'
),
operate
:
'RANGE'
,
addclass
:
'datetimerange'
,
formatter
:
Table
.
api
.
formatter
.
datetime
},
{
field
:
'updatetime'
,
title
:
__
(
'Updatetime'
),
operate
:
'RANGE'
,
addclass
:
'datetimerange'
,
formatter
:
Table
.
api
.
formatter
.
datetime
},
{
field
:
'store.store_name'
,
title
:
__
(
'Store.store_name'
)},
{
field
:
'operate'
,
title
:
__
(
'Operate'
),
table
:
table
,
events
:
Table
.
api
.
events
.
operate
,
formatter
:
Table
.
api
.
formatter
.
operate
}
]
]
});
// 为表格绑定事件
Table
.
api
.
bindevent
(
table
);
},
add
:
function
()
{
Controller
.
api
.
bindevent
();
},
edit
:
function
()
{
Controller
.
api
.
bindevent
();
},
api
:
{
bindevent
:
function
()
{
Form
.
api
.
bindevent
(
$
(
"form[role=form]"
));
}
}
};
return
Controller
;
});
\ No newline at end of file
...
...
请
注册
或
登录
后发表评论