li.shaoyi vor 3 Monaten
Ursprung
Commit
eb709bf879

+ 1 - 1
app/package.json

@@ -1,6 +1,6 @@
 {
   "name": "trading-beta",
-  "version": "1.0.0",
+  "version": "1.0.2",
   "main": "main.js",
   "dependencies": {
     "electron-updater": "^6.1.4",

+ 2 - 2
oem/snhl/config/appconfig.json

@@ -1,8 +1,8 @@
 {
   "appId": "com.snhl.release",
   "appName": "三农互联",
-  "version": "1.0.0",
-  "versionCode": "100000",
+  "version": "1.0.2",
+  "versionCode": "100002",
   "apiUrl": "http://192.168.31.208:8080/cfg?key=test_208",
   "tradeChannel": "ws",
   "modules": [

+ 1 - 1
oem/tss-vi/config/appconfig.json

@@ -6,7 +6,7 @@
   "apiUrl": "http://192.168.31.210:8080/cfg?key=test_210",
   "tradeChannel": "ws",
   "showLoginAlert": true,
-  "registrationCodeRule": 0,
+  "registrationCodeRule": 1,
   "modules": [
     "register"
   ],

+ 1 - 1
oem/tss/config/appconfig.json

@@ -6,7 +6,7 @@
   "apiUrl": "http://192.168.31.210:8080/cfg?key=test_210",
   "tradeChannel": "ws",
   "showLoginAlert": true,
-  "registrationCodeRule": 0,
+  "registrationCodeRule": 1,
   "modules": [
     "register"
   ],

+ 20 - 5
src/components/base/hqchart/index.vue

@@ -44,6 +44,8 @@ resource.FrameLogo.Text = null
 Chart.JSConsole.Chart.Log = () => ({})
 Chart.JSConsole.Complier.Log = () => ({})
 
+const GetDevicePixelRatio = () => window.devicePixelRatio || 1
+
 const setChartStyle = (defaultTheme?: keyof typeof AppTheme) => {
     const rootElement = document.documentElement
     const computedStyles = window.getComputedStyle(rootElement)
@@ -58,14 +60,16 @@ const setChartStyle = (defaultTheme?: keyof typeof AppTheme) => {
         const elStyle = chartEl.style
         const theme = defaultTheme ? AppTheme[defaultTheme] : globalStore.appTheme
 
-        // https://blog.csdn.net/jones2000/article/details/90286933
+        // https://github.com/jones2000/HQChart/wiki/4.-%E9%A2%9C%E8%89%B2%E9%A3%8E%E6%A0%BC%E9%85%8D%E7%BD%AE
         switch (theme) {
             case AppTheme.Dark: {
                 const blackStyle = hqChartStyle.GetStyleConfig(Chart.STYLE_TYPE_ID.BLACK_ID) // 黑色风格
                 blackStyle.UpBarColor = upBarColor
                 blackStyle.DownBarColor = downBarColor
+
                 blackStyle.UpTextColor = upBarColor
                 blackStyle.DownTextColor = downBarColor
+
                 blackStyle.FrameLatestPrice = {
                     UpBarColor: upBarColor,
                     DownBarColor: downBarColor
@@ -77,15 +81,26 @@ const setChartStyle = (defaultTheme?: keyof typeof AppTheme) => {
             }
             default: {
                 const whiteStyle = hqChartStyle.GetStyleConfig(Chart.STYLE_TYPE_ID.WHITE_ID) // 白色风格
-                whiteStyle.UpBarColor = upBarColor
-                whiteStyle.DownBarColor = downBarColor
-                whiteStyle.UpTextColor = upBarColor
-                whiteStyle.DownTextColor = downBarColor
+                whiteStyle.UpBarColor = upBarColor // 上涨柱子颜色
+                whiteStyle.DownBarColor = downBarColor // 下跌柱子颜色
+
+                whiteStyle.UpTextColor = upBarColor // 上涨文字颜色
+                whiteStyle.DownTextColor = downBarColor // 下跌文字颜色
+                whiteStyle.UnchagneTextColor = '#999' // 平盘文字颜色
+
+                whiteStyle.FrameBorderPen = '#f2f2f2' // 边框颜色
+                whiteStyle.FrameSplitPen = '#f2f2f2' // 刻度分割线
+                whiteStyle.FrameDotSplitPen = '#ccc' // 分割虚线
+
                 whiteStyle.FrameLatestPrice = {
                     UpBarColor: upBarColor,
                     DownBarColor: downBarColor
                 }
 
+                whiteStyle.Frame = {
+                    XBottomOffset: 10 * GetDevicePixelRatio() // X轴文字向下偏移
+                }
+
                 jsChart.SetStyle(whiteStyle)
                 elStyle.setProperty('background-color', '#fff')
             }

+ 5 - 3
src/packages/mobile/components/modules/hqchart/candlestick/index.vue

@@ -116,7 +116,7 @@ const chartOption = {
         Left: 0,
         Right: 0,
         Top: props.isShowTitle ? 36 : 10,
-        Bottom: 25,
+        Bottom: 36,
         AutoLeft: { Blank: 15, MinWidth: 30 },
         AutoRight: { Blank: 15, MinWidth: 30 },
     },
@@ -141,16 +141,18 @@ const chartOption = {
     },
     Frame: [
         {
+            SplitType: 1,
+            IsShowRightText: false, // 是否显示Y轴右侧刻度
             Custom: [
                 {
                     Type: 0,
                     Position: 'left',
                 }
             ],
-            IsShowRightText: false // 是否显示Y轴右侧刻度
         },
         {
-            IsShowRightText: false // 是否显示Y轴右侧刻度
+            SplitType: 1,
+            IsShowRightText: false, // 是否显示Y轴右侧刻度
         }
     ],
     OnCreatedCallback: (chart: KLineChartContainer) => {

+ 1 - 0
src/packages/mobile/components/modules/hqchart/timeline/index.less

@@ -4,6 +4,7 @@
     flex-direction: column;
     height: 320px;
     overflow: hidden;
+    padding:0 10px;
 
     &.trademode99 {
         height: 260px;

+ 9 - 4
src/packages/mobile/components/modules/hqchart/timeline/index.vue

@@ -63,10 +63,10 @@ const chartOption = {
     },
     DayCount: 1,
     Border: {
-        Left: 30,
-        Right: 30,
+        Left: 0,
+        Right: 0,
         Top: 36,
-        Bottom: 25,
+        Bottom: 36,
         AutoLeft: { Blank: 10, MinWidth: 30 },
         AutoRight: { Blank: 10, MinWidth: 30 },
     },
@@ -80,7 +80,12 @@ const chartOption = {
     },
     Frame: [
         {
-            IsShowRightText: !!goods.value?.presettle // 是否显示Y轴右侧刻度
+            SplitType: 1,
+            SplitCount: 3,
+            IsShowRightText: !!goods.value?.presettle, // 是否显示Y轴右侧刻度
+        },
+        {
+            SplitType: 1,
         },
     ],
     OnCreatedCallback: (chart: MinuteChartContainer) => {