【功能修复】拼团:未开启拼团的 SKU 需要禁用选择
							parent
							
								
									ed7258b577
								
							
						
					
					
						commit
						8154108fe9
					
				|  | @ -313,10 +313,21 @@ | ||||||
|       // 加载商品信息 |       // 加载商品信息 | ||||||
|       const { data: spu } = await SpuApi.getSpuDetail(activity.spuId); |       const { data: spu } = await SpuApi.getSpuDetail(activity.spuId); | ||||||
|       state.goodsId = spu.id; |       state.goodsId = spu.id; | ||||||
|  |       // 默认显示最低价 | ||||||
|       activity.products.forEach((product) => { |       activity.products.forEach((product) => { | ||||||
|         spu.price = Math.min(spu.price, product.combinationPrice); // 设置 SPU 的最低价格 |         spu.price = Math.min(spu.price, product.combinationPrice); // 设置 SPU 的最低价格 | ||||||
|       }); |       }); | ||||||
|       state.goodsInfo = spu; |       state.goodsInfo = spu; | ||||||
|  |       // 价格、库存使用活动的 | ||||||
|  |       spu.skus.forEach((sku) => { | ||||||
|  |         const product = activity.products.find((product) => product.skuId === sku.id); | ||||||
|  |         if (product) { | ||||||
|  |           sku.price = product.combinationPrice; | ||||||
|  |         } else { | ||||||
|  |           // 找不到可能是没配置,则不能发起秒杀 | ||||||
|  |           sku.stock = 0; | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|     } else { |     } else { | ||||||
|       state.data = null; |       state.data = null; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -170,7 +170,6 @@ | ||||||
|         <text class="title">运费</text> |         <text class="title">运费</text> | ||||||
|         <text class="detail">¥{{ fen2yuan(state.orderInfo.deliveryPrice) }}</text> |         <text class="detail">¥{{ fen2yuan(state.orderInfo.deliveryPrice) }}</text> | ||||||
|       </view> |       </view> | ||||||
|       <!-- TODO 芋艿:优惠劵抵扣、积分抵扣 --> |  | ||||||
|       <view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.couponPrice > 0"> |       <view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.couponPrice > 0"> | ||||||
|         <text class="title">优惠劵金额</text> |         <text class="title">优惠劵金额</text> | ||||||
|         <text class="detail">-¥{{ fen2yuan(state.orderInfo.couponPrice) }}</text> |         <text class="detail">-¥{{ fen2yuan(state.orderInfo.couponPrice) }}</text> | ||||||
|  | @ -325,7 +324,7 @@ | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // 确认收货 TODO 芋艿:待测试 |   // 确认收货 | ||||||
|   async function onConfirm(orderId, ignore = false) { |   async function onConfirm(orderId, ignore = false) { | ||||||
|     // 需开启确认收货组件 |     // 需开启确认收货组件 | ||||||
|     // todo: 芋艿:待接入微信 |     // todo: 芋艿:待接入微信 | ||||||
|  |  | ||||||
|  | @ -1,14 +0,0 @@ | ||||||
| import request from '@/sheep/request'; |  | ||||||
| 
 |  | ||||||
| // TODO 芋艿:暂不支持 socket 聊天
 |  | ||||||
| export default { |  | ||||||
|   // 获取聊天token
 |  | ||||||
|   unifiedToken: () => |  | ||||||
|     request({ |  | ||||||
|       url: 'unifiedToken', |  | ||||||
|       custom: { |  | ||||||
|         showError: false, |  | ||||||
|         showLoading: false, |  | ||||||
|       }, |  | ||||||
|     }), |  | ||||||
| }; |  | ||||||
|  | @ -78,7 +78,7 @@ export default { | ||||||
|     }); |     }); | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   //获取微信收货地址 TODO 芋艿:未测试
 |   // 获取微信收货地址
 | ||||||
|   openAddress(callback) { |   openAddress(callback) { | ||||||
|     this.isReady(() => { |     this.isReady(() => { | ||||||
|       jweixin.openAddress({ |       jweixin.openAddress({ | ||||||
|  |  | ||||||
|  | @ -53,7 +53,6 @@ const mobileLogin = async (e) => { | ||||||
|     } else { |     } else { | ||||||
|       return resolve(false); |       return resolve(false); | ||||||
|     } |     } | ||||||
|     // TODO 芋艿:shareInfo: uni.getStorageSync('shareLog') || {},
 |  | ||||||
|   }); |   }); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -24,7 +24,6 @@ async function login(code = '', state = '') { | ||||||
|     // 解密 code 发起登陆
 |     // 解密 code 发起登陆
 | ||||||
|     const loginResult = await AuthUtil.socialLogin(socialType, code, state); |     const loginResult = await AuthUtil.socialLogin(socialType, code, state); | ||||||
|     if (loginResult.code === 0) { |     if (loginResult.code === 0) { | ||||||
|       // TODO 芋艿:shareLog
 |  | ||||||
|       setOpenid(loginResult.data.openid); |       setOpenid(loginResult.data.openid); | ||||||
|       return loginResult; |       return loginResult; | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 YunaiV
						YunaiV