增加点餐智能推荐
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
class="number-box"
|
||||
placeholder="请输入内容"
|
||||
placeholder-class="color-999 u-font-28"
|
||||
type="number"
|
||||
type="digit"
|
||||
v-model="form.discountAmount"
|
||||
/>
|
||||
<view class="unit">元</view>
|
||||
@@ -65,13 +65,13 @@
|
||||
class="u-flex default-box-x-padding default-box-y-padding"
|
||||
v-if="form.discountType === 'RANDOM'"
|
||||
>
|
||||
<view class="font-bold u-m-r-14">减免方式</view>
|
||||
<my-button height="60rpx" @click="addItem">添加方案</my-button>
|
||||
<view class="font-bold u-m-r-14 no-wrap">随机减免方案</view>
|
||||
<my-button height="60rpx" @click="addItem"><text class="no-wrap">添加方案</text></my-button>
|
||||
<text class="color-red u-font-24 u-m-l-14"
|
||||
>所有概率相加必须等于100%</text
|
||||
>
|
||||
</view>
|
||||
<view class="table">
|
||||
<view class="table" v-if="form.discountType === 'RANDOM'">
|
||||
<view
|
||||
class="header u-flex u-row-between color-666 default-box-x-padding u-p-t-48 u-p-b-48 bg-f7"
|
||||
>
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user