"use strict";const e=require("../vendor.js");function t(t){e.index.navigateTo({url:t,fail:()=>e.index.switchTab({url:t})})}exports.goto=t,exports.gotoEventToPage=function(i){"InnerPage"!==(null==i?void 0:i.redirect_type)?"H5"!==(null==i?void 0:i.redirect_type)?"AnotherMiniProgram"===(null==i?void 0:i.redirect_type)&&e.index.navigateToMiniProgram({appId:null==i?void 0:i.app_id,path:(null==i?void 0:i.redirect_path)||"",success(e){}}):e.index.navigateTo({url:`/pages/web_view/index?web_url=${encodeURIComponent(null==i?void 0:i.redirect_path)}`}):t(null==i?void 0:i.redirect_path)},exports.showToast=function(t){e.index.showToast({title:t||"提交成功！",duration:1e3,icon:"none"})},exports.showToastBack=function(t,i=1,n=!0){e.index.showToast({title:t||"提交成功！",duration:1e3,icon:"none",success(){n&&setTimeout((()=>{e.index.navigateBack({delta:i})}),1e3)}})};
