17 files modified
3 files added
| | |
| | | setStorage('usercode', usercode); |
| | | } |
| | | const userStore = useUserStore(); |
| | | |
| | | // 狐狸钱包登录逻辑 |
| | | onMounted(() => { |
| | | if (window.ethereum !== undefined || window.web3 !== undefined || window.injectedWeb3 !== undefined) { |
| | | loginButton(); // 如果支持 Web3,调用登录函数 |
| | |
| | | |
| | | // const ENV_DEV = 'zhapi.coinbtcs.com' // dev |
| | | // const ENV_DEV = 'openapi.yanshiz.com' // dev |
| | | const ENV_DEV = 'api.cme-coin.com' // dev |
| | | const ENV_DEV = 'syjysapi.yanshiz.com' // dev |
| | | // const ENV_DEV = '192.168.10.6:8086' // dev |
| | | |
| | | // const ENV_PRO = 'qheufhj.site' // app域名 |
| | | // const ENV_PRO = window.location.hostname // 接口域名跟随 H5zhapi.coinbtcs.com |
| | | const ENV_PRO = 'api.cme-coin.com' // 接口域名跟随 H5zhapi.coinbtcs.com |
| | | const ENV_PRO = 'syjysapi.yanshiz.com' // 接口域名跟随 H5zhapi.coinbtcs.com |
| | | // const ENV_PRO = '192.168.10.6:8086' // 接口域名跟随 H5zhapi.coinbtcs.com |
| | | |
| | | let base_url = '' |
| | |
| | | "最多可转": "Höchstens ein", |
| | | "合约历史": "Geschichte des vertrags", |
| | | "逐仓": "Sie scheunen", |
| | | "申购时间": "Zeit für bestellungen", |
| | | "每张金额": "Jeder betrag", |
| | | "每张手续费": "Gebühr pro Anteil", |
| | | "申购": "Zeichnung", |
| | | "申购数量": "Zeichnungsmenge", |
| | | "申购记录": "Zeichnungsprotokoll", |
| | | "已认购": "Gezeichnet", |
| | | "未中签": "Nicht zugeteilt", |
| | | "已中签": "Zugeteilt", |
| | | "已缴纳": "Bezahlt", |
| | | "已分发": "Verteilt", |
| | | "中签数量": "Zuteilungsmenge", |
| | | } |
| | |
| | | "最多可转": "Non trasferibile", |
| | | "合约历史": "Storia dei contratti", |
| | | "逐仓": "Per sili", |
| | | "申购时间": "Termine per la ricezione delle offerte", |
| | | "每张金额": "Importo per foglio", |
| | | "每张手续费": "Commissione per azione", |
| | | "申购": "Sottoscrizione", |
| | | "申购数量": "Quantità di sottoscrizione", |
| | | "申购记录": "Registro di sottoscrizione", |
| | | "已认购": "Sottoscritto", |
| | | "未中签": "Non assegnato", |
| | | "已中签": "Assegnato", |
| | | "已缴纳": "Pagato", |
| | | "已分发": "Distribuito", |
| | | "中签数量": "Quantità di assegnazione", |
| | | } |
| | |
| | | "最多可转": "回す ことができます", |
| | | "合约历史": "契約履歴です", |
| | | "逐仓": "倉を逐います", |
| | | "申购时间": "申し込み期間です", |
| | | "每张金额": "1枚あたりの金額です", |
| | | "每张手续费": "1株当たり手数料", |
| | | "申购": "申込み", |
| | | "申购数量": "申込数量", |
| | | "申购记录": "申込記録", |
| | | "已认购": "申込済み", |
| | | "未中签": "落選", |
| | | "已中签": "当選", |
| | | "已缴纳": "支払済み", |
| | | "已分发": "配布済み", |
| | | "中签数量": "当選数量", |
| | | } |
| | |
| | | "最多可转": "Até voltas disponíveis", |
| | | "合约历史": "Histórico de contratos", |
| | | "逐仓": "Cada cápsula", |
| | | "申购时间": "Horário de solicitação", |
| | | "每张金额": "Valor por cada", |
| | | "每张手续费": "Taxa por ação", |
| | | "申购": "Subscrição", |
| | | "申购数量": "Quantidade de subscrição", |
| | | "申购记录": "Registro de subscrição", |
| | | "已认购": "Subscrito", |
| | | "未中签": "Não alocado", |
| | | "已中签": "Alocado", |
| | | "已缴纳": "Pago", |
| | | "已分发": "Distribuído", |
| | | "中签数量": "Quantidade de alocação", |
| | | } |
| | |
| | | "最多可转": "Hasta vueltas disponibles", |
| | | "合约历史": "Historial de contratos", |
| | | "逐仓": "En cubierta", |
| | | "申购时间": "Hora de solicitud", |
| | | "每张金额": "Cantidad por cada", |
| | | "每张手续费": "Comisión por acción", |
| | | "申购": "Suscripción", |
| | | "申购数量": "Cantidad de suscripción", |
| | | "申购记录": "Registro de suscripción", |
| | | "已认购": "Suscrito", |
| | | "未中签": "No asignado", |
| | | "已中签": "Asignado", |
| | | "已缴纳": "Pagado", |
| | | "已分发": "Distribuido", |
| | | "中签数量": "Cantidad de asignación", |
| | | } |
| | |
| | | "最多可转": "最多可轉", |
| | | "合约历史": "合約歷史", |
| | | "逐仓": "逐倉", |
| | | "申购时间": "申購時間", |
| | | "每张金额": "每張金額", |
| | | "每张手续费": "每張手續費", |
| | | "申购": "申購", |
| | | "申购数量": "申購數量", |
| | | "申购记录": "申購記錄", |
| | | "已认购": "已認購", |
| | | "未中签": "未中籤", |
| | | "已中签": "已中籤", |
| | | "已缴纳": "已繳納", |
| | | "已分发": "已分發", |
| | | "中签数量": "中籤數量", |
| | | } |
| | |
| | | "最多可转": "Up to transferable", |
| | | "合约历史": "Contract history", |
| | | "逐仓": "Warehouse by warehouse", |
| | | "申购时间": "Subscription time", |
| | | "每张金额": "Each amount", |
| | | "每张手续费": "Fee per share", |
| | | "申购": "Subscription", |
| | | "申购数量": "Subscription quantity", |
| | | "申购记录": "Subscription record", |
| | | "已认购": "Subscribed", |
| | | "未中签": "Not allocated", |
| | | "已中签": "Allocated", |
| | | "已缴纳": "Paid", |
| | | "已分发": "Distributed", |
| | | "中签数量": "Allocation quantity", |
| | | } |
| | |
| | | "最多可转": "Maximum de tours disponibles", |
| | | "合约历史": "Historique des contrats", |
| | | "逐仓": "Chaque silo", |
| | | "申购时间": "Temps de demande", |
| | | "每张金额": "Montant par pièce", |
| | | "每张手续费": "Frais par action", |
| | | "申购": "Souscription", |
| | | "申购数量": "Quantité de souscription", |
| | | "申购记录": "Enregistrement de souscription", |
| | | "已认购": "Souscrit", |
| | | "未中签": "Non attribué", |
| | | "已中签": "Attribué", |
| | | "已缴纳": "Payé", |
| | | "已分发": "Distribué", |
| | | "中签数量": "Quantité d'attribution", |
| | | } |
| | |
| | | "最多可转": "최대 전환 가능", |
| | | "合约历史": "계약 내역", |
| | | "逐仓": "창을", |
| | | "申购时间": "구입 신청 시간", |
| | | "每张金额": "장당 금액", |
| | | "每张手续费": "주당 수수료", |
| | | "申购": "청약", |
| | | "申购数量": "청약 수량", |
| | | "申购记录": "청약 기록", |
| | | "已认购": "청약 완료", |
| | | "未中签": "낙첨", |
| | | "已中签": "당첨", |
| | | "已缴纳": "납입 완료", |
| | | "已分发": "배분 완료", |
| | | "中签数量": "당첨 수량", |
| | | } |
| | |
| | | "最多可转": "สามารถหมุนได้สูงสุด", |
| | | "合约历史": "ประวัติการทำงาน", |
| | | "逐仓": "นาที", |
| | | "申购时间": "ซื้อเวลา", |
| | | "每张金额": "จำนวนเงินต่อแผ่น", |
| | | "每张手续费": "ค่าธรรมเนียมต่อหุ้น", |
| | | "申购": "การจองซื้อ", |
| | | "申购数量": "จำนวนการจองซื้อ", |
| | | "申购记录": "บันทึกการจองซื้อ", |
| | | "已认购": "จองซื้อแล้ว", |
| | | "未中签": "ไม่ได้รับการจัดสรร", |
| | | "已中签": "ได้รับการจัดสรร", |
| | | "已缴纳": "ชำระแล้ว", |
| | | "已分发": "แจกจ่ายแล้ว", |
| | | "中签数量": "จำนวนที่ได้รับจัดสรร", |
| | | } |
| | |
| | | "最多可转": "Lên đến lượt", |
| | | "合约历史": "Lịch sử hợp đồng", |
| | | "逐仓": "Từng ngân thương", |
| | | "申购时间": "Thời gian mua sắm", |
| | | "每张金额": "Mỗi số tiền", |
| | | "每张手续费": "Phí mỗi cổ phiếu", |
| | | "申购": "Đăng ký mua", |
| | | "申购数量": "Số lượng đăng ký", |
| | | "申购记录": "Hồ sơ đăng ký", |
| | | "已认购": "Đã đăng ký", |
| | | "未中签": "Không được phân bổ", |
| | | "已中签": "Đã được phân bổ", |
| | | "已缴纳": "Đã thanh toán", |
| | | "已分发": "Đã phân phối", |
| | | "中签数量": "Số lượng được phân bổ", |
| | | } |
| | |
| | | "最多可转": "最多可转", |
| | | "合约历史": "合约历史", |
| | | "逐仓": "逐仓", |
| | | "申购时间": "申购时间", |
| | | "每张金额": "每张金额", |
| | | "每张手续费": "每张手续费", |
| | | "申购": "申购", |
| | | "申购数量": "申购数量", |
| | | "申购记录": "申购记录", |
| | | "已认购": "已认购", |
| | | "未中签": "未中签", |
| | | "已中签": "已中签", |
| | | "已缴纳": "已缴纳", |
| | | "已分发": "已分发", |
| | | "中签数量": "中签数量", |
| | | } |
| | |
| | | }, ] |
| | | }, |
| | | { |
| | | path: '/ICO', |
| | | name: 'ICO', |
| | | meta: { |
| | | tarbar: true, |
| | | keepAlive: true |
| | | }, |
| | | redirect: '/ICO/ico', |
| | | component: () => import('@/views/Layout.vue'), |
| | | children: [{ |
| | | path: 'ico', |
| | | meta: { |
| | | tarbar: false, |
| | | keepAlive: true |
| | | }, |
| | | component: () => import( /* webpackChunkName: "ico" */ /* webpackPrefetch: true */ |
| | | '@/views/ICO/ico.vue') |
| | | },{ |
| | | path: 'icoRecord', |
| | | meta: { |
| | | tarbar: false, |
| | | keepAlive: true |
| | | }, |
| | | component: () => import( /* webpackChunkName: "icoRecord" */ /* webpackPrefetch: true */ |
| | | '@/views/ICO/icoRecord.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | path: '/optional', |
| | | name: 'optional', |
| | | meta: { |
| | |
| | | // 通过vuex state获取当前的token是否存在 |
| | | next() |
| | | } else { |
| | | // loginButton().then(() => { |
| | | // console.log('钱包授权成功'); |
| | | // next(); // 授权成功后允许跳转 |
| | | // }).catch(() => { |
| | | // console.error('钱包授权失败'); |
| | | // next(false); // 授权失败,阻止跳转 |
| | | // }); |
| | | // 钱包登录逻辑 |
| | | loginButton() |
| | | |
| | | // 账户密码登录逻辑 |
| | | // next({ |
| | | // path: '/login', |
| | | // }) |
| | | // next({ |
| | | // path: '/', |
| | | // }) |
| | | } |
| | | } else { |
| New file |
| | |
| | | import request from './request' |
| | | import { |
| | | METHODS |
| | | } from '@/config' |
| | | import { |
| | | API_PREFIX |
| | | } from '@/config' |
| | | |
| | | //ico列表 |
| | | export const _icoList = (params) => { |
| | | return request({ |
| | | url: `${API_PREFIX}/ico/list`, |
| | | method: METHODS.GET, |
| | | data: params |
| | | }) |
| | | }; |
| | | //ico申购 |
| | | export const _icoSubscribe = (params) => { |
| | | return request({ |
| | | url: `${API_PREFIX}/ico/subscribe`, |
| | | method: METHODS.POST, |
| | | data: params |
| | | }) |
| | | }; |
| | | //ico申购记录列表 |
| | | export const _icoRecordList = (params) => { |
| | | return request({ |
| | | url: `${API_PREFIX}/ico/recordList`, |
| | | method: METHODS.GET, |
| | | data: params |
| | | }) |
| | | }; |
| | |
| | | if (config.data) { |
| | | // config.data = qs.stringify(config.data) |
| | | } |
| | | }else if(config.method == 'get' && config.data){ |
| | | config.params = config.data |
| | | } |
| | | const userStore = useUserStore() |
| | | const TOKEN = userStore.userInfo.token |
| | |
| | | showLoadingToast({ forbidClick: true, duration: 0 }) |
| | | isClose = true |
| | | } |
| | | |
| | | return config |
| | | }, error => { |
| | | return Promise.reject(error) |
| New file |
| | |
| | | <template> |
| | | <div class="ico"> |
| | | <fx-header> |
| | | <template v-slot:title> |
| | | <div>ICO</div> |
| | | </template> |
| | | <template v-slot:right> |
| | | <van-icon name="todo-list-o" @click="$router.push('/ICO/icoRecord')" /> |
| | | </template> |
| | | </fx-header> |
| | | |
| | | <div class="ico_list"> |
| | | <div class="ico_item mb-5" v-for="i in icoList" :key="i.id"> |
| | | <div class="item_1"> |
| | | {{ i.symbol }} ({{ i.name }}) |
| | | </div> |
| | | <div class="item_2 flex justify-between"> |
| | | <div class="mr-5">{{$t('申购时间')}}</div> |
| | | <div>{{ i.startDate }} ~ {{ i.endDate }}</div> |
| | | </div> |
| | | <div class="item_2 flex justify-between"> |
| | | <div>{{$t('listingDate')}}</div> |
| | | <div>{{ i.marketDate }}</div> |
| | | </div> |
| | | <div class="item_2 flex justify-between"> |
| | | <div>{{$t('每张金额')}}</div> |
| | | <div>{{ i.unitAmount }}</div> |
| | | </div> |
| | | <div class="item_2 flex justify-between"> |
| | | <div>{{$t('每张手续费')}}</div> |
| | | <div>{{ i.unitFee }}</div> |
| | | </div> |
| | | <div class="item_3 flex justify-center"> |
| | | <van-button type="default" round size="large" @click="openBuy(i)">{{$t('申购')}}</van-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <!-- 购买弹窗 --> |
| | | <van-popup v-model:show="show" round > |
| | | <div class="buy_popup"> |
| | | <div class="buy_title flex justify-center">{{ itemObj.symbol }}</div> |
| | | |
| | | <van-field v-model="sgNum" type="digit" :label="$t('申购数量')" /> |
| | | |
| | | <div class="flex justify-center mt-5"> |
| | | <van-button type="default" size="large" round @click="buy">{{$t('confirm')}}</van-button> |
| | | </div> |
| | | </div> |
| | | </van-popup> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref } from "vue"; |
| | | import { showToast } from 'vant' |
| | | import { _icoList, _icoSubscribe } from "@/service/ico.api.js"; |
| | | import { useI18n } from "vue-i18n"; |
| | | const { t } = useI18n() |
| | | |
| | | // 获取列表 |
| | | const icoList = ref([]) |
| | | _icoList().then(res => { |
| | | icoList.value = res.records |
| | | }).catch(err => { |
| | | showToast(err.msg) |
| | | }) |
| | | |
| | | // 打开申购弹窗 |
| | | const show = ref(false) // 控制弹窗显示 |
| | | const itemObj = ref({}) // ico列表项 |
| | | const sgNum = ref(0) // 申购数量 |
| | | const openBuy = (i) => { |
| | | show.value = true |
| | | itemObj.value = i |
| | | } |
| | | |
| | | // 申购 |
| | | const buy = () => { |
| | | let opt = { |
| | | icoProjectId:itemObj.value.id, |
| | | subscribeNums: sgNum.value, |
| | | subscriptionType:1, |
| | | } |
| | | _icoSubscribe(opt).then(res => { |
| | | showToast(t('submitSuccess')) |
| | | show.value = false |
| | | }).catch(err => { |
| | | showToast(err) |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .ico{ |
| | | padding: 0rem 1.2rem 2rem 1.2rem; |
| | | font-size: 1.5rem; |
| | | .buy_popup{ |
| | | width: 40rem; |
| | | padding: 1rem; |
| | | |
| | | .buy_title{ |
| | | font-size: 2.5rem; |
| | | font-weight: 700; |
| | | border-bottom: #aaa solid 1px; |
| | | padding: 1rem; |
| | | } |
| | | } |
| | | |
| | | .ico_list{ |
| | | padding: 1rem 0rem; |
| | | .ico_item{ |
| | | background-color: #eee; |
| | | padding:.5rem 1rem; |
| | | border: #aaa solid 1px; |
| | | border-radius: 1rem; |
| | | .item_1{ |
| | | padding: 1rem .5rem; |
| | | border-bottom: #ccc solid 1px; |
| | | font-size: 2rem; |
| | | font-weight: 700; |
| | | } |
| | | .item_2{ |
| | | padding: 1rem .5rem; |
| | | border-bottom: #ccc solid 1px; |
| | | font-size: 1.6rem; |
| | | font-weight: 500; |
| | | &>div:last-child{ |
| | | color: #999; |
| | | } |
| | | } |
| | | .item_3{ |
| | | padding: .5rem; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <div class="icoRecord"> |
| | | <fx-header> |
| | | <template v-slot:title> |
| | | <div>{{$t('申购记录')}}</div> |
| | | </template> |
| | | </fx-header> |
| | | |
| | | <van-tabs v-model:active="active"> |
| | | <van-tab name="0" :title="$t('all')"></van-tab> |
| | | <van-tab name="1" :title="$t('已认购')"></van-tab> |
| | | <van-tab name="2" :title="$t('未中签')"></van-tab> |
| | | <van-tab name="3" :title="$t('已中签')"></van-tab> |
| | | <van-tab name="4" :title="$t('已缴纳')"></van-tab> |
| | | <van-tab name="5" :title="$t('已分发')"></van-tab> |
| | | </van-tabs> |
| | | |
| | | <div class="icoRecord_list"> |
| | | <div class="icoRecord_item mb-5" v-for="(item,index) in recordLIst" :key="index"> |
| | | <div class="item_1"> |
| | | {{ item.symbol }} ({{ item.name }}) |
| | | </div> |
| | | <div class="item_2 flex justify-between"> |
| | | <div>{{ $t('state') }}</div> |
| | | <div>{{ getStatus(item.status) }}</div> |
| | | </div> |
| | | <div class="item_2 flex justify-between"> |
| | | <div>{{ $t('申购数量') }}</div> |
| | | <div>{{ item.subscribeNums }}</div> |
| | | </div> |
| | | <div class="item_2 flex justify-between"> |
| | | <div>{{ $t('中签数量') }}</div> |
| | | <div>{{ item.ballotNumber }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, watch } from "vue"; |
| | | import { showToast } from 'vant' |
| | | import { _icoRecordList } from "@/service/ico.api.js"; |
| | | import { useI18n } from "vue-i18n"; |
| | | const { t } = useI18n() |
| | | |
| | | // tab切换 |
| | | const active = ref('0'); |
| | | watch(active, (val) => { |
| | | getList() |
| | | }) |
| | | |
| | | // 获取记录列表 |
| | | const recordLIst = ref([]) // 记录列表 |
| | | const getList = () => { |
| | | let opt = { |
| | | status: active.value |
| | | } |
| | | _icoRecordList(opt).then((res) => { |
| | | console.log(res); |
| | | recordLIst.value = res.records |
| | | }) |
| | | } |
| | | getList() |
| | | |
| | | // 根据状态转换对应的文字 |
| | | const getStatus = (status) => { |
| | | let str = '' |
| | | switch (status) { |
| | | case 1: |
| | | str = t('已认购') |
| | | break; |
| | | case 2: |
| | | str = t('未中签') |
| | | break; |
| | | case 3: |
| | | str = t('已中签') |
| | | break; |
| | | case 4: |
| | | str = t('已缴纳') |
| | | break; |
| | | case 5: |
| | | str = t('已分发') |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | return str |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .icoRecord{ |
| | | padding: 0rem 1.2rem 2rem 1.2rem; |
| | | font-size: 1.5rem; |
| | | |
| | | .icoRecord_list{ |
| | | padding: 1rem 0rem; |
| | | .icoRecord_item{ |
| | | background-color: #eee; |
| | | padding:.5rem 1rem; |
| | | border: #aaa solid 1px; |
| | | border-radius: 1rem; |
| | | .item_1{ |
| | | padding: 1rem .5rem; |
| | | border-bottom: #ccc solid 1px; |
| | | font-size: 2rem; |
| | | font-weight: 700; |
| | | } |
| | | .item_2{ |
| | | padding: 1rem .5rem; |
| | | border-bottom: #ccc solid 1px; |
| | | font-size: 1.6rem; |
| | | font-weight: 500; |
| | | |
| | | &>div:last-child{ |
| | | color: #999; |
| | | } |
| | | } |
| | | .item_3{ |
| | | padding: .5rem; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | // { key: 8, name: t('卡券中心'), icon: new URL('@/assets/imgs/home/home_7.png', import.meta.url) }, |
| | | { key: 9, name: t('闪兑'), icon: new URL('@/assets/imgs/home/home_8.png', import.meta.url), path: '/cryptos/exchangePage' }, |
| | | // { key: 10, name: t('更多'), icon: new URL('@/assets/imgs/home/home_9.png', import.meta.url) }, |
| | | { key: 11, name: "ICO", icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '' }, |
| | | |
| | | { key: 11, name: "ICO", icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '/ICO/ico' }, |
| | | { key: 12, name: "C2C", icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url), path: '' }, |
| | | ] |
| | | |