| 
					
				 | 
			
			
				@@ -2,35 +2,33 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 规格弹窗 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<su-popup :show="show" round="10" @close="emits('close')"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<!-- SKU 信息 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<!-- {{state.selectedSku}} --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<!-- {{goodsInfo}} --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<view class="ss-modal-box bg-white ss-flex-col"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<view class="modal-header ss-flex ss-col-center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				<view class="header-left ss-m-r-30"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					<image 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						class="sku-image" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						:src="state.selectedSku.picUrl || goodsInfo.picUrl" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						mode="aspectFill" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<image class="sku-image" :src="state.selectedSku.picUrl || goodsInfo.picUrl" mode="aspectFill" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				<view class="header-right ss-flex-col ss-row-between ss-flex-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					<view class="goods-title ss-line-2">{{ goodsInfo.name }}</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					<view class="header-right-bottom ss-flex ss-col-center ss-row-between"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						<view class="ss-flex"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							<view class="price-text"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								<image 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-									src="@/static/icon/points.png" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-									v-if="goodsInfo.spuPayType == 2" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-									style="width: 30rpx; height: 30rpx" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								></image> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								<text v-else>¥</text> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								{{ fen2yuan(state.selectedSku.price || goodsInfo.price) }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								<image src="@/static/icon/points.png" v-if="goodsInfo.spuPayType == 2" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+									style="width: 30rpx; height: 30rpx"></image> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								<text v-if="goodsInfo.highPrecision"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+									{{ (state.selectedSku.highPrecisionPrice || goodsInfo.highPrecisionPrice)/100 }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								</text> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								<text v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+									{{ fen2yuan(state.selectedSku.price || goodsInfo.price) }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								</text> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								<!-- {{ fen2yuan(state.selectedSku.price || goodsInfo.price) }} --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							<view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								class="origin-price-text ss-m-l-10" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								v-if=" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							<view class="origin-price-text ss-m-l-10" v-if=" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									state.selectedSku.promotionFee >= 0 || 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									goodsInfo.promotionFee >= 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 								积分:{{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									fen2yuan( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 										state.selectedSku.promotionFee || goodsInfo.promotionFee, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,21 +42,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<!-- 属性选择 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<view class="modal-content ss-flex-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				<scroll-view scroll-y="true" class="modal-content-scroll" @touchmove.stop> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					<view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						class="sku-item ss-m-b-20" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						v-for="property in propertyList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						:key="property.id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<view class="sku-item ss-m-b-20" v-for="property in propertyList" :key="property.id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						<view class="label-text ss-m-b-20">{{ property.name }}</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						<view class="ss-flex ss-col-center ss-flex-wrap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							<button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								class="ss-reset-button spec-btn" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								v-for="value in property.values" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								:class="[ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							<button class="ss-reset-button spec-btn" v-for="value in property.values" :class="[ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 										'ui-BG-Main-Gradient': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 											state.currentPropertyArray[property.id] === value.id, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -66,78 +57,50 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 										'disabled-btn': value.disabled === true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								]" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								:key="value.id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								:disabled="value.disabled === true" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								@tap="onSelectSku(property.id, value.id)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								]" :key="value.id" :disabled="value.disabled === true" @tap="onSelectSku(property.id, value.id)"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 								{{ value.name }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							</button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					<view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						class="buy-num-box ss-flex ss-col-center ss-row-between ss-m-b-40" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						v-if="goodsInfo.spuPayType == 2" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						<view class="label-text" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							>购买金额 (当前可用积分:{{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<view class="buy-num-box ss-flex ss-col-center ss-row-between ss-m-b-40" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						v-if="goodsInfo.spuPayType == 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<view class="label-text">购买金额 (当前可用积分:{{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 								points2point(userWallet.integralDO.currentQuota) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							}})</view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							}})</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						<view class="ss-flex ss-col-center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							<image 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								src="@/static/icon/points.png" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								v-if="goodsInfo.spuPayType == 2" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								style="width: 30rpx; height: 30rpx" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							></image> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							<input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								v-model="state.selectedSku.use_points" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								class="uni-input input-points" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								style="width: 100rpx; text-align: center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								type="number" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								placeholder="0" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								@input="inputPoints" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								:disabled="!state.selectedSku.id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							<image src="@/static/icon/points.png" v-if="goodsInfo.spuPayType == 2" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								style="width: 30rpx; height: 30rpx"></image> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							<input v-model="state.selectedSku.use_points" class="uni-input input-points" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								style="width: 100rpx; text-align: center" type="number" placeholder="0" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								@input="inputPoints" :disabled="!state.selectedSku.id" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					<view class="buy-num-box ss-flex ss-col-center ss-row-between ss-m-b-40" v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						<view class="label-text">购买数量</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						<su-number-box 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							:min="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							:max="state.selectedSku.stock" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							:step="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							v-model="state.selectedSku.goods_num" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							@change="onNumberChange($event)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<su-number-box :min="1" :max="state.selectedSku.stock" :step="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							v-model="state.selectedSku.goods_num" @change="onNumberChange($event)" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				</scroll-view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<!-- 操作区 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<view class="modal-footer border-top"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				<view 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					class="buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					v-if="goodsInfo.spuType && goodsInfo.spuPayType == 1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					<button class="ss-reset-button add-btn ui-Shadow-Main" @tap="onAddCart" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						>加入购物车</button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					<button class="ss-reset-button buy-btn ui-Shadow-Main" @tap="onBuy" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						>立即购买</button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				<view class="buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					v-if="goodsInfo.spuType && goodsInfo.spuPayType == 1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<button class="ss-reset-button add-btn ui-Shadow-Main" @tap="onAddCart">加入购物车</button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<button class="ss-reset-button buy-btn ui-Shadow-Main" @tap="onBuy">立即购买</button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				<view class="buy-box ss-flex ss-col-center ss-p-r-20"  v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					<button class="ss-reset-button disabled-btn one-buy-btn ui-Shadow-Main "  @tap="onBuy"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						<template v-if="goodsInfo.spuPayType != 1 && !goodsInfo.spuType" > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				<view class="buy-box ss-flex ss-col-center ss-p-r-20" v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<button class="ss-reset-button disabled-btn one-buy-btn ui-Shadow-Main " @tap="onBuy"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<template v-if="goodsInfo.spuPayType != 1 && !goodsInfo.spuType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							立即兑换 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						</template>	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						 <template v-else-if="!goodsInfo.spuType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							 立即购买 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						 </template>	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						 <template v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							 立即兑换 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						</template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<template v-else-if="!goodsInfo.spuType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							立即购买 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						</template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<template v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							立即兑换 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						</template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					</button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				</view> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</view> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -146,21 +109,27 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script setup> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	import { computed, reactive, watch, onMounted,nextTick } from 'vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		computed, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		reactive, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		watch, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		onMounted, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		nextTick 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} from 'vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	import sheep from '@/sheep'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		formatStock, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		convertProductPropertyList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		fen2yuan, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		points2point, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} from '@/sheep/hooks/useGoods'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	const emits = defineEmits(['change', 'addCart', 'buy', 'close']); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	const props = defineProps({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		goodsInfo: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			type: Object, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			default() {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			default () {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		show: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			type: Boolean, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -183,29 +152,45 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return skuPrices; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	function calcNums(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if(props.goodsInfo.highPrecision){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			state.selectedSku.goods_num = parseInt(state.selectedSku.use_points / (props.goodsInfo.highPrecisionPrice / 100) ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			state.selectedSku.goods_num = parseInt(state.selectedSku.use_points / (fen2yuan(state.selectedSku.price)) ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	function inputPoints(e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		const points = e.detail.value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		console.log("输入的积分", points) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		const userCanUsePoints = parseFloat(points2point(userWallet.value.integralDO.currentQuota)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		state.selectedSku.goods_num = parseInt(state.selectedSku.use_points / fen2yuan(state.selectedSku.price)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		calcNums() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		console.log("1", state.selectedSku.use_points, state.selectedSku.price) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		console.log("下单数目", state.selectedSku.goods_num) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if (points <= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			sheep.$helper.toast('最低使用1积分'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				state.selectedSku.use_points = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if (points > userCanUsePoints) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			sheep.$helper.toast('可用积分不足'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			console.log('输入的积分大于可用积分了', points, userCanUsePoints); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				state.selectedSku.use_points = userCanUsePoints; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				// 重新计算 对应的商品数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				state.selectedSku.goods_num = parseInt(state.selectedSku.use_points / fen2yuan(state.selectedSku.price)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				calcNums() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	watch( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		() => state.selectedSku, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		(newVal) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			emits('change', newVal); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			immediate: true, // 立即执行 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			deep: true, // 深度监听 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -234,15 +219,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// 立即购买 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	function onBuy() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if (props.goodsInfo.spuPayType == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			if (state.selectedSku.goods_num < 1 || !state.selectedSku.use_points) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				sheep.$helper.toast('输入金额少于可购买数量'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			// 下单时检测如果 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			if(state.selectedSku.goods_num  > state.selectedSku.stock){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				state.selectedSku.use_points = (state.selectedSku.stock * fen2yuan(state.selectedSku.price) ).toFixed(2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			if (state.selectedSku.goods_num > state.selectedSku.stock) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				state.selectedSku.use_points = (state.selectedSku.stock * fen2yuan(state.selectedSku.price)).toFixed(2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				state.selectedSku.goods_num = state.selectedSku.stock 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -254,7 +239,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			sheep.$helper.toast('库存不足'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		emits('buy', state.selectedSku); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -563,4 +548,4 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-</style> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</style> 
			 |