diff --git a/commons/style/vars.scss b/commons/style/vars.scss
index 65ad362..48ea55d 100644
--- a/commons/style/vars.scss
+++ b/commons/style/vars.scss
@@ -40,7 +40,7 @@ $v-b-color-ed: #ededed;
//common.scss 分包页面以及组件里所用的颜色
$my-main-color:#318AFE;
-$my-red-color:#F02C45;
+$my-red-color:#FE4F1E;
//my-components
$u-main-color: #303133;
diff --git a/components/my-components/my-bottom-btn-group.vue b/components/my-components/my-bottom-btn-group.vue
index 56f6c02..489fcf1 100644
--- a/components/my-components/my-bottom-btn-group.vue
+++ b/components/my-components/my-bottom-btn-group.vue
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/components/my-components/my-footer-btn.vue b/components/my-components/my-footer-btn.vue
index 8fe2d65..353063f 100644
--- a/components/my-components/my-footer-btn.vue
+++ b/components/my-components/my-footer-btn.vue
@@ -1,56 +1,78 @@
-
-
-
- {{ confirmText }}
-
-
- 取消
-
-
-
+
+
+
+ {{ confirmText }}
+
+
+ 取消
+
+
+
diff --git a/components/my-components/my-up-upload.vue b/components/my-components/my-up-upload.vue
index ac091a2..e82600d 100644
--- a/components/my-components/my-up-upload.vue
+++ b/components/my-components/my-up-upload.vue
@@ -1,113 +1,125 @@
-
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/components/my-components/my-upload-img.vue b/components/my-components/my-upload-img.vue
new file mode 100644
index 0000000..50c5b46
--- /dev/null
+++ b/components/my-components/my-upload-img.vue
@@ -0,0 +1,89 @@
+
+
+
+ +
+
+
+ {}" v-if="modelValue">
+
+
+
+
+
+
+
+
diff --git a/http/api/market/member.js b/http/api/market/member.js
new file mode 100644
index 0000000..6850b49
--- /dev/null
+++ b/http/api/market/member.js
@@ -0,0 +1,67 @@
+import http from '@/http/http.js'
+const request = http.request
+const urlType='market'
+
+export function getConfig(data) {
+ return request({
+ url: `${urlType}/admin/member`,
+ method: "GET",
+ data: {
+ ...data
+ }
+ })
+}
+
+
+export function editConfig(data) {
+ return request({
+ url: `${urlType}/admin/member`,
+ method: "POST",
+ data: {
+ ...data
+ }
+ })
+}
+
+export function levelList(data) {
+ return request({
+ url: `${urlType}/admin/member/level/list`,
+ method: "GET",
+ data: {
+ ...data
+ }
+ })
+}
+export function orderList(data) {
+ return request({
+ url: `${urlType}/admin/member/order`,
+ method: "GET",
+ data: {
+ ...data
+ }
+ })
+}
+export function levelAdd(data) {
+ return request({
+ url: `${urlType}/admin/member/level`,
+ method: "POST",
+ data: {
+ ...data
+ }
+ })
+}
+export function levelEdit(data) {
+ return request({
+ url: `${urlType}/admin/member/level`,
+ method: "PUT",
+ data: {
+ ...data
+ }
+ })
+}
+export function levelDel(id) {
+ return request({
+ url: `${urlType}/admin/member/level/${id}`,
+ method: "DELETE",
+ })
+}
diff --git a/pageBwc/index/index.vue b/pageBwc/index/index.vue
index ae13880..d61f3f4 100644
--- a/pageBwc/index/index.vue
+++ b/pageBwc/index/index.vue
@@ -10,6 +10,7 @@
@@ -83,7 +84,7 @@
-
+
@@ -92,7 +93,7 @@
diff --git a/pageMarket/superVip/components/config.vue b/pageMarket/superVip/components/config.vue
new file mode 100644
index 0000000..9f785d4
--- /dev/null
+++ b/pageMarket/superVip/components/config.vue
@@ -0,0 +1,336 @@
+
+
+
+
+
+ 提交生日/姓名
+
+
+
+ 是
+
+
+
+
+ 否
+
+
+
+
+ *成为会员前需提交生日、姓名、性别信息
+
+
+
+
+
+
+ 会员开通方式
+
+
+
+ 购买开通
+
+
+
+
+ 条件开通
+
+
+
+
+
+
+
+
+
+ 会员周期列表
+
+ 去设置
+
+
+
+
+
+
+ 成为会员条件
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 可用门店
+
+
+
+
+ 规则说明
+
+
+
+
+ 获取成长值升级
+ *两个条件必选有一条是大于0的数值
+
+ 每消费1元获得成长值
+
+
+
+ 每充值1元获得成长值
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/superVip/components/coupon-list.vue b/pageMarket/superVip/components/coupon-list.vue
new file mode 100644
index 0000000..076c3c1
--- /dev/null
+++ b/pageMarket/superVip/components/coupon-list.vue
@@ -0,0 +1,110 @@
+
+
+
+
+
+ {{ item.coupon.title }}
+
+
+
+
+
+
+ 选择赠送券
+
+
+
+
+
+
+ 数量
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/superVip/components/fenxiao-mingxi.vue b/pageMarket/superVip/components/fenxiao-mingxi.vue
new file mode 100644
index 0000000..8756e6e
--- /dev/null
+++ b/pageMarket/superVip/components/fenxiao-mingxi.vue
@@ -0,0 +1,197 @@
+
+
+
+
+
+ 关联订单:
+ {{ item.orderNo }}
+
+
+ {{ returnStatus(item.status) }}
+
+
+
+
+ 分销员
+
+ {{ item.nickName }}
+
+ {{ item.phone }}
+
+
+ 下级用户
+
+ {{ item.sourceNickName }}
+
+ {{ item.sourcePhone }}
+
+
+ 创建时间
+
+ {{ item.sourceNickName }}
+
+ {{ item.createTime }}
+
+
+
+ {{ item.rewardAmount }}
+ {{
+ item.level == 1 ? "直接分成" : "间接分成"
+ }}
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/superVip/components/open-list.vue b/pageMarket/superVip/components/open-list.vue
new file mode 100644
index 0000000..0f302f1
--- /dev/null
+++ b/pageMarket/superVip/components/open-list.vue
@@ -0,0 +1,258 @@
+
+
+
+
+
+ 订单号:
+ {{ item.orderNo }}
+
+
+
+
+
+ {{ item.nickName }}
+ {{ item.phone }}
+
+
+ {{ item.createTime }}
+
+
+
+
+ {{ item.amount }}
+
+
+ {{ item.circleTime }}个{{ item.circleUnit }}
+
+
+
+
+
+
+
+
+
+
+
+ 分销组
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+ 是否确认重置分销组 重置后将会按照用户的实际数据匹配分销组
+
+
+
+ 是否确认取消分销员
+
+
+
+
+
+
diff --git a/pageMarket/superVip/components/user-types.vue b/pageMarket/superVip/components/user-types.vue
new file mode 100644
index 0000000..d8988cf
--- /dev/null
+++ b/pageMarket/superVip/components/user-types.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+ {{ item.label }}
+
+
+ {{ item.desc }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageMarket/superVip/components/vip-lv-list.vue b/pageMarket/superVip/components/vip-lv-list.vue
new file mode 100644
index 0000000..5be60e4
--- /dev/null
+++ b/pageMarket/superVip/components/vip-lv-list.vue
@@ -0,0 +1,172 @@
+
+
+
+
+ {{ item.name }}
+
+
+
+ 所需成长值:
+ {{ item.experienceValue || 0 }}
+
+
+ 会员折扣:
+ {{ item.discount || 100 }}%
+
+
+
+
+ 删除
+ 编辑
+
+
+
+
+
+
+
+
+
+ + 添加会员等级
+
+
+
+
+
+
+
diff --git a/pageMarket/superVip/index.vue b/pageMarket/superVip/index.vue
new file mode 100644
index 0000000..cd10f41
--- /dev/null
+++ b/pageMarket/superVip/index.vue
@@ -0,0 +1,447 @@
+
+
+
+
+
+
+
+
+ 超级会员
+ 用户会员管理设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userComponentQuery.startTime }} -
+ {{ userComponentQuery.endTime }}
+
+
+
+
+
+
+ 请选择日期范围
+
+
+
+
+
+
+
+ {{
+ listRes.totalRow
+ }}
+ 订单数
+
+
+ {{
+ listRes.totalAmount
+ }}
+ 订单金额(元)
+
+
+
+
+ {{
+ listRes.successAmount
+ }}
+ 已入账金额(元)
+
+
+ {{
+ listRes.pendingAmount || 0
+ }}
+ 待入账金额(元)
+
+
+ {{
+ listRes.balanceAmount
+ }}
+
+ 运营余额(元)
+ 充值{{ ">" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/superVip/level-list.vue b/pageMarket/superVip/level-list.vue
new file mode 100644
index 0000000..07e0768
--- /dev/null
+++ b/pageMarket/superVip/level-list.vue
@@ -0,0 +1,366 @@
+
+
+
+ 升级条件
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+ {{index+1}}级:{{ item.name }}
+
+ 展开
+
+
+
+
+
+
+
+ 名称
+
+
+
+
+ 分成比例
+
+
+
+ %
+
+
+
+
+
+ 有效人数
+
+
+
+ 人
+
+
+
+ 有效人数:被邀请人在店铺消费过,即有一笔订单完成
+
+
+
+ 消费金额达
+
+
+
+ 元
+
+
+ 消费金额:分销员和被邀请人在店铺订单消费总金额(不包含退款)
+
+
+
+
+
+
+
+
+ {{index==0? '添加':'继续添加'}}
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/superVip/vip-lv-add.vue b/pageMarket/superVip/vip-lv-add.vue
new file mode 100644
index 0000000..726ea0e
--- /dev/null
+++ b/pageMarket/superVip/vip-lv-add.vue
@@ -0,0 +1,363 @@
+
+
+
+
+ 会员标题
+
+
+
+ 会员折扣(%)
+
+
+
+ 所需会员值
+
+
+
+
+
+ 等级标识
+
+
+
+
+
+
+
+ 消费送积分
+ 每消费X元赠送1积分
+
+
+
+
+
+
+ 元
+
+
+
+
+
+ 等级说明
+
+
+
+
+
+ 自动发放
+
+
+
+
+ 周期时间
+
+
+
+
+
+
+
+
+ 赠送积分
+
+
+ 赠送优惠券
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/superVip/vip-plans.vue b/pageMarket/superVip/vip-plans.vue
new file mode 100644
index 0000000..32fdcc8
--- /dev/null
+++ b/pageMarket/superVip/vip-plans.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ 价格:
+ {{item.price}}元
+
+
+ 周期:
+ {{item.circleTime}}个{{ item.circleUnit }}
+
+
+
+
+ 赠送成长值:
+ {{item.reward}}
+
+
+ 赠送优惠券:
+ {{returnCouponAllNum(item)}}张
+
+
+
+
+ 删除
+ 编辑
+
+
+
+
+
+
+
+
+ 添加方案
+
+
+
+
+
+
+
+
+
diff --git a/pageRecharge/components/recharge-item.vue b/pageRecharge/components/recharge-item.vue
index 6809d65..bf7fcf1 100644
--- a/pageRecharge/components/recharge-item.vue
+++ b/pageRecharge/components/recharge-item.vue
@@ -14,7 +14,7 @@
充值赠送
{{props.data.desc}}
-
+
删除
@@ -40,6 +40,10 @@
default: () => {
return {}
}
+ },
+ isCanEdit:{
+ type:Boolean,
+ default:false
}
})
const emits=defineEmits(['del'])
diff --git a/pageRecharge/index.vue b/pageRecharge/index.vue
index 7bdd61b..6cf5489 100644
--- a/pageRecharge/index.vue
+++ b/pageRecharge/index.vue
@@ -17,7 +17,7 @@
-
+
@@ -67,7 +67,7 @@
-->
-
+
保存
@@ -161,6 +161,14 @@ import $util from '@/commons/utils/getDateArea.js';
import go from '@/commons/utils/go.js';
import { shopRechargePost, shopRechargeGet } from '@/http/api/market/index.js';
import { onLoad } from '@dcloudio/uni-app';
+import { isMainShop } from "@/store/account.js";
+
+const isCanEdit=computed(()=>{
+ return isMainShop()
+})
+
+
+
const model = ref(null);
const modelData = reactive({
diff --git a/pages.json b/pages.json
index 17b838e..084b837 100644
--- a/pages.json
+++ b/pages.json
@@ -785,6 +785,34 @@
"style": {
"navigationBarTitleText": "充值兑换码详情"
}
+ },
+ {
+ "pageId": "PAGES_MARKET_SUPER_VIP",
+ "path": "superVip/index",
+ "style": {
+ "navigationBarTitleText": "超级会员"
+ }
+ },
+ {
+ "pageId": "PAGES_MARKET_SUPER_VIP_ADD_PLAN",
+ "path": "superVip/add-plans",
+ "style": {
+ "navigationBarTitleText": "添加方案"
+ }
+ },
+ {
+ "pageId": "PAGES_MARKET_SUPER_VIP_VIP_PLANS",
+ "path": "superVip/vip-plans",
+ "style": {
+ "navigationBarTitleText": "会员周期列表"
+ }
+ },
+ {
+ "pageId": "PAGES_MARKET_SUPER_VIP_LV_ADD",
+ "path": "superVip/vip-lv-add",
+ "style": {
+ // "navigationBarTitleText": "添加会员等级"
+ }
}
diff --git a/pages/appliccation/marketing.vue b/pages/appliccation/marketing.vue
index ea60459..403593d 100644
--- a/pages/appliccation/marketing.vue
+++ b/pages/appliccation/marketing.vue
@@ -52,7 +52,7 @@ const menuList = ref([
{
title: '超级会员',
icon: '',
- pageUrl: 'PAGES_ORDER_INDEX',
+ pageUrl: 'PAGES_MARKET_SUPER_VIP',
intro: '用户会员管理设置'
},
{
diff --git a/pages/permission/permission.vue b/pages/permission/permission.vue
index b2568ef..d83b0eb 100644
--- a/pages/permission/permission.vue
+++ b/pages/permission/permission.vue
@@ -241,7 +241,7 @@
}
.u-tab-view {
- width: 200rpx;
+ width: 240rpx;
height: 100%;
}
diff --git a/pages/shopSetUp/decoration.vue b/pages/shopSetUp/decoration.vue
index 7cde85d..5152a05 100644
--- a/pages/shopSetUp/decoration.vue
+++ b/pages/shopSetUp/decoration.vue
@@ -1,566 +1,582 @@
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
- 当前背景图片:
- 更换
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+ 当前背景图片:
+ 更换
+
+
+
+
+
+
-
-
- 当前背景效果:
-
-
-
-
-
-
-
-
-
-
+
+
+ 当前背景效果:
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+.bg-2 {
+ background-position: center;
+ background-size: cover;
+ border-radius: 24rpx;
+ overflow: hidden;
+}
+.bg-3 {
+ background-repeat: no-repeat;
+ background-position: top;
+ background-size: 100% auto;
+}
+.bg-4 {
+ background-repeat: no-repeat;
+ background-position: top;
+ background-size: 100% auto;
+ position: relative;
+ .logo {
+ position: absolute;
+ left: 30rpx;
+ width: 90px;
+ height: 30px;
+ top: 30rpx;
+ }
+}
+
diff --git a/static/applocation/birthdayGift.png b/static/applocation/birthdayGift.png
deleted file mode 100644
index 6abda3e..0000000
Binary files a/static/applocation/birthdayGift.png and /dev/null differ
diff --git a/static/applocation/bwc.png b/static/applocation/bwc.png
deleted file mode 100644
index 35ce698..0000000
Binary files a/static/applocation/bwc.png and /dev/null differ
diff --git a/static/applocation/cjhy.png b/static/applocation/cjhy.png
deleted file mode 100644
index 3cd0466..0000000
Binary files a/static/applocation/cjhy.png and /dev/null differ
diff --git a/static/applocation/czdhm.png b/static/applocation/czdhm.png
deleted file mode 100644
index e9b2aea..0000000
Binary files a/static/applocation/czdhm.png and /dev/null differ
diff --git a/static/applocation/czhd.png b/static/applocation/czhd.png
deleted file mode 100644
index 94f7b7a..0000000
Binary files a/static/applocation/czhd.png and /dev/null differ
diff --git a/static/applocation/czqb.png b/static/applocation/czqb.png
deleted file mode 100644
index 8b34a14..0000000
Binary files a/static/applocation/czqb.png and /dev/null differ
diff --git a/static/applocation/dczntj.png b/static/applocation/dczntj.png
deleted file mode 100644
index 5b9c481..0000000
Binary files a/static/applocation/dczntj.png and /dev/null differ
diff --git a/static/applocation/dejbjq.png b/static/applocation/dejbjq.png
deleted file mode 100644
index ff93966..0000000
Binary files a/static/applocation/dejbjq.png and /dev/null differ
diff --git a/static/applocation/dxts.png b/static/applocation/dxts.png
deleted file mode 100644
index fcdb6ee..0000000
Binary files a/static/applocation/dxts.png and /dev/null differ
diff --git a/static/applocation/fx.png b/static/applocation/fx.png
deleted file mode 100644
index d17e46e..0000000
Binary files a/static/applocation/fx.png and /dev/null differ
diff --git a/static/applocation/gdjkq.png b/static/applocation/gdjkq.png
deleted file mode 100644
index 43124cd..0000000
Binary files a/static/applocation/gdjkq.png and /dev/null differ
diff --git a/static/applocation/jfsk.png b/static/applocation/jfsk.png
deleted file mode 100644
index 907a76c..0000000
Binary files a/static/applocation/jfsk.png and /dev/null differ
diff --git a/static/applocation/kctg.png b/static/applocation/kctg.png
deleted file mode 100644
index 37dd2fc..0000000
Binary files a/static/applocation/kctg.png and /dev/null differ
diff --git a/static/applocation/mfpsq.png b/static/applocation/mfpsq.png
deleted file mode 100644
index 41b66da..0000000
Binary files a/static/applocation/mfpsq.png and /dev/null differ
diff --git a/static/applocation/mjhd.png b/static/applocation/mjhd.png
deleted file mode 100644
index 863420b..0000000
Binary files a/static/applocation/mjhd.png and /dev/null differ
diff --git a/static/applocation/mjq.png b/static/applocation/mjq.png
deleted file mode 100644
index ad38ce5..0000000
Binary files a/static/applocation/mjq.png and /dev/null differ
diff --git a/static/applocation/mysyq.png b/static/applocation/mysyq.png
deleted file mode 100644
index d649fa8..0000000
Binary files a/static/applocation/mysyq.png and /dev/null differ
diff --git a/static/applocation/myzy.png b/static/applocation/myzy.png
deleted file mode 100644
index d649fa8..0000000
Binary files a/static/applocation/myzy.png and /dev/null differ
diff --git a/static/applocation/new_user_discount.png b/static/applocation/new_user_discount.png
deleted file mode 100644
index 2f0fe73..0000000
Binary files a/static/applocation/new_user_discount.png and /dev/null differ
diff --git a/static/applocation/qdhm.png b/static/applocation/qdhm.png
deleted file mode 100644
index af33e49..0000000
Binary files a/static/applocation/qdhm.png and /dev/null differ
diff --git a/static/applocation/spdhq.png b/static/applocation/spdhq.png
deleted file mode 100644
index 281468f..0000000
Binary files a/static/applocation/spdhq.png and /dev/null differ
diff --git a/static/applocation/sppt.png b/static/applocation/sppt.png
deleted file mode 100644
index 2f822a9..0000000
Binary files a/static/applocation/sppt.png and /dev/null differ
diff --git a/static/applocation/sryl.png b/static/applocation/sryl.png
deleted file mode 100644
index 68e10fc..0000000
Binary files a/static/applocation/sryl.png and /dev/null differ
diff --git a/static/applocation/super_vip.png b/static/applocation/super_vip.png
deleted file mode 100644
index 2c37321..0000000
Binary files a/static/applocation/super_vip.png and /dev/null differ
diff --git a/static/applocation/syyl.png b/static/applocation/syyl.png
deleted file mode 100644
index 9d53557..0000000
Binary files a/static/applocation/syyl.png and /dev/null differ
diff --git a/static/applocation/tcgg.png b/static/applocation/tcgg.png
deleted file mode 100644
index 80e665f..0000000
Binary files a/static/applocation/tcgg.png and /dev/null differ
diff --git a/static/applocation/tctg.png b/static/applocation/tctg.png
deleted file mode 100644
index 37dd2fc..0000000
Binary files a/static/applocation/tctg.png and /dev/null differ
diff --git a/static/applocation/tshdxx.png b/static/applocation/tshdxx.png
deleted file mode 100644
index 0c89aa5..0000000
Binary files a/static/applocation/tshdxx.png and /dev/null differ
diff --git a/static/applocation/wxgzh.png b/static/applocation/wxgzh.png
deleted file mode 100644
index f376ddc..0000000
Binary files a/static/applocation/wxgzh.png and /dev/null differ
diff --git a/static/applocation/xffx.png b/static/applocation/xffx.png
deleted file mode 100644
index de19d00..0000000
Binary files a/static/applocation/xffx.png and /dev/null differ
diff --git a/static/applocation/xfzq.png b/static/applocation/xfzq.png
deleted file mode 100644
index ad0744c..0000000
Binary files a/static/applocation/xfzq.png and /dev/null differ
diff --git a/static/applocation/xklj.png b/static/applocation/xklj.png
deleted file mode 100644
index d4ea83c..0000000
Binary files a/static/applocation/xklj.png and /dev/null differ
diff --git a/static/applocation/xszk.png b/static/applocation/xszk.png
deleted file mode 100644
index 37e7e58..0000000
Binary files a/static/applocation/xszk.png and /dev/null differ
diff --git a/static/applocation/yqlb.png b/static/applocation/yqlb.png
deleted file mode 100644
index 839c295..0000000
Binary files a/static/applocation/yqlb.png and /dev/null differ
diff --git a/static/applocation/zhcz.png b/static/applocation/zhcz.png
deleted file mode 100644
index 2388acc..0000000
Binary files a/static/applocation/zhcz.png and /dev/null differ
diff --git a/static/applocation/zkq.png b/static/applocation/zkq.png
deleted file mode 100644
index 646779b..0000000
Binary files a/static/applocation/zkq.png and /dev/null differ
diff --git a/static/bgImg/quik-bg-img.svg b/static/bgImg/quik-bg-img.svg
deleted file mode 100644
index ad992ab..0000000
--- a/static/bgImg/quik-bg-img.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
diff --git a/static/coupon/icon_coupon.svg b/static/coupon/icon_coupon.svg
deleted file mode 100644
index b075493..0000000
--- a/static/coupon/icon_coupon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/static/member_bg.png b/static/member_bg.png
deleted file mode 100644
index 46068f9..0000000
Binary files a/static/member_bg.png and /dev/null differ
diff --git a/static/uni.png b/static/uni.png
deleted file mode 100644
index 8e3a80f..0000000
Binary files a/static/uni.png and /dev/null differ
diff --git a/store/account.js b/store/account.js
index cce171a..c3bf537 100644
--- a/store/account.js
+++ b/store/account.js
@@ -2,6 +2,18 @@
import { defineStore } from "pinia";
import * as shopApi from "@/http/api/shop.js";
+//判断是否是主店
+export const isMainShop = (shopId) => {
+ const shopInfo=uni.getStorageSync("shopInfo");
+ if(shopInfo.isHeadShop){
+ return true
+ }
+ if(shopInfo.shopType=='only'){
+ return true
+ }
+ return false
+}
+
// 分销
export const useAccountInfoStore = defineStore("accountInfo", {
state: () => {
diff --git a/store/chat.js b/store/chat.js
new file mode 100644
index 0000000..57a55b7
--- /dev/null
+++ b/store/chat.js
@@ -0,0 +1,17 @@
+import { defineStore } from "pinia";
+// import * as shopApi from "@/http/api/shop.js";
+
+// 聊天
+export const useChatStore = defineStore("chat", {
+ state: () => {
+ return {
+ chatList: [],
+ };
+ },
+ actions: {
+ sendMessage(message) {
+ this.chatList.push(message);
+ },
+ },
+ unistorage: true, // 开启后对 state 的数据读写都将持久化
+});
diff --git a/store/market.js b/store/market.js
index e7b0b0e..aeafa93 100644
--- a/store/market.js
+++ b/store/market.js
@@ -2,6 +2,7 @@
import { defineStore } from "pinia";
import * as distributionApi from "@/http/api/market/distribution.js";
import * as consumeDiscountApi from "@/http/api/market/consumeDiscount.js";
+import * as memberApi from "@/http/api/market/member.js";
export const upgradeTypes = [
{
@@ -57,7 +58,6 @@ export const useDistributionStore = defineStore("distribution", {
export const useNewUserDiscountStore = defineStore("newUserDiscount", {
state: () => {
return {
- //分销配置
config: {
isEnable: 0,
},
@@ -70,15 +70,56 @@ export const useNewUserDiscountStore = defineStore("newUserDiscount", {
return this.config;
},
async editConfig(data, isAutoResrefresh = true) {
+ if (data.discountType === "FIXED") {
+ data.randomDiscountList = [];
+ }
const res = await consumeDiscountApi.editConfig({
...this.config,
...data,
});
if (isAutoResrefresh) {
- this.getConfig();
+ setTimeout(() => {
+ this.getConfig();
+ }, 1500);
}
return res;
},
},
unistorage: true, // 开启后对 state 的数据读写都将持久化
});
+
+//超级会员
+export const useSuperVipStore = defineStore("superVip", {
+ state: () => {
+ return {
+ config: {
+ isOpen: 0,
+ configList:[]
+ },
+ vipLevelList:[]
+ };
+ },
+ actions: {
+ setVipLevelList(list){
+ this.vipLevelList = list||[];
+ },
+ editPlan(index,plan){
+ this.config.configList[index] = plan;
+ },
+ addPlan(plan){
+ this.config.configList.push(plan);
+ },
+ async getConfig() {
+ const data = await memberApi.getConfig();
+ data.memberPriceShopType = data.memberPriceShopType.toLowerCase();
+ this.config = data;
+ return this.config;
+ },
+ async editConfig(data) {
+ const res = await memberApi.editConfig({ ...this.config,memberPriceShopType:this.config.memberPriceShopType.toUpperCase(), ...data });
+ this.getConfig();
+ return res;
+ },
+ },
+ unistorage: true, // 开启后对 state 的数据读写都将持久化
+});