Fly 2 years ago
parent
commit
c1d6044599
2 changed files with 14 additions and 10 deletions
  1. 11 7
      components/k-line/k-line.vue
  2. 3 3
      pages/contract/sustainability/details.vue

+ 11 - 7
components/k-line/k-line.vue

@@ -1,10 +1,11 @@
 <template>
-	<view class="web-view-box" :style="{'width': '100%' , 'height': kHeight + 'px' }">
-		<iframe :style="{'width': '100%' , 'height': kHeight + 'px' }" :src="`https://biking.okenx.com/kline/kline.html?tokenName=${currencyVal.currency_name}`" frameborder="0"></iframe>
-		<!-- <iframe :style="{'width': '100%' , 'height': kHeight + 'px' }" src="https://kline.cuwiee.com/local.html?symbol=LTC/USDT" frameborder="0"></iframe> -->
-<!-- 		<web-view :fullscreen="false" :style="{'width': '100%' , 'height': kHeight + 'px' }"
+	<iframe class="iframe-k" :src="`https://biking.okenx.com/kline/kline.html?tokenName=${currencyVal.currency_name}`"
+		frameborder="0"></iframe>
+
+	<!-- <iframe :style="{'width': '100%' , 'height': kHeight + 'px' }" src="https://kline.cuwiee.com/local.html?symbol=LTC/USDT" frameborder="0"></iframe> -->
+	<!-- 		<web-view :fullscreen="false" :style="{'width': '100%' , 'height': kHeight + 'px' }"
 			:src="`https://kline.cuwiee.com/local.html`"></web-view> -->
-	</view>
+
 </template>
 <script>
 	import {
@@ -19,7 +20,7 @@
 			},
 			kHeight: {
 				type: Number,
-				default: ''
+				default: 0
 			},
 			// :k-width="kWidth" :k-height="kHeight"
 			height: {
@@ -44,5 +45,8 @@
 	}
 </script>
 <style lang="scss" scoped>
- 
+.iframe-k{
+	width: 100%;
+	height: 100%;
+}
 </style>

+ 3 - 3
pages/contract/sustainability/details.vue

@@ -57,7 +57,7 @@
 
 		<view class="iframe-content">
 			<template v-if="currencyVal.legal_id">
-				<k-line :k-width="kWidth" :k-height="kHeight"></k-line>
+				<k-line></k-line>
 			</template>
 		</view>
 		<gap />
@@ -135,8 +135,8 @@
 	export default {
 		data() {
 			return {
-				kWidth:uni.upx2px(750),
-				kHeight:uni.upx2px(660),
+				// kWidth:uni.upx2px(750),
+				// kHeight:uni.upx2px(660),
 				valLableIndex: 0,
 				swiperHeight: 0,
 				scrollLeftHeight: 0,