Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
guodong
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a483459f
authored
Mar 11, 2021
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
5067204e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
43 deletions
gzh/customer/guodong.html
gzh/customer/index.html
gzh/customer/naicha.html
gzh/customer/guodong.html
View file @
a483459f
...
...
@@ -287,7 +287,12 @@
});
function
params
(){
// var url = window.location.search;
// map.set('ua',window.navigator.userAgent.toLowerCase());
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
){
map
.
set
(
'ua'
,
'wechat'
);
}
else
{
map
.
set
(
'ua'
,
'other'
);
}
map
.
set
(
'pkg'
,
'wechat'
);
map
.
set
(
'cid'
,
'wechat'
);
map
.
set
(
'gzh'
,
'guodong'
);
...
...
@@ -626,20 +631,28 @@
xhr
.
upload
.
addEventListener
(
"progress"
,
uploadProgress
,
false
);
xhr
.
open
(
"post"
,
url
,
true
);
xhr
.
onload
=
function
()
{
var
result
=
xhr
.
responseText
;
var
json
=
eval
(
"("
+
result
+
")"
);
switch
(
json
.
code
)
{
case
1
:
// var path=cdn+;
send
(
json
.
imgkey
,
2002
);
$
(
"#img"
).
val
(
''
);
break
;
default
:
system
(
json
.
msg
);
$
(
"#img"
).
val
(
''
);
break
;
}
if
(
xhr
.
status
==
200
){
var
result
=
xhr
.
responseText
;
var
json
=
eval
(
"("
+
result
+
")"
);
switch
(
json
.
code
)
{
case
1
:
// var path=cdn+;
send
(
json
.
imgkey
,
2002
);
$
(
"#img"
).
val
(
''
);
break
;
default
:
system
(
json
.
msg
);
$
(
"#img"
).
val
(
''
);
break
;
}
}
else
{
system
(
xhr
.
status
);
tips
(
"上传发生错误"
+
xhr
.
status
,
"error"
,
3000
);
}
};
xhr
.
onerror
=
function
(
e
)
{
tips
(
"上传发生错误"
+
e
,
"error"
,
3000
);
};
xhr
.
send
(
formdata
);
}
...
...
gzh/customer/index.html
View file @
a483459f
...
...
@@ -287,7 +287,11 @@
});
function
params
(){
var
url
=
window
.
location
.
search
;
map
.
set
(
'ua'
,
window
.
navigator
.
userAgent
.
toLowerCase
());
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
){
map
.
set
(
'ua'
,
'wechat'
);
}
else
{
map
.
set
(
'ua'
,
'other'
);
}
// map.set('pkg','wechat');
// map.set('cid','wechat');
// map.set('gzh','naicha');
...
...
@@ -626,20 +630,28 @@
xhr
.
upload
.
addEventListener
(
"progress"
,
uploadProgress
,
false
);
xhr
.
open
(
"post"
,
url
,
true
);
xhr
.
onload
=
function
()
{
var
result
=
xhr
.
responseText
;
var
json
=
eval
(
"("
+
result
+
")"
);
switch
(
json
.
code
)
{
case
1
:
// var path=cdn+;
send
(
json
.
imgkey
,
2002
);
$
(
"#img"
).
val
(
''
);
break
;
default
:
system
(
json
.
msg
);
$
(
"#img"
).
val
(
''
);
break
;
}
if
(
xhr
.
status
==
200
){
var
result
=
xhr
.
responseText
;
var
json
=
eval
(
"("
+
result
+
")"
);
switch
(
json
.
code
)
{
case
1
:
// var path=cdn+;
send
(
json
.
imgkey
,
2002
);
$
(
"#img"
).
val
(
''
);
break
;
default
:
system
(
json
.
msg
);
$
(
"#img"
).
val
(
''
);
break
;
}
}
else
{
system
(
xhr
.
status
);
tips
(
"上传发生错误"
+
xhr
.
status
,
"error"
,
3000
);
}
};
xhr
.
onerror
=
function
(
e
)
{
tips
(
"上传发生错误"
+
e
,
"error"
,
3000
);
};
xhr
.
send
(
formdata
);
}
...
...
gzh/customer/naicha.html
View file @
a483459f
...
...
@@ -287,10 +287,15 @@
});
function
params
(){
// var url = window.location.search;
// map.set('ua',window.navigator.userAgent.toLowerCase());
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
){
map
.
set
(
'ua'
,
'wechat'
);
}
else
{
map
.
set
(
'ua'
,
'other'
);
}
map
.
set
(
'pkg'
,
'wechat'
);
map
.
set
(
'cid'
,
'wechat'
);
map
.
set
(
'gzh'
,
'
naicha
'
);
map
.
set
(
'gzh'
,
'
guodong
'
);
// if (url.indexOf("?") != -1) {
// var p = url.substr(1);
// keys = p.split("&");
...
...
@@ -627,20 +632,28 @@
xhr
.
upload
.
addEventListener
(
"progress"
,
uploadProgress
,
false
);
xhr
.
open
(
"post"
,
url
,
true
);
xhr
.
onload
=
function
()
{
var
result
=
xhr
.
responseText
;
var
json
=
eval
(
"("
+
result
+
")"
);
switch
(
json
.
code
)
{
case
1
:
// var path=cdn+;
send
(
json
.
imgkey
,
2002
);
$
(
"#img"
).
val
(
''
);
break
;
default
:
system
(
json
.
msg
);
$
(
"#img"
).
val
(
''
);
break
;
}
if
(
xhr
.
status
==
200
){
var
result
=
xhr
.
responseText
;
var
json
=
eval
(
"("
+
result
+
")"
);
switch
(
json
.
code
)
{
case
1
:
// var path=cdn+;
send
(
json
.
imgkey
,
2002
);
$
(
"#img"
).
val
(
''
);
break
;
default
:
system
(
json
.
msg
);
$
(
"#img"
).
val
(
''
);
break
;
}
}
else
{
system
(
xhr
.
status
);
tips
(
"上传发生错误"
+
xhr
.
status
,
"error"
,
3000
);
}
};
xhr
.
onerror
=
function
(
e
)
{
tips
(
"上传发生错误"
+
e
,
"error"
,
3000
);
};
xhr
.
send
(
formdata
);
}
...
...
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