lhl 2 years ago
parent
commit
de9f0f75c8

+ 48 - 25
hybrid/html/js/kline.js

@@ -84,7 +84,9 @@ var app = new Vue({
 		// } else {
 		// }
 			this.scoketInit()
-			this.gcb()
+			if(this.typeId == 'GCB-USDT') {
+				this.gcb()
+			}
 
 	},
 	mounted() {
@@ -95,28 +97,40 @@ var app = new Vue({
 		this.getDealHis();
 	},
 	methods: {
+		sgToFixed(num,digit=2){
+		    let nums=(num||0).toString().split('.');
+		    return nums[0]+'.'+(nums[1]||'0').padEnd(digit, "0");    
+		},
 		// 
 		gcb() {
 			let that = this
 			axiosGet('/Levertade/gcb', {}).then(res => {
 				console.log(JSON.stringify(res), 'gcb++++')
 				console.log(res.name,'res.name+++++++++++++++++++++++++++')
-				that.txData.name = res.name
-				that.txData.lastPrice = +res.last
-				that.txData.high = +res.max_price
-				that.txData.volume = +res.hou_price
-				that.txData.low = +res.min_price
-				console.log(that.txData.lastPrice,that.txData.volume,'lastPricelastPricelastPricelastPricelastPricelastPrice')
-				that.txData.upRate = ((that.txData.lastPrice - that.txData.volume) / that.txData
-					.volume * 100).toFixed(2)
-				txData.upFlag = +that.txData.upRate > 0 ? 1 : 2;
-				if (that.timer) {
-					clearTimeout(that.timer)
-					that.timer = null
+				if(that.typeId == 'GCB-USDT') {
+					that.txData.name = res.name
+					that.txData.lastPrice = +res.last
+					that.txData.high = that.sgToFixed(+res.max_price)
+					that.txData.volume = that.sgToFixed(+res.hou_price)
+					that.txData.low = that.sgToFixed(+res.min_price)
+					console.log(that.txData.lastPrice,that.txData.volume,'lastPricelastPricelastPricelastPricelastPricelastPrice')
+					that.txData.upRate = that.sgToFixed(((that.txData.lastPrice - that.txData.volume) / that.txData
+						.volume * 100).toFixed(2))
+					txData.upFlag = +that.txData.upRate > 0 ? 1 : 2;
+					if (that.timer) {
+						clearTimeout(that.timer)
+						that.timer = null
+					}
+					that.timer = setTimeout(() => {
+						that.gcb()
+					},5000)
+				}else {
+					if (that.timer) {
+						clearTimeout(that.timer)
+						that.timer = null
+					}
 				}
-				that.timer = setTimeout(() => {
-					that.gcb()
-				},5000)
+				
 			})
 		},
 		// 返回上一页
@@ -682,15 +696,24 @@ var app = new Vue({
 						for (var i = 0; i < params.length; i++) {
 							if (params[i].seriesName === '日K') {
 								time = params[i].name;
-								open = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
-									1], 2)) : 0;
-								close = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
-									2], 2)) : 0;
-								low = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
-									3], 2)) : 0;
-								high = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
-									4], 2)) : 0;
-								amount = params[i].data.length > 1 ? Number(that.formatterNum(params[i]
+								// open = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
+								// 	1], 2)) : 0;
+								// close = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
+								// 	2], 2)) : 0;
+								// low = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
+								// 	3], 2)) : 0;
+								// high = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
+								// 	4], 2)) : 0;
+								
+								open = params[i].data.length > 1 ? that.sgToFixed(that.formatterNum(params[i].data[
+									1], 2)*1) : 0;
+								close = params[i].data.length > 1 ?that.sgToFixed(that.formatterNum(params[i].data[
+									2], 2)*1) : 0;
+								low = params[i].data.length > 1 ? that.sgToFixed(that.formatterNum(params[i].data[
+									3], 2)*1) : 0;
+								high = params[i].data.length > 1 ? that.sgToFixed(that.formatterNum(params[i].data[
+									4], 2)*1) : 0;
+								amount = params[i].data.length > 1 ? that.sgToFixed(that.formatterNum(params[i]
 									.data[5], 2)) : 0;
 								// console.log(time,open,close,low,high,amount)
 								tooltip = '<div class="charts-tooltip">' +

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "GRAYSCALE",
     "appid" : "__UNI__F0EBD91",
     "description" : "",
-    "versionName" : "1.1.0",
-    "versionCode" : 110,
+    "versionName" : "1.1.2",
+    "versionCode" : 112,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 2 - 2
pages/transaction/bbjy.vue

@@ -161,7 +161,7 @@
 						<view class="text">{{ item.usdtnum }}</view>
 					</view>
 					<view class="tipList">
-						<view class="nameTip">{{$t('hy.sjdz')}}(USDT)</view>
+						<view class="nameTip">{{$t('hy.sjcj')}}({{item.coin}})</view>
 						<view class="text">{{ item.coinnum }}</view>
 					</view>
 				</view>
@@ -358,7 +358,7 @@ export default {
 				const item = that.listOBj[res.data.name]
 				item.instId = item.name
 				item.name = item.instId.replace('-','/')
-				item.dcf = (((item.last * 1 - item.sodUtc0 * 1) / (item.sodUtc0 * 1)) * 100).toFixed(2);
+				item.dcf = (((item.last * 1 - item.sodUtc0 * 1) / (item.sodUtc0 * 1)) * 100).toFixed(2) + '%';
 				item.bool = item.last - item.sodUtc0 > 0 ? true : false;
 				// that.listOBj[data.name].name = name
 				// that.listOBj[data.name].instId = data.name

BIN
unpackage/cache/apk/__UNI__F0EBD91_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://ide.dcloud.net.cn/build/download/e8395ea0-711e-11ed-aded-bf75f816979e
+https://ide.dcloud.net.cn/build/download/22a57f40-7212-11ed-8d95-c1f114ee2f04

File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/apk/cmManifestCache.json


+ 1 - 1
unpackage/dist/build/h5/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>GRAYSCALE</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.b0707a6a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.01ecbba6.js></script><script src=/index/static/js/index.8eababba.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.b0707a6a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.01ecbba6.js></script><script src=/index/static/js/index.28f3eb91.js></script></body></html>

+ 1 - 1
utils/upApp.js

@@ -105,7 +105,7 @@ export function downApp(version) {
 	console.log(version)
 	plus.nativeUI.showWaiting('下載升級包...');
 	plus.downloader
-		.createDownload(baseurl + version, {}, (d, status) => {
+		.createDownload(version, {}, (d, status) => {
 			if (status == 200) {
 				installApp(d.filename); // 安装app
 			} else {

Some files were not shown because too many files changed in this diff