const.dart 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. //用户状态
  2. int userStateUnVerified = 0; //未验证,暂未使用
  3. int userStateActive = 1; //正常
  4. int userStateBanned = 2; //被封
  5. int userStateRemoved = 3; //被移除
  6. //店铺成员角色类型
  7. int shopUserOwner = 0; //店主
  8. int shopUserStaff = 1; //客服
  9. int shopUserMember = 2; //顾客
  10. //用户在店铺中的审核状态
  11. int shopUserReviewing = 0; //审核中
  12. int shopUserReviewPass = 1; //审核通过
  13. int shopUserReviewFail = 2; //审核未通过
  14. // //店铺入驻收费类型
  15. // int platformFeePerAnnual = 1; //年费
  16. // int platformFeePerOrderFix = 2; //按照订单金额提成,固定金额
  17. // int platformFeePerOrderPercent = 3; //按照订单金额提成,按照比例
  18. // int platformFeePerCommissionFix = 4; //按照交易佣金提成,固定金额
  19. // int platformFeePerCommissionPercent = 5; //按照交易佣金提成,按照比例
  20. //店铺入驻收费类型
  21. int platformFeePerAnnual = 1; //按年付费
  22. int platformFeePerOrder = 2; //按订单付费
  23. int platformFeePerCommission = 3; //按佣金付费
  24. //店主收取佣金方式
  25. int shopCommissionTypeFix = 0; //直接收取固定金额
  26. int shopCommissionTypePercent = 1; //按照比例收取
  27. //轮播图所在页面
  28. int carouselPageHome = 1; //首页
  29. //订单状态
  30. int orderStateUnpaid = 0; //未支付
  31. int orderStatePaid = 1; //已支付
  32. int orderStatePaying = 2; //支付中
  33. int orderStatePayFailed = 3; //支付失败
  34. int orderStateOtherPaid = 4; //已代付
  35. //订单类型
  36. int orderTypeCommodity = 0; //商品
  37. int orderTypeAnnualFee = 1; //平台年费
  38. int orderTypeVirtualProduct = 2; //虚拟物品
  39. int orderTypeThirdPlatform = 3; //第三方平台订单
  40. int orderTypeOfflineTransfer = 4; //线下付款
  41. int orderTypeAdvertise = 5; //平台广告
  42. //UiD长度
  43. int userUIDLen = 8;
  44. int orderUIDLen = 12;
  45. int shopUIDLen = 6;
  46. //支付方式
  47. int payWayWallet = 0; //钱包
  48. int payWayAliPay = 1; //支付宝支付
  49. //检查优惠券过期周期
  50. int checkCouponDuration = 1; //小时
  51. //店铺状态
  52. int shopStateNormal = 0; //店铺正常
  53. int shopStateArrearage = 1; //店铺欠费
  54. int shopStateBanned = 2; //店铺被禁
  55. int shopStateClosed = 3; //店铺被关闭
  56. //聊天消息类型
  57. String chatMsgTypeText = "文字"; //文字
  58. String chatMsgTypePic = "图片"; //图片
  59. String chatMsgTypeOrder = "订单"; //订单
  60. String chatMsgTypeRedPackage = "红包"; //红包
  61. //通知类型
  62. String notifyTypeNewMsg = "新聊天消息";
  63. String notifyTypeRevokeMsg = "撤回聊天消息";
  64. String notifyTypeNewOrder = "新订单";
  65. String notifyTypeUpdateOrder = "更新订单";
  66. String notifyTypeIncome = "收入进账";
  67. String notifyTypeSysMsg = "系统消息";
  68. String notifyTypeOrderPaymentIsSuccessful = "订单支付成功";
  69. String notifyTypeNewCoupon = "新优惠券申请";
  70. String notifyTypePayFailed = "订单支付失败";
  71. //道具Key
  72. String vpKeyChatWaterMark = "ChatWaterMark"; //聊天水印,隐私保护
  73. String vpKeyXRay = "XRay"; //战绩查看
  74. //广告类型
  75. int adTypeHomeList = 0; //店铺/商品部分广告
  76. int adTypeHomeBanner = 1; //首页banner
  77. //首页数据类型
  78. int homeListTypeShop = 0;
  79. int homeListTypeCommodity = 1;
  80. //广告关联类型
  81. int adLinkTypeShop = 0; //广告关联店铺
  82. int adLinkTypeCommodity = 1; //广告关联商品
  83. aliPayResultStatus(int code) {
  84. switch (code) {
  85. case 9000:
  86. return '订单支付成功';
  87. case 8000:
  88. return '正在处理中';
  89. case 4000:
  90. return '订单支付失败';
  91. case 5000:
  92. return '重复请求';
  93. case 6001:
  94. return '取消支付';
  95. case 6002:
  96. return '网络连接出错';
  97. case 6003:
  98. return '支付结果未知';
  99. default:
  100. return '支付错误';
  101. }
  102. }
  103. //资金流水用途类型
  104. int flowTypeRefund = -1; //退款
  105. int flowTypeOrderCommodity = 1; //商品订单
  106. int flowTypeOrderAnnualFee = 2; //平台年费订单
  107. int flowTypeOrderVirtualProduct = 3; //虚拟物品订单
  108. int flowTypeOrderThirdPlatform = 4; //第三方平台订单
  109. int flowTypeOrderOfflineTransfer = 5; //线下付款订单
  110. int flowTypeRedPacket = 10; //红包
  111. int flowTypeWithdraw = 20; //提现
  112. int flowTypeShopCommission = 30; //店铺佣金
  113. int flowTypePlatformFee = 40; //平台收费
  114. int flowTypePlatformFine = 41; //平台罚款
  115. int flowTypeBonus = 99; //平台分红
  116. flowType(int type) {
  117. switch (type) {
  118. case -1:
  119. return '退款';
  120. case 1:
  121. return '商品订单';
  122. case 2:
  123. return '平台年费订单';
  124. case 3:
  125. return '虚拟物品订单';
  126. case 4:
  127. return '第三方平台订单';
  128. case 5:
  129. return '线下付款订单';
  130. case 10:
  131. return '红包';
  132. case 20:
  133. return '提现';
  134. case 30:
  135. return '店铺佣金';
  136. case 40:
  137. return '平台收费';
  138. case 41:
  139. return '平台罚款';
  140. case 99:
  141. return '平台分红';
  142. default:
  143. return '';
  144. }
  145. }