getPrice

计算价格

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/485233/1547690/getPrice.js

  1. const defaultRate = 7.1;
  2. const defaultShippingCost = 85;
  3.  
  4. function getPrice(cost, weight) {
  5. let proRate = 0.25;
  6. if (cost <= 250 && cost > 50) {
  7. proRate = 0.22;
  8. }
  9. const rate = getRate() * 0.944 * 0.99;
  10. const shippingCost = +getShippingCost();
  11. const price = ((cost + weight * shippingCost) / (1 - proRate)) / rate;
  12. return Math.ceil(price);
  13. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址