const.dart 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. //用户状态
  2. int userStateUnVerified = 0; //未验证,暂未使用
  3. int userStateActive = 1; //正常
  4. int userStateBanned = 2; //被封
  5. int userStateRemoved = 3; //被移除
  6. //店铺成员角色类型
  7. const int shopUserOwner = 0; //店主
  8. const int shopUserStaff = 1; //客服
  9. const int shopUserMember = 2; //顾客
  10. const int shopUserPartner = 3; //合伙人
  11. //活动类型
  12. const int activityTypeLoginForCash = 1; //登录领取现金红包
  13. //用户在店铺中的审核状态
  14. int shopUserReviewing = 0; //审核中
  15. int shopUserReviewPass = 1; //审核通过
  16. int shopUserReviewFail = 2; //审核未通过
  17. // //店铺入驻收费类型
  18. // int platformFeePerAnnual = 1; //年费
  19. // int platformFeePerOrderFix = 2; //按照订单金额提成,固定金额
  20. // int platformFeePerOrderPercent = 3; //按照订单金额提成,按照比例
  21. // int platformFeePerCommissionFix = 4; //按照交易佣金提成,固定金额
  22. // int platformFeePerCommissionPercent = 5; //按照交易佣金提成,按照比例
  23. //店铺入驻收费类型
  24. int platformFeePerAnnual = 1; //按年付费
  25. int platformFeePerOrder = 2; //按订单付费
  26. int platformFeePerCommission = 3; //按佣金付费
  27. //店主收取佣金方式
  28. int shopCommissionTypeFix = 0; //直接收取固定金额
  29. int shopCommissionTypePercent = 1; //按照比例收取
  30. //轮播图所在页面
  31. int carouselPageHome = 1; //首页
  32. //订单状态
  33. int orderStateUnpaid = 0; //未支付
  34. int orderStatePaid = 1; //已支付
  35. int orderStatePaying = 2; //支付中
  36. int orderStatePayFailed = 3; //支付失败
  37. int orderStateOtherPaid = 4; //已代付
  38. int orderStateRevoked = 5; //已取消
  39. //订单类型
  40. int orderTypeCommodity = 0; //商品
  41. int orderTypeAnnualFee = 1; //平台年费
  42. int orderTypeVirtualProduct = 2; //虚拟物品
  43. int orderTypeThirdPlatform = 3; //第三方平台订单
  44. int orderTypeOfflineTransfer = 4; //到店付款
  45. int orderTypeAdvertise = 5; //平台广告
  46. int orderTypeGoldenShopUID = 6; //店铺靓号订单
  47. int orderTypeOfflinePay = 7; //线下BBY扫描创建的订单
  48. int orderTypeShopOwnerCreated = 9; //店主发起收款订单
  49. int orderTypeScancodeAilyPay = 8; //支付宝或微信扫码支付创建的订单
  50. int orderTypeUserLevel = 50; //购买会员等级订单1
  51. //UiD长度
  52. int userUIDLen = 8;
  53. int orderUIDLen = 12;
  54. int shopUIDLen = 6;
  55. //支付方式
  56. int payWayWallet = 0; //钱包
  57. int payWayAliPay = 1; //支付宝支付
  58. int payWayWeChat = 2; //微信支付
  59. //检查优惠券过期周期
  60. int checkCouponDuration = 1; //小时
  61. //店铺状态
  62. int shopStateNormal = 0; //店铺正常
  63. int shopStateArrearage = 1; //店铺欠费
  64. int shopStateBanned = 2; //店铺被禁
  65. int shopStateClosed = 3; //店铺被关闭
  66. //聊天消息类型
  67. String chatMsgTypeText = "文字"; //文字
  68. String chatMsgTypePic = "图片"; //图片
  69. String chatMsgTypeOrder = "订单"; //订单
  70. String chatMsgTypeRedPackage = "红包"; //红包
  71. //通知类型
  72. String notifyTypeNewMsg = "新聊天消息";
  73. String notifyTypeRevokeMsg = "撤回聊天消息";
  74. String notifyTypeNewOrder = "新订单";
  75. String notifyTypeUpdateOrder = "更新订单";
  76. String notifyTypeIncome = "收入进账";
  77. String notifyTypeSysMsg = "系统消息";
  78. String notifyTypeOrderPaymentIsSuccessful = "订单支付成功";
  79. String notifyTypeNewCoupon = "新优惠券申请";
  80. String notifyTypePayFailed = "订单支付失败";
  81. //道具Key
  82. String vpKeyChatWaterMark = "ChatWaterMark"; //聊天水印,隐私保护
  83. String vpKeyXRay = "XRay"; //战绩查看
  84. //广告类型
  85. int adTypeHomeList = 0; //店铺/商品部分广告
  86. int adTypeHomeBanner = 1; //首页banner
  87. //首页数据类型
  88. int homeListTypeShop = 0;
  89. int homeListTypeCommodity = 1;
  90. //广告关联类型
  91. int adLinkTypeShop = 0; //广告关联店铺
  92. int adLinkTypeCommodity = 1; //广告关联商品
  93. aliPayResultStatus(int code) {
  94. switch (code) {
  95. case 9000:
  96. return '订单支付成功';
  97. case 8000:
  98. return '正在处理中';
  99. case 4000:
  100. return '订单支付失败';
  101. case 5000:
  102. return '重复请求';
  103. case 6001:
  104. return '取消支付';
  105. case 6002:
  106. return '网络连接出错';
  107. case 6003:
  108. return '支付结果未知';
  109. default:
  110. return '支付错误';
  111. }
  112. }
  113. //资金流水用途类型
  114. const int flowTypeRefund = -1; //退款
  115. const int flowTypeOrderCommodity = 1; //商品订单
  116. const int flowTypeOrderAnnualFee = 2; //平台年费订单
  117. const int flowTypeOrderVirtualProduct = 3; //虚拟物品订单
  118. const int flowTypeOrderThirdPlatform = 4; //第三方平台订单
  119. const int flowTypeOrderOfflineTransfer = 5; //线下付款订单
  120. const int flowTypeOrderAdvertise = 6; //平台广告订单
  121. const int flowTypeOrderGoldrenShopUID = 7; //店铺靓号订单
  122. const int flowTypeScancodeAilyPay = 8; //二维码收款
  123. const int flowTypeRedPacket = 10; //红包
  124. const int flowTypeWithdraw = 20; //提现
  125. const int flowTypeShopCommission = 30; //店铺佣金
  126. const int flowTypePlatformFee = 40; //平台收费
  127. const int flowTypePlatformFine = 41; //平台罚款
  128. const int flowTypePlatformRecommendCommission = 42; //店铺推荐佣金佣金
  129. const int flowTypePlatformRefund = 43; //平台退偿积分
  130. const int flowTypeBonus = 99; //平台分红
  131. flowType(int type) {
  132. switch (type) {
  133. case flowTypeRefund:
  134. return '退款';
  135. case flowTypeOrderCommodity:
  136. return '商品订单';
  137. case flowTypeScancodeAilyPay:
  138. return '二维码收款';
  139. case flowTypeOrderAnnualFee:
  140. return '平台年费订单';
  141. case flowTypeOrderVirtualProduct:
  142. return '虚拟物品订单';
  143. case flowTypeOrderThirdPlatform:
  144. return '第三方平台订单';
  145. case flowTypeOrderOfflineTransfer:
  146. return '线下付款订单';
  147. case flowTypeOrderAdvertise:
  148. return '平台广告订单';
  149. case flowTypeOrderGoldrenShopUID:
  150. return '店铺靓号订单';
  151. case flowTypeRedPacket:
  152. return '红包';
  153. case flowTypeWithdraw:
  154. return '提现';
  155. case flowTypeShopCommission:
  156. return '货帮佣金';
  157. case flowTypePlatformFee:
  158. return '平台收费';
  159. case flowTypePlatformFine:
  160. return '平台罚款';
  161. case flowTypePlatformRecommendCommission:
  162. return '店铺推荐佣金';
  163. case flowTypePlatformRefund:
  164. return '平台退偿积分';
  165. case flowTypeBonus:
  166. return '平台分红';
  167. default:
  168. return '';
  169. }
  170. }
  171. String appStoreID = '1562651088';
  172. const String AppID = 'wx8a5676abaee0a448';
  173. const String AppSecret = '5af9bfdfd8747d3f23e60ad19412cb55';
  174. //优惠券类型
  175. int couponTypeCash = 0; //现金券,可以支付任何订单
  176. int couponTypeConsumption = 1; //消费券,只能在公开店铺消费
  177. String couponType(int type) {
  178. if (type == couponTypeCash) {
  179. return '现金券';
  180. } else if (type == couponTypeConsumption) {
  181. return '消费券';
  182. } else {
  183. return '优惠券';
  184. }
  185. }
  186. String couponRule(int type) {
  187. if (type == couponTypeCash) {
  188. return '可以支付任何订单';
  189. } else if (type == couponTypeConsumption) {
  190. return '只能在公开店铺消费';
  191. } else {
  192. return '优惠券';
  193. }
  194. }