Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
70cac92a
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
70cac92a
编写于
12月 30, 2020
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
4f8bbca1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
87 addition
and
22 deletion
+87
-22
public/static/admin/default/css/common.css
public/static/admin/default/css/common.css
+3
-0
public/static/admin/default/css/goods.css
public/static/admin/default/css/goods.css
+3
-0
public/static/common/js/common.js
public/static/common/js/common.js
+75
-16
public/static/index/default/js/cart.js
public/static/index/default/js/cart.js
+1
-1
public/static/index/default/js/goods.js
public/static/index/default/js/goods.js
+3
-3
public/static/index/default/js/pay.qrcode.js
public/static/index/default/js/pay.qrcode.js
+1
-1
public/static/index/default/js/search.js
public/static/index/default/js/search.js
+1
-1
未找到文件。
public/static/admin/default/css/common.css
浏览文件 @
70cac92a
...
...
@@ -636,6 +636,9 @@ table.am-table .am-btn-danger:hover {
-moz-box-shadow
:
-5px
0px
10px
rgba
(
136
,
136
,
136
,
0.3
);
box-shadow
:
-5px
0px
10px
rgba
(
136
,
136
,
136
,
0.3
);
}
.parameters-table
thead
tr
>
th
:last-child
{
background
:
#f5f7fa
;
}
.parameters-table
thead
tr
>
th
{
min-width
:
100px
;
}
...
...
public/static/admin/default/css/goods.css
浏览文件 @
70cac92a
...
...
@@ -124,6 +124,9 @@
right
:
0
;
background
:
#fff
;
}
.specifications-table
thead
tr
>
th
:nth-last-child
(
-n
+
2
)
{
background
:
#f5f7fa
;
}
.specifications-table
thead
tr
>
th
:nth-last-child
(
2
),
.specifications-table
tbody
tr
>
td
:nth-last-child
(
2
)
{
right
:
150px
;
...
...
public/static/common/js/common.js
浏览文件 @
70cac92a
...
...
@@ -447,15 +447,13 @@ function FromInit(form_name)
return
false
;
}
// 开启进度条
$
.
AMUI
.
progress
.
start
();
// ajax请求
$
.
AMUI
.
progress
.
start
();
$
.
ajax
({
url
:
action
,
type
:
method
,
dataType
:
"
json
"
,
timeout
:
$form
.
attr
(
'
timeout
'
)
||
3
0000
,
timeout
:
$form
.
attr
(
'
timeout
'
)
||
6
0000
,
data
:
GetFormVal
(
form_name
),
processData
:
false
,
contentType
:
false
,
...
...
@@ -511,7 +509,7 @@ function FromInit(form_name)
{
$
.
AMUI
.
progress
.
done
();
$button
.
button
(
'
reset
'
);
Prompt
(
'
服务器错误
'
);
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
}
...
...
@@ -590,7 +588,7 @@ function Tree(id, url, level, is_add_node, is_delete_all)
url
:
url
,
type
:
'
POST
'
,
dataType
:
"
json
"
,
timeout
:
3
0000
,
timeout
:
6
0000
,
data
:{
"
id
"
:
id
},
success
:
function
(
result
)
{
...
...
@@ -620,7 +618,7 @@ function Tree(id, url, level, is_add_node, is_delete_all)
},
error
:
function
(
xhr
,
type
)
{
$
(
'
#tree
'
).
find
(
'
p
'
).
text
(
'
网络异常出错
'
);
$
(
'
#tree
'
).
find
(
'
p
'
).
text
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
);
$
(
'
#tree
'
).
find
(
'
img
'
).
remove
();
}
});
...
...
@@ -1026,14 +1024,16 @@ function DataDelete(e)
data
[
key
]
=
id
;
// 请求删除数据
$
.
AMUI
.
progress
.
start
();
$
.
ajax
({
url
:
url
,
type
:
'
POST
'
,
dataType
:
"
json
"
,
timeout
:
e
.
attr
(
'
data-timeout
'
)
||
3
0000
,
timeout
:
e
.
attr
(
'
data-timeout
'
)
||
6
0000
,
data
:
data
,
success
:
function
(
result
)
{
$
.
AMUI
.
progress
.
done
();
if
(
result
.
code
==
0
)
{
Prompt
(
result
.
msg
,
'
success
'
);
...
...
@@ -1094,7 +1094,8 @@ function DataDelete(e)
},
error
:
function
(
xhr
,
type
)
{
Prompt
(
'
网络异常出错
'
);
$
.
AMUI
.
progress
.
done
();
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
}
...
...
@@ -1152,14 +1153,16 @@ function AjaxRequest(e)
data
[
key
]
=
id
;
// ajax
$
.
AMUI
.
progress
.
start
();
$
.
ajax
({
url
:
url
,
type
:
'
POST
'
,
dataType
:
"
json
"
,
timeout
:
e
.
attr
(
'
data-timeout
'
)
||
3
0000
,
timeout
:
e
.
attr
(
'
data-timeout
'
)
||
6
0000
,
data
:
data
,
success
:
function
(
result
)
{
$
.
AMUI
.
progress
.
done
();
if
(
result
.
code
==
0
)
{
switch
(
view
)
...
...
@@ -1199,7 +1202,8 @@ function AjaxRequest(e)
},
error
:
function
(
xhr
,
type
)
{
Prompt
(
'
网络异常出错
'
);
$
.
AMUI
.
progress
.
done
();
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
}
...
...
@@ -1860,6 +1864,52 @@ function IsArray(value)
return
Object
.
prototype
.
toString
.
call
(
value
)
==
'
[object Array]
'
;
}
/**
* html转字符串
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-12-30
* @desc description
* @param {[string]} html_str [html代码]
*/
function
HtmlToString
(
html_str
)
{
function
ToTxt
(
str
)
{
var
rex
=
/
\<
|
\>
|
\"
|
\'
|
\&
| | /g
;
str
=
str
.
replace
(
rex
,
function
(
match_str
)
{
switch
(
match_str
)
{
case
'
<
'
:
return
'
<
'
;
break
;
case
'
>
'
:
return
'
>
'
;
break
;
case
'
"
'
:
return
'
"
'
;
break
;
case
'
\'
'
:
return
'
'
'
;
break
;
case
'
&
'
:
return
'
&
'
;
break
;
case
'
'
:
return
'
 
'
;
break
;
case
'
'
:
return
'
 
'
;
break
;
}
});
return
str
;
}
return
ToTxt
(
html_str
).
replace
(
/
\&
lt
\;
br
[\&
ensp
\;
|
\&
emsp
\;]
*
[\/]?\&
gt
\;
|
\r\n
|
\n
/g
,
'
<br/>
'
);
}
// 公共数据操作
...
...
@@ -1918,6 +1968,7 @@ $(function()
// ajax请求操作
var
$button
=
$
(
this
);
$button
.
button
(
'
loading
'
);
$
.
AMUI
.
progress
.
start
();
$
.
ajax
({
url
:
$button
.
data
(
'
url
'
),
type
:
'
POST
'
,
...
...
@@ -1925,6 +1976,7 @@ $(function()
data
:
{
"
fields
"
:
fields
,
"
md5_key
"
:
md5_key
},
success
:
function
(
result
)
{
$
.
AMUI
.
progress
.
done
();
if
(
result
.
code
==
0
)
{
Prompt
(
result
.
msg
,
'
success
'
);
...
...
@@ -1940,8 +1992,9 @@ $(function()
},
error
:
function
(
xhr
,
type
)
{
$
.
AMUI
.
progress
.
done
();
$button
.
button
(
'
reset
'
);
Prompt
(
'
网络异常出错
'
);
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
});
...
...
@@ -2009,7 +2062,7 @@ $(function()
// 提交字段名称|超时时间|标题|描述
var
key
=
$
(
this
).
data
(
'
key
'
)
||
form
;
var
timeout
=
$
(
this
).
data
(
'
timeout
'
)
||
3
0000
;
var
timeout
=
$
(
this
).
data
(
'
timeout
'
)
||
6
0000
;
var
title
=
$
(
this
).
data
(
'
confirm-title
'
)
||
'
温馨提示
'
;
var
msg
=
$
(
this
).
data
(
'
confirm-msg
'
)
||
'
删除后不可恢复、确认操作吗?
'
;
...
...
@@ -2028,6 +2081,7 @@ $(function()
}
// ajax请求操作
$
.
AMUI
.
progress
.
start
();
$
.
ajax
({
url
:
url
,
type
:
'
POST
'
,
...
...
@@ -2036,6 +2090,7 @@ $(function()
data
:
data
,
success
:
function
(
result
)
{
$
.
AMUI
.
progress
.
done
();
if
(
result
.
code
==
0
)
{
// 成功则删除数据列表
...
...
@@ -2050,7 +2105,8 @@ $(function()
},
error
:
function
(
xhr
,
type
)
{
Prompt
(
'
网络异常出错
'
);
$
.
AMUI
.
progress
.
done
();
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
},
...
...
@@ -2160,14 +2216,16 @@ $(function()
}
// 请求更新数据
$
.
AMUI
.
progress
.
start
();
$
.
ajax
({
url
:
url
,
type
:
'
POST
'
,
dataType
:
"
json
"
,
timeout
:
$tag
.
attr
(
'
data-timeout
'
)
||
3
0000
,
timeout
:
$tag
.
attr
(
'
data-timeout
'
)
||
6
0000
,
data
:{
"
id
"
:
id
,
"
state
"
:
state
,
"
field
"
:
field
},
success
:
function
(
result
)
{
$
.
AMUI
.
progress
.
done
();
if
(
result
.
code
==
0
)
{
Prompt
(
result
.
msg
,
'
success
'
);
...
...
@@ -2202,7 +2260,8 @@ $(function()
},
error
:
function
(
xhr
,
type
)
{
Prompt
(
'
网络异常出错
'
);
$
.
AMUI
.
progress
.
done
();
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
});
...
...
public/static/index/default/js/cart.js
浏览文件 @
70cac92a
...
...
@@ -90,7 +90,7 @@ $(function()
error
:
function
(
xhr
,
type
)
{
$
.
AMUI
.
progress
.
done
();
Prompt
(
'
服务器错误
'
);
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
}
...
...
public/static/index/default/js/goods.js
浏览文件 @
70cac92a
...
...
@@ -245,7 +245,7 @@ function GoodsSpecDetail()
error
:
function
(
xhr
,
type
)
{
$
.
AMUI
.
progress
.
done
();
Prompt
(
'
服务器错误
'
);
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
}
...
...
@@ -326,7 +326,7 @@ function GoodsSpecType()
error
:
function
(
xhr
,
type
)
{
$
.
AMUI
.
progress
.
done
();
Prompt
(
'
服务器错误
'
);
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
}
...
...
@@ -550,7 +550,7 @@ $(function() {
{
PoptitClose
();
$
.
AMUI
.
progress
.
done
();
Prompt
(
'
服务器错误
'
);
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
}
...
...
public/static/index/default/js/pay.qrcode.js
浏览文件 @
70cac92a
...
...
@@ -34,7 +34,7 @@ $(function()
},
error
:
function
(
xhr
,
type
)
{
Prompt
(
'
服务器错误
'
);
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
},
2000
);
...
...
public/static/index/default/js/search.js
浏览文件 @
70cac92a
...
...
@@ -213,7 +213,7 @@ $(function()
$
(
'
.loding-view
'
).
hide
();
$
(
'
.search-pages-submit
'
).
hide
();
$
(
'
.table-no
'
).
show
();
Prompt
(
'
网络异常出错
'
);
Prompt
(
HtmlToString
(
xhr
.
responseText
)
||
'
异常错误
'
,
'
danger
'
,
30
);
}
});
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录