Skip to content

Instantly share code, notes, and snippets.

View weikx's full-sized avatar
❤️
Peace.

Weikx weikx

❤️
Peace.
  • ByteDance
  • Shanghai, China
  • 01:35 (UTC +08:00)
View GitHub Profile
// 特殊情况用的特殊处理代码
const url = 'http://m.xianmaiyangsheng.com/invitation?otherId=761173&time&otherCode'
String.prototype.replaceAll = function(s1, s2) {
return this.replace(new RegExp(s1, 'gm'), s2)
}
function getUrlPatam(url, name) {
// 获取地址栏参数
url = decodeURIComponent(url).split('?')[1].replaceAll('&', '_and_').split('_and_').map(item => item.split('='))
url = url.filter(item => item[0] === name).flat()
@weikx
weikx / .js
Created April 28, 2020 01:45
解决Ios input输入后页面错乱无法点击
// 加入到App.vue
document.body.addEventListener('focusout', () => {
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })
}
@weikx
weikx / 📊 Weekly development breakdown
Last active October 29, 2020 00:28
📊 Weekly development breakdown
WXML 12 hrs 29 mins █████████▌░░░░░░░░░░░ 45.5%
JavaScript 9 hrs 25 mins ███████▏░░░░░░░░░░░░░ 34.3%
WXSS 4 hrs 14 mins ███▏░░░░░░░░░░░░░░░░░ 15.4%
JSON 1 hr 13 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.5%
Git Config 4 mins ░░░░░░░░░░░░░░░░░░░░░ 0.3%