"use strict"; const common_vendor = require("../common/vendor.js"); let goPage = (url, params = {}, type = "navigateTo") => { common_vendor.index.$u.route({ url, params, type }); }; let detectOrient = (dome) => { var width = document.documentElement.clientWidth, height = document.documentElement.clientHeight, $wrapper = document.querySelector(dome), style = ""; if (width >= height) { style += "width:" + width + "px;"; style += "height:" + height + "px;"; style += "-webkit-transform: rotate(0); transform: rotate(0);"; style += "-webkit-transform-origin: 0 0;"; style += "transform-origin: 0 0;"; console.log(1); } else { style += "width:" + height + "px;"; style += "height:" + width + "px;"; style += "-webkit-transform: rotate(90deg); transform: rotate(90deg);"; style += "-webkit-transform-origin: " + width / 2 + "px " + width / 2 + "px;"; style += "transform-origin: " + width / 2 + "px " + width / 2 + "px;"; console.log(2); } $wrapper.style.cssText = style; }; let noDoFn = () => { common_vendor.index.$u.toast("正在开发中,敬请期待"); }; exports.detectOrient = detectOrient; exports.goPage = goPage; exports.noDoFn = noDoFn;