diff --git a/components/my-components/my-bottom-btn-group.vue b/components/my-components/my-bottom-btn-group.vue index 862bca2..56f6c02 100644 --- a/components/my-components/my-bottom-btn-group.vue +++ b/components/my-components/my-bottom-btn-group.vue @@ -46,4 +46,9 @@ function cancel() { .zhanwei1{ height: 240rpx; } +.fixed-bottom { + &.u-flex-column{ + align-items: stretch; + } +} diff --git a/components/my-components/my-hour-area.vue b/components/my-components/my-hour-area.vue index 8e846c7..7bb2442 100644 --- a/components/my-components/my-hour-area.vue +++ b/components/my-components/my-hour-area.vue @@ -1,97 +1,118 @@ diff --git a/components/my-components/my-week-sel.vue b/components/my-components/my-week-sel.vue index 78ad6d9..28295d0 100644 --- a/components/my-components/my-week-sel.vue +++ b/components/my-components/my-week-sel.vue @@ -3,6 +3,7 @@ [], diff --git a/http/api/market/suggest.js b/http/api/market/suggest.js index 6068458..92106f7 100644 --- a/http/api/market/suggest.js +++ b/http/api/market/suggest.js @@ -31,7 +31,7 @@ export function editSuggest(params) { } export function deleteSuggest(params) { return request({ - url: urlType + `/admin/suggest`, + url: urlType + `/admin/suggest?id=${params.id}`, method: "DELETE", params: { ...params, diff --git a/pageMarket/components/choose-goods.vue b/pageMarket/components/choose-goods.vue new file mode 100644 index 0000000..bbd9da3 --- /dev/null +++ b/pageMarket/components/choose-goods.vue @@ -0,0 +1,198 @@ + + + + diff --git a/pageMarket/distribution/add-fenxiao-user.vue b/pageMarket/distribution/add-fenxiao-user.vue index 87f9d04..ef76980 100644 --- a/pageMarket/distribution/add-fenxiao-user.vue +++ b/pageMarket/distribution/add-fenxiao-user.vue @@ -66,7 +66,7 @@ {{ - item.accountPoints + item.consumeCount }} diff --git a/pageMarket/distribution/components/fenxiao-mingxi.vue b/pageMarket/distribution/components/fenxiao-mingxi.vue index 69032bc..8756e6e 100644 --- a/pageMarket/distribution/components/fenxiao-mingxi.vue +++ b/pageMarket/distribution/components/fenxiao-mingxi.vue @@ -38,7 +38,7 @@ {{ 0 }}{{ item.rewardAmount }} {{ item.level == 1 ? "直接分成" : "间接分成" diff --git a/pageMarket/newUserDiscount/index.vue b/pageMarket/newUserDiscount/index.vue index e8959bd..9b88fff 100644 --- a/pageMarket/newUserDiscount/index.vue +++ b/pageMarket/newUserDiscount/index.vue @@ -53,7 +53,7 @@ class="number-box" placeholder="请输入内容" placeholder-class="color-999 u-font-28" - type="number" + type="digit" v-model="form.discountAmount" /> @@ -65,13 +65,13 @@ class="u-flex default-box-x-padding default-box-y-padding" v-if="form.discountType === 'RANDOM'" > - 减免方式 - 添加方案 + 随机减免方案 + 添加方案 所有概率相加必须等于100% - + @@ -159,6 +159,8 @@ import Modal from "@/pageMarket/components/modal.vue"; import { ref, reactive, computed, watch, onMounted } from "vue"; import { useNewUserDiscountStore } from "@/store/market.js"; + +const isLoading = ref(false); const newUserDiscountStore = useNewUserDiscountStore(); const modalData = reactive({ @@ -274,6 +276,7 @@ function save() { watch( () => newUserDiscountStore.config.isEnable, (newVal) => { + if(isLoading.value) return; newUserDiscountStore.editConfig().then((res) => { if (res) { uni.showToast({ @@ -296,6 +299,7 @@ async function init() { }; console.log(data); Object.assign(form, data); + isLoading.value = false; } onMounted(() => { diff --git a/pageMarket/orderRecommendation/add.vue b/pageMarket/orderRecommendation/add.vue new file mode 100644 index 0000000..0629530 --- /dev/null +++ b/pageMarket/orderRecommendation/add.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/pageMarket/orderRecommendation/index.vue b/pageMarket/orderRecommendation/index.vue index 46c1fa3..ffc3bb5 100644 --- a/pageMarket/orderRecommendation/index.vue +++ b/pageMarket/orderRecommendation/index.vue @@ -1,3 +1,280 @@ \ No newline at end of file + + + + + + + + 点餐智能推荐 + 进入点单页X秒未点自动推荐商品,此推荐设置启用即生效 + + + + + + + + 首次弹窗触发时间 + {{ + accountInfoStore.shopInfo.suggestTime + }} + + + 多个弹窗时,每个弹窗之间关闭和弹出间隔为15秒 + + + + + + + + {{ item.title }} + {{ + item.status == 1 ? "启用" : "禁用" + }} + + + {{ item.useDays }} + {{ returnUseTimeType(item) }} + + + 删除 + 编辑 + + + + + + 添加 + + + + + + + + + + + diff --git a/pageMarket/static/images/suggest.png b/pageMarket/static/images/suggest.png new file mode 100644 index 0000000..d0c493f Binary files /dev/null and b/pageMarket/static/images/suggest.png differ diff --git a/pages.json b/pages.json index 6fd44d8..43be175 100644 --- a/pages.json +++ b/pages.json @@ -705,6 +705,13 @@ "style": { "navigationBarTitleText": "点餐智能推荐" } + }, + { + "pageId": "PAGES_MARKET_ORDER_RECOMMENDATION_ADD", + "path": "orderRecommendation/add", + "style": { + "navigationBarTitleText": "添加" + } } ] }, diff --git a/store/account.js b/store/account.js new file mode 100644 index 0000000..cce171a --- /dev/null +++ b/store/account.js @@ -0,0 +1,29 @@ +// stores/counter.js +import { defineStore } from "pinia"; +import * as shopApi from "@/http/api/shop.js"; + +// 分销 +export const useAccountInfoStore = defineStore("accountInfo", { + state: () => { + return { + shopInfo: {}, + }; + }, + actions: { + getShopInfo() { + return shopApi.getShopInfo().then((res) => { + this.shopInfo = res; + return this.shopInfo; + }); + }, + editShopInfo(data,autoRefresh = true) { + return shopApi.editShopInfo(data).then((res) => { + if(autoRefresh) { + this.getShopInfo() + } + return res + }); + }, + }, + unistorage: true, // 开启后对 state 的数据读写都将持久化 +});