const.dart 6.4 KB

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