|
|
@@ -1,17 +1,15 @@
|
|
|
import Toast from 'tdesign-miniprogram/toast/index';
|
|
|
import { createOrderItem } from '../../../services/order/orderItem';
|
|
|
import { createOrder, ORDER_STATUS, updateOrderStatus } from '../../../services/order/order';
|
|
|
-import { getSwipe } from '../../../services/order/orderConfirm';
|
|
|
import { getCartItem, deleteCartItem } from '../../../services/cart/cart';
|
|
|
import { getSkuDetail, updateSku } from '../../../services/sku/sku';
|
|
|
import { getAddressPromise } from '../../usercenter/address/list/util';
|
|
|
-import { getCloudImageTempUrl,getSingleCloudImageTempUrl } from '../../../utils/cloudImageHandler';
|
|
|
+import { getSingleCloudImageTempUrl } from '../../../utils/cloudImageHandler';
|
|
|
import { cartShouldFresh } from '../../../utils/cartFresh';
|
|
|
import { pay } from '../../../services/pay/pay';
|
|
|
|
|
|
const stripeImg = `https://cdn-we-retail.ym.tencent.com/miniapp/order/stripe.png`;
|
|
|
|
|
|
-
|
|
|
async function createOrderItemFromSku({ count, orderId, skuId }) {
|
|
|
const latestSku = await getSkuDetail(skuId);
|
|
|
const finalCount = latestSku.count - count;
|
|
|
@@ -147,24 +145,6 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // 加载广告图数据
|
|
|
- async loadAdvertisementImages() {
|
|
|
- try {
|
|
|
- const { images } = await getSwipe();
|
|
|
- console.log("获取到的广告图数据2:", images);
|
|
|
-
|
|
|
- // 确保images是数组格式
|
|
|
- let handledImages = [];
|
|
|
- if (Array.isArray(images)) {
|
|
|
- handledImages = await getCloudImageTempUrl(images);
|
|
|
- }
|
|
|
- console.log("handledImages2",handledImages[0]);
|
|
|
- this.setData({ imgSrcs: handledImages });
|
|
|
- } catch (error) {
|
|
|
- console.error("加载广告图失败:", error);
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
async onLoad(options) {
|
|
|
this.type = options?.type;
|
|
|
if (this.type === 'cart') {
|
|
|
@@ -178,7 +158,6 @@ Page({
|
|
|
this.setData({
|
|
|
loading: false,
|
|
|
});
|
|
|
- this.loadAdvertisementImages();
|
|
|
},
|
|
|
|
|
|
init() {
|
|
|
@@ -187,7 +166,6 @@ Page({
|
|
|
});
|
|
|
const { goodsRequestList } = this;
|
|
|
this.handleOptionsParams({ goodsRequestList });
|
|
|
-
|
|
|
},
|
|
|
|
|
|
toast(message) {
|