From 667cae1b98ec8f3776fd153fec07c6b4ce978033 Mon Sep 17 00:00:00 2001
From: vee <897831508@qq.com>
Date: Sat, 17 Sep 2022 14:09:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dapp=E7=9A=84k=E7=BA=BF?=
=?UTF-8?q?=E4=B8=8D=E5=87=BA=E6=9D=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/kline/kline.vue | 15 +++++++--------
components/kline/props.js | 4 ++++
manifest.json | 21 +++------------------
pages/markets/kLine.vue | 11 +++++++++--
4 files changed, 23 insertions(+), 28 deletions(-)
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();