Commit 04738305 by 施宇

111

parent 0d2c973f
Showing with 6 additions and 17 deletions
......@@ -142,31 +142,20 @@ export default {
}
}
},
created() {
beforeCreate() {
if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
let url = "";
switch (window.location.hostname) {
case "m.ichunt.com":
url = "https://www.ichunt.com";
break;
case "szm.ichunt.com":
url = "https://sz.ichunt.com";
break;
case "tm.ichunt.com":
url = "https://t.ichunt.com";
break;
case "m.liexin.com":
url = "http://www.liexin.com";
window.location.href = "http://www.liexin.com/v3/sample";
break;
default:
url = "https://www.ichunt.com";
window.location.href = window.location.origin + "/v3/sample";
break;
}
console.log(url)
console.log(url+'/v3/sample')
// window.location.href = url+'/v3/sample'
}
},
created() {
this.$store.dispatch({
type: "getClasslist"
});
......
......@@ -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 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.9@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.9@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.9@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.9@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.6.2@@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.1.1@vuex/dist/vuex.esm.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n/* harmony import */ var _views_common_wxShare_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/views/common/wxShare.vue */ \"./src/views/common/wxShare.vue\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var _util_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../util/index */ \"./src/util/index.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.2.5@vant/es/index.js\");\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(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(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//\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_11__[\"Tab\"]).use(vant__WEBPACK_IMPORTED_MODULE_11__[\"Tabs\"]).use(vant__WEBPACK_IMPORTED_MODULE_11__[\"Lazyload\"]).use(vant__WEBPACK_IMPORTED_MODULE_11__[\"Toast\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"sample\",\n data: function data() {\n return {\n title: \"猎芯网-自营样片\",\n meaushow: true,\n bgcolor: \"#fafafa\",\n color: \"#1080d0\",\n defaultcolor: \"#333\",\n swipeThreshold: 4,\n active: 0,\n getPop: false,\n //获得机会弹窗,没机会时展示\n loadingYp: false,\n applyCount: 0,\n inviteCount: 0,\n p: 1,\n classId: \"\",\n fxType: 0,\n shareUrl: window.location.origin + \"/v3/samplereg?uid=\" + _util_index__WEBPACK_IMPORTED_MODULE_10__[\"default\"].getCookie(\"Yo4teW_uid\")\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_6__[\"mapState\"])({\n classList: function classList(state) {\n return state.sample.classList;\n },\n goodList: function goodList(state) {\n return state.sample.goodList;\n },\n finished: function finished(state) {\n return state.sample.finished;\n },\n loading: function loading(state) {\n return state.sample.loading;\n }\n })),\n watch: {\n loading: function loading(now) {\n this.loadingYp = now;\n },\n classList: function classList(now) {\n if (now.length) {\n this.p = 1;\n this.classId = now[0].id;\n this.getGoodList();\n }\n }\n },\n created: function created() {\n if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {\n var url = \"\";\n\n switch (window.location.hostname) {\n case \"m.ichunt.com\":\n url = \"https://www.ichunt.com\";\n break;\n\n case \"szm.ichunt.com\":\n url = \"https://sz.ichunt.com\";\n break;\n\n case \"tm.ichunt.com\":\n url = \"https://t.ichunt.com\";\n break;\n\n case \"m.liexin.com\":\n url = \"http://www.liexin.com\";\n break;\n\n default:\n url = \"https://www.ichunt.com\";\n break;\n }\n\n console.log(url);\n console.log(url + '/v3/sample'); // window.location.href = url+'/v3/sample'\n }\n\n this.$store.dispatch({\n type: \"getClasslist\"\n });\n this.judgeLogin();\n },\n methods: {\n judgeLogin: function judgeLogin() {\n if (getCookie(\"Yo4teW_uid\")) {\n this.getCount();\n } else {\n this.fxType = 3;\n }\n },\n getGoodList: function getGoodList() {\n this.$store.dispatch({\n type: \"getGoodList\",\n data: {\n p: this.p,\n class_id: this.classId\n }\n });\n },\n changeTab: function changeTab(data) {\n this.p = 1;\n this.classId = data;\n this.getGoodList();\n },\n onLoad: function onLoad() {\n this.p++;\n this.getGoodList();\n },\n getuserf: function getuserf() {\n this.getPop = false;\n },\n getCount: function getCount() {\n var me = this;\n _api_index__WEBPACK_IMPORTED_MODULE_9__[\"services\"].getUserSampleInfo().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n me.applyCount = data.data.apply_count || 0;\n me.inviteCount = data.data.invite_count || 0;\n\n if (me.inviteCount == 0) {\n me.fxType = 2;\n } else {\n me.fxType = 1;\n }\n } else if (data.err_code == \"11012\") {\n window.location.href = \"/v3/login?referer=\" + encodeURIComponent(window.location.href);\n }\n }).catch(function (err) {});\n },\n yaoqing: function yaoqing(item) {\n var loginpta = _util_index__WEBPACK_IMPORTED_MODULE_10__[\"default\"].isLogin(); //1强登入态\n\n if (loginpta != 1) {\n window.location.href = \"/v3/login?referer=\" + encodeURIComponent(window.location.href);\n return;\n } else {\n if (this.applyCount != 0) {\n if (item.goods_info && item.goods_info.stock) {\n this.$router.push({\n path: \"/sampleapply\",\n query: {\n id: item.goods_id\n }\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_11__[\"Toast\"])(\"样品库存不足\");\n }\n } else {\n this.getPop = true;\n }\n }\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n wxShare: _views_common_wxShare_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n \"van-list\": vant__WEBPACK_IMPORTED_MODULE_11__[\"List\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/sample/sample.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.7.1@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.9@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.9@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.9@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.9@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.6.2@@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.1.1@vuex/dist/vuex.esm.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n/* harmony import */ var _views_common_wxShare_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/views/common/wxShare.vue */ \"./src/views/common/wxShare.vue\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var _util_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../util/index */ \"./src/util/index.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.2.5@vant/es/index.js\");\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(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(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//\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_11__[\"Tab\"]).use(vant__WEBPACK_IMPORTED_MODULE_11__[\"Tabs\"]).use(vant__WEBPACK_IMPORTED_MODULE_11__[\"Lazyload\"]).use(vant__WEBPACK_IMPORTED_MODULE_11__[\"Toast\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"sample\",\n data: function data() {\n return {\n title: \"猎芯网-自营样片\",\n meaushow: true,\n bgcolor: \"#fafafa\",\n color: \"#1080d0\",\n defaultcolor: \"#333\",\n swipeThreshold: 4,\n active: 0,\n getPop: false,\n //获得机会弹窗,没机会时展示\n loadingYp: false,\n applyCount: 0,\n inviteCount: 0,\n p: 1,\n classId: \"\",\n fxType: 0,\n shareUrl: window.location.origin + \"/v3/samplereg?uid=\" + _util_index__WEBPACK_IMPORTED_MODULE_10__[\"default\"].getCookie(\"Yo4teW_uid\")\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_6__[\"mapState\"])({\n classList: function classList(state) {\n return state.sample.classList;\n },\n goodList: function goodList(state) {\n return state.sample.goodList;\n },\n finished: function finished(state) {\n return state.sample.finished;\n },\n loading: function loading(state) {\n return state.sample.loading;\n }\n })),\n watch: {\n loading: function loading(now) {\n this.loadingYp = now;\n },\n classList: function classList(now) {\n if (now.length) {\n this.p = 1;\n this.classId = now[0].id;\n this.getGoodList();\n }\n }\n },\n beforeCreate: function beforeCreate() {\n if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {\n var url = \"\";\n\n switch (window.location.hostname) {\n case \"m.liexin.com\":\n window.location.href = \"http://www.liexin.com/v3/sample\";\n break;\n\n default:\n window.location.href = window.location.origin + \"/v3/sample\";\n break;\n }\n }\n },\n created: function created() {\n this.$store.dispatch({\n type: \"getClasslist\"\n });\n this.judgeLogin();\n },\n methods: {\n judgeLogin: function judgeLogin() {\n if (getCookie(\"Yo4teW_uid\")) {\n this.getCount();\n } else {\n this.fxType = 3;\n }\n },\n getGoodList: function getGoodList() {\n this.$store.dispatch({\n type: \"getGoodList\",\n data: {\n p: this.p,\n class_id: this.classId\n }\n });\n },\n changeTab: function changeTab(data) {\n this.p = 1;\n this.classId = data;\n this.getGoodList();\n },\n onLoad: function onLoad() {\n this.p++;\n this.getGoodList();\n },\n getuserf: function getuserf() {\n this.getPop = false;\n },\n getCount: function getCount() {\n var me = this;\n _api_index__WEBPACK_IMPORTED_MODULE_9__[\"services\"].getUserSampleInfo().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n me.applyCount = data.data.apply_count || 0;\n me.inviteCount = data.data.invite_count || 0;\n\n if (me.inviteCount == 0) {\n me.fxType = 2;\n } else {\n me.fxType = 1;\n }\n } else if (data.err_code == \"11012\") {\n window.location.href = \"/v3/login?referer=\" + encodeURIComponent(window.location.href);\n }\n }).catch(function (err) {});\n },\n yaoqing: function yaoqing(item) {\n var loginpta = _util_index__WEBPACK_IMPORTED_MODULE_10__[\"default\"].isLogin(); //1强登入态\n\n if (loginpta != 1) {\n window.location.href = \"/v3/login?referer=\" + encodeURIComponent(window.location.href);\n return;\n } else {\n if (this.applyCount != 0) {\n if (item.goods_info && item.goods_info.stock) {\n this.$router.push({\n path: \"/sampleapply\",\n query: {\n id: item.goods_id\n }\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_11__[\"Toast\"])(\"样品库存不足\");\n }\n } else {\n this.getPop = true;\n }\n }\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n wxShare: _views_common_wxShare_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n \"van-list\": vant__WEBPACK_IMPORTED_MODULE_11__[\"List\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/sample/sample.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.7.1@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