Commit 987bae7c by 肖康

优惠券

parent 666a7d8b
Showing with 3 additions and 3 deletions
......@@ -28,7 +28,7 @@
<h4>适用于<span>{{item.coupon_mall_type==1?'全站':(item.coupon_mall_type==2?'全部自营':'全部联营')}}</span>商品</h4>
</template>
<template v-else>
<h4>适用于制造商<span>{{item.selected_brand}}</span>所有商品</h4>
<h4>适用于<span>{{item.selected_supplier?("供应商"+item.selected_supplier):""}}{{item.selected_brand?("制造商"+item.selected_brand):""}}</span>所有商品</h4>
</template>
<p class="clr">
<a :href="item.redirect_url" class="fr but-bg" v-if="item.status==-1">立即使用</a>
......
......@@ -8,7 +8,7 @@
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var D_lxWork_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread */ \"./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vant */ \"./node_modules/vant/es/index.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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_1__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_3__[\"Loading\"]).use(vant__WEBPACK_IMPORTED_MODULE_3__[\"Tab\"]).use(vant__WEBPACK_IMPORTED_MODULE_3__[\"Tabs\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'coupon',\n data: function data() {\n return {\n title: \"优惠劵\",\n active: 0,\n status: -1\n };\n },\n computed: Object(D_lxWork_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, Object(vuex__WEBPACK_IMPORTED_MODULE_2__[\"mapState\"])({\n loading: function loading(state) {\n return state.coupon.loading;\n },\n lists: function lists(state) {\n return state.coupon.lists;\n },\n counts: function counts(state) {\n return state.coupon.counts;\n }\n })),\n watch: {},\n created: function created() {\n this.getData();\n this.$store.dispatch({\n type: 'ucouponCount'\n });\n },\n methods: {\n getData: function getData() {\n this.$store.dispatch({\n type: 'ucouponLists',\n status: this.status\n });\n },\n tabs: function tabs(index) {\n if (index == 0) {\n this.status = -1;\n } else if (index == 1) {\n this.status = 1;\n } else if (index == 2) {\n this.status = -2;\n }\n\n this.getData();\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/user/coupon.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var D_lxWork_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread */ \"./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread.js\");\n/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.promise */ \"./node_modules/core-js/modules/es6.promise.js\");\n/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vant */ \"./node_modules/vant/es/index.js\");\n/* harmony import */ var _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/views/common/Header.vue */ \"./src/views/common/Header.vue\");\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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_3__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_5__[\"Loading\"]).use(vant__WEBPACK_IMPORTED_MODULE_5__[\"Tab\"]).use(vant__WEBPACK_IMPORTED_MODULE_5__[\"Tabs\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'coupon',\n data: function data() {\n return {\n title: \"优惠劵\",\n active: 0,\n status: -1\n };\n },\n computed: Object(D_lxWork_h5_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, Object(vuex__WEBPACK_IMPORTED_MODULE_4__[\"mapState\"])({\n loading: function loading(state) {\n return state.coupon.loading;\n },\n lists: function lists(state) {\n return state.coupon.lists;\n },\n counts: function counts(state) {\n return state.coupon.counts;\n }\n })),\n watch: {},\n created: function created() {\n this.getData();\n this.$store.dispatch({\n type: 'ucouponCount'\n });\n },\n methods: {\n getData: function getData() {\n this.$store.dispatch({\n type: 'ucouponLists',\n status: this.status\n });\n },\n tabs: function tabs(index) {\n if (index == 0) {\n this.status = -1;\n } else if (index == 1) {\n this.status = 1;\n } else if (index == 2) {\n this.status = -2;\n }\n\n this.getData();\n }\n },\n components: {\n Header: _views_common_Header_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n }\n});\n\n//# sourceURL=webpack:///./src/views/user/coupon.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }),
......@@ -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/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules//.cache//vue-loader%22,%22cacheIdentifier%22:%227acd57a2-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/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\", [\n _vm._v(\n _vm._s(\n item.selected_supplier\n ? \"供应商\" + item.selected_supplier\n : \"\"\n ) +\n _vm._s(\n item.selected_brand\n ? \"制造商\" + item.selected_brand\n : \"\"\n )\n )\n ]),\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/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules//.cache//vue-loader%22,%22cacheIdentifier%22:%227acd57a2-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/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