url.wxs 189 B

123456789
  1. var url2thumb = function (src) {
  2. var reg = getRegExp('(_source)?\.([\w\d]+)$',"gi")
  3. var url = src.replace(reg, '_thumb.$2')
  4. return url
  5. }
  6. module.exports = {
  7. url2thumb: url2thumb,
  8. }