|
|
|
|
@ -29,10 +29,15 @@ const $props = defineProps({
|
|
|
|
|
type: String,
|
|
|
|
|
default: "",
|
|
|
|
|
},
|
|
|
|
|
wj: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: "",
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const $store = useStore();
|
|
|
|
|
|
|
|
|
|
let wj = ref(""); //
|
|
|
|
|
let leftList = ref({}); // 左侧列表
|
|
|
|
|
let tabIndex = ref(""); // 默认选中
|
|
|
|
|
let rightLeft = ref([]); // 右侧列表
|
|
|
|
|
@ -100,12 +105,14 @@ const getBuyInfo = async () => {
|
|
|
|
|
person_id: personId.value,
|
|
|
|
|
group_id: groupId.value,
|
|
|
|
|
combo_id: comboId.value,
|
|
|
|
|
wj: wj.value,
|
|
|
|
|
};
|
|
|
|
|
if (comboId.value) {
|
|
|
|
|
obj.combo_id = comboId.value;
|
|
|
|
|
}
|
|
|
|
|
const response = await $api("BuyInfo", obj);
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
|
|
|
|
|
groupLength.value = response.data.group_info
|
|
|
|
|
? response.data.group_info[0]?.items?.length
|
|
|
|
|
: 0;
|
|
|
|
|
@ -180,6 +187,9 @@ const toDetails = (state) => {
|
|
|
|
|
if (groupId.value) {
|
|
|
|
|
query += "&groupId=" + groupId.value;
|
|
|
|
|
}
|
|
|
|
|
if($props.wj){
|
|
|
|
|
query +="&wj="+$props.wj
|
|
|
|
|
}
|
|
|
|
|
console.log($props.comboId || $props.itemIds ? 2 : 1);
|
|
|
|
|
let delta = 0;
|
|
|
|
|
if (groupId.value) {
|
|
|
|
|
@ -230,6 +240,7 @@ const mountedAction = async () => {
|
|
|
|
|
comboId.value = $props.comboId || "";
|
|
|
|
|
personId.value = $store.getUser().person_id || "";
|
|
|
|
|
groupId.value = $props.groupId || "";
|
|
|
|
|
wj.value = $props.wj || "";
|
|
|
|
|
|
|
|
|
|
if (groupId.value) {
|
|
|
|
|
if (comboId.value) {
|
|
|
|
|
@ -263,7 +274,18 @@ const configRef = (e) => {
|
|
|
|
|
mountedAction();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const XuanZeItem= (item)=>{
|
|
|
|
|
|
|
|
|
|
if(selectIds.value.includes(item.id)){
|
|
|
|
|
selectIds.value.splice(selectIds.value.indexOf(item.id),1);
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
selectIds.value.push(item.id);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
getBuyInfo()
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
onShow(() => {
|
|
|
|
|
if (!!config_ref.value) {
|
|
|
|
|
mountedAction();
|
|
|
|
|
@ -472,16 +494,9 @@ onShow(() => {
|
|
|
|
|
</view>
|
|
|
|
|
<view
|
|
|
|
|
class="w-58% items-end flex justify-between"
|
|
|
|
|
@click="
|
|
|
|
|
() => {
|
|
|
|
|
if (selectIds.includes(item.id)) {
|
|
|
|
|
selectIds.splice(selectIds.indexOf(item.id), 1);
|
|
|
|
|
} else {
|
|
|
|
|
selectIds.push(item.id);
|
|
|
|
|
}
|
|
|
|
|
getBuyInfo();
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
@click="XuanZeItem(item)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<text class="text-#EC3D15 text-26rpx">¥ {{ item.price }}</text>
|
|
|
|
|
<text class="text-#9e9d9d text-20rpx line-through"
|
|
|
|
|
|