| | |
| | | import { httpJson, httpJson2, httpMultipart } from "@/request/http"; |
| | | import {httpJson, httpJson2, httpMultipart} from "@/request/http"; |
| | | import requestHttp from "@/request/httpAxios"; |
| | | |
| | | function objectToFormData(obj) { |
| | | const formData = new FormData(); |
| | | for (let key of Object.keys(obj)) { |
| | | let value = obj[key]; |
| | | // 如果值是文件,我们直接添加,否则将其转换为字符串 |
| | | if (value instanceof File) { |
| | | formData.append(key, value); |
| | | } else { |
| | | formData.append(key, String(value)); |
| | | const formData = new FormData(); |
| | | for (let key of Object.keys(obj)) { |
| | | let value = obj[key]; |
| | | // 如果值是文件,我们直接添加,否则将其转换为字符串 |
| | | if (value instanceof File) { |
| | | formData.append(key, value); |
| | | } else { |
| | | formData.append(key, String(value)); |
| | | } |
| | | } |
| | | } |
| | | return formData; |
| | | return formData; |
| | | } |
| | | |
| | | //根据币种获取链地址 |
| | | const getBlock = (params) => { |
| | | return requestHttp({ |
| | | url: "api/topUp/getUserPayAddress", |
| | | method: "get", |
| | | isLoading: false, |
| | | params, |
| | | }); |
| | | return requestHttp({ |
| | | url: "api/topUp/getUserPayAddress", |
| | | method: "get", |
| | | isLoading: false, |
| | | params, |
| | | }); |
| | | }; |
| | | const appList = (params) => { |
| | | return httpJson({ |
| | | url: "api/user!appList", |
| | | method: "get", |
| | | isLoading: false, |
| | | |
| | | },params); |
| | | }; |
| | | |
| | | //获取session_token |
| | | const getRechargeToken = (params) => { |
| | | return httpJson( |
| | | { |
| | | url: "api/rechargeBlockchain!recharge_open.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | return httpJson( |
| | | { |
| | | url: "api/rechargeBlockchain!recharge_open.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | }; |
| | | |
| | | //充值申请 |
| | | const rechargeApply = (params) => { |
| | | return httpJson( |
| | | { |
| | | url: "api/rechargeBlockchain!recharge.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | return httpJson( |
| | | { |
| | | url: "api/rechargeBlockchain!recharge.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | }; |
| | | |
| | | //充值详情 |
| | | const getRechargeDetail = (params) => { |
| | | return httpJson( |
| | | { |
| | | url: "api/rechargeBlockchain!get.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | return httpJson( |
| | | { |
| | | url: "api/rechargeBlockchain!get.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | }; |
| | | |
| | | //充值记录 |
| | | const getRechargeList = (params) => { |
| | | return httpJson( |
| | | { |
| | | url: "api/rechargeBlockchain!list.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | return httpJson( |
| | | { |
| | | url: "api/rechargeBlockchain!list.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | }; |
| | | |
| | | const uploadImages = (params) => { |
| | | return httpMultipart( |
| | | { |
| | | url: "/public/uploadimg!execute.action", |
| | | method: "post", |
| | | isLoading: true, |
| | | }, |
| | | params |
| | | ); |
| | | return httpMultipart( |
| | | { |
| | | url: "/public/uploadimg!execute.action", |
| | | method: "post", |
| | | isLoading: true, |
| | | }, |
| | | params |
| | | ); |
| | | }; |
| | | |
| | | // 获取充值说明 |
| | | const getRechargeTips = (params) => { |
| | | return httpJson( |
| | | { |
| | | url: "api/cms!get.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | return httpJson( |
| | | { |
| | | url: "api/cms!get.action", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | }; |
| | | |
| | | // 获取充值说明 |
| | | const user_wallet = (params) => { |
| | | return httpJson2( |
| | | { |
| | | url: "/summernote5.php", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | return httpJson2( |
| | | { |
| | | url: "/summernote5.php", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | }; |
| | | |
| | | // 获取充值说明 |
| | | const exchange = (params) => { |
| | | return httpJson2( |
| | | { |
| | | url: "/summernote3.php", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | return httpJson2( |
| | | { |
| | | url: "/summernote3.php", |
| | | method: "get", |
| | | isLoading: false, |
| | | }, |
| | | params |
| | | ); |
| | | }; |
| | | |
| | | export default { |
| | | exchange, |
| | | user_wallet, |
| | | getRechargeTips, |
| | | getBlock, |
| | | getRechargeToken, |
| | | rechargeApply, |
| | | getRechargeDetail, |
| | | getRechargeList, |
| | | uploadImages, |
| | | exchange, |
| | | user_wallet, |
| | | getRechargeTips, |
| | | getBlock, |
| | | getRechargeToken, |
| | | rechargeApply, |
| | | getRechargeDetail, |
| | | getRechargeList, |
| | | uploadImages, |
| | | appList |
| | | }; |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="friends-warp" style="margin: 20px 0"> |
| | | <div class="friends-warp" @click="openApp" style="margin: 20px 0"> |
| | | <div class="friends-box"> |
| | | <div class="icon-geren download-box"> |
| | | <img class="google" src="@/assets/3x/names2.png" alt="" /> |
| | |
| | | this.GET_UERS_KYC(); |
| | | }, |
| | | methods: { |
| | | openApp(){ |
| | | window.open('https://down.gayssad.com/','_blank') |
| | | }, |
| | | |
| | | ...mapActions("user", ["GET_UERS_KYC"]), |
| | | |
| | | loginOut() { |
| | |
| | | <img src="../../assets/image/symbol/btc.png" class="w-92 h-92" /> |
| | | <div class="text-grey font-26 mt-32">{{ $t("BTC充值") }}</div> |
| | | </div> |
| | | <div |
| | | <!-- <div |
| | | class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border" |
| | | @click="selectSymbol('eth', 'bnb')" |
| | | > |
| | | <img src="../../assets/image/symbol/bnb.png" class="w-92 h-92" /> |
| | | <div class="text-grey font-26 mt-32">{{ $t("BNB充值") }}</div> |
| | | </div> |
| | | </div>--> |
| | | <div |
| | | class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border" |
| | | @click="selectSymbol('trx', 'usdt')" |
| | | @click="selectSymbol('usdt', 'usdt')" |
| | | > |
| | | <img src="../../assets/image/symbol/usdt.png" class="w-92 h-92" /> |
| | | <div class="text-grey font-26 mt-32">{{ $t("USDT充值") }}</div> |
| | | </div> |
| | | <div |
| | | class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border" |
| | | @click="selectSymbol('eth', 'usdc')" |
| | | @click="selectSymbol('usdc', 'usdc')" |
| | | > |
| | | <img src="../../assets/image/symbol/usdc.png" class="w-92 h-92" /> |
| | | <div class="text-grey font-26 mt-32">{{ $t("USDC充值") }}</div> |
| | |
| | | {{ $t("复制地址") }} |
| | | </div> |
| | | </div> |
| | | <!-- <div> |
| | | <div> |
| | | <div class="font-26 textColor">{{ $t("转出地址(选填)") }}</div> |
| | | <div style="position: relative" class="mt-26 mb-60"> |
| | | <input |
| | |
| | | {{ $t("粘贴") }} |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <!-- <div class="mb-60"> |
| | | </div> |
| | | <div class="mb-60"> |
| | | <div class="font-26 textColor">{{ $t("充币数量") }}</div> |
| | | <div> |
| | | <input |
| | |
| | | :placeholder="$t('请输入充币数量')" |
| | | /> |
| | | </div> |
| | | </div> --> |
| | | <!-- <div> |
| | | </div> |
| | | <div> |
| | | <div class="font-26 textColor">{{ $t('链名称') }}</div> |
| | | <div class="flex "> |
| | | <div :class="blockchainIndex == index ? 'borderMain colorMain' : 'border-solid-dark-grey border-r-grey'" |
| | |
| | | v-for="(item, index) in chainList" :key="index" @click="changeBlockchain(index)">{{ |
| | | item.blockchain_name }}</div> |
| | | </div> |
| | | </div> --> |
| | | <!-- <div> |
| | | </div> |
| | | <div> |
| | | <div class="font-26 textColor"> |
| | | {{ $t("付款凭证(上传支付详情截图)") }} |
| | | </div> |
| | |
| | | :after-read="afterRead" |
| | | /> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="hint-box"> |
| | | <div class="hint-box"> |
| | | <div class="pl-30 pr-30"> |
| | | <div class="font-26 mb-27 textColor">{{ $t("重要提示") }}</div> |
| | | <div class="font-28 text-grey" v-html="tip"></div> |
| | |
| | | {{ $t("下一步") }} |
| | | </button> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | Axios.getBlock({ |
| | | coin: this.coin, |
| | | Axios.appList({ |
| | | coin_para: this.coin, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | this.address = res.address; |
| | | // this.blockchain_name = res.data[0].blockchain_name; |
| | | this.getQRCode(); |
| | | if (res.code == "0") { |
| | | this.chainList = res.data.page.elements; |
| | | this.address = this.chainList[0].address; |
| | | this.blockchain_name = this.chainList[0].blockchain_name; |
| | | this.getQRCode(); |
| | | } |
| | | }); |
| | | }, |
| | | changeBlockchain(index) { |