项目需要实现点击按钮跳转到网页 我使用web-view跳转报以下问题
这是我项目的部分代码
<button @click="guGjybpt" class="gjybA">
<img class="gjpng" src="../../static/gjybpt.jpg" alt="">
</button>
guGjybpt(){
let url = encodeURIComponent(this.gjybptUrl)
uni.navigateTo({
url: '/pages/gjybpt/gjybpt?url='+url,
fail: err => {
console.log(err)
}
})
},
web-view页面
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
data(){
return {
url: '',
}
},
onLoad(res) {
// console.log(res.url)
this.url = decodeURIComponent(res.url)
// console.log(this.url)
// this.url = res.url
console.log(res, this.url)
},
....jquery 跟你跳不跳外链没关系吧。你用的是uni-app组件 ,不管你打包app还是小程序,也不关jquery的事啊,你看看全文哪里 index是不是有给人script了个jquery
报错为引用的jquery-1.12.3.min.js的路径可能有问题
你的jquery引用地址错误,建议替换为官网的地址,https或http的标头根据自己项目来定,有帮助点个右上角采纳,谢谢
https://code.jquery.com/jquery-1.12.3.min.js
我在这个项目里边也没引入jQuery呀
这个是在哪儿引入了jquery,但是assets文件夹里面没有