Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
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
华国豪
CRM
Commits
8ca738ae
Commit
8ca738ae
authored
Oct 08, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
域名调整
parent
0f36fc1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
76 deletions
+81
-76
contractManagement.vue
src/components/contractManagement/contractManagement.vue
+2
-6
domainManager.js
src/plugins/domainManager.js
+19
-10
index.js
src/plugins/index.js
+60
-60
No files found.
src/components/contractManagement/contractManagement.vue
View file @
8ca738ae
...
...
@@ -312,12 +312,8 @@
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
this
.
dataList
.
forEach
(
x
=>
{
let
Url
=
"http://admin.oytour.com"
;
if
(
this
.
isOnline
())
{
Url
=
Url
+
'/#/TravelContractConfirm?ContractId='
+
x
.
ID
;
}
else
{
Url
=
Url
+
":8081/"
+
'#/TravelContractConfirm?ContractId='
+
x
.
ID
;
}
let
Url
=
this
.
domainManager
().
erpRoutingUrl
;
Url
=
Url
+
'/#/TravelContractConfirm?ContractId='
+
x
.
ID
;
x
.
Url
=
Url
;
})
this
.
tableData
=
this
.
dataList
...
...
src/plugins/domainManager.js
View file @
8ca738ae
const
isOnline
=
function
()
{
const
isOnline
=
function
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
;
}
export
default
function
()
{
export
default
function
()
{
//CRM API
let
domainUrl
=
""
;
// domainUrl = "http://192.168.10.46:8500";
// domainUrl = "http://192.168.10.128:5003";
domainUrl
=
"http://192.168.10.9:8098"
;
// domainUrl = "http://crm.oytour.com"
//domainUrl = "http://localhost:5003";
domainUrl
=
"http://192.168.5.46:5003"
;
let
locationName
=
window
.
location
.
hostname
;
//旅游ERPApi
let
domainPostUrl
=
""
domainPostUrl
=
"http://192.168.10.9:8083"
;
//domainPostUrl = "http://192.168.10.46";
domainPostUrl
=
"http://192.168.5.46"
;
if
(
isOnline
())
{
if
(
window
.
location
.
host
.
indexOf
(
'fcrmyx.oytour.com'
)
!=
-
1
)
{
domainUrl
=
"http://crm.oytour.com"
...
...
@@ -23,6 +18,20 @@ export default function() {
domainPostUrl
=
"http://testapi.oytour.com"
}
}
let
erpRoutingUrl
=
""
;
var
storageUser
=
this
.
getLocalStorage
();
if
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
)
{
erpRoutingUrl
=
"http://admin.oytour.com/#/"
;
if
(
storageUser
&&
storageUser
.
ERPUrl
)
{
erpRoutingUrl
=
storageUser
.
ERPUrl
+
"/#/"
;
}
}
else
{
erpRoutingUrl
=
"http://localhost:8080/#/"
;
if
(
storageUser
&&
storageUser
.
ERPUrl
)
{
erpRoutingUrl
=
storageUser
.
ERPUrl
+
"/#/"
;
}
}
var
obj
=
{
//主地址
DomainUrl
:
domainUrl
,
...
...
@@ -37,7 +46,7 @@ export default function() {
javaUrl
:
locationName
.
indexOf
(
'testb2b'
)
==
-
1
?
"http://efficient.oytour.com"
:
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://47.96.12.235:9001"
:
"http://192.168.10.215:9000"
,
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://staticfile.oytour.com"
:
'http://192.168.10.214:8130'
,
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://uploadfile.oytour.com"
:
"http://192.168.10.214:8120"
,
erpRoutingUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'testb2b.oytour.com'
)
!==
-
1
?
"http://admin.oytour.com/#/"
:
"http://localhost:8081/#/"
// "http://www.test.com:8081/#/",
erpRoutingUrl
:
erpRoutingUrl
};
return
obj
;
}
\ No newline at end of file
src/plugins/index.js
View file @
8ca738ae
...
...
@@ -7,14 +7,14 @@ export default {
},
domainManager
,
install
(
Vue
,
options
)
{
Vue
.
prototype
.
isOnline
=
function
()
{
Vue
.
prototype
.
isOnline
=
function
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
;
},
//域名管理对象
Vue
.
prototype
.
domainManager
=
domainManager
,
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -22,7 +22,7 @@ export default {
});
},
//错误提示
Vue
.
prototype
.
Error
=
function
(
msg
)
{
Vue
.
prototype
.
Error
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -31,7 +31,7 @@ export default {
},
//一般提示
Vue
.
prototype
.
Info
=
function
(
msg
)
{
Vue
.
prototype
.
Info
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -39,7 +39,7 @@ export default {
});
},
//警告提示
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
...
...
@@ -47,7 +47,7 @@ export default {
});
},
//Confirm
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
this
.
$confirm
(
msg
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
...
...
@@ -67,7 +67,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
Vue
.
prototype
.
compressImg
=
function
(
path
,
type
,
w
,
h
)
{
let
url
=
this
.
domainManager
().
UploadUrl
;
let
poise
=
'width='
;
w
=
w
?
w
:
''
...
...
@@ -82,7 +82,7 @@ export default {
//旅游ERP接口
Vue
.
prototype
.
apipost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
Vue
.
prototype
.
apipost2
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -131,7 +131,7 @@ export default {
}
//CRM接口
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -174,7 +174,7 @@ export default {
},
// 自动登录HTTP提交数据
Vue
.
prototype
.
apipostLogin
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apipostLogin
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -217,7 +217,7 @@ export default {
},
//Java接口
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
Vue
.
prototype
.
apiJavaPost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -269,7 +269,7 @@ export default {
},
//下载文件
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
callBack
)
{
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
callBack
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
...
...
@@ -311,57 +311,57 @@ export default {
};
callBack
(
result
);
}
}).
catch
(
function
(
res
)
{
}).
catch
(
function
(
res
)
{
console
.
log
(
"GetLocalFile"
,
res
);
});
}
//erp下载文件
Vue
.
prototype
.
GetLocalFile2
=
function
(
cmd
,
msg
,
fileName
,
callBack
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
var
apiurl
=
this
.
domainManager
().
ERPApiUrlFile
;
var
timestamp
=
(
new
Date
()).
valueOf
();
var
token
=
""
;
var
key
=
""
;
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
token
;
key
=
this
.
getLocalStorage
().
SecretKey
;
}
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
postData
=
{
"cmd"
:
cmd
,
"msg"
:
msg
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
md5Str
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Referer-Viitto'
:
this
.
$route
.
path
,
},
responseType
:
'blob'
}).
then
((
res
)
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
"application/vnd.ms-excel"
})
let
url
=
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
if
(
callBack
)
{
var
result
=
{
Code
:
1
};
callBack
(
result
);
}
}).
catch
(
function
(
res
)
{
console
.
log
(
"GetLocalFile"
,
res
);
});
//erp下载文件
Vue
.
prototype
.
GetLocalFile2
=
function
(
cmd
,
msg
,
fileName
,
callBack
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
var
apiurl
=
this
.
domainManager
().
ERPApiUrlFile
;
var
timestamp
=
(
new
Date
()).
valueOf
();
var
token
=
""
;
var
key
=
""
;
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
token
;
key
=
this
.
getLocalStorage
().
SecretKey
;
}
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
postData
=
{
"cmd"
:
cmd
,
"msg"
:
msg
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
md5Str
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Referer-Viitto'
:
this
.
$route
.
path
,
},
responseType
:
'blob'
}).
then
((
res
)
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
"application/vnd.ms-excel"
})
let
url
=
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
if
(
callBack
)
{
var
result
=
{
Code
:
1
};
callBack
(
result
);
}
}).
catch
(
function
(
res
)
{
console
.
log
(
"GetLocalFile"
,
res
);
});
}
}
}
\ No newline at end of file
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