修改霸王餐页面,增加私域引流,消费返现,满减活动页面
This commit is contained in:
49
pageMarket/components/shop-sel-action-sheet.vue
Normal file
49
pageMarket/components/shop-sel-action-sheet.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<view>
|
||||
<up-action-sheet
|
||||
:round="14"
|
||||
:actions="list"
|
||||
:title="title"
|
||||
:show="show"
|
||||
closeOnClickAction
|
||||
cancelText="取消"
|
||||
@close="close"
|
||||
@select="sheetSelect"
|
||||
></up-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup >
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { getShopList } from "@/http/api/shop.js";
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: "请选择",
|
||||
},
|
||||
});
|
||||
const list = ref([]);
|
||||
const show=defineModel({
|
||||
name: "show",
|
||||
default: false,
|
||||
})
|
||||
function close() {
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
const emit=defineEmits(["choose"]);
|
||||
function sheetSelect(e) {
|
||||
console.log(e);
|
||||
emit("choose", e);
|
||||
}
|
||||
onMounted(() => {
|
||||
getShopList().then((res) => {
|
||||
list.value = res.map((v) => ({
|
||||
...v,
|
||||
value: v.shopId,
|
||||
name: v.shopName,
|
||||
}));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user