Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WX_h5
Project
Project
Details
Activity
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
godwithdh
WX_h5
Commits
d9dbfb3b
Commit
d9dbfb3b
authored
Mar 23, 2020
by
张锡奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upload
parent
71209afb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
host.js
src/libs/host.js
+2
-2
http.js
src/libs/http.js
+8
-4
main.js
src/main.js
+4
-1
track.vue
src/view/tiip/profitAnalysis/track.vue
+2
-0
No files found.
src/libs/host.js
View file @
d9dbfb3b
...
@@ -14,8 +14,8 @@ function urlFun(name){
...
@@ -14,8 +14,8 @@ function urlFun(name){
*/
*/
// default:`http://192.168.4.34:5001`,
// default:`http://192.168.4.34:5001`,
// default:`https://weixin.huansi.net/apiproxy/huansi/hszh_HSFabricTradeTest`,
// default:`https://weixin.huansi.net/apiproxy/huansi/hszh_HSFabricTradeTest`,
default
:
`https://weixin.huansi.net/apiproxy/huansi/service/proxy/
${
userID
}
`
,
//
default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
default
:
`https://weixin.huansi.net/apiproxy/huansi/Tip`
,
/**
/**
* 基本地址
* 基本地址
*/
*/
...
...
src/libs/http.js
View file @
d9dbfb3b
...
@@ -14,7 +14,7 @@ Http.install = function (Vue) {
...
@@ -14,7 +14,7 @@ Http.install = function (Vue) {
* @param toast 是否提示
* @param toast 是否提示
* @returns {string}
* @returns {string}
*/
*/
Vue
.
prototype
.
request
=
function
(
method
,
opts
,
toast
,
header
)
{
Vue
.
prototype
.
request
=
function
(
method
,
opts
,
toast
,
header
=
{}
)
{
let
m
=
methodMap
[
method
];
let
m
=
methodMap
[
method
];
if
(
m
)
{
if
(
m
)
{
let
optsType
=
typeof
(
opts
);
let
optsType
=
typeof
(
opts
);
...
@@ -53,7 +53,9 @@ Http.install = function (Vue) {
...
@@ -53,7 +53,9 @@ Http.install = function (Vue) {
* @param toast 是否显示 modal
* @param toast 是否显示 modal
* @returns {Promise}
* @returns {Promise}
*/
*/
Vue
.
prototype
.
apiPost
=
function
(
url
,
data
,
toast
=
false
,
header
)
{
Vue
.
prototype
.
apiPost
=
function
(
url
,
data
,
toast
=
false
,
header
=
{})
{
!!
store
.
state
.
iProjectId
&&
(
header
.
iProjectId
=
store
.
state
.
iProjectId
);
for
(
let
x
in
header
){
for
(
let
x
in
header
){
AsInst
.
defaults
.
headers
.
common
[
x
]
=
header
[
x
];
AsInst
.
defaults
.
headers
.
common
[
x
]
=
header
[
x
];
}
}
...
@@ -91,7 +93,9 @@ Http.install = function (Vue) {
...
@@ -91,7 +93,9 @@ Http.install = function (Vue) {
* @param data 请求数据
* @param data 请求数据
* @returns {Promise}
* @returns {Promise}
*/
*/
Vue
.
prototype
.
apiGet
=
function
(
url
,
data
,
toast
=
false
,
header
)
{
Vue
.
prototype
.
apiGet
=
function
(
url
,
data
,
toast
=
false
,
header
=
{})
{
!!
store
.
state
.
iProjectId
&&
(
header
.
iProjectId
=
store
.
state
.
iProjectId
);
if
(
toast
&&
typeof
(
toast
)
===
'boolean'
)
{
if
(
toast
&&
typeof
(
toast
)
===
'boolean'
)
{
loading
();
loading
();
}
else
if
(
toast
&&
typeof
(
toast
)
===
'string'
)
{
}
else
if
(
toast
&&
typeof
(
toast
)
===
'string'
)
{
...
...
src/main.js
View file @
d9dbfb3b
...
@@ -66,8 +66,11 @@ FastClick.attach(document.body)
...
@@ -66,8 +66,11 @@ FastClick.attach(document.body)
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
if
(
to
.
pa
th
.
indexOf
(
'shopVersion'
)
!=
-
1
&&
to
.
pa
rams
.
hasOwnProperty
(
'iProjectId'
)){
if
(
to
.
params
.
hasOwnProperty
(
'iProjectId'
)){
store
.
dispatch
(
'setIproject'
,
to
.
params
.
iProjectId
);
store
.
dispatch
(
'setIproject'
,
to
.
params
.
iProjectId
);
}
else
if
(
to
.
query
.
hasOwnProperty
(
'iProjectId'
)){
console
.
log
(
to
.
query
.
iProjectId
)
store
.
dispatch
(
'setIproject'
,
to
.
query
.
iProjectId
);
}
}
if
(
to
.
name
!=
'tiipOperateDetail'
){
if
(
to
.
name
!=
'tiipOperateDetail'
){
store
.
dispatch
(
"CAHNGE_META_INFO"
,
{
title
:
to
.
meta
.
title
})
store
.
dispatch
(
"CAHNGE_META_INFO"
,
{
title
:
to
.
meta
.
title
})
...
...
src/view/tiip/profitAnalysis/track.vue
View file @
d9dbfb3b
...
@@ -157,6 +157,7 @@ import Util from '@/libs/util.js'
...
@@ -157,6 +157,7 @@ import Util from '@/libs/util.js'
import
customerTable
from
'@/components/Table'
import
customerTable
from
'@/components/Table'
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
import
{
XButton
}
from
'vux'
import
{
XButton
}
from
'vux'
import
host
from
'@/libs/host.js'
export
default
{
export
default
{
name
:
'profitAnalysisTrack'
,
name
:
'profitAnalysisTrack'
,
...
@@ -216,6 +217,7 @@ export default {
...
@@ -216,6 +217,7 @@ export default {
},
},
async
mounted
(){
async
mounted
(){
window
.
d
=
this
;
window
.
d
=
this
;
console
.
log
(
host
)
},
},
async
activated
(){
async
activated
(){
// window.removeEventListener("resize", this.renderResize, false)
// window.removeEventListener("resize", this.renderResize, false)
...
...
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