hwq 2 jaren geleden
bovenliggende
commit
871b64ee80
100 gewijzigde bestanden met toevoegingen van 2714 en 2910 verwijderingen
  1. 805 804
      hybrid/html/js/kline.js
  2. 38 30
      hybrid/html/local.html
  3. 12 240
      lang/en.js
  4. 78 67
      lang/zh_tw.js
  5. 2 2
      manifest.json
  6. 910 1038
      pages/heyue/heyue.vue
  7. 337 394
      pages/heyue/tradlist.vue
  8. 76 76
      pages/transaction/transactionDetail.vue
  9. BIN
      unpackage/cache/apk/__UNI__F0EBD91_cm.apk
  10. 1 1
      unpackage/cache/apk/apkurl
  11. 0 0
      unpackage/cache/apk/cmManifestCache.json
  12. 0 1
      unpackage/cache/wgt/__UNI__F0EBD91/app-config-service.js
  13. 0 0
      unpackage/cache/wgt/__UNI__F0EBD91/app-service.js
  14. 0 0
      unpackage/cache/wgt/__UNI__F0EBD91/app-view.js
  15. 8 4
      unpackage/cache/wgt/__UNI__F0EBD91/hybrid/html/js/kline.js
  16. 152 95
      unpackage/cache/wgt/__UNI__F0EBD91/hybrid/html/js/uni.webview.1.5.2.js
  17. 4 4
      unpackage/cache/wgt/__UNI__F0EBD91/hybrid/html/js/utils.js
  18. 4 4
      unpackage/cache/wgt/__UNI__F0EBD91/hybrid/html/local.html
  19. 0 0
      unpackage/cache/wgt/__UNI__F0EBD91/manifest.json
  20. BIN
      unpackage/cache/wgt/__UNI__F0EBD91/static/icon/reback.png
  21. BIN
      unpackage/cache/wgt/__UNI__F0EBD91/static/img/flower.png
  22. BIN
      unpackage/cache/wgt/__UNI__F0EBD91/static/img/gou.png
  23. 0 1
      unpackage/dist/build/app-plus/app-config-service.js
  24. 0 0
      unpackage/dist/build/app-plus/app-service.js
  25. 0 0
      unpackage/dist/build/app-plus/app-view.js
  26. 122 40
      unpackage/dist/build/app-plus/hybrid/html/js/kline.js
  27. 152 95
      unpackage/dist/build/app-plus/hybrid/html/js/uni.webview.1.5.2.js
  28. 4 4
      unpackage/dist/build/app-plus/hybrid/html/js/utils.js
  29. 8 8
      unpackage/dist/build/app-plus/hybrid/html/local.html
  30. 0 0
      unpackage/dist/build/app-plus/manifest.json
  31. BIN
      unpackage/dist/build/app-plus/static/icon/reback.png
  32. BIN
      unpackage/dist/build/app-plus/static/img/flower.png
  33. BIN
      unpackage/dist/build/app-plus/static/img/gou.png
  34. BIN
      unpackage/dist/build/h5/11-25-1.rar
  35. 1 1
      unpackage/dist/build/h5/index.html
  36. BIN
      unpackage/dist/build/h5/static/img/gou.png
  37. 0 0
      unpackage/dist/build/h5/static/js/index.9e9635e6.js
  38. 0 0
      unpackage/dist/build/h5/static/js/index.d2e7c32d.js
  39. 0 0
      unpackage/dist/build/h5/static/js/pages-heyue-heyue.6ba84385.js
  40. 0 0
      unpackage/dist/build/h5/static/js/pages-heyue-heyue.9611cbe8.js
  41. 0 0
      unpackage/dist/build/h5/static/js/pages-heyue-heyue~pages-transaction-bbjy.496677ac.js
  42. 0 0
      unpackage/dist/build/h5/static/js/pages-heyue-heyue~pages-transaction-bbjy.5b1287f4.js
  43. 0 0
      unpackage/dist/build/h5/static/js/pages-heyue-tradlist.50058827.js
  44. 0 0
      unpackage/dist/build/h5/static/js/pages-heyue-tradlist.6034424d.js
  45. 0 0
      unpackage/dist/build/h5/static/js/pages-index-ggDetail.2d5fbb0d.js
  46. 0 0
      unpackage/dist/build/h5/static/js/pages-index-ggDetail.4ad8d85f.js
  47. 0 0
      unpackage/dist/build/h5/static/js/pages-index-gglist.121af2eb.js
  48. 0 0
      unpackage/dist/build/h5/static/js/pages-index-gglist.baf52275.js
  49. 0 0
      unpackage/dist/build/h5/static/js/pages-index-index.006323a7.js
  50. 0 0
      unpackage/dist/build/h5/static/js/pages-index-index.226d0bec.js
  51. 0 0
      unpackage/dist/build/h5/static/js/pages-index-kf.3cd4e7c7.js
  52. 0 0
      unpackage/dist/build/h5/static/js/pages-index-kf.bd875088.js
  53. 0 0
      unpackage/dist/build/h5/static/js/pages-index-language.6ba4fd43.js
  54. 0 0
      unpackage/dist/build/h5/static/js/pages-index-rg.2f95eb00.js
  55. 0 0
      unpackage/dist/build/h5/static/js/pages-index-rg.61e3be5d.js
  56. 0 0
      unpackage/dist/build/h5/static/js/pages-index-rgDetail.4b203893.js
  57. 0 0
      unpackage/dist/build/h5/static/js/pages-index-rgDetail.a18a362b.js
  58. 0 0
      unpackage/dist/build/h5/static/js/pages-index-rg~pages-index-rgDetail.41a790fc.js
  59. 0 0
      unpackage/dist/build/h5/static/js/pages-index-rg~pages-index-rgDetail.5e36d55c.js
  60. 0 0
      unpackage/dist/build/h5/static/js/pages-public-forget.3957a304.js
  61. 0 0
      unpackage/dist/build/h5/static/js/pages-public-forget.54465fbf.js
  62. 0 0
      unpackage/dist/build/h5/static/js/pages-public-login.8b1f688f.js
  63. 0 0
      unpackage/dist/build/h5/static/js/pages-public-login.98898068.js
  64. 0 0
      unpackage/dist/build/h5/static/js/pages-public-register.38e40f46.js
  65. 0 0
      unpackage/dist/build/h5/static/js/pages-public-register.e99d3253.js
  66. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-bbjy.9ddd0564.js
  67. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-bbjy.cdf0d3ab.js
  68. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-bblist.66568f85.js
  69. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-cbdetail.6222188d.js
  70. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-cbdetail.9199ea05.js
  71. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-cbdetail~pages-transaction-tbdetail.c675dcf6.js
  72. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-cbdetail~pages-transaction-tbdetail.e84b1d10.js
  73. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-cblist.560eeccb.js
  74. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-cblist.89a73328.js
  75. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-tbdetail.7b602923.js
  76. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-tbdetail.df38d9e3.js
  77. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-tblist.05dca7f7.js
  78. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-tblist.67d7523f.js
  79. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-transaction.205306c7.js
  80. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-transaction.d45ce7c2.js
  81. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-transactionDetail.275d905e.js
  82. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-transactionDetail.8af4c4f3.js
  83. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-transfer.610bf8aa.js
  84. 0 0
      unpackage/dist/build/h5/static/js/pages-transaction-transfer.905451dc.js
  85. 0 0
      unpackage/dist/build/h5/static/js/pages-user-authrz.54b66cdd.js
  86. 0 0
      unpackage/dist/build/h5/static/js/pages-user-authrz.55e71983.js
  87. 0 0
      unpackage/dist/build/h5/static/js/pages-user-cbDetail.a9a44550.js
  88. 0 0
      unpackage/dist/build/h5/static/js/pages-user-cbDetail.e3e1957a.js
  89. 0 0
      unpackage/dist/build/h5/static/js/pages-user-cbRecord.6a60bb0f.js
  90. 0 0
      unpackage/dist/build/h5/static/js/pages-user-cbRecord.aa477ab6.js
  91. 0 0
      unpackage/dist/build/h5/static/js/pages-user-coininfo.3b649a43.js
  92. 0 0
      unpackage/dist/build/h5/static/js/pages-user-coininfo.81682b36.js
  93. 0 0
      unpackage/dist/build/h5/static/js/pages-user-menu.6dc9163b.js
  94. 0 0
      unpackage/dist/build/h5/static/js/pages-user-myrg.868654e1.js
  95. 0 1
      unpackage/dist/build/h5/static/js/pages-user-myrg.f047f1a9.js
  96. 0 0
      unpackage/dist/build/h5/static/js/pages-user-respwd.0972877b.js
  97. 0 0
      unpackage/dist/build/h5/static/js/pages-user-respwd.39973e87.js
  98. 0 0
      unpackage/dist/build/h5/static/js/pages-user-tbDetail.c1b03227.js
  99. 0 0
      unpackage/dist/build/h5/static/js/pages-user-tbDetail.e8c41b5a.js
  100. 0 0
      unpackage/dist/build/h5/static/js/pages-user-tbRecord.92145e3d.js

+ 805 - 804
hybrid/html/js/kline.js

