Merge pull request 'fixing bug 8.11' (#155) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/155
This commit is contained in:
		
						commit
						3acaf94a37
					
				@ -232,6 +232,13 @@ export default {
 | 
			
		||||
			getPinTuanPush() {
 | 
			
		||||
				return vm.$u.post('Specialci/pintuanPush');
 | 
			
		||||
			},
 | 
			
		||||
			// 拼团验证
 | 
			
		||||
			pintuanVerify({ pintuan_id, pintuangroup_headid }) {
 | 
			
		||||
				return vm.$u.post('Specialci/pintuanVerify', {
 | 
			
		||||
					pintuan_id: pintuan_id,
 | 
			
		||||
					pintuangroup_headid: pintuangroup_headid,
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			// 开团/参团
 | 
			
		||||
			withImmediate({ pintuan_id, pintuangroup_headid, pintuangroup_id}) {
 | 
			
		||||
				return vm.$u.post('Specialci/withImmediate', {
 | 
			
		||||
 | 
			
		||||
@ -27,10 +27,10 @@
 | 
			
		||||
					<text>¥{{ goodsInfo.pintuan_price || '0.00' }}</text>
 | 
			
		||||
					<s>¥{{ goodsInfo.goods_price || '0.00' }}</s>
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="collect" @click="switchCollect(goodsInfo.goods_collect)">
 | 
			
		||||
					<u-icon name="star" color="#474747" size="28" v-if="!goodsInfo.goods_collect"></u-icon>
 | 
			
		||||
				<view class="collect" @click="switchCollect(goodsInfo.is_collect)">
 | 
			
		||||
					<u-icon name="star" color="#474747" size="28" v-if="goodsInfo.is_collect == 0"></u-icon>
 | 
			
		||||
					<u-icon name="star-fill" color="#FF7807" size="28" v-else></u-icon>
 | 
			
		||||
					<text>{{ !goodsInfo.goods_collect ? '收藏' : '已收藏' }}</text>
 | 
			
		||||
					<text>{{ !goodsInfo.is_collect == 1 ? '收藏' : '已收藏' }}</text>
 | 
			
		||||
				</view>
 | 
			
		||||
			</view>
 | 
			
		||||
        </view>
 | 
			
		||||
@ -139,7 +139,6 @@
 | 
			
		||||
					</view>
 | 
			
		||||
					<view style="height:100rpx"></view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<u-toast ref="uToast" />
 | 
			
		||||
			</scroll-view>
 | 
			
		||||
        </u-popup>
 | 
			
		||||
		<!-- 普通商品 tool -->
 | 
			
		||||
@ -180,7 +179,7 @@
 | 
			
		||||
			<view class="btn" v-else @click="spikeGoods">立即秒杀</view>
 | 
			
		||||
		</view>
 | 
			
		||||
        <!-- <tloos @buy="buy" @xuanze="xuanze" :id="id" :info="goodsInfo" :type="type"></tloos> -->
 | 
			
		||||
        <u-toast ref="uToast" />
 | 
			
		||||
        <u-toast ref="uToast" :z-index='200000' />
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
@ -467,6 +466,19 @@ export default {
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		// 验证能否拼团
 | 
			
		||||
		async pintuanVerify({ pintuan_id, pintuangroup_headid }) {
 | 
			
		||||
			const res = await this.$u.api.pintuanVerify({
 | 
			
		||||
				pintuan_id: pintuan_id,
 | 
			
		||||
				pintuangroup_headid: pintuangroup_headid,
 | 
			
		||||
			})
 | 
			
		||||
			if(res.errCode != 0) {
 | 
			
		||||
				this.$refs.uToast.show({ 
 | 
			
		||||
					title: res.message,
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
			return res.errCode;
 | 
			
		||||
		},
 | 
			
		||||
		/*
 | 
			
		||||
		* @description 下单 订单步骤1:展示结算数据
 | 
			
		||||
		* @params {Number} type involvement 拼团或者 默认开团
 | 
			
		||||
@ -495,13 +507,21 @@ export default {
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			if(!this.debounce) return;
 | 
			
		||||
			this.debounce = false;
 | 
			
		||||
			let params = {
 | 
			
		||||
				ifcart: ifcart, 
 | 
			
		||||
				cart_id: [this.goodsInfo.goods_id + '|' + num],
 | 
			
		||||
			}
 | 
			
		||||
			if(this.type == 2) {
 | 
			
		||||
				if(type == 'involvement') {
 | 
			
		||||
					// 验证能否拼团
 | 
			
		||||
					let status = this.pintuanVerify({
 | 
			
		||||
						pintuan_id: this.pintuan_id,
 | 
			
		||||
						pintuangroup_headid: this.involvemenGroupInfo[0].user_id
 | 
			
		||||
					}).then(status => {
 | 
			
		||||
						if(status != 0) return true;
 | 
			
		||||
					})
 | 
			
		||||
					// console.log(status);
 | 
			
		||||
					if(status) return false;
 | 
			
		||||
					this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
 | 
			
		||||
					Object.assign(params, {
 | 
			
		||||
						pintuan_id: this.pintuan_id, 
 | 
			
		||||
@ -513,6 +533,7 @@ export default {
 | 
			
		||||
					})
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			this.debounce = false;
 | 
			
		||||
			this.$u.api.settlementOrder(params).then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					// console.log('type' + this.type);
 | 
			
		||||
@ -608,7 +629,7 @@ export default {
 | 
			
		||||
            })
 | 
			
		||||
		},
 | 
			
		||||
		switchCollect(status) {
 | 
			
		||||
			if(status) {
 | 
			
		||||
			if(status == 1) {
 | 
			
		||||
				this.removeFavorite();
 | 
			
		||||
			} else {
 | 
			
		||||
				this.addFavoriteGoods();
 | 
			
		||||
 | 
			
		||||
@ -88,7 +88,7 @@ export default {
 | 
			
		||||
			indexlist: [],
 | 
			
		||||
			indextop: [],
 | 
			
		||||
			info: {},
 | 
			
		||||
			page: 0,
 | 
			
		||||
			page: 1,
 | 
			
		||||
			scrollHeiht: '',
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
@ -243,10 +243,10 @@
 | 
			
		||||
					"style": {
 | 
			
		||||
						"navigationStyle": "custom",
 | 
			
		||||
						"app-plus": {
 | 
			
		||||
							"animationType": "fade-in", // 设置fade-in淡入动画,为最合理的动画类型
 | 
			
		||||
							"background": "transparent", // 背景透明
 | 
			
		||||
							"backgroundColor": "rgba(0,0,0,0)", // 背景透明
 | 
			
		||||
							"popGesture": "none" // 关闭IOS屏幕左边滑动关闭当前页面的功能
 | 
			
		||||
							"animationType": "fade-in",
 | 
			
		||||
							"background": "transparent",
 | 
			
		||||
							"backgroundColor": "rgba(0,0,0.5)",
 | 
			
		||||
							"popGesture": "none"
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				},
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user