Authored by TaoHuang

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -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>
... ...
... ... @@ -139,6 +139,7 @@ export default {
this.$emit('select', {
productId: this.product.product_id,
storageId: this.selectedSize.storage_id,
skup: this.selectedSize.skup,
});
},
convertToCash() {
... ...
... ... @@ -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
... ...
... ... @@ -103,4 +103,7 @@ export default {
// 忽略错误
},
async payment(context, {skup}) {
return this.$api.post('/api/ufo/product/order/payment', {skup, api_version: 1});
},
};
... ...
... ... @@ -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},
},
},
};
... ...