Week navigator.push jumps to display the contents of the js file

write a page jump in week navigator.push. The demo, jump in the past is the corresponding js displayed.

jump(){
      console.log(213)
      this.baseURL = "http:/dist/components/detail.js"
      var params = {
          "url":  this.baseURL,
          "animated" : "true",
      }
      navigator.push(params,function(){
      });
  }
  

clipboard.png

clipboard.png
is there any god who can explain why

Jun.05,2021

there is something wrong with your baseUrl. Here is what we do for your reference:

Public methods in

common.js:
exports.bundleUrl = function (self) {

var bundleUrl = self.$getConfig().bundleUrl;
return bundleUrl;

};
/ / judging the system, Android returns' android',ios returns' iOS',h5 returns' web'
exports.androidOrIos = function (self) {

return self.$getConfig().env.platform;

};
/ / get the url address
exports.getBaseUrl = function (self) {

var androidOrIos = this.androidOrIos(self);
var bundleUrl = this.bundleUrl(self);
var isHttp = bundleUrl.indexOf('http://') >= 0;
var nativeBase;
if (isHttp) {
    var i = bundleUrl.indexOf('/dist/');
    nativeBase = bundleUrl.slice(0, i) + '/dist/';
} else {
    if (androidOrIos == 'android') {
        nativeBase = 'file://assets/dist/';
    } else if (androidOrIos == 'iOS') {
        nativeBase = bundleUrl.substring(0, bundleUrl.lastIndexOf('dist/') + 5);
    } else {
        var host = 'localhost:12580';
        var matches = /\/\/([^\/]+?)\//.exec(bundleUrl);
        if (matches && matches.length >= 2) {
            host = matches[1];
        }
        nativeBase = 'http://' + host + '/example/build/';
    }
}

var h5Base = './index.html?page=./example/build/';

// in Native
var base = nativeBase;
if (typeof window === 'object') {
    base = h5Base;
}
return base;

};
/ / Jump to the specified url page
/ *
* url request address. The prefix has been added. Pass values for baseUrl, such as: 'login/login';
* param is required parameter, pass values such as:' name1=value1&name2=value2'
* callback'is callback function, pass values such as: function () {};
* /
exports.jump = function (self, url, param, callback) {

var navigator = weex.requireModule('navigator');
var baseUrl = this.getBaseUrl(self);
var param = param ? param : '';
var url = {'url': baseUrl + url + '.js?' + param, 'animated': 'true'};
navigator.push(url, function (e) {
    if (callback) {
        typeof callback == 'function' && callback(res);
    }
});

}

call on the page:
import common from'. / common/common';
export default {

methods: {
    toTest() {
        common.jump(this, 'test/test');
    }
}

}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45563-44b34.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45563-44b34.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?