Commit 8042a5fd by 肖康

x

parent 5d85bb9c
......@@ -57,7 +57,7 @@ const actions = {
if (data.err_code == 0) {
window.location.href = "http://img.ichunt.com/video/cms/202108/30/ace4d17499e5a1531f74a73a600d16f4.zip";
window.location.href = data.data[0].file_url;
return
let platform = Util.isUerAgent();
......
......@@ -33,7 +33,7 @@
<div class="bar">
<p class="t2">已下载{{item.download_num}}次</p>
<template v-if="loginCheck">
<a class="btn" @click="download(item.data_id,1)">下载2</a>
<a class="btn" @click="download(item.data_id,1)">下载</a>
</template>
<template v-else>
<a class="btn" @click="toUrl">下载</a>
......
......@@ -20,7 +20,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"section\",\n { staticClass: \"news\" },\n [\n _c(\"Header\", {\n attrs: {\n bgcolor: \"#fff\",\n title: _vm.title,\n meaushow: _vm.meaushow,\n download: _vm.loginCheck\n }\n }),\n _vm._m(0),\n _vm.getfileuploadbanner.length > 0\n ? [\n _c(\n \"van-swipe\",\n {\n staticClass: \"a\",\n attrs: { autoplay: 3000, height: _vm.bannerHeight }\n },\n _vm._l(_vm.getfileuploadbanner, function(item, index) {\n return _c(\"van-swipe-item\", { key: index }, [\n _c(\n \"a\",\n {\n attrs: {\n href: item.url,\n target: item.window_open > 0 ? \"_blank\" : \"_self\"\n }\n },\n [\n _c(\"img\", {\n attrs: {\n src: item.images,\n height: \"100%\",\n width: \"100%\"\n }\n })\n ]\n )\n ])\n }),\n 1\n )\n ]\n : _vm._e(),\n _c(\"div\", { staticClass: \"nav-tab\" }, [\n _c(\n \"ul\",\n _vm._l(_vm.showClass, function(item, index) {\n return _c(\n \"li\",\n {\n key: index,\n class: { curr: _vm.active == index },\n on: {\n click: function($event) {\n return _vm.handleSelect(index, item.class_id)\n }\n }\n },\n [_vm._v(_vm._s(item.class_name))]\n )\n }),\n 0\n )\n ]),\n _c(\"div\", { staticClass: \"down-list\" }, [\n _c(\n \"ul\",\n { staticClass: \"boxsiz\" },\n _vm._l(_vm.articleShowData, function(item, index) {\n return _c(\n \"li\",\n { key: index, staticClass: \"boxsiz\" },\n [\n _vm.loginCheck\n ? [\n _c(\"p\", { staticClass: \"t1\" }, [\n _vm._v(_vm._s(item.title))\n ])\n ]\n : [\n _c(\"p\", { staticClass: \"t1\" }, [\n _vm._v(_vm._s(item.title))\n ])\n ],\n _c(\n \"div\",\n { staticClass: \"bar\" },\n [\n _c(\"p\", { staticClass: \"t2\" }, [\n _vm._v(\"已下载\" + _vm._s(item.download_num) + \"次\")\n ]),\n _vm.loginCheck\n ? [\n _c(\n \"a\",\n {\n staticClass: \"btn\",\n on: {\n click: function($event) {\n return _vm.download(item.data_id, 1)\n }\n }\n },\n [_vm._v(\"下载2\")]\n )\n ]\n : [\n _c(\n \"a\",\n { staticClass: \"btn\", on: { click: _vm.toUrl } },\n [_vm._v(\"下载\")]\n )\n ]\n ],\n 2\n )\n ],\n 2\n )\n }),\n 0\n ),\n _c(\"p\", { staticClass: \"txt-tip\" }, [\n _vm._v(\n \"\\n 法律声明:本资料库的文档为网络收集,仅供学习使用,勿做商用\\n \"\n )\n ])\n ]),\n !_vm.loginCheck\n ? [\n _c(\"div\", { staticClass: \"islogin\", on: { click: _vm.toUrl } }, [\n _c(\"img\", {\n attrs: {\n src: __webpack_require__(/*! ../../assets/images/download/loading.png */ \"./src/assets/images/download/loading.png\"),\n alt: \"\"\n }\n }),\n _c(\"a\", { attrs: { href: \"javascript:;\" } }, [\n _vm._v(\"登录查看更多哦\")\n ])\n ])\n ]\n : _vm._e(),\n _c(\n \"div\",\n {\n directives: [{ name: \"backTopWindow\", rawName: \"v-backTopWindow\" }],\n staticClass: \"slide-bar\",\n staticStyle: { cursor: \"pointer\" }\n },\n [\n _vm.navListfixed\n ? _c(\"div\", { staticClass: \"backtop\" }, [\n _c(\"i\", { staticClass: \"iconfont icon-xiangshang1\" })\n ])\n : _vm._e()\n ]\n )\n ],\n 2\n )\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { staticClass: \"new-head boxsiz\" }, [\n _c(\"a\", { staticClass: \"logo\", attrs: { href: \"/\" } }, [\n _c(\"img\", {\n attrs: {\n src: __webpack_require__(/*! ../../assets/images/download/logo.png */ \"./src/assets/images/download/logo.png\"),\n alt: \"猎芯网\"\n }\n })\n ]),\n _c(\"span\", { staticClass: \"t1\" }, [_vm._v(\"猎芯网\")])\n ])\n }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/download/Index.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2231d626a0-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"section\",\n { staticClass: \"news\" },\n [\n _c(\"Header\", {\n attrs: {\n bgcolor: \"#fff\",\n title: _vm.title,\n meaushow: _vm.meaushow,\n download: _vm.loginCheck\n }\n }),\n _vm._m(0),\n _vm.getfileuploadbanner.length > 0\n ? [\n _c(\n \"van-swipe\",\n {\n staticClass: \"a\",\n attrs: { autoplay: 3000, height: _vm.bannerHeight }\n },\n _vm._l(_vm.getfileuploadbanner, function(item, index) {\n return _c(\"van-swipe-item\", { key: index }, [\n _c(\n \"a\",\n {\n attrs: {\n href: item.url,\n target: item.window_open > 0 ? \"_blank\" : \"_self\"\n }\n },\n [\n _c(\"img\", {\n attrs: {\n src: item.images,\n height: \"100%\",\n width: \"100%\"\n }\n })\n ]\n )\n ])\n }),\n 1\n )\n ]\n : _vm._e(),\n _c(\"div\", { staticClass: \"nav-tab\" }, [\n _c(\n \"ul\",\n _vm._l(_vm.showClass, function(item, index) {\n return _c(\n \"li\",\n {\n key: index,\n class: { curr: _vm.active == index },\n on: {\n click: function($event) {\n return _vm.handleSelect(index, item.class_id)\n }\n }\n },\n [_vm._v(_vm._s(item.class_name))]\n )\n }),\n 0\n )\n ]),\n _c(\"div\", { staticClass: \"down-list\" }, [\n _c(\n \"ul\",\n { staticClass: \"boxsiz\" },\n _vm._l(_vm.articleShowData, function(item, index) {\n return _c(\n \"li\",\n { key: index, staticClass: \"boxsiz\" },\n [\n _vm.loginCheck\n ? [\n _c(\"p\", { staticClass: \"t1\" }, [\n _vm._v(_vm._s(item.title))\n ])\n ]\n : [\n _c(\"p\", { staticClass: \"t1\" }, [\n _vm._v(_vm._s(item.title))\n ])\n ],\n _c(\n \"div\",\n { staticClass: \"bar\" },\n [\n _c(\"p\", { staticClass: \"t2\" }, [\n _vm._v(\"已下载\" + _vm._s(item.download_num) + \"次\")\n ]),\n _vm.loginCheck\n ? [\n _c(\n \"a\",\n {\n staticClass: \"btn\",\n on: {\n click: function($event) {\n return _vm.download(item.data_id, 1)\n }\n }\n },\n [_vm._v(\"下载\")]\n )\n ]\n : [\n _c(\n \"a\",\n { staticClass: \"btn\", on: { click: _vm.toUrl } },\n [_vm._v(\"下载\")]\n )\n ]\n ],\n 2\n )\n ],\n 2\n )\n }),\n 0\n ),\n _c(\"p\", { staticClass: \"txt-tip\" }, [\n _vm._v(\n \"\\n 法律声明:本资料库的文档为网络收集,仅供学习使用,勿做商用\\n \"\n )\n ])\n ]),\n !_vm.loginCheck\n ? [\n _c(\"div\", { staticClass: \"islogin\", on: { click: _vm.toUrl } }, [\n _c(\"img\", {\n attrs: {\n src: __webpack_require__(/*! ../../assets/images/download/loading.png */ \"./src/assets/images/download/loading.png\"),\n alt: \"\"\n }\n }),\n _c(\"a\", { attrs: { href: \"javascript:;\" } }, [\n _vm._v(\"登录查看更多哦\")\n ])\n ])\n ]\n : _vm._e(),\n _c(\n \"div\",\n {\n directives: [{ name: \"backTopWindow\", rawName: \"v-backTopWindow\" }],\n staticClass: \"slide-bar\",\n staticStyle: { cursor: \"pointer\" }\n },\n [\n _vm.navListfixed\n ? _c(\"div\", { staticClass: \"backtop\" }, [\n _c(\"i\", { staticClass: \"iconfont icon-xiangshang1\" })\n ])\n : _vm._e()\n ]\n )\n ],\n 2\n )\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { staticClass: \"new-head boxsiz\" }, [\n _c(\"a\", { staticClass: \"logo\", attrs: { href: \"/\" } }, [\n _c(\"img\", {\n attrs: {\n src: __webpack_require__(/*! ../../assets/images/download/logo.png */ \"./src/assets/images/download/logo.png\"),\n alt: \"猎芯网\"\n }\n })\n ]),\n _c(\"span\", { staticClass: \"t1\" }, [_vm._v(\"猎芯网\")])\n ])\n }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/download/Index.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2231d626a0-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
......
......@@ -4684,7 +4684,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var _util_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/index */ \"./src/util/index.js\");\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n loading: false,\n getfileuploadbanner: [],\n articleShowData: [],\n showClass: []\n};\nvar mutations = {\n getfileuploadbanner: function getfileuploadbanner(state, payload) {\n state.getfileuploadbanner = payload.data;\n },\n articleShowData: function articleShowData(state, payload) {\n state.articleShowData = payload.data;\n },\n showClass: function showClass(state, payload) {\n state.showClass = payload.data;\n }\n};\nvar actions = {\n getfileuploadbanner: function getfileuploadbanner(_ref, payload) {\n var commit = _ref.commit;\n var params = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getParams();\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].getfileuploadbanner(params).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'getfileuploadbanner',\n data: data.data.data\n });\n }\n }).catch(function (err) {});\n },\n downloadFile: function downloadFile(_ref2, payload) {\n var commit = _ref2.commit;\n var param = {\n data_id: payload.id,\n download: payload.download\n };\n var params = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getParams(param);\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].downloadFile(params).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n window.location.href = \"http://img.ichunt.com/video/cms/202108/30/ace4d17499e5a1531f74a73a600d16f4.zip\";\n return;\n var platform = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isUerAgent();\n\n if (payload.download == 1) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n } else {\n if (platform == 'ios') {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: '该文件只能在safari浏览器中下载保存,请在safari中打开页面并下载\\n',\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = data.data[0].file_url;\n }, 2000);\n } else {\n window.location.href = data.data[0].file_url;\n }\n }\n } else if (data.err_code == 1) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n }\n }).catch(function (err) {});\n },\n articleShowData: function articleShowData(_ref3, payload) {\n var commit = _ref3.commit;\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '加载中...',\n forbidClick: true,\n loadingType: 'spinner'\n });\n var param = {\n limit: 300,\n class_id: payload.class_id\n };\n var params = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getParams(param);\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].articleShowData(params).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'articleShowData',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n }\n\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n showClass: function showClass(_ref4, payload) {\n var commit = _ref4.commit;\n var params = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getParams();\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].showClass(params).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'showClass',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n }\n }).catch(function (err) {});\n }\n};\nvar getters = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n mutations: mutations,\n actions: actions,\n getters: getters\n});\n\n//# sourceURL=webpack:///./src/store/modules/download/index.js?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var _util_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/index */ \"./src/util/index.js\");\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n loading: false,\n getfileuploadbanner: [],\n articleShowData: [],\n showClass: []\n};\nvar mutations = {\n getfileuploadbanner: function getfileuploadbanner(state, payload) {\n state.getfileuploadbanner = payload.data;\n },\n articleShowData: function articleShowData(state, payload) {\n state.articleShowData = payload.data;\n },\n showClass: function showClass(state, payload) {\n state.showClass = payload.data;\n }\n};\nvar actions = {\n getfileuploadbanner: function getfileuploadbanner(_ref, payload) {\n var commit = _ref.commit;\n var params = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getParams();\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].getfileuploadbanner(params).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'getfileuploadbanner',\n data: data.data.data\n });\n }\n }).catch(function (err) {});\n },\n downloadFile: function downloadFile(_ref2, payload) {\n var commit = _ref2.commit;\n var param = {\n data_id: payload.id,\n download: payload.download\n };\n var params = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getParams(param);\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].downloadFile(params).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n window.location.href = data.data[0].file_url;\n return;\n var platform = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isUerAgent();\n\n if (payload.download == 1) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n } else {\n if (platform == 'ios') {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: '该文件只能在safari浏览器中下载保存,请在safari中打开页面并下载\\n',\n duration: 2000\n });\n setTimeout(function () {\n window.location.href = data.data[0].file_url;\n }, 2000);\n } else {\n window.location.href = data.data[0].file_url;\n }\n }\n } else if (data.err_code == 1) {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n }\n }).catch(function (err) {});\n },\n articleShowData: function articleShowData(_ref3, payload) {\n var commit = _ref3.commit;\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n message: '加载中...',\n forbidClick: true,\n loadingType: 'spinner'\n });\n var param = {\n limit: 300,\n class_id: payload.class_id\n };\n var params = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getParams(param);\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].articleShowData(params).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'articleShowData',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n }\n\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n }).catch(function (err) {\n vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].clear();\n });\n },\n showClass: function showClass(_ref4, payload) {\n var commit = _ref4.commit;\n var params = _util_index__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getParams();\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].showClass(params).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit({\n type: 'showClass',\n data: data.data\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n }\n }).catch(function (err) {});\n }\n};\nvar getters = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n mutations: mutations,\n actions: actions,\n getters: getters\n});\n\n//# sourceURL=webpack:///./src/store/modules/download/index.js?");
/***/ }),
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