6***@qq.com
6***@qq.com
  • 发布:2022-02-11 15:26
  • 更新:2022-02-11 16:20
  • 阅读:274

打包成app后,其中一个页面通过底部导航无法跳转

分类:uni-app
<template>  
    <view class="u-page">  
        <u-list @scrolltolower="scrolltolower">  
            <u-list-item v-for="(item, index) in userList" :key="index">  
                <u-cell>  
                    <u-avatar slot="icon" shape="square" size="35" @click="toChat(index)"  
                        customStyle="margin: -3px 5px -3px 0">{{item.userName}}--{{item.userCode}}</u-avatar>  
                </u-cell>  
            </u-list-item>  
        </u-list>  
    </view>  
</template>  

<script>  
    import {  
        getUserList  
    } from '@/common/http/api.js';  
    export default {  
        data() {  
            return {  
                userList: []  
            }  
        },  
        onLoad() {  
            this.getUserList()  
        },  
        methods: {  
            scrolltolower() {  
                this.getUserList()  
            },  
            async getUserList() {  
                const res = await getUserList()  
                //console.log(res)  

                for (let x in res) {  
                    this.userList.push(res[x])  
                }  
                //console.log(this.userList)  
            },  
            toChat(e){  
                //console.log(e)  
                //console.log(this.userList[e].userName)  
                let userCode = this.userList[e].userCode  
                const url = "/pages/chat/chat?userCode="+userCode  
                uni.navigateTo({  
                    url  
                })  
            }  
        },  

    }  
</script>  

<style>  

</style>  

浏览器和微信小程序能跳转,但是打包成app后好友页面就无法跳转

2022-02-11 15:26 负责人:无 分享
已邀请:
FullStack

FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866

跳转方法增加 fail 回调,看返回什么

该问题目前已经被锁定, 无法添加新回复