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Q,CAAC,EAAO,KAC1B,IAAI,OAAQ,EAAO,EAAI,EAG3B,IAAI,UAAU,UAAY,UAC1B,IAAI,UAAU,gBAAkB,gBAEhC,IAAI,UAAU,gBAAkB,gBAChC,IAAI,UAAU,UAAY,UAC1B,IAAI,UAAU,eAAiB,eAC/B,IAAI,UAAU,gBAAkB,gBAChC,IAAI,UAAU,YAAc,YAC5B,IAAI,UAAU,eAAiB,eAC/B,IAAI,UAAU,iBAAmB,iBAEjC,IAAI,UAAU,WAAa,WAC3B,IAAI,UAAU,sBAAwB,sBACtC,IAAI,UAAU,KAAO,IACrB,IAAI,UAAU,KAAO,IACrB,IAAI,UAAU,MAAQ,KACtB,IAAI,UAAU,OAAS,MACvB,IAAI,UAAU,MAAQ,KAEtB,IAAI,UAAU,sBAAwB,IACtC,MAAM,YACF,GACA,IAAI,oBACR,IAAI,UAAU,cAAgB,IAAI,UAAU,uBAAyB,EACrE,IAAI,UAAU,WAAa,UAAU,QAGrC,IAAI,UAAU,kBAAoB,KAC9B,IAAI,qBAAqB,CAAC,EAAC,EAG/B,IAAI,UAAU,YAAc,CAAC,EAAM,EAAS,wBACjC,OAAO,GAAM,OAAO,GAG/B,MAAM,EAAO,IAAI,QAAQ,CACrB,OAAQ,YACR,SAAU,QAAQ,SAAR,EAAkB,EAAM,SAAU,KAIhD,MAAO,CACH,QACA,OACA,YAER,QAEO,SAAS,aAAa,GACrB,aAAiB,SAAQ,EAAQ,EAAM,MAC3C,IAAI,sBAAsB,CACtB,MAAO,SAAS,GAAG,WAAa,IAAM,GAE9C","file":"/npm/fellw-uni@1.1.34/main.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/fellw-uni@1.1.34/main.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import Vue from 'vue'\r\nimport store from 'fellw-uni/store'\r\nimport App from 'fellw-uni/App'\r\nimport moment from 'moment'\r\n\r\nexport function getApp() {\r\n    return Vue.prototype.app\r\n}\r\n\r\nexport function setApp(app) {\r\n    Vue.prototype.app = app\r\n}\r\n\r\nimport {\r\n    genRandomString,\r\n    log,\r\n    info,\r\n    error,\r\n    warn,\r\n    messageTip,\r\n    productPreviewPicture,\r\n    arrayGroup,\r\n    navToDetailPage,\r\n    navToList,\r\n    navToOrderList,\r\n    navToPaySuccess,\r\n    navToNotice,\r\n    navToOrderInfo,\r\n    navToOrderCreate,\r\n    PAGE_PATH,\r\n    ORDER_PAGE_PATH,\r\n    messageTipFail,\r\n    messageTipOk\r\n} from 'fellw-uni/js/request.js'\r\nimport VueI18n from 'vue-i18n'\r\nimport messages from 'fellw-uni/commom/lang'\r\nimport {\r\n    getLocale,\r\n    switchLocale\r\n} from 'fellw-uni/js/locale.js'\r\n\r\nimport AddToCart from 'fellw-uni/js/addToCart.js'\r\nimport sliderSwitch from \"fellw-uni/components/sliderSwitch.vue\"\r\nimport navMenu from 'fellw-uni/components/navMenu.vue'\r\n\r\nexport function switchLocaleLang() {\r\n    const lang = switchLocale()\r\n    getApp().$i18n.locale = lang\r\n    location.reload()\r\n}\r\n\r\nexport function runApp(lang) {\r\n    Vue.use(VueI18n)\r\n\r\n    Vue.mixin({\r\n        onPageScroll(e) {\r\n            uni.$emit('pageScroll', e)\r\n        }\r\n    })\r\n\r\n    Vue.component('sliderSwitch', sliderSwitch)\r\n    Vue.component('navMenu', navMenu)\r\n\r\n    /**\r\n     *  因工具函数属于公司资产, 所以直接在Vue实例挂载几个常用的函数\r\n     *  所有测试用数据均存放于根目录json.js\r\n     *\r\n     *  css部分使用了App.vue下的全局样式和iconfont图标，有需要图标库的可以留言。\r\n     *  示例使用了uni.scss下的变量, 除变量外已尽量移除特有语法,可直接替换为其他预处理器使用\r\n     */\r\n    const msg = (title, duration = 1500, mask = false, icon = 'none') => {\r\n        //统一提示方便全局修改\r\n        if (Boolean(title) === false) {\r\n            return;\r\n        }\r\n        uni.showToast({\r\n            title,\r\n            duration,\r\n            mask,\r\n            icon\r\n        });\r\n    }\r\n\r\n    const prePage = () => {\r\n        let pages = getCurrentPages();\r\n        let prePage = pages[pages.length - 2];\r\n        // #ifdef H5\r\n        return prePage;\r\n        // #endif\r\n        return prePage.$vm;\r\n    }\r\n\r\n\r\n    Vue.config.productionTip = false\r\n    Vue.prototype.$fire = new Vue()\r\n    Vue.prototype.$api = {\r\n        msg,\r\n        prePage\r\n    };\r\n    Vue.prototype.$genRandomString = genRandomString\r\n    Vue.prototype.message = messageTip\r\n    Vue.prototype.messageFail = messageTipFail\r\n    Vue.prototype.messageOk = messageTipOk\r\n\r\n    Vue.prototype.messageOk = messageTipOk\r\n\r\n    Vue.prototype.$info = (title, data) => {\r\n        log('log', title, data)\r\n    }\r\n    Vue.prototype.$error = (title, data) => {\r\n        log('error', title, data)\r\n    }\r\n    Vue.prototype.$warn = (title, data) => {\r\n        log('warn', title, data)\r\n    }\r\n\r\n    Vue.prototype.PAGE_PATH = PAGE_PATH\r\n    Vue.prototype.ORDER_PAGE_PATH = ORDER_PAGE_PATH\r\n\r\n    Vue.prototype.navToDetailPage = navToDetailPage\r\n    Vue.prototype.navToList = navToList\r\n    Vue.prototype.navToOrderList = navToOrderList\r\n    Vue.prototype.navToPaySuccess = navToPaySuccess\r\n    Vue.prototype.navToNotice = navToNotice\r\n    Vue.prototype.navToOrderInfo = navToOrderInfo\r\n    Vue.prototype.navToOrderCreate = navToOrderCreate\r\n\r\n    Vue.prototype.arrayGroup = arrayGroup\r\n    Vue.prototype.productPreviewPicture = productPreviewPicture\r\n    Vue.prototype.$log = log\r\n    Vue.prototype.$log = log\r\n    Vue.prototype.$info = info\r\n    Vue.prototype.$error = error\r\n    Vue.prototype.$warn = warn\r\n\r\n    Vue.prototype.mobileDevicesMaxWidth = 720\r\n    const {\r\n        windowWidth\r\n    } = uni.getSystemInfoSync()\r\n    Vue.prototype.mobileDevices = Vue.prototype.mobileDevicesMaxWidth >= windowWidth\r\n    Vue.prototype.$addToCart = AddToCart.install\r\n\r\n\r\n    Vue.prototype.onPullDownRefresh = () => {\r\n        uni.startPullDownRefresh({})\r\n    }\r\n\r\n    Vue.prototype.$dateFormat = (date, format = 'YYYY-MM-DD HH:mm:ss') => {\r\n        return moment(date).format(format)\r\n    }\r\n\r\n    const i18n = new VueI18n({\r\n        locale: getLocale(), // 默认选择的语言\r\n        messages: require('extend')(true, messages, lang)\r\n    })\r\n\r\n\r\n    return {\r\n        App,\r\n        i18n,\r\n        store\r\n    }\r\n}\r\n\r\nexport function setPageTitle(title) {\r\n    if (title instanceof Object) title = title.name\r\n    uni.setNavigationBarTitle({\r\n        title: getApp().$t('appName') + `-` + title\r\n    })\r\n}\r\n"]}