bmfe / eros Goto Github PK
View Code? Open in Web Editor NEW📱 一套 Vue 代码,两端原生应用 ,或许可以叫我 weex-native。
Home Page: https://bmfe.github.io/eros-docs
License: MIT License
📱 一套 Vue 代码,两端原生应用 ,或许可以叫我 weex-native。
Home Page: https://bmfe.github.io/eros-docs
License: MIT License
eros 封装的promise里面可以获取到数值但是无法给this赋值回报错,只有在promise里这样,
<template lang="html">
<div>
{{card}}
</div>
</template>
<script>
export default {
data() {
return {
card: {}
}
},
created() {
this.$storage.get('contentPage').then(resData => {
this.card = resData;
console.log(resData)
})
this.$router.getParams().then(resData => {
this.card = resData.card;
})
}
}
会报下面的错
jsLog: TypeError: null is not an object (evaluating 'e.parentNode.setAttr')
js/components
目录下的组件没有配置文件,使用的时候有点不方便,是否可以添加一些配置文件以方便使用。比如,目前要使用里面的
TabBar
组件得这样使用:
import Home from 'Components/tabs/bar.vue'
如果添加上
package.json
和index.js
配置文件的话,那么可以这样使用:
import { TabBar } from 'Components'
加上这些配置文件后,也可以作为以后添加组件的模版,方便新手学习。
关闭拦截器调用本地的资源路径的gif图片,gif不会动。
打开拦截器调用调试服务器上的gif是可以动的。
代码如下:
<image class="messageEgg" src="bmlocal://assets/index/[email protected]" @click="annualBegin"></image>
例子:
- 开发平台:mac
- node 版本:v7.2.0
- npm 版本:5.6.0
- 调试类型:模拟器/真机都是
- 调试系统版本: ios 全版本 (android 没看)
- 开发工具及其版本 xcode 9
例: gif的原理是图片叠加, ios中单单用imageWithContentsOfFile 应该只会读出gif的第一张
-->WXImgLoaderDefaultImpl
NSString *imgPath = [NSString stringWithFormat:@"%@/%@%@",K_JS_PAGES_PATH,imgUrl.host,imgUrl.path];
UIImage *img = [UIImage imageWithContentsOfFile:imgPath];
NSError *error = nil;
....
建议针对.gif后缀的图片进行特殊处理。
例:百分百复现,调用即复现。
IOS 11.2.2 未检测到微信
如题
mac安装教程初始化项目导入xcode报错
RLM_EXTENSIBLE_STRING_ENUM_CASE_SWIFT_NAME(RLMRealmRefreshRequiredNotification, RefreshRequired);
‘swift_name’ attribute cannot be appiled to this declaration
xcode编译demo时,提示-fobic-weak is not supported on the current deploment target
Error:Cause: org/apache/commons/lang/StringUtils
Gradle 'WeexFrameworkWrapper' project refresh failed
例子:
- 开发平台:windows7
- node 版本:6.11.4
- npm 版本:5.6.0
- 调试类型:模拟器/真机
- 调试系统版本:
- 开发工具及其版本 as 2.3.3
按照步骤新建项目后然后eros install完成
重as打开后发现该问题。
我提了一个ios 读取本地html资源的pr,希望贵团队可以加上android 一起新增此功能,非常非常感谢!
refresh下拉刷新的时候,再上滑动,会卡死了不动了
安卓端bmchart组件改动高度没变化,宽度是可以修改的。
例子:
- 开发平台:darwin/windows/linux
- node 版本:6.10.2
- npm 版本:5.4.2
- 调试类型:模拟器/真机
- 调试系统版本: Android 7.1.2
- 开发工具及其版本 Android Studio 3.0.1
应该是系统兼容问题吧,IOS没试过。
百分百复现,调用即复现。
在小米app商城提交的时候被拒,原因是在如下机型中启动后进行 Monkey 点击测试时崩溃。
安卓,红米3S,MIUI9(V9.2.1.0.MALCNEK)稳定版。
报错流,从上至下:
java.lang.Thread.run(Thread.java:818)
SplashActivity.java:38
VersionManager.prepareJsBundle(VersionManager.java:54)
VersionManager.initMediator(VersionManager.java:70)
MediatorDocker.active(MediatorDocker.java:64)
MediatorDocker.destoryInstance(MediatorDocker.java:73)
MediatorInstance.destory(MediatorInstance.java:24)
com.taobao.weex.WXSDKInstance.destroy(WXSDKInstance.java:1229)
com.taobao.weex.WXSDKManager.destroyInstance(WXSDKManager.java:293)
com.taobao.weex.common.WXRuntimeException: [WXSDKManager] destroyInstance error
this.$image.camera,设置allowCrop为true,拍照后不出现裁剪页面。
例子:
- 开发平台:mac os
- node 版本:8.x.x
- npm 版本:5.x.x
- 调试类型:真机
- 调试系统版本: android 7
- 开发工具及其版本 as
百分百复现,调用即复现。
答:
使用list 做更多加载,loadmore 事件无法执行,@loadmore="loadmore" 事件无法触发
},
loadmore(){
this.$notice.loading.show("加载中..")
this.showLoading = 'show';
this.queryItems({
min_date:this.min_time
},resData =>{
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push.apply(this.items,resData.items)
if(CommonUtils.dateDiff(this.min_time,resData.min_time)){
this.min_time = resData.min_time;
}
},error => {
this.$notice.loading.hide()
this.showLoading = 'hide'
})
},
onloading() {
},
loadingDown() {
this.queryItems({},resData =>{
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push(resData.items);
},error => {
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push(resData.items);
})
},
queryItems(options,success,reject){
this.$fetch({
method: 'POST',
name: 'cms.member.favorite.list',
data: options
}).then(resData => {
success(resData);
}, error => {
reject(error);
})
},
queryInitItems() {
this.$fetch({
method: 'POST',
name: 'cms.member.favorite.list',
data: {}
}).then(resData => {
this.items = resData.items;
if(CommonUtils.dateDiff(this.min_time,resData.min_time)){
this.min_time = resData.min_time;
}
this.isShow = true;
if(this.items.length>0){
this.hasItems = true;
}
}, error => {
})
},
wxcResultButtonClicked(){
this.queryItems();
},
onchange(index) {
// console.log(index);
// dom.scrollToElement(this.$refs[`page_${index}`][0], { animated: false })
},
}
}
</script>
问题一:this.$image.upload,参数有问题,查看源码,source应该改成images ,status应该为0.
问题2:上传图片后返回json数组,应该返回对象.
问题3:友盟组件及分享使用说明;
问题4:集成支付宝更好.
图片预览组件功能优化:
1、头部期望有个返回按钮
2、图片加载的时候,期望有个loading
页面上用到标签相关的版块,加载后页面会滚动到web标签位置(比如bmchart)
估计是web标签加载外部网页时,获取焦点后,滚动到web标签位置。
安卓 使用list 做更多加载,loadmore 事件无法执行,@loadmore="loadmore" 事件无法触发
},
loadmore(){
this.$notice.loading.show("加载中..")
this.showLoading = 'show';
this.queryItems({
min_date:this.min_time
},resData =>{
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push.apply(this.items,resData.items)
if(CommonUtils.dateDiff(this.min_time,resData.min_time)){
this.min_time = resData.min_time;
}
},error => {
this.$notice.loading.hide()
this.showLoading = 'hide'
})
},
onloading() {
},
loadingDown() {
this.queryItems({},resData =>{
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push(resData.items);
},error => {
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push(resData.items);
})
},
queryItems(options,success,reject){
this.$fetch({
method: 'POST',
name: 'cms.member.favorite.list',
data: options
}).then(resData => {
success(resData);
}, error => {
reject(error);
})
},
queryInitItems() {
this.$fetch({
method: 'POST',
name: 'cms.member.favorite.list',
data: {}
}).then(resData => {
this.items = resData.items;
if(CommonUtils.dateDiff(this.min_time,resData.min_time)){
this.min_time = resData.min_time;
}
this.isShow = true;
if(this.items.length>0){
this.hasItems = true;
}
}, error => {
})
},
wxcResultButtonClicked(){
this.queryItems();
},
onchange(index) {
// console.log(index);
// dom.scrollToElement(this.$refs[`page_${index}`][0], { animated: false })
},
}
}
</script>
1.Windows下安装环境报错,有时候需要eros团队配合才能搭建好环境
2.UI组件,少部分人没接触bui-weex以及weex-ui导致eros团队封装进去的组件看不懂,建议使用的人可以自己封装组件以及一起丰富组件库的内
3.前端代码以及安卓底层的代码中注解较少,不便于理解框架内部机制
4.APP更新机制需要改进
5.打包过后的apk文件比较大,可以出一个文档来告知如何缩小安装包的大小...
6.调试文件中的刷新按钮能不能独立出来,减少调试时间,便于更快速的开发
7.文档说明不够详细,有许多小知识点文档中没有介绍,需麻烦eros团队里面的人才能做到。
8.封装进来的bui-weex,weex-ui以及weex-amap等最好给个地址便于新手查询
9.有空可以拓展一下获得手机信息等参数,如电池量,IMEI码等,参照nat.js
10.可以考虑集成一波sqllite
1.使用前需了解VUE,ES6以及WEEX的开发机制,经常看到有人问vue语法问题以及官方文档里面的内容,加大了工作量
2.了解WEEX封装好的demo以及可以使用的组件,eros是基于weex的二次封装,所以最好对WEEX有了一定的熟悉程度之后再来用框架做APP。
list组件下滑加载,loadmore 方法 不执行,下面是相关代码部分
例:$axios ios端请求目前只返回了data对于用户体验很不好,不好判断请求是否成功。
- 调试系统版本: ios 8
- 开发工具及其版本 xcode 9
例:在获取设备的高宽度时,deviceHeight,deviceWidth,发现ios下通过weex.config.eros能获取到,但是安卓下找不到,weex.config.env可以获取到
例子:
- 开发平台:darwin/windows/linux
- node 版本:8.x.x
- npm 版本:5.x.x
- 调试类型:模拟器/真机
- 调试系统版本: ios 8
- 开发工具及其版本 xcode 9
例:bmImage module 中不支持传递参数的类型,导致的崩溃。
例:百分百复现,调用即复现。
答:
scroller 不执行start和end事件
- 开发平台:windows
- node 版本:8.9.0
- npm 版本:5.5.1
- 调试类型:模拟器/真机
- 调试系统版本: android 5
- 开发工具及其版本 xcode 9
使用weex官方的例子 在playground中可以使用。在eros中新建頁面 内容相同 无法调起scrollstart和end事件
weex例子:http://dotwe.org/vue/8711a2004bc7f55c83f0ff741f216a39
无论使用get还是post请求方式向php服务器请求数据,都可以拿到状态码200,php服务器也能收到请求,但是这边返回的resData里data一直是空的,直接在浏览器访问那个接口或者使用jquery的ajax都可以正常的取到数据,查看xcode的控制台发现请求的时候有一行错误
WeexEros[1799:136141] <Weex>[error]BMBaseRequest.m:49, BMCommonRequest Request_URL>>>>>>>>>>>>>>>>:<NSMutableURLRequest: 0x60c00001f120> { URL: http://192.168.1.78/index/driver/login }
同时我用get方法访问自己的一个node服务器的接口,就可以正常取到数据,也没有上面那条错误,不太懂php,请问是PHP服务器那边的问题吗,一般这种情况是什么引起的,小白求教了,感谢!!
百分百复现,调用即复现。
例子:
- 开发平台:darwin/windows/linux
- node 版本:8.x.x
- npm 版本:5.x.x
- 调试类型:模拟器/真机
- 调试系统版本: 安卓
安卓版本切换横屏会闪退,eros的demo也有这个问题
使用list 做更多加载,loadmore 事件无法执行,@loadmore="loadmore" 事件无法触发
#
# <cell class="cell" v-for="item in items">
# <div class="goods" v-if="item.object_type=='goods'" >
# <div class="title flex-row">
<div class="line" ></div>
<div class="point"></div>
<text class="text-title full-rest">{{item.create_date}}</text>
</div>
<div class="content flex-row">
<div class="line"></div>
<div class="full-rest">
# <ydh-goods viewStyle="list"
#:title="item.obj.title"
#:price="item.obj.price"
#:numIid="item.obj.num_iid"
#:couponMoney="item.obj.coupon_money"
#:couponStartTime="item.obj.coupon_start_time"
#:couponEndTime="item.obj.coupon_end_time"
#:couponStatus="item.obj.coupon_status"
# :picUrl="item.obj.pic_url"
# :comment="item.obj.comment"
# :volume="item.obj.volume"
# :buyPrice="item.obj.buy_price"
# v-if="initShow" :customSet="local.config.skin.common"
# />
# </div>
# </div>
# </div>
#</cell>
# <loading class="loading" @loading="onloading" :display="showLoading">
<loading-indicator>
<text class="indicator">加载中...</text>
</loading-indicator>
</loading>
</list>
<wxc-loading :show="!isShow" type="trip"></wxc-loading>
</div>
},
loadmore(){
this.$notice.loading.show("加载中..")
this.showLoading = 'show';
this.queryItems({
min_date:this.min_time
},resData =>{
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push.apply(this.items,resData.items)
if(CommonUtils.dateDiff(this.min_time,resData.min_time)){
this.min_time = resData.min_time;
}
},error => {
this.$notice.loading.hide()
this.showLoading = 'hide'
})
},
onloading() {
},
loadingDown() {
this.queryItems({},resData =>{
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push(resData.items);
},error => {
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push(resData.items);
})
},
queryItems(options,success,reject){
this.$fetch({
method: 'POST',
name: 'cms.member.favorite.list',
data: options
}).then(resData => {
success(resData);
}, error => {
reject(error);
})
},
queryInitItems() {
this.$fetch({
method: 'POST',
name: 'cms.member.favorite.list',
data: {}
}).then(resData => {
this.items = resData.items;
if(CommonUtils.dateDiff(this.min_time,resData.min_time)){
this.min_time = resData.min_time;
}
this.isShow = true;
if(this.items.length>0){
this.hasItems = true;
}
}, error => {
})
},
wxcResultButtonClicked(){
this.queryItems();
},
onchange(index) {
// console.log(index);
// dom.scrollToElement(this.$refs[`page_${index}`][0], { animated: false })
},
}
}
</script>
wx_network_error msg->Unable to resolve host 'app.weex-eros.com':No address associated with hostname
例子:
- 开发平台:darwin/windows/linux
- node 版本:8.x.x
- npm 版本:5.x.x
- 调试类型:模拟器/真机
- 调试系统版本: ios 8
- 开发工具及其版本 xcode 9
例:bmImage module 中不支持传递参数的类型,导致的崩溃。
例:百分百复现,调用即复现。
mac安装教程初始化项目导入xcode报错
RLM_EXTENSIBLE_STRING_ENUM_CASE_SWIFT_NAME(RLMRealmRefreshRequiredNotification, RefreshRequired);
‘swift_name’ attribute cannot be appiled to this declaration
例:图片上传导致系统崩溃。
例子:
- 开发平台:windows
- node 版本:8.9.1
- npm 版本:5.5.1
- 调试类型:真机
- 调试系统版本: android 24
- 开发工具及其版本 studio3.0
例:个推点击通知栏没有进ResultActivity,我用BroadcastReceiver测了一下,可以进入
例:百分百复现,调用即复现。
答:
初始化完新项目后用as导入项目后出现错误
Error:Execution failed for task ':bmwidget:processDebugAndroidTestResources'.
No slave process to process jobs, aborting
- 开发平台:windows
- node 版本:8.9.0
- npm 版本:5.5.1
- 调试类型:模拟器
- 调试系统版本: android 5.0
- 开发工具及其版本 android studio 3.0.1
百分百复现,调用即复现。
希望扩展一个滑动组件。
效果类似于微信、QQ等应用单行对用户右滑后能对单行有相关操作。
谢谢
新建项目安装时覆盖之前的项目
例子:
- 开发平台:Windows
- node 版本:8.0
- npm 版本:5.3.0
- 调试类型:模拟器
- 调试系统版本: Android 4.0
- 开发工具及其版本 vs code
例:新建项目后安装时会覆盖之前安装的项目,改了applicationid以及category两个仍然报错,百度搜索一波发现是 android:authorities="downloads.${APP_ID}" 这一句的问题,${APP_ID}删除后改成就正常安装
例:百分百
mac安装教程初始化项目导入xcode报错
RLM_EXTENSIBLE_STRING_ENUM_CASE_SWIFT_NAME(RLMRealmRefreshRequiredNotification, RefreshRequired);
‘swift_name’ attribute cannot be appiled to this declaration
有没有办法css,js,html分成三个文件?
ios没有根据content-type对数据进行处理,一直是json格式,手动更改BMBaseRequest.m代码后,eros install就会被还原。还希望从根本解决一下
百分百复现,调用即复现。
mac安装教程初始化项目导入xcode报错
RLM_EXTENSIBLE_STRING_ENUM_CASE_SWIFT_NAME(RLMRealmRefreshRequiredNotification, RefreshRequired);
‘swift_name’ attribute cannot be appiled to this declaration
使用list 做更多加载,loadmore 事件无法执行,@loadmore="loadmore" 事件无法触发
},
loadmore(){
this.$notice.loading.show("加载中..")
this.showLoading = 'show';
this.queryItems({
min_date:this.min_time
},resData =>{
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push.apply(this.items,resData.items)
if(CommonUtils.dateDiff(this.min_time,resData.min_time)){
this.min_time = resData.min_time;
}
},error => {
this.$notice.loading.hide()
this.showLoading = 'hide'
})
},
onloading() {
},
loadingDown() {
this.queryItems({},resData =>{
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push(resData.items);
},error => {
this.$notice.loading.hide()
this.showLoading = 'hide'
this.items.push(resData.items);
})
},
queryItems(options,success,reject){
this.$fetch({
method: 'POST',
name: 'cms.member.favorite.list',
data: options
}).then(resData => {
success(resData);
}, error => {
reject(error);
})
},
queryInitItems() {
this.$fetch({
method: 'POST',
name: 'cms.member.favorite.list',
data: {}
}).then(resData => {
this.items = resData.items;
if(CommonUtils.dateDiff(this.min_time,resData.min_time)){
this.min_time = resData.min_time;
}
this.isShow = true;
if(this.items.length>0){
this.hasItems = true;
}
}, error => {
})
},
wxcResultButtonClicked(){
this.queryItems();
},
onchange(index) {
// console.log(index);
// dom.scrollToElement(this.$refs[`page_${index}`][0], { animated: false })
},
}
}
</script>
- app 顶部背景色是黑色,文字是白色
- this.$navigator.setNavigationInfo。。。(略)。。。 statusBarStyle: 'LightContent' 。。。
- 调用 this.$image.upload
- 接下来选拍照不会引发这个bug
- 选择从相册拾取图片并取消,不会出现bug,如果点确定选择并预览图片,会立即出现这个bug
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.