10.10综合交易所原始源码_移动端
1
admin
2026-02-10 c547081aa61be5c7b6d4c12853c675954c2156eb
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<template>
  <div id="cryptos">
    <div id="full" class="adScreening">
      <div class="flex box-border items-center justify-between px-8 w-full mt-6 text-36 font-bold text-center">
        <div></div>
        <span class="c2cColor">{{ $t('广告筛选') }}</span>
        <van-icon class="c2cColor" name="cross" @click="handlerBack" />
      </div>
      <div class="text-28 mb-9 text-grey ml-8 mt-10">{{ $t('总额') }}</div>
      <div class="px-8">
        <van-field v-model="amount" :size="large" :placeholder="$t('请输入总额')">
          <template #extra>
            <div class="tabBackground pr-8 box-border textColor">
              {{ exchangeCurrency }}
            </div>
          </template>
        </van-field>
      </div>
      <select-item class="mt-16" :title="$t('交易方式')" :options="fullPayMethods" :value="method_type"
        @input="changeMethod_type" />
      <select-item class="mt-16" :title="$t('国家/地区')" :options="countries" :value="country_code"
        @input="changeCountry_code" />
      <div class="px-8">
        <van-cell class="c2cColor" center :title="$t('仅显示商家发布的广告')">
          <template #right-icon>
            <van-switch v-model="checked" size="24" @click="showAd = !showAd" />
          </template>
        </van-cell>
        <van-collapse v-model="activeNames" v-show="showAd">
          <van-collapse-item>
            <template #title>
              <div class="flex items-center">
                <img class="w-6 h-6 mr-4" src="~@/assets/image/otc/wantBuyHead/tip_ico.png" alt="">
                <span class="mr-4 text-24 text-grey">{{ $t('广告筛选说明') }}</span>
                <van-icon name="arrow-down" class="block relative top-1 text-24 font-bold"
                  :class="{ 'rotateZ': activeNames.length > 0 }" />
              </div>
            </template>
            <template #right-icon><i></i></template>
            <template #default>
              <div class="text-28 c2cColor">
                <div><span>{{ $t('交易方式:') }}</span><span class="font-bold">{{ $t('仅显示可用的交易方式') }}</span></div>
                <div class="mt-2"><span>{{ $t('国家/地区') }}</span><span class="font-bold">{{ $t('仅显示可用的国家 / 地区') }}</span>
                </div>
              </div>
            </template>
          </van-collapse-item>
        </van-collapse>
        <div class="flex mt-14 mb-9 justify-center ">
          <button class="w-80 h-20 tabBackground c2cColor rounded-lg font-normal text-30 border-none mr-5"
            @click="onReset">{{ $t('重置') }}
          </button>
          <button class="w-80 h-20 btnMain rounded-lg font-normal text-30 border-none"
            :class="[{ 'btnMain': tabindex === 1 }, { 'text-white': tabindex === 1 }]" @click="onConfirm">{{ $t('确认') }}
          </button>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
import SelectItem from "../components/selectItem/SelectItem.vue";
import { Cell, Icon, Popup, DropdownMenu, DropdownItem, Field, Switch, Collapse, CollapseItem } from 'vant';
import { mapGetters } from 'vuex'
import countries from '@/components/Transform/country-list/countryList.js'
 
export default {
  name: "adScreening",
  components: {
    [Icon.name]: Icon,
    [Field.name]: Field,
    [Popup.name]: Popup,
    [Cell.name]: Cell,
    [Switch.name]: Switch,
    [DropdownMenu.name]: DropdownMenu,
    [DropdownItem.name]: DropdownItem,
    [Collapse.name]: Collapse,
    [CollapseItem.name]: CollapseItem,
    SelectItem,
  },
  computed: {
    ...mapGetters('c2c', ['payMethods']),
    ...mapGetters('c2c', ['symbolList', 'payMethods', 'exchangeCurrency']),
    // 处理交易方式对象
    fullPayMethods() {
      const payMethods = [];
      Object.keys(this.payMethods).forEach((key) => {
        payMethods.push({
          method_type: key,
          title: this.payMethods[key]
        })
      })
      payMethods.unshift({
        method_type: '',
        title: this.$t('全部')
      })
      return payMethods;
    }
  },
  created() {
  },
  data() {
    return {
      countries, // 国家列表
      activeNames: [],
      amount: '',
      // 0 代表全部
      method_type: '', // 支付方式
      country_code: 99, // 国家
      tradeList: [
        {
          '': this.$t('全部'),
          // Bank_card: '银行卡',
          // Coin_collection: '币收款',
        }
      ],
      large: '80',
      checked: false,
      tabindex: 1,
      showAd: false,
    }
  },
  methods: {
    onChooseType(key) { // 选择支付方式
      this.method_type = key
      this.$refs.paymentMethod[0].toggle()
    },
    onSelectCountry(item) {
      this.country_code = item.code;
      this.$refs.country.toggle()
    },
    onReset() { // 重置
      this.amount = ''
      this.method_type = 99
      this.country_code = 99
    },
    onConfirm() { // 确认
      console.log(this.amount, this.method_type, this.country_code, this.checked)
      this.$emit('confirm', {
        amount: this.amount,
        method_type: this.method_type,
        country_code: this.country_code,
      })
 
      this.$emit('back')
    },
    handlerBack() {
      this.$emit('back')
    },
    changeMethod_type(val) {
      this.method_type = val
    },
    changeCountry_code(val) {
      this.country_code = val
    }
  }
}
</script>
 
<style lang="scss" scoped>
#cryptos {
  .active_trade {
    color: $main-btn-color;
    background: $color_main;
  }
 
  .rotateZ {
    transform: rotateZ(180deg);
  }
 
 
  :deep(.van-dropdown-menu__bar) {
    background: none;
    box-shadow: none;
  }
 
  :deep(.van-collapse-item__content) {
    padding: 0;
  }
 
  #full {
    :deep(.van-cell) {
      background-color: $main_background;
 
      &::after {
        border-bottom: 1px solid $divi_line;
      }
    }
 
    .van-switch {
      background: $btn_main;
    }
 
    :deep(.van-collapse-item__content) {
      background: $main_background;
    }
 
    :deep(.van-field__control) {
      color: $text_color;
    }
  }
}
</style>