优化营销中心霸王餐/超级会员分店限时
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<my-bottom-btn-group @cancel="cancel" @save="editFreeDing" isOpenPermission></my-bottom-btn-group>
|
||||
<my-marketing-mask name="霸王餐" v-if="isMarketShow(form)"></my-marketing-mask>
|
||||
<my-marketing-mask name="霸王餐" v-if="isMarketShow(configInfo, 'shopIdList', 'enable')"></my-marketing-mask>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -74,6 +74,9 @@ import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { isMainShop, isMarketShow } from '@/store/account';
|
||||
import { getFreeDing, updateFreeDing } from '@/http/api/freeDing.js';
|
||||
|
||||
const configInfo = ref({});
|
||||
|
||||
const form = reactive({
|
||||
rechargeTimes: 2,
|
||||
rechargeThreshold: '',
|
||||
@@ -96,6 +99,7 @@ onShow(() => {
|
||||
*/
|
||||
const getlist = async () => {
|
||||
let res = await getFreeDing();
|
||||
configInfo.value = res;
|
||||
res.shopIdList = res.shopIdList || [];
|
||||
Object.assign(form, res);
|
||||
};
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
@select="selectStatus"
|
||||
:show="showAction"
|
||||
></u-action-sheet>
|
||||
<my-marketing-mask name="充值兑换码" v-if="isMarketShow(form)"></my-marketing-mask>
|
||||
<my-marketing-mask name="券兑换码" v-if="isMarketShow(form)"></my-marketing-mask>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<my-header-card :options="{ name: '限时折扣', intro: '批量设置商品折扣', icon: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/bc360b13e5734821a2de2f0494b72a8b.png' }"></my-header-card>
|
||||
<my-header-card
|
||||
:options="{ name: '限时折扣', intro: '批量设置商品折扣', icon: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/bc360b13e5734821a2de2f0494b72a8b.png' }"
|
||||
></my-header-card>
|
||||
<view class="list">
|
||||
<view class="item" v-for="item in tableData.list" :key="item.id">
|
||||
<view class="head">
|
||||
@@ -49,7 +51,7 @@ import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
|
||||
import { limitTimeDiscountPage, limitTimeDiscountDel } from '@/http/api/market/index.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { convertTimeFormat } from '@/utils/index.js';
|
||||
import {isMainShop} from "@/store/account.js";
|
||||
import { isMainShop, isMarketShow } from '@/store/account.js';
|
||||
// 去编辑
|
||||
function editorHandle(item) {
|
||||
uni.setStorageSync('limitDiscountObj', item);
|
||||
|
||||
@@ -5,21 +5,19 @@
|
||||
<view class="u-flex u-row-between custome">
|
||||
<text class="font-bold color-333">提交生日/姓名</text>
|
||||
<up-radio-group v-model="form.isSubmitInfo" placement="row">
|
||||
<up-radio :key="1" :name="1">
|
||||
<up-radio :key="1" :name="1" :customStyle="radioStyle">
|
||||
<template #label>
|
||||
<text>是</text>
|
||||
</template>
|
||||
</up-radio>
|
||||
<up-radio :key="0" :name="0">
|
||||
<up-radio :key="0" :name="0" :customStyle="radioStyle">
|
||||
<template #label>
|
||||
<text>否</text>
|
||||
</template>
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
<view class="color-999 u-font-24 u-m-t-10"
|
||||
>*成为会员前需提交生日、姓名、性别信息</view
|
||||
>
|
||||
<view class="color-999 u-font-24 u-m-t-10">*成为会员前需提交生日、姓名、性别信息</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -28,12 +26,12 @@
|
||||
<view class="u-flex u-row-between custome">
|
||||
<text class="font-bold color-333">会员开通方式</text>
|
||||
<up-radio-group v-model="form.openType" placement="row">
|
||||
<up-radio key="PAY" name="PAY">
|
||||
<up-radio key="PAY" name="PAY" :customStyle="radioStyle">
|
||||
<template #label>
|
||||
<text>购买开通</text>
|
||||
</template>
|
||||
</up-radio>
|
||||
<up-radio key="CONDITION" name="CONDITION">
|
||||
<up-radio key="CONDITION" name="CONDITION" :customStyle="radioStyle">
|
||||
<template #label>
|
||||
<text>条件开通</text>
|
||||
</template>
|
||||
@@ -44,10 +42,7 @@
|
||||
<up-line></up-line>
|
||||
</view>
|
||||
<template v-if="form.openType == 'PAY'">
|
||||
<view
|
||||
class="u-flex u-row-between u-p-t-26"
|
||||
@click="go.to('PAGES_MARKET_SUPER_VIP_VIP_PLANS')"
|
||||
>
|
||||
<view class="u-flex u-row-between u-p-t-26" @click="go.to('PAGES_MARKET_SUPER_VIP_VIP_PLANS')">
|
||||
<text class="font-bold color-333">会员周期列表</text>
|
||||
<view class="u-flex">
|
||||
<text class="u-font-24 color-main">去设置</text>
|
||||
@@ -83,41 +78,24 @@
|
||||
</view>
|
||||
<view class="u-m-t-32 container">
|
||||
<view class="font-bold color-333 u-m-b-16">可用门店</view>
|
||||
<my-shop-select
|
||||
@shop-select="shopSelect"
|
||||
v-model:selShops="form.memberPriceShopIdList"
|
||||
v-model:useType="form.memberPriceShopType"
|
||||
></my-shop-select>
|
||||
<my-shop-select @shop-select="shopSelect" v-model:selShops="form.memberPriceShopIdList" v-model:useType="form.memberPriceShopType"></my-shop-select>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-32 container">
|
||||
<view class="font-bold color-333 u-m-b-16">规则说明</view>
|
||||
<up-textarea
|
||||
v-model="form.remark"
|
||||
placeholder="请输入规则说明"
|
||||
></up-textarea>
|
||||
<up-textarea v-model="form.remark" placeholder="请输入规则说明"></up-textarea>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-32 container">
|
||||
<view class="font-bold color-333">获取成长值升级</view>
|
||||
<view class="u-m-t-6 color-999 u-font-24"
|
||||
>*两个条件必选有一条是大于0的数值</view
|
||||
>
|
||||
<view class="u-m-t-6 color-999 u-font-24">*两个条件必选有一条是大于0的数值</view>
|
||||
<view class="u-flex u-m-t-26 gap-20">
|
||||
<text>每消费1元获得成长值</text>
|
||||
<up-number-box
|
||||
v-model="form.costReward"
|
||||
inputWidth="80"
|
||||
placeholder="请输入内容"
|
||||
></up-number-box>
|
||||
<up-number-box v-model="form.costReward" inputWidth="80" placeholder="请输入内容"></up-number-box>
|
||||
</view>
|
||||
<view class="u-flex u-m-t-26 gap-20">
|
||||
<text>每充值1元获得成长值</text>
|
||||
<up-number-box
|
||||
v-model="form.rechargeReward"
|
||||
inputWidth="80"
|
||||
placeholder="请输入内容"
|
||||
></up-number-box>
|
||||
<up-number-box v-model="form.rechargeReward" inputWidth="80" placeholder="请输入内容"></up-number-box>
|
||||
</view>
|
||||
</view>
|
||||
<my-bottom-btn-group @save="save" @cancel="cancel"></my-bottom-btn-group>
|
||||
@@ -125,87 +103,84 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, computed, onMounted, ref, inject, watch } from "vue";
|
||||
import userTypes from "./user-types.vue";
|
||||
import {
|
||||
onLoad,
|
||||
onReady,
|
||||
onShow,
|
||||
onPageScroll,
|
||||
onReachBottom,
|
||||
onBackPress,
|
||||
} from "@dcloudio/uni-app";
|
||||
import go from "@/commons/utils/go.js";
|
||||
import { reactive, computed, onMounted, ref, inject, watch } from 'vue';
|
||||
import userTypes from './user-types.vue';
|
||||
import { onLoad, onReady, onShow, onPageScroll, onReachBottom, onBackPress } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js';
|
||||
|
||||
const radioStyle = ref({
|
||||
marginLeft: '14px'
|
||||
});
|
||||
|
||||
const conditionLists = ref([
|
||||
{ label: "绑定手机号", checked: false, code: "BIND_PHONE" },
|
||||
{ label: '绑定手机号', checked: false, code: 'BIND_PHONE' },
|
||||
{
|
||||
label: "订单达成指定次数",
|
||||
label: '订单达成指定次数',
|
||||
checked: false,
|
||||
value: "",
|
||||
code: "ORDER",
|
||||
value: '',
|
||||
code: 'ORDER',
|
||||
step: 1,
|
||||
stepStrictly: true,
|
||||
min: 1,
|
||||
min: 1
|
||||
},
|
||||
{
|
||||
label: "消费达到指定金额",
|
||||
label: '消费达到指定金额',
|
||||
checked: false,
|
||||
value: "",
|
||||
code: "COST_AMOUNT",
|
||||
value: '',
|
||||
code: 'COST_AMOUNT',
|
||||
precision: 2,
|
||||
min: 0.01,
|
||||
min: 0.01
|
||||
},
|
||||
{
|
||||
label: "充值达到指定金额",
|
||||
label: '充值达到指定金额',
|
||||
checked: false,
|
||||
value: "",
|
||||
code: "RECHARGE_AMOUNT",
|
||||
value: '',
|
||||
code: 'RECHARGE_AMOUNT',
|
||||
precision: 2,
|
||||
min: 0.01,
|
||||
},
|
||||
min: 0.01
|
||||
}
|
||||
]);
|
||||
|
||||
const superVipStore = inject("superVipStore");
|
||||
const superVipStore = inject('superVipStore');
|
||||
|
||||
//分销奖励次数
|
||||
const isLimitCount = ref(0);
|
||||
const isLimitCounts = [
|
||||
{
|
||||
value: 0,
|
||||
label: "限制",
|
||||
label: '限制'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "不限制",
|
||||
},
|
||||
label: '不限制'
|
||||
}
|
||||
];
|
||||
//开通方式
|
||||
const opentypes = [
|
||||
{
|
||||
value: "auto",
|
||||
label: "自动开通",
|
||||
value: 'auto',
|
||||
label: '自动开通'
|
||||
},
|
||||
{
|
||||
value: "manual",
|
||||
label: "手动开通",
|
||||
value: 'manual',
|
||||
label: '手动开通'
|
||||
},
|
||||
{
|
||||
value: "pay",
|
||||
label: "付费开通",
|
||||
},
|
||||
value: 'pay',
|
||||
label: '付费开通'
|
||||
}
|
||||
];
|
||||
const form = reactive({
|
||||
isSubmitInfo: 1,
|
||||
openType: "PAY",
|
||||
openType: 'PAY',
|
||||
configList: [],
|
||||
memberPriceShopType: "ALL",
|
||||
remark: "",
|
||||
memberPriceShopType: 'ALL',
|
||||
remark: '',
|
||||
costReward: 0,
|
||||
rechargeReward: 0,
|
||||
memberPriceShopIdList: [],
|
||||
isMemberPrice: 1,
|
||||
isOpen: 0,
|
||||
isOpen: 0
|
||||
});
|
||||
watch(
|
||||
() => isLimitCount.value,
|
||||
@@ -213,7 +188,7 @@ watch(
|
||||
if (newval) {
|
||||
form.rewardCount = -1;
|
||||
} else {
|
||||
form.rewardCount = "";
|
||||
form.rewardCount = '';
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -226,14 +201,14 @@ async function save() {
|
||||
.filter((v) => v.checked)
|
||||
.map((v) => ({
|
||||
code: v.code,
|
||||
value: v.value,
|
||||
})),
|
||||
value: v.value
|
||||
}))
|
||||
};
|
||||
const res = await superVipStore.editConfig(submitData);
|
||||
uni.showToast({
|
||||
title: "更新成功",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
title: '更新成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
function cancel() {
|
||||
|
||||
@@ -3,53 +3,24 @@
|
||||
<up-sticky>
|
||||
<view class="bg-fff top">
|
||||
<view class="bg-fff container u-flex u-m-b-48">
|
||||
<image
|
||||
style="width: 60rpx; height: 60rpx"
|
||||
src="/pageMarket/static/images/member.png"
|
||||
></image>
|
||||
<image style="width: 60rpx; height: 60rpx" src="/pageMarket/static/images/member.png"></image>
|
||||
<view class="u-flex-1 u-flex u-p-l-24">
|
||||
<view class="u-font-28 u-flex-1 u-p-r-4">
|
||||
<view class="color-333 font-bold">超级会员</view>
|
||||
<view class="color-666 u-m-t-4 u-font-24">用户会员管理设置</view>
|
||||
</view>
|
||||
<up-switch
|
||||
v-model="superVipStore.config.isOpen"
|
||||
size="18"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
></up-switch>
|
||||
<up-switch v-model="superVipStore.config.isOpen" size="18" active-value="1" inactive-value="0" :disabled="isMainShop() ? false : true"></up-switch>
|
||||
</view>
|
||||
</view>
|
||||
<my-tabs v-model="active" :list="tabs" textKey="label"></my-tabs>
|
||||
<view
|
||||
v-if="active == 2"
|
||||
class="u-flex u-row-between u-m-t-32"
|
||||
style="gap: 58rpx"
|
||||
>
|
||||
<view v-if="active == 2" class="u-flex u-row-between u-m-t-32" style="gap: 58rpx">
|
||||
<view class="u-flex-1 filter-box" style="border-radius: 100rpx">
|
||||
<up-icon name="search" size="18"></up-icon>
|
||||
<input
|
||||
class="u-m-l-10 u-font-28"
|
||||
type="text"
|
||||
placeholder-class="color-999 u-font-28"
|
||||
placeholder="搜索关键词"
|
||||
v-model="keyWord"
|
||||
@blur="keyWordBlur"
|
||||
/>
|
||||
<up-icon
|
||||
v-if="keyWord"
|
||||
name="close"
|
||||
size="14"
|
||||
@click="clearKeyWord"
|
||||
></up-icon>
|
||||
<input class="u-m-l-10 u-font-28" type="text" placeholder-class="color-999 u-font-28" placeholder="搜索关键词" v-model="keyWord" @blur="keyWordBlur" />
|
||||
<up-icon v-if="keyWord" name="close" size="14" @click="clearKeyWord"></up-icon>
|
||||
</view>
|
||||
<view
|
||||
class="u-flex-1 u-font-28 filter-box u-flex u-row-between"
|
||||
@click="showTimeArea = true"
|
||||
>
|
||||
<template
|
||||
v-if="userComponentQuery.startTime && userComponentQuery.endTime"
|
||||
>
|
||||
<view class="u-flex-1 u-font-28 filter-box u-flex u-row-between" @click="showTimeArea = true">
|
||||
<template v-if="userComponentQuery.startTime && userComponentQuery.endTime">
|
||||
<text class="u-font-20">
|
||||
{{ userComponentQuery.startTime }} -
|
||||
{{ userComponentQuery.endTime }}
|
||||
@@ -67,140 +38,93 @@
|
||||
|
||||
<view v-if="active == 2" class="u-flex u-p-l-32 u-p-r-32 u-m-t-32">
|
||||
<view class="u-flex-1 u-text-center">
|
||||
<view class="u-font-32 color-main font-bold">{{
|
||||
listRes.totalRow
|
||||
}}</view>
|
||||
<view class="u-font-32 color-main font-bold">{{ listRes.totalRow }}</view>
|
||||
<view class="u-font-24 color-666 u-m-t-16">订单数</view>
|
||||
</view>
|
||||
<view class="u-flex-1 u-text-center">
|
||||
<view class="u-font-32 color-main font-bold">{{
|
||||
listRes.totalAmount
|
||||
}}</view>
|
||||
<view class="u-font-32 color-main font-bold">{{ listRes.totalAmount }}</view>
|
||||
<view class="u-font-24 color-666 u-m-t-16">订单金额(元)</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="active == 3" class="u-flex u-m-t-32">
|
||||
<view class="u-flex-1 u-text-center">
|
||||
<view class="u-font-32 color-main font-bold">{{
|
||||
listRes.successAmount
|
||||
}}</view>
|
||||
<view class="u-font-32 color-main font-bold">{{ listRes.successAmount }}</view>
|
||||
<view class="u-font-24 color-666 u-m-t-16">已入账金额(元)</view>
|
||||
</view>
|
||||
<view class="u-flex-1 u-text-center">
|
||||
<view class="u-font-32 color-main font-bold">{{
|
||||
listRes.pendingAmount || 0
|
||||
}}</view>
|
||||
<view class="u-font-32 color-main font-bold">{{ listRes.pendingAmount || 0 }}</view>
|
||||
<view class="u-font-24 color-666 u-m-t-16">待入账金额(元)</view>
|
||||
</view>
|
||||
<view class="u-flex-1 u-text-center">
|
||||
<view class="u-font-32 color-main font-bold">{{
|
||||
listRes.balanceAmount
|
||||
}}</view>
|
||||
<view class="u-font-32 color-main font-bold">{{ listRes.balanceAmount }}</view>
|
||||
<view class="u-font-24 color-666 u-m-t-16">
|
||||
<text>运营余额(元)</text>
|
||||
<text class="color-main" @click="go.to('PAGES_PAY')"
|
||||
>充值{{ ">" }}</text
|
||||
>
|
||||
<text class="color-main" @click="go.to('PAGES_PAY')">充值{{ '>' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-sticky>
|
||||
<configVue v-if="active == 0"></configVue>
|
||||
<vipLvList
|
||||
v-if="active == 1"
|
||||
:list="list"
|
||||
:isEnd="isEnd"
|
||||
@refresh="refresh"
|
||||
></vipLvList>
|
||||
<vipLvList v-if="active == 1" :list="list" :isEnd="isEnd" @refresh="refresh"></vipLvList>
|
||||
|
||||
<openListVue
|
||||
v-if="active == 2"
|
||||
:list="list"
|
||||
:isEnd="isEnd"
|
||||
@refresh="refresh"
|
||||
></openListVue>
|
||||
<fenxiaoMingxiVue
|
||||
v-if="active == 3"
|
||||
:list="list"
|
||||
:isEnd="isEnd"
|
||||
@refresh="refresh"
|
||||
></fenxiaoMingxiVue>
|
||||
<openListVue v-if="active == 2" :list="list" :isEnd="isEnd" @refresh="refresh"></openListVue>
|
||||
<fenxiaoMingxiVue v-if="active == 3" :list="list" :isEnd="isEnd" @refresh="refresh"></fenxiaoMingxiVue>
|
||||
<!-- 选择门店 -->
|
||||
<shopSelActionSheetVue
|
||||
@choose="chooseShop"
|
||||
v-model="showShopSelActionSheet"
|
||||
title="选择门店"
|
||||
>
|
||||
</shopSelActionSheetVue>
|
||||
<shopSelActionSheetVue @choose="chooseShop" v-model="showShopSelActionSheet" title="选择门店"></shopSelActionSheetVue>
|
||||
|
||||
<dateAreaSel
|
||||
:show="showTimeArea"
|
||||
:minYear="2022"
|
||||
@close="showTimeArea = false"
|
||||
@confirm="confirmTimeArea"
|
||||
></dateAreaSel>
|
||||
<dateAreaSel :show="showTimeArea" :minYear="2022" @close="showTimeArea = false" @confirm="confirmTimeArea"></dateAreaSel>
|
||||
|
||||
<!-- 分销明细状态 -->
|
||||
<up-action-sheet
|
||||
:show="showActions"
|
||||
:actions="actions"
|
||||
@select="handleSelect"
|
||||
@close="showActions = false"
|
||||
cancel-text="取消"
|
||||
></up-action-sheet>
|
||||
<up-action-sheet :show="showActions" :actions="actions" @select="handleSelect" @close="showActions = false" cancel-text="取消"></up-action-sheet>
|
||||
|
||||
<my-marketing-mask name="超级会员" v-if="isMarketShow(configInfo, 'memberPriceShopIdList', 'isOpen')"></my-marketing-mask>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
onLoad,
|
||||
onReady,
|
||||
onShow,
|
||||
onPageScroll,
|
||||
onReachBottom,
|
||||
onBackPress,
|
||||
} from "@dcloudio/uni-app";
|
||||
import go from "@/commons/utils/go.js";
|
||||
import { ref, onMounted, watch, provide } from "vue";
|
||||
import * as consumeCashbackApi from "@/http/api/market/consumeCashback.js";
|
||||
import * as memberApi from "@/http/api/market/member.js";
|
||||
import configVue from "./components/config.vue";
|
||||
import shopSelActionSheetVue from "@/pageMarket/components/shop-sel-action-sheet.vue";
|
||||
import dateAreaSel from "@/components/date-range-picker/date-range-picker.vue";
|
||||
import vipLvList from "./components/vip-lv-list.vue";
|
||||
import openListVue from "./components/open-list.vue";
|
||||
import fenxiaoMingxiVue from "./components/fenxiao-mingxi.vue";
|
||||
import { onLoad, onReady, onShow, onPageScroll, onReachBottom, onBackPress } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { ref, onMounted, watch, provide } from 'vue';
|
||||
import * as consumeCashbackApi from '@/http/api/market/consumeCashback.js';
|
||||
import * as memberApi from '@/http/api/market/member.js';
|
||||
import configVue from './components/config.vue';
|
||||
import shopSelActionSheetVue from '@/pageMarket/components/shop-sel-action-sheet.vue';
|
||||
import dateAreaSel from '@/components/date-range-picker/date-range-picker.vue';
|
||||
import vipLvList from './components/vip-lv-list.vue';
|
||||
import openListVue from './components/open-list.vue';
|
||||
import fenxiaoMingxiVue from './components/fenxiao-mingxi.vue';
|
||||
import { isMainShop, isMarketShow } from '@/store/account';
|
||||
|
||||
import { useSuperVipStore } from "@/store/market.js";
|
||||
import { reactive } from "vue";
|
||||
import { useSuperVipStore } from '@/store/market.js';
|
||||
import { reactive } from 'vue';
|
||||
|
||||
const actions = [
|
||||
{
|
||||
name: "全部",
|
||||
value: "",
|
||||
name: '全部',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
name: "已入账",
|
||||
value: "success",
|
||||
name: '已入账',
|
||||
value: 'success'
|
||||
},
|
||||
{
|
||||
name: "待入账",
|
||||
value: "pending",
|
||||
name: '待入账',
|
||||
value: 'pending'
|
||||
},
|
||||
{
|
||||
name: "已退款",
|
||||
value: "refund",
|
||||
},
|
||||
name: '已退款',
|
||||
value: 'refund'
|
||||
}
|
||||
];
|
||||
function clearKeyWord() {
|
||||
keyWord.value = "";
|
||||
userComponentQuery.user = "";
|
||||
keyWord.value = '';
|
||||
userComponentQuery.user = '';
|
||||
}
|
||||
function clearTime() {
|
||||
userComponentQuery.startTime = "";
|
||||
userComponentQuery.endTime = "";
|
||||
userComponentQuery.startTime = '';
|
||||
userComponentQuery.endTime = '';
|
||||
}
|
||||
const selActions = ref("");
|
||||
const selActions = ref('');
|
||||
const showActions = ref(false);
|
||||
function handleSelect(e) {
|
||||
selActions.value = e;
|
||||
@@ -208,8 +132,8 @@ function handleSelect(e) {
|
||||
|
||||
const superVipStore = useSuperVipStore();
|
||||
superVipStore.getConfig();
|
||||
provide("superVipStore", superVipStore);
|
||||
provide("memberApi", memberApi);
|
||||
provide('superVipStore', superVipStore);
|
||||
provide('memberApi', memberApi);
|
||||
const showTimeArea = ref(false);
|
||||
function confirmTimeArea(e) {
|
||||
console.log(e);
|
||||
@@ -218,41 +142,41 @@ function confirmTimeArea(e) {
|
||||
}
|
||||
const tabs = [
|
||||
{
|
||||
label: "会员基础设置",
|
||||
value: "basic",
|
||||
label: '会员基础设置',
|
||||
value: 'basic'
|
||||
},
|
||||
{
|
||||
label: "会员等级设置",
|
||||
value: "user",
|
||||
label: '会员等级设置',
|
||||
value: 'user'
|
||||
},
|
||||
{
|
||||
label: "购买会员订单",
|
||||
value: "recoders",
|
||||
},
|
||||
label: '购买会员订单',
|
||||
value: 'recoders'
|
||||
}
|
||||
];
|
||||
|
||||
const keyWord = ref("");
|
||||
const keyWord = ref('');
|
||||
function keyWordBlur() {
|
||||
userComponentQuery.user = keyWord.value;
|
||||
}
|
||||
const userComponentQuery = reactive({
|
||||
user: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
user: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
});
|
||||
|
||||
const form = ref({
|
||||
isOpen: 0,
|
||||
isOpen: 0
|
||||
});
|
||||
|
||||
const list = ref([]);
|
||||
const pageNum = ref(1);
|
||||
const isEnd = ref(false);
|
||||
const selShop = ref({
|
||||
shopId: "",
|
||||
shopName: "",
|
||||
shopId: '',
|
||||
shopName: ''
|
||||
});
|
||||
const searchText = ref("");
|
||||
const searchText = ref('');
|
||||
|
||||
function search() {
|
||||
pageNum.value = 1;
|
||||
@@ -280,7 +204,7 @@ watch(
|
||||
getList();
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
|
||||
@@ -309,12 +233,8 @@ async function getList() {
|
||||
page: pageNum.value,
|
||||
size: 10,
|
||||
key: userComponentQuery.user,
|
||||
startTime: userComponentQuery.startTime
|
||||
? userComponentQuery.startTime + " 00:00:00"
|
||||
: "",
|
||||
endTime: userComponentQuery.endTime
|
||||
? userComponentQuery.endTime + " 23:59:59"
|
||||
: "",
|
||||
startTime: userComponentQuery.startTime ? userComponentQuery.startTime + ' 00:00:00' : '',
|
||||
endTime: userComponentQuery.endTime ? userComponentQuery.endTime + ' 23:59:59' : ''
|
||||
});
|
||||
}
|
||||
|
||||
@@ -341,9 +261,9 @@ const active = ref(0);
|
||||
watch(
|
||||
() => active.value,
|
||||
(newval) => {
|
||||
userComponentQuery.startTime = "";
|
||||
userComponentQuery.endTime = "";
|
||||
keyWord.value = "";
|
||||
userComponentQuery.startTime = '';
|
||||
userComponentQuery.endTime = '';
|
||||
keyWord.value = '';
|
||||
refresh();
|
||||
}
|
||||
);
|
||||
@@ -365,9 +285,9 @@ watch(
|
||||
superVipStore.editConfig().then((res) => {
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: "更新成功",
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
title: '更新成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -377,6 +297,11 @@ onShow(() => {
|
||||
pageNum.value = 1;
|
||||
getList();
|
||||
});
|
||||
|
||||
const configInfo = ref({});
|
||||
onLoad(async () => {
|
||||
configInfo.value = await memberApi.getConfig();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.min-page {
|
||||
|
||||
@@ -16,25 +16,51 @@ export const isMainShop = (shopId) => {
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断值是否为 非null + 非空对象(纯对象)
|
||||
* @param {any} obj 要检测的值
|
||||
* @returns {boolean} true=非空对象,false=否则
|
||||
*/
|
||||
function isNonEmptyObject(obj) {
|
||||
// 第一步:排除 null/undefined
|
||||
if (obj === null || obj === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 第二步:排除非纯对象(数组、函数、日期等)
|
||||
if (Object.prototype.toString.call(obj) !== '[object Object]') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 第三步:判断是否为空对象(无自有可枚举属性)
|
||||
for (const key in obj) {
|
||||
// 只检测自有属性(排除原型链属性)
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主店在配置该功能时未选择分店
|
||||
* 判断分店是否显示活动信息
|
||||
* @param {Object} activit
|
||||
* 活动信息
|
||||
*/
|
||||
export function isMarketShow(activit = null, key = 'shopIdList') {
|
||||
console.log('isMarketShow===', activit);
|
||||
if (activit == null || !activit.id) return false
|
||||
export function isMarketShow(activit = null, key = 'shopIdList', isEnableKey = 'isEnable') {
|
||||
console.log('isMarketShow.activit===', activit);
|
||||
if (!isNonEmptyObject(activit)) return false
|
||||
|
||||
let flag = false
|
||||
const shopInfo = uni.getStorageSync("shopInfo");
|
||||
|
||||
if (!shopInfo.isHeadShop && (!activit[key].some(item => item == shopInfo.id) || !activit.isEnable)) {
|
||||
if (!shopInfo.isHeadShop && (!activit[key].some(item => item == shopInfo.id) || !activit[isEnableKey])) {
|
||||
flag = true
|
||||
} else {
|
||||
flag = false
|
||||
}
|
||||
console.log('isMarketShow===', flag);
|
||||
console.log('isMarketShow.flag===', flag);
|
||||
return flag
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user