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. [python2]local variable referenced before assignment問題2. Python2中code.co_kwonlyargcount的等效寫法3. python中怎么對列表以區間進行統計?4. javascript - 我的站點貌似被別人克隆了, google 搜索特定文章,除了域名不一樣,其他的都一樣,如何解決?5. mysql - 請問數據庫字段為年月日,傳進的參數為月,怎么查詢那個月所對應的數據6. python - 如何判斷字符串為企業注冊名稱7. javascript - vue+iview upload傳參失敗 跨域問題后臺已經解決 仍然報403,這是怎么回事啊?8. php - 微信開發驗證服務器有效性9. html - 移動端radio無法選中10. 求救一下,用新版的phpstudy,數據庫過段時間會消失是什么情況?
