Commit 79ce5e40 by 肖康

x

parent 5f25d487
Showing with 2 additions and 2 deletions
......@@ -148,7 +148,7 @@
DropdownItem
} from "vant";
Vue.use(Tab).use(Tabs).use(Lazyload).use(Toast).use(Swipe).use(SwipeItem).use(Popup).use(Dialog).use(DropdownMenu)
Vue.use(Tab).use(Tabs).use(Lazyload).use(Swipe).use(SwipeItem).use(Popup).use(Dialog).use(DropdownMenu)
.use(DropdownItem);
export default {
name: "sample",
......
......@@ -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.12@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.12@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.12@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.12@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 core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es6.object.assign */ \"./node_modules/_core-js@2.6.12@core-js/modules/es6.object.assign.js\");\n/* harmony import */ var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var D_lxWork_h5_node_modules_babel_runtime_7_12_5_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.12.5@@babel/runtime/helpers/esm/defineProperty */ \"./node_modules/_@babel_runtime@7.12.5@@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.12@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.6.0@vuex/dist/vuex.esm.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/* harmony import */ var _views_common_wxShare_vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/views/common/wxShare.vue */ \"./src/views/common/wxShare.vue\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var _util_index__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../util/index */ \"./src/util/index.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.11.2@vant/es/index.js\");\n\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(D_lxWork_h5_node_modules_babel_runtime_7_12_5_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[\"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//\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_6__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Tab\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Tabs\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Lazyload\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Toast\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Swipe\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"SwipeItem\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Popup\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Dialog\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"DropdownMenu\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"DropdownItem\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"sample\",\n data: function data() {\n return {\n value1: '19930209460053411',\n option1: [{\n value: '19930209460053411',\n text: '应用领域'\n }],\n searchVal: \"\",\n bannerHeight: 173,\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 getPops: false,\n quota: '',\n quotaNum: '',\n loadingYp: false,\n applyCount: 0,\n inviteCount: 0,\n p: 1,\n classId: \"\",\n fxType: 0,\n layer: false,\n type: '',\n sample_class_id: '',\n brand_id: {},\n packing: {},\n encap: {},\n attrs: {},\n curr: false,\n id: [],\n shareUrl: window.location.origin + \"/v3/samplereg?uid=\" + _util_index__WEBPACK_IMPORTED_MODULE_11__[\"default\"].getCookie(\"Yo4teW_uid\"),\n isShowChooseWork: false,\n workType: -1,\n workFun: 0,\n isBelongs: 0,\n isProvideInfo: 0,\n goodId: null\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_7__[\"mapState\"])({\n aggSample: function aggSample(state) {\n return state.sample.aggSample;\n },\n ziYingIndex: function ziYingIndex(state) {\n return state.sample.ziYingIndex;\n },\n aggs: function aggs(state) {\n return state.sample.aggs;\n },\n goodList: function goodList(state) {\n return state.sample.goodList;\n },\n loading: function loading(state) {\n return state.sample.loading;\n },\n finished: function finished(state) {\n return state.sample.finished;\n },\n getsamplebanner: function getsamplebanner(state) {\n return state.sample.getsamplebanner;\n }\n })),\n watch: {\n loading: function loading(now) {\n this.loadingYp = now;\n },\n aggSample: function aggSample(val) {\n var ar_ = val || [];\n\n if (ar_.length == 0) {\n return;\n }\n\n this.option1 = [{\n value: '19930209460053411',\n text: '应用领域'\n }];\n\n for (var i = 0; i < ar_.length; i++) {\n this.option1.push({\n value: ar_[i].smaple_class_id,\n text: ar_[i].smaple_class_name\n });\n }\n },\n smaple_class_id: function smaple_class_id(val) {\n if (val) {\n //先获取aggSample的第一个id\n this.$store.dispatch({\n type: \"ziYingIndex\",\n params: {\n 'sample_class_id/eq': val,\n p: 1\n }\n });\n }\n }\n },\n beforeCreate: function beforeCreate() {\n if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {\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/sample?\" + paramsStr : \"http://www.liexin.com/v3/sample\";\n break;\n\n default:\n window.location.href = window.location.origin + (paramsStr ? \"/v3/sample?\" + paramsStr : \"/v3/sample\");\n break;\n }\n }\n },\n created: function created() {\n this.$store.dispatch({\n type: \"getsamplebanner\"\n });\n this.$store.dispatch({\n type: \"aggSample\"\n });\n this.$store.dispatch({\n type: \"ziYingIndex\",\n params: {\n p: 1\n }\n });\n this.judgeLogin();\n },\n methods: {\n changeClass: function changeClass(value) {\n this.p = 1;\n var bk = value;\n\n if (value == '19930209460053411') {\n bk = this.smaple_class_id;\n }\n\n this.searchVal = \"\";\n this.$store.dispatch({\n type: \"ziYingIndex\",\n params: {\n 'sample_class_id/eq': bk,\n p: this.p\n }\n });\n },\n rule: function rule() {\n vant__WEBPACK_IMPORTED_MODULE_12__[\"Dialog\"].alert({\n title: '活动规则',\n messageAlign: \"left\",\n message: \"1\\u3001\\u6D3B\\u52A8\\u65F6\\u95F4\\uFF1A\\u957F\\u671F\\u6709\\u6548\\u3002\\uFF08\\u903E\\u671F\\u7533\\u8BF7\\u6B21\\u6570\\u5C06\\u6E05\\u96F6\\uFF09<br/>2\\u3001\\u5DE5\\u7A0B\\u5E08\\u3001\\u7EC8\\u7AEF\\u7B49\\u7528\\u6237\\u53EF\\u4EAB\\u53D7\\u5305\\u90AE\\u798F\\u5229\\uFF1B\\u5B66\\u751F\\u3001\\u8D38\\u6613\\u5546\\u7B49\\u7528\\u6237\\u8FD0\\u8D39\\u9700\\u81EA\\u7406\\u3002<br/>3\\u3001\\u540C\\u4E00\\u7528\\u6237\\u9700\\u4ED8\\u8FD0\\u8D39\\u7684\\u591A\\u4E2A\\u6837\\u54C1\\u5355\\uFF0C\\u901A\\u8FC7\\u5BA1\\u6838\\u540E\\uFF0C\\u5C06\\u5408\\u5E76\\u4E3A\\u4E00\\u4E2A\\u4ED8\\u8FD0\\u8D39\\u7684\\u6837\\u54C1\\u5355\\u3002<br/>4\\u3001\\u6837\\u54C1\\u8BA2\\u5355\\u5C06\\u5728<span>5 - 7 \\u4E2A\\u5DE5\\u4F5C\\u65E5\\u5185\\u901A\\u8FC7\\u5BA1\\u6838\\uFF0C1 \\u4E2A\\u5DE5\\u4F5C\\u65E5\\u5185\\u5BC4\\u51FA</span>\\u3002<br/>5\\u3001\\u5728\\u6CD5\\u5F8B\\u5141\\u8BB8\\u8303\\u56F4\\u5185\\uFF0C\\u672C\\u6D3B\\u52A8\\u6700\\u7EC8\\u89E3\\u91CA\\u6743\\u5F52\\u730E\\u82AF\\u7F51\\u6240\\u6709\\u3002\"\n }).then(function () {// on close\n });\n },\n searchData: function searchData() {\n if (this.searchVal && (this.searchVal.length < 3 || this.searchVal.length > 50)) {\n Object(vant__WEBPACK_IMPORTED_MODULE_12__[\"Toast\"])(\"搜索字符范围为3-50个字符\");\n return;\n }\n\n this.value1 = '19930209460053411';\n this.p = 1;\n var params = {\n p: this.p\n };\n\n if (this.searchVal) {\n params['goods_name/like'] = this.searchVal;\n }\n\n this.$store.dispatch({\n type: \"ziYingIndex\",\n params: params\n });\n },\n judgeOccupation: function judgeOccupation() {\n var value = this.isBelongs; //0表示未填写 1表示已填写\n\n if (value == 0) {\n this.isShowChooseWork = true;\n return false;\n } else {\n return true;\n }\n },\n chooseWork: function chooseWork() {\n if (this.workType == -1) {\n return;\n }\n\n this.$router.push({\n path: \"/sampleapply\",\n query: {\n id: this.goodId,\n type: this.workType,\n full: '0'\n }\n });\n },\n changeWorkType: function changeWorkType(type) {\n this.workType = type;\n },\n judgeLogin: function judgeLogin() {\n if (getCookie(\"Yo4teW_uid\")) {\n this.getCount();\n } else {\n this.fxType = 3;\n }\n },\n onLoad: function onLoad() {\n var _this = this;\n\n this.p++;\n var params = Object.assign({}, {\n p: this.p\n }, {\n 'sample_class_id/eq': this.sample_class_id\n });\n setTimeout(function () {\n _this.$store.dispatch({\n type: \"ziYingIndex\",\n params: params\n });\n }, 100);\n },\n getuserf: function getuserf() {\n this.getPop = false;\n },\n getCount: function getCount() {\n //获取用户领取机会、邀约人数\n var me = this;\n _api_index__WEBPACK_IMPORTED_MODULE_10__[\"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 me.workFun = data.data.work_function || 0;\n me.isBelongs = data.data.is_belongs || 0;\n me.isProvideInfo = data.data.is_provide_info || 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_11__[\"default\"].isLogin(); //1强登入态\n\n if (loginpta != 1) {\n window.location.href = \"/v3/login?referer=\" + encodeURIComponent(window.location.href);\n return;\n } else {\n var stock = _util_index__WEBPACK_IMPORTED_MODULE_11__[\"default\"].aggxde(item.stock);\n this.goodId = item.goods_id;\n\n if (this.applyCount != 0) {\n if (stock) {\n if (this.applyCount * 1 < item.quota * 1) {\n this.getPops = true;\n this.quota = item.quota;\n this.quotaNum = item.quota * 1 - this.applyCount * 1;\n } else {\n if (!this.judgeOccupation()) {\n return;\n }\n\n this.$router.push({\n path: \"/sampleapply\",\n query: {\n id: item.goods_id,\n type: this.workFun,\n full: this.isProvideInfo + ''\n }\n });\n }\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_12__[\"Toast\"])(\"样品库存不足\");\n }\n } else {\n this.getPop = true;\n }\n }\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n wxShare: _views_common_wxShare_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n \"van-list\": vant__WEBPACK_IMPORTED_MODULE_12__[\"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.2.2@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.5@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.12@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.12@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.12@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.12@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 core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es6.object.assign */ \"./node_modules/_core-js@2.6.12@core-js/modules/es6.object.assign.js\");\n/* harmony import */ var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var D_lxWork_h5_node_modules_babel_runtime_7_12_5_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.12.5@@babel/runtime/helpers/esm/defineProperty */ \"./node_modules/_@babel_runtime@7.12.5@@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.12@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vuex */ \"./node_modules/_vuex@3.6.0@vuex/dist/vuex.esm.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/* harmony import */ var _views_common_wxShare_vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/views/common/wxShare.vue */ \"./src/views/common/wxShare.vue\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../api/index */ \"./src/api/index.js\");\n/* harmony import */ var _util_index__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../util/index */ \"./src/util/index.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.11.2@vant/es/index.js\");\n\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(D_lxWork_h5_node_modules_babel_runtime_7_12_5_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[\"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//\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_6__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Tab\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Tabs\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Lazyload\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Swipe\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"SwipeItem\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Popup\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"Dialog\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"DropdownMenu\"]).use(vant__WEBPACK_IMPORTED_MODULE_12__[\"DropdownItem\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"sample\",\n data: function data() {\n return {\n value1: '19930209460053411',\n option1: [{\n value: '19930209460053411',\n text: '应用领域'\n }],\n searchVal: \"\",\n bannerHeight: 173,\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 getPops: false,\n quota: '',\n quotaNum: '',\n loadingYp: false,\n applyCount: 0,\n inviteCount: 0,\n p: 1,\n classId: \"\",\n fxType: 0,\n layer: false,\n type: '',\n sample_class_id: '',\n brand_id: {},\n packing: {},\n encap: {},\n attrs: {},\n curr: false,\n id: [],\n shareUrl: window.location.origin + \"/v3/samplereg?uid=\" + _util_index__WEBPACK_IMPORTED_MODULE_11__[\"default\"].getCookie(\"Yo4teW_uid\"),\n isShowChooseWork: false,\n workType: -1,\n workFun: 0,\n isBelongs: 0,\n isProvideInfo: 0,\n goodId: null\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_7__[\"mapState\"])({\n aggSample: function aggSample(state) {\n return state.sample.aggSample;\n },\n ziYingIndex: function ziYingIndex(state) {\n return state.sample.ziYingIndex;\n },\n aggs: function aggs(state) {\n return state.sample.aggs;\n },\n goodList: function goodList(state) {\n return state.sample.goodList;\n },\n loading: function loading(state) {\n return state.sample.loading;\n },\n finished: function finished(state) {\n return state.sample.finished;\n },\n getsamplebanner: function getsamplebanner(state) {\n return state.sample.getsamplebanner;\n }\n })),\n watch: {\n loading: function loading(now) {\n this.loadingYp = now;\n },\n aggSample: function aggSample(val) {\n var ar_ = val || [];\n\n if (ar_.length == 0) {\n return;\n }\n\n this.option1 = [{\n value: '19930209460053411',\n text: '应用领域'\n }];\n\n for (var i = 0; i < ar_.length; i++) {\n this.option1.push({\n value: ar_[i].smaple_class_id,\n text: ar_[i].smaple_class_name\n });\n }\n },\n smaple_class_id: function smaple_class_id(val) {\n if (val) {\n //先获取aggSample的第一个id\n this.$store.dispatch({\n type: \"ziYingIndex\",\n params: {\n 'sample_class_id/eq': val,\n p: 1\n }\n });\n }\n }\n },\n beforeCreate: function beforeCreate() {\n if (!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {\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/sample?\" + paramsStr : \"http://www.liexin.com/v3/sample\";\n break;\n\n default:\n window.location.href = window.location.origin + (paramsStr ? \"/v3/sample?\" + paramsStr : \"/v3/sample\");\n break;\n }\n }\n },\n created: function created() {\n this.$store.dispatch({\n type: \"getsamplebanner\"\n });\n this.$store.dispatch({\n type: \"aggSample\"\n });\n this.$store.dispatch({\n type: \"ziYingIndex\",\n params: {\n p: 1\n }\n });\n this.judgeLogin();\n },\n methods: {\n changeClass: function changeClass(value) {\n this.p = 1;\n var bk = value;\n\n if (value == '19930209460053411') {\n bk = this.smaple_class_id;\n }\n\n this.searchVal = \"\";\n this.$store.dispatch({\n type: \"ziYingIndex\",\n params: {\n 'sample_class_id/eq': bk,\n p: this.p\n }\n });\n },\n rule: function rule() {\n vant__WEBPACK_IMPORTED_MODULE_12__[\"Dialog\"].alert({\n title: '活动规则',\n messageAlign: \"left\",\n message: \"1\\u3001\\u6D3B\\u52A8\\u65F6\\u95F4\\uFF1A\\u957F\\u671F\\u6709\\u6548\\u3002\\uFF08\\u903E\\u671F\\u7533\\u8BF7\\u6B21\\u6570\\u5C06\\u6E05\\u96F6\\uFF09<br/>2\\u3001\\u5DE5\\u7A0B\\u5E08\\u3001\\u7EC8\\u7AEF\\u7B49\\u7528\\u6237\\u53EF\\u4EAB\\u53D7\\u5305\\u90AE\\u798F\\u5229\\uFF1B\\u5B66\\u751F\\u3001\\u8D38\\u6613\\u5546\\u7B49\\u7528\\u6237\\u8FD0\\u8D39\\u9700\\u81EA\\u7406\\u3002<br/>3\\u3001\\u540C\\u4E00\\u7528\\u6237\\u9700\\u4ED8\\u8FD0\\u8D39\\u7684\\u591A\\u4E2A\\u6837\\u54C1\\u5355\\uFF0C\\u901A\\u8FC7\\u5BA1\\u6838\\u540E\\uFF0C\\u5C06\\u5408\\u5E76\\u4E3A\\u4E00\\u4E2A\\u4ED8\\u8FD0\\u8D39\\u7684\\u6837\\u54C1\\u5355\\u3002<br/>4\\u3001\\u6837\\u54C1\\u8BA2\\u5355\\u5C06\\u5728<span>5 - 7 \\u4E2A\\u5DE5\\u4F5C\\u65E5\\u5185\\u901A\\u8FC7\\u5BA1\\u6838\\uFF0C1 \\u4E2A\\u5DE5\\u4F5C\\u65E5\\u5185\\u5BC4\\u51FA</span>\\u3002<br/>5\\u3001\\u5728\\u6CD5\\u5F8B\\u5141\\u8BB8\\u8303\\u56F4\\u5185\\uFF0C\\u672C\\u6D3B\\u52A8\\u6700\\u7EC8\\u89E3\\u91CA\\u6743\\u5F52\\u730E\\u82AF\\u7F51\\u6240\\u6709\\u3002\"\n }).then(function () {// on close\n });\n },\n searchData: function searchData() {\n if (this.searchVal && (this.searchVal.length < 3 || this.searchVal.length > 50)) {\n Object(vant__WEBPACK_IMPORTED_MODULE_12__[\"Toast\"])(\"搜索字符范围为3-50个字符\");\n return;\n }\n\n this.value1 = '19930209460053411';\n this.p = 1;\n var params = {\n p: this.p\n };\n\n if (this.searchVal) {\n params['goods_name/like'] = this.searchVal;\n }\n\n this.$store.dispatch({\n type: \"ziYingIndex\",\n params: params\n });\n },\n judgeOccupation: function judgeOccupation() {\n var value = this.isBelongs; //0表示未填写 1表示已填写\n\n if (value == 0) {\n this.isShowChooseWork = true;\n return false;\n } else {\n return true;\n }\n },\n chooseWork: function chooseWork() {\n if (this.workType == -1) {\n return;\n }\n\n this.$router.push({\n path: \"/sampleapply\",\n query: {\n id: this.goodId,\n type: this.workType,\n full: '0'\n }\n });\n },\n changeWorkType: function changeWorkType(type) {\n this.workType = type;\n },\n judgeLogin: function judgeLogin() {\n if (getCookie(\"Yo4teW_uid\")) {\n this.getCount();\n } else {\n this.fxType = 3;\n }\n },\n onLoad: function onLoad() {\n var _this = this;\n\n this.p++;\n var params = Object.assign({}, {\n p: this.p\n }, {\n 'sample_class_id/eq': this.sample_class_id\n });\n setTimeout(function () {\n _this.$store.dispatch({\n type: \"ziYingIndex\",\n params: params\n });\n }, 100);\n },\n getuserf: function getuserf() {\n this.getPop = false;\n },\n getCount: function getCount() {\n //获取用户领取机会、邀约人数\n var me = this;\n _api_index__WEBPACK_IMPORTED_MODULE_10__[\"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 me.workFun = data.data.work_function || 0;\n me.isBelongs = data.data.is_belongs || 0;\n me.isProvideInfo = data.data.is_provide_info || 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_11__[\"default\"].isLogin(); //1强登入态\n\n if (loginpta != 1) {\n window.location.href = \"/v3/login?referer=\" + encodeURIComponent(window.location.href);\n return;\n } else {\n var stock = _util_index__WEBPACK_IMPORTED_MODULE_11__[\"default\"].aggxde(item.stock);\n this.goodId = item.goods_id;\n\n if (this.applyCount != 0) {\n if (stock) {\n if (this.applyCount * 1 < item.quota * 1) {\n this.getPops = true;\n this.quota = item.quota;\n this.quotaNum = item.quota * 1 - this.applyCount * 1;\n } else {\n if (!this.judgeOccupation()) {\n return;\n }\n\n this.$router.push({\n path: \"/sampleapply\",\n query: {\n id: item.goods_id,\n type: this.workFun,\n full: this.isProvideInfo + ''\n }\n });\n }\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_12__[\"Toast\"])(\"样品库存不足\");\n }\n } else {\n this.getPop = true;\n }\n }\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n wxShare: _views_common_wxShare_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n \"van-list\": vant__WEBPACK_IMPORTED_MODULE_12__[\"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.2.2@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.5@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