Comments (5)
请贴出你的完整代码吧?含import在内的。
from cordova-plugin-x5-tbs.
项目采用Cordova + Vue模式,demo如下:
<template>
<div id="swiper">
<div><button @click="setCookies">set cookie</button></div>
<div><button @click="showCookies">show cookie</button></div>
<div><button @click="clearCookie">clear cookie</button></div>
</div>
</template>
<script>
import {cookie} from 'vux'
export default {
name: 'Swiper',
data: function () {
return {}
},
methods: {
setCookies () {
cookie.set('cookie', 'this is my cookie', {path: '/'})
},
showCookies () {
alert(cookie.get('cookie', {path: '/'}))
},
clearCookie () {
cookie.remove('cookie', {path: '/'})
}
}
}
</script>
<style lang="less" scoped>
#swiper {
height: 100%;
text-align: center;
&>div {padding-top: 50px;}
button {
display: block;
margin: 0 auto;
padding: 5px 10px;
border-radius: 4px;
background-color: burlywood;
}
}
</style>
from cordova-plugin-x5-tbs.
把这行的注释去掉看看
直接改你的cordova/platforms/android下面的文件
from cordova-plugin-x5-tbs.
解开注释后编译不通过,报错信息提示找不到符号,估计是SDK没有提供setAcceptFileSchemeCookies这个方法。
from cordova-plugin-x5-tbs.
那这样的话,应该是只有http / https能使用Cookie了,不让在本地使用Cookie。
from cordova-plugin-x5-tbs.
Related Issues (13)
- can't set cookieManager.setAcceptFileSchemeCookies HOT 1
- com.tencent.smtt.sdk.WebView
- 请问有demo代码吗?Ionic4安装了之后,检测到一直用的是系统的webview, HOT 4
- npm 那边是不是没有升级啊 HOT 1
- add error
- 是不是默认都会使用X5 HOT 1
- 惭愧,想问下怎么用,是不是不能直接继承CordovaActivity了 HOT 4
- 请问这个要在哪加?QbSdk.initX5Environment(this, null); HOT 2
- Now , there is an official x5 cordova plugin . HOT 6
- 个人觉得这个项目还是有意义的 HOT 7
- input type=file点确定后报错 HOT 2
- 是否支持cordova-android 7.0以上 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-x5-tbs.