fuliqi
2024-01-24 29c1e7eb5ac16e90d8991a86c1c071bc312ec8d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!--
 * @Author: 张嘉彬
 * @Date: 2021-12-02 16:42:23
 * @Description:
-->
<template>
  <div v-if='ruleText' class="rule-page">
    <div @click="showRule=true" class="row-between coloum-center">
      <div class="flex1 flex">
        拼团规则
        <span class="flex1 font26 collage-rule overflow1 ml20">
          {{ruleText}}
        </span>
      </div>
      <img src="~@/assets/images/goodsDetail/arrows.png" class="common-base-icon ml20" />
    </div>
 
    <NewModal v-if='showRule' :visable="showRule" @close-modal="showRule=false"
              class="collage-rule-model">
      <div slot="modal-content" class="model-content">
        <div class="title">拼团规则</div>
        <div class="rule-box">
          <div v-for="(item,index) in ruleText.split('\n')" :key='index' style="margin-bottom:6px;">
            {{item}}</div>
        </div>
        <div class="default-button button rule-btn" @click="showRule=false">确定
        </div>
      </div>
    </NewModal>
  </div>
</template>
 
<script>
import NewModal from '@/components/new-modal/index.vue'
export default {
  components: {
    NewModal
  },
  props: {
    ruleText: {
      type: String,
      default: ''
    }
  },
  data () {
    return {
      showRule: false
    }
  }
}
</script>
 
<style lang="scss" scoped>
.rule-page {
  margin-top: 20px;
  padding: 20px 0 20px 20px;
  background: #f7f7f7;
  border-radius: 8px;
}
.collage-rule {
  color: #994d00;
}
.collage-rule-model {
  animation: none;
 
  /deep/.modal-content {
    padding: 40px !important;
    border-radius: 8px;
    width: 540px;
    box-sizing: border-box;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    animation: none;
 
    .model-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
 
    .title {
      font-size: 32px;
      line-height: 32px;
      text-align: center;
      color: #333333;
    }
 
    .rule-box {
      margin-top: 65px;
      font-size: 24px;
      color: #994d00;
    }
 
    .rule-btn {
      color: #fff;
      font-size: 26px;
      margin-top: 40px;
      width: 280px;
      height: 68px;
      line-height: 68px;
      text-align: center;
      background: linear-gradient(103deg, #db4b4e, #c23034 100%);
      border-radius: 34px;
    }
  }
}
</style>