diff --git a/backend/views/exams.py b/backend/views/exams.py index c7dff17..13db028 100644 --- a/backend/views/exams.py +++ b/backend/views/exams.py @@ -1,4 +1,4 @@ -import hmac +import hmac import threading import traceback import uuid @@ -114,6 +114,14 @@ from ..serializers import PopupPageSerializer logger = logging.getLogger('houtai') SHOP_PRODUCT_PERMS = ['1199ab', '1199abc', '1199abd'] +# 审核记录状态映射(原位于 zxkf.py,按功能组归类到考核模块) +SHENHE_ZHUANGTAI_MAP = { + 0: '考核中', + 1: '已通过', + 2: '未通过', + 3: '待审核', +} + class KhgglView(APIView): """ 考核官管理数据接口(列表、筛选、分页) diff --git a/backend/views/kefu.py b/backend/views/kefu.py index 8008521..0e68b9b 100644 --- a/backend/views/kefu.py +++ b/backend/views/kefu.py @@ -1,4 +1,4 @@ -import hmac +import hmac import threading import traceback import uuid @@ -114,6 +114,9 @@ from ..serializers import PopupPageSerializer logger = logging.getLogger('houtai') SHOP_PRODUCT_PERMS = ['1199ab', '1199abc', '1199abd'] +# 与前端约定的聊天权限码(原位于 shops.py,按功能组归类到客服模块) +CHAT_PERM_CODES = ['abca1', 'baac2', 'cabc3', 'cb3a2', 'bcaa4'] + class KefuGetDashouListView(APIView): """ 客服获取打手列表接口(仅打手类型) diff --git a/backend/views/shops.py b/backend/views/shops.py index 92cdebb..a3803f0 100644 --- a/backend/views/shops.py +++ b/backend/views/shops.py @@ -1,4 +1,4 @@ -import hmac +import hmac import threading import traceback import uuid @@ -929,11 +929,5 @@ class ProductModifyView(APIView): if update_fields: product.save(update_fields=update_fields) - return Response({'code': 0, 'msg': '商品修改成功'}) - - - - -# 与前端约定的聊天权限码 -CHAT_PERM_CODES = ['abca1', 'baac2', 'cabc3', 'cb3a2', 'bcaa4'] + return Response({'code': 0, 'msg': '商品修改成功'}) diff --git a/backend/views/zxkf.py b/backend/views/zxkf.py index abdcc16..302ee0c 100644 --- a/backend/views/zxkf.py +++ b/backend/views/zxkf.py @@ -1,4 +1,4 @@ -import hmac +import hmac import threading import traceback import uuid @@ -345,13 +345,3 @@ class ZxkfghdsView(APIView): return '游戏订单' -# ==================== 考核记录管理 ==================== - -SHENHE_ZHUANGTAI_MAP = { - 0: '考核中', - 1: '已通过', - 2: '未通过', - 3: '待审核', -} - - diff --git a/config/views/miniapp_config.py b/config/views/miniapp_config.py index 4d13add..9a02a6b 100644 --- a/config/views/miniapp_config.py +++ b/config/views/miniapp_config.py @@ -1,4 +1,4 @@ -import io +import io import os import re import time @@ -318,27 +318,3 @@ class CheckPhoneAuthView(APIView): return (boss.alldingdan or 0) > 0 -# ---------- 小程序客服话术 / 自动回复 ---------- - -MINIAPP_SCRIPT_DEFAULTS = { - 'cs_welcome': { - 'title': '', - 'content': '你好,请问有什么可以帮到您的?', - 'confirm_text': '', - 'cancel_text': '', - }, - 'chat_image_confirm': { - 'title': '温馨提示', - 'content': '平台禁止任何违法违规行为,聊天内容仅限于商家与接单员正常业务对接。严禁赌博、诈骗及其他非法行为,违者后果自负。', - 'confirm_text': '确认', - 'cancel_text': '取消', - }, - 'merchant_dispatch_confirm': { - 'title': '确认派单', - 'content': '确认向该打手派发此订单?', - 'confirm_text': '确认', - 'cancel_text': '取消', - }, -} - - diff --git a/config/views/scripts.py b/config/views/scripts.py index 357036e..64cae1a 100644 --- a/config/views/scripts.py +++ b/config/views/scripts.py @@ -1,4 +1,4 @@ -import io +import io import os import re import time @@ -60,6 +60,28 @@ import requests import logging logger = logging.getLogger(__name__) +# 小程序客服话术 / 自动回复默认值(原位于 miniapp_config.py,按功能组归类到话术模块) +MINIAPP_SCRIPT_DEFAULTS = { + 'cs_welcome': { + 'title': '', + 'content': '你好,请问有什么可以帮到您的?', + 'confirm_text': '', + 'cancel_text': '', + }, + 'chat_image_confirm': { + 'title': '温馨提示', + 'content': '平台禁止任何违法违规行为,聊天内容仅限于商家与接单员正常业务对接。严禁赌博、诈骗及其他非法行为,违者后果自负。', + 'confirm_text': '确认', + 'cancel_text': '取消', + }, + 'merchant_dispatch_confirm': { + 'title': '确认派单', + 'content': '确认向该打手派发此订单?', + 'confirm_text': '确认', + 'cancel_text': '取消', + }, +} + def _resolve_script_club_id(request): from jituan.services.club_context import resolve_club_id_from_request from jituan.services.club_user import get_user_club_id