账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    weex click事件在PC端正常,而通过扫描二维码在安卓手机上预览时事件却失效,什么原因?
    23
    0
    <template>
      <div class="index" id="page" bubble="true">
        <div class="btns" @click="change">
          <div class="button" id="btn1" :class="[Activebtn === 1? 'active' : '']">
            <text class="text">推荐</text>
          </div>
          <div class="button" id="btn2" :class="[Activebtn === 2? 'active' : '']" >
            <text class="text">热榜</text>
          </div>
        </div>
        <router-view></router-view>
      </div>
    </template>
    
    <script>
    import { mapState } from 'vuex'
    
    export default {
      name: 'App',
      data () {
        return {
          Activebtn: 1
        }
      },
      computed: mapState(['items']),
      methods: {
        change (e) {
          if (e.target.parentNode.id === 'btn1' && this.Activebtn === 2) {
            
            this.Activebtn = 1
            this.$router.push('/recommed')
          } else if (e.target.parentNode.id === 'btn2' && this.Activebtn === 1) {
            
            this.Activebtn = 2
            this.$router.push('/hot')
          }
        }
      },
      created () {
        const obj = {url: '/api/feeds', pageNumber: 1, pageSize: 10}
        this.$store.dispatch('update', obj)
      }
    }
    </script>
    
    <style scoped>
    .btns{
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      height: 87.5px;
    }
    .button{
      width: 375px;
      flex: auto;
      justify-content: center;
      background-color: white;
    }
    .text{
      flex: auto;
      text-align: center;
      font-size: 50px;
    }
    .index{
      background-color: rgb(240, 234, 234);
      height: 100%;
      display: flex;
      flex-direction: column;
    }
    .active{
      border-bottom-width: 5px;
      border-bottom-color: rgb(2, 191, 224);
    }
    </style>
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 墨守君何去° 普通会员 1楼

      点击事件在PC端和安卓手机上的效果可能不同,可能是由于以下原因:

      1. 设备兼容性问题:如果你在PC端使用的是旧版本的微信或者浏览器,可能无法在某些设备上正常显示二维码。而在安卓手机上,微信和其他浏览器都可以正常显示二维码。

      2. 二维码本身的问题:二维码本身可能有一些问题,导致在某些设备上无法正常显示。例如,二维码可能被覆盖或者加密,无法正确解析。

      3. 系统兼容性问题:在某些系统上,二维码可能无法正确解析。例如,微信可能不支持某些特定的二维码格式。

      4. 点击事件的实现方式:在PC端,点击事件通常使用JavaScript来实现,而在安卓手机上,可能使用的是其他语言或者技术来实现点击事件。

      解决这些问题的方法可能包括:

      1. 检查二维码本身是否正确,是否有被覆盖或者加密的问题。

      2. 检查微信和其他浏览器是否支持二维码。

      3. 检查系统兼容性,确保二维码可以被微信和其他浏览器正确解析。

      4. 使用其他语言或者技术来实现点击事件,例如使用Android的Input类或者jQuery的click事件。

      希望这些信息对你有所帮助。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部