Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dd7e6d7a
authored
Jun 26, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
2e447322
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
26 deletions
Application/Common/Conf/config_url.php
Application/Home/View/GoodManage/uploadsingle.html
Application/Home/View/public/navleft.html
dist/js/goodmanage/index.js
dist/js/goodmanage/uploadsingle.js
Application/Common/Conf/config_url.php
View file @
dd7e6d7a
...
...
@@ -14,17 +14,36 @@ return array(
//非必须登录
//登录、注册、找回密码、登录状态、绑定第三方账户
'authapi'
=>
'http://authapi.icsales.cc'
,
//非必须登录
//询价中心、后台首页(部分接口)、抢单专区、后台搜索、前台搜索
'soapi'
=>
'http://soapi.icsales.cc'
,
//必须登录
//必须登录
//登录会员信息、会员认证(包含但不限于新增认证、认证列表)、积分、账户设置、站内消息通知
'userapi'
=>
'http://userapi.icsales.cc'
,
//非必须登录:商详
//必须登录:我的商品列表、编辑、新增、删除、下架、上架、批量上传、商品数量统计、批量上传任务状态
'goodsapi'
=>
'http://goodsapi.icsales.cc'
,
//必须登录:我的询价列表、询价下架and上架、询价详情、询价数量统计、发布询价 报价列表、报价详情(询报价相关)、报价数量统计、发布报价
'inquiryapi'
=>
'http://inquiryapi.icsales.cc'
'inquiryapi'
=>
'http://inquiryapi.icsales.cc'
,
//首页
'indexicsales'
=>
'http://www.icsales.cc'
,
//登录、注册 、绑定第三方账户、找回密码、注册成功
'passporticsales'
=>
'http://passport.icsales.cc'
,
//商品搜索、询价搜索
'searchicsales'
=>
'http://search.icsales.cc'
,
//业务助手后台
'homeicsales'
=>
'http://home.icsales.cc'
,
//商详页(预留,原型暂时没有看到这个页面)
'itemicsales'
=>
'http://item.icsales.cc'
),
'URL_MAP_RULES'
=>
array
(
//静态路由
...
...
Application/Home/View/GoodManage/uploadsingle.html
View file @
dd7e6d7a
...
...
@@ -49,16 +49,16 @@
<div
class=
"num input_div "
>
<span
class=
"input_title lineBlock"
>
*库存:
</span>
<div
class=
"input_parent"
>
<input
type=
"text"
name=
"stock"
placeholder=
"请输入需求数量"
class=
"input boxsiz"
lay-verify=
"required"
>
<input
type=
"text"
name=
"stock"
placeholder=
"请输入需求数量"
class=
"input boxsiz"
lay-verify=
"required
|number
"
>
</div>
</div>
<div
class=
"price input_div "
>
<span
class=
"input_title lineBlock"
>
*单价:
</span>
<div
class=
"input_parent"
>
<input
type=
"text"
name=
"price"
placeholder=
"请输入接受价格"
class=
"input boxsiz price_input"
lay-verify=
"required"
>
<input
type=
"text"
name=
"price"
placeholder=
"请输入接受价格"
class=
"input boxsiz price_input"
lay-verify=
"required
|number
"
>
<div
class=
"rmb layui-form"
>
<select
name=
"c
it
y"
lay-verify=
"required"
>
<option
value=
"1"
>
RMB
</option>
<select
name=
"c
urrenc
y"
lay-verify=
"required"
>
<option
value=
"1"
>
CNY
</option>
<option
value=
"2"
>
USD
</option>
</select>
</div>
...
...
Application/Home/View/public/navleft.html
View file @
dd7e6d7a
...
...
@@ -12,7 +12,7 @@
<div
class=
"nav_left_content"
>
<ul
class=
"content_ul"
>
<li
class=
"content_ul_li <if condition="
(
ACTION_NAME
eq
'
home
')"
>
active
</if>
">
<a
href=
"/homes"
class=
"out"
>
<a
href=
"
homeicsales
/homes"
class=
"out"
>
<span
class=
"li_icon icon iconfont iconjuxing4"
></span>
<span
class=
"li_title"
>
首页
</span>
</a>
...
...
@@ -24,42 +24,42 @@
<span
class=
"li_right icon iconfont"
>
</a>
<dl
<
if
condition=
"(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail') || (ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')"
>
style="display:block"
</if>
>
<dd
<
if
condition=
"(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail')"
>
class="active"
</if>
>
<a
href=
"/inquiry"
>
我的询价
</a></dd>
<dd
<
if
condition=
"(ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')"
>
class="active"
</if>
>
<a
href=
"/quote"
>
我的报价
</a></dd>
<dd
<
if
condition=
"(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail')"
>
class="active"
</if>
>
<a
href=
"
homeicsales
/inquiry"
>
我的询价
</a></dd>
<dd
<
if
condition=
"(ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')"
>
class="active"
</if>
>
<a
href=
"
homeicsales
/quote"
>
我的报价
</a></dd>
</dl>
</li>
<li
class=
"content_ul_li <if condition="
(
ACTION_NAME
eq
'
roborder
')"
>
active
</if>
">
<a
href=
"/roborder"
class=
"out"
>
<a
href=
"
homeicsales
/roborder"
class=
"out"
>
<span
class=
"li_icon icon iconfont iconjuxing6"
></span>
<span
class=
"li_title"
>
抢单专区
</span>
</a>
</li>
<li
class=
"content_ul_li <if condition="
(
ACTION_NAME
eq
'
chat
')"
>
active
</if>
">
<a
href=
"/chat"
class=
"out"
>
<a
href=
"
homeicsales
/chat"
class=
"out"
>
<span
class=
"li_icon icon iconfont iconjuxing7"
></span>
<span
class=
"li_title"
>
在线沟通
</span>
</a>
</li>
<li
class=
"content_ul_li <if condition="
(
ACTION_NAME
eq
'
goodmanage
')
||
(
ACTION_NAME
eq
'
uploadsingle
')
||
(
ACTION_NAME
eq
'
bulkupload
')
||
(
ACTION_NAME
eq
'
gooddetail
')
||
(
ACTION_NAME
eq
'
uploadresult
')"
>
active
</if>
">
<a
href=
"/goodmanage"
class=
"out"
>
<a
href=
"
homeicsales
/goodmanage"
class=
"out"
>
<span
class=
"li_icon icon iconfont iconjuxing8"
></span>
<span
class=
"li_title"
>
商品管理
</span>
</a>
</li>
<li
class=
"content_ul_li <if condition="
(
ACTION_NAME
eq
'
integral
')"
>
active
</if>
">
<a
href=
"/integral"
class=
"out"
>
<a
href=
"
homeicsales
/integral"
class=
"out"
>
<span
class=
"li_icon icon iconfont iconjuxing9"
></span>
<span
class=
"li_title"
>
积分管理
</span>
</a>
</li>
<li
class=
"content_ul_li <if condition="
(
ACTION_NAME
eq
'
certification
')"
>
active
</if>
">
<a
href=
"/cert"
class=
"out"
>
<a
href=
"
homeicsales
/cert"
class=
"out"
>
<span
class=
"li_icon icon iconfont iconjuxing10"
></span>
<span
class=
"li_title"
>
认证管理
</span>
</a>
</li>
<li
class=
"content_ul_li <if condition="
(
ACTION_NAME
eq
'
account
')"
>
active
</if>
">
<a
href=
"/account"
class=
"out"
>
<a
href=
"
homeicsales
/account"
class=
"out"
>
<span
class=
"li_icon icon iconfont iconjuxing11"
></span>
<span
class=
"li_title"
>
账户设置
</span>
</a>
...
...
dist/js/goodmanage/index.js
View file @
dd7e6d7a
!
function
()
{
window
.
GoodManage
=
{
window
.
GoodManage
Controller
=
{
init
:
function
()
{
this
.
created
(
this
).
mounted
(
this
).
listData
(
this
,
{
offset
:
10
,
p
:
1
},
1
).
handleBind
(
this
);
this
.
created
(
this
).
mounted
(
this
).
render
(
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'
...
...
@@ -18,25 +20,34 @@
},
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
)
{
render
:
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'
,
...
...
@@ -44,22 +55,30 @@
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
);
});
}
});
...
...
@@ -70,6 +89,7 @@
//搜索
layui
.
form
.
on
(
'submit(search)'
,
function
(
data
)
{
IcController
.
getData
(
apis
.
goodsSearch
,
'POST'
,
data
.
field
,
function
(
res
)
{
});
...
...
@@ -79,6 +99,6 @@
return
this
;
},
},
$
(
function
()
{
GoodManage
.
init
();
GoodManage
Controller
.
init
();
})
}();
\ No newline at end of file
dist/js/goodmanage/uploadsingle.js
View file @
dd7e6d7a
!
function
()
{
window
.
UploadSingle
=
{
window
.
UploadSingle
Controller
=
{
isClick
:
false
,
init
:
function
()
{
this
.
created
(
this
).
mounted
(
this
).
handleBind
(
this
);
},
created
:
function
(
opt
)
{
return
this
;
},
mounted
:
function
(
opt
,
params
,
curr
)
{
mounted
:
function
(
opt
)
{
return
this
;
...
...
@@ -16,40 +17,63 @@
//货期选择
layui
.
form
.
on
(
'radio(delivery)'
,
function
(
data
)
{
var
val
=
1
;
if
(
data
.
value
==
'期货'
)
{
val
=
1
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
;
}
});
}
...
...
@@ -57,6 +81,6 @@
return
this
;
},
},
$
(
function
()
{
UploadSingle
.
init
();
UploadSingle
Controller
.
init
();
})
}();
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment