From d49e7555067d2a12ebf465eac9539091e84da0c3 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Wed, 3 Dec 2025 10:43:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=A2=E8=B4=AD=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E4=BC=98=E5=8C=96=E8=80=83=E5=8B=A4=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=97=A5=E6=9C=9F=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/coup/group.js | 278 ++++++++ src/assets/icon_scan.png | Bin 0 -> 2418 bytes .../dingding/components/detailDialog.vue | 9 +- src/views/dingding/index.vue | 2 +- src/views/marketing_center/data.js | 223 ++++++ src/views/marketing_center/list.vue | 238 +------ .../marketing_children_page.vue | 182 +++++ src/views/order/group-purchase.vue | 6 +- .../shop/groupBuying/components/bindShop.vue | 104 +++ .../groupBuying/components/refundDialog.vue | 111 +++ .../shop/groupBuying/components/scanGroup.vue | 514 ++++++++++++++ src/views/shop/groupBuying/index.vue | 668 +++++++++++++++++- .../Instead/components/popup-quan-hexiao.vue | 76 +- 13 files changed, 2161 insertions(+), 250 deletions(-) create mode 100644 src/api/coup/group.js create mode 100644 src/assets/icon_scan.png create mode 100644 src/views/marketing_center/marketing_children_page.vue create mode 100644 src/views/shop/groupBuying/components/bindShop.vue create mode 100644 src/views/shop/groupBuying/components/refundDialog.vue create mode 100644 src/views/shop/groupBuying/components/scanGroup.vue diff --git a/src/api/coup/group.js b/src/api/coup/group.js new file mode 100644 index 0000000..4fccbd6 --- /dev/null +++ b/src/api/coup/group.js @@ -0,0 +1,278 @@ +import request from "@/utils/request.js"; +import request_php from "@/utils/request-php.js"; + +/** + * 团购卷订单列表(分页) + * @param {*} data + * @returns + */ +export function searchstorestatus(type) { + return request_php({ + method: "post", + headers: { + clint_type: type + }, + url: "/meituan/searchstorestatus" + }); +} + +/** + * 团购卷订单列表(分页) + * @param {*} data + * @returns + */ +export function groupOrderlist(data) { + return request({ + method: "post", + url: "/groupOrder/list", + data, + }); +} + +/** + * 团购卷核销前回显 + * @param {*} params + * @returns + */ +export function groupOrderorderInfo(params) { + return request({ + method: "get", + url: "/groupOrder/orderInfo", + params, + }); +} + +/** + * 团购卷核销(仅核销待使用订单) + * @param {*} params + * @returns + */ +export function groupOrdergroupScan(params) { + return request({ + method: "get", + url: "/groupOrder/groupScan", + params, + }); +} + +/** + * 退单 + * @param {*} data + * @returns + */ +export function returnGpOrder(data) { + return request({ + method: "post", + url: "/pay/returnGpOrder", + data, + }); +} + +// 注意 抖音核销使用的请求为PHP服务 request_php + +/** + * 获取uisdk 绑定 链接 + * @param {*} data + * @returns + */ +export function getuisdk(data) { + return request_php({ + method: "post", + headers: { + clint_type: 2 + }, + url: "/douyin/getuisdk", + data, + }); +} + +/** + * 会员签入 + * @param {*} data + * @returns + */ +export function douyincheckIn(data) { + return request_php({ + method: "post", + url: "douyin/checkIn", + data, + }); +} + +/** + * 团购核销准备 + * @param {*} data + * @returns + */ +export function douyinfulfilmentcertificateprepare(data) { + return request_php({ + method: "post", + url: "douyin/fulfilmentcertificateprepare", + data, + }); +} + +/** + * 团购核销 + * @param {*} data + * @returns + */ +export function douyincertificateprepare(data) { + return request_php({ + method: "post", + url: "douyin/certificateprepare", + data, + }); +} + +/** + * 团购核销记录 + * @param {*} data + * @returns + */ +export function douyinorderlist(data) { + return request_php({ + method: "post", + url: "douyin/orderlist", + data, + }); +} + +/** + * 团购核销撤销 + * @param {*} data + * @returns + */ +export function douyinfulfilmentcertificatecancel(data) { + return request_php({ + method: "post", + url: "douyin/fulfilmentcertificatecancel", + data, + }); +} + +/** + * 门店列表 + * @param {*} data + * @returns + */ +export function douyinstorelist(data) { + return request_php({ + method: "post", + url: "douyin/storelist", + data, + }); +} + +/** + * 绑定门店 + * @param {*} data + * @returns + */ +export function douyinbindstore(data) { + return request_php({ + method: "post", + url: "douyin/bindstore", + data, + }); +} + +/** + * 登出团购 + * @param {*} data + * @returns + */ +export function tglogout(data) { + return request_php({ + method: "post", + url: "user/logout", + data, + }); +} + +/** + * 美团团购核销 + * 绑定-获取绑定状态 + * @param {*} data + * @returns + */ +export function thirdPartyCoupon_state(data) { + return request_php({ + method: "post", + url: "/meituan/searchstorestatus", + data, + }); +} + +/** + * 美团团购核销 + * 绑定-获取绑定url + * @param {*} data + * @returns + */ +export function thirdPartyCoupon_bindUrl(data) { + return request_php({ + method: "post", + headers: { + clint_type: 1 + }, + url: "/meituan/getuisdkurl", + data, + }); +} + +/** + * 美团团购核销 + * 团购券-获取可用券 + * @param {*} data + * @returns + */ +export function thirdPartyCoupon_list(data) { + return request_php({ + method: "post", + url: "/meituan/fulfilmentcertificateprepare", + data, + }); +} + +/** + * 美团团购核销 + * 执行核销 + * @param {*} data + * @returns + */ +export function certificateprepare(data) { + return request_php({ + method: "post", + url: "/meituan/certificateprepare", + data, + }); +} + +/** + * 美团团购核销 + * 团购核销记录 + * @param {*} data + * @returns + */ +export function meituan_orderlist(data) { + return request_php({ + method: "post", + url: "/meituan/orderlist", + data, + }); +} + +/** + * 美团团购核销 + * 团购撤销 + * @param {*} data + * @returns + */ +export function meituan_fulfilmentcertificatecancel(data) { + return request_php({ + method: "post", + url: "/meituan/fulfilmentcertificatecancel", + data, + }); +} diff --git a/src/assets/icon_scan.png b/src/assets/icon_scan.png new file mode 100644 index 0000000000000000000000000000000000000000..c98bf5f118bd61d17b2dc89193d6477323532ed8 GIT binary patch literal 2418 zcmV-&361uNP)SOqsz!{X|cRAzT-@u?uW7FPMb4a0* zRG;vCxXf@%U5 z`k0rN?s;=MJFm(%C4^KTNZb;(;T1IME>(sNCp{dXDFpCbUCcV@)oxFO)O_198PXXd z;yzU5Ntahg2D?6zf}!UOw%j1dpA>i*}hZrr}Sg_=I8w;_;b+fJAGJZ=Df~%&r*e{iJdRerN5FwBL!Aqm36I&T$4~Qx@a+eU`z_*uVtfd>~Fj`9YTLvVg=9~5j zjI$=xQZbM+^Z&vKU{^Vm4#WJ-v#gW-;nXi7*`Cpw+>b&t4A|ZgAX1X$(K%bMXB~yK z^-D-?Jn;cmTOJmpR5Li<;Rk607 zp!6Z6HlD<;#Gf|E`GEj?tv(iAU62qu5-G~qbPiMEhdDuS15b@R?6T;j#tKG9``OZ~ zhv2GeEB^LK(1G&Pe_RT`g**A`K7`cl@4OjU`g^>G5%$xdptps+Bx8poGa6@?{Lrh1 zVDF$AKalq`hQLL!w?1agy+}y+$|`vle<)UE+{9=IrjL>DY^e;u=cl?hhhGc~=(!ecY5|NgH1Mq2OtVm`ctbtgnjh%pz9P+`d!gN$!-aM*gZyNATv|5bUz$txjmAL)d{=RG+mjSKbahp#UN zvfWMbObCY)_%zGaYvdCG=vDCW(W}g$xo3HN65OvDfqjy_sD35Eayu~%aBD)9eR z;wRbyZ5cuYK=M;0@PyETWXnHd&vB_DhR&ttT~(AlEX*%~CZq+QSlo*x5;h$9&!35XY%zn1vEhR6vjmC0Pl1w)8tfMwMiLSzxsEN=+W46v+vLx?P5 zn&k~4ngNzoZwQe^OtZWpL^Hs$>J1^Xh-sELglGm>R=pua7BS88BZ3e*tg9LyfpeX< zV^oHb@Z@3z2GgtMMaz?mM8^6Vmx9kYg~}N2gb*1^r*yxXsWMoO7DDpDcDlzg z+zII!JxJv}97Bk}{Npr-7(xVq(EM!wAHbinM2&6nGGC( zg#3(z+~`h)b1e}32R9-k zgbCTmbmR#UnM1@(9J*3khAhl0LWIo4#4Vqxblni*4o%D{ayMIckQYTVi8CsfzFv++ zXwAR*$OYe@T)cAv1yYW<3jVBSNak%_VQbuw45X|gp~`7#b90z&^uiPnNoeAb6VI=e?O>Z1+{S& znO0v}@*}z5>xDWUL6w7wv8dnqi6(myQoTQQU5MGgnY2fuaC(!Yq+qN#bW{DzvZFao zeO@`Oi6P%3#8dr9Ay?L=BJGJ**3wos8Z zdDBcrtJ{mkIrVBhu>}9|j-X~E<^loE*nJI^(U0=07EBUlGJd*1S-48y44(z(kc&Dw zXSLrXDM7JG-z^NZfFOrmm~M3;VD@JxX_Mey07F$GIEl9;ue4&W6Wo&_E1Q!OGmL+Y z%w40(uz>10mdUWH#yQdB{rNAHXz;18d0A&T@irdOKNL_fJ-Lk!FKjQ#SW7p|VX1)> z2@#T0f_s!_@b4F~l2pBcj2Nl^$4LSgQ?Rza(t1hMM`>VJ97x<_+pq&G_Knga+G-%= zcpD3`#dWi--7@Y<6GF;Ye3!V&?t-!hsN zt_aCBQXB7>3Xp!016vsMVT^_+#AO#m!fP6CE&WZFh=KPZ5*k;;6SFW(49zXs6x0DM zdov+e(>U8Y*$yV+`bpDm$^8hjq+;XP^^!qwCy-lH*psF1WHRk zeRDcHugXrPgyb8ADft%QZ!!E#;0(&~yBz18>^C~({;2|0-uI`611(Wo(e76IM!Q?l k=974#eT7Mc_vkX=e}=3#Ctc`J761SM07*qoM6N<$f>!W*x&QzG literal 0 HcmV?d00001 diff --git a/src/views/dingding/components/detailDialog.vue b/src/views/dingding/components/detailDialog.vue index 1fe23aa..f2cc959 100644 --- a/src/views/dingding/components/detailDialog.vue +++ b/src/views/dingding/components/detailDialog.vue @@ -51,6 +51,11 @@ import { ref } from 'vue' import { attendanceDetail } from '@/api/coupon/index' +const props = defineProps({ + startTime: '', + endTime: '' +}) + const visible = ref(false) const detail = ref({ @@ -79,7 +84,9 @@ async function attendanceDetailAjax() { try { loading.value = true const res = await attendanceDetail({ - userId: row.value.userId + userId: row.value.userId, + startTime: props.startTime, + endTime: props.endTime }) detail.value = res } catch (error) { diff --git a/src/views/dingding/index.vue b/src/views/dingding/index.vue index c2e0793..5b16ac2 100644 --- a/src/views/dingding/index.vue +++ b/src/views/dingding/index.vue @@ -42,7 +42,7 @@ --> - + diff --git a/src/views/marketing_center/data.js b/src/views/marketing_center/data.js index 378a87e..ba9e7b1 100644 --- a/src/views/marketing_center/data.js +++ b/src/views/marketing_center/data.js @@ -12,6 +12,229 @@ export const userTypes = [ value: "vip", }, ]; + +// 新版菜单 +export const newMenus = [ + { + name: '顾客中心', + intro: '以顾客为核心统一管理', + childrenList: [ + { + name: "超级会员", + icon: "cjhy", + pathName: "superVip", + intro: "用户会员管理设置" + }, + ] + }, + { + name: '拉新拓客', + intro: '协助商家拉来新客户,拓展客户群体', + childrenList: [ + { + name: "分销", + icon: "zhcz", + pathName: "distribution_page", + intro: "用户成为业务员,可促进消费" + }, + { + name: "套餐推广", + icon: "tctg", + pathName: "", + intro: "下单通过用户邀请好友减免金额的方式裂变宣传套餐加购", + }, + { + name: "新客立减", + icon: "xklj", + pathName: "newUserDiscount", + intro: "首单下单减免金额" + }, + { + name: "商品拼团", + icon: "sppt", + pathName: "", + intro: "拼团" + }, + ] + }, + { + name: '拉高客单价', + intro: '提高每一位顾客单次购买的金额', + childrenList: [ + { + name: "满减活动", + icon: "mjhd", pathName: "discount_activity", + intro: "达到指定支付金额享受减价" + }, + { + name: "点餐智能推荐", + icon: "dczntj", + pathName: "order_recommendation", + intro: "进入点单页X秒未点自动推荐商品,此推荐设置启用即生效", + }, + { + name: "限时折扣", + icon: "xszk", + pathName: "discount_limit", + intro: "批量设置商品折扣" + }, + { + name: "弹窗广告", + icon: "tcgg", + pathName: "", + intro: "设置弹窗广告" + }, + ] + }, + { + name: '提升复购率', + intro: '提升客户再次购买的概率和频次', + childrenList: [ + { + name: "积分锁客", + icon: "jfsk", + pathName: "points", + intro: "设置充值消费的N倍,当前订单立即免单", + }, + { + name: "消费返现", + icon: "xffx", + pathName: "cashback", + intro: "用户下单后返现一定的金额到余额,可促进复购", + }, + { + name: "消费赠券", + icon: "xfzq", + pathName: "consume_ticket", + intro: "达到指定消费金额赠送优惠券", + }, + { + name: "私域引流", + icon: "syyl", + pathName: "drainage", + intro: "可设置用户下单成功后的群二维码", + }, + { + name: "生日有礼", + icon: "sryl", + pathName: "birthdayGift", + intro: "用户生日管理设置" + }, + { + name: "推送活动消息", + icon: "tshdxx", + pathName: "", + intro: "给用户推送服务通知" + } + ] + }, + { + name: '增加现金流', + intro: '增加商家特定时期内实际可支配的现金流入', + childrenList: [ + { + name: "霸王餐", + icon: "bwc", + pathName: "king_dine", + intro: "设置充值消费的N倍,当前订单立即免单", + }, + { + name: "智慧充值", + icon: "zhcz", + pathName: "wisdom_recharge", + intro: "允许客户充值并使用余额支付", + }, + { + name: "充值兑换码", + icon: "czdhm", + pathName: "recharge_exchange", + intro: "兑换码直充余额,可当作礼品赠送", + }, + { + name: "券兑换码", + icon: "qdhm", + pathName: "coupon_exchange_code", + intro: "可添加多券组合兑换" + }, + ] + }, + { + name: '优惠券体系', + intro: '完整且系统化的优惠体系', + childrenList: [ + { + name: "折扣券", + icon: "zkq", + pathName: "rebate_coupon", + intro: "下单享折扣但折扣的金额将在券中抵扣。", + }, + { + name: "满减券", + icon: "mjq", + pathName: "discount_coupon", + intro: + "用户满足指定金额后,可使用优惠券立减相应金额,如:设置满100-50券,符合要求的订单满100元后,立减50元。", + }, + { + name: "商品兑换券", + icon: "spdhq", + pathName: "product_redemption", + intro: "设置可兑换成商品的券", + }, + { + name: "买一送一券", + icon: "myzy", + pathName: "buy_one", + intro: "针对营销活动买一送一设置券品", + }, + { + name: "第二件半价券", + icon: "dejbjq", + pathName: "half_price", + intro: "设置第二件半价券", + }, + { + name: "免配送费券", + icon: "mfpsq", + pathName: "", + intro: "可设置一张免除订单配送费的券", + }, + { + name: "固定价格券", + icon: "gdjkq", + pathName: "", + intro: + "设置该券后,允许用户以固定价格兑换指定商品,如:设置一个固定价格9.9的券,商品20元,用户使用券后只需要9.9元兑换该商品。", + }, + { + name: "超值券包", + icon: "czqb", + pathName: "", + intro: "下单加购" + }, + ] + }, + { + name: '消息推送功能', + intro: '推送商家/平台优惠活动消息的方式', + childrenList: [ + { + name: "短信推送", + icon: "dxts", + pathName: "note_push", + intro: "给用户推送服务通知" + }, + { + name: "微信公众号", + icon: "wxgzh", + pathName: "official_accounts", + intro: + "授权微信公众号后,让你能够在后台查看和维护公众号的粉丝;同时你的店铺也有出现关注公众号的入口。", + }, + ] + } +] + export const returnUserType = (type) => { return userTypes.find((item) => item.value === type)?.label; }; diff --git a/src/views/marketing_center/list.vue b/src/views/marketing_center/list.vue index 7f3a6ee..3e002d9 100644 --- a/src/views/marketing_center/list.vue +++ b/src/views/marketing_center/list.vue @@ -15,7 +15,7 @@ -
+
@@ -46,6 +46,7 @@ import { ref } from 'vue' import defaultIcon from "@/assets/logo.png"; import { ElMessage } from "element-plus"; +import { newMenus } from './data.js' const iconSize = ref({ width: '55px', @@ -53,233 +54,16 @@ const iconSize = ref({ }) function showChildrenHandle(index) { - menusActive.value = index - childrenShow.value = true + // menusActive.value = index + // childrenShow.value = true + router.push({ + name: 'marketing_children_page', + query: { + index: index + } + }) } -const childrenShow = ref(false) -const menusActive = ref(0) -const newMenus = ref([ - { - name: '顾客中心', - intro: '以顾客为核心统一管理', - childrenList: [ - { - name: "超级会员", - icon: "cjhy", - pathName: "superVip", - intro: "用户会员管理设置" - }, - ] - }, - { - name: '拉新拓客', - intro: '协助商家拉来新客户,拓展客户群体', - childrenList: [ - { - name: "分销", - icon: "zhcz", - pathName: "distribution_page", - intro: "用户成为业务员,可促进消费" - }, - { - name: "套餐推广", - icon: "tctg", - pathName: "", - intro: "下单通过用户邀请好友减免金额的方式裂变宣传套餐加购", - }, - { - name: "新客立减", - icon: "xklj", - pathName: "newUserDiscount", - intro: "首单下单减免金额" - }, - { - name: "商品拼团", - icon: "sppt", - pathName: "", - intro: "拼团" - }, - ] - }, - { - name: '拉高客单价', - intro: '提高每一位顾客单次购买的金额', - childrenList: [ - { - name: "满减活动", - icon: "mjhd", pathName: "discount_activity", - intro: "达到指定支付金额享受减价" - }, - { - name: "点餐智能推荐", - icon: "dczntj", - pathName: "order_recommendation", - intro: "进入点单页X秒未点自动推荐商品,此推荐设置启用即生效", - }, - { - name: "限时折扣", - icon: "xszk", - pathName: "discount_limit", - intro: "批量设置商品折扣" - }, - { - name: "弹窗广告", - icon: "tcgg", - pathName: "", - intro: "设置弹窗广告" - }, - ] - }, - { - name: '提升复购率', - intro: '提升客户再次购买的概率和频次', - childrenList: [ - { - name: "积分锁客", - icon: "jfsk", - pathName: "points", - intro: "设置充值消费的N倍,当前订单立即免单", - }, - { - name: "消费返现", - icon: "xffx", - pathName: "cashback", - intro: "用户下单后返现一定的金额到余额,可促进复购", - }, - { - name: "消费赠券", - icon: "xfzq", - pathName: "consume_ticket", - intro: "达到指定消费金额赠送优惠券", - }, - { - name: "私域引流", - icon: "syyl", - pathName: "drainage", - intro: "可设置用户下单成功后的群二维码", - }, - { - name: "生日有礼", - icon: "sryl", - pathName: "birthdayGift", - intro: "用户生日管理设置" - }, - { - name: "推送活动消息", - icon: "tshdxx", - pathName: "", - intro: "给用户推送服务通知" - } - ] - }, - { - name: '增加现金流', - intro: '增加商家特定时期内实际可支配的现金流入', - childrenList: [ - { - name: "霸王餐", - icon: "bwc", - pathName: "king_dine", - intro: "设置充值消费的N倍,当前订单立即免单", - }, - { - name: "智慧充值", - icon: "zhcz", - pathName: "wisdom_recharge", - intro: "允许客户充值并使用余额支付", - }, - { - name: "充值兑换码", - icon: "czdhm", - pathName: "recharge_exchange", - intro: "兑换码直充余额,可当作礼品赠送", - }, - { - name: "券兑换码", - icon: "qdhm", - pathName: "coupon_exchange_code", - intro: "可添加多券组合兑换" - }, - ] - }, - { - name: '优惠券体系', - intro: '完整且系统化的优惠体系', - childrenList: [ - { - name: "折扣券", - icon: "zkq", - pathName: "rebate_coupon", - intro: "下单享折扣但折扣的金额将在券中抵扣。", - }, - { - name: "满减券", - icon: "mjq", - pathName: "discount_coupon", - intro: - "用户满足指定金额后,可使用优惠券立减相应金额,如:设置满100-50券,符合要求的订单满100元后,立减50元。", - }, - { - name: "商品兑换券", - icon: "spdhq", - pathName: "product_redemption", - intro: "设置可兑换成商品的券", - }, - { - name: "买一送一券", - icon: "myzy", - pathName: "buy_one", - intro: "针对营销活动买一送一设置券品", - }, - { - name: "第二件半价券", - icon: "dejbjq", - pathName: "half_price", - intro: "设置第二件半价券", - }, - { - name: "免配送费券", - icon: "mfpsq", - pathName: "", - intro: "可设置一张免除订单配送费的券", - }, - { - name: "固定价格券", - icon: "gdjkq", - pathName: "", - intro: - "设置该券后,允许用户以固定价格兑换指定商品,如:设置一个固定价格9.9的券,商品20元,用户使用券后只需要9.9元兑换该商品。", - }, - { - name: "超值券包", - icon: "czqb", - pathName: "", - intro: "下单加购" - }, - ] - }, - { - name: '消息推送功能', - intro: '推送商家/平台优惠活动消息的方式', - childrenList: [ - { - name: "短信推送", - icon: "dxts", - pathName: "note_push", - intro: "给用户推送服务通知" - }, - { - name: "微信公众号", - icon: "wxgzh", - pathName: "official_accounts", - intro: - "授权微信公众号后,让你能够在后台查看和维护公众号的粉丝;同时你的店铺也有出现关注公众号的入口。", - }, - ] - } -]) - const router = useRouter(); const to = (item) => { if (!item.pathName) { diff --git a/src/views/marketing_center/marketing_children_page.vue b/src/views/marketing_center/marketing_children_page.vue new file mode 100644 index 0000000..da138a7 --- /dev/null +++ b/src/views/marketing_center/marketing_children_page.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/order/group-purchase.vue b/src/views/order/group-purchase.vue index b45901c..a2da669 100644 --- a/src/views/order/group-purchase.vue +++ b/src/views/order/group-purchase.vue @@ -112,7 +112,7 @@ + + \ No newline at end of file diff --git a/src/views/shop/groupBuying/components/refundDialog.vue b/src/views/shop/groupBuying/components/refundDialog.vue new file mode 100644 index 0000000..e076e12 --- /dev/null +++ b/src/views/shop/groupBuying/components/refundDialog.vue @@ -0,0 +1,111 @@ + + + + + \ No newline at end of file diff --git a/src/views/shop/groupBuying/components/scanGroup.vue b/src/views/shop/groupBuying/components/scanGroup.vue new file mode 100644 index 0000000..db90af2 --- /dev/null +++ b/src/views/shop/groupBuying/components/scanGroup.vue @@ -0,0 +1,514 @@ + + + + + + + \ No newline at end of file diff --git a/src/views/shop/groupBuying/index.vue b/src/views/shop/groupBuying/index.vue index 7d23e7f..32e6a7b 100644 --- a/src/views/shop/groupBuying/index.vue +++ b/src/views/shop/groupBuying/index.vue @@ -1,3 +1,669 @@ + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/popup-quan-hexiao.vue b/src/views/tool/Instead/components/popup-quan-hexiao.vue index 7eb28cd..43f1276 100644 --- a/src/views/tool/Instead/components/popup-quan-hexiao.vue +++ b/src/views/tool/Instead/components/popup-quan-hexiao.vue @@ -3,42 +3,31 @@
- + {{ item.text }}
-
- +
取消 - 确定 + 确定
- @@ -51,6 +40,7 @@ import tiktokIcon from "@/assets/icons/douyin.png"; const user = useUserStore(); import * as $Api from "@/api/coup/index.js"; +import { searchstorestatus, thirdPartyCoupon_bindUrl, getuisdk } from '@/api/coup/group' import orderApi from "@/api/order/order"; import bindShop from "./douyin-quan-bind-shop.vue"; import chooseGoods from "./choose-quan-goods.vue"; @@ -94,10 +84,14 @@ export default { pays: [ { text: "美团", + clint_type: 1, + status: 0, icon: meituanIcon, }, { text: "抖音", + clint_type: 2, + status: 0, icon: tiktokIcon, }, ], @@ -117,6 +111,44 @@ export default { }, }, methods: { + // 查询抖音/美团绑定的状态 + async searchstorestatus() { + try { + const { mt_status, dy_status } = await searchstorestatus(this.pays[this.paysSel].clint_type) + // console.log('查询抖音/美团绑定的状态', mt_status, dy_status); + + this.pays.forEach(item => { + if (item.clint_type == 1) { + item.status = mt_status + } + if (item.clint_type == 2) { + item.status = dy_status + } + }) + + if (this.pays[this.paysSel].clint_type == 1 && this.pays[this.paysSel].status == 0) { + // 如果没有绑定,先提示用户去绑定 + const res = await thirdPartyCoupon_bindUrl() + ElMessageBox.confirm('您的店铺还未绑定美团,请绑定后操作!', '注意', { + confirmButtonText: '去绑定' + }).then(() => { + window.open(res) + }).catch(() => { }) + } + + if (this.pays[this.paysSel].clint_type == 2 && this.pays[this.paysSel].status == 0) { + // 如果没有抖音,先提示用户去绑定 + const res = await getuisdk() + ElMessageBox.confirm('您的店铺还未绑定抖音,请绑定后操作!', '注意', { + confirmButtonText: '去绑定' + }).then(() => { + window.open(res) + }).catch(() => { }) + } + } catch (error) { + console.log(error); + } + }, refChooseGoodsOpen(data, types) { this.$refs.refChooseGoods.open(data, types); }, @@ -152,6 +184,8 @@ export default { this.$nextTick(() => { this.$refs.refInputCode.focus(); //获取焦点 }); + + this.searchstorestatus() }, async confirm() { @@ -189,7 +223,7 @@ export default { window.open(res2); } }) - .catch(() => {}); + .catch(() => { }); return; } const res1 = await $Api.$meituan_fulfilmentcertificateprepare({ @@ -215,6 +249,8 @@ export default { setTimeout(() => { this.$refs.refInputCode.focus(); }, 100); + + this.searchstorestatus() }, close() { this.show = false; @@ -241,22 +277,28 @@ export default { height: 164px; overflow: hidden; } + .openSwitch { display: flex; justify-content: center; } + .flex { display: flex; } + .justify-center { justify-content: center; } + :deep(.el-form) { width: 200px; } + :deep(.el-alert) { width: inherit; } + .flex-col { flex-direction: column; }