Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8633c642
authored
Oct 09, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1111
parent
a2315167
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
6 deletions
src/store/modules/sample/index.js
src/views/common/wxShare.vue
view/14.js
view/17.js
view/app.js
src/store/modules/sample/index.js
View file @
8633c642
...
...
@@ -67,7 +67,6 @@ const actions = {
if
(
data
.
data
.
total
)
{
totalPage
=
Math
.
ceil
(
data
.
data
.
total
/
10
);
}
console
.
log
(
totalPage
)
if
(
p
==
totalPage
||
!
totalPage
)
{
state
.
finished
=
true
;
}
...
...
src/views/common/wxShare.vue
View file @
8633c642
...
...
@@ -23,7 +23,7 @@
// link: window.location.origin+"/v3/samplereg?uid="+util.getCookie("Yo4teW_uid"), // 分享链接
imgUrl
:
"http://img.ichunt.com/images/ichunt/self_sample/apply.png"
,
// 分享图标
success
:
function
(
resp
)
{
},
error
:
function
(){
...
...
@@ -58,7 +58,7 @@
// 微信配置
console
.
log
(
self
.
wxShareInfo
)
wx
.
config
({
debug
:
fals
e
,
debug
:
tru
e
,
appId
:
self
.
wxShareInfo
.
appId
,
timestamp
:
self
.
wxShareInfo
.
timestamp
,
nonceStr
:
self
.
wxShareInfo
.
nonceStr
,
...
...
view/14.js
View file @
8633c642
...
...
@@ -8,7 +8,7 @@
/***/
(
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 _util_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/index */ \"./src/util/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\nvar wxjs = __webpack_require__(/*! weixin-js-sdk */ \"./node_modules/_weixin-js-sdk@1.4.0-test@weixin-js-sdk/index.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'wxShare',\n props: {\n url: {\n type: String,\n default: window.location.href\n }\n },\n data: function data() {\n return {\n shareObj: {\n title: \"好物分享给你,帮我助力,我们一起免费拿样品\",\n // 分享标题\n desc: \"在吗?拜托帮我点一下,你也能免费申请元器件样品~帮我助力 你拿样品\",\n // 分享描述\n link: this.url,\n // link: window.location.origin+\"/v3/samplereg?uid=\"+util.getCookie(\"Yo4teW_uid\"), // 分享链接\n imgUrl: \"http://img.ichunt.com/images/ichunt/self_sample/apply.png\",\n // 分享图标\n success: function success(resp) {},\n error: function error() {}\n }\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_6__[\"mapState\"])({\n wxShareInfo: function wxShareInfo(state) {\n return state.common.wxShareInfo;\n },\n wxShareState: function wxShareState(state) {\n return state.common.wxShareState;\n }\n })),\n watch: {\n wxShareState: function wxShareState(val) {\n if (val && _util_index__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getCookie(\"Yo4teW_uid\")) {\n this.share();\n }\n }\n },\n created: function created() {\n if (_util_index__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getCookie(\"Yo4teW_uid\")) {\n this.$store.dispatch({\n type: \"wxShare\",\n current_url: window.location.href\n });\n }\n },\n methods: {\n share: function share() {\n var self = this; // 微信配置\n\n console.log(self.wxShareInfo);\n wx.config({\n debug:
fals
e,\n appId: self.wxShareInfo.appId,\n timestamp: self.wxShareInfo.timestamp,\n nonceStr: self.wxShareInfo.nonceStr,\n signature: self.wxShareInfo.signature,\n jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'] // 功能列表,我们要使用JS-SDK的什么功能\n\n }); // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在 页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready 函数中。\n\n wx.ready(function () {\n wx.checkJsApi({\n jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'],\n // 需要检测的JS接口列表,所有JS接口列表见附录2,\n success: function success(res) {// console.log(res);\n // 以键值对的形式返回,可用的api值true,不可用为false\n // 如:{\"checkResult\":{\"chooseImage\":true},\"errMsg\":\"checkJsApi:ok\"}\n }\n }); // 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareTimeline(self.shareObj); // 获取“分享给朋友”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareAppMessage(self.shareObj); //获取“分享到QQ”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareQQ(self.shareObj); //获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareWeibo(self.shareObj); //获取“分享到QQ空间”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareQZone(self.shareObj);\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/common/wxShare.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 _util_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/index */ \"./src/util/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\nvar wxjs = __webpack_require__(/*! weixin-js-sdk */ \"./node_modules/_weixin-js-sdk@1.4.0-test@weixin-js-sdk/index.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'wxShare',\n props: {\n url: {\n type: String,\n default: window.location.href\n }\n },\n data: function data() {\n return {\n shareObj: {\n title: \"好物分享给你,帮我助力,我们一起免费拿样品\",\n // 分享标题\n desc: \"在吗?拜托帮我点一下,你也能免费申请元器件样品~帮我助力 你拿样品\",\n // 分享描述\n link: this.url,\n // link: window.location.origin+\"/v3/samplereg?uid=\"+util.getCookie(\"Yo4teW_uid\"), // 分享链接\n imgUrl: \"http://img.ichunt.com/images/ichunt/self_sample/apply.png\",\n // 分享图标\n success: function success(resp) {},\n error: function error() {}\n }\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_6__[\"mapState\"])({\n wxShareInfo: function wxShareInfo(state) {\n return state.common.wxShareInfo;\n },\n wxShareState: function wxShareState(state) {\n return state.common.wxShareState;\n }\n })),\n watch: {\n wxShareState: function wxShareState(val) {\n if (val && _util_index__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getCookie(\"Yo4teW_uid\")) {\n this.share();\n }\n }\n },\n created: function created() {\n if (_util_index__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getCookie(\"Yo4teW_uid\")) {\n this.$store.dispatch({\n type: \"wxShare\",\n current_url: window.location.href\n });\n }\n },\n methods: {\n share: function share() {\n var self = this; // 微信配置\n\n console.log(self.wxShareInfo);\n wx.config({\n debug:
tru
e,\n appId: self.wxShareInfo.appId,\n timestamp: self.wxShareInfo.timestamp,\n nonceStr: self.wxShareInfo.nonceStr,\n signature: self.wxShareInfo.signature,\n jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'] // 功能列表,我们要使用JS-SDK的什么功能\n\n }); // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在 页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready 函数中。\n\n wx.ready(function () {\n wx.checkJsApi({\n jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'],\n // 需要检测的JS接口列表,所有JS接口列表见附录2,\n success: function success(res) {// console.log(res);\n // 以键值对的形式返回,可用的api值true,不可用为false\n // 如:{\"checkResult\":{\"chooseImage\":true},\"errMsg\":\"checkJsApi:ok\"}\n }\n }); // 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareTimeline(self.shareObj); // 获取“分享给朋友”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareAppMessage(self.shareObj); //获取“分享到QQ”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareQQ(self.shareObj); //获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareWeibo(self.shareObj); //获取“分享到QQ空间”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareQZone(self.shareObj);\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/common/wxShare.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"
);
/***/
}),
...
...
view/17.js
View file @
8633c642
...
...
@@ -8,7 +8,7 @@
/***/
(
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 _util_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/index */ \"./src/util/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\nvar wxjs = __webpack_require__(/*! weixin-js-sdk */ \"./node_modules/_weixin-js-sdk@1.4.0-test@weixin-js-sdk/index.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'wxShare',\n props: {\n url: {\n type: String,\n default: window.location.href\n }\n },\n data: function data() {\n return {\n shareObj: {\n title: \"好物分享给你,帮我助力,我们一起免费拿样品\",\n // 分享标题\n desc: \"在吗?拜托帮我点一下,你也能免费申请元器件样品~帮我助力 你拿样品\",\n // 分享描述\n link: this.url,\n // link: window.location.origin+\"/v3/samplereg?uid=\"+util.getCookie(\"Yo4teW_uid\"), // 分享链接\n imgUrl: \"http://img.ichunt.com/images/ichunt/self_sample/apply.png\",\n // 分享图标\n success: function success(resp) {},\n error: function error() {}\n }\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_6__[\"mapState\"])({\n wxShareInfo: function wxShareInfo(state) {\n return state.common.wxShareInfo;\n },\n wxShareState: function wxShareState(state) {\n return state.common.wxShareState;\n }\n })),\n watch: {\n wxShareState: function wxShareState(val) {\n if (val && _util_index__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getCookie(\"Yo4teW_uid\")) {\n this.share();\n }\n }\n },\n created: function created() {\n if (_util_index__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getCookie(\"Yo4teW_uid\")) {\n this.$store.dispatch({\n type: \"wxShare\",\n current_url: window.location.href\n });\n }\n },\n methods: {\n share: function share() {\n var self = this; // 微信配置\n\n console.log(self.wxShareInfo);\n wx.config({\n debug:
fals
e,\n appId: self.wxShareInfo.appId,\n timestamp: self.wxShareInfo.timestamp,\n nonceStr: self.wxShareInfo.nonceStr,\n signature: self.wxShareInfo.signature,\n jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'] // 功能列表,我们要使用JS-SDK的什么功能\n\n }); // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在 页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready 函数中。\n\n wx.ready(function () {\n wx.checkJsApi({\n jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'],\n // 需要检测的JS接口列表,所有JS接口列表见附录2,\n success: function success(res) {// console.log(res);\n // 以键值对的形式返回,可用的api值true,不可用为false\n // 如:{\"checkResult\":{\"chooseImage\":true},\"errMsg\":\"checkJsApi:ok\"}\n }\n }); // 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareTimeline(self.shareObj); // 获取“分享给朋友”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareAppMessage(self.shareObj); //获取“分享到QQ”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareQQ(self.shareObj); //获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareWeibo(self.shareObj); //获取“分享到QQ空间”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareQZone(self.shareObj);\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/common/wxShare.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 _util_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/index */ \"./src/util/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\nvar wxjs = __webpack_require__(/*! weixin-js-sdk */ \"./node_modules/_weixin-js-sdk@1.4.0-test@weixin-js-sdk/index.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'wxShare',\n props: {\n url: {\n type: String,\n default: window.location.href\n }\n },\n data: function data() {\n return {\n shareObj: {\n title: \"好物分享给你,帮我助力,我们一起免费拿样品\",\n // 分享标题\n desc: \"在吗?拜托帮我点一下,你也能免费申请元器件样品~帮我助力 你拿样品\",\n // 分享描述\n link: this.url,\n // link: window.location.origin+\"/v3/samplereg?uid=\"+util.getCookie(\"Yo4teW_uid\"), // 分享链接\n imgUrl: \"http://img.ichunt.com/images/ichunt/self_sample/apply.png\",\n // 分享图标\n success: function success(resp) {},\n error: function error() {}\n }\n };\n },\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_6__[\"mapState\"])({\n wxShareInfo: function wxShareInfo(state) {\n return state.common.wxShareInfo;\n },\n wxShareState: function wxShareState(state) {\n return state.common.wxShareState;\n }\n })),\n watch: {\n wxShareState: function wxShareState(val) {\n if (val && _util_index__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getCookie(\"Yo4teW_uid\")) {\n this.share();\n }\n }\n },\n created: function created() {\n if (_util_index__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getCookie(\"Yo4teW_uid\")) {\n this.$store.dispatch({\n type: \"wxShare\",\n current_url: window.location.href\n });\n }\n },\n methods: {\n share: function share() {\n var self = this; // 微信配置\n\n console.log(self.wxShareInfo);\n wx.config({\n debug:
tru
e,\n appId: self.wxShareInfo.appId,\n timestamp: self.wxShareInfo.timestamp,\n nonceStr: self.wxShareInfo.nonceStr,\n signature: self.wxShareInfo.signature,\n jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'] // 功能列表,我们要使用JS-SDK的什么功能\n\n }); // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在 页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready 函数中。\n\n wx.ready(function () {\n wx.checkJsApi({\n jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'],\n // 需要检测的JS接口列表,所有JS接口列表见附录2,\n success: function success(res) {// console.log(res);\n // 以键值对的形式返回,可用的api值true,不可用为false\n // 如:{\"checkResult\":{\"chooseImage\":true},\"errMsg\":\"checkJsApi:ok\"}\n }\n }); // 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareTimeline(self.shareObj); // 获取“分享给朋友”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareAppMessage(self.shareObj); //获取“分享到QQ”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareQQ(self.shareObj); //获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareWeibo(self.shareObj); //获取“分享到QQ空间”按钮点击状态及自定义分享内容接口\n\n wx.onMenuShareQZone(self.shareObj);\n });\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/common/wxShare.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"
);
/***/
}),
...
...
view/app.js
View file @
8633c642
...
...
@@ -4254,7 +4254,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 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 vant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.2.5@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/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\nvue__WEBPACK_IMPORTED_MODULE_5__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_6__[\"Toast\"]);\nvar state = {\n classList: [],\n goodList: [],\n loading: false,\n finished: false,\n goodCount: 0\n};\nvar mutations = {\n classListM: function classListM(state, payload) {\n state.classList = payload.data;\n },\n goodList: function goodList(state, payload) {\n var arr = [];\n\n for (var k in payload.data) {\n arr.push(payload.data[k]);\n }\n\n state.goodList = state.goodList.concat(arr);\n }\n};\nvar actions = {\n getClasslist: function getClasslist(_ref) {\n var commit = _ref.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_7__[\"services\"].sampleClassList().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit(\"classListM\", {\n data: data.data || []\n });\n } else {\n commit(\"classListM\", {\n data: []\n });\n }\n }).catch(function (err) {\n commit(\"classListM\", {\n data: []\n });\n });\n },\n getGoodList: function getGoodList(_ref2, payload) {\n var commit = _ref2.commit;\n state.loading = true;\n state.finished = false;\n var p = payload.data.p;\n\n if (p == 1) {\n state.goodList = [];\n }\n\n var params = _objectSpread({}, payload.data, {\n limit: 10\n });\n\n _api_index__WEBPACK_IMPORTED_MODULE_7__[\"services\"].sampleList(params).then(function (res) {\n state.loading = false;\n var data = res.data;\n\n if (data.err_code == 0) {\n var totalPage = 0;\n\n if (data.data.total) {\n totalPage = Math.ceil(data.data.total / 10);\n }\n\n
console.log(totalPage);\n\n
if (p == totalPage || !totalPage) {\n state.finished = true;\n }\n\n if (data.data.total) {\n commit('goodList', {\n data: data.data.data\n });\n }\n } else {\n state.loading = false;\n state.finished = true;\n }\n }).catch(function (err) {\n state.loading = false;\n state.finished = true;\n });\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n actions: actions,\n mutations: mutations\n});\n\n//# sourceURL=webpack:///./src/store/modules/sample/index.js?"
);
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 vant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.2.5@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/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\nvue__WEBPACK_IMPORTED_MODULE_5__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_6__[\"Toast\"]);\nvar state = {\n classList: [],\n goodList: [],\n loading: false,\n finished: false,\n goodCount: 0\n};\nvar mutations = {\n classListM: function classListM(state, payload) {\n state.classList = payload.data;\n },\n goodList: function goodList(state, payload) {\n var arr = [];\n\n for (var k in payload.data) {\n arr.push(payload.data[k]);\n }\n\n state.goodList = state.goodList.concat(arr);\n }\n};\nvar actions = {\n getClasslist: function getClasslist(_ref) {\n var commit = _ref.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_7__[\"services\"].sampleClassList().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n commit(\"classListM\", {\n data: data.data || []\n });\n } else {\n commit(\"classListM\", {\n data: []\n });\n }\n }).catch(function (err) {\n commit(\"classListM\", {\n data: []\n });\n });\n },\n getGoodList: function getGoodList(_ref2, payload) {\n var commit = _ref2.commit;\n state.loading = true;\n state.finished = false;\n var p = payload.data.p;\n\n if (p == 1) {\n state.goodList = [];\n }\n\n var params = _objectSpread({}, payload.data, {\n limit: 10\n });\n\n _api_index__WEBPACK_IMPORTED_MODULE_7__[\"services\"].sampleList(params).then(function (res) {\n state.loading = false;\n var data = res.data;\n\n if (data.err_code == 0) {\n var totalPage = 0;\n\n if (data.data.total) {\n totalPage = Math.ceil(data.data.total / 10);\n }\n\n if (p == totalPage || !totalPage) {\n state.finished = true;\n }\n\n if (data.data.total) {\n commit('goodList', {\n data: data.data.data\n });\n }\n } else {\n state.loading = false;\n state.finished = true;\n }\n }).catch(function (err) {\n state.loading = false;\n state.finished = true;\n });\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n actions: actions,\n mutations: mutations\n});\n\n//# sourceURL=webpack:///./src/store/modules/sample/index.js?"
);
/***/
}),
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment