|
@@ -0,0 +1,96 @@
|
|
|
+<template>
|
|
|
+ <div id="quotaDetail">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="one">
|
|
|
+ <el-image :src="coupons"></el-image>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="two">
|
|
|
+ <van-cell title="创新券类型" :value="getWord(form, 'coupons.coupons_type')" />
|
|
|
+ <van-cell title="创新券名称" :value="getWord(form, 'coupons.name')" />
|
|
|
+ <van-cell title="折扣类型" :value="getWord(form, 'coupons.discount_type')" />
|
|
|
+ <van-cell title="抵扣比例" :value="getWord(form, 'coupons.scale') + '%'" v-if="form.coupons && form.coupons.discount_type == '折扣券'" />
|
|
|
+ <van-cell title="面额" :value="getWord(form, 'coupons.allowance') + '元'" v-if="form.coupons && form.coupons.discount_type == '定额券'" />
|
|
|
+ <van-cell title="适用服务类型" :value="getWord(form, 'coupons.use_type')" />
|
|
|
+ <van-cell title="所属分类" :value="getWord(form, 'coupons.classify')" />
|
|
|
+ <van-cell title="券总额度" :value="getWord(form, 'coupons.total_allowance') + '元'" />
|
|
|
+ <van-cell title="使用期限" :value="getWord(form, 'coupons.limit_time') + '个月'" />
|
|
|
+ <van-swipe-cell class="desc">
|
|
|
+ <p>描述:</p>
|
|
|
+ <p>{{ getWord(form, 'coupons.desc') || '暂无' }}</p>
|
|
|
+ </van-swipe-cell>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+const _ = require('lodash');
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
|
|
|
+export default {
|
|
|
+ name: 'quotaDetail',
|
|
|
+ props: {},
|
|
|
+ components: {},
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ coupons: require('@a/coupons.jpg'),
|
|
|
+ form: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...couponsApply(['fetch']),
|
|
|
+ async search() {
|
|
|
+ const res = await this.fetch(this.id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getWord(data, model) {
|
|
|
+ return _.get(data, model, '');
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ id() {
|
|
|
+ return this.$route.query.id;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main {
|
|
|
+ .one {
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ .el-image {
|
|
|
+ width: 100%;
|
|
|
+ height: 180px;
|
|
|
+ /deep/.el-image__inner {
|
|
|
+ border-radius: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .two {
|
|
|
+ .desc {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 10px 15px;
|
|
|
+ font-size: 14px;
|
|
|
+ p:nth-child(1) {
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ }
|
|
|
+ p:nth-child(2) {
|
|
|
+ text-indent: 1rem;
|
|
|
+ color: #969799;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|