Authored by TaoHuang

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

@@ -72,14 +72,29 @@ export default { @@ -72,14 +72,29 @@ export default {
72 opacity: 0; 72 opacity: 0;
73 } 73 }
74 74
75 - .cube-action-sheet-fade-enter-active, .cube-action-sheet-fade-leave-active {  
76 - transition: all 0.3s ease-in-out; 75 + .cube-action-sheet-fade-enter-active {
  76 + transition: all 0.4s cubic-bezier(0, 0.96, 0.14, 1.06);
  77 + }
  78 +
  79 + .cube-action-sheet-fade-leave-active {
  80 + transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
77 } 81 }
78 82
79 .cube-action-sheet-panel { 83 .cube-action-sheet-panel {
80 background: #fff; 84 background: #fff;
81 border-top-left-radius: 20px 24px; 85 border-top-left-radius: 20px 24px;
82 border-top-right-radius: 20px 24px; 86 border-top-right-radius: 20px 24px;
  87 +
  88 + &:after {
  89 + content: "";
  90 + width: 100%;
  91 + height: 200px;
  92 + position: absolute;
  93 + left: 0;
  94 + bottom: -200px;
  95 + z-index: -1;
  96 + background: #fff;
  97 + }
83 } 98 }
84 99
85 .cube-action-sheet-bottom-enter, .cube-action-sheet-bottom-leave-active { 100 .cube-action-sheet-bottom-enter, .cube-action-sheet-bottom-leave-active {
@@ -90,12 +105,18 @@ export default { @@ -90,12 +105,18 @@ export default {
90 transform: translate3d(100%, 0, 0); 105 transform: translate3d(100%, 0, 0);
91 } 106 }
92 107
93 - .cube-action-sheet-bottom-enter-active, .cube-action-sheet-bottom-leave-active,  
94 - .cube-action-sheet-right-enter-active, .cube-action-sheet-right-leave-active {  
95 - transition: all 0.3s ease-in-out; 108 + .cube-action-sheet-bottom-enter-active,
  109 + .cube-action-sheet-right-enter-active {
  110 + transition: all 0.4s cubic-bezier(0, 0.96, 0.14, 1.06);
  111 + }
  112 +
  113 + .cube-action-sheet-bottom-leave-active,
  114 + .cube-action-sheet-right-leave-active {
  115 + transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
96 } 116 }
97 117
98 /deep/ .cube-popup-mask { 118 /deep/ .cube-popup-mask {
99 - opacity: 0.2; 119 + background-color: rgba(0, 0, 0, 0.5);
  120 + opacity: 1;
100 } 121 }
101 </style> 122 </style>
@@ -139,6 +139,7 @@ export default { @@ -139,6 +139,7 @@ export default {
139 this.$emit('select', { 139 this.$emit('select', {
140 productId: this.product.product_id, 140 productId: this.product.product_id,
141 storageId: this.selectedSize.storage_id, 141 storageId: this.selectedSize.storage_id,
  142 + skup: this.selectedSize.skup,
142 }); 143 });
143 }, 144 },
144 convertToCash() { 145 convertToCash() {
@@ -183,7 +183,7 @@ export default { @@ -183,7 +183,7 @@ export default {
183 } 183 }
184 }, 184 },
185 methods: { 185 methods: {
186 - ...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct']), 186 + ...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment']),
187 refresh() { 187 refresh() {
188 this.$refs.slide.refresh(); 188 this.$refs.slide.refresh();
189 this.headThumbnailVisible = false; 189 this.headThumbnailVisible = false;
@@ -286,7 +286,42 @@ export default { @@ -286,7 +286,42 @@ export default {
286 }; 286 };
287 this.showSizeSelectSheet = true; 287 this.showSizeSelectSheet = true;
288 }, 288 },
289 - onSelectTradeProduct(tradeProduct) { 289 + async onSelectTradeProduct(tradeProduct) {
  290 + try {
  291 + const info = await this.payment({
  292 + skup: tradeProduct.skup,
  293 + });
  294 +
  295 + if (info.code !== 200) {
  296 + return this.$createDialog({
  297 + type: 'confirm',
  298 + content: info.message,
  299 + confirmBtn: {
  300 + text: '查看订单',
  301 + active: true,
  302 + disabled: false,
  303 + href: 'javascript:;'
  304 + },
  305 + cancelBtn: {
  306 + text: '取消',
  307 + active: false,
  308 + disabled: false,
  309 + href: 'javascript:;'
  310 + },
  311 + onConfirm: () => {
  312 + this.$router.push({
  313 + name: 'OrderList',
  314 + params: {
  315 + owner: this.selectSizeConfig.type,
  316 + },
  317 + });
  318 + this.showSizeSelectSheet = false;
  319 + },
  320 + }).show();
  321 + }
  322 + } catch (e) {
  323 + }
  324 +
290 this.$router.push({ 325 this.$router.push({
291 name: this.selectSizeConfig.dest, 326 name: this.selectSizeConfig.dest,
292 query: tradeProduct 327 query: tradeProduct
@@ -103,4 +103,7 @@ export default { @@ -103,4 +103,7 @@ export default {
103 103
104 // 忽略错误 104 // 忽略错误
105 }, 105 },
  106 + async payment(context, {skup}) {
  107 + return this.$api.post('/api/ufo/product/order/payment', {skup, api_version: 1});
  108 + },
106 }; 109 };
@@ -121,5 +121,19 @@ module.exports = { @@ -121,5 +121,19 @@ module.exports = {
121 ufo: true, 121 ufo: true,
122 auth: true, 122 auth: true,
123 api: 'ufo.order.getAllCnt', 123 api: 'ufo.order.getAllCnt',
124 - } 124 + params: {
  125 + tabType: {type: String} // sell|buy
  126 + },
  127 + },
  128 +
  129 + // 下单
  130 + '/api/ufo/product/order/payment': {
  131 + ufo: true,
  132 + auth: true,
  133 + api: 'ufo.order.payment',
  134 + path: 'shopping',
  135 + params: {
  136 + skup: {type: Number},
  137 + },
  138 + },
125 }; 139 };