@@ -1,808 +1,809 @@
-var myChart;
+var myChart;
-var app = new Vue({
+var app = new Vue({
-	el: '#app',
+	el: '#app',
-	data: {
+	data: {
-		MA5: '',
+		MA5: '',
-		MA10: '',
+		MA10: '',
-		MA30: '',
+		MA30: '',
-		volMA5: '',
+		volMA5: '',
-		volMA10: '',
+		volMA10: '',
-		current: "15m",
+		current: "15m",
-		tabs: [{
+		tabs: [{
-				'label': '1分钟',
+				'label': '1分鐘',
-				'value': "1m"
+				'value': "1m"
-			},
+			},
-			{
+			{
-				'label': '15分钟',
+				'label': '15分鐘',
-				'value': "15m"
+				'value': "15m"
-			},
+			},
-			{
+			{
-				'label': '30分钟',
+				'label': '30分鐘',
-				'value': "30m"
+				'value': "30m"
-			},
+			},
-			{
+			{
-				'label': '1小时',
+				'label': '1小時',
-				'value': "1H"
+				'value': "1H"
-			},
+			},
-			{
+			{
-				'label': '4小时',
+				'label': '4小時',
-				'value': "4H"
+				'value': "4H"
-			},
+			},
-			{
+			{
-				'label': '1天',
+				'label': '1日',
-				'value': "1D"
+				'value': "1D"
-			},
+			},
-		],
+		],
-		category: 2,
+		category: 2,
-		categoryList: [{
+		categoryList: [{
-				'label': '深度',
+				'label': '深度',
-				'value': 1
+				'value': 1
-			},
+			},
-			{
+			{
-				'label': '成交',
+				'label': '成交',
-				'value': 2
+				'value': 2
-			},
+			},
-			{
+			{
-				'label': '简介',
+				'label': '简介',
-				'value': 3
+				'value': 3
-			},
+			},
-		],
+		],
-		txData: {}, //交易数据统计
+		txData: {}, //交易数据统计
-		buyList: [],
+		buyList: [],
-		sellList: [],
+		sellList: [],
-		dealHis: [],
+		dealHis: [],
-		tokenInfo: {},
+		tokenInfo: {},
-		page: 1,
+		page: 1,
-		// 保存商品id
+		// 保存商品id
-		typeId: '',
+		typeId: '',
-		// 保存socket对象
+		// 保存socket对象
-		webSocket: '',
+		webSocket: '',
-		// 保存当前k线数据
+		// 保存当前k线数据
-		dataKLine: {
+		dataKLine: {
-			data: [],
+			data: [],
-			dates: [],
+			dates: [],
-			volumes: [],
+			volumes: [],
-		}
+		}
-
+
-	},
+	},
-	created() {
+	created() {
-		this.getTxData()
+		this.getTxData()
-		// this.getDepth()
+		// this.getDepth()
-		// 保存商品id
+		// 保存商品id
-		this.typeId = getQueryString('type');
+		this.typeId = getQueryString('type');
-		// 简历长连接
+		// 简历长连接
-		this.scoketInit()
+		this.scoketInit()
-	},
+	},
-	mounted() {
+	mounted() {
-		myChart = echarts.init(document.getElementById('main'));
+		myChart = echarts.init(document.getElementById('main'));
-		this.draw()
+		this.draw()
-		this.getKline();
+		this.getKline();
-		// 获取成交记录
+		// 获取成交记录
-		this.getDealHis();
+		this.getDealHis();
-	},
+	},
-	methods: {
+	methods: {
-		// 返回上一页
+		// 返回上一页
-		back(url) {
+		back(url) {
-			console.log('cf',url);
+			console.log('cf', url);
 			uni.navigateTo({
 			uni.navigateTo({
 				url
 				url
-			})
+			})
-			uni.postMessage({
+			uni.postMessage({
-				data: {
+				data: {
-					action: 'message'
+					action: 'message'
-				}
+				}
-			});
+			});
-		},
+		},
-
+
-		scoketInit() {
+		scoketInit() {
-			const that = this;
+			const that = this;
-			// 初始化websocket
+			// 初始化websocket
-			that.webSocket = new WebSocket("wss://wsaws.okx.com:8443/ws/v5/public");
+			that.webSocket = new WebSocket("wss://wsaws.okx.com:8443/ws/v5/public");
-			that.webSocket.onopen = function(event) {
+			that.webSocket.onopen = function(event) {
-				console.log('打开链接成功');
+				console.log('打开链接成功');
-				const requestKData = JSON.stringify({
+				const requestKData = JSON.stringify({
-					"op": "subscribe",
+					"op": "subscribe",
-					"args": [{
+					"args": [{
-						"channel": "candle" + that.current,
+						"channel": "candle" + that.current,
-						"instId": that.typeId
+						"instId": that.typeId
-					}]
+					}]
-				})
+				})
-				const requestNewData = JSON.stringify({
+				const requestNewData = JSON.stringify({
-					"op": "subscribe",
+					"op": "subscribe",
-					"args": [{
+					"args": [{
-						"channel": "tickers",
+						"channel": "tickers",
-						"instId": that.typeId
+						"instId": that.typeId
-					}]
+					}]
-				})
+				})
-				// 获取k线数据
+				// 获取k线数据
-				that.webSocket.send(requestKData)
+				that.webSocket.send(requestKData)
-				// 获取当前行情数据
+				// 获取当前行情数据
-				that.webSocket.send(requestNewData)
+				that.webSocket.send(requestNewData)
-			}
+			}
-			// 监听socket回复事件
+			// 监听socket回复事件
-			that.webSocket.addEventListener('message', function(event) {
+			that.webSocket.addEventListener('message', function(event) {
-				const item = JSON.parse(event.data);
+				const item = JSON.parse(event.data);
-				try {
+				try {
-					// 判断是否为
+					// 判断是否为
-					if (item.arg.channel == ("candle" + that.current) && item.data) {
+					if (item.arg.channel == ("candle" + that.current) && item.data) {
-						const daytime = new Date(+item.data[0][0]);
+						const daytime = new Date(+item.data[0][0]);
-						item.data[0][0] = that.initDay(daytime, "YYYY-mm-dd HH:MM:SS")
+						item.data[0][0] = that.initDay(daytime, "YYYY-mm-dd HH:MM:SS")
-						if (item.data[0][0] != that.dataKLine.dates[that.dataKLine.dates.length-1]) {
+						if (item.data[0][0] != that.dataKLine.dates[that.dataKLine.dates.length - 1]) {
-						console.log(item.data[0][0],'jiange',that.dataKLine.dates[that.dataKLine.dates.length-1]);
+							console.log(item.data[0][0], 'jiange', that.dataKLine.dates[that.dataKLine
-							const itemi = item.data[0]
+								.dates.length - 1]);
-							that.dataKLine.dates.push(itemi[0])
+							const itemi = item.data[0]
-							that.dataKLine.data.push([+itemi[1], +itemi[2], +itemi[3], +itemi[4], +
+							that.dataKLine.dates.push(itemi[0])
-								itemi[5]
+							that.dataKLine.data.push([+itemi[1], +itemi[2], +itemi[3], +itemi[4], +
-							])
+								itemi[5]
-							that.dataKLine.volumes.push([that.dataKLine.volumes.length, +itemi[5], +
+							])
-								itemi[1] > +itemi[2] ? 1 : -1
+							that.dataKLine.volumes.push([that.dataKLine.volumes.length, +itemi[5], +
-							])
+								itemi[1] > +itemi[2] ? 1 : -1
-							that.setKline()
+							])
-						}
+							that.setKline()
-						// that.txData.lastPrice = data.data[0][]
+						}
-					}
+						// that.txData.lastPrice = data.data[0][]
-					// 
+					}
-					if (item.arg.channel == ("tickers") &&item.data[0]) {
+					// 
+					if (item.arg.channel == ("tickers") && item.data[0]) {
 						const data = item.data[0]
 						const data = item.data[0]
-						that.txData.name = data.instId
+						that.txData.name = data.instId
-						that.txData.lastPrice = +data.last
+						that.txData.lastPrice = +data.last
-						that.txData.high = +data.high24h
+						that.txData.high = +data.high24h
-						that.txData.volume = +data.open24h
+						that.txData.volume = +data.open24h
-						that.txData.low = +data.low24h
+						that.txData.low = +data.low24h
-						that.txData.upRate = ((that.txData.lastPrice - that.txData.volume) / that.txData
+						that.txData.upRate = ((that.txData.lastPrice - that.txData.volume) / that.txData
-							.volume * 100).toFixed(2)
+							.volume * 100).toFixed(2)
-						txData.upFlag = +that.txData.upRate > 0 ? 1 : 2;
+						txData.upFlag = +that.txData.upRate > 0 ? 1 : 2;
-					}
+					}
-				} catch (e) {
+				} catch (e) {
-					console.log("item: " + JSON.stringify(item));
+					console.log("item: " + JSON.stringify(item));
-				}
+				}
-
+
-			});
+			});
-			that.webSocket.onclose = function(event) {
+			that.webSocket.onclose = function(event) {
-				console.log("WebSocket is closed now.");
+				console.log("WebSocket is closed now.");
-			};
+			};
-		},
+		},
-		// 获取24小时交易数据统计
+		// 获取24小时交易数据统计
-		getTxData() {
+		getTxData() {
-			this.txData = txData;
+			this.txData = txData;
-		},
+		},
-		// 初始化数据结构
+		// 初始化数据结构
-		dataInit(data, type) {
+		dataInit(data, type) {
-
+
-			let items;
+			let items;
-			if (type == 1) {
+			if (type == 1) {
-				items = data.map(function(item) {
+				items = data.map(function(item) {
-					return item[0];
+					return item[0];
-				});
+				});
-			}
+			}
-			if (type == 2) {
+			if (type == 2) {
-				items = data.map(function(item) {
+				items = data.map(function(item) {
-					return [+item[1], +item[2], +item[3], +item[4], +item[5]];
+					return [+item[1], +item[2], +item[3], +item[4], +item[5]];
-				});
+				});
-			}
+			}
-			if (type == 3) {
+			if (type == 3) {
-				items = data.map(function(item, index) {
+				items = data.map(function(item, index) {
-					return [index, +item[5], +item[1] > +item[2] ? 1 : -1];
+					return [index, +item[5], +item[1] > +item[2] ? 1 : -1];
-				});
+				});
-			}
+			}
-			return items
+			return items
-
+
-		},
+		},
-		// 初始化时间
+		// 初始化时间
-		initDay(time, fmt) {
+		initDay(time, fmt) {
-			let ret;
+			let ret;
-			const opt = {
+			const opt = {
-				"Y+": time.getFullYear().toString(), //年
+				"Y+": time.getFullYear().toString(), //年
-				"m+": (time.getMonth() + 1).toString(), //月
+				"m+": (time.getMonth() + 1).toString(), //月
-				"d+": time.getDate().toString(), //日 
+				"d+": time.getDate().toString(), //日 
-				"H+": time.getHours().toString(), //小时 
+				"H+": time.getHours().toString(), //小时 
-				"M+": time.getMinutes().toString(), //分 
+				"M+": time.getMinutes().toString(), //分 
-				"S+": time.getSeconds().toString() //秒 
+				"S+": time.getSeconds().toString() //秒 
-			};
+			};
-			for (let k in opt) {
+			for (let k in opt) {
-				ret = new RegExp("(" + k + ")").exec(fmt)
+				ret = new RegExp("(" + k + ")").exec(fmt)
-				if (ret) {
+				if (ret) {
-					fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length,
+					fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length,
-						"0")));
+						"0")));
-				}
+				}
-			}
+			}
-			return fmt;
+			return fmt;
-		},
+		},
-		// 获取k线数据,生成k线
+		// 获取k线数据,生成k线
-		getKline() {
+		getKline() {
-			console.log('qq');
+			console.log('qq');
-			const that = this;
+			const that = this;
-			axiosGet('/index/history', {
+			axiosGet('/index/history', {
-				instId: that.typeId,
+				instId: that.typeId,
-				bar: that.current,
+				bar: that.current,
-				limit: 300
+				limit: 300
-			}).then((res) => {
+			}).then((res) => {
-				const ar = res.map((e) => {
+				const ar = res.map((e) => {
-					let dateTime = new Date(+e[0]);
+					let dateTime = new Date(+e[0]);
-					e[0] = that.initDay(dateTime, "YYYY-mm-dd HH:MM:SS");
+					e[0] = that.initDay(dateTime, "YYYY-mm-dd HH:MM:SS");
-					return e
+					return e
-				}).reverse()
+				}).reverse()
-				
+
-				that.dataKLine = {
+				that.dataKLine = {
-					dates: that.dataInit(ar, 1),
+					dates: that.dataInit(ar, 1),
-					data: that.dataInit(ar, 2),
+					data: that.dataInit(ar, 2),
-					volumes: that.dataInit(ar, 3),
+					volumes: that.dataInit(ar, 3),
-				}
+				}
-				
+
-				that.setKline()
+				that.setKline()
-			}).catch((e) => {
+			}).catch((e) => {
-				console.log(e, '2222');
+				console.log(e, '2222');
-			})
+			})
-		},
+		},
-		// 设置线条数据
+		// 设置线条数据
-		setKline() {
+		setKline() {
-			const that = this;
+			const that = this;
-			var dataMA5 = that.calculateMA(5, that.dataKLine.data);
+			var dataMA5 = that.calculateMA(5, that.dataKLine.data);
-			var dataMA10 = that.calculateMA(10, that.dataKLine.data);
+			var dataMA10 = that.calculateMA(10, that.dataKLine.data);
-			var dataMA30 = that.calculateMA(30, that.dataKLine.data);
+			var dataMA30 = that.calculateMA(30, that.dataKLine.data);
-			var volumeMA5 = that.calculateMA(5, that.dataKLine.volumes);
+			var volumeMA5 = that.calculateMA(5, that.dataKLine.volumes);
-			var volumeMA10 = that.calculateMA(10, that.dataKLine.volumes);
+			var volumeMA10 = that.calculateMA(10, that.dataKLine.volumes);
-			myChart.setOption({
+			myChart.setOption({
-				xAxis: [{
+				xAxis: [{
-						data: that.dataKLine.dates
+						data: that.dataKLine.dates
-					},
+					},
-					{
+					{
-						data: that.dataKLine.dates
+						data: that.dataKLine.dates
-					},
+					},
-				],
+				],
-				series: [{
+				series: [{
-						name: '日K',
+						name: '日K',
-						data: that.dataKLine.data
+						data: that.dataKLine.data
-					},
+					},
-					{
+					{
-						name: 'MA5',
+						name: 'MA5',
-						data: dataMA5
+						data: dataMA5
-					},
+					},
-					{
+					{
-						name: 'MA10',
+						name: 'MA10',
-						data: dataMA10
+						data: dataMA10
-					},
+					},
-					{
+					{
-						name: 'MA30',
+						name: 'MA30',
-						data: dataMA30
+						data: dataMA30
-					},
+					},
-					{
+					{
-						name: 'Volume',
+						name: 'Volume',
-						data: that.dataKLine.volumes
+						data: that.dataKLine.volumes
-					},
+					},
-					{
+					{
-						name: 'VolumeMA5',
+						name: 'VolumeMA5',
-						data: volumeMA5
+						data: volumeMA5
-					},
+					},
-					{
+					{
-						name: 'VolumeMA10',
+						name: 'VolumeMA10',
-						data: volumeMA10
+						data: volumeMA10
-					},
+					},
-				]
+				]
-			})
+			})
-		},
+		},
-		// 列表条数不足补全
+		// 列表条数不足补全
-		addItem(list, type) {
+		addItem(list, type) {
-			// type: 1开头加,2末尾加
+			// type: 1开头加,2末尾加
-			list = list || [];
+			list = list || [];
-			let len = 20 - list.length;
+			let len = 20 - list.length;
-			if (len > 0) {
+			if (len > 0) {
-				for (let i = 0; i < len; i++) {
+				for (let i = 0; i < len; i++) {
-					if (type == 1) {
+					if (type == 1) {
-						list.unshift({})
+						list.unshift({})
-					} else {
+					} else {
-						list.push({})
+						list.push({})
-					}
+					}
-				}
+				}
-			}
+			}
-			return list;
+			return list;
-		},
+		},
-		// 获取深度数据
+		// 获取深度数据
-		// getDepth() {
+		// getDepth() {
-		// 	this.buyList = this.addItem(depthList().buyList || []);
+		// 	this.buyList = this.addItem(depthList().buyList || []);
-		// 	this.sellList = this.addItem(depthList().sellList || []);
+		// 	this.sellList = this.addItem(depthList().sellList || []);
-		// },
+		// },
-		// 获取成交记录
+		// 获取成交记录
-		getDealHis() {
+		getDealHis() {
-			const that = this;
+			const that = this;
-			axiosGet('/index/deal', {
+			axiosGet('/index/deal', {
-				instId: that.typeId,
+				instId: that.typeId,
-				limit: 100
+				limit: 100
-			}).then((res) => {
+			}).then((res) => {
-				// 处理返回数据
+				// 处理返回数据
-				this.dealHis = res.map((e) => {
+				this.dealHis = res.map((e) => {
-					const dateTime = new Date(+e.ts)
+					const dateTime = new Date(+e.ts)
-					return {
+					return {
-						"date": that.initDay(dateTime, "mm-dd HH:MM:SS"),
+						"date": that.initDay(dateTime, "mm-dd HH:MM:SS"),
-						// 1买入 2卖出
+						// 1买入 2卖出
-						"takerFlag": e.side == 'buy' ? "1" : '2',
+						"takerFlag": e.side == 'buy' ? "1" : '2',
-						"price": e.px,
+						"price": e.px,
-						"amount": e.sz
+						"amount": e.sz
-					}
+					}
-				})
+				})
-			}).catch((e) => {
+			}).catch((e) => {
-				console.log("e: " + JSON.stringify(e));
+				console.log("e: " + JSON.stringify(e));
-				console.log(e);
+				console.log(e);
-			})
+			})
-		},
+		},
-		// 获取项目简介信息
+		// 获取项目简介信息
-		getTokenInfo() {
+		getTokenInfo() {
-			this.tokenInfo = tokenInfo;
+			this.tokenInfo = tokenInfo;
-		},
+		},
-
+
-		// 切换tab
+		// 切换tab
-		switchTab(val) {
+		switchTab(val) {
-			const that = this;
+			const that = this;
-			if (that.current == val) {
+			if (that.current == val) {
-				return
+				return
-			};
+			};
-			that.current = val;
+			that.current = val;
-			that.webSocket.close()
+			that.webSocket.close()
-			that.$nextTick(() => {
+			that.$nextTick(() => {
-				that.scoketInit()
+				that.scoketInit()
-			})
+			})
-			that.getKline()
+			that.getKline()
-		},
+		},
-		// 切换类目
+		// 切换类目
-		switchCategory(val) {
+		switchCategory(val) {
-			if (this.category == val) return;
+			if (this.category == val) return;
-			this.category = val;
+			this.category = val;
-			if (this.category == 1) {
+			if (this.category == 1) {
-				this.getDepth()
+				this.getDepth()
-			} else if (this.category == 2) {
+			} else if (this.category == 2) {
-				this.getDealHis()
+				this.getDealHis()
-			} else {
+			} else {
-				this.getTokenInfo()
+				this.getTokenInfo()
-			}
+			}
-		},
+		},
-		// 截取数字字符串 保留precision小数
+		// 截取数字字符串 保留precision小数
-		formatterNum(value, precision) {
+		formatterNum(value, precision) {
-			// console.log(value)
+			// console.log(value)
-			let reg = new RegExp('^\\d+(?:\\.\\d{0,' + precision + '})?')
+			let reg = new RegExp('^\\d+(?:\\.\\d{0,' + precision + '})?')
-			return value.toString().match(reg)
+			return value.toString().match(reg)
-		},
+		},
-		// 计算MA
+		// 计算MA
-		calculateMA(dayCount, data) {
+		calculateMA(dayCount, data) {
-			var result = [];
+			var result = [];
-			for (var i = 0, len = data.length; i < len; i++) {
+			for (var i = 0, len = data.length; i < len; i++) {
-				if (i < dayCount) {
+				if (i < dayCount) {
-					result.push('-');
+					result.push('-');
-					continue;
+					continue;
-				}
+				}
-				var sum = 0;
+				var sum = 0;
-				for (var j = 0; j < dayCount; j++) {
+				for (var j = 0; j < dayCount; j++) {
-					sum += data[i - j][1];
+					sum += data[i - j][1];
-				}
+				}
-				// console.log(sum, dayCount)
+				// console.log(sum, dayCount)
-				result.push((sum / dayCount).toFixed(2));
+				result.push((sum / dayCount).toFixed(2));
-			}
+			}
-			return result;
+			return result;
-		},
+		},
-		// 绘制(配置项)
+		// 绘制(配置项)
-		draw() {
+		draw() {
-			let that = this;
+			let that = this;
-			var upColor = '#03ad91';
+			var upColor = '#03ad91';
-			var downColor = '#dd345b';
+			var downColor = '#dd345b';
-			var colorList = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622',
+			var colorList = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622',
-				'#bda29a', '#6e7074',
+				'#bda29a', '#6e7074',
-				'#546570', '#c4ccd3'
+				'#546570', '#c4ccd3'
-			];
+			];
-			var labelFont = 'bold 12px Sans-serif';
+			var labelFont = 'bold 12px Sans-serif';
-			var option = {
+			var option = {
-				backgroundColor: '#0d1723',
+				backgroundColor: '#0d1723',
-				title: {
+				title: {
-					show: false
+					show: false
-				},
+				},
-				legend: {
+				legend: {
-					show: false
+					show: false
-				},
+				},
-				visualMap: {
+				visualMap: {
-					show: false,
+					show: false,
-					seriesIndex: 4,
+					seriesIndex: 4,
-					dimension: 2,
+					dimension: 2,
-					pieces: [{
+					pieces: [{
-						value: 1,
+						value: 1,
-						color: downColor
+						color: downColor
-					}, {
+					}, {
-						value: -1,
+						value: -1,
-						color: upColor
+						color: upColor
-					}]
+					}]
-				},
+				},
-				grid: [{
+				grid: [{
-						top: '5%',
+						top: '5%',
-						left: 20,
+						left: 20,
-						right: 20,
+						right: 20,
-						height: '70%'
+						height: '70%'
-					},
+					},
-					{
+					{
-						top: '80%',
+						top: '80%',
-						left: 20,
+						left: 20,
-						right: 20,
+						right: 20,
-						height: '16%'
+						height: '16%'
-					},
+					},
-				],
+				],
-				axisPointer: { //坐标轴指示器配置项
+				axisPointer: { //坐标轴指示器配置项
-					link: {
+					link: {
-						xAxisIndex: 'all'
+						xAxisIndex: 'all'
-					},
+					},
-					label: {
+					label: {
-						backgroundColor: '#0d1723',
+						backgroundColor: '#0d1723',
-						color: '#fff',
+						color: '#fff',
-						borderColor: 'rgb(99, 117, 139)',
+						borderColor: 'rgb(99, 117, 139)',
-						borderWidth: 1,
+						borderWidth: 1,
-						borderRadius: 2,
+						borderRadius: 2,
-						fontSize: 10
+						fontSize: 10
-					}
+					}
-				},
+				},
-				xAxis: [{
+				xAxis: [{
-					type: 'category', //坐标轴类型。(value:数值轴,适用于连续数据。,category:类目轴,适用于离散的类目数据,time: 时间轴,适用于连续的时序数据,log:对数轴。适用于对数数据)
+					type: 'category', //坐标轴类型。(value:数值轴,适用于连续数据。,category:类目轴,适用于离散的类目数据,time: 时间轴,适用于连续的时序数据,log:对数轴。适用于对数数据)
-					data: [], //类目数据,在类目轴(type: 'category')中有效。
+					data: [], //类目数据,在类目轴(type: 'category')中有效。
-					scale: true,
+					scale: true,
-					boundaryGap: false, //坐标轴两边留白策略,类目轴和非类目轴的设置和表现不一样。
+					boundaryGap: false, //坐标轴两边留白策略,类目轴和非类目轴的设置和表现不一样。
-					axisLine: {
+					axisLine: {
-						show: false
+						show: false
-					}, //坐标轴轴线相关设置
+					}, //坐标轴轴线相关设置
-					axisTick: {
+					axisTick: {
-						show: false
+						show: false
-					}, //坐标轴刻度相关设置。
+					}, //坐标轴刻度相关设置。
-					axisLabel: {
+					axisLabel: {
-						show: false,
+						show: false,
-					}, //坐标轴刻度标签的相关设置。
+					}, //坐标轴刻度标签的相关设置。
-					splitLine: {
+					splitLine: {
-						show: false,
+						show: false,
-						lineStyle: {
+						lineStyle: {
-							color: 'rgba(255,255,255, 0.1)'
+							color: 'rgba(255,255,255, 0.1)'
-						}
+						}
-					}, //坐标轴在 grid 区域中的分隔线。
+					}, //坐标轴在 grid 区域中的分隔线。
-					min: 'dataMin', //坐标轴刻度最小值。可以设置成特殊值 'dataMin',此时取数据在该轴上的最小值作为最小刻度。
+					min: 'dataMin', //坐标轴刻度最小值。可以设置成特殊值 'dataMin',此时取数据在该轴上的最小值作为最小刻度。
-					max: 'dataMax', //坐标轴刻度最大值。可以设置成特殊值 'dataMax',此时取数据在该轴上的最大值作为最大刻度。
+					max: 'dataMax', //坐标轴刻度最大值。可以设置成特殊值 'dataMax',此时取数据在该轴上的最大值作为最大刻度。
-					axisPointer: {
+					axisPointer: {
-						label: {
+						label: {
-							margin: 200
+							margin: 200
-						}
+						}
-					},
+					},
-				}, {
+				}, {
-					type: 'category',
+					type: 'category',
-					gridIndex: 1, //x 轴所在的 grid 的索引,默认位于第一个 grid。
+					gridIndex: 1, //x 轴所在的 grid 的索引,默认位于第一个 grid。
-					data: [], //类目数据,在类目轴(type: 'category')中有效。
+					data: [], //类目数据,在类目轴(type: 'category')中有效。
-					scale: true,
+					scale: true,
-					boundaryGap: false, //坐标轴两边留白策略,类目轴和非类目轴的设置和表现不一样。
+					boundaryGap: false, //坐标轴两边留白策略,类目轴和非类目轴的设置和表现不一样。
-					axisLine: {
+					axisLine: {
-						show: false,
+						show: false,
-						lineStyle: {
+						lineStyle: {
-							color: 'rgba(255,255,255,1)',
+							color: 'rgba(255,255,255,1)',
-							width: 1
+							width: 1
-						}
+						}
-					}, //坐标轴轴线相关设置
+					}, //坐标轴轴线相关设置
-					axisTick: {
+					axisTick: {
-						show: false
+						show: false
-					}, //坐标轴刻度相关设置。
+					}, //坐标轴刻度相关设置。
-					axisLabel: { //坐标轴刻度标签的相关设置。
+					axisLabel: { //坐标轴刻度标签的相关设置。
-						show: true,
+						show: true,
-						margin: 6,
+						margin: 6,
-						fontSize: 10,
+						fontSize: 10,
-						color: 'rgba(99, 117, 139, 1.0)',
+						color: 'rgba(99, 117, 139, 1.0)',
-						formatter: function(value) {
+						formatter: function(value) {
-							return echarts.format.formatTime('MM-dd', value);
+							return echarts.format.formatTime('MM-dd', value);
-						}
+						}
-					},
+					},
-					splitNumber: 20,
+					splitNumber: 20,
-					splitLine: {
+					splitLine: {
-						show: false,
+						show: false,
-						lineStyle: {
+						lineStyle: {
-							color: 'rgba(255,255,255, 0.1)'
+							color: 'rgba(255,255,255, 0.1)'
-						}
+						}
-					}, //坐标轴在 grid 区域中的分隔线。
+					}, //坐标轴在 grid 区域中的分隔线。
-					min: 'dataMin', //坐标轴刻度最小值。可以设置成特殊值 'dataMin',此时取数据在该轴上的最小值作为最小刻度。
+					min: 'dataMin', //坐标轴刻度最小值。可以设置成特殊值 'dataMin',此时取数据在该轴上的最小值作为最小刻度。
-					max: 'dataMax', //坐标轴刻度最大值。可以设置成特殊值 'dataMax',此时取数据在该轴上的最大值作为最大刻度。
+					max: 'dataMax', //坐标轴刻度最大值。可以设置成特殊值 'dataMax',此时取数据在该轴上的最大值作为最大刻度。
-					// axisPointer: { show: true, type: 'none', label: { show: false }},
+					// axisPointer: { show: true, type: 'none', label: { show: false }},
-				}],
+				}],
-				yAxis: [{
+				yAxis: [{
-					type: 'value', //坐标轴类型。(value:数值轴,适用于连续数据。,category:类目轴,适用于离散的类目数据,time: 时间轴,适用于连续的时序数据,log:对数轴。适用于对数数据)
+					type: 'value', //坐标轴类型。(value:数值轴,适用于连续数据。,category:类目轴,适用于离散的类目数据,time: 时间轴,适用于连续的时序数据,log:对数轴。适用于对数数据)
-					position: 'right', //y 轴的位置。'left','right'
+					position: 'right', //y 轴的位置。'left','right'
-					scale: true, //是否是脱离 0 值比例。设置成 true 后坐标刻度不会强制包含零刻度。在双数值轴的散点图中比较有用。(在设置 min 和 max 之后该配置项无效。)
+					scale: true, //是否是脱离 0 值比例。设置成 true 后坐标刻度不会强制包含零刻度。在双数值轴的散点图中比较有用。(在设置 min 和 max 之后该配置项无效。)
-					axisLine: {
+					axisLine: {
-						show: true
+						show: true
-					}, //坐标轴轴线相关设置。
+					}, //坐标轴轴线相关设置。
-					axisTick: {
+					axisTick: {
-						show: true,
+						show: true,
-						inside: true
+						inside: true
-					}, //坐标轴刻度相关设置。
+					}, //坐标轴刻度相关设置。
-					axisLabel: { //坐标轴刻度标签的相关设置。
+					axisLabel: { //坐标轴刻度标签的相关设置。
-						show: true,
+						show: true,
-						color: 'rgba(99, 117, 139, 1.0)',
+						color: 'rgba(99, 117, 139, 1.0)',
-						inside: true,
+						inside: true,
-						fontSize: 10,
+						fontSize: 10,
-						formatter: function(value) {
+						formatter: function(value) {
-							return Number(value).toFixed(2)
+							return Number(value).toFixed(2)
-						}
+						}
-					},
+					},
-					splitLine: {
+					splitLine: {
-						show: false,
+						show: false,
-						lineStyle: {
+						lineStyle: {
-							color: 'rgba(255,255,255, 0.1)'
+							color: 'rgba(255,255,255, 0.1)'
-						}
+						}
-					}, //坐标轴在 grid 区域中的分隔线。
+					}, //坐标轴在 grid 区域中的分隔线。
-				}, {
+				}, {
-					type: 'value',
+					type: 'value',
-					position: 'right',
+					position: 'right',
-					scale: true,
+					scale: true,
-					gridIndex: 1,
+					gridIndex: 1,
-					axisLine: {
+					axisLine: {
-						show: false
+						show: false
-					},
+					},
-					axisTick: {
+					axisTick: {
-						show: false
+						show: false
-					},
+					},
-					axisLabel: {
+					axisLabel: {
-						show: false
+						show: false
-					},
+					},
-					splitLine: {
+					splitLine: {
-						show: false
+						show: false
-					}
+					}
-				}],
+				}],
-
+
-				animation: false, //是否开启动画。
+				animation: false, //是否开启动画。
-				color: colorList,
+				color: colorList,
-				tooltip: {
+				tooltip: {
-					show: true, //是否显示提示框组件,包括提示框浮层和 axisPointer。
+					show: true, //是否显示提示框组件,包括提示框浮层和 axisPointer。
-					trigger: 'axis', //触发类型。item,axis,none
+					trigger: 'axis', //触发类型。item,axis,none
-					formatter(params) {
+					formatter(params) {
-						let tooltip = '';
+						let tooltip = '';
-						let time = '',
+						let time = '',
-							open = 0,
+							open = 0,
-							high = 0,
+							high = 0,
-							low = 0,
+							low = 0,
-							close = 0,
+							close = 0,
-							amount = 0;
+							amount = 0;
-						for (var i = 0; i < params.length; i++) {
+						for (var i = 0; i < params.length; i++) {
-							if (params[i].seriesName === '日K') {
+							if (params[i].seriesName === '日K') {
-								time = params[i].name;
+								time = params[i].name;
-								open = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
+								open = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
-									1], 2)) : 0;
+									1], 2)) : 0;
-								close = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
+								close = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
-									2], 2)) : 0;
+									2], 2)) : 0;
-								low = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
+								low = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
-									3], 2)) : 0;
+									3], 2)) : 0;
-								high = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
+								high = params[i].data.length > 1 ? Number(that.formatterNum(params[i].data[
-									4], 2)) : 0;
+									4], 2)) : 0;
-								amount = params[i].data.length > 1 ? Number(that.formatterNum(params[i]
+								amount = params[i].data.length > 1 ? Number(that.formatterNum(params[i]
-									.data[5], 2)) : 0;
+									.data[5], 2)) : 0;
-								// console.log(time,open,close,low,high,amount)
+								// console.log(time,open,close,low,high,amount)
-								tooltip = '<div class="charts-tooltip">' +
+								tooltip = '<div class="charts-tooltip">' +
-									'<div class="charts-tooltip-row"><div class="ctr-label">' + '时间' +
+									'<div class="charts-tooltip-row"><div class="ctr-label">' + '时间' +
-									'</div><div class="ctr-value">' + time + '</div></div>' +
+									'</div><div class="ctr-value">' + time + '</div></div>' +
-									'<div class="charts-tooltip-row"><div class="ctr-label">' + '开' +
+									'<div class="charts-tooltip-row"><div class="ctr-label">' + '开' +
-									'</div><div class="ctr-value">' + open + '</div></div>' +
+									'</div><div class="ctr-value">' + open + '</div></div>' +
-									'<div class="charts-tooltip-row"><div class="ctr-label">' + '高' +
+									'<div class="charts-tooltip-row"><div class="ctr-label">' + '高' +
-									'</div><div class="ctr-value">' + high + '</div></div>' +
+									'</div><div class="ctr-value">' + high + '</div></div>' +
-									'<div class="charts-tooltip-row"><div class="ctr-label">' + '低' +
+									'<div class="charts-tooltip-row"><div class="ctr-label">' + '低' +
-									'</div><div class="ctr-value">' + low + '</div></div>' +
+									'</div><div class="ctr-value">' + low + '</div></div>' +
-									'<div class="charts-tooltip-row"><div class="ctr-label">' + '收' +
+									'<div class="charts-tooltip-row"><div class="ctr-label">' + '收' +
-									'</div><div class="ctr-value">' + close + '</div></div>' +
+									'</div><div class="ctr-value">' + close + '</div></div>' +
-									'<div class="charts-tooltip-row"><div class="ctr-label">' + '数量' +
+									'<div class="charts-tooltip-row"><div class="ctr-label">' + '数量' +
-									'</div><div class="ctr-value">' + amount + '</div></div></div>';
+									'</div><div class="ctr-value">' + amount + '</div></div></div>';
-							}
+							}
-							if (params[i].seriesName === 'MA5') {
+							if (params[i].seriesName === 'MA5') {
-								that.MA5 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
+								that.MA5 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
-									.data, 2)) : 0
+									.data, 2)) : 0
-							}
+							}
-							if (params[i].seriesName === 'MA10') {
+							if (params[i].seriesName === 'MA10') {
-								that.MA10 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
+								that.MA10 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
-									.data, 2)) : 0
+									.data, 2)) : 0
-							}
+							}
-							if (params[i].seriesName === 'MA30') {
+							if (params[i].seriesName === 'MA30') {
-								that.MA30 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
+								that.MA30 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
-									.data, 2)) : 0
+									.data, 2)) : 0
-							}
+							}
-							if (params[i].seriesName === 'VolumeMA5') {
+							if (params[i].seriesName === 'VolumeMA5') {
-								that.volMA5 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
+								that.volMA5 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
-									.data, 2)) : 0
+									.data, 2)) : 0
-							}
+							}
-							if (params[i].seriesName === 'VolumeMA10') {
+							if (params[i].seriesName === 'VolumeMA10') {
-								that.volMA10 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
+								that.volMA10 = params[i].data !== 'NAN' ? Number(that.formatterNum(params[i]
-									.data, 2)) : 0
+									.data, 2)) : 0
-							}
+							}
-						}
+						}
-						return tooltip;
+						return tooltip;
-					},
+					},
-					triggerOn: 'click', //提示框触发的条件 'mousemove','click','mousemove|click','none'
+					triggerOn: 'click', //提示框触发的条件 'mousemove','click','mousemove|click','none'
-					textStyle: {
+					textStyle: {
-						fontSize: 10
+						fontSize: 10
-					}, //提示框浮层的文本样式
+					}, //提示框浮层的文本样式
-					backgroundColor: 'rgba(30,42,66,0.8);', //提示框浮层的背景颜色。
+					backgroundColor: 'rgba(30,42,66,0.8);', //提示框浮层的背景颜色。
-					borderColor: '#2f3a56', //提示框浮层的边框颜色。
+					borderColor: '#2f3a56', //提示框浮层的边框颜色。
-					borderWidth: 2,
+					borderWidth: 2,
-					position: function(pos, params, el, elRect, size) { //提示框浮层的位置,默认不设置时位置会跟随鼠标的位置。
+					position: function(pos, params, el, elRect, size) { //提示框浮层的位置,默认不设置时位置会跟随鼠标的位置。
-						var obj = {
+						var obj = {
-							top: 20
+							top: 20
-						};
+						};
-						obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 10;
+						obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 10;
-						return obj;
+						return obj;
-					},
+					},
-					axisPointer: { //坐标轴指示器配置项。
+					axisPointer: { //坐标轴指示器配置项。
-						label: {
+						label: {
-							color: 'rgba(255,255,255,.87)',
+							color: 'rgba(255,255,255,.87)',
-							fontSize: 9,
+							fontSize: 9,
-							backgroundColor: '#020204',
+							backgroundColor: '#020204',
-							borderColor: "#9c9fa4",
+							borderColor: "#9c9fa4",
-							shadowBlur: 0,
+							shadowBlur: 0,
-							borderWidth: 0.5,
+							borderWidth: 0.5,
-							padding: [4, 2, 3, 2],
+							padding: [4, 2, 3, 2],
-						},
+						},
-						animation: false,
+						animation: false,
-						type: 'cross',
+						type: 'cross',
-						lineStyle: {
+						lineStyle: {
-							color: {
+							color: {
-								type: 'linear',
+								type: 'linear',
-								x: 0,
+								x: 0,
-								y: 0,
+								y: 0,
-								x2: 0,
+								x2: 0,
-								y2: 1,
+								y2: 1,
-								colorStops: [{
+								colorStops: [{
-									offset: 0,
+									offset: 0,
-									color: 'rgba(30, 42, 66, 0.1)' // 0% 处的颜色
+									color: 'rgba(30, 42, 66, 0.1)' // 0% 处的颜色
-								}, {
+								}, {
-									offset: 0.7,
+									offset: 0.7,
-									color: 'rgba(30, 42, 66,0.9)' // 100% 处的颜色
+									color: 'rgba(30, 42, 66,0.9)' // 100% 处的颜色
-								}, {
+								}, {
-									offset: 1,
+									offset: 1,
-									color: 'rgba(30, 42, 66,0.2)' // 100% 处的颜色
+									color: 'rgba(30, 42, 66,0.2)' // 100% 处的颜色
-								}]
+								}]
-							},
+							},
-							width: 10,
+							width: 10,
-							shadowColor: 'rgba(30, 42, 66,0.7)',
+							shadowColor: 'rgba(30, 42, 66,0.7)',
-							shadowBlur: 0,
+							shadowBlur: 0,
-							shadowOffsetY: 68,
+							shadowOffsetY: 68,
-						}
+						}
-					}
+					}
-				},
+				},
-
+
-				dataZoom: [{ //用于区域缩放
+				dataZoom: [{ //用于区域缩放
-					type: 'inside',
+					type: 'inside',
-					xAxisIndex: [0, 1],
+					xAxisIndex: [0, 1],
-					realtime: false,
+					realtime: false,
-					start: 50,
+					start: 50,
-					end: 100,
+					end: 100,
-				}],
+				}],
-				series: [{
+				series: [{
-						type: 'candlestick',
+						type: 'candlestick',
-						name: '日K',
+						name: '日K',
-						data: [],
+						data: [],
-						itemStyle: {
+						itemStyle: {
-							color: upColor,
+							color: upColor,
-							color0: downColor,
+							color0: downColor,
-							borderColor: upColor,
+							borderColor: upColor,
-							borderColor0: downColor
+							borderColor0: downColor
-						},
+						},
-						markPoint: {
+						markPoint: {
-							symbol: 'rect',
+							symbol: 'rect',
-							symbolSize: [-10, 0.5],
+							symbolSize: [-10, 0.5],
-							symbolOffset: [5, 0],
+							symbolOffset: [5, 0],
-							itemStyle: {
+							itemStyle: {
-								color: 'rgba(255,255,255,.87)'
+								color: 'rgba(255,255,255,.87)'
-							},
+							},
-							label: {
+							label: {
-								color: 'rgba(255,255,255,.87)',
+								color: 'rgba(255,255,255,.87)',
-								offset: [10, 0],
+								offset: [10, 0],
-								fontSize: 10,
+								fontSize: 10,
-								align: 'left',
+								align: 'left',
-								formatter: function(params) {
+								formatter: function(params) {
-									return Number(params.value).toFixed(2)
+									return Number(params.value).toFixed(2)
-								}
+								}
-							},
+							},
-							data: [{
+							data: [{
-									name: 'max',
+									name: 'max',
-									type: 'max',
+									type: 'max',
-									valueDim: 'highest'
+									valueDim: 'highest'
-								},
+								},
-								{
+								{
-									name: 'min',
+									name: 'min',
-									type: 'min',
+									type: 'min',
-									valueDim: 'lowest'
+									valueDim: 'lowest'
-								}
+								}
-							]
+							]
-						},
+						},
-					},
+					},
-					{
+					{
-						name: 'MA5',
+						name: 'MA5',
-						type: 'line',
+						type: 'line',
-						data: [],
+						data: [],
-						symbol: 'none', //去除圆点
+						symbol: 'none', //去除圆点
-						smooth: true,
+						smooth: true,
-						lineStyle: {
+						lineStyle: {
-							normal: {
+							normal: {
-								opacity: 1,
+								opacity: 1,
-								width: 1,
+								width: 1,
-								color: "#eef4ba"
+								color: "#eef4ba"
-							}
+							}
-						},
+						},
-						z: 5
+						z: 5
-					},
+					},
-					{
+					{
-						name: 'MA10',
+						name: 'MA10',
-						type: 'line',
+						type: 'line',
-						data: [],
+						data: [],
-						symbol: 'none', //去除圆点
+						symbol: 'none', //去除圆点
-						smooth: true,
+						smooth: true,
-						lineStyle: {
+						lineStyle: {
-							normal: {
+							normal: {
-								opacity: 1,
+								opacity: 1,
-								width: 1,
+								width: 1,
-								color: '#83c1c5'
+								color: '#83c1c5'
-							}
+							}
-						},
+						},
-						z: 4
+						z: 4
-					},
+					},
-					{
+					{
-						name: 'MA30',
+						name: 'MA30',
-						type: 'line',
+						type: 'line',
-						data: [],
+						data: [],
-						symbol: 'none', //去除圆点
+						symbol: 'none', //去除圆点
-						smooth: true,
+						smooth: true,
-						lineStyle: {
+						lineStyle: {
-							normal: {
+							normal: {
-								opacity: 1,
+								opacity: 1,
-								width: 1,
+								width: 1,
-								color: '#b39cd8'
+								color: '#b39cd8'
-							}
+							}
-						},
+						},
-						z: 3
+						z: 3
-					},
+					},
-					{
+					{
-						name: 'Volume',
+						name: 'Volume',
-						type: 'bar',
+						type: 'bar',
-						xAxisIndex: 1,
+						xAxisIndex: 1,
-						yAxisIndex: 1,
+						yAxisIndex: 1,
-						data: []
+						data: []
-					},
+					},
-					{
+					{
-						name: 'VolumeMA5',
+						name: 'VolumeMA5',
-						type: 'line',
+						type: 'line',
-						xAxisIndex: 1,
+						xAxisIndex: 1,
-						yAxisIndex: 1,
+						yAxisIndex: 1,
-						data: [],
+						data: [],
-						symbol: 'none', //去除圆点
+						symbol: 'none', //去除圆点
-						smooth: true,
+						smooth: true,
-						lineStyle: {
+						lineStyle: {
-							normal: {
+							normal: {
-								opacity: 1,
+								opacity: 1,
-								width: 1,
+								width: 1,
-								color: "#eef4ba"
+								color: "#eef4ba"
-							}
+							}
-						},
+						},
-						z: 5
+						z: 5
-					},
+					},
-					{
+					{
-						name: 'VolumeMA10',
+						name: 'VolumeMA10',
-						type: 'line',
+						type: 'line',
-						xAxisIndex: 1,
+						xAxisIndex: 1,
-						yAxisIndex: 1,
+						yAxisIndex: 1,
-						data: [],
+						data: [],
-						symbol: 'none', //去除圆点
+						symbol: 'none', //去除圆点
-						smooth: true,
+						smooth: true,
-						lineStyle: {
+						lineStyle: {
-							normal: {
+							normal: {
-								opacity: 1,
+								opacity: 1,
-								width: 1,
+								width: 1,
-								color: '#83c1c5'
+								color: '#83c1c5'
-							}
+							}
-						},
+						},
-						z: 4
+						z: 4
-					},
+					},
-				]
+				]
-			};
+			};
-			myChart.setOption(option);
+			myChart.setOption(option);
-			// 加载上一页数据
+			// 加载上一页数据
-			myChart.on('datazoom', function(params) {
+			myChart.on('datazoom', function(params) {
-				let num = params.batch[0]['start'];
+				let num = params.batch[0]['start'];
-				if (num == 0) {
+				if (num == 0) {
-					console.log('到最左边了')
+					console.log('到最左边了')
-				}
+				}
-			})
+			})
-			window.addEventListener('resize', () => {
+			window.addEventListener('resize', () => {
-				myChart.resize()
+				myChart.resize()
-			})
+			})
-		}
+		}
-	}
+	}
 })
 })

+ 38 - 30
hybrid/html/local.html

@@ -3,8 +3,8 @@
 	<head>
 	<head>
 		<meta charset="utf-8" />
 		<meta charset="utf-8" />
 		<meta name="viewport" content="width=device-width, initial-scale=1">
 		<meta name="viewport" content="width=device-width, initial-scale=1">
-		<title>交易</title>
+		<title>交易</title>
-		<link rel="stylesheet" type="text/css" href="css/kline.css"/>
+		<link rel="stylesheet" type="text/css" href="css/kline.css" />
 	</head>
 	</head>
 
 
 	<body>
 	<body>
@@ -16,8 +16,9 @@
 				</div>
 				</div>
 				<div class="head-item">
 				<div class="head-item">
 					<div class="head-item-cell">
 					<div class="head-item-cell">
-						<span class="hic-label">涨跌幅</span>
+						<span class="hic-label">漲跌幅</span>
-						<span class="hic-value" :class="txData.upFlag==1?'price-green':'price-red'">{{txData.upRate || 0}}</span>
+						<span class="hic-value"
+							:class="txData.upFlag==1?'price-green':'price-red'">{{txData.upRate || 0}}</span>
 					</div>
 					</div>
 					<div class="head-item-cell">
 					<div class="head-item-cell">
 						<span class="hic-label"></span>
 						<span class="hic-label"></span>
@@ -37,7 +38,8 @@
 			</div>
 			</div>
 			<div class="tabs">
 			<div class="tabs">
 				<div @click="switchTab(item.value)" class="tabs-item" v-for="(item,index) in tabs" :key="index">
 				<div @click="switchTab(item.value)" class="tabs-item" v-for="(item,index) in tabs" :key="index">
-					<span class="tabs-item-text" :class="{'tabs-item-text-active':current==item.value}">{{item.label}}</span>
+					<span class="tabs-item-text"
+						:class="{'tabs-item-text-active':current==item.value}">{{item.label}}</span>
 					<div class="tabs-item-bar" :class="{'tabs-item-bar-active':current==item.value}"></div>
 					<div class="tabs-item-bar" :class="{'tabs-item-bar-active':current==item.value}"></div>
 				</div>
 				</div>
 			</div>
 			</div>
@@ -65,21 +67,23 @@
 				<div v-if="category==1" class="depth">
 				<div v-if="category==1" class="depth">
 					<div class="depth-head">
 					<div class="depth-head">
 						<div class="depth-head-left">
 						<div class="depth-head-left">
-							<div class="depth-head-label depth-head-left-index">买盘</div>
+							<div class="depth-head-label depth-head-left-index">買盤</div>
-							<div class="depth-head-label">量(XRD)</div>
+							<div class="depth-head-label">量(XRD)</div>
 						</div>
 						</div>
 						<div class="depth-head-center">
 						<div class="depth-head-center">
-							<div class="depth-head-label">格(USDT)</div>
+							<div class="depth-head-label">格(USDT)</div>
 						</div>
 						</div>
 						<div class="depth-head-right">
 						<div class="depth-head-right">
-							<div class="depth-head-label">量(XRD)</div>
+							<div class="depth-head-label">量(XRD)</div>
-							<div class="depth-head-label depth-head-right-index">卖盘</div>
+							<div class="depth-head-label depth-head-right-index">賣盤</div>
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="depth-main">
 					<div class="depth-main">
 						<div class="depth-main-item">
 						<div class="depth-main-item">
-							<div class="dmi-cell" style="justify-content: flex-end;" v-for="(item,index) in buyList" :key="index">
+							<div class="dmi-cell" style="justify-content: flex-end;" v-for="(item,index) in buyList"
-								<div class="dmi-cell-bg" :style="{'width': `${item.width}%`,'backgroundColor':'#303f38'}"></div>
+								:key="index">
+								<div class="dmi-cell-bg"
+									:style="{'width': `${item.width}%`,'backgroundColor':'#303f38'}"></div>
 								<div class="dmi-cell-item">
 								<div class="dmi-cell-item">
 									<div class="dmi-cell-index">{{index+1}}</div>
 									<div class="dmi-cell-index">{{index+1}}</div>
 									<div class="dmi-cell-num">{{item.amount || '--'}}</div>
 									<div class="dmi-cell-num">{{item.amount || '--'}}</div>
@@ -89,7 +93,8 @@
 						</div>
 						</div>
 						<div class="depth-main-item">
 						<div class="depth-main-item">
 							<div class="dmi-cell" v-for="(item,index) in sellList || 10" :key="index">
 							<div class="dmi-cell" v-for="(item,index) in sellList || 10" :key="index">
-								<div class="dmi-cell-bg" :style="{'width': `${item.width}%`,'backgroundColor':'#3c2a2e'}"></div>
+								<div class="dmi-cell-bg"
+									:style="{'width': `${item.width}%`,'backgroundColor':'#3c2a2e'}"></div>
 								<div class="dmi-cell-item">
 								<div class="dmi-cell-item">
 									<div class="dmi-cell-price" style="padding-left: 5px;">{{item.price || '--'}}</div>
 									<div class="dmi-cell-price" style="padding-left: 5px;">{{item.price || '--'}}</div>
 									<div class="dmi-cell-num" style="text-align: right;">{{item.amount || '--'}}</div>
 									<div class="dmi-cell-num" style="text-align: right;">{{item.amount || '--'}}</div>
@@ -101,15 +106,16 @@
 				</div>
 				</div>
 				<div v-else-if="category==2" class="transaction">
 				<div v-else-if="category==2" class="transaction">
 					<div class="transaction-head">
 					<div class="transaction-head">
-						<div class="transaction-head-item tmc-time">时间</div>
+						<div class="transaction-head-item tmc-time">時間</div>
 						<div class="transaction-head-item tmc-type">方向</div>
 						<div class="transaction-head-item tmc-type">方向</div>
-						<div class="transaction-head-item tmc-price"></div>
+						<div class="transaction-head-item tmc-price"></div>
-						<div class="transaction-head-item tmc-num"></div>
+						<div class="transaction-head-item tmc-num"></div>
 					</div>
 					</div>
 					<div class="transaction-main">
 					<div class="transaction-main">
 						<div class="transaction-main-cell" v-for="(item,index) in dealHis || 10" :key="index">
 						<div class="transaction-main-cell" v-for="(item,index) in dealHis || 10" :key="index">
 							<span class="tmc-label tmc-time">{{item.date || '--'}}</span>
 							<span class="tmc-label tmc-time">{{item.date || '--'}}</span>
-							<span class="tmc-label tmc-type" :style="{color:item.takerFlag==1?'#38ad70':'#fe5c57'}">{{item.takerFlag==1?'买入':'卖出'}}</span>
+							<span class="tmc-label tmc-type"
+								:style="{color:item.takerFlag==1?'#38ad70':'#fe5c57'}">{{item.takerFlag==1?'買入':'賣出'}}</span>
 							<span class="tmc-label tmc-price">{{item.price || '--'}}</span>
 							<span class="tmc-label tmc-price">{{item.price || '--'}}</span>
 							<span class="tmc-label tmc-num">{{item.amount || '--'}}</span>
 							<span class="tmc-label tmc-num">{{item.amount || '--'}}</span>
 						</div>
 						</div>
@@ -118,45 +124,47 @@
 				<div v-else="category==3" class="introduction">
 				<div v-else="category==3" class="introduction">
 					<div class="introduction-name">{{tokenInfo.tokenName || '--'}}</div>
 					<div class="introduction-name">{{tokenInfo.tokenName || '--'}}</div>
 					<div class="introduction-cell">
 					<div class="introduction-cell">
-						<span class="introduction-cell-label">发行时间</span>
+						<span class="introduction-cell-label">發行時間</span>
 						<span class="introduction-cell-value">{{tokenInfo.issueDate || '--'}}</span>
 						<span class="introduction-cell-value">{{tokenInfo.issueDate || '--'}}</span>
 					</div>
 					</div>
 					<div class="introduction-cell">
 					<div class="introduction-cell">
-						<span class="introduction-cell-label">发行总</span>
+						<span class="introduction-cell-label">發行總</span>
 						<span class="introduction-cell-value">{{tokenInfo.totalSupply || '--'}}</span>
 						<span class="introduction-cell-value">{{tokenInfo.totalSupply || '--'}}</span>
 					</div>
 					</div>
 					<div class="introduction-cell">
 					<div class="introduction-cell">
-						<span class="introduction-cell-label">流通</span>
+						<span class="introduction-cell-label">流通</span>
 						<span class="introduction-cell-value">{{tokenInfo.nowSupply || '--'}}</span>
 						<span class="introduction-cell-value">{{tokenInfo.nowSupply || '--'}}</span>
 					</div>
 					</div>
-					
+
 					<div class="introduction-cell">
 					<div class="introduction-cell">
-						<span class="introduction-cell-label">众筹价</span>
+						<span class="introduction-cell-label">眾籌價</span>
 						<span class="introduction-cell-value">{{tokenInfo.price || '--'}}</span>
 						<span class="introduction-cell-value">{{tokenInfo.price || '--'}}</span>
 					</div>
 					</div>
 					<div class="introduction-cell">
 					<div class="introduction-cell">
-						<span class="introduction-cell-label">白皮</span>
+						<span class="introduction-cell-label">白皮</span>
 						<span class="introduction-cell-value">{{tokenInfo.whitePaper || '--'}}</span>
 						<span class="introduction-cell-value">{{tokenInfo.whitePaper || '--'}}</span>
 					</div>
 					</div>
 					<div class="introduction-cell">
 					<div class="introduction-cell">
-						<span class="introduction-cell-label"></span>
+						<span class="introduction-cell-label"></span>
 						<span class="introduction-cell-value">{{tokenInfo.webSite || '--'}}</span>
 						<span class="introduction-cell-value">{{tokenInfo.webSite || '--'}}</span>
 					</div>
 					</div>
 					<div class="introduction-cell">
 					<div class="introduction-cell">
-						<span class="introduction-cell-label">区块查询</span>
+						<span class="introduction-cell-label">區塊查詢</span>
 						<span class="introduction-cell-value">{{tokenInfo.exploereSite || '--'}}</span>
 						<span class="introduction-cell-value">{{tokenInfo.exploereSite || '--'}}</span>
 					</div>
 					</div>
-					<div class="introduction-label"></div>
+					<div class="introduction-label"></div>
 					<div class="introduction-value">{{tokenInfo.remark || '--'}}</div>
 					<div class="introduction-value">{{tokenInfo.remark || '--'}}</div>
 				</div>
 				</div>
 			</div>
 			</div>
 			<div style="height:80px"></div>
 			<div style="height:80px"></div>
 			<div class="btns" v-if="txData.name">
 			<div class="btns" v-if="txData.name">
-				<div @click="back('/pages/transaction/bbjy?type=' + txData.name + '&current=1' )" class="btn btn-green">买入</div>
+				<div @click="back('/pages/transaction/bbjy?type=' + txData.name + '&current=1' )" class="btn btn-green">
-				<div @click="back('/pages/transaction/bbjy?type=' + txData.name + '&current=2' )" class="btn btn-red">卖出</div>
+					買入</div>
+				<div @click="back('/pages/transaction/bbjy?type=' + txData.name + '&current=2' )" class="btn btn-red">賣出
+				</div>
 			</div>
 			</div>
-			
+
-			
+
 		</div>
 		</div>
 		<script type="text/javascript" src="js/uni.webview.1.5.2.js"></script>
 		<script type="text/javascript" src="js/uni.webview.1.5.2.js"></script>
 		<script type="text/javascript" src="js/echarts.min.js"></script>
 		<script type="text/javascript" src="js/echarts.min.js"></script>

+ 12 - 240
lang/en.js

@@ -1,4 +1,3 @@
-<<<<<<< HEAD
 module.exports = {
 module.exports = {
 	index: {
 	index: {
 		rg: 'Buy',
 		rg: 'Buy',
@@ -173,6 +172,7 @@ module.exports = {
 		usdtsc: 'USDT market'
 		usdtsc: 'USDT market'
 	},
 	},
 	login: {
 	login: {
+
 		dl: 'Login',
 		dl: 'Login',
 		zc: 'Register',
 		zc: 'Register',
 		yx: 'Mail',
 		yx: 'Mail',
@@ -198,6 +198,7 @@ module.exports = {
 	popup: {
 	popup: {
 		qrtcdl: 'Confirm Logout',
 		qrtcdl: 'Confirm Logout',
 		qr: 'Confirm',
 		qr: 'Confirm',
+		qgxyy: 'Please update the application',
 		ts: 'Hint',
 		ts: 'Hint',
 		nwdl: 'You are not logged in. Do you want to log in now?',
 		nwdl: 'You are not logged in. Do you want to log in now?',
 		qx: 'Cancel'
 		qx: 'Cancel'
@@ -222,9 +223,11 @@ module.exports = {
 		zc: 'position',
 		zc: 'position',
 		kcdj: 'opening unit price',
 		kcdj: 'opening unit price',
 		dqjg: 'current price',
 		dqjg: 'current price',
+		pcjg: 'settlement price',
 		ykzt: 'break even status',
 		ykzt: 'break even status',
 		ykje: 'profit and loss amount',
 		ykje: 'profit and loss amount',
 		wtsj: 'Commissioning time',
 		wtsj: 'Commissioning time',
+		kcsj: 'Time of opening',
 		pcsj: 'Liquidation time',
 		pcsj: 'Liquidation time',
 		wtjg: 'Commission price',
 		wtjg: 'Commission price',
 		zydj: 'stop profit',
 		zydj: 'stop profit',
@@ -266,244 +269,13 @@ module.exports = {
 		wc: 'complete',
 		wc: 'complete',
 		gm: 'buy',
 		gm: 'buy',
 		cs: 'sell',
 		cs: 'sell',
-		lsjl: 'history'
+		lsjl: 'history',
-	}
+		qsrggbl: 'Please enter the lever multiplier',
-=======
+		s: 'Yes',
-module.exports = {
+		f: 'No',
-	index: {
-		rg: 'Buy',
-		cb: 'Charge',
-		tb: 'Mention',
-		yy: 'Language',
-		kf: 'Service',
-		jyd: 'Trasaction',
-		zxjg: 'Price',
-		zd: '24h Fluctuation',
-		sy: 'Index',
-	},
-	menu: {
-		yqm: 'Invite code',
-		xgmm: 'Change password',
-		smrz: 'Authentication',
-		tc: 'Quit'
-	},
-	rg: {
-		rgbz: 'Currency of Type',
-		kssj: 'Start',
-		jssj: 'End',
-		fxzl: 'All',
-		rgdj: 'Price',
-		scsj: 'Lock up time',
-		cysl: 'Join num',
-		rgsx: 'Subscription ceiling',
-		dczd: 'Single order minimum',
-		qsr: 'Please enter the subscription quantity',
-		xyzf: 'Need to pay',
-		ky: 'Usable',
-		ljcy: 'Get involved',
-		xmsm: 'Project Description',
-		rgsl: 'The number of subscriptions is greater than 0',
-		yebz: 'not sufficient funds',
-		rgcg: 'Successful subscription',
-		t: 'Day',
-		qbrg: 'All',
-		djz: 'Freeze',
-		yjd: 'Thawed',
-		xm: 'Project',
-		rgsl: 'Number ',
-		zfje: 'Price',
-		jdrq: 'Date ',
-		sfrq: 'Date ',
-		wdrg: 'My Currency'
 	},
 	},
-	cb: {
+	zxt: {
-		cblb: 'Money charge list',
+		mr: 'Buy',
-		cbxq: 'Charge Details',
+		mc: 'Solve',
-		ssnxydbz: 'Search for the currency you need',
+	}
-		bzlb: 'List of currencies',
-		bzccb: 'Currency charging is not supported',
-		cb: 'Charge money',
-		bz: 'Currency',
-		qx: 'Cancel',
-		cbwl: 'Money filling network',
-		cbdz: 'Currency charging address',
-		fzdz: 'Copy',
-		zxczje: 'Minimum top-up amount',
-		xyzxje: 'Top-up amounts less than the minimum amount will not be charged and cannot be refunded',
-		qxzzqd: 'Please select the correct recharge channel network; otherwise, the asset cannot be retrieved',
-		ndczdz: 'Your recharge address will not often change, you can repeat recharge;  If there is any change, we will try to notify you through the website announcement or email ',
-		qwbqrdn: 'Make sure your computer and browser are secure to prevent information from being tampered with or leaked ',
-		zzje: 'Transfer amount',
-		qsrzzje: 'Please enter the transfer amount',
-		xczzpz: 'Upload the transfer voucher',
-		tj: 'Submit ',
-		czjebnw: 'The top-up amount cannot be 0',
-		qcszzpz: 'Please upload the transfer voucher',
-		tjsqcg: 'The application has been successfully submitted, please wait patiently for review',
-		sj: 'Time',
-		sl: 'Number',
-		sxf: 'Service charge',
-		dsh: 'To be reviewed',
-		wc: 'Success',
-		sb: 'Fail',
-		lx: 'Type',
-		ptcb: 'Ordinary currency charge',
-		zt: 'State',
-		zzpz: 'Service charge'
-	},
-	tb: {
-		tblb: 'Coin withdrawal list',
-		tbxq: 'Details of withdrawal',
-		ktblb: 'List of coins available for withdrawal',
-		tb: 'Mention money',
-		bz: 'Currency',
-		tbwl: 'Coin transfer network',
-		tbdz: 'Coin withdrawal address',
-		qsrtbdz: 'Please enter the deposit address',
-		tbsl: 'Amount of withdrawal',
-		ky: 'usable',
-		qsrtbsl: 'Please enter the withdrawal amount',
-		qb: 'All',
-		tj: 'Submit',
-		sjdz: 'Actual receipt of account',
-		tbkc: 'Withdrawal deduction',
-		sxfsxt: 'The number of handling charges',
-		xyzxjed: 'Withdrawals less than the minimum amount will not be received and cannot be returned',
-		wbzzjaq: 'In order to ensure the security of funds, when your account security policy is changed or your password is modified, we will manually review the withdrawal. Please patiently wait for the staff to contact us by phone or email. ',
-		tbslbnw: 'The number of withdrawals cannot be 0',
-		qsrscdz: 'Please enter the upload address',
-	},
-	hy: {
-		jg: 'price',
-		sl: 'number',
-		jyfx: 'Direction of trade',
-		sz: 'rose',
-		xd: 'fall',
-		xjwt: 'limit order',
-		sjwt: 'market order',
-		jygs: 'lot size',
-		ggbs: 'leverage multiple',
-		zsj: 'stop loss price',
-		zyj: 'stop profit price',
-		bzj: 'Margin',
-		kyhyye: 'free margin',
-		sxf: 'Fees',
-		zd: 'long',
-		zk: 'long short',
-		zc: 'position',
-		kcdj: 'opening unit price',
-		dqjg: 'current price',
-		ykzt: 'break even status',
-		ykje: 'profit and loss amount',
-		wtsj: 'Commissioning time',
-		pcsj: 'Liquidation time',
-		wtjg: 'Commission price',
-		zydj: 'stop profit',
-		zkdj: 'Stop loss',
-		qr: 'confirm',
-		qx: 'cancel',
-		tjz: 'process',
-		ts: 'prompt',
-		gdcg: 'Successful order placement',
-		jycg: 'Successful transaction',
-		sjjzz: 'loading',
-		pc: 'ring out',
-		sfljpc: 'Whether to close the position immediately. After confirmation, it cannot be modified',
-		pccg: 'Successful closing of positions',
-		cx: 'repeal',
-		sfljcx: 'Whether to cancel immediately. After confirmation, it cannot be modified',
-		qqz: 'loading',
-		cxcg: 'Succeeded in canceling',
-		djhq: 'get',
-		qbdd: 'all orders',
-		cp: 'product',
-		ssjg: 'real time price',
-		jrdz: 'up and down today',
-		wtss: 'hands',
-		yl: 'profit',
-		ks: 'losses',
-		qbwt: 'entrusted',
-		qbcc: 'position',
-		cjmx: 'obviously',
-		mr: 'buy',
-		mc: 'sell',
-		sjcj: 'actual',
-		sj: 'time',
-		wtj: 'commission price',
-		jye: 'turnover',
-		cjzj: 'total',
-		cjjj: 'average',
-		cjl: 'turnove',
-		wc: 'complete',
-		gm: 'buy',
-		cs: 'sell',
-		lsjl: 'history'
-	},
-	hy: {
-			jg: 'price',
-			sl: 'number',
-			jyfx: 'Direction of trade',
-			sz: 'rose',
-			xd: 'fall',
-			xjwt: 'limit order',
-			sjwt: 'market order',
-			jygs: 'lot size',
-			ggbs: 'leverage multiple',
-			zsj: 'stop loss price',
-			zyj: 'stop profit price',
-			bzj: 'Margin',
-			kyhyye: 'free margin',
-			sxf: 'Fees',
-			zd: 'long',
-			zk: 'long short',
-			zc: 'position',
-			kcdj: 'opening unit price',
-			dqjg: 'current price',
-			ykzt: 'break even status',
-			ykje: 'profit and loss amount',
-			wtsj: 'Commissioning time',
-			pcsj: 'Liquidation time',
-			wtjg: 'Commission price',
-			zydj: 'stop profit',
-			zkdj: 'Stop loss',
-			qr: 'confirm',
-			qx: 'cancel',
-			tjz: 'process',
-			ts: 'prompt',
-			gdcg: 'Successful order placement',
-			jycg: 'Successful transaction',
-			sjjzz: 'loading',
-			pc: 'ring out',
-			sfljpc: 'Whether to close the position immediately. After confirmation, it cannot be modified',
-			pccg: 'Successful closing of positions',
-			cx: 'repeal',
-			sfljcx: 'Whether to cancel immediately. After confirmation, it cannot be modified',
-			qqz:'loading',
-			cxcg: 'Succeeded in canceling',
-			djhq: 'get',
-			qbdd: 'all orders',
-			cp: 'product',
-			ssjg: 'real time price',
-			jrdz: 'up and down today',
-			wtss: 'hands',
-			yl: 'profit',
-			ks: 'losses',
-			qbwt: 'entrusted',
-			qbcc: 'position',
-			cjmx: 'obviously',
-			mr: 'buy',
-			mc: 'sell',
-			sjcj: 'actual',
-			sj: 'time',
-			wtj: 'commission price',
-			jye: 'turnover',
-			cjzj: 'total',
-			cjjj: 'average',
-			cjl: 'turnove',
-			wc: 'complete',
-			gm: 'buy',
-			cs: 'sell',
-			lsjl: 'history'
-		}
->>>>>>> 31477ea0dbf31e1e73e605cceea658b352b78431
 }
 }

+ 78 - 67
lang/zh_tw.js

@@ -199,78 +199,89 @@ module.exports = {
 	},
 	},
 	popup: {
 	popup: {
 		qrtcdl: '確認退出登錄',
 		qrtcdl: '確認退出登錄',
+		qgxyy: '请更新应用',
 		qr: '確認',
 		qr: '確認',
 		ts: '提示',
 		ts: '提示',
 		nwdl: '您未登錄,是否馬上登錄?',
 		nwdl: '您未登錄,是否馬上登錄?',
 		qx: '取消'
 		qx: '取消'
 	},
 	},
 	hy: {
 	hy: {
-			jg: '價格',
+		jg: '價格',
-			sl: '數量',
+		sl: '數量',
-			jyfx: '交易方向',
+		jyfx: '交易方向',
-			sz: '上漲',
+		sz: '上漲',
-			xd: '下跌',
+		xd: '下跌',
-			xjwt: '限價委托',
+		xjwt: '限價委托',
-			sjwt: '市價委托',
+		sjwt: '市價委托',
-			jygs: '交易個數',
+		jygs: '交易個數',
-			ggbs: '杠桿倍數',
+		ggbs: '槓桿倍數',
-			zsj: '止損價',
+		zsj: '止損價',
-			zyj: '止盈價',
+		zyj: '止盈價',
-			bzj: '保證金',
+		bzj: '保證金',
-			kyhyye: '可用合約餘額',
+		kyhyye: '可用合約餘額',
-			sxf: '手續費',
+		sxf: '手續費',
-			zd: '做多',
+		zd: '做多',
-			zk: '做空',
+		zk: '做空',
-			xjwt: '限價委託',
+		xjwt: '限價委託',
-			zc: '持倉',
+		zc: '持倉',
-			kcdj: '開倉單價',
+		kcdj: '開倉單價',
-			dqjg: '當前價格',
+		dqjg: '當前價格',
-			ykzt: '盈虧狀態',
+		pcjg: '平倉價格',
-			ykje: '盈虧金額',
+		ykzt: '盈虧狀態',
-			wtsj: '委託時間',
+		ykje: '盈虧金額',
-			pcsj: '平倉時間',
+		wtsj: '委託時間',
-			wtjg: '委托價格',
+		kcsj: '開倉時間',
-			zydj: '止盈單價',
+		pcsj: '平倉時間',
-			zkdj: '止損單價',
+		wtjg: '委托價格',
-			wtss: '委托手數',
+		zydj: '止盈單價',
-			qr: '確認',
+		zkdj: '止損單價',
-			qx: '取消',
+		wtss: '委托手數',
-			tjz: '提交中',
+		qr: '確認',
-			ts: '提示',
+		s: '是',
-			gdcg: '掛單成功',
+		f: '否',
-			jycg: '交易成功',
+		qx: '取消',
-			sjjzz: '數據加載中',
+		tjz: '提交中',
-			pc: '平倉',
+		ts: '提示',
-			sfljpc: '是否立即平倉,確認後不可修改',
+		gdcg: '掛單成功',
-			pccg: '平倉成功',
+		jycg: '交易成功',
-			cx: '撤銷',
+		sjjzz: '數據加載中',
-			sfljcx: '是否立即撤銷,確認後不可修改',
+		pc: '平倉',
-			qqz:'請求中',
+		sfljpc: '是否確定平倉,確定後不可修改',
-			cxcg: '撤銷成功',
+		pccg: '平倉成功',
-			sz: '上漲',
+		cx: '撤銷',
-			djhq: '點擊獲取',
+		sfljcx: '是否立即撤銷,確認後不可修改',
-			qbdd: '全部訂單',
+		qqz: '請求中',
-			cp: '產品',
+		cxcg: '撤銷成功',
-			ssjg: '實時價格',
+		sz: '上漲',
-			jrdz: '今日跌漲',
+		djhq: '點擊獲取',
-			yl: '盈利',
+		qbdd: '全部訂單',
-			ks: '虧損',
+		cp: '產品',
-			qbwt: '全部委托',
+		ssjg: '實時價格',
-			qbcc: '全部持倉',
+		jrdz: '今日跌漲',
-			cjmx: '成交明顯',
+		yl: '盈利',
-			mr: '買入',
+		ks: '虧損',
-			mc: '賣出',
+		qbwt: '全部委托',
-			sjcj: '實際成交',
+		qbcc: '全部持倉',
-			sj: '時間',
+		cjmx: '成交明細',
-			wtj: '委托價',
+		mr: '買入',
-			jye: '交易額',
+		mc: '賣出',
-			cjzj: '成交總價',
+		sjcj: '實際成交',
-			cjjj: '成交均價',
+		sj: '時間',
-			cjl: '成交量',
+		wtj: '委托價',
-			wc: '完成',
+		jye: '交易額',
-			gm: '購買',
+		cjzj: '成交總價',
-			cs: '出售',
+		cjjj: '成交均價',
-			lsjl: '歷史記錄'
+		cjl: '成交量',
-		}
+		wc: '完成',
+		gm: '購買',
+		cs: '出售',
+		lsjl: '歷史記錄',
+		qsrggbl: '請輸入槓桿倍率'
+	},
+	zxt: {
+		mr: '買入',
+		mc: '賣出',
+
+	}
 
 
 }
 }

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "GRAYSCALE",
     "name" : "GRAYSCALE",
     "appid" : "__UNI__F0EBD91",
     "appid" : "__UNI__F0EBD91",
     "description" : "",
     "description" : "",
-    "versionName" : "1.0.0",
+    "versionName" : "1.0.2",
-    "versionCode" : "100",
+    "versionCode" : 102,
     "transformPx" : false,
     "transformPx" : false,
     "app-plus" : {
     "app-plus" : {
         /* 5+App特有相关 */
         /* 5+App特有相关 */

+ 910 - 1038
pages/heyue/heyue.vue

@@ -1,1081 +1,953 @@
-<template>
+<template>
 	<view class="content">
 	<view class="content">
 		<!-- #ifdef APP-PLUS -->
 		<!-- #ifdef APP-PLUS -->
 		<view class="vheight"></view>
 		<view class="vheight"></view>
-		<!-- #endif -->
+		<!-- #endif -->
-		<view class="usdtTitle flex">
+		<view class="usdtTitle flex">
-			<view class="left flex">
+			<view class="left flex">
-				<image @click="alertShow=true" class="img margin-r-10" src="../../static/icon/hy02.png" mode="widthFix">
+				<image @click="alertShow = true" class="img margin-r-10" src="../../static/icon/hy02.png" mode="widthFix"></image>
-				</image>
+				<view class="margin-r-10">{{ listOBj[actionList].name }}</view>
-				<view class="margin-r-10">
+				<view :class="{ 'font-color-green': listOBj[actionList].bool, 'font-color-red': !listOBj[actionList].bool }">{{ listOBj[actionList].dcf }}</view>
-					{{listOBj[actionList].name}}
+			</view>
-				</view>
+			<view class="right"><image class="img" src="../../static/icon/hy01.png" mode="widthFix"></image></view>
-				<view :class="{'font-color-green':listOBj[actionList].bool,'font-color-red':!listOBj[actionList].bool}">
+		</view>
-					{{listOBj[actionList].dcf}}
+		<view class="box  flex padding-t-20 padding-b-30">
-				</view>
+			<view class="item" style="width: 65%;">
-			</view>
+				<!-- <view class="itemName flex">
-			<view class="right">
+					<view class="itemMinName">
-				<image class="img" src="../../static/icon/hy01.png" mode="widthFix"></image>
+						当前價格
-			</view>
+					</view>
-		</view>
+					<view class="itemMinName">
-		<view class="box  flex padding-t-20 padding-b-30">
+						開盤價
-			<view class="item" style="width: 65%;">
-				<!-- <view class="itemName flex">
-					<view class="itemMinName">
-						当前價格
-					</view>
-					<view class="itemMinName">
-						開盤價
-					</view>
-					<view class="itemMinName">
-						最高價
-					</view>
-					<view class="itemMinName">
-						最低價
-					</view>
-					<view class="itemMinName">
-						成交數量
-					</view>
-				</view>
-				<view class="itemList">
-					<view class="list flex font-color-green">
-						<view class="li top">
-							{{listOBj[actionList].last}}
-						</view>
-						<view class="li top">
-							{{listOBj[actionList].sodUtc0}}
-						</view>
-						<view class="li top">
-							{{listOBj[actionList].high24h}}
-						</view>
-						<view class="li top">
-							{{listOBj[actionList].low24h}}
-						</view>
-						<view class="li top">
-							{{listOBj[actionList].volCcy24h|actionMoney}}
-						</view>
-					</view>
-				</view> -->
-				<view class="itemTitle margin-b-20">
-					{{$t('hy.jyfx')}}
-				</view>
-				<view class="buttomBox flex">
-					<view @click="typeIndex=1" class="buttom " :class="{action:typeIndex==1}">
-						{{$t('hy.sz')}}
-					</view>
-					<view @click="typeIndex=2" class="buttom " :class="{action:typeIndex==2,'bg-danger':typeIndex==2}">
-						{{$t('hy.xd')}}
-					</view>
-				</view>
-				<view class="tabType flex ">
-					<view class="tab" @click="jyType=1" :class="{action:jyType==1}">
-						{{$t('hy.xjwt')}}
-					</view>
-					<view class="tab" @click="jyType=2" :class="{action:jyType==2}">
-						{{$t('hy.sjwt')}}
-					</view>
-				</view>
-				<view class="inputBox margin-b-20 flex" v-if="jyType==1">
-					<input v-model="xzMoney" class="input" :placeholder="$t('hy.jg')" type="number">
-					<view @click="xzMoney=listOBj[actionList].last" class="buttomZd font-color-yellow">
-						{{$t('hy.djhq')}}
-					</view>
-				</view>
-				<view class="itemTitle  margin-b-20">
-					{{$t('hy.jygs')}}
-				</view>
-				<view class="inputBox flex margin-b-20">
-					<input v-model="payNum" class="input" :placeholder="$t('hy.jygs')" type="number">
-					<view class="rightInputBox flex">
-						<image @click="payNum>0?payNum--:false" class="img" src="../../static/icon/hy04.png"
-							mode="scaleToFill"></image>
-						<view class="jg">
-						</view>
-						<image @click="payNum++" class="img" src="../../static/icon/hy03.png" mode="scaleToFill">
-						</image>
-					</view>
-				</view>
-				<view class="itemTitle margin-b-20">
-					{{$t('hy.ggbs')}}
-				</view>
-				<view class="itemLeftList flex margin-b-20">
-					<view class="ll" @click="changeGG(ind,ls)" :class="{action:ind==ggIndex}"
-						v-for="(ls,ind) in ggList">
-						{{ls.num}}
-					</view>
-				</view>
-				<view class="inputBox flex margin-b-20">
-					<input v-model="ggBs" class="input" placeholder="請輸入槓桿倍率" type="number">
-				</view>
-				<view class="flex margin-b-20">
-					<view class="itemTitle">
-						{{$t('hy.zsj')}}
-					</view>
-					<view class="inputBox flex">
-						<input v-model="zsMoney" :placeholder="$t('hy.zsj')" class="input" type="number">
-					</view>
-				</view>
-				<view class="flex margin-b-20">
-					<view class="itemTitle">
-						{{$t('hy.zyj')}}
-					</view>
-					<view class="inputBox flex">
-						<input v-model="zyMoney" placeholder="$t('hy.zyj')" class="input" type="number">
-					</view>
-				</view>
-				<view class="flex margin-b-20">
-					<view class="itemTitle">
-						{{$t('hy.bzj')}}
-					</view>
-					<view class="itemTitle">
-						{{bzjMoney}}
-					</view>
-				</view>
-				<view class="flex margin-b-20">
-					<view class="itemTitle">
-						{{$t('hy.kyhyye')}}
-					</view>
-					<view class="itemTitle">
-						{{userInfo.money}}
-					</view>
-				</view>
-				<view class="flex margin-b-20">
-					<view class="itemTitle">
-						{{$t('hy.sxf')}}
-					</view>
-					<view class="itemTitle">
-						{{sxfMoney}}
-					</view>
-				</view>
-				<view class="buttomSubmit" :class="{'bg-success':typeIndex==1,'bg-danger':typeIndex==2}" @click="UpOrderHandle()">
-					{{typeIndex==1?$t('hy.zd'):$t('hy.zk')}}
-				</view>
-			</view>
-			<view class="right-wrap">
-				<view class="line flex">
-					<view class="">
-						{{$t('hy.jg')}}
 					</view>
 					</view>
-					<view class="">
+					<view class="itemMinName">
-						{{$t('hy.sl')}}
+						最高價
+					</view>
+					<view class="itemMinName">
+						最低價
+					</view>
+					<view class="itemMinName">
+						成交數量
+					</view>
+				</view>
+				<view class="itemList">
+					<view class="list flex font-color-green">
+						<view class="li top">
+							{{listOBj[actionList].last}}
+						</view>
+						<view class="li top">
+							{{listOBj[actionList].sodUtc0}}
+						</view>
+						<view class="li top">
+							{{listOBj[actionList].high24h}}
+						</view>
+						<view class="li top">
+							{{listOBj[actionList].low24h}}
+						</view>
+						<view class="li top">
+							{{listOBj[actionList].volCcy24h|actionMoney}}
+						</view>
+					</view>
+				</view> -->
+				<view class="itemTitle margin-b-20">{{ $t('hy.jyfx') }}</view>
+				<view class="buttomBox flex">
+					<view @click="typeIndex = 1" class="buttom " :class="{ action: typeIndex == 1 }">{{ $t('hy.sz') }}</view>
+					<view @click="typeIndex = 2" class="buttom " :class="{ action: typeIndex == 2, 'bg-danger': typeIndex == 2 }">{{ $t('hy.xd') }}</view>
+				</view>
+				<view class="tabType flex ">
+					<view class="tab" @click="jyType = 1" :class="{ action: jyType == 1 }">{{ $t('hy.xjwt') }}</view>
+					<view class="tab" @click="jyType = 2" :class="{ action: jyType == 2 }">{{ $t('hy.sjwt') }}</view>
+				</view>
+				<view class="inputBox margin-b-20 flex" v-if="jyType == 1">
+					<input v-model="xzMoney" class="input" :placeholder="$t('hy.jg')" type="number" />
+					<view @click="xzMoney = listOBj[actionList].last" class="buttomZd font-color-yellow">{{ $t('hy.djhq') }}</view>
+				</view>
+				<view class="itemTitle  margin-b-20">{{ $t('hy.jygs') }}</view>
+				<view class="inputBox flex margin-b-20">
+					<input v-model="payNum" class="input" :placeholder="$t('hy.jygs')" type="number" />
+					<view class="rightInputBox flex">
+						<image @click="payNum > 0 ? payNum-- : false" class="img" src="../../static/icon/hy04.png" mode="scaleToFill"></image>
+						<view class="jg"></view>
+						<image @click="payNum++" class="img" src="../../static/icon/hy03.png" mode="scaleToFill"></image>
 					</view>
 					</view>
 				</view>
 				</view>
+				<view class="itemTitle margin-b-20">{{ $t('hy.ggbs') }}</view>
+				<view class="itemLeftList flex margin-b-20">
+					<view class="ll" @click="changeGG(ind, ls)" :class="{ action: ind == ggIndex }" v-for="(ls, ind) in ggList">{{ ls.num }}</view>
+				</view>
+				<view class="inputBox flex margin-b-20"><input v-model="ggBs" class="input" :placeholder="$t('hy.qsrggbl')" type="number" /></view>
+				<view class="flex margin-b-20">
+					<view class="itemTitle">{{ $t('hy.zsj') }}</view>
+					<view class="inputBox flex"><input v-model="zsMoney" :placeholder="$t('hy.zsj')" class="input" type="number" /></view>
+				</view>
+				<view class="flex margin-b-20">
+					<view class="itemTitle">{{ $t('hy.zyj') }}</view>
+					<view class="inputBox flex"><input v-model="zyMoney" :placeholder="$t('hy.zyj')" class="input" type="number" /></view>
+				</view>
+				<view class="flex margin-b-20">
+					<view class="itemTitle">{{ $t('hy.bzj') }}</view>
+					<view class="itemTitle">{{ bzjMoney }}</view>
+				</view>
+				<view class="flex margin-b-20">
+					<view class="itemTitle">{{ $t('hy.kyhyye') }}</view>
+					<view class="itemTitle">{{ userInfo.money }}</view>
+				</view>
+				<view class="flex margin-b-20">
+					<view class="itemTitle">{{ $t('hy.sxf') }}</view>
+					<view class="itemTitle">{{ sxfMoney }}</view>
+				</view>
+				<view class="buttomSubmit" :class="{ 'bg-success': typeIndex == 1, 'bg-danger': typeIndex == 2 }" @click="UpOrderHandle()">
+					{{ typeIndex == 1 ? $t('hy.zd') : $t('hy.zk') }}
+				</view>
+			</view>
+			<view class="right-wrap">
+				<view class="line flex">
+					<view class="">{{ $t('hy.jg') }}</view>
+					<view class="">{{ $t('hy.sl') }}</view>
+				</view>
 				<!-- 買入 -->
 				<!-- 買入 -->
 				<view class="" style="height: 400rpx;">
 				<view class="" style="height: 400rpx;">
 					<view class="line flex" v-for="item in gmList" style="color: #0ecb81;">
 					<view class="line flex" v-for="item in gmList" style="color: #0ecb81;">
-						<view class="">
+						<view class="">{{ item.pri }}</view>
-							{{item.pri}}
+						<view class="">{{ item.num }}</view>
-						</view>
-						<view class="">
-							{{item.num}}
-						</view>
 					</view>
 					</view>
 				</view>
 				</view>
-				
+
 				<!-- 當前價格 -->
 				<!-- 當前價格 -->
-				<view class="new-price">
+				<view class="new-price">{{ listOBj[actionList].last }}</view>
-					{{listOBj[actionList].last}}
-				</view>
 				<!-- 賣出 -->
 				<!-- 賣出 -->
 				<view class="" style="height: 400rpx;">
 				<view class="" style="height: 400rpx;">
 					<view class="line flex" v-for="item in mcList" style="color: #f7465c;">
 					<view class="line flex" v-for="item in mcList" style="color: #f7465c;">
-						<view class="">
+						<view class="">{{ item.pri }}</view>
-							{{item.pri}}
+						<view class="">{{ item.num }}</view>
-						</view>
-						<view class="">
-							{{item.num}}
-						</view>
 					</view>
 					</view>
 				</view>
 				</view>
-				
+			</view>
-			</view>
+		</view>
-		</view>
+		<view class="box margin-t-30 padding-t-30 padding-b-30">
-		<view class="box margin-t-30 padding-t-30 padding-b-30">
+			<view class="flex listTitleBox">
-			<view class="flex listTitleBox">
+				<view class="leftBottom flex">
-				<view class="leftBottom flex">
+					<view @click="ddTypeChage(0)" class="titleType margin-r-30" :class="{ action: ddType == 0 }">{{ $t('hy.xjwt') }}</view>
-					<view @click="ddTypeChage(0)" class="titleType margin-r-30" :class="{action:ddType==0}">
+					<view @click="ddTypeChage(1)" class="titleType" :class="{ action: ddType == 1 }">{{ $t('hy.zc') }}</view>
-						{{$t('hy.xjwt')}}
+				</view>
-					</view>
+				<view class="rightBottom flex" @click="navto('/pages/heyue/tradlist')">
-					<view @click="ddTypeChage(1)" class="titleType" :class="{action:ddType==1}">
+					<image class="img" src="../../static/icon/hy02.png" mode="widthFix"></image>
-						{{$t('hy.zc')}}
+					<view class="more">{{ $t('hy.qbdd') }}</view>
-					</view>
+				</view>
-				</view>
+			</view>
-				<view class="rightBottom flex" @click="navto('/pages/heyue/tradlist')">
+			<view v-for="(item, ind) in loadData[ddType].list" class="usdtList padding-t-30 padding-b-30">
-					<image class="img" src="../../static/icon/hy02.png" mode="widthFix"></image>
+				<view class="flex">
-					<view class="more">
+					<view class="name">
-						{{$t('hy.qbdd')}}
+						<text v-if="item.direction == 1" class="font-color-green">{{ $t('hy.zd') }}</text>
-					</view>
+						<text v-if="item.direction == 2" class="font-color-red">{{ $t('hy.zk') }}</text>
-				</view>
+						<text>{{ item.symbol }}</text>
-			</view>
+						<text
-			<view v-for="(item,ind) in loadData[ddType].list" class="usdtList padding-t-30 padding-b-30">
+							v-if="ddType == 1 && item.direction == 2"
-				<view class="flex">
+							:class="{
-					<view class="name">
+								'font-color-green': +((item.price - listOBj[item.symbol.replace('/', '-')].last) * item.num) >= 0,
-						<text v-if="item.direction==1" class="font-color-green">
+								'font-color-red': +((item.price - listOBj[item.symbol.replace('/', '-')].last) * item.num) < 0
-							{{$t('hy.zd')}}
+							}"
-						</text>
+						>
-						<text v-if="item.direction==2" class="font-color-red">
+							<!-- {{+item.profit}} -->
-							{{$t('hy.zk')}}
+							{{ ((item.price - listOBj[item.symbol.replace('/', '-')].last) * item.num).toFixed(2) || '' }}
-						</text>
+						</text>
-						<text>
+						<text
-							{{item.symbol}}
+							v-if="ddType == 1 && item.direction == 1"
-						</text>
+							:class="{
-						<text v-if="ddType==1 && item.direction==2"
+								'font-color-green': +((listOBj[item.symbol.replace('/', '-')].last - item.price) * item.num) >= 0,
-							:class="{'font-color-green':+((item.price - listOBj[item.symbol.replace('/','-')].last)*item.num)>=0,'font-color-red':+((item.price - listOBj[item.symbol.replace('/','-')].last)*item.num)<0}">
+								'font-color-red': +((listOBj[item.symbol.replace('/', '-')].last - item.price) * item.num) < 0
-							<!-- {{+item.profit}} -->{{ ((item.price - listOBj[item.symbol.replace('/','-')].last)*item.num).toFixed(2)|| ''}}
+							}"
+						>
+							<!-- {{+item.profit}} -->
+							{{ ((listOBj[item.symbol.replace('/', '-')].last - item.price) * item.num).toFixed(2) || '' }}
 						</text>
 						</text>
-						<text v-if="ddType==1 && item.direction==1"
+					</view>
-							:class="{'font-color-green':+(( listOBj[item.symbol.replace('/','-')].last- item.price )*item.num)>=0,'font-color-red':+(( listOBj[item.symbol.replace('/','-')].last- item.price )*item.num)<0}">
+					<view @click="clearorder(item)" v-if="ddType == 0" class="usdtListButtom">{{ $t('hy.cx') }}</view>
-							<!-- {{+item.profit}} -->{{ (( listOBj[item.symbol.replace('/','-')].last- item.price )*item.num).toFixed(2) || ''}}
+					<view @click="closeorder(item)" v-if="ddType == 1" class="usdtListButtom">{{ $t('hy.pc') }}</view>
-						</text>
+				</view>
-					</view>
+				<view class="tip ">
-					<view @click="clearorder(item)" v-if="ddType==0" class="usdtListButtom">
+					<text v-if="item.direction == 1">{{ $t('hy.wtsj') }}:{{ item.wttime }}</text>
-						{{$t('hy.cx')}}
+					<text v-if="item.direction == 2">{{ $t('hy.kcsj') }}:{{ item.addtime }}</text>
-					</view>
+				</view>
-					<view @click="closeorder(item)" v-if="ddType==1" class="usdtListButtom">
+				<view class="flex" style="flex-wrap: wrap;">
-						{{$t('hy.pc')}}
+					<view v-if="ddType == 0" class="tipList">
-					</view>
+						<view class="nameTip">{{ $t('hy.wtjg') }}</view>
-				</view>
+						<view class="text">{{ item.wt_price }}</view>
-				<view class="tip ">
+					</view>
-					<text v-if="item.direction==1">
+					<view v-if="ddType == 1" class="tipList">
-						{{$t('hy.wtsj')}}:{{item.wttime}}
+						<view class="nameTip">{{ $t('hy.kcdj') }}</view>
-					</text>
+						<view class="text">{{ item.price }}</view>
-					<text v-if="item.direction==2">
+					</view>
-						{{$t('hy.kcsj')}}:{{item.addtime}}
+
-					</text>
+					<view class="tipList">
-				</view>
+						<view class="nameTip">{{ $t('hy.bzj') }}</view>
-				<view class="flex" style="flex-wrap: wrap;">
+						<view class="text">{{ item.bond }}</view>
-					<view v-if="ddType==0" class="tipList">
+					</view>
-						<view class="nameTip">
+					<view class="tipList">
-							{{$t('hy.wtjg')}}
+						<view class="nameTip">{{ $t('hy.jygs') }}</view>
-						</view>
+						<view class="text">{{ item.num }}</view>
-						<view class="text">
+					</view>
-							{{item.wt_price}}
+					<view class="tipList">
-						</view>
+						<view class="nameTip">{{ $t('hy.ggbs') }}</view>
-					</view>
+						<view class="text">{{ item.ggan }}</view>
-					<view v-if="ddType==1" class="tipList">
-						<view class="nameTip">
-							{{$t('hy.kcdj')}}
-						</view>
-						<view class="text">
-							{{item.price}}
-						</view>
-					</view>
-
-					<view class="tipList">
-						<view class="nameTip">
-							{{$t('hy.bzj')}}
-						</view>
-						<view class="text">
-							{{item.bond}}
-						</view>
-					</view>
-					<view class="tipList">
-						<view class="nameTip">
-							{{$t('hy.jygs')}}
-						</view>
-						<view class="text">
-							{{item.num}}
-						</view>
-					</view>
-					<view class="tipList">
-						<view class="nameTip">
-							{{$t('hy.ggbs')}}
-						</view>
-						<view class="text">
-							{{item.ggan}}
-						</view>
 					</view>
 					</view>
 					<template>
 					<template>
 						<view class="tipList">
 						<view class="tipList">
-							<view class="nameTip">
+							<view class="nameTip">{{ $t('hy.zydj') }}</view>
-								{{$t('hy.zydj')}}
+							<view class="text">{{ item.zyprice }}</view>
-							</view>
-							<view class="text">
-								{{item.zyprice}}
-							</view>
 						</view>
 						</view>
 						<view class="tipList">
 						<view class="tipList">
-							<view class="nameTip">
+							<view class="nameTip">{{ $t('hy.zkdj') }}</view>
-								{{$t('hy.zkdj')}}
+							<view class="text">{{ item.zsprice }}</view>
-							</view>
-							<view class="text">
-								{{item.zsprice}}
-							</view>
 						</view>
 						</view>
-					</template>
+					</template>
-				</view>
+				</view>
-			</view>
+			</view>
-		</view>
+		</view>
 		<view class="alertBox" v-show="alertShow">
 		<view class="alertBox" v-show="alertShow">
 			<!-- #ifdef APP-PLUS -->
 			<!-- #ifdef APP-PLUS -->
 			<view class="vheight"></view>
 			<view class="vheight"></view>
 			<!-- #endif -->
 			<!-- #endif -->
-			<view class="reback">
+			<view class="reback"><image src="../../static/icon/reback.png" mode="" @click="alertShow = false"></image></view>
-				<image src="../../static/icon/reback.png" mode="" @click="alertShow = false"></image>
+			<view class="list flex">
-			</view>
+				<view class="type">{{ $t('hy.cp') }}</view>
-			<view class="list flex">
+				<view class="type">{{ $t('hy.ssjg') }}</view>
-				<view class="type">
+				<view class="type">{{ $t('hy.jrdz') }}</view>
-					{{$t('hy.cp')}}
+			</view>
-				</view>
+			<view class="itemlist flex" @click="changeData(ls)" v-for="ls in listOBj" v-if="ls.name != 'BCH/USDT'">
-				<view class="type">
+				<view class="type name">{{ ls.name }}</view>
-					{{$t('hy.ssjg')}}
+				<view class="type money" :class="{ 'font-color-green': ls.bool, 'font-color-red': !ls.bool }">{{ ls.last }}</view>
-				</view>
+				<view class="type bfb" :class="{ 'font-color-green': ls.bool, 'font-color-red': !ls.bool }">{{ ls.dcf }}</view>
-				<view class="type">
-					{{$t('hy.jrdz')}}
-				</view>
-			</view>
-			<view class="itemlist flex" @click="changeData(ls)" v-for="ls in listOBj" v-if="ls.name != 'BCH/USDT'">
-				<view class="type name">
-					{{ls.name}}
-				</view>
-				<view class="type money" :class="{'font-color-green':ls.bool,'font-color-red':!ls.bool}">
-					{{ls.last}}
-				</view>
-				<view class="type bfb" :class="{'font-color-green':ls.bool,'font-color-red':!ls.bool}">
-					{{ls.dcf}}
-				</view>
 			</view>
 			</view>
 			<view class="itemlist flex" @click="changeData(ls)" v-for="ls in listOBj" v-if="ls.name == 'BCH/USDT'">
 			<view class="itemlist flex" @click="changeData(ls)" v-for="ls in listOBj" v-if="ls.name == 'BCH/USDT'">
-				<view class="type name">
+				<view class="type name">{{ ls.name }}</view>
-					{{ls.name}}
+				<view class="type money" :class="{ 'font-color-green': ls.bool, 'font-color-red': !ls.bool }">{{ ls.last }}</view>
-				</view>
+				<view class="type bfb" :class="{ 'font-color-green': ls.bool, 'font-color-red': !ls.bool }">{{ ls.dcf }}</view>
-				<view class="type money" :class="{'font-color-green':ls.bool,'font-color-red':!ls.bool}">
+			</view>
-					{{ls.last}}
+		</view>
-				</view>
+	</view>
-				<view class="type bfb" :class="{'font-color-green':ls.bool,'font-color-red':!ls.bool}">
+</template>
-					{{ls.dcf}}
+
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
 <script>
 <script>
-	import {
+import { mapState, mapMutations } from 'vuex';
-		mapState,
+import { levertadeLaverorder, closeorder, clearorder, UpOrderHandle, bond } from '@/api/heyue.js';
-		mapMutations
+import { scoketNew, scoketOpen } from '@/utils/socket.js';
-	} from 'vuex';
+import { geLevertade } from '@/api/index.js';
-	import {
+import { getUser } from '@/api/login.js';
-		levertadeLaverorder,
+export default {
-		closeorder,
+	data() {
-		clearorder,
+		return {
-		UpOrderHandle,
+			// 是否显示弹窗
-		bond
+			alertShow: false,
-	} from '@/api/heyue.js';
+			//保存幣種類型
-	import {
+			spList: [],
-		scoketNew,
+			// 右侧允许的最长长度
-		scoketOpen
+			listLength: 20,
-	} from '@/utils/socket.js';
+			// 当前选中的对象数据列表
-	import {
+			// actionList: 'BCH-USDT',
-		geLevertade
+			actionList: 'BTC-USDT',
-	} from '@/api/index.js';
+			// 價格列表
-	import { getUser} from '@/api/login.js'
+			listOBj: {
-	export default {
+				'BCH-USDT': {},
-		data() {
+				'BTC-USDT': {}
-			return {
-				// 是否显示弹窗
-				alertShow: false,
-				//保存幣種類型
-				spList: [],
-				// 右侧允许的最长长度
-				listLength: 20,
-				// 当前选中的对象数据列表
-				// actionList: 'BCH-USDT',
-				actionList: 'BTC-USDT',
-				// 價格列表
-				listOBj: {
-					"BCH-USDT": {},
-					"BTC-USDT": {}
-				},
-				// 当前选中的杠杆倍数
-				ggIndex: 0,
-				ggList: [{
-					num: 5
-				}, {
-					num: 10
-				}, {
-					num: 20
-				}, {
-					num: 50
-				}, {
-					num: 100
-				}],
-				//当前选中的交易类别
-				typeIndex: 1,
-				// 交易类型
-				jyType: 1,
-				//交易数量
-				payNum: 0,
-				// 杠杆倍数
-				ggBs: 0,
-				// 限价委托价格
-				xzMoney: 0,
-				// 止损价格
-				zsMoney: 0,
-				// 止盈价格
-				zyMoney: 0,
-				// 保證金
-				bzjMoney: 0,
-				// 手續費
-				sxfMoney: 0,
-				ddType: 1, //1委托订单2持仓订单3成交订单
-				loadData: [{
-						state: 1,
-						text: '限价委托',
-						loadingType: 'more',
-						list: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 2,
-						text: '持仓',
-						loadingType: 'more',
-						list: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					}
-				],
-				setTimeoutObj: '',
-				// 是否提交做多請求
-				upDataLoding: false,
-				gmList: [],
-				mcList: [],
-				gmobj: {},
-				mcobj: {}
-			}
-		},
-		watch: {
-			ggBs(newValue, oldValue) {
-				this.ggBs = newValue;
-				this.bond();
-			},
-			payNum(newValue, oldValue) {
-				this.payNum = newValue;
-				this.bond();
-			}
-		},
-		filters: {
-			actionMoney: function(value) {
-				let num = 0;
-				if (+value > 10000000) {
-					num = (+(value / 10000000).toFixed(2)) + '千萬'
-				} else if (+value > 10000) {
-					num = (+(value / 10000).toFixed(2)) + '萬'
-				}
-
-				return num;
-			}
-		},
-		onLoad() {
-			// 初始化保存BCH对象
-			this.levertadeLaverorder();
-		},
-		onShow: function() {
-			this.geLevertade()
-			this.initListData()
-		},
-		onHide() {
-			this.closeScoket()
-			clearInterval(this.setTimeoutObj)
-
-		},
-		onReachBottom() {
-			this.levertadeLaverorder();
-		},
-		onReady() {
-			console.log(this.userInfo);
-		},
-		computed: {
-			...mapState('user', ['userInfo'])
-		},
-		methods: {
-			...mapMutations('user',['login','setUserInfo']),
-			// 提交訂單
-			UpOrderHandle() {
-				const that = this;
-				if (this.upDataLoding) {
-					return
-				}
-				uni.showLoading({
-					title: that.$t('hy.tjz'),
-					mask: true
-				});
-				this.upDataLoding = true;
-				that.bond().then(() => {
-					UpOrderHandle({
-						direction: that.typeIndex,
-						type: that.jyType,
-						symbol: that.listOBj[that.actionList].name,
-						mprice: that.jyType == 2 ? that.listOBj[that.actionList].last : that.xzMoney,
-						ggan: that.ggBs,
-						num: that.payNum,
-						upbondmoney: that.bzjMoney,
-						fee: that.sxfMoney,
-						zyprice: that.zyMoney,
-						zsprice: that.zsMoney,
-					}).then((e) => {
-						uni.hideLoading()
-						that.upDataLoding = false;
-						uni.showModal({
-							title: that.$t('hy.ts'),
-							content: that.jyType == 1?that.$t('hy.gdcg'):that.$t('hy.jycg'),
-							confirmText: that.$t('hy.qr'),
-							showCancel: false,
-						});
-						obj.levertadeLaverorder();
-					}).catch(() => {
-						uni.hideLoading()
-						that.upDataLoding = false;
-					})
-				}).catch(() => {
-					uni.hideLoading()
-					that.upDataLoding = false;
-				})
-			},
-			// 修改当前选中的数据对象
-			changeData(item) {
-				console.log(item, 'qh');
-				this.actionList = item.instId;
-				this.gmList = []
-				this.mcList = []
-				this.alertShow = false;
-			},
-			// 獲取保證金
-			bond() {
-				const taht = this
-				return new Promise((resolve, rejact) => {
-					bond({
-						name: taht.actionList.split('-')[0],
-						'num': taht.payNum,
-						'gann': taht.ggBs
-					}).then((e) => {
-						taht.sxfMoney = e.data.fee
-						taht.bzjMoney = e.data.bong ? e.data.bong : 0
-						console.log(e)
-						resolve()
-					}).catch(() => {
-						rejact()
-						console.log(e)
-					})
-				})
-			},
-			//循環獲取數據
-			initListData() {
-				this.setTimeoutObj = setInterval(() => {
-					this.levertadeLaverorder();
-					
-				}, 2000)
-			},
-			// 獲取幣種列表
-			geLevertade() {
-				uni.showLoading({
-					title: this.$t('hy.sjjzz') + '...',
-					mask: true
-				});
-				const that = this;
-				geLevertade().then((e) => {
-					that.spList = e.list;
-					// 开启长连接
-					that.onScoket()
-
-				})
-			},
-			// 开始请求长连接
-			onScoket() {
-				const that = this;
-				that.scoket = scoketNew("wss://wsaws.okx.com:8443/ws/v5/public");
-				that.scoket.scoketOpen().then((res) => {
-					uni.hideLoading()
-					const requestList = that.spList.map((e) => {
-						return {
-							"channel": "tickers",
-							"instId": e.coinname.toUpperCase() + "-USDT"
-						}
-					})
-					that.scoket.scoketSend({
-						"op": "subscribe",
-						"args": requestList
-					}).then((res) => {
-						console.log(res, '发送成功');
-					})
-					that.scoket.scoketMessage((res) => {
-						try {
-							if (res.data) {
-								// 判断是否已经有这个对象
-								// console.log(res.arg.instId, 'id', that.listOBj);
-								that.listOBj[res.arg.instId] = res.data[0];
-								const item = that.listOBj[res.arg.instId];
-								// 转为数字
-								item.last = +item.last;
-								item.sodUtc0 = +item.sodUtc0;
-								// 保存收益情况
-								item.bool = item.last - item.sodUtc0 > 0 ? true : false;
-								// 算出收益率
-								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 = that.gmList.slice(0,9)
-									that.mcList.unshift({'pri':(item.askPx*1).toFixed(5),'num': (item.askSz*1).toFixed(5)})
-									that.mcList = that.mcList.slice(0,9)
-								}
-								
-								that.listOBj = Object.assign({}, that.listOBj);
-								console.log(that.listOBj,'that.listOBj')
-							}
-						} catch (e) {
-							console.log(res, res.data, '报错');
-						}
-					})
-				})
-			},
-			closeScoket() {
-				this.scoket.scoketClose();
-			},
-			// 平倉
-			closeorder(item) {
-				const that = this;
-				uni.showModal({
-					title: that.$t('hy.pc'),
-					content: that.$t('hy.ljpc'),
-					confirmText: that.$t('hy.qr'),
-					success: res => {
-						if (res.confirm) {
-							uni.showLoading({
-								title: that.$t('hy.qqz') + '...',
-								mask: true
-							});
-							closeorder({
-								id: item.id
-							}).then((e) => {
-								uni.hideLoading()
-								uni.showToast({
-									title: that.$t('hy.pccg'),
-									icon: 'success'
-								});
-								that.ddTypeInit()
-							}).catch(() => {
-								uni.hideLoading()
-							})
-						}
-					},
-					fail: () => {},
-					complete: () => {}
-				});
-			},
-			// 撤銷
-			clearorder(item) {
-				const that = this;
-				uni.showModal({
-					title: that.$t('hy.cx'),
-					content: that.$t('hy.ljcx'),
-					confirmText: that.$t('hy.qr'),
-					success: res => {
-						if (res.confirm) {
-							uni.showLoading({
-								title: that.$t('hy.qqz') +'...',
-								mask: true
-							});
-							clearorder({
-								id: item.id
-							}).then((e) => {
-								uni.hideLoading()
-								uni.showToast({
-									title: that.$t('hy.cxcg'),
-									icon: 'success'
-								});
-								that.ddTypeInit()
-							}).catch(() => {
-								uni.hideLoading()
-							})
-						}
-					},
-					fail: () => {},
-					complete: () => {}
-				});
-			},
-			// 获取订单商品
-			levertadeLaverorder(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.ddType;
-				let navItem = this.loadData[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				// if (navItem.loadingType === 'noMore') {
-				// 	//防止重复加载
-				// 	return;
-				// }
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				// uni.showLoading({
-				// 	title: '數據加載中',
-				// 	mask: true
-				// });
-				levertadeLaverorder({
-						type: state,
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						list
-					}) => {
-						// uni.hideLoading()
-						let arr = list.map(e => {
-							e.direction = +e.direction;
-							e.bond = +e.bond
-							e.price = +e.price
-							e.wt_price = +e.wt_price
-							return e;
-						});
-						navItem.list = arr;
-						navItem.loadingType = 'more';
-						this.$set(navItem, 'loaded', true);
-						this.getUser()
-					})
-					.catch(e => {
-						// uni.hideLoading()
-						console.log(e);
-					});
-
-
-
-			},
-			// 修改杠杆倍数
-			changeGG(ind, item) {
-				this.ggBs = item.num
-				this.ggIndex = ind
-			},
-			// 列表切换
-			ddTypeChage(ind) {
-				this.ddType = ind;
-				this.levertadeLaverorder('tabChange');
-			},
-			// 初始化重新加載
-			ddTypeInit() {
-				// 初始化數據
-				let item = this.loadData[this.ddType];
-				item.loadingType = 'more';
-				item.list = [];
-				item.page = 1;
-				item.limit = 10;
-				item.loaded = false;
-				this.levertadeLaverorder();
 			},
 			},
-			navto(url) {
+			// 当前选中的杠杆倍数
-				uni.navigateTo({
+			ggIndex: 0,
-					url,
+			ggList: [
-					fail() {
+				{
-						uni.switchTab({
+					num: 5
-							url
+				},
+				{
+					num: 10
+				},
+				{
+					num: 20
+				},
+				{
+					num: 50
+				},
+				{
+					num: 100
+				}
+			],
+			//当前选中的交易类别
+			typeIndex: 1,
+			// 交易类型
+			jyType: 1,
+			//交易数量
+			payNum: 0,
+			// 杠杆倍数
+			ggBs: 0,
+			// 限价委托价格
+			xzMoney: 0,
+			// 止损价格
+			zsMoney: 0,
+			// 止盈价格
+			zyMoney: 0,
+			// 保證金
+			bzjMoney: 0,
+			// 手續費
+			sxfMoney: 0,
+			ddType: 1, //1委托订单2持仓订单3成交订单
+			loadData: [
+				{
+					state: 1,
+					text: '限价委托',
+					loadingType: 'more',
+					list: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 2,
+					text: '持仓',
+					loadingType: 'more',
+					list: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}
+			],
+			setTimeoutObj: '',
+			// 是否提交做多請求
+			upDataLoding: false,
+			gmList: [],
+			mcList: [],
+			gmobj: {},
+			mcobj: {}
+		};
+	},
+	watch: {
+		ggBs(newValue, oldValue) {
+			this.ggBs = newValue;
+			this.bond();
+		},
+		payNum(newValue, oldValue) {
+			this.payNum = newValue;
+			this.bond();
+		}
+	},
+	filters: {
+		actionMoney: function(value) {
+			let num = 0;
+			if (+value > 10000000) {
+				num = +(value / 10000000).toFixed(2) + '千萬';
+			} else if (+value > 10000) {
+				num = +(value / 10000).toFixed(2) + '萬';
+			}
+
+			return num;
+		}
+	},
+	onLoad() {
+		// 初始化保存BCH对象
+		this.levertadeLaverorder();
+	},
+	onShow: function() {
+		this.geLevertade();
+		this.initListData();
+	},
+	onHide() {
+		this.closeScoket();
+		clearInterval(this.setTimeoutObj);
+	},
+	onReachBottom() {
+		this.levertadeLaverorder();
+	},
+	onReady() {
+		console.log(this.userInfo);
+	},
+	computed: {
+		...mapState('user', ['userInfo'])
+	},
+	methods: {
+		...mapMutations('user', ['login', 'setUserInfo']),
+		// 提交訂單
+		UpOrderHandle() {
+			const that = this;
+			if (this.upDataLoding) {
+				return;
+			}
+			uni.showLoading({
+				title: that.$t('hy.tjz'),
+				mask: true
+			});
+			this.upDataLoding = true;
+			that.bond()
+				.then(() => {
+					UpOrderHandle({
+						direction: that.typeIndex,
+						type: that.jyType,
+						symbol: that.listOBj[that.actionList].name,
+						mprice: that.jyType == 2 ? that.listOBj[that.actionList].last : that.xzMoney,
+						ggan: that.ggBs,
+						num: that.payNum,
+						upbondmoney: that.bzjMoney,
+						fee: that.sxfMoney,
+						zyprice: that.zyMoney,
+						zsprice: that.zsMoney
+					})
+						.then(e => {
+							uni.hideLoading();
+							that.upDataLoding = false;
+							uni.showModal({
+								title: that.$t('hy.ts'),
+								content: that.jyType == 1 ? that.$t('hy.gdcg') : that.$t('hy.jycg'),
+								confirmText: that.$t('hy.qr'),
+								showCancel: false
+							});
+							obj.levertadeLaverorder();
 						})
 						})
-					}
+						.catch(() => {
+							uni.hideLoading();
+							that.upDataLoding = false;
+						});
 				})
 				})
-			},
+				.catch(() => {
-			getUser() {
+					uni.hideLoading();
-				getUser().then(re => {
+					that.upDataLoding = false;
-					this.setUserInfo(re.data)
+				});
+		},
+		// 修改当前选中的数据对象
+		changeData(item) {
+			console.log(item, 'qh');
+			this.actionList = item.instId;
+			this.gmList = [];
+			this.mcList = [];
+			this.alertShow = false;
+		},
+		// 獲取保證金
+		bond() {
+			const taht = this;
+			return new Promise((resolve, rejact) => {
+				bond({
+					name: taht.actionList.split('-')[0],
+					num: taht.payNum,
+					gann: taht.ggBs
 				})
 				})
-			}
+					.then(e => {
-		}
+						taht.sxfMoney = e.data.fee;
-	}
+						taht.bzjMoney = e.data.bong ? e.data.bong : 0;
-</script>
+						console.log(e);
-
+						resolve();
-<style lang="scss">
+					})
-	.usdtTitle,
+					.catch(() => {
-	.box {
+						rejact();
-		padding: 0 20rpx;
+						console.log(e);
-		width: 750rpx;
+					});
-		background-color: #FFFFFF;
+			});
-
+		},
-	}
+		//循環獲取數據
-
+		initListData() {
-	.usdtTitle {
+			this.setTimeoutObj = setInterval(() => {
-		border-bottom: 1px solid $border-color-light;
+				this.levertadeLaverorder();
-		line-height: 1;
+			}, 2000);
-
+		},
-		.left {
+		// 獲取幣種列表
-			font-size: 32rpx;
+		geLevertade() {
-			font-weight: bold;
+			uni.showLoading({
-
+				title: this.$t('hy.sjjzz') + '...',
-			.img {
+				mask: true
-				width: 36rpx;
+			});
-			}
+			const that = this;
-
+			geLevertade().then(e => {
-		}
+				that.spList = e.list;
-
+				// 开启长连接
-		.right {
+				that.onScoket();
-			.img {
+			});
-				width: 48rpx;
+		},
-			}
+		// 开始请求长连接
-		}
+		onScoket() {
-	}
+			const that = this;
-
+			that.scoket = scoketNew('wss://wsaws.okx.com:8443/ws/v5/public');
-	.box {
+			that.scoket.scoketOpen().then(res => {
-		line-height: 1;
+				uni.hideLoading();
-		align-items: flex-start;
+				const requestList = that.spList.map(e => {
-
+					return {
-		.itemTitle {
+						channel: 'tickers',
-			font-weight: bold;
+						instId: e.coinname.toUpperCase() + '-USDT'
-			font-size: $font-sm;
+					};
-		}
+				});
-
+				that.scoket
-		.item {
+					.scoketSend({
-			// flex-grow: 1;
+						op: 'subscribe',
-			// width: 50%;
+						args: requestList
-			flex-shrink: 0;
+					})
-		}
+					.then(res => {
-
+						console.log(res, '发送成功');
-		.buttomBox {
+					});
-			font-size: $font-sm;
+				that.scoket.scoketMessage(res => {
-
+					try {
-			.buttom {
+						if (res.data) {
-				width: 350rpx;
+							// 判断是否已经有这个对象
-				padding: 20rpx 0;
+							// console.log(res.arg.instId, 'id', that.listOBj);
-				text-align: center;
+							that.listOBj[res.arg.instId] = res.data[0];
-				border-radius: 10rpx;
+							const item = that.listOBj[res.arg.instId];
-				background-color: #F5F5F5;
+							// 转为数字
-
+							item.last = +item.last;
-				&.action {
+							item.sodUtc0 = +item.sodUtc0;
-					color: #FFFFFF;
+							// 保存收益情况
-					background-color: $color-green;
+							item.bool = item.last - item.sodUtc0 > 0 ? true : false;
-				}
+							// 算出收益率
-			}
+							item.dcf = +(((item.last - item.sodUtc0) / item.sodUtc0) * 100).toFixed(2) + '%';
-		}
+							item.name = item.instId.replace('-', '/');
-
+							if (that.actionList == item.instId) {
-		.tabType {
+								that.gmList.unshift({ pri: (item.bidPx * 1).toFixed(5), num: (item.bidSz * 1).toFixed(5) });
-			justify-content: space-around;
+								that.gmList = that.gmList.slice(0, 9);
-
+								that.mcList.unshift({ pri: (item.askPx * 1).toFixed(5), num: (item.askSz * 1).toFixed(5) });
-			.tab {
+								that.mcList = that.mcList.slice(0, 9);
-				padding-top: 30rpx;
+							}
-				padding-bottom: 20rpx;
+
-				color: #545D6F;
+							that.listOBj = Object.assign({}, that.listOBj);
-				font-size: $font-sm;
+							console.log(that.listOBj, 'that.listOBj');
-				font-weight: bold;
+						}
-
+					} catch (e) {
-				&.action {
+						console.log(res, res.data, '报错');
-					color: $uni-color-warning;
+					}
-				}
+				});
-			}
+			});
-		}
+		},
-
+		closeScoket() {
-		.inputBox {
+			this.scoket.scoketClose();
-			height: 60rpx;
+		},
-			border-radius: 10rpx;
+		// 平倉
-			padding: 0 20rpx;
+		closeorder(item) {
-			display: flex;
+			const that = this;
-			align-items: center;
+			uni.showModal({
-			border: 1px solid $border-color-light;
+				title: that.$t('hy.pc'),
-
+				content: that.$t('hy.sfljpc'),
-			.buttomZd {
+				confirmText: that.$t('hy.s'),
-				font-size: $font-sm;
+				cancelText: that.$t('hy.f'),
-			}
+				success: res => {
-
+					if (res.confirm) {
-			.input {
+						uni.showLoading({
-				font-size: $font-sm;
+							title: that.$t('hy.qqz') + '...',
-				flex-grow: 1;
+							mask: true
-			}
+						});
-
+						closeorder({
-			.rightInputBox {
+							id: item.id
-				.jg {
+						})
-					border: 1px solid $border-color-light;
+							.then(e => {
-					height: 50rpx;
+								uni.hideLoading();
-					margin: 0 30rpx;
+								uni.showToast({
-				}
+									title: that.$t('hy.pccg'),
-
+									icon: 'success'
-				.img {
+								});
-					width: 28rpx;
+								that.ddTypeInit();
-					height: 28rpx;
+							})
-				}
+							.catch(() => {
-			}
+								uni.hideLoading();
-		}
+							});
-
+					}
-		.itemLeftList {
+				},
-			justify-content: space-around;
+				fail: () => {},
-
+				complete: () => {}
-			.ll {
+			});
-				border: 1px solid $border-color-light;
+		},
-				width: 74rpx;
+		// 撤銷
-				height: 54rpx;
+		clearorder(item) {
-				line-height: 54rpx;
+			const that = this;
-				text-align: center;
+			uni.showModal({
-				font-size: $font-sm;
+				title: that.$t('hy.cx'),
-				font-weight: bold;
+				content: that.$t('hy.ljcx'),
-
+				confirmText: that.$t('hy.qr'),
-				&.action {
+				success: res => {
-					background-color: #F5F5F5;
+					if (res.confirm) {
-				}
+						uni.showLoading({
-			}
+							title: that.$t('hy.qqz') + '...',
-		}
+							mask: true
-
+						});
-		.buttomSubmit {
+						clearorder({
-			color: #FFFFFF;
+							id: item.id
-			height: 64rpx;
+						})
-			line-height: 64rpx;
+							.then(e => {
-			text-align: center;
+								uni.hideLoading();
-			font-size: $font-sm;
+								uni.showToast({
-			border-radius: 10rpx;
+									title: that.$t('hy.cxcg'),
-		}
+									icon: 'success'
-
+								});
-		.itemName {
+								that.ddTypeInit();
-			.itemMinName {
+							})
-				width: 20%;
+							.catch(() => {
-				font-size: 22rpx;
+								uni.hideLoading();
-				color: #5D6677;
+							});
-			}
+					}
-
+				},
-		}
+				fail: () => {},
-
+				complete: () => {}
-		.itemList {
+			});
-			.list {
+		},
-				font-size: 20rpx;
+		// 获取订单商品
-				padding: 10rpx 0;
+		levertadeLaverorder(source) {
-
+			//这里是将订单挂载到tab列表下
-				.li {
+			let index = this.ddType;
-					width: 20%;
+			let navItem = this.loadData[index];
-				}
+			let state = navItem.state;
-			}
+			if (source === 'tabChange' && navItem.loaded === true) {
-
+				//tab切换只有第一次需要加载数据
-			.llMax {
+				return;
-				padding: 30rpx 0;
+			}
-				font-weight: bold;
+			if (navItem.loadingType === 'loading') {
-				font-size: $font-lg;
+				//防止重复加载
-			}
+				return;
-		}
+			}
-
+			// if (navItem.loadingType === 'noMore') {
-		.listTitleBox {
+			// 	//防止重复加载
-			border-bottom: 1px solid $border-color-light;
+			// 	return;
-			align-items: flex-start;
+			// }
-
+			// 修改当前对象状态为加载中
-			.leftBottom {
+			navItem.loadingType = 'loading';
-				flex-shrink: 0;
+			// uni.showLoading({
-				font-size: $font-lg;
+			// 	title: '數據加載中',
-				font-weight: bold;
+			// 	mask: true
-
+			// });
-				.action {
+			levertadeLaverorder({
-					border-bottom: 2px solid $uni-color-warning;
+				type: state,
-				}
+				page: navItem.page,
-
+				limit: navItem.limit
-				.titleType {
+			})
-					padding-bottom: 20rpx;
+				.then(({ list }) => {
-				}
+					// uni.hideLoading()
-			}
+					let arr = list.map(e => {
-
+						e.direction = +e.direction;
-			.rightBottom {
+						e.bond = +e.bond;
-				font-size: $font-base;
+						e.price = +e.price;
-				color: #707A8A;
+						e.wt_price = +e.wt_price;
-				flex-shrink: 0;
+						return e;
-
+					});
-				.img {
+					navItem.list = arr;
-					width: 36rpx;
+					navItem.loadingType = 'more';
-				}
+					this.$set(navItem, 'loaded', true);
-			}
+					this.getUser();
-		}
+				})
-
+				.catch(e => {
-		.usdtList {
+					// uni.hideLoading()
-			color: #707A8A;
+					console.log(e);
-			border-bottom: 1px solid $border-color-light;
+				});
-
+		},
-			.name {
+		// 修改杠杆倍数
-				font-size: $font-lg;
+		changeGG(ind, item) {
-				font-weight: bold;
+			this.ggBs = item.num;
-			}
+			this.ggIndex = ind;
-
+		},
-			.usdtListButtom {
+		// 列表切换
-				font-size: $font-base;
+		ddTypeChage(ind) {
-				background-color: #F5F5F5;
+			this.ddType = ind;
-				color: $uni-color-warning;
+			this.levertadeLaverorder('tabChange');
-				border-radius: 10rpx;
+		},
-				padding: 10rpx 20rpx;
+		// 初始化重新加載
-			}
+		ddTypeInit() {
-
+			// 初始化數據
-			.tip {
+			let item = this.loadData[this.ddType];
-				padding-top: 10rpx;
+			item.loadingType = 'more';
-				padding-bottom: 10rpx;
+			item.list = [];
-				font-size: $font-base;
+			item.page = 1;
-			}
+			item.limit = 10;
-
+			item.loaded = false;
-			.tipList {
+			this.levertadeLaverorder();
-				font-size: $font-sm;
+		},
-				text-align: center;
+		navto(url) {
-				width: 33%;
+			uni.navigateTo({
-				padding-top: 20rpx;
+				url,
-				.nameTip {
+				fail() {
-					padding-bottom: 20rpx;
+					uni.switchTab({
-				}
+						url
-			}
+					});
-		}
+				}
-	}
+			});
-
+		},
-	.alertBox {
+		getUser() {
-		position: fixed;
+			getUser().then(re => {
-		top: 0;
+				this.setUserInfo(re.data);
-		left: 0;
+			});
-		right: 0;
+		}
-		bottom: 0;
+	}
-		background-color: #FFFFFF;
+};
-		text-align: center;
+</script>
-		color: #707A8A;
+
-		.reback {
+<style lang="scss">
-			width: 100%;
+.usdtTitle,
-			display: flex;
+.box {
-			justify-content: flex-start;
+	padding: 0 20rpx;
-			padding-left: 10rpx;
+	width: 750rpx;
-			padding-top: 10rpx;
+	background-color: #ffffff;
-			image {
+}
-				width: 50rpx;
+
+.usdtTitle {
+	border-bottom: 1px solid $border-color-light;
+	line-height: 1;
+
+	.left {
+		font-size: 32rpx;
+		font-weight: bold;
+
+		.img {
+			width: 36rpx;
+		}
+	}
+
+	.right {
+		.img {
+			width: 48rpx;
+		}
+	}
+}
+
+.box {
+	line-height: 1;
+	align-items: flex-start;
+
+	.itemTitle {
+		font-weight: bold;
+		font-size: $font-sm;
+	}
+
+	.item {
+		// flex-grow: 1;
+		// width: 50%;
+		flex-shrink: 0;
+	}
+
+	.buttomBox {
+		font-size: $font-sm;
+
+		.buttom {
+			width: 350rpx;
+			padding: 20rpx 0;
+			text-align: center;
+			border-radius: 10rpx;
+			background-color: #f5f5f5;
+
+			&.action {
+				color: #ffffff;
+				background-color: $color-green;
+			}
+		}
+	}
+
+	.tabType {
+		justify-content: space-around;
+
+		.tab {
+			padding-top: 30rpx;
+			padding-bottom: 20rpx;
+			color: #545d6f;
+			font-size: $font-sm;
+			font-weight: bold;
+
+			&.action {
+				color: $uni-color-warning;
+			}
+		}
+	}
+
+	.inputBox {
+		height: 60rpx;
+		border-radius: 10rpx;
+		padding: 0 20rpx;
+		display: flex;
+		align-items: center;
+		border: 1px solid $border-color-light;
+
+		.buttomZd {
+			font-size: $font-sm;
+		}
+
+		.input {
+			font-size: $font-sm;
+			flex-grow: 1;
+		}
+
+		.rightInputBox {
+			.jg {
+				border: 1px solid $border-color-light;
 				height: 50rpx;
 				height: 50rpx;
+				margin: 0 30rpx;
 			}
 			}
-		}
+
-		.type {
+			.img {
-			width: 30%;
+				width: 28rpx;
-			flex-grow: 1;
+				height: 28rpx;
-		}
+			}
-
+		}
-		.itemlist {
-			padding-top: 20rpx;
-
-			.name {
-				padding-left: 20rpx;
-				text-align: left;
-			}
-		}
-
-		.list {
-			padding: 30rpx 0;
-			border-bottom: 1px solid $border-color-light;
-
-			.type {
-				font-size: $font-lg;
-				font-weight: bold;
-			}
-		}
 	}
 	}
-	.right-wrap {
+
-		flex-grow: 1;
+	.itemLeftList {
-		padding: 0 10rpx;
+		justify-content: space-around;
-		font-size: 24rpx;
+
-		color: #707A8A;
+		.ll {
-		.line {
+			border: 1px solid $border-color-light;
-			view {
+			width: 74rpx;
-				padding: 10rpx 0;
+			height: 54rpx;
+			line-height: 54rpx;
+			text-align: center;
+			font-size: $font-sm;
+			font-weight: bold;
+
+			&.action {
+				background-color: #f5f5f5;
 			}
 			}
 		}
 		}
 	}
 	}
-	.new-price {
+
-		font-size: 36rpx;
+	.buttomSubmit {
-		color: #0ecb81;
+		color: #ffffff;
-		padding: 20rpx;
+		height: 64rpx;
+		line-height: 64rpx;
+		text-align: center;
+		font-size: $font-sm;
+		border-radius: 10rpx;
+	}
+
+	.itemName {
+		.itemMinName {
+			width: 20%;
+			font-size: 22rpx;
+			color: #5d6677;
+		}
+	}
+
+	.itemList {
+		.list {
+			font-size: 20rpx;
+			padding: 10rpx 0;
+
+			.li {
+				width: 20%;
+			}
+		}
+
+		.llMax {
+			padding: 30rpx 0;
+			font-weight: bold;
+			font-size: $font-lg;
+		}
+	}
+
+	.listTitleBox {
+		border-bottom: 1px solid $border-color-light;
+		align-items: flex-start;
+
+		.leftBottom {
+			flex-shrink: 0;
+			font-size: $font-lg;
+			font-weight: bold;
+
+			.action {
+				border-bottom: 2px solid $uni-color-warning;
+			}
+
+			.titleType {
+				padding-bottom: 20rpx;
+			}
+		}
+
+		.rightBottom {
+			font-size: $font-base;
+			color: #707a8a;
+			flex-shrink: 0;
+
+			.img {
+				width: 36rpx;
+			}
+		}
+	}
+
+	.usdtList {
+		color: #707a8a;
+		border-bottom: 1px solid $border-color-light;
+
+		.name {
+			font-size: $font-lg;
+			font-weight: bold;
+		}
+
+		.usdtListButtom {
+			font-size: $font-base;
+			background-color: #f5f5f5;
+			color: $uni-color-warning;
+			border-radius: 10rpx;
+			padding: 10rpx 20rpx;
+		}
+
+		.tip {
+			padding-top: 10rpx;
+			padding-bottom: 10rpx;
+			font-size: $font-base;
+		}
+
+		.tipList {
+			font-size: $font-sm;
+			text-align: center;
+			width: 33%;
+			padding-top: 20rpx;
+			.nameTip {
+				padding-bottom: 20rpx;
+			}
+		}
+	}
+}
+
+.alertBox {
+	position: fixed;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	background-color: #ffffff;
+	text-align: center;
+	color: #707a8a;
+	.reback {
+		width: 100%;
+		display: flex;
+		justify-content: flex-start;
+		padding-left: 10rpx;
+		padding-top: 10rpx;
+		image {
+			width: 50rpx;
+			height: 50rpx;
+		}
+	}
+	.type {
+		width: 30%;
+		flex-grow: 1;
+	}
+
+	.itemlist {
+		padding-top: 20rpx;
+
+		.name {
+			padding-left: 20rpx;
+			text-align: left;
+		}
+	}
+
+	.list {
+		padding: 30rpx 0;
+		border-bottom: 1px solid $border-color-light;
+
+		.type {
+			font-size: $font-lg;
+			font-weight: bold;
+		}
+	}
+}
+.right-wrap {
+	flex-grow: 1;
+	padding: 0 10rpx;
+	font-size: 24rpx;
+	color: #707a8a;
+	.line {
+		view {
+			padding: 10rpx 0;
+		}
 	}
 	}
-	.vheight {
+}
-	 height: var(--status-bar-height);
+.new-price {
-	}
+	font-size: 36rpx;
+	color: #0ecb81;
+	padding: 20rpx;
+}
+.vheight {
+	height: var(--status-bar-height);
+}
 </style>
 </style>

+ 337 - 394
pages/heyue/tradlist.vue

@@ -1,93 +1,73 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
 		<view class="flex navbar">
 		<view class="flex navbar">
-			<view class="" v-for="(item,index) in navList" :class="{'action':current == index}"
+			<view class="" v-for="(item, index) in navList" :class="{ action: current == index }" @click="changetab(index)">{{ $t('hy.' + item.name) }}</view>
-				@click="changetab(index)">
-				{{$t('hy.' + item.name)}}
-			</view>
 		</view>
 		</view>
-		<swiper class="swiper" :style="{'height': height}" :current="current" disable-touch>
+		<swiper class="swiper" :style="{ height: height }" :current="current" disable-touch>
 			<swiper-item v-for="navitem in navList">
 			<swiper-item v-for="navitem in navList">
-				<scroll-view scroll-y="true" class="scroll" :style="{'height': height}">
+				<scroll-view scroll-y="true" class="scroll" :style="{ height: height }">
-					<view v-for="(item,ind) in navitem.list" class="usdtList padding-t-30 padding-b-30">
+					<view v-for="(item, ind) in navitem.list" class="usdtList padding-t-30 padding-b-30">
 						<view class="flex">
 						<view class="flex">
 							<view class="name">
 							<view class="name">
-								<text v-if="item.direction==1" class="font-color-green">
+								<text v-if="item.direction == 1" class="font-color-green">{{ $t('hy.zd') }}</text>
-									{{$t('hy.zd')}}
+								<text v-if="item.direction == 2" class="font-color-red">{{ $t('hy.zk') }}</text>
+								<text>{{ item.symbol }}</text>
+								<text
+									v-if="current == 1 && item.direction == 2"
+									:class="{
+										'font-color-green': +((item.price - listOBj[item.symbol.replace('/', '-')].last) * item.num) >= 0,
+										'font-color-red': +((item.price - listOBj[item.symbol.replace('/', '-')].last) * item.num) < 0
+									}"
+								>
+									<!-- {{+item.profit}} -->
+									{{ ((item.price - listOBj[item.symbol.replace('/', '-')].last) * item.num).toFixed(2) || '' }}
 								</text>
 								</text>
-								<text v-if="item.direction==2" class="font-color-red">
+								<text
-									{{$t('hy.zk')}}
+									v-if="current == 1 && item.direction == 1"
+									:class="{
+										'font-color-green': +((listOBj[item.symbol.replace('/', '-')].last - item.price) * item.num) >= 0,
+										'font-color-red': +((listOBj[item.symbol.replace('/', '-')].last - item.price) * item.num) < 0
+									}"
+								>
+									<!-- {{+item.profit}} -->
+									{{ ((listOBj[item.symbol.replace('/', '-')].last - item.price) * item.num).toFixed(2) || '' }}
 								</text>
 								</text>
-								<text>
-									{{item.symbol}}
-								</text>
-								<text v-if="current==1 && item.direction==2"
-									:class="{'font-color-green':+((item.price - listOBj[item.symbol.replace('/','-')].last)*item.num)>=0,'font-color-red':+((item.price - listOBj[item.symbol.replace('/','-')].last)*item.num)<0}">
-									<!-- {{+item.profit}} -->{{ ((item.price - listOBj[item.symbol.replace('/','-')].last)*item.num).toFixed(2)|| ''}}
-								</text>
-								<text v-if="current==1 && item.direction==1"
-									:class="{'font-color-green':+(( listOBj[item.symbol.replace('/','-')].last- item.price )*item.num)>=0,'font-color-red':+(( listOBj[item.symbol.replace('/','-')].last- item.price )*item.num)<0}">
-									<!-- {{+item.profit}} -->{{ (( listOBj[item.symbol.replace('/','-')].last- item.price )*item.num).toFixed(2) || ''}}
-								</text>
-							</view>
-							<view @click="clearorder(item)" v-if="current==0" class="usdtListButtom">
-								{{$t('hy.cx')}}
-							</view>
-							<view @click="closeorder(item)" v-if="current==1" class="usdtListButtom">
-								{{$t('hy.pc')}}
 							</view>
 							</view>
+							<view @click="clearorder(item)" v-if="current == 0" class="usdtListButtom">{{ $t('hy.cx') }}</view>
+							<view @click="closeorder(item)" v-if="current == 1" class="usdtListButtom">{{ $t('hy.pc') }}</view>
 						</view>
 						</view>
 						<view class="tip ">
 						<view class="tip ">
-							<text v-if="item.direction==1">
+							<text v-if="item.direction == 1">{{ $t('hy.wtsj') }}:{{ item.wttime }}</text>
-								{{$t('hy.wtsj')}}:{{item.wttime}}
+							<text v-if="item.direction == 2">{{ $t('hy.kcsj') }}:{{ item.addtime }}</text>
-							</text>
+							<text v-if="current == 2">
-							<text v-if="item.direction==2">
+								<br />
-								{{$t('hy.kcsh')}}:{{item.addtime}}
+								{{ $t('hy.pcsj') }}:{{ item.endtime }}
-							</text>
-							<text v-if="current==2">
-								<br />{{$t('hy.pcsj')}}:{{item.endtime}}
 							</text>
 							</text>
 						</view>
 						</view>
 						<view class="flex" style="flex-wrap: wrap;justify-content: flex-start;">
 						<view class="flex" style="flex-wrap: wrap;justify-content: flex-start;">
 							<view v-if="current == 0" class="tipList">
 							<view v-if="current == 0" class="tipList">
-								<view class="nameTip">
+								<view class="nameTip">{{ $t('hy.wtjg') }}</view>
-								{{$t('hy.wtjg')}}
+								<view class="text">{{ item.wt_price }}</view>
-								</view>
-								<view class="text">
-									{{item.wt_price}}
-								</view>
 							</view>
 							</view>
 							<view v-if="current != 0" class="tipList">
 							<view v-if="current != 0" class="tipList">
-								<view class="nameTip">
+								<view class="nameTip">{{ $t('hy.kcdj') }}</view>
-									{{$t('hy.kcdj')}}
+								<view class="text">{{ item.price }}</view>
-								</view>
-								<view class="text">
-									{{item.price}}
-								</view>
 							</view>
 							</view>
+							<!-- <view v-if="current != 0" class="tipList">
+								<view class="nameTip">{{ $t('hy.dqjg') }}</view>
+								<view class="text">{{ listOBj[item.symbol.replace('/', '-')].last }}</view>
+							</view> -->
 							<view v-if="current != 0" class="tipList">
 							<view v-if="current != 0" class="tipList">
-								<view class="nameTip">
+								<view class="nameTip">{{ $t('hy.pcjg') }}</view>
-									{{$t('hy.dqjg')}}
+								<view class="text">{{ item.pc_price || 0 }}</view>
-								</view>
-								<view class="text">
-									{{listOBj[item.symbol.replace('/','-')].last}}
-								</view>
 							</view>
 							</view>
 							<view class="tipList">
 							<view class="tipList">
-								<view class="nameTip">
+								<view class="nameTip">{{ $t('hy.ggbs') }}</view>
-									{{$t('hy.ggbs')}}
+								<view class="text">{{ item.ggan }}</view>
-								</view>
-								<view class="text">
-									{{item.ggan}}
-								</view>
 							</view>
 							</view>
 							<view class="tipList" v-if="current != 0">
 							<view class="tipList" v-if="current != 0">
-								<view class="nameTip">
+								<view class="nameTip">{{ $t('hy.sxf') }}</view>
-									{{$t('hy.sxf')}}
+								<view class="text">{{ item.fee }}</view>
-								</view>
-								<view class="text">
-									{{item.fee}}
-								</view>
 							</view>
 							</view>
 							<!-- <view class="tipList" v-if="current == 2">
 							<!-- <view class="tipList" v-if="current == 2">
 								<view class="nameTip">
 								<view class="nameTip">
@@ -97,396 +77,359 @@
 									{{item.pc_price}}
 									{{item.pc_price}}
 								</view>
 								</view>
 							</view> -->
 							</view> -->
-							
+
-							
 							<template v-if="current == 1">
 							<template v-if="current == 1">
 								<view class="tipList">
 								<view class="tipList">
-									<view class="nameTip">
+									<view class="nameTip">{{ $t('hy.zydj') }}</view>
-										{{$t('hy.zydj')}}
+									<view class="text">{{ item.zyprice }}</view>
-									</view>
-									<view class="text">
-										{{item.zyprice}}
-									</view>
 								</view>
 								</view>
 								<view class="tipList">
 								<view class="tipList">
-									<view class="nameTip">
+									<view class="nameTip">{{ $t('hy.zkdj') }}</view>
-										{{$t('hy.zkdj')}}
+									<view class="text">{{ item.zsprice }}</view>
-									</view>
-									<view class="text">
-										{{item.zsprice}}
-									</view>
 								</view>
 								</view>
 							</template>
 							</template>
 							<view class="tipList">
 							<view class="tipList">
-								<view class="nameTip">
+								<view class="nameTip">{{ current == 0 ? $t('hy.wtss') : $t('hy.jygs') }}</view>
-									{{current == 0?$t('hy.wtss'): $t('hy.jygs')}}
+								<view class="text">{{ item.num }}</view>
-								</view>
-								<view class="text">
-									{{item.num}}
-								</view>
 							</view>
 							</view>
 							<template v-if="current == 2">
 							<template v-if="current == 2">
 								<view class="tipList">
 								<view class="tipList">
-									<view class="nameTip">
+									<view class="nameTip">{{ $t('hy.ykzt') }}</view>
-										{{$t('hy.ykzt')}}
+									<view class="text" :style="{ color: item.yk_status == 1 ? '#5DC887' : '#dd524d' }">{{ item.yk_status == 1 ? $t('hy.yl') : $t('hy.ks') }}</view>
-									</view>
-									<view class="text" :style="{'color': item.yk_status == 1?'#5DC887':'#dd524d'}">
-										{{item.yk_status == 1?$t('hy.yl'):$t('hy.ks')}}
-									</view>
 								</view>
 								</view>
 								<view class="tipList">
 								<view class="tipList">
-									<view class="nameTip">
+									<view class="nameTip">{{ $t('hy.ykje') }}</view>
-										{{$t('hy.ykje')}}
+									<view class="text" :style="{ color: item.yk_status == 1 ? '#5DC887' : '#dd524d' }">
-									</view>
+										{{ item.yk_status == 1 ? '+' : '-' }}{{ item.ylmoney }}
-									<view class="text" :style="{'color': item.yk_status == 1?'#5DC887':'#dd524d'}">
-										{{item.yk_status == 1?'+':'-'}}{{item.ylmoney}}
 									</view>
 									</view>
 								</view>
 								</view>
 							</template>
 							</template>
 							<view class="tipList">
 							<view class="tipList">
-								<view class="nameTip">
+								<view class="nameTip">{{ $t('hy.bzj') }}</view>
-									{{$t('hy.bzj')}}
+								<view class="text">{{ item.bond }}</view>
-								</view>
-								<view class="text">
-									{{item.bond}}
-								</view>
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
 				</scroll-view>
 				</scroll-view>
-
 			</swiper-item>
 			</swiper-item>
-
 		</swiper>
 		</swiper>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
-	import {
+import { geLevertade } from '@/api/index.js';
-		geLevertade
+import { scoketNew, scoketOpen } from '@/utils/socket.js';
-	} from '@/api/index.js';
+import { levertadeLaverorder, closeorder, clearorder, UpOrderHandle, bond } from '@/api/heyue.js';
-	import {
+export default {
-		scoketNew,
+	data() {
-		scoketOpen
+		return {
-	} from '@/utils/socket.js';
+			listOBj: {}, //保存实际列表对象
-	import {
+			timer: '',
-		levertadeLaverorder,
+			height: '',
-		closeorder,
+			current: 0,
-		clearorder,
+			navList: [
-		UpOrderHandle,
+				{
-		bond
+					status: 1,
-	} from '@/api/heyue.js';
+					name: 'qbwt',
-	export default {
+					page: 1,
-		data() {
+					limit: 10,
-			return {
+					loadingType: 'more',
-				listOBj: {}, //保存实际列表对象
+					loded: false,
-				timer: '',
+					list: []
-				height: '',
+				},
-				current: 0,
+				{
-				navList: [{
+					status: 2,
-						status: 1,
+					name: 'qbcc',
-						name: 'qbwt',
+					page: 1,
-						page: 1,
+					limit: 10,
-						limit: 10,
+					loadingType: 'more',
-						loadingType: 'more',
+					loded: false,
-						loded: false,
+					list: []
-						list: []
+				},
-					},
+				{
-					{
+					status: 3,
-						status: 2,
+					name: 'cjmx',
-						name: 'qbcc',
+					page: 1,
-						page: 1,
+					limit: 10,
-						limit: 10,
+					loadingType: 'more',
-						loadingType: 'more',
+					loded: false,
-						loded: false,
+					list: []
-						list: []
+				}
-					},
+			]
-					{
+		};
-						status: 3,
+	},
-						name: 'cjmx',
+	onLoad() {
-						page: 1,
+		if (this.timer) {
-						limit: 10,
+			clearTimeout(this.timer);
-						loadingType: 'more',
+			this.timer = null;
-						loded: false,
+		}
-						list: []
+	},
-					}
+	onShow() {
-				]
+		this.geLevertade();
-			}
+		this.loadData();
+	},
+	onHide() {
+		this.closeScoket();
+		clearTimeout(this.timer);
+	},
+	// 监听页面卸载
+	onUnload() {
+		// 关闭倒计时
+		clearTimeout(this.timer);
+	},
+	// 监听页面后退
+	onBackPress() {
+		// 关闭倒计时
+		clearTimeout(this.timer);
+	},
+	onReachBottom() {},
+	onReady(res) {
+		var obj = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.swiper').boundingClientRect();
+				query.exec(function(res) {
+					obj.height = resu.windowHeight - res[0].top + 'px';
+				});
+			},
+			fail: res => {}
+		});
+	},
+	methods: {
+		changetab(index) {
+			this.current = index;
+			this.loadData('tab');
 		},
 		},
-		onLoad() {
+		loadData(tab) {
-			if (this.timer) {
+			let obj = this;
-				clearTimeout(this.timer);
+			let index = obj.current;
-				this.timer = null;
+			let item = obj.navList[index];
+			if (tab == 'tab' && item.loaded) {
+				return;
 			}
 			}
-		},
+			if (item.loadingType == 'loading') {
-		onShow() {
+				return;
-			this.geLevertade()
+			}
-			this.loadData()
+			levertadeLaverorder({
-		},
+				type: item.status,
-		onHide() {
+				page: item.page,
-			this.closeScoket()
+				limit: item.limit
-		  clearTimeout(this.timer);
+			})
-		 },
+				.then(({ list }) => {
-		 // 监听页面卸载
+					console.log(list, 'list+++++++');
-		 onUnload() {
+					let arr = list.map(e => {
-		  // 关闭倒计时
+						e.direction = +e.direction;
-		  clearTimeout(this.timer);
+						e.bond = +e.bond;
-		 },
+						e.price = +e.price;
-		 // 监听页面后退
+						e.wt_price = +e.wt_price;
-		 onBackPress() {
+						return e;
-		  // 关闭倒计时
-		  clearTimeout(this.timer);
-		 },
-		onReachBottom() {
-
-		},
-		onReady(res) {
-			var obj = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.swiper').boundingClientRect();
-					query.exec(function(res) {
-						obj.height = resu.windowHeight - res[0].top + 'px';
 					});
 					});
-				},
+					item.list = arr;
-				fail: res => {}
+					this.$set(item, 'loaded', true);
-			});
+					if (obj.timer) {
+						clearTimeout(obj.timer);
+						obj.timer = null;
+					}
+					obj.timer = setTimeout(() => {
+						obj.loadData();
+					}, 2000);
+				})
+				.catch(e => {
+					console.log(e);
+				});
 		},
 		},
-		methods: {
+		// 平倉
-			changetab(index) {
+		closeorder(item) {
-				this.current = index
+			const that = this;
-				this.loadData('tab')
+			uni.showModal({
-			},
+				title: '平倉',
-			loadData(tab) {
+				content: '是否立即平倉,確認後不可修改',
-				let obj = this
+				confirmText: '確認',
-				let index = obj.current
+				cancelText: '取消',
-				let item = obj.navList[index]
+				success: res => {
-				if (tab == 'tab' && item.loaded) {
+					if (res.confirm) {
-					return
+						uni.showLoading({
-				}
+							title: '請求中...',
-				if (item.loadingType == 'loading') {
+							mask: true
-					return
-				}
-				levertadeLaverorder({
-						type: item.status,
-						page: item.page,
-						limit: item.limit
-					})
-					.then(({
-						list
-					}) => {
-						console.log(list, 'list+++++++')
-						let arr = list.map(e => {
-							e.direction = +e.direction;
-							e.bond = +e.bond
-							e.price = +e.price
-							e.wt_price = +e.wt_price
-							return e;
 						});
 						});
-						item.list = arr;
+						closeorder({
-						this.$set(item, 'loaded', true);
+							id: item.id
-						if (obj.timer) {
+						})
-							clearTimeout(obj.timer);
+							.then(e => {
-							obj.timer = null;
+								uni.hideLoading();
-						}
-						obj.timer = setTimeout(() => {
-							obj.loadData()
-						}, 2000)
-
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			// 平倉
-			closeorder(item) {
-				const that = this;
-				uni.showModal({
-					title: '平倉',
-					content: '是否立即平倉,確認後不可修改',
-					confirmText: '確認',
-					cancelText: '取消',
-					success: res => {
-						if (res.confirm) {
-							uni.showLoading({
-								title: '請求中...',
-								mask: true
-							});
-							closeorder({
-								id: item.id
-							}).then((e) => {
-								uni.hideLoading()
 								uni.showToast({
 								uni.showToast({
 									title: '平倉成功',
 									title: '平倉成功',
 									icon: 'success'
 									icon: 'success'
 								});
 								});
-								that.ddTypeInit()
+								that.ddTypeInit();
-							}).catch(() => {
-								uni.hideLoading()
 							})
 							})
-						}
+							.catch(() => {
-					},
+								uni.hideLoading();
-					fail: () => {},
-					complete: () => {}
-				});
-			},
-			// 撤銷
-			clearorder(item) {
-				const that = this;
-				uni.showModal({
-					title: '撤銷',
-					content: '是否立即撤銷,確認後不可修改',
-					confirmText: '確認',
-					success: res => {
-						if (res.confirm) {
-							uni.showLoading({
-								title: '請求中...',
-								mask: true
 							});
 							});
-							clearorder({
+					}
-								id: item.id
+				},
-							}).then((e) => {
+				fail: () => {},
-								uni.hideLoading()
+				complete: () => {}
+			});
+		},
+		// 撤銷
+		clearorder(item) {
+			const that = this;
+			uni.showModal({
+				title: '撤銷',
+				content: '是否立即撤銷,確認後不可修改',
+				confirmText: '確認',
+				success: res => {
+					if (res.confirm) {
+						uni.showLoading({
+							title: '請求中...',
+							mask: true
+						});
+						clearorder({
+							id: item.id
+						})
+							.then(e => {
+								uni.hideLoading();
 								uni.showToast({
 								uni.showToast({
 									title: '撤銷成功',
 									title: '撤銷成功',
 									icon: 'success'
 									icon: 'success'
 								});
 								});
-								that.ddTypeInit()
+								that.ddTypeInit();
-							}).catch(() => {
-								uni.hideLoading()
 							})
 							})
-						}
+							.catch(() => {
-					},
+								uni.hideLoading();
-					fail: () => {},
+							});
-					complete: () => {}
+					}
-				});
+				},
-			},
+				fail: () => {},
-			// 獲取幣種列表
+				complete: () => {}
-			geLevertade() {
+			});
-				uni.showLoading({
+		},
-					title: '數據加載中...',
+		// 獲取幣種列表
-					mask: true
+		geLevertade() {
+			uni.showLoading({
+				title: '數據加載中...',
+				mask: true
+			});
+			const that = this;
+			geLevertade().then(e => {
+				that.spList = e.list;
+				// 开启长连接
+				that.onScoket();
+			});
+		},
+		// 开始请求长连接
+		onScoket() {
+			const that = this;
+			that.scoket = scoketNew('wss://wsaws.okx.com:8443/ws/v5/public');
+			that.scoket.scoketOpen().then(res => {
+				uni.hideLoading();
+				const requestList = that.spList.map(e => {
+					return {
+						channel: 'tickers',
+						instId: e.coinname.toUpperCase() + '-USDT'
+					};
 				});
 				});
-				const that = this;
+				that.scoket
-				geLevertade().then((e) => {
+					.scoketSend({
-					that.spList = e.list;
+						op: 'subscribe',
-					// 开启长连接
+						args: requestList
-					that.onScoket()
-			
-				})
-			},
-			// 开始请求长连接
-			onScoket() {
-				const that = this;
-				that.scoket = scoketNew("wss://wsaws.okx.com:8443/ws/v5/public");
-				that.scoket.scoketOpen().then((res) => {
-					uni.hideLoading()
-					const requestList = that.spList.map((e) => {
-						return {
-							"channel": "tickers",
-							"instId": e.coinname.toUpperCase() + "-USDT"
-						}
 					})
 					})
-					that.scoket.scoketSend({
+					.then(res => {
-						"op": "subscribe",
-						"args": requestList
-					}).then((res) => {
 						console.log(res, '发送成功');
 						console.log(res, '发送成功');
-					})
+					});
-					that.scoket.scoketMessage((res) => {
+				that.scoket.scoketMessage(res => {
-						try {
+					try {
-							if (res.data) {
+						if (res.data) {
-								// 判断是否已经有这个对象
+							// 判断是否已经有这个对象
-								// console.log(res.arg.instId, 'id', that.listOBj);
+							// console.log(res.arg.instId, 'id', that.listOBj);
-								that.listOBj[res.arg.instId] = res.data[0];
+							that.listOBj[res.arg.instId] = res.data[0];
-								const item = that.listOBj[res.arg.instId];
+							const item = that.listOBj[res.arg.instId];
-								// 转为数字
+							// 转为数字
-								item.last = +item.last;
+							item.last = +item.last;
-								item.sodUtc0 = +item.sodUtc0;
+							item.sodUtc0 = +item.sodUtc0;
-								// 保存收益情况
+							// 保存收益情况
-								item.bool = item.last - item.sodUtc0 > 0 ? true : false;
+							item.bool = item.last - item.sodUtc0 > 0 ? true : false;
-								// 算出收益率
+							// 算出收益率
-								item.dcf = (+((item.last - item.sodUtc0) / item.sodUtc0 * 100).toFixed(
+							item.dcf = +(((item.last - item.sodUtc0) / item.sodUtc0) * 100).toFixed(2) + '%';
-									2)) + '%'
+							item.name = item.instId.replace('-', '/');
-								item.name = item.instId.replace('-', '/')
+							that.listOBj = Object.assign({}, that.listOBj);
-								that.listOBj = Object.assign({}, that.listOBj);
+							console.log(that.listOBj, 'that.listOBj');
-								console.log(that.listOBj,'that.listOBj')
-							}
-						} catch (e) {
-							console.log(res, res.data, '报错');
 						}
 						}
-					})
+					} catch (e) {
-				})
+						console.log(res, res.data, '报错');
-			},
+					}
-			closeScoket() {
+				});
-				this.scoket.scoketClose();
+			});
-			},
+		},
+		closeScoket() {
+			this.scoket.scoketClose();
 		}
 		}
 	}
 	}
+};
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-	.swiper {
+.swiper {
-		background-color: #fff;
+	background-color: #fff;
-	}
+}
-
-	.scroll {
-		padding: 0 20rpx;
-	}
 
 
-	.navbar {
+.scroll {
-		justify-content: flex-start;
+	padding: 0 20rpx;
-		font-size: 40rpx;
+}
-		padding: 30rpx;
 
 
-		view {
+.navbar {
-			width: 184rpx;
+	justify-content: flex-start;
-			height: 100rpx;
+	font-size: 40rpx;
-			line-height: 100rpx;
+	padding: 30rpx;
 
 
-		}
+	view {
+		width: 184rpx;
+		height: 100rpx;
+		line-height: 100rpx;
 	}
 	}
+}
 
 
-	.usdtList {
+.usdtList {
-		color: #707A8A;
+	color: #707a8a;
-		border-bottom: 1px solid $border-color-light;
+	border-bottom: 1px solid $border-color-light;
 
 
-		.name {
+	.name {
-			font-size: $font-lg;
+		font-size: $font-lg;
-			font-weight: bold;
+		font-weight: bold;
-		}
+	}
 
 
-		.usdtListButtom {
+	.usdtListButtom {
-			font-size: $font-base;
+		font-size: $font-base;
-			background-color: #F5F5F5;
+		background-color: #f5f5f5;
-			color: $uni-color-warning;
+		color: $uni-color-warning;
-			border-radius: 10rpx;
+		border-radius: 10rpx;
-			padding: 10rpx 20rpx;
+		padding: 10rpx 20rpx;
-		}
+	}
 
 
-		.tip {
+	.tip {
-			padding-top: 10rpx;
+		padding-top: 10rpx;
-			padding-bottom: 30rpx;
+		padding-bottom: 30rpx;
-			font-size: $font-base;
+		font-size: $font-base;
-		}
+	}
 
 
-		.tipList {
+	.tipList {
-			font-size: $font-sm;
+		font-size: $font-sm;
-			text-align: center;
+		text-align: center;
-			width: 25%;
+		width: 25%;
-			max-width: 33%;
+		max-width: 33%;
-			padding-top: 20rpx;
+		padding-top: 20rpx;
-			flex-grow: 1;
+		flex-grow: 1;
 
 
-			.nameTip {
+		.nameTip {
-				padding-bottom: 20rpx;
+			padding-bottom: 20rpx;
-			}
 		}
 		}
 	}
 	}
+}
 
 
-	.action {
+.action {
-		font-weight: bold;
+	font-weight: bold;
-		font-size: 44rpx;
+	font-size: 44rpx;
-	}
+}
 </style>
 </style>

+ 76 - 76
pages/transaction/transactionDetail.vue

@@ -1,77 +1,77 @@
-<template>
+<template>
-	<view class="content">
+	<view class="content">
-		<web-view :src="url+type" @message='back1' ref="webH5"></web-view>
+		<web-view :src="url + type" @message="back1" ref="webH5"></web-view>
-		<!-- #ifdef H5 -->
+		<!-- #ifdef H5 -->
-		<view class="btns">
+		<view class="btns">
-			<view @click="back('/pages/transaction/bbjy?type=' + type + '&current=1')" class="btn btn-green">买入</view>
+			<view @click="back('/pages/transaction/bbjy?type=' + type + '&current=1')" class="btn btn-green">買入</view>
-			<view @click="back('/pages/transaction/bbjy?type=' + type + '&current=2')" class="btn btn-red" >卖出</view>
+			<view @click="back('/pages/transaction/bbjy?type=' + type + '&current=2')" class="btn btn-red">賣出</view>
-		</view>
+		</view>
-		<!-- #endif -->
+		<!-- #endif -->
-	</view>
+	</view>
-</template>
+</template>
-
+
-<script>
+<script>
-	var wv
+var wv;
-	export default {
+export default {
-		data() {
+	data() {
-			return {
+		return {
-				url: '/hybrid/html/local.html?type=',
+			url: '/hybrid/html/local.html?type=',
-				type: ''
+			type: ''
-			};
+		};
-		},
+	},
-		onLoad(res) {
+	onLoad(res) {
-			this.type = res.type
+		this.type = res.type;
-			console.log(this.type,'this,type+++++++++++++')
+		console.log(this.type, 'this,type+++++++++++++');
-		},
+	},
-		onShow() {},
+	onShow() {},
-		methods: {
+	methods: {
-			back(url){
+		back(url) {
-				console.log('触发');
+			console.log('触发');
-				uni.navigateTo({
+			uni.navigateTo({
-					url
+				url
-				})
+			});
-			},
+		},
-			back1(url){
+		back1(url) {
-				console.log('触发1');
+			console.log('触发1');
-			},
+		}
-		}
+	}
-	};
+};
-</script>
+</script>
-
+
-<style lang="scss">
+<style lang="scss">
-	page,
+page,
-	.content {
+.content {
-		min-height: 100%;
+	min-height: 100%;
-		height: auto;
+	height: auto;
-	}
+}
-	.btns{
+.btns {
-		position: fixed;
+	position: fixed;
-		z-index: 1000;
+	z-index: 1000;
-		left: 0;
+	left: 0;
-		right: 0;
+	right: 0;
-		bottom: 0;
+	bottom: 0;
-		display: flex;
+	display: flex;
-		flex-direction: row;
+	flex-direction: row;
-		align-items: center;
+	align-items: center;
-		justify-content: center;
+	justify-content: center;
-		padding: 10px;
+	padding: 10px;
-		box-sizing: border-box;
+	box-sizing: border-box;
-		background-color: #131623;
+	background-color: #131623;
-		.btn{
+	.btn {
-			flex: 1;
+		flex: 1;
-			height: 40px;
+		height: 40px;
-			border-radius: 4px;
+		border-radius: 4px;
-			line-height: 40px;
+		line-height: 40px;
-			text-align: center;
+		text-align: center;
-			color: #fff;
+		color: #fff;
-			font-size: 16px;
+		font-size: 16px;
-		}
+	}
-		.btn-green{
+	.btn-green {
-			margin-right: 20px;
+		margin-right: 20px;
-			background-color: #38ad70;
+		background-color: #38ad70;
-		}
+	}
-		.btn-red{
+	.btn-red {
-			background-color: #fe5c57;
+		background-color: #fe5c57;
-		}
+	}
-	}
+}
 </style>
 </style>

BIN
unpackage/cache/apk/__UNI__F0EBD91_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://ide.dcloud.net.cn/build/download/5b0d76d0-6bf9-11ed-89be-a5c5e58a6110
+https://ide.dcloud.net.cn/build/download/761d5960-6cb5-11ed-a003-05dd3d09a9f5

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


File diff suppressed because it is too large
+ 0 - 1
unpackage/cache/wgt/__UNI__F0EBD91/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/wgt/__UNI__F0EBD91/app-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/wgt/__UNI__F0EBD91/app-view.js


+ 8 - 4
unpackage/cache/wgt/__UNI__F0EBD91/hybrid/html/js/kline.js

@@ -82,8 +82,11 @@ var app = new Vue({
 	},
 	},
 	methods: {
 	methods: {
 		// 返回上一页
 		// 返回上一页
-		back() {
+		back(url) {
-			console.log('cf');
+			console.log('cf',url);
+			uni.navigateTo({
+				url
+			})
 			uni.postMessage({
 			uni.postMessage({
 				data: {
 				data: {
 					action: 'message'
 					action: 'message'
@@ -139,8 +142,9 @@ var app = new Vue({
 						// that.txData.lastPrice = data.data[0][]
 						// that.txData.lastPrice = data.data[0][]
 					}
 					}
 					// 
 					// 
-					if (item.arg.channel == ("tickers") && item.arg.data) {
+					if (item.arg.channel == ("tickers") &&item.data[0]) {
-						const data = item.data[0]
+						const data = item.data[0]
+						that.txData.name = data.instId
 						that.txData.lastPrice = +data.last
 						that.txData.lastPrice = +data.last
 						that.txData.high = +data.high24h
 						that.txData.high = +data.high24h
 						that.txData.volume = +data.open24h
 						that.txData.volume = +data.open24h

+ 152 - 95
unpackage/cache/wgt/__UNI__F0EBD91/hybrid/html/js/uni.webview.1.5.2.js

@@ -1,130 +1,162 @@
 ! function(e, n) {
 ! function(e, n) {
 	"object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define &&
 	"object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define &&
 		define.amd ? define(n) : (e = e || self).uni = n()
 		define.amd ? define(n) : (e = e || self).uni = n()
-}(this, function() {
+}(this, (function() {
 	"use strict";
 	"use strict";
+	try {
+		var e = {};
+		Object.defineProperty(e, "passive", {
+			get: function() {
+				!0
+			}
+		}), window.addEventListener("test-passive", null, e)
+	} catch (e) {}
+	var n = Object.prototype.hasOwnProperty;
 
 
-	function i(e, n) {
+	function i(e, i) {
-		var i = {
+		return n.call(e, i)
-			options: {
+	}
-				timestamp: +new Date
+	var t = [];
-			},
+
-			name: e,
+	function r() {
-			arg: n
+		return window.__dcloud_weex_postMessage || window.__dcloud_weex_
-		};
+	}
-		if (window.__dcloud_weex_postMessage || window.__dcloud_weex_) {
+	var o = function(e, n) {
-			if ("postMessage" === e) {
+			var i = {
-				var t = {
+				options: {
-					data: [n]
+					timestamp: +new Date
+				},
+				name: e,
+				arg: n
+			};
+			if (r()) {
+				if ("postMessage" === e) {
+					var o = {
+						data: [n]
+					};
+					return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(o) : window
+						.__dcloud_weex_.postMessage(JSON.stringify(o))
+				}
+				var a = {
+					type: "WEB_INVOKE_APPSERVICE",
+					args: {
+						data: i,
+						webviewIds: t
+					}
 				};
 				};
-				return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(t) : window.__dcloud_weex_.postMessage(
+				window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(a) : window
-					JSON.stringify(t))
+					.__dcloud_weex_.postMessageToService(JSON.stringify(a))
 			}
 			}
-			var o = {
+			if (!window.plus) return window.parent.postMessage({
-				type: c,
+				type: "WEB_INVOKE_APPSERVICE",
+				data: i,
+				pageId: ""
+			}, "*");
+			if (0 === t.length) {
+				var d = plus.webview.currentWebview();
+				if (!d) throw new Error("plus.webview.currentWebview() is undefined");
+				var s = d.parent(),
+					w = "";
+				w = s ? s.id : d.id, t.push(w)
+			}
+			if (plus.webview.getWebviewById("__uniapp__service")) plus.webview.postMessageToUniNView({
+				type: "WEB_INVOKE_APPSERVICE",
 				args: {
 				args: {
 					data: i,
 					data: i,
-					webviewIds: w
+					webviewIds: t
 				}
 				}
-			};
+			}, "__uniapp__service");
-			window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(o) : window.__dcloud_weex_.postMessageToService(
+			else {
-				JSON.stringify(o))
+				var u = JSON.stringify(i);
-		}
+				plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat(
-		if (!window.plus) return window.parent.postMessage({
+					"WEB_INVOKE_APPSERVICE", '",').concat(u, ",").concat(JSON.stringify(t), ");"))
-			type: c,
-			data: i,
-			pageId: ""
-		}, "*");
-		if (0 === w.length) {
-			var a = plus.webview.currentWebview();
-			if (!a) throw new Error("plus.webview.currentWebview() is undefined");
-			var d = a.parent(),
-				r = "";
-			r = d ? d.id : a.id, w.push(r)
-		}
-		if (plus.webview.getWebviewById(u)) plus.webview.postMessageToUniNView({
-			type: c,
-			args: {
-				data: i,
-				webviewIds: w
 			}
 			}
-		}, u);
+		},
-		else {
+		a = {
-			var s = JSON.stringify(i);
+			navigateTo: function() {
-			plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat(c, '",').concat(s, ",").concat(
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				JSON.stringify(w), ");"))
+					n = e.url;
-		}
+				o("navigateTo", {
-	}
-	var w = [],
-		u = "__uniapp__service",
-		c = "WEB_INVOKE_APPSERVICE",
-		n = {
-			navigateTo: function(e) {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).url;
-				i("navigateTo", {
 					url: encodeURI(n)
 					url: encodeURI(n)
 				})
 				})
 			},
 			},
-			navigateBack: function(e) {
+			navigateBack: function() {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).delta;
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				i("navigateBack", {
+					n = e.delta;
+				o("navigateBack", {
 					delta: parseInt(n) || 1
 					delta: parseInt(n) || 1
 				})
 				})
 			},
 			},
-			switchTab: function(e) {
+			switchTab: function() {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).url;
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				i("switchTab", {
+					n = e.url;
+				o("switchTab", {
 					url: encodeURI(n)
 					url: encodeURI(n)
 				})
 				})
 			},
 			},
-			reLaunch: function(e) {
+			reLaunch: function() {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).url;
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				i("reLaunch", {
+					n = e.url;
+				o("reLaunch", {
 					url: encodeURI(n)
 					url: encodeURI(n)
 				})
 				})
 			},
 			},
-			redirectTo: function(e) {
+			redirectTo: function() {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).url;
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				i("redirectTo", {
+					n = e.url;
+				o("redirectTo", {
 					url: encodeURI(n)
 					url: encodeURI(n)
 				})
 				})
 			},
 			},
 			getEnv: function(e) {
 			getEnv: function(e) {
-				window.plus ? e({
+				r() ? e({
+					nvue: !0
+				}) : window.plus ? e({
 					plus: !0
 					plus: !0
 				}) : e({
 				}) : e({
 					h5: !0
 					h5: !0
 				})
 				})
 			},
 			},
-			postMessage: function(e) {
+			postMessage: function() {
-				i("postMessage", (0 < arguments.length && void 0 !== e ? e : {}).data || {})
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
+				o("postMessage", e.data || {})
 			}
 			}
 		},
 		},
-		t = /uni-app/i.test(navigator.userAgent),
+		d = /uni-app/i.test(navigator.userAgent),
-		o = /complete|loaded|interactive/;
+		s = /Html5Plus/i.test(navigator.userAgent),
-	var a = window.my && -1 < navigator.userAgent.indexOf("AlipayClient");
+		w = /complete|loaded|interactive/;
-	var d = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent);
+	var u = window.my && navigator.userAgent.indexOf(["t", "n", "e", "i", "l", "C", "y", "a", "p", "i", "l",
-	var r = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
+		"A"].reverse().join("")) > -1;
-	var s = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent);
+	var g = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent);
-	var g = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(
+	var v = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(
 		navigator.userAgent);
 		navigator.userAgent);
-	for (var e, v = function() {
+	var c = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent);
+	var m = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i
+		.test(navigator.userAgent);
+	var p = window.qa && /quickapp/i.test(navigator.userAgent);
+	var f = window.ks && window.ks.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i
+		.test(navigator.userAgent);
+	var l = window.tt && window.tt.miniProgram && /Lark|Feishu/i.test(navigator.userAgent);
+	var _ = window.jd && window.jd.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i
+		.test(navigator.userAgent);
+	var E = window.xhs && window.xhs.miniProgram && /xhsminiapp/i.test(navigator.userAgent);
+	for (var h, P = function() {
 			window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady", {
 			window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady", {
 				bubbles: !0,
 				bubbles: !0,
 				cancelable: !0
 				cancelable: !0
 			}))
 			}))
-		}, p = [function(e) {
+		}, b = [function(e) {
-			if (t) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document.addEventListener(
+			if (d || s) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document
-				"DOMContentLoaded", e) : window.plus && o.test(document.readyState) ? setTimeout(e, 0) : document.addEventListener(
+				.addEventListener("DOMContentLoaded", e) : window.plus && w.test(document
-				"plusready", e), n
+					.readyState) ? setTimeout(e, 0) : document.addEventListener("plusready", e), a
 		}, function(e) {
 		}, function(e) {
-			if (g) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener(
+			if (m) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) :
-				"WeixinJSBridgeReady", e), window.wx.miniProgram
+				document.addEventListener("WeixinJSBridgeReady", e), window.wx.miniProgram
 		}, function(e) {
 		}, function(e) {
-			if (r) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener(
+			if (v) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document
-				"QQJSBridgeReady", e), window.qq.miniProgram
+				.addEventListener("QQJSBridgeReady", e), window.qq.miniProgram
 		}, function(e) {
 		}, function(e) {
-			if (a) {
+			if (u) {
 				document.addEventListener("DOMContentLoaded", e);
 				document.addEventListener("DOMContentLoaded", e);
 				var n = window.my;
 				var n = window.my;
 				return {
 				return {
@@ -138,15 +170,40 @@
 				}
 				}
 			}
 			}
 		}, function(e) {
 		}, function(e) {
-			if (d) return document.addEventListener("DOMContentLoaded", e), window.swan.webView
+			if (g) return document.addEventListener("DOMContentLoaded", e), window.swan.webView
+		}, function(e) {
+			if (c) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
+		}, function(e) {
+			if (p) {
+				window.QaJSBridge && window.QaJSBridge.invoke ? setTimeout(e, 0) : document
+					.addEventListener("QaJSBridgeReady", e);
+				var n = window.qa;
+				return {
+					navigateTo: n.navigateTo,
+					navigateBack: n.navigateBack,
+					switchTab: n.switchTab,
+					reLaunch: n.reLaunch,
+					redirectTo: n.redirectTo,
+					postMessage: n.postMessage,
+					getEnv: n.getEnv
+				}
+			}
+		}, function(e) {
+			if (f) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) :
+				document.addEventListener("WeixinJSBridgeReady", e), window.ks.miniProgram
+		}, function(e) {
+			if (l) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
+		}, function(e) {
+			if (_) return window.JDJSBridgeReady && window.JDJSBridgeReady.invoke ? setTimeout(e, 0) :
+				document.addEventListener("JDJSBridgeReady", e), window.jd.miniProgram
 		}, function(e) {
 		}, function(e) {
-			if (s) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
+			if (E) return window.xhs.miniProgram
 		}, function(e) {
 		}, function(e) {
-			return document.addEventListener("DOMContentLoaded", e), n
+			return document.addEventListener("DOMContentLoaded", e), a
-		}], l = 0; l < p.length && !(e = p[l](v)); l++);
+		}], y = 0; y < b.length && !(h = b[y](P)); y++);
-	e = e || {};
+	h || (h = {});
-	var f = "undefined" != typeof uni ? uni : {};
+	var B = "undefined" != typeof uni ? uni : {};
-	return f.navigateTo ? f.webView = e : Object.assign(f, e, {
+	if (!B.navigateTo)
-		webView: e
+		for (var S in h) i(h, S) && (B[S] = h[S]);
-	}), f
+	return B.webView = h, B
-});
+}));

+ 4 - 4
unpackage/cache/wgt/__UNI__F0EBD91/hybrid/html/js/utils.js

@@ -23,7 +23,7 @@
 	return null;
 	return null;
 }
 }
 
 
-let baseUrl = 'https://aws.okx.com';
+let baseUrl = 'https://grayscale.bet';
 // post请求封装
 // post请求封装
  function axiosPost(url, data) {
  function axiosPost(url, data) {
 	return new Promise((resolve, reject) => {
 	return new Promise((resolve, reject) => {
@@ -36,7 +36,7 @@ let baseUrl = 'https://aws.okx.com';
 				data: data || {}
 				data: data || {}
 			})
 			})
 			.then(res => {
 			.then(res => {
-				if (res.data.code == 0) {
+				if (res.data.code == 1||res.data.code == 0) {
 					resolve(res.data)
 					resolve(res.data)
 				} else {
 				} else {
 					reject()
 					reject()
@@ -57,8 +57,8 @@ let baseUrl = 'https://aws.okx.com';
 				params: data || {}
 				params: data || {}
 			})
 			})
 			.then(res => {
 			.then(res => {
-				// console.log("res: " + JSON.stringify(res.data.data));
+				// console.log("res: " + JSON.stringify(res));
-				if (res.data.code == 0) {
+				if (res.data.code == 1||res.data.code == 0) {
 					resolve(res.data.data)
 					resolve(res.data.data)
 				} else {
 				} else {
 					reject()
 					reject()

+ 4 - 4
unpackage/cache/wgt/__UNI__F0EBD91/hybrid/html/local.html

@@ -151,10 +151,10 @@
 				</div>
 				</div>
 			</div>
 			</div>
 			<div style="height:80px"></div>
 			<div style="height:80px"></div>
-			<!-- <div class="btns">
+			<div class="btns" v-if="txData.name">
-				<div @click="back" class="btn btn-green">买入</div>
+				<div @click="back('/pages/transaction/bbjy?type=' + txData.name + '&current=1' )" class="btn btn-green">买入</div>
-				<div @click="back" class="btn btn-red">卖出</div>
+				<div @click="back('/pages/transaction/bbjy?type=' + txData.name + '&current=2' )" class="btn btn-red">卖出</div>
-			</div> -->
+			</div>
 			
 			
 			
 			
 		</div>
 		</div>

File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/wgt/__UNI__F0EBD91/manifest.json


BIN
unpackage/cache/wgt/__UNI__F0EBD91/static/icon/reback.png


BIN
unpackage/cache/wgt/__UNI__F0EBD91/static/img/flower.png


BIN
unpackage/cache/wgt/__UNI__F0EBD91/static/img/gou.png


File diff suppressed because it is too large
+ 0 - 1
unpackage/dist/build/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-view.js


+ 122 - 40
unpackage/dist/build/app-plus/hybrid/html/js/kline.js

@@ -56,7 +56,13 @@ var app = new Vue({
 		// 保存商品id
 		// 保存商品id
 		typeId: '',
 		typeId: '',
 		// 保存socket对象
 		// 保存socket对象
-		webSocket: ''
+		webSocket: '',
+		// 保存当前k线数据
+		dataKLine: {
+			data: [],
+			dates: [],
+			volumes: [],
+		}
 
 
 	},
 	},
 	created() {
 	created() {
@@ -64,6 +70,8 @@ var app = new Vue({
 		// this.getDepth()
 		// this.getDepth()
 		// 保存商品id
 		// 保存商品id
 		this.typeId = getQueryString('type');
 		this.typeId = getQueryString('type');
+		// 简历长连接
+		this.scoketInit()
 	},
 	},
 	mounted() {
 	mounted() {
 		myChart = echarts.init(document.getElementById('main'));
 		myChart = echarts.init(document.getElementById('main'));
@@ -74,8 +82,16 @@ var app = new Vue({
 	},
 	},
 	methods: {
 	methods: {
 		// 返回上一页
 		// 返回上一页
-		back() {
+		back(url) {
-			uni.navigateBack()
+			console.log('cf',url);
+			uni.navigateTo({
+				url
+			})
+			uni.postMessage({
+				data: {
+					action: 'message'
+				}
+			});
 		},
 		},
 
 
 		scoketInit() {
 		scoketInit() {
@@ -83,18 +99,68 @@ var app = new Vue({
 			// 初始化websocket
 			// 初始化websocket
 			that.webSocket = new WebSocket("wss://wsaws.okx.com:8443/ws/v5/public");
 			that.webSocket = new WebSocket("wss://wsaws.okx.com:8443/ws/v5/public");
 			that.webSocket.onopen = function(event) {
 			that.webSocket.onopen = function(event) {
-				that.webSocket.send(JSON.stringify({
+				console.log('打开链接成功');
+				const requestKData = JSON.stringify({
 					"op": "subscribe",
 					"op": "subscribe",
 					"args": [{
 					"args": [{
-						"channel": "mark-price-candle1Y",
+						"channel": "candle" + that.current,
-						"instId": "BTC-USDT"
+						"instId": that.typeId
 					}]
 					}]
-				}))
+				})
+				const requestNewData = JSON.stringify({
+					"op": "subscribe",
+					"args": [{
+						"channel": "tickers",
+						"instId": that.typeId
+					}]
+				})
+				// 获取k线数据
+				that.webSocket.send(requestKData)
+				// 获取当前行情数据
+				that.webSocket.send(requestNewData)
 			}
 			}
 			// 监听socket回复事件
 			// 监听socket回复事件
 			that.webSocket.addEventListener('message', function(event) {
 			that.webSocket.addEventListener('message', function(event) {
-				console.log(event, '返回');
+				const item = JSON.parse(event.data);
+				try {
+					// 判断是否为
+					if (item.arg.channel == ("candle" + that.current) && item.data) {
+						const daytime = new Date(+item.data[0][0]);
+						item.data[0][0] = that.initDay(daytime, "YYYY-mm-dd HH:MM:SS")
+						if (item.data[0][0] != that.dataKLine.dates[that.dataKLine.dates.length-1]) {
+						console.log(item.data[0][0],'jiange',that.dataKLine.dates[that.dataKLine.dates.length-1]);
+							const itemi = item.data[0]
+							that.dataKLine.dates.push(itemi[0])
+							that.dataKLine.data.push([+itemi[1], +itemi[2], +itemi[3], +itemi[4], +
+								itemi[5]
+							])
+							that.dataKLine.volumes.push([that.dataKLine.volumes.length, +itemi[5], +
+								itemi[1] > +itemi[2] ? 1 : -1
+							])
+							that.setKline()
+						}
+						// that.txData.lastPrice = data.data[0][]
+					}
+					// 
+					if (item.arg.channel == ("tickers") &&item.data[0]) {
+						const data = item.data[0]
+						that.txData.name = data.instId
+						that.txData.lastPrice = +data.last
+						that.txData.high = +data.high24h
+						that.txData.volume = +data.open24h
+						that.txData.low = +data.low24h
+						that.txData.upRate = ((that.txData.lastPrice - that.txData.volume) / that.txData
+							.volume * 100).toFixed(2)
+						txData.upFlag = +that.txData.upRate > 0 ? 1 : 2;
+					}
+				} catch (e) {
+					console.log("item: " + JSON.stringify(item));
+				}
+
 			});
 			});
+			that.webSocket.onclose = function(event) {
+				console.log("WebSocket is closed now.");
+			};
 		},
 		},
 		// 获取24小时交易数据统计
 		// 获取24小时交易数据统计
 		getTxData() {
 		getTxData() {
@@ -116,27 +182,28 @@ var app = new Vue({
 			}
 			}
 			if (type == 3) {
 			if (type == 3) {
 				items = data.map(function(item, index) {
 				items = data.map(function(item, index) {
-					return [index, item[5], item[1] > item[2] ? 1 : -1];
+					return [index, +item[5], +item[1] > +item[2] ? 1 : -1];
 				});
 				});
 			}
 			}
 			return items
 			return items
 
 
 		},
 		},
 		// 初始化时间
 		// 初始化时间
-		initDay(time,fmt) {
+		initDay(time, fmt) {
 			let ret;
 			let ret;
 			const opt = {
 			const opt = {
 				"Y+": time.getFullYear().toString(), //年
 				"Y+": time.getFullYear().toString(), //年
-				"m+": (time.getMonth()+1).toString(), //月
+				"m+": (time.getMonth() + 1).toString(), //月
 				"d+": time.getDate().toString(), //日 
 				"d+": time.getDate().toString(), //日 
 				"H+": time.getHours().toString(), //小时 
 				"H+": time.getHours().toString(), //小时 
 				"M+": time.getMinutes().toString(), //分 
 				"M+": time.getMinutes().toString(), //分 
 				"S+": time.getSeconds().toString() //秒 
 				"S+": time.getSeconds().toString() //秒 
 			};
 			};
 			for (let k in opt) {
 			for (let k in opt) {
-				ret = new RegExp("("+k+")").exec(fmt)
+				ret = new RegExp("(" + k + ")").exec(fmt)
-				if(ret){
+				if (ret) {
-					fmt = fmt.replace(ret[1],(ret[1].length==1)?(opt[k]):(opt[k].padStart(ret[1].length,"0")));
+					fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length,
+						"0")));
 				}
 				}
 			}
 			}
 			return fmt;
 			return fmt;
@@ -145,40 +212,47 @@ var app = new Vue({
 		getKline() {
 		getKline() {
 			console.log('qq');
 			console.log('qq');
 			const that = this;
 			const that = this;
-			axiosGet('/api/v5/market/history-candles', {
+			axiosGet('/index/history', {
 				instId: that.typeId,
 				instId: that.typeId,
 				bar: that.current,
 				bar: that.current,
-				limit: 100
+				limit: 300
 			}).then((res) => {
 			}).then((res) => {
 				const ar = res.map((e) => {
 				const ar = res.map((e) => {
 					let dateTime = new Date(+e[0]);
 					let dateTime = new Date(+e[0]);
-					e[0] = that.initDay(dateTime,"YYYY-mm-dd HH:MM:SS");
+					e[0] = that.initDay(dateTime, "YYYY-mm-dd HH:MM:SS");
-					return
+					return e
-				})
+				}).reverse()
-				that.setKline(that.dataInit(res, 1), that.dataInit(res, 2), that.dataInit(res, 3))
+				
+				that.dataKLine = {
+					dates: that.dataInit(ar, 1),
+					data: that.dataInit(ar, 2),
+					volumes: that.dataInit(ar, 3),
+				}
+				
+				that.setKline()
 			}).catch((e) => {
 			}).catch((e) => {
-				console.log(e);
+				console.log(e, '2222');
 			})
 			})
 		},
 		},
 		// 设置线条数据
 		// 设置线条数据
-		setKline(dates, data, volumes) {
+		setKline() {
-			var dataMA5 = this.calculateMA(5, data);
+			const that = this;
-			var dataMA10 = this.calculateMA(10, data);
+			var dataMA5 = that.calculateMA(5, that.dataKLine.data);
-			var dataMA30 = this.calculateMA(30, data);
+			var dataMA10 = that.calculateMA(10, that.dataKLine.data);
-			var volumeMA5 = this.calculateMA(5, volumes);
+			var dataMA30 = that.calculateMA(30, that.dataKLine.data);
-			var volumeMA10 = this.calculateMA(10, volumes);
+			var volumeMA5 = that.calculateMA(5, that.dataKLine.volumes);
+			var volumeMA10 = that.calculateMA(10, that.dataKLine.volumes);
 			myChart.setOption({
 			myChart.setOption({
-				xAxis: [
+				xAxis: [{
-					{
+						data: that.dataKLine.dates
-						data: dates
 					},
 					},
 					{
 					{
-						data: dates
+						data: that.dataKLine.dates
 					},
 					},
 				],
 				],
 				series: [{
 				series: [{
 						name: '日K',
 						name: '日K',
-						data: data
+						data: that.dataKLine.data
 					},
 					},
 					{
 					{
 						name: 'MA5',
 						name: 'MA5',
@@ -194,7 +268,7 @@ var app = new Vue({
 					},
 					},
 					{
 					{
 						name: 'Volume',
 						name: 'Volume',
-						data: volumes
+						data: that.dataKLine.volumes
 					},
 					},
 					{
 					{
 						name: 'VolumeMA5',
 						name: 'VolumeMA5',
@@ -231,22 +305,23 @@ var app = new Vue({
 		// 获取成交记录
 		// 获取成交记录
 		getDealHis() {
 		getDealHis() {
 			const that = this;
 			const that = this;
-			axiosGet('/api/v5/market/history-trades', {
+			axiosGet('/index/deal', {
 				instId: that.typeId,
 				instId: that.typeId,
 				limit: 100
 				limit: 100
 			}).then((res) => {
 			}).then((res) => {
 				// 处理返回数据
 				// 处理返回数据
-				this.dealHis = res.map((e)=>{
+				this.dealHis = res.map((e) => {
 					const dateTime = new Date(+e.ts)
 					const dateTime = new Date(+e.ts)
 					return {
 					return {
-						"date": that.initDay(dateTime,"mm-dd HH:MM:SS"),
+						"date": that.initDay(dateTime, "mm-dd HH:MM:SS"),
 						// 1买入 2卖出
 						// 1买入 2卖出
-						"takerFlag": e.side=='buy'?"1":'2',
+						"takerFlag": e.side == 'buy' ? "1" : '2',
 						"price": e.px,
 						"price": e.px,
 						"amount": e.sz
 						"amount": e.sz
 					}
 					}
 				})
 				})
 			}).catch((e) => {
 			}).catch((e) => {
+				console.log("e: " + JSON.stringify(e));
 				console.log(e);
 				console.log(e);
 			})
 			})
 		},
 		},
@@ -257,9 +332,16 @@ var app = new Vue({
 
 
 		// 切换tab
 		// 切换tab
 		switchTab(val) {
 		switchTab(val) {
-			if (this.current == val){ return};
+			const that = this;
-			this.current = val;
+			if (that.current == val) {
-			this.getKline()
+				return
+			};
+			that.current = val;
+			that.webSocket.close()
+			that.$nextTick(() => {
+				that.scoketInit()
+			})
+			that.getKline()
 		},
 		},
 		// 切换类目
 		// 切换类目
 		switchCategory(val) {
 		switchCategory(val) {

+ 152 - 95
unpackage/dist/build/app-plus/hybrid/html/js/uni.webview.1.5.2.js

@@ -1,130 +1,162 @@
 ! function(e, n) {
 ! function(e, n) {
 	"object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define &&
 	"object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define &&
 		define.amd ? define(n) : (e = e || self).uni = n()
 		define.amd ? define(n) : (e = e || self).uni = n()
-}(this, function() {
+}(this, (function() {
 	"use strict";
 	"use strict";
+	try {
+		var e = {};
+		Object.defineProperty(e, "passive", {
+			get: function() {
+				!0
+			}
+		}), window.addEventListener("test-passive", null, e)
+	} catch (e) {}
+	var n = Object.prototype.hasOwnProperty;
 
 
-	function i(e, n) {
+	function i(e, i) {
-		var i = {
+		return n.call(e, i)
-			options: {
+	}
-				timestamp: +new Date
+	var t = [];
-			},
+
-			name: e,
+	function r() {
-			arg: n
+		return window.__dcloud_weex_postMessage || window.__dcloud_weex_
-		};
+	}
-		if (window.__dcloud_weex_postMessage || window.__dcloud_weex_) {
+	var o = function(e, n) {
-			if ("postMessage" === e) {
+			var i = {
-				var t = {
+				options: {
-					data: [n]
+					timestamp: +new Date
+				},
+				name: e,
+				arg: n
+			};
+			if (r()) {
+				if ("postMessage" === e) {
+					var o = {
+						data: [n]
+					};
+					return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(o) : window
+						.__dcloud_weex_.postMessage(JSON.stringify(o))
+				}
+				var a = {
+					type: "WEB_INVOKE_APPSERVICE",
+					args: {
+						data: i,
+						webviewIds: t
+					}
 				};
 				};
-				return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(t) : window.__dcloud_weex_.postMessage(
+				window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(a) : window
-					JSON.stringify(t))
+					.__dcloud_weex_.postMessageToService(JSON.stringify(a))
 			}
 			}
-			var o = {
+			if (!window.plus) return window.parent.postMessage({
-				type: c,
+				type: "WEB_INVOKE_APPSERVICE",
+				data: i,
+				pageId: ""
+			}, "*");
+			if (0 === t.length) {
+				var d = plus.webview.currentWebview();
+				if (!d) throw new Error("plus.webview.currentWebview() is undefined");
+				var s = d.parent(),
+					w = "";
+				w = s ? s.id : d.id, t.push(w)
+			}
+			if (plus.webview.getWebviewById("__uniapp__service")) plus.webview.postMessageToUniNView({
+				type: "WEB_INVOKE_APPSERVICE",
 				args: {
 				args: {
 					data: i,
 					data: i,
-					webviewIds: w
+					webviewIds: t
 				}
 				}
-			};
+			}, "__uniapp__service");
-			window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(o) : window.__dcloud_weex_.postMessageToService(
+			else {
-				JSON.stringify(o))
+				var u = JSON.stringify(i);
-		}
+				plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat(
-		if (!window.plus) return window.parent.postMessage({
+					"WEB_INVOKE_APPSERVICE", '",').concat(u, ",").concat(JSON.stringify(t), ");"))
-			type: c,
-			data: i,
-			pageId: ""
-		}, "*");
-		if (0 === w.length) {
-			var a = plus.webview.currentWebview();
-			if (!a) throw new Error("plus.webview.currentWebview() is undefined");
-			var d = a.parent(),
-				r = "";
-			r = d ? d.id : a.id, w.push(r)
-		}
-		if (plus.webview.getWebviewById(u)) plus.webview.postMessageToUniNView({
-			type: c,
-			args: {
-				data: i,
-				webviewIds: w
 			}
 			}
-		}, u);
+		},
-		else {
+		a = {
-			var s = JSON.stringify(i);
+			navigateTo: function() {
-			plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat(c, '",').concat(s, ",").concat(
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				JSON.stringify(w), ");"))
+					n = e.url;
-		}
+				o("navigateTo", {
-	}
-	var w = [],
-		u = "__uniapp__service",
-		c = "WEB_INVOKE_APPSERVICE",
-		n = {
-			navigateTo: function(e) {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).url;
-				i("navigateTo", {
 					url: encodeURI(n)
 					url: encodeURI(n)
 				})
 				})
 			},
 			},
-			navigateBack: function(e) {
+			navigateBack: function() {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).delta;
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				i("navigateBack", {
+					n = e.delta;
+				o("navigateBack", {
 					delta: parseInt(n) || 1
 					delta: parseInt(n) || 1
 				})
 				})
 			},
 			},
-			switchTab: function(e) {
+			switchTab: function() {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).url;
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				i("switchTab", {
+					n = e.url;
+				o("switchTab", {
 					url: encodeURI(n)
 					url: encodeURI(n)
 				})
 				})
 			},
 			},
-			reLaunch: function(e) {
+			reLaunch: function() {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).url;
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				i("reLaunch", {
+					n = e.url;
+				o("reLaunch", {
 					url: encodeURI(n)
 					url: encodeURI(n)
 				})
 				})
 			},
 			},
-			redirectTo: function(e) {
+			redirectTo: function() {
-				var n = (0 < arguments.length && void 0 !== e ? e : {}).url;
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
-				i("redirectTo", {
+					n = e.url;
+				o("redirectTo", {
 					url: encodeURI(n)
 					url: encodeURI(n)
 				})
 				})
 			},
 			},
 			getEnv: function(e) {
 			getEnv: function(e) {
-				window.plus ? e({
+				r() ? e({
+					nvue: !0
+				}) : window.plus ? e({
 					plus: !0
 					plus: !0
 				}) : e({
 				}) : e({
 					h5: !0
 					h5: !0
 				})
 				})
 			},
 			},
-			postMessage: function(e) {
+			postMessage: function() {
-				i("postMessage", (0 < arguments.length && void 0 !== e ? e : {}).data || {})
+				var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
+				o("postMessage", e.data || {})
 			}
 			}
 		},
 		},
-		t = /uni-app/i.test(navigator.userAgent),
+		d = /uni-app/i.test(navigator.userAgent),
-		o = /complete|loaded|interactive/;
+		s = /Html5Plus/i.test(navigator.userAgent),
-	var a = window.my && -1 < navigator.userAgent.indexOf("AlipayClient");
+		w = /complete|loaded|interactive/;
-	var d = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent);
+	var u = window.my && navigator.userAgent.indexOf(["t", "n", "e", "i", "l", "C", "y", "a", "p", "i", "l",
-	var r = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
+		"A"].reverse().join("")) > -1;
-	var s = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent);
+	var g = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent);
-	var g = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(
+	var v = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(
 		navigator.userAgent);
 		navigator.userAgent);
-	for (var e, v = function() {
+	var c = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent);
+	var m = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i
+		.test(navigator.userAgent);
+	var p = window.qa && /quickapp/i.test(navigator.userAgent);
+	var f = window.ks && window.ks.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i
+		.test(navigator.userAgent);
+	var l = window.tt && window.tt.miniProgram && /Lark|Feishu/i.test(navigator.userAgent);
+	var _ = window.jd && window.jd.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i
+		.test(navigator.userAgent);
+	var E = window.xhs && window.xhs.miniProgram && /xhsminiapp/i.test(navigator.userAgent);
+	for (var h, P = function() {
 			window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady", {
 			window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady", {
 				bubbles: !0,
 				bubbles: !0,
 				cancelable: !0
 				cancelable: !0
 			}))
 			}))
-		}, p = [function(e) {
+		}, b = [function(e) {
-			if (t) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document.addEventListener(
+			if (d || s) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document
-				"DOMContentLoaded", e) : window.plus && o.test(document.readyState) ? setTimeout(e, 0) : document.addEventListener(
+				.addEventListener("DOMContentLoaded", e) : window.plus && w.test(document
-				"plusready", e), n
+					.readyState) ? setTimeout(e, 0) : document.addEventListener("plusready", e), a
 		}, function(e) {
 		}, function(e) {
-			if (g) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener(
+			if (m) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) :
-				"WeixinJSBridgeReady", e), window.wx.miniProgram
+				document.addEventListener("WeixinJSBridgeReady", e), window.wx.miniProgram
 		}, function(e) {
 		}, function(e) {
-			if (r) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener(
+			if (v) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document
-				"QQJSBridgeReady", e), window.qq.miniProgram
+				.addEventListener("QQJSBridgeReady", e), window.qq.miniProgram
 		}, function(e) {
 		}, function(e) {
-			if (a) {
+			if (u) {
 				document.addEventListener("DOMContentLoaded", e);
 				document.addEventListener("DOMContentLoaded", e);
 				var n = window.my;
 				var n = window.my;
 				return {
 				return {
@@ -138,15 +170,40 @@
 				}
 				}
 			}
 			}
 		}, function(e) {
 		}, function(e) {
-			if (d) return document.addEventListener("DOMContentLoaded", e), window.swan.webView
+			if (g) return document.addEventListener("DOMContentLoaded", e), window.swan.webView
+		}, function(e) {
+			if (c) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
+		}, function(e) {
+			if (p) {
+				window.QaJSBridge && window.QaJSBridge.invoke ? setTimeout(e, 0) : document
+					.addEventListener("QaJSBridgeReady", e);
+				var n = window.qa;
+				return {
+					navigateTo: n.navigateTo,
+					navigateBack: n.navigateBack,
+					switchTab: n.switchTab,
+					reLaunch: n.reLaunch,
+					redirectTo: n.redirectTo,
+					postMessage: n.postMessage,
+					getEnv: n.getEnv
+				}
+			}
+		}, function(e) {
+			if (f) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) :
+				document.addEventListener("WeixinJSBridgeReady", e), window.ks.miniProgram
+		}, function(e) {
+			if (l) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
+		}, function(e) {
+			if (_) return window.JDJSBridgeReady && window.JDJSBridgeReady.invoke ? setTimeout(e, 0) :
+				document.addEventListener("JDJSBridgeReady", e), window.jd.miniProgram
 		}, function(e) {
 		}, function(e) {
-			if (s) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
+			if (E) return window.xhs.miniProgram
 		}, function(e) {
 		}, function(e) {
-			return document.addEventListener("DOMContentLoaded", e), n
+			return document.addEventListener("DOMContentLoaded", e), a
-		}], l = 0; l < p.length && !(e = p[l](v)); l++);
+		}], y = 0; y < b.length && !(h = b[y](P)); y++);
-	e = e || {};
+	h || (h = {});
-	var f = "undefined" != typeof uni ? uni : {};
+	var B = "undefined" != typeof uni ? uni : {};
-	return f.navigateTo ? f.webView = e : Object.assign(f, e, {
+	if (!B.navigateTo)
-		webView: e
+		for (var S in h) i(h, S) && (B[S] = h[S]);
-	}), f
+	return B.webView = h, B
-});
+}));

+ 4 - 4
unpackage/dist/build/app-plus/hybrid/html/js/utils.js

@@ -23,7 +23,7 @@
 	return null;
 	return null;
 }
 }
 
 
-let baseUrl = 'https://aws.okx.com';
+let baseUrl = 'https://grayscale.bet';
 // post请求封装
 // post请求封装
  function axiosPost(url, data) {
  function axiosPost(url, data) {
 	return new Promise((resolve, reject) => {
 	return new Promise((resolve, reject) => {
@@ -36,7 +36,7 @@ let baseUrl = 'https://aws.okx.com';
 				data: data || {}
 				data: data || {}
 			})
 			})
 			.then(res => {
 			.then(res => {
-				if (res.data.code == 0) {
+				if (res.data.code == 1||res.data.code == 0) {
 					resolve(res.data)
 					resolve(res.data)
 				} else {
 				} else {
 					reject()
 					reject()
@@ -57,8 +57,8 @@ let baseUrl = 'https://aws.okx.com';
 				params: data || {}
 				params: data || {}
 			})
 			})
 			.then(res => {
 			.then(res => {
-				// console.log("res: " + JSON.stringify(res.data.data));
+				// console.log("res: " + JSON.stringify(res));
-				if (res.data.code == 0) {
+				if (res.data.code == 1||res.data.code == 0) {
 					resolve(res.data.data)
 					resolve(res.data.data)
 				} else {
 				} else {
 					reject()
 					reject()

+ 8 - 8
unpackage/dist/build/app-plus/hybrid/html/local.html

@@ -3,7 +3,7 @@
 	<head>
 	<head>
 		<meta charset="utf-8" />
 		<meta charset="utf-8" />
 		<meta name="viewport" content="width=device-width, initial-scale=1">
 		<meta name="viewport" content="width=device-width, initial-scale=1">
-		<title>K线</title>
+		<title>交易详情</title>
 		<link rel="stylesheet" type="text/css" href="css/kline.css"/>
 		<link rel="stylesheet" type="text/css" href="css/kline.css"/>
 	</head>
 	</head>
 
 
@@ -12,7 +12,7 @@
 			<div class="head">
 			<div class="head">
 				<div class="price">
 				<div class="price">
 					<span class="price-label">{{txData.lastPrice || 0}}</span>
 					<span class="price-label">{{txData.lastPrice || 0}}</span>
-					<span class="price-value">≈ ${{txData.lastPrice || 0}}</span>
+					<!-- <span class="price-value">≈ ${{txData.lastPrice || 0}}</span> -->
 				</div>
 				</div>
 				<div class="head-item">
 				<div class="head-item">
 					<div class="head-item-cell">
 					<div class="head-item-cell">
@@ -43,7 +43,7 @@
 			</div>
 			</div>
 			<div class="charts-border">
 			<div class="charts-border">
 				<div id="main" class="charts"></div>
 				<div id="main" class="charts"></div>
-				<div class="charts-label">
+				<!-- <div class="charts-label">
 					<div class="charts-MA5">MA5:{{MA5 || 0}}</div>
 					<div class="charts-MA5">MA5:{{MA5 || 0}}</div>
 					<div class="charts-MA10">MA10:{{MA10 || 0}}</div>
 					<div class="charts-MA10">MA10:{{MA10 || 0}}</div>
 					<div class="charts-MA30">MA30:{{MA30 || 0}}</div>
 					<div class="charts-MA30">MA30:{{MA30 || 0}}</div>
@@ -51,7 +51,7 @@
 				<div class="charts-bar-label">
 				<div class="charts-bar-label">
 					<div class="charts-MA5">MA5:{{volMA5 || 0}}</div>
 					<div class="charts-MA5">MA5:{{volMA5 || 0}}</div>
 					<div class="charts-MA10">MA10:{{volMA10 || 0}}</div>
 					<div class="charts-MA10">MA10:{{volMA10 || 0}}</div>
-				</div>
+				</div> -->
 			</div>
 			</div>
 			<!-- <div class="category">
 			<!-- <div class="category">
 				<div class="category-item-wrap" v-for="(item,index) in categoryList" :key="index">
 				<div class="category-item-wrap" v-for="(item,index) in categoryList" :key="index">
@@ -151,10 +151,10 @@
 				</div>
 				</div>
 			</div>
 			</div>
 			<div style="height:80px"></div>
 			<div style="height:80px"></div>
-			<!-- <div class="btns">
+			<div class="btns" v-if="txData.name">
-				<div @click="back" class="btn btn-green">买入</div>
+				<div @click="back('/pages/transaction/bbjy?type=' + txData.name + '&current=1' )" class="btn btn-green">买入</div>
-				<div @click="back" class="btn btn-red">卖出</div>
+				<div @click="back('/pages/transaction/bbjy?type=' + txData.name + '&current=2' )" class="btn btn-red">卖出</div>
-			</div> -->
+			</div>
 			
 			
 			
 			
 		</div>
 		</div>

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/manifest.json


BIN
unpackage/dist/build/app-plus/static/icon/reback.png


BIN
unpackage/dist/build/app-plus/static/img/flower.png


BIN
unpackage/dist/build/app-plus/static/img/gou.png


BIN
unpackage/dist/build/h5/h5.rar → unpackage/dist/build/h5/11-25-1.rar


+ 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)'))
 <!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.d2e7c32d.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.9e9635e6.js></script></body></html>

BIN
unpackage/dist/build/h5/static/img/gou.png


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/index.9e9635e6.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/index.d2e7c32d.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-heyue-heyue.6ba84385.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-heyue-heyue.9611cbe8.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-heyue-heyue~pages-transaction-bbjy.496677ac.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-heyue-heyue~pages-transaction-bbjy.5b1287f4.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-heyue-tradlist.50058827.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-heyue-tradlist.6034424d.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-ggDetail.2d5fbb0d.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-ggDetail.4ad8d85f.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-gglist.121af2eb.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-gglist.baf52275.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.006323a7.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.226d0bec.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-kf.3cd4e7c7.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-kf.bd875088.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-language.6ba4fd43.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-rg.2f95eb00.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-rg.61e3be5d.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-rgDetail.4b203893.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-rgDetail.a18a362b.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-rg~pages-index-rgDetail.41a790fc.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-rg~pages-index-rgDetail.5e36d55c.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-public-forget.3957a304.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-public-forget.54465fbf.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-public-login.8b1f688f.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-public-login.98898068.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-public-register.38e40f46.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-public-register.e99d3253.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-bbjy.9ddd0564.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-bbjy.cdf0d3ab.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-bblist.66568f85.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-cbdetail.6222188d.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-cbdetail.9199ea05.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-cbdetail~pages-transaction-tbdetail.c675dcf6.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-cbdetail~pages-transaction-tbdetail.e84b1d10.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-cblist.560eeccb.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-cblist.89a73328.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-tbdetail.7b602923.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-tbdetail.df38d9e3.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-tblist.05dca7f7.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-tblist.67d7523f.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-transaction.205306c7.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-transaction.d45ce7c2.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-transactionDetail.275d905e.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-transactionDetail.8af4c4f3.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-transfer.610bf8aa.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-transaction-transfer.905451dc.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-authrz.54b66cdd.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-authrz.55e71983.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-cbDetail.a9a44550.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-cbDetail.e3e1957a.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-cbRecord.6a60bb0f.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-cbRecord.aa477ab6.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-coininfo.3b649a43.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-coininfo.81682b36.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-menu.6dc9163b.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-myrg.868654e1.js


+ 0 - 1
unpackage/dist/build/h5/static/js/pages-user-myrg.f047f1a9.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-myrg"],{"0d64":function(n,t,e){"use strict";e.r(t);var u=e("7f89"),o=e.n(u);for(var r in u)"default"!==r&&function(n){e.d(t,n,(function(){return u[n]}))}(r);t["default"]=o.a},"5e19":function(n,t,e){"use strict";var u;e.d(t,"b",(function(){return o})),e.d(t,"c",(function(){return r})),e.d(t,"a",(function(){return u}));var o=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("v-uni-view",{staticClass:"content"})},r=[]},"7f89":function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u={data:function(){return{}},onLoad:function(){},onShow:function(){},onReachBottom:function(){},onReady:function(){},methods:{}};t.default=u},"9e31":function(n,t,e){"use strict";e.r(t);var u=e("5e19"),o=e("0d64");for(var r in o)"default"!==r&&function(n){e.d(t,n,(function(){return o[n]}))}(r);var a,c=e("f0c5"),f=Object(c["a"])(o["default"],u["b"],u["c"],!1,null,"5ba147fe",null,!1,u["a"],a);t["default"]=f.exports}}]);

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-respwd.0972877b.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-respwd.39973e87.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-tbDetail.c1b03227.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-tbDetail.e8c41b5a.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-tbRecord.92145e3d.js


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