diff --git a/App.vue b/App.vue index 0150f73..4c95075 100644 --- a/App.vue +++ b/App.vue @@ -7,7 +7,7 @@ export default { setInterval(() => { this.$navFontColor(); }, 1000); - this.mobileLogo(); + // this.update() }, methods: { @@ -23,6 +23,7 @@ export default { title_logo: data.title_logo, share_logo: data.share_logo, name: data.name, + copyright: data.copyright }); }); }, @@ -127,6 +128,7 @@ export default { onShow: function () { uni.$emit("appShow"); this.$navFontColor(); + this.mobileLogo(); }, onHide: function () {}, }; diff --git a/manifest.json b/manifest.json index c70da70..563e829 100644 --- a/manifest.json +++ b/manifest.json @@ -5,6 +5,7 @@ "versionName" : "1.0.0", "versionCode" : 100, "transformPx" : false, + "sassImplementationName": "node-sass", "app-plus" : { "compatible" : { "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 diff --git a/pages/base/home.vue b/pages/base/home.vue index 2e19f50..e8543d2 100644 --- a/pages/base/home.vue +++ b/pages/base/home.vue @@ -1215,6 +1215,11 @@ + + + {{logoMap.copyright}} + {{contacts.email}} + @@ -1480,7 +1485,13 @@ export default { guideList: [],//课程列表 articleList: [], sortedNegativeItems:[], - sortedNegativeItems1:[] + sortedNegativeItems1:[], + contacts : { + contact:"", + email: "", + media:"", + service : "", + } } }, computed: { @@ -1722,48 +1733,55 @@ export default { this.homeList = data[1].marketInfoList;// 公告上面的数据获取动态 // console.log(data, '----------市场趋势获取源'); - let allNegativeIncreaseItems = [] this.sortedNegativeItems = [] + let allNegativeIncreaseItems = [] const excludedCoins = ["CQF", "HZL", "NKA", "PMK", "GCUL", "DFU", "ACK"]; - data.forEach((item) => { - if (item.marketInfoList) { - const negativeItems = item.marketInfoList.filter((info) => { - return ( - info.increaseStr && - info.increaseStr.startsWith("-") && - !excludedCoins.includes(info.coin_name) - ); - }); - allNegativeIncreaseItems.push(...negativeItems); // 合并到总数组 - } - }); - this.sortedNegativeItems = [...allNegativeIncreaseItems].sort((a, b) => { - const numA = parseFloat(a.increaseStr); - const numB = parseFloat(b.increaseStr); - return numA - numB; // 升序排列(小的在前) + data.forEach((item) => { + if (item.marketInfoList) { + const filteredItems = item.marketInfoList.filter((info) => { + return !excludedCoins.includes(info.coin_name); + }); + allNegativeIncreaseItems.push(...filteredItems); + } + }); + this.sortedNegativeItems = [...allNegativeIncreaseItems].sort((a, b) => { + const numA = parseFloat(a.increaseStr); + const numB = parseFloat(b.increaseStr); + const isANegative = numA < 0; + const isBNegative = numB < 0; + + if (isANegative && !isBNegative) { + return -1; + } + if (!isANegative && isBNegative) { + return 1; + } + return numA - numB; }); let allPositiveIncreaseItems = []; // 存储 "+" 开头的项 this.sortedNegativeItems1 = []; // 存储排序后的结果 - data.forEach((item) => { - if (item.marketInfoList) { - const positiveItems = item.marketInfoList.filter((info) => { - return ( - info.increaseStr && - info.increaseStr.startsWith("+") && - !excludedCoins.includes(info.coin_name) - ); - }); - allPositiveIncreaseItems.push(...positiveItems); // 合并到总数组 - } + if (item.marketInfoList) { + const filteredItems = item.marketInfoList.filter((info) => { + return !excludedCoins.includes(info.coin_name); + }); + allPositiveIncreaseItems.push(...filteredItems); + } }); - - // 按数值降序排列(大的在前) - this.sortedNegativeItems1 = [...allPositiveIncreaseItems].sort((a, b) => { - const numA = parseFloat(a.increaseStr); - const numB = parseFloat(b.increaseStr); - return numB - numA; // 降序(大的在前) + this.sortedNegativeItems1 = [...allPositiveIncreaseItems].sort((a, b) => { + const numA = parseFloat(a.increaseStr); + const numB = parseFloat(b.increaseStr); + const isANegative = numA < 0; + const isBNegative = numB < 0; + + if (isANegative && !isBNegative) { + return 1; + } + if (!isANegative && isBNegative) { + return -1; + } + return numB - numA; }); } }) @@ -1860,6 +1878,11 @@ export default { }) .catch(() => { }) }, + serviceDetail() { + Member.contact({}).then((res)=>{ + this.contacts = res.data; + }) + }, // 切换用户 outLogin() { uni.removeStorageSync("token") @@ -1938,6 +1961,7 @@ export default { this.indexData() this.indexMarketList() this.getCurrencyExCny() + this.serviceDetail(); if (this.isLogin) { this.createWalletAddress() this.getAuthInfo() @@ -3391,4 +3415,9 @@ export default { padding: 0rpx 20rpx; border-radius: 40rpx; } +.botton_logoMap{ + color: var(--col2); + text-align: center; + padding: 60rpx 0rpx; +}