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
937d315d
authored
Jul 04, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
111
parent
0ff33df4
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
447 additions
and
110 deletions
Application/Home/View/Chat/index.html
Application/Home/View/GoodManage/bulkupload.html
Application/Home/View/Index/index.html
Application/Home/View/Index/search.html
Application/Home/View/QuotePrice/releaseinquiry.html
Application/Home/View/Search/index.html
dist/css/common/base.css
dist/css/common/base.less
dist/js/chat/index.js
dist/js/chat/webim.config.js
dist/js/chat/websdk-1.4.8.js
dist/js/global/api.js
dist/js/goodmanage/bulkupload.js
dist/js/index/search.js
dist/js/quoteprice/inquiry.js
dist/js/quoteprice/releaseinquiry.js
dist/js/search/index.js
Application/Home/View/Chat/index.html
View file @
937d315d
...
...
@@ -81,11 +81,11 @@
</div>
<include
file=
"public/foot"
/>
<script
src=
"__PUBLIC__/js/chat/webim.config.js"
></script>
<
script
src=
"__PUBLIC__/js/chat/strophe-1.2.8.js"
></script
>
<
!-- <script src="__PUBLIC__/js/chat/strophe-1.2.8.js"></script> --
>
<script
src=
"__PUBLIC__/js/chat/websdk-1.4.8.js"
></script>
<
script
src=
"__PUBLIC__/js/chat/swfupload.js"
></script
>
<
script
src=
"__PUBLIC__/js/chat/swfupload.cookie.js"
></script
>
<
script
src=
"__PUBLIC__/js/chat/uploadShim.js"
></script
>
<
!-- <script src="__PUBLIC__/js/chat/swfupload.js"></script> --
>
<
!-- <script src="__PUBLIC__/js/chat/swfupload.cookie.js"></script> --
>
<
!-- <script src="__PUBLIC__/js/chat/uploadShim.js"></script> --
>
<script
src=
"__PUBLIC__/js/chat/index.js"
></script>
</body>
...
...
Application/Home/View/GoodManage/bulkupload.html
View file @
937d315d
...
...
@@ -67,7 +67,6 @@
</div>
<include
file=
"public/foot"
/>
<script
src=
"https://cdn.bootcss.com/jquery.form/3.45.0/jquery.form.min.js"
></script>
<script
src=
"__PUBLIC__/js/goodmanage/bulkupload.js"
></script>
</body>
...
...
Application/Home/View/Index/index.html
View file @
937d315d
...
...
@@ -16,7 +16,7 @@
<body>
<!-- pc下的页面 -->
<div
class=
"index_wrapper"
>
<div
class=
"index_wrapper
pc_wrapper
"
>
<include
file=
"public/indexheader"
/>
<div
class=
"content index_content"
>
<div
class=
"top_section"
>
...
...
Application/Home/View/Index/search.html
View file @
937d315d
...
...
@@ -55,8 +55,8 @@
</div>
<include
file=
"public/foot"
/>
<script
src=
"__PUBLIC__/js/index/search.js"
></script>
<!--
页面
模板 -->
<script
type=
"text/html"
id=
"
htmlTp
"
>
<!--
商品
模板 -->
<script
type=
"text/html"
id=
"
sphtml
"
>
<
div
class
=
"my_xj_list clr "
>
{{
#
layui
.
each
(
d
,
function
(
index
,
item
){
}}
<
div
class
=
"my_xj_item fl boxsiz"
>
...
...
@@ -89,6 +89,44 @@
<
a
class
=
"btn"
href
=
"passporticsales/login"
>
登录,查看更多结果
<
/a
>
<
/div
>
</script>
<!-- 询价模板 -->
<script
type=
"text/html"
id=
"xjhtml"
>
<
div
class
=
"my_xj_list clr "
>
{{
#
layui
.
each
(
d
,
function
(
index
,
item
){
}}
<
div
class
=
"my_xj_item fl boxsiz"
>
<
div
class
=
"item_top clr"
>
<
div
class
=
"fl num ellipsis"
>
{{
item
.
goods_name
}}
<
/div
>
<
/div
>
<
div
class
=
"item_middle clr"
>
{{
#
if
(
item
.
source
!==
0
){
}}
<
div
class
=
"fl xjNum"
>
{{
item
.
source
}}
个报价
<
/div
>
{{
#
}
else
{
}}
<
div
class
=
"fl xj0"
>
等待报价
<
/div
>
{{
#
}
}}
<
div
class
=
"fr time"
>
{{
layui
.
util
.
toDateString
(
item
.
update_time
*
1000
,
'yyyy-MM-dd HH:mm'
)}}
<
/div
>
<
/div
>
<
div
class
=
"item_bottom"
>
<
div
class
=
"brand"
>
品牌:
<
span
>
{{
item
.
brand_name
}}
<
/span></
div
>
<
div
class
=
"total"
>
数量:
<
span
class
=
"bold"
>
{{
item
.
number
}}
PCS
<
/span></
div
>
<
div
class
=
"date"
>
货期:
<
span
class
=
"bold"
>
现货
<
/span></
div
>
<
/div
>
<
div
class
=
"item_user"
>
<
span
class
=
"fl type mystype lineBlock"
>
贸易商
<
/span
>
<
div
class
=
"fl name ellipsis"
>
{{
item
.
company_name
||
''
}}
<
/div
>
<
/div
>
<
/div
>
{{
#
});
}}
<
/div
>
{{
#
if
(
d
.
length
===
0
){
}}
<
div
class
=
"no_data"
style
=
"padding:60px 0 60px"
>
<
img
src
=
"__PUBLIC__/images/nosearchdata.png"
alt
=
""
>
<
p
class
=
"bold"
>
未搜索到相关信息
<
/p
>
<
/div
>
{{
#
}
}}
<
div
class
=
"btn_div"
>
<
a
class
=
"btn"
href
=
"passporticsales/login"
>
登录,查看更多结果
<
/a
>
<
/div
>
</script>
</body>
</html>
\ No newline at end of file
Application/Home/View/QuotePrice/releaseinquiry.html
View file @
937d315d
...
...
@@ -13,78 +13,80 @@
<include
file=
"public/top"
/>
<div
class=
"right_content release_inquiry_content"
>
<div
class=
"content"
>
<div
class=
"nav_title"
>
询报价 > 发布询价
</div>
<div
class=
"nav_title"
>
商品管理 > 发布商品 > 上传商品
</div>
<div
class=
"inquiry_form"
>
<div
class=
"top_title clr"
>
<h3
class=
"bold fl"
>
发布询价
</h3>
<div
class=
"plsc_btn fr"
>
<span
class=
"icon iconfont iconjuxing16"
></span>
批量上传
</div>
</div>
<div
class=
"gb"
>
<span
class=
"icon iconfont iconjuxing19 va-m"
></span>
<span>
填写完整信息,有利于提高回复报价效率
</span>
<span>
上传的商品有图片,搜索排名会优先排前
</span>
</div>
<div
class=
"form_content clr"
>
<div
class=
"form_left fl layui-form"
>
<div
class=
"form_content clr"
>
<form
id=
"xj_form"
>
<div
class=
"form_left fl layui-form"
>
<div
class=
"xh input_div "
>
<span
class=
"input_title lineBlock"
>
*型号:
</span>
<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
class=
"brand input_div "
>
<span
class=
"input_title lineBlock"
>
*品牌:
</span>
<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
class=
"fz input_div "
>
<span
class=
"input_title lineBlock"
>
封装:
</span>
<div
class=
"input_parent"
>
<input
type=
"text"
placeholder=
"请输入封装"
class=
"input boxsiz"
>
<input
type=
"text"
name=
"encap"
placeholder=
"请输入封装"
class=
"input boxsiz"
>
</div>
</div>
<div
class=
"num input_div "
>
<span
class=
"input_title lineBlock"
>
*
需求数量
:
</span>
<span
class=
"input_title lineBlock"
>
*
库存
:
</span>
<div
class=
"input_parent"
>
<input
type=
"text"
placeholder=
"请输入需求数量(必填)"
class=
"input boxsiz
"
>
<input
type=
"text"
name=
"number"
placeholder=
"请输入需求数量"
class=
"input boxsiz"
lay-verify=
"required|number
"
>
</div>
</div>
<div
class=
"price input_div "
>
<span
class=
"input_title lineBlock"
>
接受
价:
</span>
<span
class=
"input_title lineBlock"
>
*单
价:
</span>
<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|number
"
>
<div
class=
"rmb layui-form"
>
<select
name=
"city"
lay-verify=
"required"
>
<option
value=
""
></option>
<option
value=
"0"
>
北京
</option>
<option
value=
"1"
>
上海
</option>
<option
value=
"2"
>
广州
</option>
<option
value=
"3"
>
深圳
</option>
<option
value=
"4"
>
杭州
</option>
</select>
<select
name=
"currency"
lay-verify=
"required"
>
<option
value=
"1"
>
CNY
</option>
<option
value=
"2"
>
USD
</option>
</select>
</div>
</div>
</div>
<div
class=
"hq input_div
"
>
<div
class=
"hq input_div"
>
<span
class=
"input_title lineBlock"
>
*货期:
</span>
<div
class=
"input_parent"
>
<input
type=
"radio"
name=
"sex"
value=
"现货"
title=
"现货"
>
<input
type=
"radio"
name=
"sex"
value=
"期货"
title=
"期货"
checked
>
<input
type=
"text"
placeholder=
"输入时间"
class=
"boxsiz day_input input"
>
<i
class=
"day"
>
天
</i>
<div
class=
"input_parent"
id=
"delivery"
>
<input
type=
"radio"
name=
"delivery_time"
lay-filter=
"delivery"
value=
"现货"
title=
"现货"
>
<input
type=
"radio"
name=
"delivery_time"
lay-filter=
"delivery"
value=
"期货"
title=
"期货"
checked
id=
"daytext"
>
<div
class=
"lineBlock"
id=
"day"
>
<input
type=
"text"
placeholder=
"输入时间"
class=
"boxsiz day_input input"
lay-verify=
"required|number"
name=
"day"
>
<i
class=
"day"
>
天
</i>
</div>
</div>
</div>
<div
class=
"input_div textarea_div"
>
<span
class=
"input_title lineBlock fl"
>
备注:
</span>
<div
class=
"layui-input-block"
>
<textarea
name=
"
desc"
placeholder=
"请输入内容"
class=
"layui-textarea
"
></textarea>
<textarea
name=
"
remark"
placeholder=
"请输入内容"
class=
"layui-textarea
"
></textarea>
</div>
</div>
<div
class=
"btn_div"
>
<span
class=
"lineBlock fb btn
"
>
发布
</span>
<span
class=
"lineBlock cz btn btn_border
"
>
重置
</span>
<span
class=
"lineBlock fb btn"
lay-submit
lay-filter=
"add
"
>
发布
</span>
<span
class=
"lineBlock cz btn btn_border"
type=
"reset
"
>
重置
</span>
</div>
</div>
</div>
</form>
<div
class=
"form_right fl "
>
<div
class=
"sc"
>
<div
class=
"icon iconfont iconjuxing16"
></div>
...
...
@@ -99,6 +101,13 @@
</div>
</div>
<include
file=
"public/foot"
/>
<script
src=
"__PUBLIC__/js/quoteprice/releaseinquiry.js"
></script>
<script
type=
"text/html"
id=
"deliveryHtml"
>
{{
#
if
(
d
==
'期货'
)
{
}}
<
input
type
=
"text"
placeholder
=
"输入时间"
class
=
"boxsiz day_input input"
lay
-
verify
=
"required|number"
name
=
"day"
>
<
i
class
=
"day"
>
天
<
/i
>
{{
#
}
}}
</script>
</body>
</html>
\ No newline at end of file
Application/Home/View/Search/index.html
View file @
937d315d
...
...
@@ -51,7 +51,8 @@
</div>
<div
class=
"goods_data_list"
>
</div>
<div
class=
"pagination-with"
id=
"pagination"
style=
"text-align: right;margin: 25px 20px 0 0 ;display:none"
></div>
<div
class=
"pagination-with"
id=
"pagination"
style=
"text-align: right;margin: 25px 20px 0 0 ;display:none"
></div>
</div>
</div>
</div>
...
...
@@ -59,7 +60,7 @@
<include
file=
"public/foot"
/>
<script
src=
"__PUBLIC__/js/search/index.js"
></script>
<!-- 页面模板 -->
<script
type=
"text/html"
id=
"
htmlTp
"
>
<script
type=
"text/html"
id=
"
sphtml
"
>
<
div
class
=
"my_xj_list clr "
>
{{
#
layui
.
each
(
d
,
function
(
index
,
item
){
}}
<
div
class
=
"my_xj_item fl boxsiz"
>
...
...
@@ -93,6 +94,41 @@
<
/div
>
{{
#
}
}}
</script>
<!-- 询价模板 -->
<script
type=
"text/html"
id=
"xjhtml"
>
<
div
class
=
"my_xj_list clr "
>
{{
#
layui
.
each
(
d
,
function
(
index
,
item
){
}}
<
div
class
=
"my_xj_item fl boxsiz"
>
<
div
class
=
"item_top clr"
>
<
div
class
=
"fl num ellipsis"
>
{{
item
.
goods_name
}}
<
/div
>
<
/div
>
<
div
class
=
"item_middle clr"
>
{{
#
if
(
item
.
source
!==
0
){
}}
<
div
class
=
"fl xjNum"
>
{{
item
.
source
}}
个报价
<
/div
>
{{
#
}
else
{
}}
<
div
class
=
"fl xj0"
>
等待报价
<
/div
>
{{
#
}
}}
<
div
class
=
"fr time"
>
{{
layui
.
util
.
toDateString
(
item
.
update_time
*
1000
,
'yyyy-MM-dd HH:mm'
)}}
<
/div
>
<
/div
>
<
div
class
=
"item_bottom"
>
<
div
class
=
"brand"
>
品牌:
<
span
>
{{
item
.
brand_name
}}
<
/span></
div
>
<
div
class
=
"total"
>
数量:
<
span
class
=
"bold"
>
{{
item
.
number
}}
PCS
<
/span></
div
>
<
div
class
=
"date"
>
货期:
<
span
class
=
"bold"
>
现货
<
/span></
div
>
<
/div
>
<
div
class
=
"item_user"
>
<
span
class
=
"fl type mystype lineBlock"
>
贸易商
<
/span
>
<
div
class
=
"fl name ellipsis"
>
{{
item
.
company_name
||
''
}}
<
/div
>
<
/div
>
<
/div
>
{{
#
});
}}
<
/div
>
{{
#
if
(
d
.
length
===
0
){
}}
<
div
class
=
"no_data"
style
=
"padding:60px 0 60px"
>
<
img
src
=
"__PUBLIC__/images/nosearchdata.png"
alt
=
""
>
<
p
class
=
"bold"
>
未搜索到相关信息
<
/p
>
<
/div
>
{{
#
}
}}
</script>
</body>
</html>
\ No newline at end of file
dist/css/common/base.css
View file @
937d315d
...
...
@@ -239,7 +239,7 @@ body {
border-radius
:
50%
50%
;
background
:
rgba
(
234
,
173
,
55
,
0.9
);
box-shadow
:
0px
2px
9px
0px
rgba
(
242
,
191
,
97
,
0.5
);
position
:
absolute
;
position
:
fixed
;
bottom
:
92px
;
right
:
20px
;
cursor
:
pointer
;
...
...
@@ -316,6 +316,16 @@ body {
font-size
:
14px
;
font-weight
:
600
;
}
.goods_data_list
.my_xj_list
.my_xj_item
.item_middle
.xjNum
{
color
:
#EAA217
;
font-size
:
14px
;
font-weight
:
600
;
}
.goods_data_list
.my_xj_list
.my_xj_item
.item_middle
.xj0
{
color
:
#61A0F2
;
font-size
:
14px
;
font-weight
:
600
;
}
.goods_data_list
.my_xj_list
.my_xj_item
.item_middle
.time
{
color
:
#ADB6BF
;
font-size
:
12px
;
...
...
@@ -520,7 +530,7 @@ body {
margin-top
:
5px
;
}
@media
screen
and
(
max-width
:
768px
)
{
.
index
_wrapper
{
.
pc
_wrapper
{
display
:
none
;
}
.mobile_wrapper
{
...
...
@@ -528,7 +538,7 @@ body {
}
}
@media
screen
and
(
min-width
:
769px
)
{
.
index
_wrapper
{
.
pc
_wrapper
{
display
:
block
;
}
.mobile_wrapper
{
...
...
@@ -825,4 +835,3 @@ body {
color
:
#ADB6BF
;
cursor
:
pointer
;
}
/*# sourceMappingURL=base.css.map */
\ No newline at end of file
dist/css/common/base.less
View file @
937d315d
...
...
@@ -282,7 +282,7 @@ body {
border-radius: 50% 50%;
background: rgba(234, 173, 55, 0.9);
box-shadow: 0px 2px 9px 0px rgba(242, 191, 97, 0.5);
position:
absolute
;
position:
fixed
;
bottom: 92px;
right: 20px;
cursor: pointer;
...
...
@@ -376,6 +376,16 @@ body {
font-size: 14px;
font-weight: 600;
}
.xjNum{
color: #EAA217;
font-size: 14px;
font-weight: 600;
}
.xj0{
color: #61A0F2;
font-size: 14px;
font-weight: 600;
}
.time {
color: #ADB6BF;
...
...
@@ -653,7 +663,7 @@ body {
@media screen and (max-width: 768px) {
.
index
_wrapper {
.
pc
_wrapper {
display: none;
}
...
...
@@ -663,7 +673,7 @@ body {
}
@media screen and (min-width:769px) {
.
index
_wrapper {
.
pc
_wrapper {
display: block;
}
...
...
dist/js/chat/index.js
View file @
937d315d
...
...
@@ -18,23 +18,26 @@ $(function () {
}
else
{
console
.
log
(
'获取用户名失败'
)
}
},
undefined
,
true
)
},
undefined
,
true
)
},
registerUser
:
function
(
user
,
password
){
//给用户注册环信账号
getHistoryData
:
function
()
{
console
.
log
(
this
.
conn
.
prototype
)
},
registerUser
:
function
(
user
,
password
)
{
//给用户注册环信账号
var
self
=
this
;
var
options
=
{
var
options
=
{
username
:
user
,
password
:
password
,
appKey
:
WebIM
.
config
.
appkey
,
success
:
function
()
{
self
.
login
(
user
,
password
)
},
success
:
function
()
{
self
.
login
(
user
,
password
)
},
error
:
function
()
{
console
.
log
(
'注册失败'
)
},
},
apiUrl
:
WebIM
.
config
.
apiURL
};
self
.
conn
.
registerUser
(
options
);
};
self
.
conn
.
registerUser
(
options
);
},
testUser
:
function
(
user
,
password
)
{
//检测用户是否登入
var
self
=
this
;
...
...
@@ -45,23 +48,23 @@ $(function () {
},
)
$
.
ajax
({
type
:
'post'
,
url
:
'http://a1.easemob.com/'
+
self
.
orgName
+
'/'
+
self
.
appName
+
'/token'
,
url
:
'http://a1.easemob.com/'
+
self
.
orgName
+
'/'
+
self
.
appName
+
'/token'
,
data
:
data
,
contentType
:
"application/json"
,
success
:
function
(
data
)
{
var
token
=
data
.
access_token
;
$
.
ajax
({
type
:
'get'
,
url
:
'http://a1.easemob.com/'
+
self
.
orgName
+
'/'
+
self
.
appName
+
'/users/'
+
user
,
url
:
'http://a1.easemob.com/'
+
self
.
orgName
+
'/'
+
self
.
appName
+
'/users/'
+
user
,
headers
:
{
Authorization
:
'Bearer '
+
token
},
success
:
function
(
data
)
{
//用户已注册,主动帮用户登入
self
.
login
(
user
,
password
)
success
:
function
(
data
)
{
//用户已注册,主动帮用户登入
self
.
login
(
user
,
password
)
},
error
:
function
(
err
)
{
if
(
err
.
status
==
'404'
)
{
//主动帮用户注册
self
.
registerUser
(
user
,
password
);
if
(
err
.
status
==
'404'
)
{
//主动帮用户注册
self
.
registerUser
(
user
,
password
);
}
else
{
layer
.
msg
(
'网络出现问题,请重试!'
);
}
...
...
@@ -85,7 +88,7 @@ $(function () {
if
(
JSON
.
stringify
(
templateObj
)
!==
'{}'
)
{
this
.
addUser
(
templateObj
.
userId
,
false
)
this
.
sendCmd
(
templateObj
);
Util
.
delCookie
(
'template'
,
cookieHostname
);
Util
.
delCookie
(
'template'
,
cookieHostname
);
}
},
...
...
@@ -121,8 +124,9 @@ $(function () {
}
},
connection
:
function
()
{
WebIM
.
config
=
config
;
//建立聊天链接
this
.
conn
=
new
WebIM
.
connection
({
this
.
conn
=
WebIM
.
conn
=
new
WebIM
.
default
.
connection
({
isMultiLoginSessions
:
WebIM
.
config
.
isMultiLoginSessions
,
https
:
typeof
WebIM
.
config
.
https
===
'boolean'
?
WebIM
.
config
.
https
:
location
.
protocol
===
'https:'
,
...
...
@@ -133,9 +137,9 @@ $(function () {
autoReconnectInterval
:
WebIM
.
config
.
autoReconnectInterval
});
// 初始化上传组件 fileInputId对应页面上的file组件id
WebIM
.
flashUpload
=
UploadShim
({
fileInputId
:
'image'
},
this
.
conn
).
flashUpload
;
//
WebIM.flashUpload = UploadShim({
//
fileInputId: 'image'
//
}, this.conn).flashUpload;
//增加表情
WebIM
.
Emoji
=
{
path
:
dist
+
'/faces/'
,
...
...
@@ -386,6 +390,7 @@ $(function () {
console
.
log
(
'登入成功'
)
self
.
defaultUser
();
self
.
singleChat
();
self
.
getHistoryData
()
},
onTextMessage
:
function
(
message
)
{
self
.
receiveData
(
1
,
message
,
false
)
...
...
@@ -424,11 +429,11 @@ $(function () {
},
//本机网络掉线;
onError
:
function
(
message
)
{
// console.log('Error', WebIM.utils.stringify(message));
console
.
log
(
"Error: "
+
WebIM
.
utils
.
stringify
(
message
)
);
console
.
log
(
'onError: '
,
message
);
},
//失败回调;
});
},
login
:
function
(
user
,
password
)
{
login
:
function
(
user
,
password
)
{
// open,登录;
var
options
=
{
apiUrl
:
WebIM
.
config
.
apiURL
,
...
...
@@ -440,8 +445,7 @@ $(function () {
this
.
conn
.
open
(
options
);
}
catch
(
e
)
{
console
.
log
(
WebIM
.
config
.
apiURL
)
// alert('open fail' + e.message)
console
.
log
(
'登入失败'
)
}
},
...
...
@@ -450,8 +454,9 @@ $(function () {
// 私聊发送文本消息,发送表情同发送文本消息,只是会在对方客户端将表情文本进行解析成图片;
var
userId
=
$
(
'.notice_left '
).
find
(
'.active'
).
attr
(
'userid'
);
var
id
=
this
.
conn
.
getUniqueId
();
var
msg
=
new
WebIM
.
message
(
'txt'
,
id
);
var
emojiMessage
=
WebIM
.
utils
.
parseEmoji
(
content
);
//表情解析工具
var
msg
=
new
WebIM
.
default
.
message
(
'txt'
,
id
);
var
emojiMessage
=
WebIM
.
default
.
utils
.
parseEmoji
(
content
);
//表情解析工具
console
.
log
(
msg
)
msg
.
set
({
msg
:
content
,
// 消息内容;
to
:
userId
,
// 接收消息对象;
...
...
@@ -465,8 +470,8 @@ $(function () {
$
(
'#chat_textarea'
).
val
(
''
);
},
fail
:
function
()
{
console
.
log
(
"Send private text failed"
);
fail
:
function
(
e
)
{
console
.
log
(
"Send private text failed"
,
e
);
}
});
this
.
conn
.
send
(
msg
.
body
);
...
...
@@ -500,22 +505,22 @@ $(function () {
// 私聊发送图片消息;
var
self
=
this
;
var
id
=
this
.
conn
.
getUniqueId
();
var
msg
=
new
WebIM
.
message
(
'img'
,
id
);
var
msg
=
new
WebIM
.
default
.
message
(
'img'
,
id
);
var
input
=
$
(
'#img_upload'
)[
0
];
// 选择图片的input;
var
file
=
WebIM
.
utils
.
getFileUrl
(
input
);
// 将图片转化为二进制文件;
var
file
=
WebIM
.
default
.
utils
.
getFileUrl
(
input
);
// 将图片转化为二进制文件;
var
userId
=
$
(
'.notice_left'
).
find
(
'.active'
).
attr
(
'userid'
);
var
option
=
{
apiUrl
:
WebIM
.
config
.
apiURL
,
file
:
file
,
to
:
'18664936975'
,
to
:
userId
,
roomType
:
false
,
// chatType: 'singleChat',
flashUpload
:
WebIM
.
flashUpload
,
onFileUploadError
:
function
()
{
console
.
log
(
file
);
console
.
log
(
'失败'
)
},
onFileUploadComplete
:
function
()
{},
onFileUploadComplete
:
function
()
{
console
.
log
(
'消息上传成功'
)
},
success
:
function
()
{
var
htmlStr
=
'<img src ="'
+
file
.
url
+
'" class="edit_img"/>'
;
$
(
'#'
+
userId
).
find
(
'.notice_item_content'
).
append
(
self
.
messageHtml
(
1
,
...
...
dist/js/chat/webim.config.js
View file @
937d315d
// /**
// * git do not control webim.config.js
// * everyone should copy webim.config.js.demo to webim.config.js
// * and have their own configs.
// * In this way , others won't be influenced by this config while git pull.
// *
// */
// var config = {
// /*
// * XMPP server
// */
// xmppURL: 'im-api.easemob.com',
// /*
// * Backend REST API URL
// */
// apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//a1.easemob.com',
// /*
// * Application AppKey
// */
// appkey: '1113190618181018#icsales',
// /*
// * Whether to use wss
// * @parameter {Boolean} true or false
// */
// https: false,
// /*
// * isMultiLoginSessions
// * true: A visitor can sign in to multiple webpages and receive messages at all the webpages.
// * false: A visitor can sign in to only one webpage and receive messages at the webpage.
// */
// isMultiLoginSessions: false,
// /*
// * Set to auto sign-in
// */
// isAutoLogin: false,
// /**
// * Whether to use window.doQuery()
// * @parameter {Boolean} true or false
// */
// isWindowSDK: false,
// /**
// * isSandBox=true: xmppURL: 'im-api.sandbox.easemob.com', apiURL: '//a1.sdb.easemob.com',
// * isSandBox=false: xmppURL: 'im-api.easemob.com', apiURL: '//a1.easemob.com',
// * @parameter {Boolean} true or false
// */
// isSandBox: false,
// /**
// * Whether to console.log in strophe.log()
// * @parameter {Boolean} true or false
// */
// isDebug: false,
// /**
// * will auto connect the xmpp server autoReconnectNumMax times in background when client is offline.
// * won't auto connect if autoReconnectNumMax=0.
// */
// autoReconnectNumMax: 2,
// /**
// * the interval secons between each atuo reconnectting.
// * works only if autoReconnectMaxNum >= 2.
// */
// autoReconnectInterval: 2,
// /**
// * webrtc supports WebKit and https only
// */
// isWebRTC: /WebKit/.test(navigator.userAgent) && /^https\:$/.test(window.location.protocol),
// /**
// * while http access,use ip directly,instead of ServerName,avoiding DNS problem.
// */
// isHttpDNS: false
// };
/**
* git do not control webim.config.js
* everyone should copy webim.config.js.demo to webim.config.js
...
...
@@ -5,35 +76,47 @@
* In this way , others won't be influenced by this config while git pull.
*
*/
var
WebIM
=
{};
WebIM
.
config
=
{
// for react native
// var location = {
// protocol: "https"
// }
var
config
=
{
/*
* XMPP server
*/
xmppURL
:
'im-api.easemob.com'
,
xmppURL
:
(
window
.
location
.
protocol
===
"https:"
?
"https:"
:
"http:"
)
+
"//im-api-v2.easemob.com/ws"
,
// xmppURL: "im-api.easemob.com",
// xmppURL: '172.17.2.139:5280',
/*
* Backend REST API URL
* Backend REST API URL
*/
apiURL
:
(
location
.
protocol
===
'https:'
?
'https:'
:
'http:'
)
+
'//a1.easemob.com'
,
// apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//a1.easemob.com',
// ios must be https!!! by lwz
// apiURL: "https://a1.easemob.com",
apiURL
:
(
window
.
location
.
protocol
===
"https:"
?
"https:"
:
"http:"
)
+
"//a1.easemob.com"
,
// apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//172.17.3.155:8080',
/*
* Application AppKey
*/
appkey
:
'1113190618181018#icsales'
,
appkey
:
"1113190618181018#icsales"
,
/*
* Whether to use wss
* Application Host
*/
Host
:
"easemob.com"
,
/*
* Whether to use HTTPS
* @parameter {Boolean} true or false
*/
https
:
false
,
https
:
true
,
isHttpDNS
:
false
,
/*
* isMultiLoginSessions
* true: A visitor can sign in to multiple webpages and receive messages at all the webpages.
* false: A visitor can sign in to only one webpage and receive messages at the webpage.
*/
isMultiLoginSessions
:
false
,
/*
* Set to auto sign-in
*/
isAutoLogin
:
false
,
isMultiLoginSessions
:
true
,
/**
* Whether to use window.doQuery()
* @parameter {Boolean} true or false
...
...
@@ -49,12 +132,17 @@ WebIM.config = {
* Whether to console.log in strophe.log()
* @parameter {Boolean} true or false
*/
isDebug
:
false
,
isDebug
:
true
,
/**
* Whether to show logs in strophe
* @parameter {Boolean} true or false
*/
isStropheLog
:
false
,
/**
* will auto connect the xmpp server autoReconnectNumMax times in background when client is offline.
* won't auto connect if autoReconnectNumMax=0.
*/
autoReconnectNumMax
:
2
,
autoReconnectNumMax
:
5
,
/**
* the interval secons between each atuo reconnectting.
* works only if autoReconnectMaxNum >= 2.
...
...
@@ -63,9 +151,40 @@ WebIM.config = {
/**
* webrtc supports WebKit and https only
*/
isWebRTC
:
/WebKit/
.
test
(
navigator
.
userAgent
)
&&
/^https
\:
$/
.
test
(
window
.
location
.
protocol
),
isWebRTC
:
window
.
RTCPeerConnection
&&
/^https
\:
$/
.
test
(
window
.
location
.
protocol
),
/**
* cn: chinese
* us: english
*/
i18n
:
"cn"
,
/*
* Set to auto sign-in
*/
isAutoLogin
:
true
,
/**
* Size of message cache for person to person
*/
p2pMessageCacheSize
:
500
,
/**
* When a message arrived, the receiver send an ack message to the
* sender, in order to tell the sender the message has delivered.
* See call back function onReceivedMessage
*/
delivery
:
false
,
/**
* Size of message cache for group chating like group, chatroom etc
*/
groupMessageCacheSize
:
200
,
/**
* 5 actual logging methods, ordered and available:
* 'TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR'
*/
loglevel
:
"ERROR"
,
/**
*
while http access,use ip directly,instead of ServerName,avoiding DNS problem.
*
enable localstorage for history messages
*/
isHttpDNS
:
false
};
enableLocalStorage
:
true
}
dist/js/chat/websdk-1.4.8.js
View file @
937d315d
This diff could not be displayed because it is too large.
dist/js/global/api.js
View file @
937d315d
...
...
@@ -73,7 +73,11 @@
/***
* 会员中心询价列表 需要token
*/
inquiryInfo
:
offer_url
+
"/inquiry/info"
inquiryInfo
:
offer_url
+
"/inquiry/info"
,
/***
* 询价添加 需要token
*/
inquiryadd
:
offer_url
+
"/inquiry/add"
};
if
(
typeof
define
===
"function"
&&
define
.
amd
)
{
return
apis
;
...
...
dist/js/goodmanage/bulkupload.js
View file @
937d315d
...
...
@@ -74,7 +74,7 @@ $(function () {
$
(
'#fileLoad'
).
submit
(
function
()
{
var
uploadFileForm
=
document
.
getElementById
(
"fileLoad"
);
uploadFileForm
.
action
=
apis
.
bulkupload
;
$
(
'#token'
).
val
(
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vYXV0aGFwaS5pY3NhbGVzLmNjL2F1dGgvbG9naW4iLCJpYXQiOjE1NjIxMTYzNTAsImV4cCI6MTU2MjEyNzE1MCwibmJmIjoxNTYyMTE2MzUwLCJqdGkiOiJ4WVY1MU5WZlByUFR0Q3U5Iiwic3ViIjoyOSwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSJ9.8GKnyJ5gBS9fdiPGnIVpJ9NIsn0Dd0t5lb12giDMhaA'
);
$
(
'#token'
).
val
(
Util
.
getCookie
(
'token'
)
);
$
(
'#ie'
).
val
(
cookieHostname
);
})
},
...
...
dist/js/index/search.js
View file @
937d315d
...
...
@@ -10,10 +10,21 @@ $(function () {
"offset"
:
8
,
"p"
:
1
,
},
function
(
res
)
{
var
getTpl
=
htmlTp
.
innerHTML
;
var
getTpl
=
""
;
if
(
type
==
1
){
getTpl
=
sphtml
.
innerHTML
}
else
{
getTpl
=
xjhtml
.
innerHTML
}
if
(
res
.
errcode
==
0
)
{
$
(
'.nav_title'
).
find
(
'span'
).
text
(
res
.
total
)
layui
.
laytpl
(
getTpl
).
render
(
res
.
goods_list
,
function
(
html
)
{
$
(
'.nav_title'
).
find
(
'span'
).
text
(
res
.
total
);
var
list
=
[];
if
(
type
==
1
){
list
=
res
.
goods_list
}
else
{
list
=
res
.
inquiry_list
}
layui
.
laytpl
(
getTpl
).
render
(
list
,
function
(
html
)
{
$
(
".search_data_list"
).
html
(
html
);
});
}
else
if
(
res
.
errcode
==
110001
)
{
...
...
dist/js/quoteprice/inquiry.js
View file @
937d315d
...
...
@@ -44,7 +44,6 @@ $(function () {
});
});
}
else
if
(
res
.
errcode
==
105001
)
{
console
.
log
(
'hahahah'
)
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
$
(
".inquiry_data"
).
empty
().
html
(
html
);
$
(
'#pagination'
).
hide
();
...
...
@@ -69,7 +68,7 @@ $(function () {
}
})
$
(
'.inquiry_data'
).
on
(
'click'
,
'.data_item'
,
function
()
{
$
(
'.inquiry_data'
).
on
(
'click'
,
'.data_item'
,
function
()
{
window
.
location
.
href
=
"/inquirydetail"
});
$
(
'.cx'
).
on
(
'click'
,
function
()
{
...
...
dist/js/quoteprice/releaseinquiry.js
0 → 100644
View file @
937d315d
!
function
()
{
window
.
ReleaseInquiry
=
{
isClick
:
false
,
init
:
function
()
{
this
.
created
(
this
).
mounted
(
this
).
handleBind
(
this
);
},
created
:
function
(
opt
)
{
return
this
;
},
mounted
:
function
(
opt
)
{
return
this
;
},
handleBind
:
function
(
opt
)
{
//货期选择
layui
.
form
.
on
(
'radio(delivery)'
,
function
(
data
)
{
var
str
=
'期货'
;
data
.
value
==
'期货'
?
str
=
'期货'
:
str
=
'现货'
;
var
getTpl
=
deliveryHtml
.
innerHTML
;
layui
.
laytpl
(
getTpl
).
render
(
str
,
function
(
html
)
{
$
(
"#day"
).
empty
().
html
(
html
);
});
});
//天数同步期货
$
(
document
).
on
(
'input propertychange'
,
'input[name="day"]'
,
function
()
{
var
val
=
$
(
this
).
val
();
$
(
"#daytext"
).
val
(
val
+
'天'
);
});
$
(
'.cz'
).
on
(
'click'
,
function
(){
$
(
'#xj_form'
)[
0
].
reset
();
})
//上传商品发布
layui
.
form
.
on
(
'submit(add)'
,
function
(
data
)
{
$
(
data
.
elem
).
addClass
(
"layui-btn-disabled"
);
if
(
!
opt
.
isClick
)
{
opt
.
isClick
=
true
;
IcController
.
getData
(
apis
.
inquiryadd
+
'?token='
+
Util
.
getCookie
(
'token'
),
'get'
,
data
.
field
,
function
(
res
)
{
if
(
res
.
errcode
==
0
)
{
layer
.
msg
(
'发布询价成功'
,
{
time
:
2000
},
function
()
{
window
.
location
.
href
=
'/inquiry'
;
});
}
else
{
layer
.
msg
(
res
.
errmsg
);
opt
.
isClick
=
false
;
$
(
data
.
elem
).
removeClass
(
"layui-btn-disabled"
);
}
});
}
});
return
this
;
},
},
$
(
function
()
{
ReleaseInquiry
.
init
();
})
}();
\ No newline at end of file
dist/js/search/index.js
View file @
937d315d
...
...
@@ -11,11 +11,22 @@ $(function () {
"offset"
:
10
,
"p"
:
p
,
},
function
(
res
)
{
var
getTpl
=
htmlTp
.
innerHTML
;
var
getTpl
=
""
;
if
(
type
==
1
){
getTpl
=
sphtml
.
innerHTML
}
else
{
getTpl
=
xjhtml
.
innerHTML
}
if
(
res
.
errcode
==
0
)
{
$
(
'#pagination'
).
show
();
$
(
'.nav_title'
).
find
(
'span'
).
text
(
res
.
total
)
layui
.
laytpl
(
getTpl
).
render
(
res
.
goods_list
,
function
(
html
)
{
var
list
=
[];
if
(
type
==
1
){
list
=
res
.
goods_list
}
else
{
list
=
res
.
inquiry_list
}
layui
.
laytpl
(
getTpl
).
render
(
list
,
function
(
html
)
{
$
(
".goods_data_list"
).
html
(
html
);
layui
.
laypage
.
render
({
elem
:
'pagination'
,
...
...
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