dcc
2024-06-07 d5381ec06ab5f549fade867c3a874de613bdd5d4
去掉BNB充值,调试好充值接口
5 files modified
13888 ■■■■ changed files
src/API/recharge.js 191 ●●●● patch | view | raw | blame | history
src/page/assetsCenter/profile.vue 6 ●●●● patch | view | raw | blame | history
src/page/recharge/rechargeList.vue 8 ●●●● patch | view | raw | blame | history
src/page/recharge/rechargePage.vue 34 ●●●● patch | view | raw | blame | history
yarn.lock 13649 ●●●● patch | view | raw | blame | history
src/API/recharge.js
@@ -1,131 +1,142 @@
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
};
src/page/assetsCenter/profile.vue
@@ -23,7 +23,7 @@
          </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="" />
@@ -100,6 +100,10 @@
    this.GET_UERS_KYC();
  },
  methods: {
    openApp(){
      window.open('https://down.gayssad.com/','_blank')
    },
    ...mapActions("user", ["GET_UERS_KYC"]),
    loginOut() {
src/page/recharge/rechargeList.vue
@@ -27,23 +27,23 @@
          <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>
src/page/recharge/rechargePage.vue
@@ -31,7 +31,7 @@
          {{ $t("复制地址") }}
        </div>
      </div>
      <!-- <div>
       <div>
        <div class="font-26 textColor">{{ $t("转出地址(选填)") }}</div>
        <div style="position: relative" class="mt-26 mb-60">
          <input
@@ -53,8 +53,8 @@
            {{ $t("粘贴") }}
          </div>
        </div>
      </div> -->
      <!-- <div class="mb-60">
      </div>
       <div class="mb-60">
        <div class="font-26 textColor">{{ $t("充币数量") }}</div>
        <div>
          <input
@@ -63,8 +63,8 @@
            :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'"
@@ -72,8 +72,8 @@
                        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>
@@ -88,9 +88,9 @@
            :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>
@@ -101,7 +101,7 @@
          {{ $t("下一步") }}
        </button>
      </div>
    </div> -->
    </div>
  </div>
</template>
@@ -196,13 +196,15 @@
  },
  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) {
yarn.lock
Diff too large