Blame view

app/static/js/public.js 804 Bytes
7820380e   “wangming”   1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  // 点击获取需要切换的语言
  let url = window.location.href
  $(document).on('click','.lan_change',function(){
      console.log('点击')
      $(this).attr("data-title")
      console.log($(this).attr("data-title"))
      console.log(window.location.href)
      let change = $(this).attr("data-title")
      // url = url.replace('')
      
      if(url.includes('English')){
          url = url.replace('English',change)
          window.location.href = url
      }else if(url.includes('Chinese')){
          url = url.replace('Chinese',change)
          window.location.href = url
      }else if(url.includes('Russian')){
          url = url.replace('Russian',change)
          window.location.href = url
      }else if(url.includes('Spain')){
          url = url.replace('Spain',change)
          window.location.href = url
      }
  })