diff --git a/commons/style/common.scss b/commons/style/common.scss
index 6a0a8f3..542d42b 100644
--- a/commons/style/common.scss
+++ b/commons/style/common.scss
@@ -365,7 +365,7 @@ text {
right: 0;
padding: 30rpx;
padding-bottom: env(safe-area-inset-bottom);
-
+ z-index: 999;
/* #ifdef H5 */
padding-bottom: 28rpx;
/* #endif */
@@ -427,4 +427,51 @@ text {
}
.bg-f7{
background-color: #F7F7F7;
-}
\ No newline at end of file
+}
+.default-box-padding{
+ padding: 32rpx 28rpx;
+}
+.default-box-radius{
+ border-radius: 16rpx;
+}
+.default-box-x-padding{
+ padding-left: 28rpx;
+ padding-right: 28rpx;
+}
+.default-box-y-padding{
+ padding-top: 32rpx;
+ padding-bottom: 32rpx;
+}
+$height: 70rpx;
+
+.number-box {
+ font-size: 28rpx;
+ padding: 0 26rpx;
+ border-radius: 6rpx 0 0 6rpx;
+ border-top: 2rpx solid #d9d9d9;
+ border-bottom: 2rpx solid #d9d9d9;
+ border-left: 2rpx solid #d9d9d9;
+ background: #fff;
+ box-sizing: border-box;
+ height: $height;
+ flex: 1;
+ line-height: $height;
+ }
+ .unit {
+ display: flex;
+ padding: 0 38rpx;
+ height: $height;
+ line-height: $height;
+ align-items: center;
+ border-radius: 0 6rpx 6rpx 0;
+ border: 2rpx solid #d9d9d9;
+ background: #f7f7fa;
+ font-size: 28rpx;
+ color: #999999;
+ }
+ .u-col-baseline{
+ align-items: baseline;
+ }
+ .text-right{
+ text-align: right;
+ }
\ No newline at end of file
diff --git a/components/my-components/my-bottom-btn-group.vue b/components/my-components/my-bottom-btn-group.vue
index 688082a..56f6c02 100644
--- a/components/my-components/my-bottom-btn-group.vue
+++ b/components/my-components/my-bottom-btn-group.vue
@@ -1,10 +1,13 @@
-
+
-
+
-
+
保存
@@ -18,7 +21,15 @@
+
+
diff --git a/components/my-components/my-dine-types.vue b/components/my-components/my-dine-types.vue
index 05458df..bb3a040 100644
--- a/components/my-components/my-dine-types.vue
+++ b/components/my-components/my-dine-types.vue
@@ -1,39 +1,57 @@
-
-
-
-
-
+
+
+
+
+
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 @@
-
-
-
-
-
-
-
- 开始时间
- {{ startValue }}
-
- —
-
- 结束时间
- {{ endValue }}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 开始时间
+ {{ startValue }}
+
+ —
+
+ 结束时间
+ {{ endValue }}
+
+
+
+
+
+
+
+
+
diff --git a/components/my-components/my-time-area.vue b/components/my-components/my-time-area.vue
index 7cb469d..0938a16 100644
--- a/components/my-components/my-time-area.vue
+++ b/components/my-components/my-time-area.vue
@@ -2,13 +2,13 @@
- 请选择日期范围
+ {{ startText }}
{{ startDate }}
—
- 请选择日期范围
+ {{ endText }}
{{ endDate }}
@@ -29,6 +29,16 @@
+
+
diff --git a/pageMarket/components/modal.vue b/pageMarket/components/modal.vue
index d8f4fc3..99916c1 100644
--- a/pageMarket/components/modal.vue
+++ b/pageMarket/components/modal.vue
@@ -67,8 +67,8 @@ function confirm(){
.btn{
flex:1;
text-align: center;
- padding: 34rpx 20rpx;
- border-radius: 4rpx;
+ padding: 18rpx 60rpx;
+ border-radius: 100rpx;
font-size: 32rpx;
border: 2rpx solid transparent;
&.success{
diff --git a/pageMarket/distribution/add-fenxiao-user.vue b/pageMarket/distribution/add-fenxiao-user.vue
index 0f31251..ef76980 100644
--- a/pageMarket/distribution/add-fenxiao-user.vue
+++ b/pageMarket/distribution/add-fenxiao-user.vue
@@ -66,7 +66,7 @@
{{
- item.accountPoints
+ item.consumeCount
}}
@@ -86,14 +86,7 @@
-
-
-
+
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/distribution/components/fenxiao-user-list.vue b/pageMarket/distribution/components/fenxiao-user-list.vue
index 4a20196..f3906d5 100644
--- a/pageMarket/distribution/components/fenxiao-user-list.vue
+++ b/pageMarket/distribution/components/fenxiao-user-list.vue
@@ -3,9 +3,9 @@
- 用户昵称
+ {{ item.shopUserName }}
- {{ item.shopUserName }}
+ {{ item.shopUserPhone }}
@@ -82,7 +82,7 @@
>是否确认重置分销组 重置后将会按照用户的实际数据匹配分销组
-
+
是否确认取消分销员
@@ -179,6 +179,8 @@ async function handleConfirm() {
id: modalData.data.id,
shopId: uni.getSystemInfoSync("shopInfo").id || "",
});
+ emits("refresh");
+
}
if (modalData.key == "change-group") {
const level=distributionStore.config.levelConfigList.find((item) => item.id == group.value)
@@ -204,6 +206,10 @@ async function handleConfirm() {
});
emits("refresh");
}
+ uni.showToast({
+ title:'操作成功',
+ icon:'none'
+ })
group.value = "";
modalData.show = false;
}
diff --git a/pageMarket/distribution/components/open-list.vue b/pageMarket/distribution/components/open-list.vue
index 4aef715..8719104 100644
--- a/pageMarket/distribution/components/open-list.vue
+++ b/pageMarket/distribution/components/open-list.vue
@@ -12,9 +12,9 @@
- 用户昵称
+ {{item.nickName}}
- {{ item.nickName }}
+ {{ item.phone }}
{{ item.changeAmount }}
diff --git a/pageMarket/distribution/index.vue b/pageMarket/distribution/index.vue
index d674c54..862e804 100644
--- a/pageMarket/distribution/index.vue
+++ b/pageMarket/distribution/index.vue
@@ -11,7 +11,7 @@
分销
允许客户充值并使用余额支付
+ >用户成为业务员,可促进消费
+
+
+
+
请选择日期范围
@@ -66,14 +70,13 @@
class="u-font-28 filter-box u-flex u-row-between"
@click="showActions = true"
>
-
+
{{ selActions.name }}
全部
-
@@ -97,6 +100,9 @@
{{ userComponentQuery.startTime }} -
{{ userComponentQuery.endTime }}
+
+
+
请选择日期
@@ -115,7 +121,7 @@
{{
listRes.totalAmount
}}
- 支付开通人数
+ 已支付金额(元)
@@ -137,7 +143,9 @@
}}
运营余额(元)
- 充值{{'>'}}
+ 充值{{ ">" }}
@@ -229,10 +237,18 @@ const actions = [
value: "refund",
},
];
-const selActions=ref('')
+function clearKeyWord() {
+ keyWord.value = "";
+ userComponentQuery.user = "";
+}
+function clearTime() {
+ userComponentQuery.startTime = "";
+ userComponentQuery.endTime = "";
+}
+const selActions = ref("");
const showActions = ref(false);
function handleSelect(e) {
- selActions.value = e;
+ selActions.value = e;
}
const distributionStore = useDistributionStore();
@@ -360,7 +376,7 @@ async function getList() {
page: pageNum.value,
size: 10,
key: userComponentQuery.user,
- status: selActions.value.value,
+ status: selActions.value?.value || "",
startTime: userComponentQuery.startTime
? userComponentQuery.startTime + " 00:00:00"
: "",
@@ -391,6 +407,9 @@ const active = ref(0);
watch(
() => active.value,
(newval) => {
+ userComponentQuery.startTime = "";
+ userComponentQuery.endTime = "";
+ keyWord.value = "";
console.log(newval);
pageNum.value = 1;
getList();
@@ -399,21 +418,28 @@ watch(
watch(
() => active.value,
(newval) => {
+
+ refresh();
+ }
+);
+watch(
+ () => selActions.value,
+ () => {
refresh();
}
);
-watch(()=>selActions.value,()=>{
- refresh()
-})
onReachBottom(() => {
if (!isEnd.value) {
pageNum.value++;
getList();
}
});
-watch(()=>distributionStore.config.isEnable,()=>{
- distributionStore.editConfig()
-})
+watch(
+ () => distributionStore.config.isEnable,
+ () => {
+ distributionStore.editConfig();
+ }
+);
onShow(() => {
pageNum.value = 1;
getList();
diff --git a/pageMarket/distribution/level-list.vue b/pageMarket/distribution/level-list.vue
index 045d9c8..2a61107 100644
--- a/pageMarket/distribution/level-list.vue
+++ b/pageMarket/distribution/level-list.vue
@@ -33,7 +33,7 @@
名称
-
+
分成比例
@@ -50,8 +50,10 @@
%
-
- 有效人数
+
+
+
+ 有效人数
人
+
有效人数:被邀请人在店铺消费过,即有一笔订单完成
+
+
+
+ 消费金额达
+
+
+
+ 元
+
+
+ 消费金额:分销员和被邀请人在店铺订单消费总金额(不包含退款)
+
+
+
+
+
{{index==0? '添加':'继续添加'}}
-
+
删除
@@ -124,16 +149,19 @@ let timer=null
//全部的分成比例加起来不能超过100%
function checkNumberCommission(e,index){
const value=e.detail.value
- const total=allCommission()
- if(total>100){
+ clearInterval(timer)
+
+ if(value>100){
uni.showToast({
- title:'分成比例加起来不能超过100%',
+ title:'分成比例不能超过100',
icon:'none'
})
- form.levelConfigList[index].levelOneCommission=''
+ timer= setTimeout(()=>{
+ form.levelConfigList[index].levelOneCommission=''
+ },30)
+
return false
}
- clearInterval(timer)
//输入最多两位小数,两位小数点后的去除掉不让输入
if(value.indexOf('.')!=-1){
const arr=value.split('.')
@@ -145,6 +173,21 @@ function checkNumberCommission(e,index){
}
}
+
+function checkName(e,index){
+ const value=e.detail.value
+ if(value.length>10){
+ uni.showToast({
+ title:'名称最多10个字符',
+ icon:'none'
+ })
+ timer= setTimeout(()=>{
+ form.levelConfigList[index].name=value.substring(0,10)
+
+ },30)
+ return false
+ }
+}
function remove(index){
form.levelConfigList.splice(index,1)
showDetailListSwitch.value.splice(index,1)
@@ -153,7 +196,8 @@ function addLevelConfig(){
form.levelConfigList.push({
name:'',
levelOneCommission:'',
- inviteCount:''
+ inviteCount:'',
+ costAmount:''
})
showDetailListSwitch.value.push(true)
}
@@ -176,13 +220,28 @@ function addLevelConfig(){
})
return false
}
- if(item.inviteCount===''){
- uni.showToast({
- title:'请输入有效人数',
- icon:'none'
- })
- return false
+ if(form.upgradeType==='not_upgrade'){
+ continue
}
+ if(form.upgradeType==='cost'){
+ if(item.costAmount===''||item.costAmount===null){
+ uni.showToast({
+ title:'请输入消费金额',
+ icon:'none'
+ })
+ return false
+ }
+ }else{
+ if(item.inviteCount===''||item.inviteCount===null){
+ uni.showToast({
+ title:'请输入有效人数',
+ icon:'none'
+ })
+ return false
+ }
+
+ }
+
}
return true
}
diff --git a/pageMarket/distribution/money-recoders.vue b/pageMarket/distribution/money-recoders.vue
index 1f63020..5af701c 100644
--- a/pageMarket/distribution/money-recoders.vue
+++ b/pageMarket/distribution/money-recoders.vue
@@ -70,7 +70,7 @@
- 关联订单:WX1987787224197300224
+ 关联订单:{{item.orderNo}}
diff --git a/pageMarket/newUserDiscount/index.vue b/pageMarket/newUserDiscount/index.vue
new file mode 100644
index 0000000..9b88fff
--- /dev/null
+++ b/pageMarket/newUserDiscount/index.vue
@@ -0,0 +1,321 @@
+
+
+
+
+
+
+
+ 新客立减
+ 首单下单减免金额
+
+
+
+
+
+
+
+ 活动时间
+
+
+
+
+
+ 减免方式
+
+
+ 固定金额
+ 随机立减
+
+
+
+ 元
+
+
+
+
+
+ 随机减免方案
+ 添加方案
+ 所有概率相加必须等于100%
+
+
+
+
+ {{ item.amount }}
+ {{ item.probability }}
+
+ 编辑
+ 删除
+
+
+
+
+ 可使用类型
+
+
+
+
+
+
+
+
+
+
+
+
+ 减免金额
+
+
+ 元
+
+
+
+ 概率
+
+
+
+ %
+
+ 所有概率相加必须等于100%
+
+
+
+
+
+
+
+
+
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
new file mode 100644
index 0000000..ffc3bb5
--- /dev/null
+++ b/pageMarket/orderRecommendation/index.vue
@@ -0,0 +1,280 @@
+
+
+
+
+
+
+
+
+ 点餐智能推荐
+ 进入点单页X秒未点自动推荐商品,此推荐设置启用即生效
+
+
+
+
+
+
+
+ 首次弹窗触发时间
+ {{
+ accountInfoStore.shopInfo.suggestTime
+ }}
+ 秒
+
+ 多个弹窗时,每个弹窗之间关闭和弹出间隔为15秒
+
+
+
+
+
+
+
+ {{ item.title }}
+ {{
+ item.status == 1 ? "启用" : "禁用"
+ }}
+
+
+ {{ item.useDays }}
+ {{ returnUseTimeType(item) }}
+
+
+ 删除
+ 编辑
+
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+ 秒
+
+ 设置为0时,进入点餐页立即弹出
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/static/images/new-user-discount.png b/pageMarket/static/images/new-user-discount.png
new file mode 100644
index 0000000..8a4897b
Binary files /dev/null and b/pageMarket/static/images/new-user-discount.png differ
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 18e524b..46507c0 100644
--- a/pages.json
+++ b/pages.json
@@ -686,6 +686,39 @@
"style": {
"navigationBarTitleText": "运营余额"
}
+ },
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "pageId": "PAGES_MARKET_NEW_USER_DISCOUNT",
+ "path": "newUserDiscount/index",
+ "style": {
+ "navigationBarTitleText": "新客立减"
+ }
+ },
+ {
+ "pageId": "PAGES_MARKET_ORDER_RECOMMENDATION",
+ "path": "orderRecommendation/index",
+ "style": {
+ "navigationBarTitleText": "点餐智能推荐"
+ }
+ },
+ {
+ "pageId": "PAGES_MARKET_ORDER_RECOMMENDATION_ADD",
+ "path": "orderRecommendation/add",
+ "style": {
+ "navigationBarTitleText": "添加"
+ }
}
]
},
diff --git a/pages/appliccation/marketing.vue b/pages/appliccation/marketing.vue
index 61e710e..70f09fd 100644
--- a/pages/appliccation/marketing.vue
+++ b/pages/appliccation/marketing.vue
@@ -58,7 +58,7 @@ const menuList = ref([
{
title: '新客立减',
icon: '',
- pageUrl: 'PAGES_ORDER_INDEX',
+ pageUrl: 'PAGES_MARKET_NEW_USER_DISCOUNT',
intro: '首单下单减免金额'
},
{
@@ -100,7 +100,7 @@ const menuList = ref([
{
title: '点餐智能推荐',
icon: '',
- pageUrl: '',
+ pageUrl: 'PAGES_MARKET_ORDER_RECOMMENDATION',
intro: '进入点单页X秒未点自动推荐商品,此推荐设置启用即生效'
},
{
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 的数据读写都将持久化
+});
diff --git a/store/market.js b/store/market.js
index 9a8a526..e7b0b0e 100644
--- a/store/market.js
+++ b/store/market.js
@@ -1,6 +1,7 @@
// stores/counter.js
import { defineStore } from "pinia";
import * as distributionApi from "@/http/api/market/distribution.js";
+import * as consumeDiscountApi from "@/http/api/market/consumeDiscount.js";
export const upgradeTypes = [
{
@@ -51,3 +52,33 @@ export const useDistributionStore = defineStore("distribution", {
},
unistorage: true, // 开启后对 state 的数据读写都将持久化
});
+
+//新客立减
+export const useNewUserDiscountStore = defineStore("newUserDiscount", {
+ state: () => {
+ return {
+ //分销配置
+ config: {
+ isEnable: 0,
+ },
+ };
+ },
+ actions: {
+ async getConfig() {
+ const data = await consumeDiscountApi.getConfig();
+ this.config = data;
+ return this.config;
+ },
+ async editConfig(data, isAutoResrefresh = true) {
+ const res = await consumeDiscountApi.editConfig({
+ ...this.config,
+ ...data,
+ });
+ if (isAutoResrefresh) {
+ this.getConfig();
+ }
+ return res;
+ },
+ },
+ unistorage: true, // 开启后对 state 的数据读写都将持久化
+});