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
73e40e28
authored
Jun 28, 2019
by
肖康
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'XK_carB20190624' into Development
parents
5b17b64b
5e504322
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
2 deletions
src/store/modules/user/coupon.js
src/views/user/coupon.vue
view/26.js
view/app.js
src/store/modules/user/coupon.js
View file @
73e40e28
...
@@ -19,11 +19,13 @@ const mutations = {
...
@@ -19,11 +19,13 @@ const mutations = {
const
actions
=
{
const
actions
=
{
ucouponLists
({
commit
},
payload
)
{
ucouponLists
({
commit
},
payload
)
{
state
.
loading
=
true
;
var
params
=
{
var
params
=
{
status
:
payload
.
status
status
:
payload
.
status
}
}
Services
.
ucouponLists
(
qs
.
stringify
(
params
)).
then
((
res
)
=>
{
Services
.
ucouponLists
(
qs
.
stringify
(
params
)).
then
((
res
)
=>
{
let
data
=
res
.
data
;
let
data
=
res
.
data
;
state
.
loading
=
false
;
if
(
data
.
err_code
==
0
)
{
if
(
data
.
err_code
==
0
)
{
state
.
lists
=
data
.
data
;
state
.
lists
=
data
.
data
;
}
else
{
}
else
{
...
...
src/views/user/coupon.vue
View file @
73e40e28
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<Header
:title=
"title"
></Header>
<Header
:title=
"title"
></Header>
<van-tabs
@
change=
"tabs"
>
<van-tabs
@
change=
"tabs"
>
<van-tab
:title=
"'未使用('+counts['-1']+')'"
></van-tab>
<van-tab
:title=
"'未使用('+counts['-1']+')'"
></van-tab>
<van-tab
:title=
"'使用记录(
(
'+counts['1']+')'"
></van-tab>
<van-tab
:title=
"'使用记录('+counts['1']+')'"
></van-tab>
<van-tab
:title=
"'已过期('+counts['-2']+')'"
></van-tab>
<van-tab
:title=
"'已过期('+counts['-2']+')'"
></van-tab>
</van-tabs>
</van-tabs>
<div
class=
"coupon-box clr coupon-user"
>
<div
class=
"coupon-box clr coupon-user"
>
...
...
view/26.js
View file @
73e40e28
This diff is collapsed.
Click to expand it.
view/app.js
View file @
73e40e28
...
@@ -4025,7 +4025,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
...
@@ -4025,7 +4025,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.0.2@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.7.0@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n loading: false,\n lists: [],\n counts: {\n \"0\": \"0\",\n \"1\": \"0\",\n \"-2\": \"0\",\n \"-1\": \"0\"\n }\n};\nvar mutations = {};\nvar actions = {\n ucouponLists: function ucouponLists(_ref, payload) {\n var commit = _ref.commit;\n
var params = {\n status: payload.status\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].ucouponLists(qs.stringify(params)).then(function (res) {\n var data = res.data
;\n\n if (data.err_code == 0) {\n state.lists = data.data;\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\n });\n },\n ucouponCount: function ucouponCount(_ref2, payload) {\n var commit = _ref2.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].ucouponCount().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n state.counts = data.data;\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\n });\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/user/coupon.js?"
);
eval
(
"__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.0.2@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.7.0@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n loading: false,\n lists: [],\n counts: {\n \"0\": \"0\",\n \"1\": \"0\",\n \"-2\": \"0\",\n \"-1\": \"0\"\n }\n};\nvar mutations = {};\nvar actions = {\n ucouponLists: function ucouponLists(_ref, payload) {\n var commit = _ref.commit;\n
state.loading = true;\n var params = {\n status: payload.status\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].ucouponLists(qs.stringify(params)).then(function (res) {\n var data = res.data;\n state.loading = false
;\n\n if (data.err_code == 0) {\n state.lists = data.data;\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\n });\n },\n ucouponCount: function ucouponCount(_ref2, payload) {\n var commit = _ref2.commit;\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].ucouponCount().then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n state.counts = data.data;\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\n });\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/user/coupon.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