const.dart 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. int orderStateRevoked = 5; //已取消
  36. //订单类型
  37. int orderTypeCommodity = 0; //商品
  38. int orderTypeAnnualFee = 1; //平台年费
  39. int orderTypeVirtualProduct = 2; //虚拟物品
  40. int orderTypeThirdPlatform = 3; //第三方平台订单
  41. int orderTypeOfflineTransfer = 4; //线下付款
  42. int orderTypeAdvertise = 5; //平台广告
  43. //UiD长度
  44. int userUIDLen = 8;
  45. int orderUIDLen = 12;
  46. int shopUIDLen = 6;
  47. //支付方式
  48. int payWayWallet = 0; //钱包
  49. int payWayAliPay = 1; //支付宝支付
  50. //检查优惠券过期周期
  51. int checkCouponDuration = 1; //小时
  52. //店铺状态
  53. int shopStateNormal = 0; //店铺正常
  54. int shopStateArrearage = 1; //店铺欠费
  55. int shopStateBanned = 2; //店铺被禁
  56. int shopStateClosed = 3; //店铺被关闭
  57. //聊天消息类型
  58. String chatMsgTypeText = "文字"; //文字
  59. String chatMsgTypePic = "图片"; //图片
  60. String chatMsgTypeOrder = "订单"; //订单
  61. String chatMsgTypeRedPackage = "红包"; //红包
  62. //通知类型
  63. String notifyTypeNewMsg = "新聊天消息";
  64. String notifyTypeRevokeMsg = "撤回聊天消息";
  65. String notifyTypeNewOrder = "新订单";
  66. String notifyTypeUpdateOrder = "更新订单";
  67. String notifyTypeIncome = "收入进账";
  68. String notifyTypeSysMsg = "系统消息";
  69. String notifyTypeOrderPaymentIsSuccessful = "订单支付成功";
  70. String notifyTypeNewCoupon = "新优惠券申请";
  71. String notifyTypePayFailed = "订单支付失败";
  72. //道具Key
  73. String vpKeyChatWaterMark = "ChatWaterMark"; //聊天水印,隐私保护
  74. String vpKeyXRay = "XRay"; //战绩查看
  75. //广告类型
  76. int adTypeHomeList = 0; //店铺/商品部分广告
  77. int adTypeHomeBanner = 1; //首页banner
  78. //首页数据类型
  79. int homeListTypeShop = 0;
  80. int homeListTypeCommodity = 1;
  81. //广告关联类型
  82. int adLinkTypeShop = 0; //广告关联店铺
  83. int adLinkTypeCommodity = 1; //广告关联商品
  84. aliPayResultStatus(int code) {
  85. switch (code) {
  86. case 9000:
  87. return '订单支付成功';
  88. case 8000:
  89. return '正在处理中';
  90. case 4000:
  91. return '订单支付失败';
  92. case 5000:
  93. return '重复请求';
  94. case 6001:
  95. return '取消支付';
  96. case 6002:
  97. return '网络连接出错';
  98. case 6003:
  99. return '支付结果未知';
  100. default:
  101. return '支付错误';
  102. }
  103. }
  104. //资金流水用途类型
  105. int flowTypeRefund = -1; //退款
  106. int flowTypeOrderCommodity = 1; //商品订单
  107. int flowTypeOrderAnnualFee = 2; //平台年费订单
  108. int flowTypeOrderVirtualProduct = 3; //虚拟物品订单
  109. int flowTypeOrderThirdPlatform = 4; //第三方平台订单
  110. int flowTypeOrderOfflineTransfer = 5; //线下付款订单
  111. int flowTypeRedPacket = 10; //红包
  112. int flowTypeWithdraw = 20; //提现
  113. int flowTypeShopCommission = 30; //店铺佣金
  114. int flowTypePlatformFee = 40; //平台收费
  115. int flowTypePlatformFine = 41; //平台罚款
  116. int flowTypeBonus = 99; //平台分红
  117. flowType(int type) {
  118. switch (type) {
  119. case -1:
  120. return '退款';
  121. case 1:
  122. return '商品订单';
  123. case 2:
  124. return '平台年费订单';
  125. case 3:
  126. return '虚拟物品订单';
  127. case 4:
  128. return '第三方平台订单';
  129. case 5:
  130. return '线下付款订单';
  131. case 10:
  132. return '红包';
  133. case 20:
  134. return '提现';
  135. case 30:
  136. return '货帮佣金';
  137. case 40:
  138. return '平台收费';
  139. case 41:
  140. return '平台罚款';
  141. case 99:
  142. return '平台分红';
  143. default:
  144. return '';
  145. }
  146. }
  147. String appStoreID = '1562651088';
  148. //优惠券类型
  149. int couponTypeCash = 0; //现金券,可以支付任何订单
  150. int couponTypeConsumption = 1; //消费券,只能在公开店铺消费
  151. String couponType(int type) {
  152. if (type == couponTypeCash) {
  153. return '现金券';
  154. } else if (type == couponTypeConsumption) {
  155. return '消费券';
  156. } else {
  157. return '优惠券';
  158. }
  159. }
  160. String couponRule(int type) {
  161. if (type == couponTypeCash) {
  162. return '可以支付任何订单';
  163. } else if (type == couponTypeConsumption) {
  164. return '只能在公开店铺消费';
  165. } else {
  166. return '优惠券';
  167. }
  168. }