代码拉取完成,页面将自动刷新
同步操作将从 Jone.x/oejia_weshop 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# -*- coding: utf-8 -*-
import re
from .const import Const
class GoodsRecommendStatus(Const):
normal = (False, u'普通')
recommend = (True, u'推荐')
class OrderStatus(Const):
closed = ('closed', u'已关闭')
unpaid = ('unpaid', u'待支付')
pending = ('pending', u'待发货')
unconfirmed = ('unconfirmed', u'待收货')
unevaluated = ('unevaluated', u'待评价')
completed = ('completed', u'已完成')
class OrderRequestStatus(Const):
closed = (-1, 'closed')
unpaid = (0, 'unpaid')
pending = (1, 'pending')
unconfirmed = (2, 'unconfirmed')
unevaluated = (3, 'unevaluated')
completed = (4, 'completed')
class OrderResponseStatus(Const):
closed = ('closed', -1)
unpaid = ('unpaid', 0)
pending = ('pending', 1)
unconfirmed = ('unconfirmed', 2)
unevaluated = ('unevaluated', 3)
completed = ('completed', 4)
class BannerStatus(Const):
visible = (True, u'显示')
invisible = (False, u'不显示')
class WechatUserRegisterType(Const):
app = ('app', u'小程序')
gzh = ('gzh', u'公众号')
class WechatUserStatus(Const):
default = ('default', u'默认')
class PaymentStatus(Const):
unpaid = ('unpaid', '未支付')
success = ('success', '成功')
fail = ('fail', '失败')
def hump2underline(hunp_str):
'''
驼峰形式字符串转成下划线形式
:param hunp_str: 驼峰形式字符串
:return: 字母全小写的下划线形式字符串
'''
p = re.compile(r'([a-z]|\d)([A-Z])')
sub = re.sub(p, r'\1_\2', hunp_str).lower()
return sub
def underline2hump(underline_str):
'''
下划线形式字符串转成驼峰形式
:param underline_str: 下划线形式字符串
:return: 驼峰形式字符串
'''
sub = re.sub(r'(_\w)',lambda x:x.group(1)[1].upper(),underline_str)
return sub
def get_precision():
return 16, 2
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。