Commit 73e40e28 by 肖康

Merge branch 'XK_carB20190624' into Development

parents 5b17b64b 5e504322
......@@ -19,11 +19,13 @@ const mutations = {
const actions = {
ucouponLists({commit}, payload) {
state.loading = true;
var params = {
status:payload.status
}
Services.ucouponLists(qs.stringify(params)).then((res) => {
let data = res.data;
state.loading = false;
if (data.err_code == 0) {
state.lists=data.data;
}else {
......
......@@ -3,7 +3,7 @@
<Header :title="title" ></Header>
<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['-2']+')'"></van-tab>
</van-tabs>
<div class="coupon-box clr coupon-user">
......
......@@ -20,7 +20,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var D_lx
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"section\",\n { staticClass: \"coupon\" },\n [\n _c(\"Header\", { attrs: { title: _vm.title } }),\n _c(\n \"van-tabs\",\n { on: { change: _vm.tabs } },\n [\n _c(\"van-tab\", {\n attrs: { title: \"未使用(\" + _vm.counts[\"-1\"] + \")\" }\n }),\n _c(\"van-tab\", {\n attrs: { title: \"使用记录((\" + _vm.counts[\"1\"] + \")\" }\n }),\n _c(\"van-tab\", {\n attrs: { title: \"已过期(\" + _vm.counts[\"-2\"] + \")\" }\n })\n ],\n 1\n ),\n _c(\n \"div\",\n { staticClass: \"coupon-box clr coupon-user\" },\n _vm._l(_vm.lists, function(item) {\n return _c(\n \"dl\",\n {\n staticClass: \"block \",\n class: {\n \"box-green\": item.status == -1 && item.coupon_mall_type == 1,\n \"box-orange\": item.status == -1 && item.coupon_mall_type == 2,\n \"box-blue\": item.status == -1 && item.coupon_mall_type == 3,\n \"box-gray\": item.status == 1 || item.status == -2\n }\n },\n [\n _c(\"dt\", [\n _c(\n \"h4\",\n [\n item.coupon_type == 1\n ? [\n _c(\"span\", [_vm._v(\"¥\")]),\n _vm._v(\n _vm._s(item.sale_amount.toFixed(2)) +\n \"\\n \"\n )\n ]\n : [\n _vm._v(\n \"\\n \" +\n _vm._s((item.sale_amount * 10).toFixed(2))\n ),\n _c(\"b\", [_vm._v(\"折\")])\n ]\n ],\n 2\n ),\n _c(\"p\", [_vm._v(_vm._s(item.require_desc))])\n ]),\n _c(\n \"dd\",\n { staticClass: \"text\" },\n [\n _c(\"div\", { staticClass: \"tag\" }, [\n _c(\"i\"),\n _c(\"span\", [\n _vm._v(\n _vm._s(\n item.coupon_mall_type == 1\n ? \"全站\"\n : item.coupon_mall_type == 2\n ? \"自营\"\n : \"联营\"\n )\n )\n ])\n ]),\n item.coupon_goods_range == 1\n ? [\n _c(\"h4\", [\n _vm._v(\"适用于\"),\n _c(\"span\", [\n _vm._v(\n _vm._s(\n item.coupon_mall_type == 1\n ? \"全站\"\n : item.coupon_mall_type == 2\n ? \"全部自营\"\n : \"全部联营\"\n )\n )\n ]),\n _vm._v(\"商品\")\n ])\n ]\n : [\n _c(\"h4\", [\n _vm._v(\"适用于制造商\"),\n _c(\"span\", [_vm._v(_vm._s(item.selected_brand))]),\n _vm._v(\"所有商品\")\n ])\n ],\n _c(\"p\", { staticClass: \"clr\" }, [\n item.status == -1\n ? _c(\n \"a\",\n {\n staticClass: \"fr but-bg\",\n attrs: { href: item.redirect_url }\n },\n [_vm._v(\"立即使用\")]\n )\n : _vm._e(),\n item.status == 1\n ? _c(\"i\", {\n staticClass: \"icon-get iconfont icon-yishiyong\"\n })\n : _vm._e(),\n item.status == -2\n ? _c(\"i\", {\n staticClass: \"icon-get iconfont icon-yiguoqi\"\n })\n : _vm._e(),\n _c(\"span\", [\n _vm._v(\n _vm._s(item.start_time) + \" - \" + _vm._s(item.end_time)\n )\n ])\n ])\n ],\n 2\n )\n ]\n )\n }),\n 0\n ),\n _vm.loading\n ? _c(\"van-loading\", {\n staticClass: \"loading-background\",\n attrs: { type: \"spinner\", color: \"#000\" }\n })\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/user/coupon.vue?./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%223fdc9e70-vue-loader-template%22%7D!./node_modules/_vue-loader@15.7.0@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.0@vue-loader/lib??vue-loader-options");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"section\",\n { staticClass: \"coupon\" },\n [\n _c(\"Header\", { attrs: { title: _vm.title } }),\n _c(\n \"van-tabs\",\n { on: { change: _vm.tabs } },\n [\n _c(\"van-tab\", {\n attrs: { title: \"未使用(\" + _vm.counts[\"-1\"] + \")\" }\n }),\n _c(\"van-tab\", {\n attrs: { title: \"使用记录(\" + _vm.counts[\"1\"] + \")\" }\n }),\n _c(\"van-tab\", {\n attrs: { title: \"已过期(\" + _vm.counts[\"-2\"] + \")\" }\n })\n ],\n 1\n ),\n _c(\n \"div\",\n { staticClass: \"coupon-box clr coupon-user\" },\n _vm._l(_vm.lists, function(item) {\n return _c(\n \"dl\",\n {\n staticClass: \"block \",\n class: {\n \"box-green\": item.status == -1 && item.coupon_mall_type == 1,\n \"box-orange\": item.status == -1 && item.coupon_mall_type == 2,\n \"box-blue\": item.status == -1 && item.coupon_mall_type == 3,\n \"box-gray\": item.status == 1 || item.status == -2\n }\n },\n [\n _c(\"dt\", [\n _c(\n \"h4\",\n [\n item.coupon_type == 1\n ? [\n _c(\"span\", [_vm._v(\"¥\")]),\n _vm._v(\n _vm._s(item.sale_amount.toFixed(2)) +\n \"\\n \"\n )\n ]\n : [\n _vm._v(\n \"\\n \" +\n _vm._s((item.sale_amount * 10).toFixed(2))\n ),\n _c(\"b\", [_vm._v(\"折\")])\n ]\n ],\n 2\n ),\n _c(\"p\", [_vm._v(_vm._s(item.require_desc))])\n ]),\n _c(\n \"dd\",\n { staticClass: \"text\" },\n [\n _c(\"div\", { staticClass: \"tag\" }, [\n _c(\"i\"),\n _c(\"span\", [\n _vm._v(\n _vm._s(\n item.coupon_mall_type == 1\n ? \"全站\"\n : item.coupon_mall_type == 2\n ? \"自营\"\n : \"联营\"\n )\n )\n ])\n ]),\n item.coupon_goods_range == 1\n ? [\n _c(\"h4\", [\n _vm._v(\"适用于\"),\n _c(\"span\", [\n _vm._v(\n _vm._s(\n item.coupon_mall_type == 1\n ? \"全站\"\n : item.coupon_mall_type == 2\n ? \"全部自营\"\n : \"全部联营\"\n )\n )\n ]),\n _vm._v(\"商品\")\n ])\n ]\n : [\n _c(\"h4\", [\n _vm._v(\"适用于制造商\"),\n _c(\"span\", [_vm._v(_vm._s(item.selected_brand))]),\n _vm._v(\"所有商品\")\n ])\n ],\n _c(\"p\", { staticClass: \"clr\" }, [\n item.status == -1\n ? _c(\n \"a\",\n {\n staticClass: \"fr but-bg\",\n attrs: { href: item.redirect_url }\n },\n [_vm._v(\"立即使用\")]\n )\n : _vm._e(),\n item.status == 1\n ? _c(\"i\", {\n staticClass: \"icon-get iconfont icon-yishiyong\"\n })\n : _vm._e(),\n item.status == -2\n ? _c(\"i\", {\n staticClass: \"icon-get iconfont icon-yiguoqi\"\n })\n : _vm._e(),\n _c(\"span\", [\n _vm._v(\n _vm._s(item.start_time) + \" - \" + _vm._s(item.end_time)\n )\n ])\n ])\n ],\n 2\n )\n ]\n )\n }),\n 0\n ),\n _vm.loading\n ? _c(\"van-loading\", {\n staticClass: \"loading-background\",\n attrs: { type: \"spinner\", color: \"#000\" }\n })\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/user/coupon.vue?./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%223fdc9e70-vue-loader-template%22%7D!./node_modules/_vue-loader@15.7.0@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.0@vue-loader/lib??vue-loader-options");
/***/ }),
......
......@@ -4025,7 +4025,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@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?");
/***/ }),
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