筛选套餐 回到顶部

main
yanzai 1 year ago
parent 78c12636ac
commit 9b00dc34e7

@ -5,7 +5,7 @@ import DraggableButton from "@/pages/components/goHome.vue";
* usersa0ChunLuyu * usersa0ChunLuyu
* date2024年8月7日 20:05:05 * date2024年8月7日 20:05:05
*/ */
import { ref, computed } from "vue"; import { ref, computed, nextTick } from "vue";
import { $image, $api, $response } from "@/api"; import { $image, $api, $response } from "@/api";
import { onShow,onLoad } from "@dcloudio/uni-app"; import { onShow,onLoad } from "@dcloudio/uni-app";
import { useStore } from "@/store"; import { useStore } from "@/store";
@ -41,6 +41,7 @@ const selectItemClick = async (index, key) => {
// //
let data = combo_select.value; let data = combo_select.value;
if (selectKey.value == "sort_list") { if (selectKey.value == "sort_list") {
combo_list.value.list=[]
if (sortIndex.value == index) { if (sortIndex.value == index) {
sortIndex.value = 0; sortIndex.value = 0;
} else { } else {
@ -160,6 +161,7 @@ const combo_list_computed = computed(() => {
} }
return list; return list;
}); });
let combo_list_k=ref(null)
const getComboList = async (e) => { const getComboList = async (e) => {
uni.showLoading(); uni.showLoading();
let obj = { let obj = {
@ -182,7 +184,10 @@ const getComboList = async (e) => {
const response = await $api("ComboList", obj); const response = await $api("ComboList", obj);
uni.hideLoading(); uni.hideLoading();
$response(response, () => { $response(response, () => {
combo_list.value = response.data;
combo_list.value = response.data;
}); });
}; };
@ -253,6 +258,8 @@ const open = (key) => {
} }
}; };
const config_ref = ref(null); const config_ref = ref(null);
const configRef = (e) => { const configRef = (e) => {
if (!config_ref.value) { if (!config_ref.value) {
@ -447,7 +454,7 @@ const toRouter = () => {
</view> </view>
</view> </view>
</view> </view>
<view class="list_wrapper"> <view class="list_wrapper" ref="combo_list_k">
<view <view
class="combo_wrapper" class="combo_wrapper"
v-for="(i, k) in combo_list_computed" v-for="(i, k) in combo_list_computed"

Loading…
Cancel
Save