Commit ade9539f by 梁建民

互跳地址

parent ddf275c7
Showing with 19 additions and 1 deletions
...@@ -87,6 +87,24 @@ ...@@ -87,6 +87,24 @@
showClass: state => state.download.showClass showClass: state => state.download.showClass
}) })
}, },
beforeCreate() {
if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
let url = "";
let paramsStr = '';
for (let k in this.$route.query) {
paramsStr += k + '=' + this.$route.query[k] + '&'
}
paramsStr = paramsStr.slice(0, -1);
switch (window.location.hostname) {
case "m.liexin.com":
window.location.href = (paramsStr ? ("http://www.liexin.com/v3/download?" + paramsStr) : ("http://www.liexin.com/v3/download"));
break;
default:
window.location.href = window.location.origin + (paramsStr ? ("/v3/download?" + paramsStr) : ("/v3/download"));
break;
}
}
},
created() { created() {
this.getData(); this.getData();
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es7.object.get-own-property-descriptors */ \"./node_modules/_core-js@2.6.11@core-js/modules/es7.object.get-own-property-descriptors.js\");\n/* harmony import */ var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom.iterable */ \"./node_modules/_core-js@2.6.11@core-js/modules/web.dom.iterable.js\");\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/_core-js@2.6.11@core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.object.keys */ \"./node_modules/_core-js@2.6.11@core-js/modules/es6.object.keys.js\");\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var E_h5_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/defineProperty */ \"./node_modules/_@babel_runtime@7.7.7@@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.11@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.1.2@vuex/dist/vuex.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.4.1@vant/es/index.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(E_h5_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_5__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_7__[\"Swipe\"]).use(vant__WEBPACK_IMPORTED_MODULE_7__[\"SwipeItem\"]).use(vant__WEBPACK_IMPORTED_MODULE_7__[\"Toast\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"news\",\n data: function data() {\n return {\n title: \"资料下载\",\n p: 1,\n active: 0,\n meaushow: true,\n bannerHeight: 200,\n navListfixed: false\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_6__[\"mapState\"])({\n getfileuploadbanner: function getfileuploadbanner(state) {\n return state.download.getfileuploadbanner;\n },\n articleShowData: function articleShowData(state) {\n return state.download.articleShowData.result;\n },\n loginCheck: function loginCheck(state) {\n return state.common.loginCheck;\n },\n showClass: function showClass(state) {\n return state.download.showClass;\n }\n })),\n created: function created() {\n this.getData();\n },\n mounted: function mounted() {\n this.scrollFns();\n },\n methods: {\n getData: function getData() {\n this.$store.dispatch({\n type: \"getfileuploadbanner\"\n });\n this.$store.dispatch({\n type: \"showClass\"\n });\n this.$store.dispatch({\n type: \"articleShowData\"\n });\n this.$store.dispatch({\n type: \"loginCheck\",\n is_jump: false\n });\n },\n handleSelect: function handleSelect(index, id) {\n this.active = index;\n this.$store.dispatch({\n type: \"articleShowData\",\n class_id: id\n });\n },\n download: function download(id, _download) {\n this.$store.dispatch(Object(E_h5_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({\n type: \"downloadFile\",\n id: id,\n download: _download\n }, \"download\", _download));\n },\n toUrl: function toUrl() {\n Object(vant__WEBPACK_IMPORTED_MODULE_7__[\"Toast\"])({\n message: \"请登录后下载\",\n duration: 1000\n });\n setTimeout(function () {\n window.location.href = '/v3/login?referer=%2fh5%2fview%2f%23%2fdownload&from=download';\n }, 1000);\n },\n scrollFns: function scrollFns() {\n var self = this;\n\n window.onscroll = function () {\n var t = document.documentElement.scrollTop || document.body.scrollTop;\n\n if (t >= 300) {\n self.navListfixed = true;\n } else {\n self.navListfixed = false;\n }\n };\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/download/Index.vue?./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_babel-loader@8.0.6@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options"); eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es7.object.get-own-property-descriptors */ \"./node_modules/_core-js@2.6.11@core-js/modules/es7.object.get-own-property-descriptors.js\");\n/* harmony import */ var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom.iterable */ \"./node_modules/_core-js@2.6.11@core-js/modules/web.dom.iterable.js\");\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/_core-js@2.6.11@core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.object.keys */ \"./node_modules/_core-js@2.6.11@core-js/modules/es6.object.keys.js\");\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var E_h5_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/defineProperty */ \"./node_modules/_@babel_runtime@7.7.7@@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.11@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.1.2@vuex/dist/vuex.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.4.1@vant/es/index.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(E_h5_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_5__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_7__[\"Swipe\"]).use(vant__WEBPACK_IMPORTED_MODULE_7__[\"SwipeItem\"]).use(vant__WEBPACK_IMPORTED_MODULE_7__[\"Toast\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"news\",\n data: function data() {\n return {\n title: \"资料下载\",\n p: 1,\n active: 0,\n meaushow: true,\n bannerHeight: 200,\n navListfixed: false\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_6__[\"mapState\"])({\n getfileuploadbanner: function getfileuploadbanner(state) {\n return state.download.getfileuploadbanner;\n },\n articleShowData: function articleShowData(state) {\n return state.download.articleShowData.result;\n },\n loginCheck: function loginCheck(state) {\n return state.common.loginCheck;\n },\n showClass: function showClass(state) {\n return state.download.showClass;\n }\n })),\n beforeCreate: function beforeCreate() {\n if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {\n var url = \"\";\n var paramsStr = '';\n\n for (var k in this.$route.query) {\n paramsStr += k + '=' + this.$route.query[k] + '&';\n }\n\n paramsStr = paramsStr.slice(0, -1);\n\n switch (window.location.hostname) {\n case \"m.liexin.com\":\n window.location.href = paramsStr ? \"http://www.liexin.com/v3/download?\" + paramsStr : \"http://www.liexin.com/v3/download\";\n break;\n\n default:\n window.location.href = window.location.origin + (paramsStr ? \"/v3/download?\" + paramsStr : \"/v3/download\");\n break;\n }\n }\n },\n created: function created() {\n this.getData();\n },\n mounted: function mounted() {\n this.scrollFns();\n },\n methods: {\n getData: function getData() {\n this.$store.dispatch({\n type: \"getfileuploadbanner\"\n });\n this.$store.dispatch({\n type: \"showClass\"\n });\n this.$store.dispatch({\n type: \"articleShowData\"\n });\n this.$store.dispatch({\n type: \"loginCheck\",\n is_jump: false\n });\n },\n handleSelect: function handleSelect(index, id) {\n this.active = index;\n this.$store.dispatch({\n type: \"articleShowData\",\n class_id: id\n });\n },\n download: function download(id, _download) {\n this.$store.dispatch(Object(E_h5_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({\n type: \"downloadFile\",\n id: id,\n download: _download\n }, \"download\", _download));\n },\n toUrl: function toUrl() {\n Object(vant__WEBPACK_IMPORTED_MODULE_7__[\"Toast\"])({\n message: \"请登录后下载\",\n duration: 1000\n });\n setTimeout(function () {\n window.location.href = '/v3/login?referer=%2fh5%2fview%2f%23%2fdownload&from=download';\n }, 1000);\n },\n scrollFns: function scrollFns() {\n var self = this;\n\n window.onscroll = function () {\n var t = document.documentElement.scrollTop || document.body.scrollTop;\n\n if (t >= 300) {\n self.navListfixed = true;\n } else {\n self.navListfixed = false;\n }\n };\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/download/Index.vue?./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_babel-loader@8.0.6@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.8.3@vue-loader/lib??vue-loader-options");
/***/ }), /***/ }),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment