const.dart 6.6 KB

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