android - weex navigator跳轉(zhuǎn)其它js
問題描述
weex打開本地js后,想跳轉(zhuǎn)到本地的另一js文件,但使用navigator后跳轉(zhuǎn)空頁面
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 前可否有個加載菊花,加載完在新開頁面
相關(guān)文章:
1. 在mybatis使用mysql的ON DUPLICATE KEY UPDATE語法實(shí)現(xiàn)存在即更新應(yīng)該使用哪個標(biāo)簽?2. mysql - 數(shù)據(jù)庫建字段,默認(rèn)值空和empty string有什么區(qū)別 1103. mysql - 這種分級一對多,且分級不平衡的模型該怎么設(shè)計表?4. Navicat for mysql 中以json格式儲存的數(shù)據(jù)存在大量反斜杠,如何去除?5. mac OSX10.12.4 (16E195)下Mysql 5.7.18找不到配置文件my.cnf6. java - 數(shù)據(jù)庫查詢多表7. 新人求教MySQL關(guān)于判斷后拼接條件進(jìn)行查詢的sql語句8. mysql - 千萬數(shù)據(jù) 分頁,當(dāng)偏移量 原來越大時,怎么優(yōu)化速度9. MySQL FOREIGN KEY 約束報錯10. mysql - 數(shù)據(jù)庫表中,兩個表互為外鍵參考如何解決
