| | |
| | | <view class="info"> |
| | | <view class="d-b-s"> |
| | | <view class="flex-1"> |
| | | <view class="title f32 gray3">{{ item.product_name }}</view> |
| | | <view class="title f30 gray3 pr20">{{ item.product_name }}</view> |
| | | <view class="theme-price mt10 f18"> |
| | | ¥<text class="f26">{{ item.product_price }}</text> |
| | | </view> |
| | |
| | | delivery_store:{}, |
| | | delivery_store_list: {}, |
| | | verify_data: [] ,//虚拟商品 核销数据 |
| | | branch_activity_id: 0, |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | | let self = this; |
| | | self.options = options; |
| | | self.room_id = options.room_id ? options.room_id : 0; |
| | | self.branch_activity_id = options.branch_activity_id ? options.branch_activity_id : 0; //分会活动的购物车提交 |
| | | self.$fire.on('selectStoreId', function(e) { |
| | | self.extract_store = e; |
| | | self.choose_store_id = e.store_id; |
| | |
| | | } |
| | | //直接购买 |
| | | if (self.options.order_type === 'buy') { |
| | | self._get( |
| | | 'order.order/buy', { |
| | | params: JSON.stringify( |
| | | Object.assign({}, params, { |
| | | product_id: self.options.product_id, |
| | | product_num: self.options.product_num, |
| | | product_sku_id: self.options.product_sku_id, |
| | | }) |
| | | ) |
| | | }, |
| | | function(res) { |
| | | callback(res); |
| | | } |
| | | ); |
| | | if(self.branch_activity_id > 0){ |
| | | self._get( |
| | | 'branch.activityOrder/buy', { |
| | | params: JSON.stringify( |
| | | Object.assign({}, params, { |
| | | activity_id:self.branch_activity_id, |
| | | product_id: self.options.product_id, |
| | | product_num: self.options.product_num, |
| | | product_sku_id: self.options.product_sku_id, |
| | | }) |
| | | ) |
| | | }, |
| | | function(res) { |
| | | callback(res); |
| | | } |
| | | ); |
| | | } else { |
| | | self._get( |
| | | 'order.order/buy', { |
| | | params: JSON.stringify( |
| | | Object.assign({}, params, { |
| | | product_id: self.options.product_id, |
| | | product_num: self.options.product_num, |
| | | product_sku_id: self.options.product_sku_id, |
| | | }) |
| | | ) |
| | | }, |
| | | function(res) { |
| | | callback(res); |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | //定金 |
| | | else if (self.options.order_type === 'deposit') { |
| | |
| | | } |
| | | // 购物车结算 |
| | | else if (self.options.order_type === 'cart') { |
| | | self._get( |
| | | 'order.order/cart', { |
| | | params: JSON.stringify( |
| | | Object.assign({}, params, { |
| | | cart_ids: self.options.cart_ids || 0 |
| | | }) |
| | | ) |
| | | }, |
| | | function(res) { |
| | | callback(res); |
| | | } |
| | | ); |
| | | if(self.branch_activity_id > 0){ |
| | | self._get( |
| | | 'branch.activityOrder/cart', { |
| | | params: JSON.stringify( |
| | | Object.assign({}, params, { |
| | | activity_id:self.branch_activity_id, |
| | | cart_ids: self.options.cart_ids || 0 |
| | | }) |
| | | ) |
| | | }, |
| | | function(res) { |
| | | callback(res); |
| | | } |
| | | ); |
| | | } else { |
| | | self._get( |
| | | 'order.order/cart', { |
| | | params: JSON.stringify( |
| | | Object.assign({}, params, { |
| | | cart_ids: self.options.cart_ids || 0 |
| | | }) |
| | | ) |
| | | }, |
| | | function(res) { |
| | | callback(res); |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | // 积分兑换结算 |
| | | else if (self.options.order_type == 'points') { |
| | |
| | | }); |
| | | |
| | | let params = { |
| | | activity_id: self.branch_activity_id, // 分会活动购物 |
| | | pay_type: self.pay_type, |
| | | room_id: self.room_id, |
| | | coupon_id: self.coupon_id, |
| | |
| | | let url = ''; |
| | | if (self.options.order_type === 'buy') { |
| | | url = 'order.order/buy'; |
| | | if(self.branch_activity_id > 0){ |
| | | url = 'branch.activityOrder/buy'; |
| | | } |
| | | params = Object.assign(params, { |
| | | product_id: self.options.product_id, |
| | | product_num: self.options.product_num, |
| | |
| | | // 创建订单-购物车结算 |
| | | if (self.options.order_type === 'cart') { |
| | | url = 'order.order/cart'; |
| | | if(self.branch_activity_id > 0){ |
| | | url = 'branch.activityOrder/cart'; |
| | | } |
| | | params = Object.assign(params, { |
| | | cart_ids: self.options.cart_ids || 0, |
| | | // video_id: self.options.video_id || 0, |