Authored by TaoHuang

add product detail

... ... @@ -61,7 +61,11 @@ export default {
show() {
this.$refs.actionSheet.show();
},
hide() {
this.$refs.actionSheet.hide();
},
close() {
this.hide();
this.$emit('closeAction');
},
pay() {
... ...
... ... @@ -5,7 +5,7 @@ import OrderDetail from './order-detail';
export default [
{
name: 'OrderSellConfirm',
path: '/xianyu/order/sellerconfirm/:orderCode.html',
path: '/xianyu/order/sellerconfirm.html',
component: () => import(/* webpackChunkName: "order" */ './seller-confirm'),
props: true,
},
... ... @@ -13,7 +13,11 @@ export default [
name: 'OrderBuyConfirm',
path: '/xianyu/order/buyerconfirm/:orderCode.html',
component: () => import(/* webpackChunkName: "order" */ './buyer-confirm'),
props: true,
props: (route) => ({
productId: route.query.productId,
sizeId: route.query.sizeId,
tradeTypeId: route.query.tradeTypeId
})
},
{
name: 'PayOk',
... ...
... ... @@ -37,12 +37,7 @@ const UserType = {
export default {
name: 'OrderConfirm',
props: {
code: {
type: String,
default: ''
},
},
props: ['productId', 'sizeId', 'tradeTypeId'],
components: {
ProductInfo,
AddressInfo,
... ... @@ -55,7 +50,8 @@ export default {
data() {
return {
txt: '提交',
error: false
error: false,
num: 1
};
},
mounted() {
... ... @@ -75,7 +71,7 @@ export default {
compute() {
return this.fetchOrderPrice({
address_id: this.address.address_id,
num: 1,
num: this.num,
price: this.price,
storage_id: 10000128,
}).then(result => {
... ... @@ -97,6 +93,8 @@ export default {
this[Types.CHANGE_AGREE](val);
},
async submit() {
const vm = this;
await this.compute();
if (this.error) {
... ... @@ -125,11 +123,23 @@ export default {
order_code: orderCode
});
this.$createOrderPayType({
this.orderPay = this.$createOrderPayType({
data: payListResult.data,
price: this.fee.earnestMoneyStr,
desc: '保证金'
desc: '保证金',
onCloseAction() {
vm.onClose();
},
onPayAction() {
vm.onPay();
}
}).show();
},
onClose() {
console.log('close');
},
onPay() {
console.log('pay');
}
}
};
... ...