jump.js
729 Bytes
import wx from '../utils/wx';
import {stringify} from '../vendors/query-stringify.js';
export default {
navigateTo(path, qs) {
return wx.navigateTo({
url: `${path}?${stringify(qs)}`,
});
},
redirectTo(path, qs) {
return wx.redirectTo({
url: `${path}?${stringify(qs)}`,
});
},
switchTab(path) {
return wx.switchTab({
url: path,
});
},
navigateToMiniProgram(appId,path,qs) {
return wx.navigateToMiniProgram({
appId,
path: `${path}?${stringify(qs)}`,
// extraData: {
// foo: 'bar'
// },
// envVersion: 'develop',
success(res) {
// 打开成功
}
});
}
};