Compare commits
No commits in common. "7961d4a5a2fa3f3e3ae8bf3df91797c46092231d" and "17698bf1b8293538b1971cceced3c4c2f649cb19" have entirely different histories.
7961d4a5a2
...
17698bf1b8
@ -374,9 +374,6 @@ export default {
|
||||
|
||||
// 核销码
|
||||
verifyCode: '',
|
||||
|
||||
// 是否在团购活动时间内
|
||||
isGroupBuyValid: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -595,7 +592,7 @@ export default {
|
||||
|
||||
// 团购活动时间判断
|
||||
const currentTime = new Date().getTime();
|
||||
this.isGroupBuyValid = true;
|
||||
let isGroupBuyValid = true;
|
||||
|
||||
// 检查所有商品是否在团购活动时间内
|
||||
for (let supplierId in this.supplierGroups) {
|
||||
@ -604,18 +601,18 @@ export default {
|
||||
const activityInfo = item.commodity_goods_info.group_buy_activity_info;
|
||||
// 如果没有团购活动信息,或者不在活动时间内,则isGroupBuyValid设为false
|
||||
if (!activityInfo) {
|
||||
this.isGroupBuyValid = false;
|
||||
isGroupBuyValid = false;
|
||||
break;
|
||||
}
|
||||
|
||||
const startTime = new Date(activityInfo.start_time).getTime();
|
||||
const endTime = new Date(activityInfo.end_time).getTime();
|
||||
if (!(currentTime >= startTime && currentTime <= endTime)) {
|
||||
this.isGroupBuyValid = false;
|
||||
isGroupBuyValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!this.isGroupBuyValid) break;
|
||||
if (!isGroupBuyValid) break;
|
||||
}
|
||||
|
||||
// 检查是否存在isafterSale属性且值为true
|
||||
@ -656,7 +653,7 @@ export default {
|
||||
const params = {
|
||||
user_id: uni.getStorageSync('userId'),
|
||||
// 先判断shopCarList数据中是否包含isAdver且为true
|
||||
order_cate : this.carList.some(item => item.isAdver === true) ? 3 : (this.isGroupBuyValid ? 2 : 1),
|
||||
order_cate : this.carList.some(item => item.isAdver === true) ? 3 : (isGroupBuyValid ? 2 : 1),
|
||||
goods_list: Object.keys(this.supplierGroups).map(supplierId => {
|
||||
const group = this.supplierGroups[supplierId];
|
||||
const firstItem = group[0];
|
||||
@ -718,7 +715,7 @@ export default {
|
||||
success: (payRes) => {
|
||||
const params = {
|
||||
order_id: orderId,
|
||||
from: this.carList.some(item => item.isAdver === true) ? 3 : (this.isGroupBuyValid ? 2 : 1),
|
||||
from: this.carList.some(item => item.isAdver === true) ? 3 : (isGroupBuyValid ? 2 : 1),
|
||||
group_buy_activity_id: this.group_buy_activity_id,
|
||||
adver_id: this.carList.some(item => item.isAdver === true) ? this.carList.find(item => item.isAdver === true).adver_id : ''
|
||||
}
|
||||
|
||||
@ -55,8 +55,7 @@ const getCurrentEnvironment = () => {
|
||||
|
||||
// 获取当前环境配置
|
||||
const currentEnv = getCurrentEnvironment();
|
||||
console.log("🚀 ~ currentEnv:", currentEnv)
|
||||
const envConfig = environments[currentEnv] || environments.production;
|
||||
const envConfig = environments[currentEnv] || environments.development;
|
||||
|
||||
export const RequsetUrl = envConfig.apiUrl; // 请求地址前缀
|
||||
export const picUrl = envConfig.picUrl; // 图片地址前缀
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user