Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
5b33ca13
Commit
5b33ca13
authored
4 years ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ee9a257f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
100 deletions
+106
-100
index.js
src/plug/index.js
+106
-100
No files found.
src/plug/index.js
View file @
5b33ca13
...
...
@@ -137,7 +137,7 @@ export default {
var
index
=
filename
.
lastIndexOf
(
"."
);
var
suffix
=
filename
.
substr
(
index
);
var
timestamp1
=
Date
.
parse
(
new
Date
());
var
newFileName
=
'/Upload/'
+
path
+
"/"
+
timestamp1
+
""
+
suffix
;
var
newFileName
=
'/Upload/'
+
path
+
"/"
+
timestamp1
+
""
+
suffix
;
var
uploadMsg
=
{
Bucket
:
"viitto-1301420277"
,
Region
:
"ap-chengdu"
,
...
...
@@ -160,9 +160,9 @@ export default {
},
function
(
err
,
data
)
{
if
(
data
&&
data
.
statusCode
==
200
)
{
var
uploadResult
=
{
resultCode
:
1
,
resultCode
:
1
,
FileName
:
fileObj
.
name
,
FileUrl
:
"http://"
+
data
.
Location
FileUrl
:
"http://"
+
data
.
Location
}
if
(
callback
)
{
callback
(
uploadResult
);
...
...
@@ -174,7 +174,7 @@ export default {
});
},
//公用跳转
Vue
.
prototype
.
CommonJump
=
function
(
path
,
obj
)
{
Vue
.
prototype
.
CommonJump
=
function
(
path
,
obj
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
obj
...
...
@@ -196,9 +196,13 @@ export default {
}
var
token
=
""
;
var
key
=
""
;
var
MallBaseId
=
"0"
;
//小程序ID
var
TenantId
=
"0"
;
//商户Id
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
Token
;
key
=
this
.
getLocalStorage
().
SecretKey
;
MallBaseId
=
this
.
getLocalStorage
().
MallBaseId
;
TenantId
=
this
.
getLocalStorage
().
TenantId
;
}
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
...
...
@@ -217,6 +221,8 @@ export default {
"sign"
:
md5Str
,
"languageId"
:
tempLanguage
,
"cmd"
:
cmd
,
"MallBaseId"
:
MallBaseId
,
"TenantId"
:
TenantId
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
...
...
@@ -236,7 +242,7 @@ export default {
}
},
faildCall
)
}
Vue
.
prototype
.
JavaGetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
Vue
.
prototype
.
JavaGetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
var
apiurl
=
this
.
domainManager
().
JavaLocalFileStreamDownLoadUrl
+
cmd
;
var
timestamp
=
(
new
Date
()).
valueOf
();
if
(
!
localStorage
.
mall_userInfo
&&
localStorage
.
mall_userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
...
...
@@ -282,7 +288,7 @@ export default {
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
}).
catch
(
function
(
res
)
{});
}
}
}
This diff is collapsed.
Click to expand it.
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