|
|
@@ -54,13 +54,13 @@ const state = reactive({
|
|
54
|
54
|
shareId: '',
|
|
55
|
55
|
status: '',
|
|
56
|
56
|
})
|
|
57
|
|
-let uniqueclone=ref('')
|
|
|
57
|
+let uniqueclone = ref('')
|
|
58
|
58
|
const detail: any = ref(null)
|
|
59
|
59
|
|
|
60
|
60
|
|
|
61
|
|
-function onSelectedSku(currentSku : any ) {
|
|
62
|
|
- console.log("item",currentSku);
|
|
63
|
|
-
|
|
|
61
|
+function onSelectedSku(currentSku: any) {
|
|
|
62
|
+ console.log("item", currentSku);
|
|
|
63
|
+
|
|
64
|
64
|
state.currentSku = currentSku
|
|
65
|
65
|
|
|
66
|
66
|
}
|
|
|
@@ -95,12 +95,12 @@ function handleCreateShopping() {
|
|
95
|
95
|
// state.isShowSku = false
|
|
96
|
96
|
// }
|
|
97
|
97
|
// }
|
|
98
|
|
-
|
|
|
98
|
+
|
|
99
|
99
|
if (res.status === 200) {
|
|
100
|
100
|
state.isShowSku = false
|
|
101
|
|
- console.log("修改后",state.currentSku);
|
|
102
|
|
- console.log('我是uniqueclone',uniqueclone);
|
|
103
|
|
- detail.value.unique=uniqueclone.value
|
|
|
101
|
+ console.log("修改后", state.currentSku);
|
|
|
102
|
+ console.log('我是uniqueclone', uniqueclone);
|
|
|
103
|
+ detail.value.unique = uniqueclone.value
|
|
104
|
104
|
}
|
|
105
|
105
|
|
|
106
|
106
|
uni.$on('cart-reload', () => {
|
|
|
@@ -285,8 +285,8 @@ function shopCheck(shopItem) {
|
|
285
|
285
|
}
|
|
286
|
286
|
|
|
287
|
287
|
function handleShopTitleClick(shopItem) {
|
|
288
|
|
- console.log('shopItem',shopItem);
|
|
289
|
|
-
|
|
|
288
|
+ console.log('shopItem', shopItem);
|
|
|
289
|
+
|
|
290
|
290
|
if (shopItem.allCheck) {
|
|
291
|
291
|
shopItem.list.forEach((good, index) => {
|
|
292
|
292
|
good.check = true
|
|
|
@@ -340,7 +340,7 @@ function cartAllCheck(type: 'single' | 'all') {
|
|
340
|
340
|
allArr.push(goods)
|
|
341
|
341
|
}
|
|
342
|
342
|
}
|
|
343
|
|
-
|
|
|
343
|
+
|
|
344
|
344
|
// 总金额|总数
|
|
345
|
345
|
goods.list.forEach(goodItem => {
|
|
346
|
346
|
if (goodItem.check) {
|
|
|
@@ -350,7 +350,7 @@ function cartAllCheck(type: 'single' | 'all') {
|
|
350
|
350
|
}
|
|
351
|
351
|
})
|
|
352
|
352
|
})
|
|
353
|
|
-
|
|
|
353
|
+
|
|
354
|
354
|
isAllSelect.value = allArr.length === shopping.value?.list.length
|
|
355
|
355
|
// state.totalCartCount = totalNum
|
|
356
|
356
|
state.totalPrice = totalMoney
|
|
|
@@ -528,13 +528,13 @@ function openTestLog(element) {
|
|
528
|
528
|
state.isShowSku = true
|
|
529
|
529
|
state.changeSkuCart_id = element.cart_id
|
|
530
|
530
|
console.log('用户点击sku', element.product_attr_unique)
|
|
531
|
|
- uniqueclone.value=''
|
|
|
531
|
+ uniqueclone.value = ''
|
|
532
|
532
|
getProductDetail(element.product_id).then(res => {
|
|
533
|
|
- console.log('res>>>',res);
|
|
534
|
|
- uniqueclone.value=element.product_attr_unique
|
|
|
533
|
+ console.log('res>>>', res);
|
|
|
534
|
+ uniqueclone.value = element.product_attr_unique
|
|
535
|
535
|
detail.value = res.data
|
|
536
|
|
- detail.value.unique=uniqueclone.value
|
|
537
|
|
- console.log(detail.value,'点击sku获取的商品信息,存储的detail')
|
|
|
536
|
+ detail.value.unique = uniqueclone.value
|
|
|
537
|
+ console.log(detail.value, '点击sku获取的商品信息,存储的detail')
|
|
538
|
538
|
state.shareImage = detail.value.image
|
|
539
|
539
|
if (res && res.mer_id && res.mer_id === '148') {
|
|
540
|
540
|
if (detail.value && detail.value.price) {
|
|
|
@@ -566,7 +566,7 @@ function openTestLog(element) {
|
|
566
|
566
|
</script>
|
|
567
|
567
|
<template>
|
|
568
|
568
|
<div class="">
|
|
569
|
|
- <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
|
|
|
569
|
+ <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
|
|
570
|
570
|
<div v-if="hasShopping" class="bg-white h-10 fixed top-0 w-full z-1 flex justify-end ">
|
|
571
|
571
|
<div class="pr-3">
|
|
572
|
572
|
<FButton size="small" @click="handleManageCart">
|
|
|
@@ -608,9 +608,16 @@ function openTestLog(element) {
|
|
608
|
608
|
<div @click="handleProductItemClick(goodItem)" class=" text-overflow line-clamp-1 text-xs">{{
|
|
609
|
609
|
goodItem.product.store_name }}</div>
|
|
610
|
610
|
<div class="flex flex-col justify-start gap-1">
|
|
611
|
|
- <div class="text-[10px] text-gray min-w-5 p-1 items-center flex "
|
|
612
|
|
- v-if="goodItem.productAttr.sku" @click="openTestLog(goodItem)">
|
|
613
|
|
- <div class="skushadow" >{{ goodItem.productAttr.sku }} <span class="m-lift" >v</span> </div>
|
|
|
611
|
+ <div class="text-[10px] text-gray min-w-5 p-1 items-center flex " v-if="goodItem.productAttr.sku"
|
|
|
612
|
+ @click="openTestLog(goodItem)">
|
|
|
613
|
+ <div class="skushadow">
|
|
|
614
|
+ <span class="m-live">
|
|
|
615
|
+ {{ goodItem.productAttr.sku }}
|
|
|
616
|
+ </span>
|
|
|
617
|
+ <span class="m-lift">
|
|
|
618
|
+ <img class="thumbnail_1" referrerpolicy="no-referrer" src="../../static/icon/下拉.png" />
|
|
|
619
|
+ </span>
|
|
|
620
|
+ </div>
|
|
614
|
621
|
</div>
|
|
615
|
622
|
<div class="flex">
|
|
616
|
623
|
<CXBYaojinTag :amount="goodItem.yanglao" />
|
|
|
@@ -628,7 +635,7 @@ function openTestLog(element) {
|
|
628
|
635
|
</div>
|
|
629
|
636
|
</div>
|
|
630
|
637
|
|
|
631
|
|
- <div class="pb-12" v-if="!hasShopping" >
|
|
|
638
|
+ <div class="pb-12" v-if="!hasShopping">
|
|
632
|
639
|
<div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
|
|
633
|
640
|
<image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
|
|
634
|
641
|
<div>
|
|
|
@@ -657,8 +664,8 @@ function openTestLog(element) {
|
|
657
|
664
|
</div>
|
|
658
|
665
|
</div>
|
|
659
|
666
|
</div>
|
|
660
|
|
- <CXBSkuPopup v-model:show="state.isShowSku" :detail="detail" @selected:item="onSelectedSku"
|
|
661
|
|
- @submit="handleCreateShopping" @count-change="handleCountChange" />
|
|
|
667
|
+ <CXBSkuPopup :isTo=1 v-model:show="state.isShowSku" :detail="detail" @selected:item="onSelectedSku"
|
|
|
668
|
+ @submit="handleCreateShopping" @count-change="handleCountChange" />
|
|
662
|
669
|
<div v-if="hasShopping" class="fixed bottom-0 w-full z-3">
|
|
663
|
670
|
<div class="bg-white h-10 flex justify-between" v-if="shopping && shopping.list">
|
|
664
|
671
|
<div class="flex justify-center items-center gap-2 pl-3" @tap.stop="handleSelectAll">
|
|
|
@@ -689,13 +696,30 @@ page {
|
|
689
|
696
|
.skushadow {
|
|
690
|
697
|
background-color: rgb(240, 240, 240);
|
|
691
|
698
|
border-radius: 10px;
|
|
692
|
|
- height: 100%;
|
|
|
699
|
+ height: 38rpx;
|
|
|
700
|
+ line-height: 38rpx;
|
|
|
701
|
+ font-size: 28rpx;
|
|
|
702
|
+ color: #666666;
|
|
|
703
|
+ display: flex;
|
|
|
704
|
+}
|
|
|
705
|
+
|
|
|
706
|
+.m-live {
|
|
|
707
|
+ max-width: 350rpx;
|
|
|
708
|
+ margin-left: 4rpx;
|
|
|
709
|
+ margin-right: 4rpx;
|
|
|
710
|
+ overflow: hidden; /* 溢出内容隐藏 */
|
|
|
711
|
+ white-space: nowrap; /* 不换行 */
|
|
|
712
|
+ text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
|
713
|
+}
|
|
|
714
|
+
|
|
|
715
|
+.m-lift {
|
|
|
716
|
+ margin-left: 4rpx;
|
|
|
717
|
+ margin-right: 4rpx;
|
|
693
|
718
|
}
|
|
694
|
719
|
|
|
695
|
|
-.m-lift{
|
|
696
|
|
- margin-left: 2px;
|
|
697
|
|
- margin-right:1px;
|
|
698
|
|
- color: black;
|
|
|
720
|
+.thumbnail_1 {
|
|
|
721
|
+ width: 24rpx;
|
|
|
722
|
+ height: 14rpx;
|
|
699
|
723
|
}
|
|
700
|
724
|
</style>
|
|
701
|
725
|
<route lang="yaml">
|