Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6fe53209
authored
Sep 18, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 修复
1 parent
49bee694
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
24 deletions
api/request/http.js
env.js
pages/boutique/components/Reception.vue
pages/boutique/components/SkuBox.vue
pages/boutique/index.vue
pages/equity/detail/detail.vue
store/modules/user.js
api/request/http.js
View file @
6fe5320
...
@@ -14,13 +14,13 @@ const HOST = {
...
@@ -14,13 +14,13 @@ const HOST = {
ip
:
"http://192.168.1.169:8292"
,
ip
:
"http://192.168.1.169:8292"
,
};
};
class
Request
{
class
Request
{
get
(
params
,
returnAll
=
false
,
hostType
)
{
get
(
params
,
returnAll
=
false
,
hostType
)
{
return
this
.
request
(
"GET"
,
params
,
returnAll
,
hostType
);
return
this
.
request
(
"GET"
,
params
,
returnAll
,
hostType
);
}
}
post
(
params
,
returnAll
=
false
,
hostType
)
{
post
(
params
,
returnAll
=
false
,
hostType
)
{
return
this
.
request
(
"POST"
,
params
,
returnAll
,
hostType
);
return
this
.
request
(
"POST"
,
params
,
returnAll
,
hostType
);
}
}
fetch
(
method
,
data
,
returnAll
=
true
,
hostType
)
{
fetch
(
method
,
data
,
returnAll
=
true
,
hostType
)
{
return
this
.
post
(
return
this
.
post
(
{
{
method
,
method
,
...
@@ -30,11 +30,11 @@ class Request {
...
@@ -30,11 +30,11 @@ class Request {
hostType
hostType
);
);
}
}
request
(
RequestMethods
,
params
,
returnAll
,
hostType
=
"dj"
)
{
request
(
RequestMethods
,
params
,
returnAll
,
hostType
=
"dj"
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
_this
=
this
;
let
_this
=
this
;
uni
.
getNetworkType
({
uni
.
getNetworkType
({
success
(
res
)
{
success
(
res
)
{
if
(
res
.
networkType
==
"none"
)
{
if
(
res
.
networkType
==
"none"
)
{
uni
.
hideLoading
();
uni
.
hideLoading
();
// uni.showToast({
// uni.showToast({
...
@@ -63,10 +63,16 @@ class Request {
...
@@ -63,10 +63,16 @@ class Request {
header
,
header
,
dataType
:
"json"
,
dataType
:
"json"
,
responseType
:
"text"
,
responseType
:
"text"
,
success
(
response
)
{
success
(
response
)
{
/**业务代码 */
/**业务代码 */
let
{
data
}
=
response
;
let
{
data
,
statusCode
}
=
response
;
if
(
!
data
)
return
reject
();
if
(
!
data
||
statusCode
!=
200
)
{
uni
.
hideLoading
()
let
errMsg
=
''
if
(
!
data
)
errMsg
=
'获取数据失败,请重试。'
else
errMsg
=
'服务器暂时不可用,请稍后再次尝试。'
return
reject
(
errMsg
);
}
let
{
code
,
message
}
=
data
;
let
{
code
,
message
}
=
data
;
if
(
returnAll
)
{
if
(
returnAll
)
{
resolve
(
data
);
resolve
(
data
);
...
@@ -89,7 +95,7 @@ class Request {
...
@@ -89,7 +95,7 @@ class Request {
}
}
}
}
},
},
fail
(
error
)
{
fail
(
error
)
{
uni
.
hideLoading
();
uni
.
hideLoading
();
console
.
error
(
`
${
params
.
method
}
接口异常:`
,
error
);
console
.
error
(
`
${
params
.
method
}
接口异常:`
,
error
);
uni
.
showToast
({
uni
.
showToast
({
...
@@ -103,7 +109,7 @@ class Request {
...
@@ -103,7 +109,7 @@ class Request {
});
});
reject
(
error
);
reject
(
error
);
},
},
complete
()
{
complete
()
{
uni
.
stopPullDownRefresh
();
uni
.
stopPullDownRefresh
();
},
},
});
});
...
@@ -111,7 +117,7 @@ class Request {
...
@@ -111,7 +117,7 @@ class Request {
});
});
});
});
}
}
getData
(
params
,
hostType
=
"scrm"
)
{
getData
(
params
,
hostType
=
"scrm"
)
{
let
projectName
=
params
.
projectName
;
let
projectName
=
params
.
projectName
;
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
);
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
);
else
delete
params
.
projectName
;
else
delete
params
.
projectName
;
...
@@ -143,11 +149,11 @@ class Request {
...
@@ -143,11 +149,11 @@ class Request {
params
.
appKey
=
appKey
;
params
.
appKey
=
appKey
;
return
sign
(
params
,
secret
,
noSignAttr
);
return
sign
(
params
,
secret
,
noSignAttr
);
}
}
getRopProject
(
method
)
{
getRopProject
(
method
)
{
const
projectName
=
method
.
split
(
"."
)[
2
];
const
projectName
=
method
.
split
(
"."
)[
2
];
return
projectName
;
return
projectName
;
}
}
uni_request
({
uni_request
({
url
,
url
,
method
=
"GET"
,
method
=
"GET"
,
data
=
{},
data
=
{},
...
@@ -163,7 +169,7 @@ class Request {
...
@@ -163,7 +169,7 @@ class Request {
header
,
header
,
dataType
,
dataType
,
responseType
,
responseType
,
success
(
response
)
{
success
(
response
)
{
resolve
(
response
.
data
);
resolve
(
response
.
data
);
},
},
});
});
...
...
env.js
View file @
6fe5320
const
target
=
[
"ip"
,
"dev"
,
"uat"
,
"prod"
,
"beta"
];
const
target
=
[
"ip"
,
"dev"
,
"uat"
,
"prod"
,
"beta"
];
const
index
=
1
;
const
index
=
2
;
/**
/**
*
*
0本地
0本地
...
...
pages/boutique/components/Reception.vue
View file @
6fe5320
...
@@ -141,7 +141,7 @@ export default {
...
@@ -141,7 +141,7 @@ export default {
immediate
:
true
,
immediate
:
true
,
handler
(
newval
)
{
handler
(
newval
)
{
if
(
newval
)
{
if
(
newval
)
{
if
(
newval
&&
this
.
currentItem
)
this
.
changePreView
(
this
.
currentItem
)
if
(
newval
&&
this
.
currentItem
)
this
.
changePreView
(
this
.
currentItem
,
false
)
}
}
}
}
}
}
...
@@ -181,13 +181,12 @@ export default {
...
@@ -181,13 +181,12 @@ export default {
this
.
currentCarString
=
item
this
.
currentCarString
=
item
this
.
updateViewKey
=
Date
.
now
()
this
.
updateViewKey
=
Date
.
now
()
},
},
changePreView
(
e
)
{
changePreView
(
e
,
leave
=
true
)
{
let
{
currentItem
}
=
this
,
let
{
currentItem
}
=
this
,
{
id
,
carModelName
,
name
,
materialType
}
=
e
,
{
id
,
carModelName
,
name
,
materialType
}
=
e
,
key
=
`
${
carModelName
}
_
${
id
}
`
,
key
=
`
${
carModelName
}
_
${
id
}
`
,
value
=
this
.
receptionTrack
[
key
]
value
=
this
.
receptionTrack
[
key
]
if
(
currentItem
)
this
.
previewLeave
(
currentItem
)
if
(
currentItem
&&
leave
)
this
.
previewLeave
(
currentItem
)
this
.
currentItem
=
e
this
.
currentItem
=
e
this
.
updateViewKey
=
Date
.
now
()
this
.
updateViewKey
=
Date
.
now
()
if
(
this
.
isPreview
)
return
if
(
this
.
isPreview
)
return
...
...
pages/boutique/components/SkuBox.vue
View file @
6fe5320
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<view
:class=
"['block',blockClass]"
></view>
<view
:class=
"['block',blockClass]"
></view>
<template
v-for=
"(i,index) in boutiqueMediaConfig[currentCar]"
>
<template
v-for=
"(i,index) in boutiqueMediaConfig[currentCar]"
>
<view
<view
class=
"first-type-item flex
"
:class=
"['first-type-item flex',
{active:i.tabId == tabId}]
"
:key="index"
:key="index"
@click="changeTabId(i.tabId,index)"
@click="changeTabId(i.tabId,index)"
>
>
...
@@ -274,11 +274,15 @@ export default {
...
@@ -274,11 +274,15 @@ export default {
line-height
:
44
rpx
;
line-height
:
44
rpx
;
position
:
relative
;
position
:
relative
;
z-index
:
2
;
z-index
:
2
;
opacity
:
.7
;
.sprite-icon
{
.sprite-icon
{
margin-bottom
:
12
rpx
;
margin-bottom
:
12
rpx
;
transform
:
scale
(
1.45
);
transform
:
scale
(
1.45
);
}
}
}
}
.active
{
opacity
:
1
;
}
.block
{
.block
{
width
:
280
rpx
;
width
:
280
rpx
;
height
:
160
rpx
;
height
:
160
rpx
;
...
...
pages/boutique/index.vue
View file @
6fe5320
...
@@ -506,7 +506,7 @@ export default {
...
@@ -506,7 +506,7 @@ export default {
position
:
relative
;
position
:
relative
;
padding-top
:
58
rpx
;
padding-top
:
58
rpx
;
.config-box
{
.config-box
{
animation
:
show-config-box
0
.5s
forwards
;
animation
:
show-config-box
1
.5s
forwards
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
position
:
absolute
;
position
:
absolute
;
...
@@ -515,11 +515,9 @@ export default {
...
@@ -515,11 +515,9 @@ export default {
}
}
@keyframes
show-config-box
{
@keyframes
show-config-box
{
0
%
{
0
%
{
transform
:
scale
(
10
);
opacity
:
0
;
opacity
:
0
;
}
}
100
%
{
100
%
{
transform
:
scale
(
1
);
opacity
:
1
;
opacity
:
1
;
}
}
}
}
...
...
pages/equity/detail/detail.vue
View file @
6fe5320
...
@@ -191,6 +191,7 @@ export default {
...
@@ -191,6 +191,7 @@ export default {
this
.
showPayPage
=
false
this
.
showPayPage
=
false
this
.
$refs
.
toolRef
.
hide
()
this
.
$refs
.
toolRef
.
hide
()
this
.
$refs
.
stepRef
.
close
()
this
.
$refs
.
stepRef
.
close
()
this
.
receptionTrackLeave
()
this
.
$emit
(
'done'
,
e
)
this
.
$emit
(
'done'
,
e
)
},
},
toPay
()
{
toPay
()
{
...
...
store/modules/user.js
View file @
6fe5320
...
@@ -80,7 +80,7 @@ export default {
...
@@ -80,7 +80,7 @@ export default {
},
},
setReceptionTrack
({
state
},
{
key
,
value
})
{
setReceptionTrack
({
state
},
{
key
,
value
})
{
state
.
receptionTrack
[
key
]
=
value
state
.
receptionTrack
[
key
]
=
value
console
.
log
(
state
.
receptionTrack
,
'触发埋点'
)
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
state
.
receptionTrack
))
)
},
},
clearReceptionTrack
({
state
})
{
clearReceptionTrack
({
state
})
{
state
.
receptionTrack
=
{}
state
.
receptionTrack
=
{}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment