cmy 2 年之前
父節點
當前提交
226e1ec9d0
共有 2 個文件被更改,包括 9 次插入8 次删除
  1. 2 2
      pages/heyue/heyue.vue
  2. 7 6
      pages/index/index.vue

+ 2 - 2
pages/heyue/heyue.vue

@@ -501,9 +501,9 @@ export default {
 							item.dcf = +(((item.last - item.sodUtc0) / item.sodUtc0) * 100).toFixed(2) + '%';
 							item.name = item.instId.replace('-', '/');
 							if (that.actionList == item.instId) {
-								that.gmList.unshift({ pri: (item.bidPx * 1).toFixed(5), num: (item.bidSz * 1).toFixed(5) });
+								that.gmList.unshift({ pri: +(item.bidPx * 1).toFixed(5), num: +(item.bidSz * 1).toFixed(5) });
 								that.gmList = that.gmList.slice(0, 9);
-								that.mcList.unshift({ pri: (item.askPx * 1).toFixed(5), num: (item.askSz * 1).toFixed(5) });
+								that.mcList.unshift({ pri: +(item.askPx * 1).toFixed(5), num: +(item.askSz * 1).toFixed(5) });
 								that.mcList = that.mcList.slice(0, 9);
 							}
 

+ 7 - 6
pages/index/index.vue

@@ -88,12 +88,12 @@
 					<view class="btm-item-name">AZB/USDT</view>
 					<template >
 						<view class="btm-item-val"
-							:style="{ color: listOBj['GCB-USDT'].dcf > 0 ? '#5ec886' : '#DD3745' }">
-							{{ listOBj['GCB-USDT'].last || '--,--' }}
+							:style="{ color: listOBj['AZB-USDT'].dcf > 0 ? '#5ec886' : '#DD3745' }">
+							{{ listOBj['AZB-USDT'].last || '--,--' }}
 						</view>
 						<view class="btm-item-bl"
-							:style="{ color: listOBj['GCB-USDT'].dcf > 0 ? '#5ec886' : '#DD3745' }">
-							{{ listOBj['GCB-USDT'].dcf || '--,--' }}%
+							:style="{ color: listOBj['AZB-USDT'].dcf > 0 ? '#5ec886' : '#DD3745' }">
+							{{ listOBj['AZB-USDT'].dcf || '--,--' }}%
 						</view>
 					</template>
 				</view>
@@ -226,11 +226,12 @@
 			gcb() {
 				let that = this
 				gcb().then(res => {
-					console.log(res)
+					console.log(res,'1')
 					let data = res.data
 					that.listOBj[data.name] = data
 					that.listOBj[data.name].dcf = (((data.last * 1 - data.sodUtc0 * 1) / (data.sodUtc0 * 1)) * 100)
-						.toFixed(2);
+						.toFixed(2);
+						clog
 					that.listOBj[data.name].name = data.name.replace('-', '/')
 					console.log(that.listOBj, 'that.listOBj')
 					if (that.timer) {