Browse Source

自提

master
jiazhipeng 6 months ago
parent
commit
7923bdee74
  1. 2
      pages/info/postProductInfo/index.wxml
  2. 5
      pages/order/postOrder/index.js
  3. 12
      pages/user/cartlist/list.js
  4. 12
      subPackages/techanNew/index.js

2
pages/info/postProductInfo/index.wxml

@ -302,7 +302,7 @@
</view> </view>
</view> </view>
<view class="delivery-method" wx:if="{{info.is_package!=1}}"> <view class="delivery-method" wx:if="{{info.is_package!=1&&skuFlag=='cart'}}">
<view class="delivery-title">配送方式</view> <view class="delivery-title">配送方式</view>
<view class="flex" style="display: flex;"> <view class="flex" style="display: flex;">
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=1}}" bind:tap="changeSelectSkuPost" data-value="{{0}}"> <view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=1}}" bind:tap="changeSelectSkuPost" data-value="{{0}}">

5
pages/order/postOrder/index.js

@ -301,13 +301,14 @@ Page({
supplier_id: info.product.supplier_id, supplier_id: info.product.supplier_id,
} }
if (info.user_select_type == 0) { if (info.user_select_type == 0) {
param.use_type = 1 param.use_type = 0
param.post = this.data.address.id param.post = this.data.address.id
} }
if (info.user_select_type == 1) { if (info.user_select_type == 1) {
param.use_type = 2 param.use_type = 1
param.pickup_shop_id = info.pickupAddress.id param.pickup_shop_id = info.pickupAddress.id
param.pickup_shop_info = info.pickupAddress param.pickup_shop_info = info.pickupAddress
param.phone = info.phone
} }
product_list.push(param) product_list.push(param)

12
pages/user/cartlist/list.js

@ -218,11 +218,13 @@ Page({
return; return;
} }
let postSkuIds = product.map(x=>x.sku.id) let repeatSku = product.find(x=>product.filter(v=>v.sku.id == x.sku.id).length>1)
if(postSkuIds.some(x=>postSkuIds.filter(v=>v==x).length>1)) { if(repeatSku) {
wx.showToast({ let str = `${repeatSku.product.title}-${repeatSku.sku.sku_name}邮寄和自提只能选择一种`
title: '相同规格产品不可重复购买', wx.showModal({
icon: "none" content: str,
showCancel: false,
complete: (res) => {}
}) })
return return
} }

12
subPackages/techanNew/index.js

@ -298,11 +298,13 @@ Page({
// }) // })
return; return;
} }
let postSkuIds = product.map(x=>x.sku.id) let repeatSku = product.find(x=>product.filter(v=>v.sku.id == x.sku.id).length>1)
if(postSkuIds.some(x=>postSkuIds.filter(v=>v==x).length>1)) { if(repeatSku) {
wx.showToast({ let str = `${repeatSku.product.title}-${repeatSku.sku.sku_name}邮寄和自提只能选择一种`
title: '相同规格产品不可重复购买', wx.showModal({
icon: "none" content: str,
showCancel: false,
complete: (res) => {}
}) })
return return
} }

Loading…
Cancel
Save