android - weex navigator跳轉其它js
問題描述
weex打開本地js后,想跳轉到本地的另一js文件,但使用navigator后跳轉空頁面
android開始加載js方法public class MainActivity extends AppCompatActivity implements IWXRenderListener {
WXSDKInstance mWXSDKInstance;RelativeLayout viewGroup;@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mWXSDKInstance = new WXSDKInstance(this); mWXSDKInstance.registerRenderListener(this); String aa [] = this.getAssets().getLocales(); mWXSDKInstance.render('test', WXFileUtils.loadAsset('foo.js',this), null, null, -1, -1, WXRenderStrategy.APPEND_ASYNC); //mWXSDKInstance.render(WXFileUtils.loadAsset('foo.js',this));}。。。。。。
}
wee中的vue代碼<script>
var navigator = weex.requireModule(’navigator’)var modal = weex.requireModule(’modal’)
export default {
data: { logoUrl: ’https://alibaba.github.io/weex/img/weex_logo_blue@3x.png’, target: ’World’},created: function(){ },methods: { update: function (e) { this.target = ’Weex’ }, jump: function (e){ navigator.open({ url: 'file://assets/sec.js', animated: 'true' }, function(){}, function(){}) }}
}</script>
引用dependencies {
compile fileTree(dir: ’libs’, include: [’*.jar’])androidTestCompile(’com.android.support.test.espresso:espresso-core:2.2.2’, { exclude group: ’com.android.support’, module: ’support-annotations’})compile ’com.android.support:appcompat-v7:24.2.1’testCompile ’junit:junit:4.12’compile ’com.android.support:recyclerview-v7:24.2.1’compile ’com.alibaba:fastjson:1.1.45’compile ’com.taobao.android:weex_sdk:0.9.5@aar’compile ’com.github.bumptech.glide:glide:3.7.0’
}
問題解答
回答1:這樣試試看
Loding 前可否有個加載菊花,加載完在新開頁面
相關文章:
1. 在應用配置文件 app.php 中找不到’route_check_cache’配置項2. html按鍵開關如何提交我想需要的值到數據庫3. gvim - 誰有vim里CSS的Indent文件, 能縮進@media里面的4. Android中能不能判斷一個數據庫是create來的,還是open來的?5. HTML 5輸入框只能輸入漢字、字母、數字、標點符號?正則如何寫?6. javascript - 請教如何獲取百度貼吧新增的兩個加密參數7. 跟著課件一模一樣的操作使用tp6,出現了錯誤8. PHP類屬性聲明?9. javascript - 求助canvas繪制馬賽克的問題,老是取色不準10. html - 微信瀏覽器h5<video>標簽問題
