main
liudan 1 year ago
parent 29a2aa92d0
commit 6ae244338e
  1. 2
      package-lock.json
  2. 6
      pages.json
  3. 10
      pages/index/index.vue
  4. 23
      pages/webview/webview.vue

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "lxwx",
"version": "1.0.0",
"version": "4.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -109,6 +109,12 @@
{
"navigationStyle": "custom"
}
},{
"path" : "pages/webview/webview",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {

@ -77,7 +77,15 @@
methods: {
bannerHandle(index){
console.log(index)
window.location.href = this.bannerAdvList[index].advurl
// #ifdef APP-PLUS
console.log("ooo")
uni.navigateTo({
url:'/pages/webview/webview?item='+this.bannerAdvList[index].advurl
})
// #endif
// #ifdef H5
window.location.href = this.bannerAdvList[index].advurl;
// #endif
},
click(name) {
uni.navigateTo({

@ -0,0 +1,23 @@
<template>
<view>
<!-- 动态绑定需要跳转的网址 -->
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: ''
};
},
onLoad(item) {//
this.url = item.item
}
}
</script>
<style lang="scss">
</style>
Loading…
Cancel
Save