Browse Source

修复app的k线不出来

master
vee 3 years ago
parent
commit
667cae1b98
  1. 15
      components/kline/kline.vue
  2. 4
      components/kline/props.js
  3. 21
      manifest.json
  4. 9
      pages/markets/kLine.vue

15
components/kline/kline.vue

@ -20,7 +20,7 @@
</view>
<view id="kline" :windowWidth="width" :change:windowWidth="KlineJs.setWidth" :windowHeight="height"
:change:windowHeight="KlineJs.setHeight" :symbol="symbol"
:change:symbol="KlineJs.setSymbol" :index_activeCycle="index_activeCycle" :change:index_activeCycle="KlineJs.changindex_activeCycle"></view>
:change:symbol="KlineJs.setSymbol" :language="language" :change:language="KlineJs.changlanguage" :index_activeCycle="index_activeCycle" :change:index_activeCycle="KlineJs.changindex_activeCycle"></view>
</view>
</template>
@ -106,7 +106,8 @@
return {
chartHeight: 0,
chartWidth: 0,
chartSymbol:'btc'
chartSymbol:'btc',
language:'en'
}
},
//renderjs
@ -129,6 +130,9 @@
},
changindex_activeCycle(index_activeCycle){
this.initChart(index_activeCycle)
},
changlanguage(language){
this.language=language
}
,
initChart(index_activeCycle) {
@ -143,12 +147,7 @@
chartConfig.time_frames=[]
// TradingView
console.log(window.TradingView.version())
const language = uni.getStorageSync("language")|| 'en_US';
if(language.indexOf('zh')>-1){
chartConfig.locale=language
}else{
chartConfig.locale=language.split('_')[0]
}
widgetObj = new widget(chartConfig)

4
components/kline/props.js

@ -14,5 +14,9 @@ export default {
type: String,
default: ''
},
language: {
type: String,
default: ''
},
}
}

21
manifest.json

@ -1,9 +1,9 @@
{
"name" : "Same home",
"name" : "samehome",
"appid" : "__UNI__C4028F6",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : 100,
"versionCode" : "101",
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -84,22 +84,7 @@
}
}
},
"nativePlugins" : {
"HF-Step" : {
"__plugin_info__" : {
"name" : "原生计步器(Android和IOS)",
"description" : "计步器,原生计步器插件,安卓,IOS",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=6632",
"android_package_name" : "com.samehome",
"ios_bundle_id" : "com.samehome",
"isCloud" : true,
"bought" : 1,
"pid" : "6632",
"parameters" : {}
}
}
}
"nativePlugins" : {}
},
"h5" : {
"publicPath" : "/",

9
pages/markets/kLine.vue

@ -35,7 +35,7 @@
</view>
</view>
<kline v-if="showKline" :width="chartWidth" :height="chartHeight" :symbol="symbol.symbol"></kline>
<kline v-if="showKline" :width="chartWidth" :height="chartHeight" :symbol="symbol.symbol" :language="language"></kline>
<!-- 买卖挂牌表 -->
<view class="MarketTrades">
@ -118,6 +118,7 @@
chartHeight: 0,
//(PX)
menuHeight: 0,
language:'en'
};
},
@ -200,6 +201,12 @@
uni.navigateBack()
// #endif
}
const language = uni.getStorageSync("language")|| 'en_US';
if(language.indexOf('zh')>-1){
this.language=language
}else{
this.language=language.split('_')[0]
}
this.getMarketDetail();
this.initWebSocket();
this.getBboList()

Loading…
Cancel
Save