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:
hansu 2020-08-11 18:25:29 +08:00
commit 3acaf94a37
4 changed files with 40 additions and 12 deletions

View File

@ -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', {

View File

@ -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();

View File

@ -88,7 +88,7 @@ export default {
indexlist: [],
indextop: [],
info: {},
page: 0,
page: 1,
scrollHeiht: '',
}
},

View File

@ -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"
}
}
},