const.dart 6.8 KB

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