Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
baoss
5 years ago
Commit
294da2eb0ff256c0016ce6127877601d89d65e5e
2 parents
e6112b1b
1a8ef3ea
Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
apps/app.vue
apps/store/product/actions.js
apps/store/yoho/index.js
apps/app.vue
View file @
294da2e
<template>
<div id="app">
<transition
:name="`route-view-${yoho.direction}`">
<keep-alive :max="20">
<router-view :key="routerViewKey"></router-view>
</keep-alive>
</transition>
<keep-alive :max="20">
<router-view :key="routerViewKey"></router-view>
</keep-alive>
</div>
</template>
...
...
apps/store/product/actions.js
View file @
294da2e
...
...
@@ -15,7 +15,7 @@ export default {
content_code
:
'05e4f5782dfc3a5e10d39b8f04a7dcb9'
,
};
}
return
this
.
$api
.
ge
t
(
`
/
api
/
ufo
/
product$
{
path
}
`
,
params
).
then
(
result
=>
{
return
this
.
$api
.
pos
t
(
`
/
api
/
ufo
/
product$
{
path
}
`
,
params
).
then
(
result
=>
{
if
(
result
.
code
===
200
)
{
return
result
.
data
;
}
else
{
...
...
@@ -35,7 +35,7 @@ export default {
}));
},
async
fetchRecommendProduct
({
commit
},
{
productId
})
{
const
result
=
await
this
.
$api
.
ge
t
(
'/api/ufo/product/recommend'
,
{
product_id
:
productId
})
const
result
=
await
this
.
$api
.
pos
t
(
'/api/ufo/product/recommend'
,
{
product_id
:
productId
})
return
result
?.
data
?.
product_list
??
[]
},
...
...
@@ -52,7 +52,7 @@ export default {
return
false
;
}
const
isFav
=
await
this
.
$api
.
ge
t
(
'/api/ufo/product/fav'
,
{
productId
}).
then
(
result
=>
{
const
isFav
=
await
this
.
$api
.
pos
t
(
'/api/ufo/product/fav'
,
{
productId
}).
then
(
result
=>
{
if
(
result
.
code
===
200
)
{
return
result
.
data
;
}
else
{
...
...
@@ -63,7 +63,7 @@ export default {
commit
(
Types
.
UPDATE_PRODUCT_FAV
,
{
productId
,
isFav
});
},
async
fetchTop3
({
commit
},
{
productId
})
{
const
result
=
await
this
.
$api
.
ge
t
(
'/api/ufo/product/top'
,
{
product_id
:
productId
});
const
result
=
await
this
.
$api
.
pos
t
(
'/api/ufo/product/top'
,
{
product_id
:
productId
});
if
(
result
.
code
===
200
)
{
const
productList
=
result
.
data
.
product_list
||
[];
...
...
@@ -72,7 +72,7 @@ export default {
}
},
async
toggleFav
({
commit
},
{
productId
,
isFav
})
{
const
result
=
await
this
.
$api
.
ge
t
(
`
/
api
/
ufo
/
product
/
favorite
/
$
{
isFav
?
'add'
:
'cancel'
}
`
,
{
productId
});
const
result
=
await
this
.
$api
.
pos
t
(
`
/
api
/
ufo
/
product
/
favorite
/
$
{
isFav
?
'add'
:
'cancel'
}
`
,
{
productId
});
if
(
result
&&
result
.
code
===
200
)
{
commit
(
Types
.
UPDATE_PRODUCT_FAV
,
{
productId
,
isFav
});
...
...
@@ -106,7 +106,7 @@ export default {
async
requestSize
({
state
},
{
product_id
,
goods_id
,
size_ids
})
{
const
selectedProduct
=
state
.
selectedProductInfo
;
await
this
.
$api
.
ge
t
(
'/api/ufo/product/addsize'
,
{
await
this
.
$api
.
pos
t
(
'/api/ufo/product/addsize'
,
{
product_id
,
goods_id
,
size_ids
,
...
...
apps/store/yoho/index.js
View file @
294da2e
...
...
@@ -232,7 +232,7 @@ export default function(mergeState = {}) {
let
isEnabled
=
!!
state
.
sysConfig
.
enableQiugou
;
if
(
state
.
sysConfig
.
enableQiugou
===
null
)
{
const
resp
=
await
this
.
$api
.
ge
t
(
'/api/sys/config'
,
{
const
resp
=
await
this
.
$api
.
pos
t
(
'/api/sys/config'
,
{
code
:
'bid_switch_h5'
,
});
...
...
Please
register
or
login
to post a comment