diff --git a/api/wallet.js b/api/wallet.js index b128ba9..f980836 100644 --- a/api/wallet.js +++ b/api/wallet.js @@ -179,6 +179,18 @@ class Wallet { static addAdvice(data){ return Serve.post('/user/addAdvice',data,{loading:true}) } + static activity(data){ + return Serve.get('/financial/activity',data) + } + static financialNow(data){ + return Serve.post('/financial/financialNow',data,{loading:true}) + } + static financial_records(data){ + return Serve.get('/financial/financial_records',data) + } + static financial_redemption(data){ + return Serve.get('/financial/financial_redemption',data) + } } export default Wallet; \ No newline at end of file diff --git a/assets/img/hint.png b/assets/img/hint.png new file mode 100644 index 0000000..74bd065 Binary files /dev/null and b/assets/img/hint.png differ diff --git a/assets/img/home/user.png b/assets/img/home/user.png new file mode 100644 index 0000000..8081c5f Binary files /dev/null and b/assets/img/home/user.png differ diff --git a/assets/img/rise.png b/assets/img/rise.png new file mode 100644 index 0000000..49ab124 Binary files /dev/null and b/assets/img/rise.png differ diff --git a/element/index.js b/element/index.js index f4715c0..68f6e7b 100644 --- a/element/index.js +++ b/element/index.js @@ -1,8 +1,12 @@ // 导入自己需要的组件 -import { Slider } from 'element-ui' +import { Slider,Collapse,CollapseItem } from 'element-ui' +const components = [Slider,Collapse,CollapseItem] const element = { install: function (Vue) { - Vue.use(Slider) + // Vue.use(Slider) + components.forEach(component => { + Vue.use(component) + }) } } export default element \ No newline at end of file diff --git a/i18n/lang/en.json b/i18n/lang/en.json index 75d9269..98a9d80 100644 --- a/i18n/lang/en.json +++ b/i18n/lang/en.json @@ -77,7 +77,53 @@ "c15": "Reset withdrawal password", "rejection":"Reason for rejection", "c35": "Contact Us", - "c36": "send" + "c36": "send", + "d1": "manage finances", + "d2": "Financial Account", + "d3": "Easy to Earn Coins: Efficient, Time-Saving, and Effortless", + "d4": "High-Security Trading Platform, Keep Your Digital Assets Secure and Earn More", + "d5": "Product", + "d6": "Holding", + "d7": "History", + "d8": "Currency", + "d9": "Market Daily", + "d10": "Term", + "d11": "Operation", + "d12": "Subscription", + "d13": "Holding Period", + "d14": "Redemption", + "d15": "Redemption Time", + "d16": "Current/Fixed Deposit", + "d17": "Current Deposit", + "d18": "Financial Subscription", + "d19": "Financial Redemption", + "d20": "Redemption is not supported within the fixed term", + "d21": "Current Profit", + "d22": "Available Balance", + "d23": "Wealth Management Assets", + "d24": "Yesterday's Income", + "d25": "Business Income", + "d26": "Cumulative Income", + "d27": "By quantity", + "d28": "By product", + "d29": "Subscription Quantity", + "d30": "Minimum 100.00", + "d31": "Deposit", + "d32": "What You Can Earn", + "d33": "Rewards", + "d34": "BXPE Reward Rules", + "d35": "For every 100 USDT invested, you will receive 20 BXPE rewards.", + "d36": "Calculation formula: Total invested funds - Redemption funds = Calculation amount (calculated per 100 USDT)", + "d37": "Overview", + "d38": "Product Rules", + "d39": "Estimated Daily Return", + "d40": "The annualized rate does not represent actual or expected returns calculated in fiat currency. Please refer to the product rules for the relevant return mechanism.", + "d41": "Returns", + "d42": "Returns will be calculated starting from the day after subscription, and interest income will be distributed daily.", + "d43": "After a successful redemption application, the current assets will be immediately returned to your wealth management wallet.", + "d44": "Accumulated interest", + "d45": "Regular", + "d46": "The selected assets will be redeemed immediately and in full to your financial account." }, "base": { "a0": "Title", diff --git a/i18n/lang/zh-TW.json b/i18n/lang/zh-TW.json index 2623c89..2bf6a6e 100644 --- a/i18n/lang/zh-TW.json +++ b/i18n/lang/zh-TW.json @@ -76,7 +76,53 @@ "c15": "重置提款密碼", "rejection":"拒絕理由", "c35": "聯繫我們", - "c36": "發送" + "c36": "發送", + "d1": "理財", + "d2": "理財帳戶", + "d3": "簡單賺幣:高效、省時、省力", + "d4": "高安全性交易平台,讓您的數位資產安全無憂,收益更加可觀", + "d5": "產品", + "d6": "持有", + "d7": "歷史", + "d8": "幣種", + "d9": "市場日化", + "d10": "期限", + "d11": "操作", + "d12": "申購", + "d13": "持有時間", + "d14": "贖回", + "d15": "贖回時間", + "d16": "活期/定期", + "d17": "活期", + "d18": "理財申購", + "d19": "理財贖回", + "d20": "固定期限內不支援贖回", + "d21": "当前盈利", + "d22": "可用餘額", + "d23": "理財資產", + "d24": "昨日收益", + "d25": "業務收益", + "d26": "累計收益", + "d27": "按數量", + "d28": "按產品", + "d29": "申購數量", + "d30": "最少100.00", + "d31": "充值", + "d32": "你可獲得", + "d33": "獎勵", + "d34": "BXPE獎勵規則", + "d35": "投入的淨資金每100USDT可獲得20枚BXPE獎動。", + "d36": "計算公式:投入總資金-贖回資金=計算金額(技每100usdt計算)", + "d37": "概覽", + "d38": "產品規則", + "d39": "預計每日收益", + "d40": "年化率井不代表以法幣計算的實際或預期收益,相關收益機制請參考產品規則。", + "d41": "收益", + "d42": "申購後第二天開始計算收益,每天分配一次利息收益。", + "d43": "赎回申请成功后,活期的资产立即退回你的理财钱包。", + "d44": "累計利息", + "d45": "定期", + "d46": "所選的資產立即全額贖回至您的理財帳戶。" }, "base": { "a0": "標題", diff --git a/main.js b/main.js index a2c6788..55810f9 100644 --- a/main.js +++ b/main.js @@ -3,9 +3,9 @@ import App from './App.vue' import '@/plugins' import i18n from "./i18n"; import store from './store' -// import 'element-ui/lib/theme-chalk/index.css' -// import element from './element/index' -// Vue.use(element) +import 'element-ui/lib/theme-chalk/index.css' +import element from './element/index' +Vue.use(element) //把vuex定义成全局组件 Vue.prototype.$store = store Vue.prototype._i18n = i18n; diff --git a/pages.json b/pages.json index 7de6c0c..4b3c739 100644 --- a/pages.json +++ b/pages.json @@ -182,6 +182,18 @@ { "path" : "pages/assets/userfeedback" }, + { + "path" : "pages/financialManagement/finances-history" + }, + { + "path" : "pages/financialManagement/finances-hold" + }, + { + "path" : "pages/financialManagement/finances-product" + }, + { + "path" : "pages/financialManagement/index" + }, { "path": "pages/service/index", "style": { @@ -224,6 +236,13 @@ "enablePullDownRefresh": false } + }, + { + "path" : "pages/invite/web-view", + "style" : + { + "navigationBarTitleText" : "" + } } ], "globalStyle": { diff --git a/pages/base/home.vue b/pages/base/home.vue index 5e145d9..f4485ce 100644 --- a/pages/base/home.vue +++ b/pages/base/home.vue @@ -194,8 +194,8 @@ + v-for="(item,index) in sortedMarketListHe" :key="index" + v-if="item.symbol=='BXPE'||item.symbol=='BTC'||item.symbol=='ETH'||item.symbol=='BNB'||item.symbol=='SOL'||item.symbol=='DOGE'"> @@ -766,10 +766,10 @@ - {{ $t("base.e6") }} - + --> --> - + {{ $t("base.c1") }} @@ -897,6 +897,16 @@ + + + + + {{ $t("invite.a0") }} + + + + @@ -926,7 +936,7 @@ --> - + {{ $t("accountSettings.a9") }} @@ -1062,6 +1072,13 @@ const is_agency = agency.data.user.is_agency return is_agency } + }, + sortedMarketListHe() { + return [...this.marketListHe].sort((a, b) => { + if (a.symbol === 'BXPE') return -1; // BXPE 排在最前 + if (b.symbol === 'BXPE') return 1; + return 0; // 其他保持原顺序 + }); } }, watch: { @@ -1104,6 +1121,10 @@ this.show = false; this.tabChange('exchange-operation') }, + contract() { + this.show = false; + this.tabChange('contract') + }, goReg() { uni.navigateTo({ url: '/pages/reg/index' diff --git a/pages/base/index.vue b/pages/base/index.vue index e4e7ee9..b5e33c0 100644 --- a/pages/base/index.vue +++ b/pages/base/index.vue @@ -31,6 +31,7 @@ import Help from "@/pages/help/index.vue" import Mine from "./mine"; import OptionList from "./option-list"; + import financialManagement from "../financialManagement/index"; // import List from "./list"; import Contract from "./contract"; export default { @@ -42,7 +43,8 @@ Mine, Contract, Purchase, - Help + Help, + financialManagement }, computed: { navList() { @@ -72,7 +74,18 @@ // icon: "static/img/base_qukuai_0.png", // activeIcon: "static/img/base_qukuai_1.png", // }, - + // { + // label: this.$t("purchase.a5"), + // tel: "purchase", + // icon: "static/img/base_qukuai_0.png", + // activeIcon: "static/img/base_qukuai_1.png", + // }, + { + label: this.$t("common.d1"), + tel: "financialManagement", + icon: "static/img/base_qukuai_0.png", + activeIcon: "static/img/base_qukuai_1.png", + }, { label: this.$t("base.d2"), tel: "mine", diff --git a/pages/base/mine.vue b/pages/base/mine.vue index d6c83e8..af873d2 100644 --- a/pages/base/mine.vue +++ b/pages/base/mine.vue @@ -53,9 +53,7 @@ - {{ - $t("base.b5") - }} + {{$t("base.b5")}} - {{ - $t("base.b6") - }} + {{$t("base.b6")}} - {{ - $t("base.d8") - }} + {{$t("base.d8")}} @@ -112,6 +106,14 @@ @click="tabActive=1"> {{$t('base.e4')}} + + @@ -288,6 +290,38 @@ + + + + + {{$t("common.d2")}} + + + {{ activeCoin.usable_balance }} + USDT + + + + + + + {{$t("contract.f0")}} + + + + + + @@ -304,8 +338,16 @@ import math from "@/utils/class/math.js"; import Profile from "@/api/profile"; import Contract from "@/api/contract.js"; + import financesProduct from "../financialManagement/finances-product"; + import financesHold from "../financialManagement/finances-hold"; + import financesHistory from "../financialManagement/finances-history"; export default { name: "mine", + components: { + financesProduct, + financesHold, + financesHistory + }, data() { return { account: {}, @@ -319,7 +361,10 @@ refreshing: false, otc: {}, ProfileDetail: {}, - user_auth_level: 0 + user_auth_level: 0, + coin_name1:"USDT", + activeCoin:{}, + ontourl:1 }; }, computed: { @@ -362,6 +407,19 @@ } }, methods: { + managefinancestab(val){ + this.ontourl = val + }, + getBalance(){ + let data = { + account: 4, + coin_name: this.coin_name1 + }; + Wallet.getBalance(data).then(res => { + this.activeCoin = res.data; + // console.log(res); + }); + }, onRefresh() { if (this.refreshing) return; this.refreshing = true; @@ -452,6 +510,7 @@ }, created() { this.upDateData(); + this.getBalance(); }, }; diff --git a/pages/financialManagement/finances-history.vue b/pages/financialManagement/finances-history.vue new file mode 100644 index 0000000..cbd3847 --- /dev/null +++ b/pages/financialManagement/finances-history.vue @@ -0,0 +1,194 @@ + + + + + \ No newline at end of file diff --git a/pages/financialManagement/finances-hold.vue b/pages/financialManagement/finances-hold.vue new file mode 100644 index 0000000..86f9c22 --- /dev/null +++ b/pages/financialManagement/finances-hold.vue @@ -0,0 +1,334 @@ + + + + + \ No newline at end of file diff --git a/pages/financialManagement/finances-product.vue b/pages/financialManagement/finances-product.vue new file mode 100644 index 0000000..994dd41 --- /dev/null +++ b/pages/financialManagement/finances-product.vue @@ -0,0 +1,369 @@ + + + + + \ No newline at end of file diff --git a/pages/financialManagement/index.vue b/pages/financialManagement/index.vue new file mode 100644 index 0000000..95d94cf --- /dev/null +++ b/pages/financialManagement/index.vue @@ -0,0 +1,124 @@ + + + + + \ No newline at end of file diff --git a/pages/invite/index.vue b/pages/invite/index.vue index f3442b1..4ab25df 100644 --- a/pages/invite/index.vue +++ b/pages/invite/index.vue @@ -2,7 +2,7 @@ - + @@ -29,7 +29,8 @@ - + + {{$t('invite.a6')}} @@ -43,26 +44,16 @@ - - + - + - + @@ -251,29 +242,50 @@ export default { }, saves(){ var that=this - uni.downloadFile({//下载 - url: this.imgs, //图片下载地址 - success: res => { - if (res.statusCode === 200) { - uni.hideLoading() - uni.saveImageToPhotosAlbum({//保存图片到系统相册。 - filePath: res.tempFilePath,//图片文件路径 - success: function() { - that.$toast(that.$t('common.b3')) - }, - fail: function(e) { - that.$toast(that.$t('common.b4')) - } - }); - } - }, - fail:res => { - uni.showToast({ - title: this.$t('common.b4'), - icon: 'none', - }); - } - }); + const link = document.createElement('a'); + link.href = this.imgs; + link.download = 'image' + '.jpg'; // 设置下载文件名 + link.target = '_blank'; // 在新窗口打开,避免页面跳转 + // 对于跨域图片,需要先转换为blob + fetch(this.imgs).then(response => response.blob()).then(blob => { + const url = window.URL.createObjectURL(blob); + link.href = url; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + window.URL.revokeObjectURL(url); + uni.hideLoading(); + that.$toast(that.$t('common.b3')) + }).catch(error => { + // 如果fetch失败,尝试直接下载 + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + that.$toast(that.$t('common.b4')) + }); + // uni.downloadFile({//下载 + // url: this.imgs, //图片下载地址 + // success: res => { + // if (res.statusCode === 200) { + // uni.hideLoading() + // uni.saveImageToPhotosAlbum({//保存图片到系统相册。 + // filePath: res.tempFilePath,//图片文件路径 + // success: function() { + // that.$toast(that.$t('common.b3')) + // }, + // fail: function(e) { + // that.$toast(that.$t('common.b4')) + // } + // }); + // } + // }, + // fail:res => { + // uni.showToast({ + // title: this.$t('common.b4'), + // icon: 'none', + // }); + // } + // }); }, callback($ev) { this.imgBase64 = $ev; diff --git a/pages/invite/web-view.vue b/pages/invite/web-view.vue new file mode 100644 index 0000000..94fbc70 --- /dev/null +++ b/pages/invite/web-view.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/purchase/index.vue b/pages/purchase/index.vue index 3701a3e..6f4143f 100644 --- a/pages/purchase/index.vue +++ b/pages/purchase/index.vue @@ -2,7 +2,8 @@ - + +