const.dart 6.7 KB

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