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
7d300bd0
Commit
7d300bd0
authored
May 21, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件上传修改
parent
4cbf4509
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
45 deletions
+41
-45
index.js
src/plug/index.js
+41
-45
No files found.
src/plug/index.js
View file @
7d300bd0
...
...
@@ -51,14 +51,12 @@ export default {
this
.
Info
(
"已取消操作"
);
});
},
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
"http://192.168.10.68:5000"
;
domainUrl
=
"https://mallapi.oytour.com"
;
let
javaUrl
=
'http://192.168.10.214:8018'
;
let
vtUploadUrl
=
"http://192.168.5.46:8120"
;
let
vtViewUrl
=
"http://192.168.5.46:8130"
;
let
domainUrl
=
"http://192.168.5.46:8200"
;
let
javaUrl
=
'http://192.168.5.214:8018'
;
let
vtUploadUrl
=
"http://192.168.5.214:8120"
;
let
vtViewUrl
=
"http://192.168.5.214:8130"
;
let
locationName
=
window
.
location
.
hostname
;
if
(
locationName
.
indexOf
(
'testmall.oytour'
)
!==
-
1
)
{
...
...
@@ -254,7 +252,7 @@ export default {
var
uploadResult
=
{
resultCode
:
1
,
FileName
:
fileObj
.
name
,
FileUrl
:
res
.
data
.
FilePath
,
FileUrl
:
res
.
data
.
FilePath
,
VideoCoverImg
:
that
.
domainManager
().
VTViewUrl
+
res
.
data
.
VideoCoverImg
}
if
(
callback
)
{
...
...
@@ -282,7 +280,7 @@ export default {
var
uploadResult
=
{
resultCode
:
1
,
FileName
:
fileObj
.
name
,
FileUrl
:
res
.
data
.
FilePath
,
FileUrl
:
res
.
data
.
FilePath
,
VideoCoverImg
:
that
.
domainManager
().
VTViewUrl
+
res
.
data
.
VideoCoverImg
}
if
(
successCall
)
{
...
...
@@ -314,8 +312,6 @@ export default {
}
//HTTP提交数据
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
var
apiurl
=
this
.
domainManager
().
DomainUrl
+
cmd
;
var
postData
=
this
.
GetPostData
(
cmd
,
msg
,
""
);
this
.
$http
.
post
(
apiurl
,
postData
,
{
...
...
@@ -581,41 +577,41 @@ export default {
successCall
(
res
);
}
},
faildCall
)
},
Vue
.
prototype
.
Get_i_Data
=
function
(
cmd
,
msg
,
newCmd
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
var
timestamp
=
(
new
Date
()).
valueOf
();
let
apiData
=
{}
if
(
localStorage
.
getItem
(
'iframeData'
))
{
apiData
=
JSON
.
parse
(
localStorage
.
getItem
(
'iframeData'
))
}
var
token
=
apiData
.
token
;
var
key
=
""
;
var
TenantId
=
"0"
;
//商户Id
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
cmdStr
=
""
;
if
(
newCmd
)
{
cmdStr
=
newCmd
;
}
var
postData
=
{
msg
:
msg
,
timestamp
:
timestamp
,
token
:
token
,
sign
:
md5Str
,
languageId
:
0
,
cmd
:
cmdStr
,
MallBaseId
:
5
,
TenantId
:
TenantId
,
EmpId
:
0
,
//员工编号【员工登录时使用】
SmallShopsId
:
0
,
MiniAppId
:
"wxbb033190e0ffa5db"
,
OpenId
:
"ow_7I5cKHQJeQlNJOKoeERRhe6SA"
,
UserId
:
21382
,
}
return
postData
}
Vue
.
prototype
.
Get_i_Data
=
function
(
cmd
,
msg
,
newCmd
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
var
timestamp
=
(
new
Date
()).
valueOf
();
let
apiData
=
{}
if
(
localStorage
.
getItem
(
'iframeData'
))
{
apiData
=
JSON
.
parse
(
localStorage
.
getItem
(
'iframeData'
))
}
var
token
=
apiData
.
token
;
var
key
=
""
;
var
TenantId
=
"0"
;
//商户Id
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
cmdStr
=
""
;
if
(
newCmd
)
{
cmdStr
=
newCmd
;
}
var
postData
=
{
msg
:
msg
,
timestamp
:
timestamp
,
token
:
token
,
sign
:
md5Str
,
languageId
:
0
,
cmd
:
cmdStr
,
MallBaseId
:
5
,
TenantId
:
TenantId
,
EmpId
:
0
,
//员工编号【员工登录时使用】
SmallShopsId
:
0
,
MiniAppId
:
"wxbb033190e0ffa5db"
,
OpenId
:
"ow_7I5cKHQJeQlNJOKoeERRhe6SA"
,
UserId
:
21382
,
}
return
postData
}
}
}
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