优化积分配置
This commit is contained in:
@@ -315,10 +315,12 @@ function submitHandle() {
|
|||||||
data.goodsDescription = JSON.stringify(imgs.value);
|
data.goodsDescription = JSON.stringify(imgs.value);
|
||||||
}
|
}
|
||||||
await pointsGoodsPost(data);
|
await pointsGoodsPost(data);
|
||||||
uni.showToast({
|
setTimeout(() => {
|
||||||
title: '保存成功',
|
uni.showToast({
|
||||||
icon: 'none'
|
title: '保存成功',
|
||||||
});
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
@@ -163,10 +163,12 @@ async function submitQuntity() {
|
|||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
await pointsGoodsPost(quantityItem.value);
|
await pointsGoodsPost(quantityItem.value);
|
||||||
uni.showToast({
|
setTimeout(() => {
|
||||||
title: '保存成功',
|
uni.showToast({
|
||||||
icon: 'none'
|
title: '保存成功',
|
||||||
});
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
pointsGoodsPageAjax();
|
pointsGoodsPageAjax();
|
||||||
showEdtorQuantity.value = false;
|
showEdtorQuantity.value = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -193,10 +193,13 @@ async function checkoutAjax(couponCode) {
|
|||||||
});
|
});
|
||||||
await goodsRecordCkecout(couponCode);
|
await goodsRecordCkecout(couponCode);
|
||||||
goodsRecordPageAjax();
|
goodsRecordPageAjax();
|
||||||
uni.showToast({
|
|
||||||
title: '已核销',
|
setTimeout(() => {
|
||||||
icon: 'none'
|
uni.showToast({
|
||||||
});
|
title: '已核销',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,14 +103,15 @@ import { filterNumberInput } from '@/utils/index.js';
|
|||||||
import { pointsConfigPost, pointsConfigGet } from '@/http/api/market/point.js';
|
import { pointsConfigPost, pointsConfigGet } from '@/http/api/market/point.js';
|
||||||
|
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const form = ref({
|
const formObj = {
|
||||||
enableRewards: 0,
|
enableRewards: 0,
|
||||||
consumeAmount: '', // 每消费xx元赠送1积分
|
consumeAmount: '', // 每消费xx元赠送1积分
|
||||||
minPaymentAmount: '', // 下单实付抵扣门槛
|
minPaymentAmount: '', // 下单实付抵扣门槛
|
||||||
maxDeductionRatio: 100, // 下单最高抵扣比例
|
maxDeductionRatio: 100, // 下单最高抵扣比例
|
||||||
equivalentPoints: '', // 下单抵扣积分比例 1元=?积分
|
equivalentPoints: '', // 下单抵扣积分比例 1元=?积分
|
||||||
enablePointsMall: 0 // 开启积分商城
|
enablePointsMall: 0 // 开启积分商城
|
||||||
});
|
};
|
||||||
|
const form = ref({ ...formObj });
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
consumeAmount: [
|
consumeAmount: [
|
||||||
@@ -209,10 +210,12 @@ function submitHandle() {
|
|||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
await pointsConfigPost(form.value);
|
await pointsConfigPost(form.value);
|
||||||
uni.showToast({
|
setTimeout(() => {
|
||||||
title: '保存成功',
|
uni.showToast({
|
||||||
icon: 'none'
|
title: '保存成功',
|
||||||
});
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}, 300);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
@@ -229,7 +232,11 @@ async function pointsConfigGetAjax() {
|
|||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
const res = await pointsConfigGet();
|
const res = await pointsConfigGet();
|
||||||
form.value = res;
|
if (res == null || !res) {
|
||||||
|
form.value = { ...formObj };
|
||||||
|
} else {
|
||||||
|
form.value = res;
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user