Compare commits
No commits in common. "531a6da6111c0268e7754ccd2c05e779ace89969" and "36b69c31b1aee5f88b2bf636af656902c0b76f14" have entirely different histories.
531a6da611
...
36b69c31b1
@ -460,11 +460,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
//获取购物车数量
|
//获取购物车数量
|
||||||
// getShopCar() {
|
getShopCar() {
|
||||||
// request(apiArr.getCarCount, "POST", {}).then((res) => {
|
request(apiArr.getCarCount, "POST", {}).then((res) => {
|
||||||
// this.prevCarNum = res.total;
|
this.prevCarNum = res.total;
|
||||||
// });
|
});
|
||||||
// },
|
},
|
||||||
|
|
||||||
getShopCarList() {
|
getShopCarList() {
|
||||||
return request(apiArr.getCar, "POST", {}).then((res) => {
|
return request(apiArr.getCar, "POST", {}).then((res) => {
|
||||||
@ -472,7 +472,6 @@ export default {
|
|||||||
this.carOrderList = [].concat(res.same_day_cart_list, res.normal_cart_list)
|
this.carOrderList = [].concat(res.same_day_cart_list, res.normal_cart_list)
|
||||||
.flatMap(supplier => supplier.commodity_cart_and_goods_model);
|
.flatMap(supplier => supplier.commodity_cart_and_goods_model);
|
||||||
this.carNum = res.total;
|
this.carNum = res.total;
|
||||||
this.prevCarNum = res.total;
|
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -511,7 +510,7 @@ export default {
|
|||||||
|
|
||||||
//因为是当前商品没有 调用update就是增加商品。增加商品之后再获取购物车数量
|
//因为是当前商品没有 调用update就是增加商品。增加商品之后再获取购物车数量
|
||||||
request(apiArr.updateCar, "POST", params).then((res) => {
|
request(apiArr.updateCar, "POST", params).then((res) => {
|
||||||
// that.getShopCar();
|
that.getShopCar();
|
||||||
that.getShopCarList();
|
that.getShopCarList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -549,7 +548,7 @@ export default {
|
|||||||
request(apiArr.updateCar, "POST", params).then((res) => {
|
request(apiArr.updateCar, "POST", params).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.getShopCarList();
|
this.getShopCarList();
|
||||||
// this.getShopCar();
|
this.getShopCar();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "操作成功!",
|
title: "操作成功!",
|
||||||
success() { },
|
success() { },
|
||||||
@ -599,7 +598,7 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.getShopCarList().then(() => {
|
this.getShopCarList().then(() => {
|
||||||
this.getGoodsInfo();
|
this.getGoodsInfo();
|
||||||
// this.getShopCar();
|
this.getShopCar();
|
||||||
this.getComment();
|
this.getComment();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -515,11 +515,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
//获取购物车数量
|
//获取购物车数量
|
||||||
// getShopCar() {
|
getShopCar() {
|
||||||
// request(apiArr.getCarCount, "POST", {}).then((res) => {
|
request(apiArr.getCarCount, "POST", {}).then((res) => {
|
||||||
// this.prevCarNum = res.total;
|
this.prevCarNum = res.total;
|
||||||
// });
|
});
|
||||||
// },
|
},
|
||||||
|
|
||||||
getShopCarList() {
|
getShopCarList() {
|
||||||
return request(apiArr.getCar, "POST", {}).then((res) => {
|
return request(apiArr.getCar, "POST", {}).then((res) => {
|
||||||
@ -527,7 +527,6 @@ export default {
|
|||||||
this.carOrderList = [].concat(res.same_day_cart_list, res.normal_cart_list)
|
this.carOrderList = [].concat(res.same_day_cart_list, res.normal_cart_list)
|
||||||
.flatMap(supplier => supplier.commodity_cart_and_goods_model);
|
.flatMap(supplier => supplier.commodity_cart_and_goods_model);
|
||||||
this.carNum = res.total;
|
this.carNum = res.total;
|
||||||
this.prevCarNum = res.total;
|
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -566,7 +565,7 @@ export default {
|
|||||||
|
|
||||||
//因为是当前商品没有 调用update就是增加商品。增加商品之后再获取购物车数量
|
//因为是当前商品没有 调用update就是增加商品。增加商品之后再获取购物车数量
|
||||||
request(apiArr.updateCar, "POST", params).then((res) => {
|
request(apiArr.updateCar, "POST", params).then((res) => {
|
||||||
// that.getShopCar();
|
that.getShopCar();
|
||||||
that.getShopCarList();
|
that.getShopCarList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -604,7 +603,7 @@ export default {
|
|||||||
request(apiArr.updateCar, "POST", params).then((res) => {
|
request(apiArr.updateCar, "POST", params).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.getShopCarList();
|
this.getShopCarList();
|
||||||
// this.getShopCar();
|
this.getShopCar();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "操作成功!",
|
title: "操作成功!",
|
||||||
success() { },
|
success() { },
|
||||||
@ -661,7 +660,7 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.getShopCarList().then(() => {
|
this.getShopCarList().then(() => {
|
||||||
this.getGoodsInfo();
|
this.getGoodsInfo();
|
||||||
// this.getShopCar();
|
this.getShopCar();
|
||||||
this.getComment();
|
this.getComment();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -155,8 +155,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const params = {
|
const params = {
|
||||||
user_id: uni.getStorageSync('userId'),
|
user_id: uni.getStorageSync('userId')
|
||||||
community_id: uni.getStorageSync('changeCommData') ? uni.getStorageSync('changeCommData').id : ''
|
|
||||||
}
|
}
|
||||||
return request(apiArr.groupBuyList, 'POST', params).then(res => {
|
return request(apiArr.groupBuyList, 'POST', params).then(res => {
|
||||||
const list = res.group_buy_list.map(item => {
|
const list = res.group_buy_list.map(item => {
|
||||||
|
|||||||
@ -64,8 +64,7 @@
|
|||||||
{{ currentGG.goods_name }}
|
{{ currentGG.goods_name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="Msg">{{ currentGG.commodity_brief }}</view>
|
<view class="Msg">{{ currentGG.commodity_brief }}</view>
|
||||||
<view class="num">已售{{ soldOutNum }}</view>
|
<view class="num">已售{{ soldOutNum }} | 剩余{{ currentGG.total_stock }}</view>
|
||||||
<!-- | 剩余{{ currentGG.total_stock }} -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 规格 -->
|
<!-- 规格 -->
|
||||||
@ -105,7 +104,7 @@
|
|||||||
<view class="fenge"></view>
|
<view class="fenge"></view>
|
||||||
|
|
||||||
<!-- 已购买区域 -->
|
<!-- 已购买区域 -->
|
||||||
<!-- <view>
|
<view>
|
||||||
<view class="purchase-area">
|
<view class="purchase-area">
|
||||||
<view class="purchase-count">{{ totalCount }}人已购买</view>
|
<view class="purchase-count">{{ totalCount }}人已购买</view>
|
||||||
<view class="view-more" @click="showPurchaseRecords">查看更多 ></view>
|
<view class="view-more" @click="showPurchaseRecords">查看更多 ></view>
|
||||||
@ -124,7 +123,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<view class="fenge"></view>
|
<view class="fenge"></view>
|
||||||
|
|
||||||
@ -174,6 +173,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="cars" @click="car">
|
<view class="cars" @click="car">
|
||||||
<u-badge numberType="limit" :type="type" max="99" :value="carNum"></u-badge>
|
<u-badge numberType="limit" :type="type" max="99" :value="carNum"></u-badge>
|
||||||
|
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_car.png"
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_car.png"
|
||||||
mode="widthFix"></image>
|
mode="widthFix"></image>
|
||||||
购物车
|
购物车
|
||||||
@ -417,7 +417,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="pay-button" @click="submitPayment">立即支付</view>
|
<view class="pay-button" @click="submitPayment">立即支付</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<!-- 弹窗 - 支付成功 -->
|
<!-- 弹窗 - 支付成功 -->
|
||||||
<view class="pay-success-shadow" @click="changeShadow2" v-if="boxshadow5">
|
<view class="pay-success-shadow" @click="changeShadow2" v-if="boxshadow5">
|
||||||
<view class="pay-success-container">
|
<view class="pay-success-container">
|
||||||
@ -430,77 +430,76 @@
|
|||||||
<view class="verify-code-section">
|
<view class="verify-code-section">
|
||||||
<view v-if="verifyCode">核销码:{{ verifyCode }}</view>
|
<view v-if="verifyCode">核销码:{{ verifyCode }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="welfare-container">
|
<view class="welfare-container">
|
||||||
<view class="welfare-header">
|
<view class="welfare-header">
|
||||||
<view class="welfare-title">
|
<view class="welfare-title">
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/groupPurchase/welfare.png"></image>
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/groupPurchase/welfare.png">
|
下单福利
|
||||||
|
</view>
|
||||||
|
<view class="welfare-action">已获得</view>
|
||||||
|
</view>
|
||||||
|
<view class="welfare-box">
|
||||||
|
<view class="welfare-item welfare-item-points">
|
||||||
|
<view class="welfare-item-top">
|
||||||
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_fen.png" mode="aspectFit">
|
||||||
</image>
|
</image>
|
||||||
下单福利
|
<view>石榴分</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="welfare-action">已获得</view>
|
<view>
|
||||||
</view>
|
{{ slFen }}
|
||||||
<view class="welfare-box">
|
|
||||||
<view class="welfare-item welfare-item-points">
|
|
||||||
<view class="welfare-item-top">
|
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_fen.png" mode="aspectFit">
|
|
||||||
</image>
|
|
||||||
<view>石榴分</view>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
{{ slFen }}
|
|
||||||
</view>
|
|
||||||
<view class="welfare-item-bottom">
|
|
||||||
可抵扣 ¥{{ slFen }}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="welfare-item welfare-item-coupon">
|
<view class="welfare-item-bottom">
|
||||||
<view class="welfare-item-top">
|
可抵扣 ¥{{ slFen }}
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_zi.png" mode="aspectFit">
|
|
||||||
</image>
|
|
||||||
<view>石榴籽</view>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
{{ slZi }}
|
|
||||||
</view>
|
|
||||||
<view class="welfare-item-bottom">
|
|
||||||
可抵扣 ¥{{ slZi }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="welfare-item welfare-item-beans">
|
|
||||||
<view class="welfare-item-top">
|
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_jin.png" mode="aspectFit" />
|
|
||||||
<view>石榴金</view>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
{{ slJin }}
|
|
||||||
</view>
|
|
||||||
<view class="welfare-item-bottom">
|
|
||||||
可抵扣 ¥{{ slJin }}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom2">
|
<view class="welfare-item welfare-item-coupon">
|
||||||
<view class="invite-section">
|
<view class="welfare-item-top">
|
||||||
<view class="invite-text">
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_zi.png" mode="aspectFit">
|
||||||
<view class="invite-line1"></view>
|
</image>
|
||||||
赶快邀请好友来下单吧
|
<view>石榴籽</view>
|
||||||
<view class="invite-line2"></view>
|
</view>
|
||||||
</view>
|
<view>
|
||||||
<view @click.stop="changeShadow2">
|
{{ slZi }}
|
||||||
<view class="share-buttons">
|
</view>
|
||||||
<button class="share-btn-wechat" open-type="share" bindtap="onShareButtonClick" />
|
<view class="welfare-item-bottom">
|
||||||
<view class="share-item">
|
可抵扣 ¥{{ slZi }}
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_WX.png"
|
</view>
|
||||||
mode="aspectFill"></image>
|
</view>
|
||||||
微信好友
|
<view class="welfare-item welfare-item-beans">
|
||||||
</view>
|
<view class="welfare-item-top">
|
||||||
<button class="share-btn-miniprogram" open-type="share" bindtap="onShareButtonClick" />
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/activity_jin.png" mode="aspectFit"/>
|
||||||
<view class="share-item" @click="shareFriend">
|
<view>石榴金</view>
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_WX.png"
|
</view>
|
||||||
mode="aspectFill"></image>
|
<view>
|
||||||
小程序链接
|
{{ slJin }}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="welfare-item-bottom">
|
||||||
|
可抵扣 ¥{{ slJin }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom2">
|
||||||
|
<view class="invite-section">
|
||||||
|
<view class="invite-text">
|
||||||
|
<view class="invite-line1"></view>
|
||||||
|
赶快邀请好友来下单吧
|
||||||
|
<view class="invite-line2"></view>
|
||||||
|
</view>
|
||||||
|
<view @click.stop="changeShadow2">
|
||||||
|
<view class="share-buttons">
|
||||||
|
<button class="share-btn-wechat" open-type="share" bindtap="onShareButtonClick" />
|
||||||
|
<view class="share-item">
|
||||||
|
<image
|
||||||
|
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_WX.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
|
微信好友
|
||||||
|
</view>
|
||||||
|
<button class="share-btn-miniprogram" open-type="share" bindtap="onShareButtonClick" />
|
||||||
|
<view class="share-item" @click="shareFriend">
|
||||||
|
<image
|
||||||
|
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_WX.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
|
小程序链接
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -602,7 +601,7 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查商品数量
|
// 检查商品数量
|
||||||
if (this.changeCount <= 0) {
|
if (this.changeCount <= 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -611,18 +610,18 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前时间和活动时间,检查是否在团购活动时间内
|
// 获取当前时间和活动时间,检查是否在团购活动时间内
|
||||||
const currentTime = new Date().getTime();
|
const currentTime = new Date().getTime();
|
||||||
const activityInfo = this.currentGG.group_buy_activity_info;
|
const activityInfo = this.currentGG.group_buy_activity_info;
|
||||||
let isGroupBuyValid = false;
|
let isGroupBuyValid = false;
|
||||||
|
|
||||||
if (activityInfo) {
|
if (activityInfo) {
|
||||||
const startTime = new Date(activityInfo.start_time).getTime();
|
const startTime = new Date(activityInfo.start_time).getTime();
|
||||||
const endTime = new Date(activityInfo.end_time).getTime();
|
const endTime = new Date(activityInfo.end_time).getTime();
|
||||||
isGroupBuyValid = currentTime >= startTime && currentTime <= endTime;
|
isGroupBuyValid = currentTime >= startTime && currentTime <= endTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据平台设置不同的trans_type值
|
// 根据平台设置不同的trans_type值
|
||||||
// 小程序: 71, App: 51
|
// 小程序: 71, App: 51
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
@ -641,7 +640,7 @@ export default {
|
|||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
trans_type = 51; // App平台
|
trans_type = 51; // App平台
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// 创建订单参数
|
// 创建订单参数
|
||||||
const params = {
|
const params = {
|
||||||
user_id: uni.getStorageSync('userId'),
|
user_id: uni.getStorageSync('userId'),
|
||||||
@ -662,7 +661,7 @@ export default {
|
|||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 调用创建订单接口
|
// 调用创建订单接口
|
||||||
request(apiArr.createOrder, "POST", params).then(resVal => {
|
request(apiArr.createOrder, "POST", params).then(resVal => {
|
||||||
// 调用预下单接口
|
// 调用预下单接口
|
||||||
@ -671,7 +670,7 @@ export default {
|
|||||||
user_id: uni.getStorageSync('userId'),
|
user_id: uni.getStorageSync('userId'),
|
||||||
trans_type: trans_type
|
trans_type: trans_type
|
||||||
}
|
}
|
||||||
|
|
||||||
request(apiArr.mergePreorder, "POST", preOrderParam).then(res => {
|
request(apiArr.mergePreorder, "POST", preOrderParam).then(res => {
|
||||||
// 处理预下单响应
|
// 处理预下单响应
|
||||||
this.handleMergePreorderResponse(res, resVal.order_id);
|
this.handleMergePreorderResponse(res, resVal.order_id);
|
||||||
@ -684,7 +683,7 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理mergePreorder接口的响应
|
// 处理mergePreorder接口的响应
|
||||||
handleMergePreorderResponse(res, orderId) {
|
handleMergePreorderResponse(res, orderId) {
|
||||||
if (res && res.timeStamp && res.nonceStr && res.package && res.signType && res.paySign) {
|
if (res && res.timeStamp && res.nonceStr && res.package && res.signType && res.paySign) {
|
||||||
@ -709,10 +708,10 @@ export default {
|
|||||||
this.slFen = res.shiliu_fen || 0;
|
this.slFen = res.shiliu_fen || 0;
|
||||||
this.slZi = res.shiliu_zi || 0;
|
this.slZi = res.shiliu_zi || 0;
|
||||||
this.slJin = res.shiliu_money || 0;
|
this.slJin = res.shiliu_money || 0;
|
||||||
|
|
||||||
// 显示支付成功弹窗
|
// 显示支付成功弹窗
|
||||||
this.boxshadow5 = true;
|
this.boxshadow5 = true;
|
||||||
|
|
||||||
// 关闭支付弹窗
|
// 关闭支付弹窗
|
||||||
this.closeSeckill();
|
this.closeSeckill();
|
||||||
})
|
})
|
||||||
@ -755,42 +754,42 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 关闭团购记录
|
// 关闭团购记录
|
||||||
closePurchase() {
|
closePurchase() {
|
||||||
this.showPurchase = false;
|
this.showPurchase = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 关闭支付成功弹窗
|
// 关闭支付成功弹窗
|
||||||
changeShadow2() {
|
changeShadow2() {
|
||||||
this.boxshadow5 = false;
|
this.boxshadow5 = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 分享给微信好友
|
// 分享给微信好友
|
||||||
shareFriend() {
|
shareFriend() {
|
||||||
this.boxshadow5 = false; // 关闭分享弹窗
|
this.boxshadow5 = false; // 关闭分享弹窗
|
||||||
|
|
||||||
// 调用分享API
|
// 调用分享API
|
||||||
if (typeof uni.share !== 'undefined') {
|
if (typeof uni.share !== 'undefined') {
|
||||||
uni.share({
|
uni.share({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
scene: 'WXSceneSession',
|
scene: 'WXSceneSession',
|
||||||
type: 0,
|
type: 0,
|
||||||
title: this.currentGG.goods_name || '商品分享',
|
title: this.currentGG.goods_name || '商品分享',
|
||||||
summary: this.currentGG.commodity_brief || '快来看看这款商品吧',
|
summary: this.currentGG.commodity_brief || '快来看看这款商品吧',
|
||||||
href: `${window.location.origin}/pages/goodsDetail/index?id=${this.id}`,
|
href: `${window.location.origin}/pages/goodsDetail/index?id=${this.id}`,
|
||||||
imageUrl: this.picUrl + (this.currentGG.goods_carousel && this.currentGG.goods_carousel[0] || ''),
|
imageUrl: this.picUrl + (this.currentGG.goods_carousel && this.currentGG.goods_carousel[0] || ''),
|
||||||
success: () => {
|
success: () => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '分享成功',
|
title: '分享成功',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('分享失败', err);
|
console.error('分享失败', err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//去下单
|
//去下单
|
||||||
goSubmit() {
|
goSubmit() {
|
||||||
@ -1088,12 +1087,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
//获取购物车数量
|
//获取购物车数量
|
||||||
// getShopCar() {
|
getShopCar() {
|
||||||
// request(apiArr.getCarCount, "POST", {}).then((res) => {
|
request(apiArr.getCarCount, "POST", {}).then((res) => {
|
||||||
// this.carNum = res.total;
|
this.carNum = res.total;
|
||||||
// this.prevCarNum = res.total;
|
this.prevCarNum = res.total;
|
||||||
// });
|
});
|
||||||
// },
|
},
|
||||||
|
|
||||||
getShopCarList() {
|
getShopCarList() {
|
||||||
const params = {
|
const params = {
|
||||||
@ -1103,7 +1102,6 @@ export default {
|
|||||||
// 合并当日达和普通商品数据
|
// 合并当日达和普通商品数据
|
||||||
this.carOrderList = [].concat(res.same_day_cart_list, res.normal_cart_list)
|
this.carOrderList = [].concat(res.same_day_cart_list, res.normal_cart_list)
|
||||||
.flatMap(supplier => supplier.commodity_cart_and_goods_model);
|
.flatMap(supplier => supplier.commodity_cart_and_goods_model);
|
||||||
this.carNum = res.total;
|
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1134,7 +1132,7 @@ export default {
|
|||||||
group_buy_id: this.info.commodity_goods_info_list[this.currentGGIndex].group_buy_activity_id,
|
group_buy_id: this.info.commodity_goods_info_list[this.currentGGIndex].group_buy_activity_id,
|
||||||
}
|
}
|
||||||
request(apiArr.updateCar, "POST", params).then((res) => {
|
request(apiArr.updateCar, "POST", params).then((res) => {
|
||||||
// that.getShopCar();
|
that.getShopCar();
|
||||||
that.getShopCarList();
|
that.getShopCarList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1163,7 +1161,7 @@ export default {
|
|||||||
title: "操作成功!",
|
title: "操作成功!",
|
||||||
success() { },
|
success() { },
|
||||||
});
|
});
|
||||||
// this.getShopCar();
|
this.getShopCar();
|
||||||
this.getGoodsInfo();
|
this.getGoodsInfo();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1193,7 +1191,6 @@ export default {
|
|||||||
this.showSeckill = false;
|
this.showSeckill = false;
|
||||||
uni.removeStorageSync('changeZTAddress')
|
uni.removeStorageSync('changeZTAddress')
|
||||||
this.defZTAddress = {}
|
this.defZTAddress = {}
|
||||||
this.changeCount = 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
editAddress() {
|
editAddress() {
|
||||||
@ -1282,7 +1279,7 @@ export default {
|
|||||||
this.getShopCarList().then(() => {
|
this.getShopCarList().then(() => {
|
||||||
this.getGoodsInfo();
|
this.getGoodsInfo();
|
||||||
});
|
});
|
||||||
// this.getShopCar();
|
this.getShopCar();
|
||||||
this.getZTAddress()
|
this.getZTAddress()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -142,11 +142,11 @@
|
|||||||
</u-grid>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="customer" @click="headerCustomerClick">
|
<view class="customer" @click="headerCustomerClick">
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Vector16.png"
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Vector16.png"
|
||||||
mode="" />
|
mode="" />
|
||||||
<view>客服</view>
|
<view>客服</view>
|
||||||
</view> -->
|
</view>
|
||||||
<view style="padding-top: 174rpx;"></view>
|
<view style="padding-top: 174rpx;"></view>
|
||||||
<nav-footer :current="4" />
|
<nav-footer :current="4" />
|
||||||
</view>
|
</view>
|
||||||
@ -183,7 +183,7 @@ export default {
|
|||||||
{
|
{
|
||||||
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1563.png",
|
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1563.png",
|
||||||
name: "收货地址",
|
name: "收货地址",
|
||||||
url: "/packages/shop/address/index",
|
url: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1564.png",
|
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1564.png",
|
||||||
@ -468,12 +468,12 @@ export default {
|
|||||||
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
|
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
|
||||||
uni.setStorageSync('phone', res.account);
|
uni.setStorageSync('phone', res.account);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
// uni.showToast({
|
uni.showToast({
|
||||||
// title: '刷新成功',
|
title: '刷新成功',
|
||||||
// icon: 'success',
|
icon: 'success',
|
||||||
// mask: true,
|
mask: true,
|
||||||
// duration: 2000,
|
duration: 2000,
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user