diff --git a/components/kline/kline.vue b/components/kline/kline.vue index 2c6fcd1..852f044 100644 --- a/components/kline/kline.vue +++ b/components/kline/kline.vue @@ -20,7 +20,7 @@ + :change:symbol="KlineJs.setSymbol" :language="language" :change:language="KlineJs.changlanguage" :index_activeCycle="index_activeCycle" :change:index_activeCycle="KlineJs.changindex_activeCycle"> @@ -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) diff --git a/components/kline/props.js b/components/kline/props.js index 8f7e8ea..7043678 100644 --- a/components/kline/props.js +++ b/components/kline/props.js @@ -13,6 +13,10 @@ export default { symbol: { type: String, default: '' + }, + language: { + type: String, + default: '' }, } } diff --git a/manifest.json b/manifest.json index 8a1d626..b1643ff 100644 --- a/manifest.json +++ b/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" : "/", diff --git a/pages/markets/kLine.vue b/pages/markets/kLine.vue index b59f4f2..3ff33ce 100644 --- a/pages/markets/kLine.vue +++ b/pages/markets/kLine.vue @@ -35,7 +35,7 @@ - + @@ -117,7 +117,8 @@ // K线图高度 chartHeight: 0, //菜单栏高度(单位PX) - menuHeight: 0, + menuHeight: 0, + language:'en' }; }, @@ -199,6 +200,12 @@ // #ifdef APP-PLUS 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();