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
TaoHuang
5 years ago
Commit
e8ecd8a00a3dc3e4f6efae7926c828f64ca0092e
2 parents
50304092
1c925aa3
Merge remote-tracking branch 'origin/develop' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
9 deletions
apps/pages/product/components/action-sheet.vue
apps/pages/product/components/size-select-sheet.vue
apps/pages/product/product-detail.vue
apps/store/product/actions.js
config/product-api-map.js
apps/pages/product/components/action-sheet.vue
View file @
e8ecd8a
...
...
@@ -72,14 +72,29 @@ export default {
opacity: 0;
}
.cube-action-sheet-fade-enter-active, .cube-action-sheet-fade-leave-active {
transition: all 0.3s ease-in-out;
.cube-action-sheet-fade-enter-active {
transition: all 0.4s cubic-bezier(0, 0.96, 0.14, 1.06);
}
.cube-action-sheet-fade-leave-active {
transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.cube-action-sheet-panel {
background: #fff;
border-top-left-radius: 20px 24px;
border-top-right-radius: 20px 24px;
&:after {
content: "";
width: 100%;
height: 200px;
position: absolute;
left: 0;
bottom: -200px;
z-index: -1;
background: #fff;
}
}
.cube-action-sheet-bottom-enter, .cube-action-sheet-bottom-leave-active {
...
...
@@ -90,12 +105,18 @@ export default {
transform: translate3d(100%, 0, 0);
}
.cube-action-sheet-bottom-enter-active, .cube-action-sheet-bottom-leave-active,
.cube-action-sheet-right-enter-active, .cube-action-sheet-right-leave-active {
transition: all 0.3s ease-in-out;
.cube-action-sheet-bottom-enter-active,
.cube-action-sheet-right-enter-active {
transition: all 0.4s cubic-bezier(0, 0.96, 0.14, 1.06);
}
.cube-action-sheet-bottom-leave-active,
.cube-action-sheet-right-leave-active {
transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
/deep/ .cube-popup-mask {
opacity: 0.2;
background-color: rgba(0, 0, 0, 0.5);
opacity: 1;
}
</style>
...
...
apps/pages/product/components/size-select-sheet.vue
View file @
e8ecd8a
...
...
@@ -139,6 +139,7 @@ export default {
this.$emit('select', {
productId: this.product.product_id,
storageId: this.selectedSize.storage_id,
skup: this.selectedSize.skup,
});
},
convertToCash() {
...
...
apps/pages/product/product-detail.vue
View file @
e8ecd8a
...
...
@@ -183,7 +183,7 @@ export default {
}
},
methods: {
...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct']),
...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct'
, 'payment'
]),
refresh() {
this.$refs.slide.refresh();
this.headThumbnailVisible = false;
...
...
@@ -286,7 +286,42 @@ export default {
};
this.showSizeSelectSheet = true;
},
onSelectTradeProduct(tradeProduct) {
async onSelectTradeProduct(tradeProduct) {
try {
const info = await this.payment({
skup: tradeProduct.skup,
});
if (info.code !== 200) {
return this.$createDialog({
type: 'confirm',
content: info.message,
confirmBtn: {
text: '查看订单',
active: true,
disabled: false,
href: 'javascript:;'
},
cancelBtn: {
text: '取消',
active: false,
disabled: false,
href: 'javascript:;'
},
onConfirm: () => {
this.$router.push({
name: 'OrderList',
params: {
owner: this.selectSizeConfig.type,
},
});
this.showSizeSelectSheet = false;
},
}).show();
}
} catch (e) {
}
this.$router.push({
name: this.selectSizeConfig.dest,
query: tradeProduct
...
...
apps/store/product/actions.js
View file @
e8ecd8a
...
...
@@ -103,4 +103,7 @@ export default {
// 忽略错误
},
async
payment
(
context
,
{
skup
})
{
return
this
.
$api
.
post
(
'/api/ufo/product/order/payment'
,
{
skup
,
api_version
:
1
});
},
};
...
...
config/product-api-map.js
View file @
e8ecd8a
...
...
@@ -121,5 +121,19 @@ module.exports = {
ufo
:
true
,
auth
:
true
,
api
:
'ufo.order.getAllCnt'
,
}
params
:
{
tabType
:
{
type
:
String
}
// sell|buy
},
},
// 下单
'/api/ufo/product/order/payment'
:
{
ufo
:
true
,
auth
:
true
,
api
:
'ufo.order.payment'
,
path
:
'shopping'
,
params
:
{
skup
:
{
type
:
Number
},
},
},
};
...
...
Please
register
or
login
to post a comment