租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
539 B

3 months ago
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.encodeString = void 0;
  7. const toString_1 = __importDefault(require("lodash/toString"));
  8. function encodeString(str) {
  9. const tempStr = toString_1.default(str);
  10. return encodeURIComponent(tempStr).replace(/[!'()*]/g, c => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
  11. }
  12. exports.encodeString = encodeString;