diff --git a/http/api/market/rechargeRedemption.js b/http/api/market/rechargeRedemption.js new file mode 100644 index 0000000..9898730 --- /dev/null +++ b/http/api/market/rechargeRedemption.js @@ -0,0 +1,77 @@ +import http from "@/http/http.js"; +const request = http.request; +const urlType = "market"; + +export function enable(params) { + return request({ + url: urlType + `/admin/rechargeRedemption/enable`, + method: "PUT", + params: { + ...params, + }, + }); +} + +export function status(params) { + return request({ + url: urlType + `/admin/rechargeRedemption/enable/status`, + method: "get", + params: { + ...params, + }, + }); +} +export function couponRedemption(params) { + return request({ + url: urlType + `/admin/rechargeRedemption`, + method: "get", + params: { + ...params, + }, + }); +} +export function couponRedemptionList(params) { + return request({ + url: urlType + `/admin/rechargeRedemption/list`, + method: "get", + params: { + ...params, + }, + }); +} +export function add(params) { + return request({ + url: urlType + `/admin/rechargeRedemption`, + method: "POST", + params: { + ...params, + }, + }); +} +export function edit(params) { + return request({ + url: urlType + `/admin/rechargeRedemption`, + method: "PUT", + params: { + ...params, + }, + }); +} +export function codeList(params) { + return request({ + url: urlType + `/admin/rechargeRedemption/code/list`, + method: "GET", + params: { + ...params, + }, + }); +} +export function codeExport(params) { + return http.download({ + url: urlType + `/admin/rechargeRedemption/code/export`, + method: "GET", + params: { + ...params, + }, + }); +} diff --git a/pageMarket/couponExchangeCode/detail.vue b/pageMarket/couponExchangeCode/detail.vue index 2c0a752..9864a77 100644 --- a/pageMarket/couponExchangeCode/detail.vue +++ b/pageMarket/couponExchangeCode/detail.vue @@ -3,7 +3,9 @@ 兑换码名称 - {{ form.name }} + + + @@ -128,6 +130,7 @@ import { } from "@dcloudio/uni-app"; import couponStatus from "./components/status.vue"; import CouponList from "@/pageMarket/components/coupon-list.vue"; +import DateTimePicker from "@/pageMarket/components/date-time-picker.vue"; import Modal from "@/pageMarket/components/modal.vue"; import * as couponRedemptionApi from "@/http/api/market/couponRedemption.js"; @@ -325,4 +328,12 @@ onReachBottom(() => { border-bottom: none; } } +:deep(.uni-input-input){ + text-align: right; +} +:deep(.input-placeholder){ + text-align: right; + color: #999; + font-size: 28rpx; +} diff --git a/pageMarket/couponExchangeCode/index.vue b/pageMarket/couponExchangeCode/index.vue index 23add6a..bc4928d 100644 --- a/pageMarket/couponExchangeCode/index.vue +++ b/pageMarket/couponExchangeCode/index.vue @@ -122,6 +122,7 @@ const loadFinish = ref(false); const form = reactive({ isEnable: 0, useType: "all", + shopIdList:[] }); const actions = [ @@ -222,7 +223,7 @@ const handleConfirm = async () => { } couponRedemptionApi.enable({ - shopIdList: form.shopIdList, + shopIdList: form.shopIdList||[], useType: form.useType, isEnable: form.isEnable, }); @@ -281,6 +282,7 @@ watch( async function getConfig() { couponRedemptionApi.status().then((res) => { + res.shopIdList = res.shopIdList || []; Object.assign(form, res); }); } diff --git a/pageMarket/orderRecommendation/add.vue b/pageMarket/orderRecommendation/add.vue index 0629530..f192584 100644 --- a/pageMarket/orderRecommendation/add.vue +++ b/pageMarket/orderRecommendation/add.vue @@ -17,14 +17,24 @@ 选择商品 - + 自定义引导语 + + + 是否启用 + + 可用周期 @@ -63,12 +73,20 @@ import { onBackPress, } from "@dcloudio/uni-app"; +function cancel() { + uni.navigateBack({ + delta: 1, + }); +} + const form = reactive({ foods: "", useDays: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"], useStartTime: "", useTimeType: "all", useEndTime: "", + guideDetail:'', + status:1 }); function save() { @@ -109,16 +127,18 @@ function save() { }); return; } + if(!form.guideDetail){ + uni.showToast({ + title: "请输入自定义引导语", + icon: "none", + }); + return; + } if(options.type=='edit'){ suggestApi .editSuggest({ - title: form.title, - id: form.id, - foods: form.foods, + ...form, useDays: form.useDays.join(","), - useStartTime: form.useStartTime, - useTimeType: form.useTimeType, - useEndTime: form.useEndTime, }) .then((res) => { uni.showToast({ @@ -136,12 +156,8 @@ function save() { } suggestApi .addSuggest({ - title: form.title, - foods: form.foods, - useDays: form.useDays.join(","), - useStartTime: form.useStartTime, - useTimeType: form.useTimeType, - useEndTime: form.useEndTime, + ...form, + useDays: form.useDays.join(",") }) .then((res) => { uni.showToast({ @@ -168,8 +184,14 @@ onLoad((opt) => { form.useTimeType = item.useTimeType; form.useEndTime = item.useEndTime; form.id = item.id; + form.guideDetail=item.guideDetail + form.status=item.status console.log(form); + } + uni.setNavigationBarTitle({ + title:opt.type=="edit"?"编辑":"添加", + }); }); diff --git a/pageMarket/orderRecommendation/index.vue b/pageMarket/orderRecommendation/index.vue index ffc3bb5..0097c7d 100644 --- a/pageMarket/orderRecommendation/index.vue +++ b/pageMarket/orderRecommendation/index.vue @@ -31,7 +31,7 @@ 多个弹窗时,每个弹窗之间关闭和弹出间隔为15秒 + >多个弹窗时,每个弹窗之间关闭和弹出间隔为30秒 diff --git a/pageMarket/rechargeExchangeCode/add.vue b/pageMarket/rechargeExchangeCode/add.vue new file mode 100644 index 0000000..082e686 --- /dev/null +++ b/pageMarket/rechargeExchangeCode/add.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/pageMarket/rechargeExchangeCode/components/status.vue b/pageMarket/rechargeExchangeCode/components/status.vue new file mode 100644 index 0000000..2767a97 --- /dev/null +++ b/pageMarket/rechargeExchangeCode/components/status.vue @@ -0,0 +1,52 @@ + + diff --git a/pageMarket/rechargeExchangeCode/detail.vue b/pageMarket/rechargeExchangeCode/detail.vue new file mode 100644 index 0000000..53c9cb3 --- /dev/null +++ b/pageMarket/rechargeExchangeCode/detail.vue @@ -0,0 +1,321 @@ + + + + + diff --git a/pageMarket/rechargeExchangeCode/index.vue b/pageMarket/rechargeExchangeCode/index.vue new file mode 100644 index 0000000..32826c5 --- /dev/null +++ b/pageMarket/rechargeExchangeCode/index.vue @@ -0,0 +1,366 @@ + + + + + diff --git a/pages.json b/pages.json index a90ce45..6f9db8b 100644 --- a/pages.json +++ b/pages.json @@ -724,7 +724,7 @@ "pageId": "PAGES_MARKET_ORDER_RECOMMENDATION_ADD", "path": "orderRecommendation/add", "style": { - "navigationBarTitleText": "添加" + "navigationBarTitleText": "" } }, { @@ -747,6 +747,27 @@ "style": { "navigationBarTitleText": "券兑换码详情" } + }, + { + "pageId": "PAGES_MARKET_RECHARGE_EXCHANGE_CODE", + "path": "rechargeExchangeCode/index", + "style": { + "navigationBarTitleText": "充值兑换码" + } + }, + { + "pageId": "PAGES_MARKET_RECHARGE_EXCHANGE_CODE_ADD", + "path": "rechargeExchangeCode/add", + "style": { + "navigationBarTitleText": "添加充值兑换码" + } + }, + { + "pageId": "PAGES_MARKET_RECHARGE_EXCHANGE_CODE_ADD_DWTAIL", + "path": "rechargeExchangeCode/detail", + "style": { + "navigationBarTitleText": "充值兑换码详情" + } } diff --git a/pages/appliccation/marketing.vue b/pages/appliccation/marketing.vue index 791fc19..e15262a 100644 --- a/pages/appliccation/marketing.vue +++ b/pages/appliccation/marketing.vue @@ -64,7 +64,7 @@ const menuList = ref([ { title: '智慧充值', icon: '', - pageUrl: 'PAGES_ORDER_INDEX', + pageUrl: 'PAGES_RECHARGE_INDEX', intro: '允许客户充值并使用余额支付' }, { @@ -100,7 +100,7 @@ const menuList = ref([ { title: '点餐智能推荐', icon: '', - pageUrl: '', + pageUrl: 'PAGES_MARKET_ORDER_RECOMMENDATION', intro: '进入点单页X秒未点自动推荐商品,此推荐设置启用即生效' }, { @@ -118,7 +118,7 @@ const menuList = ref([ { title: '充值兑换码', icon: '', - pageUrl: '', + pageUrl: 'PAGES_MARKET_RECHARGE_EXCHANGE_CODE', intro: '兑换码直充余额,可当作礼品赠送' }, { diff --git a/static/logo.png b/static/logo.png deleted file mode 100644 index b5771e2..0000000 Binary files a/static/logo.png and /dev/null differ