li.shaoyi hace 2 años
padre
commit
aa0e009fca

BIN
oem/qdhs/logo/logo-horizontal.png


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 695 - 23
package-lock.json


+ 3 - 1
package.json

@@ -36,7 +36,9 @@
     "default-passive-events": "^2.0.0",
     "echarts": "^5.4.3",
     "element-plus": "^2.3.8",
+    "hqchart": "^1.1.12450",
     "html5-qrcode": "^2.2.5",
+    "jquery": "^3.7.1",
     "long": "^5.2.0",
     "moment": "^2.29.3",
     "photoswipe": "^5.3.6",
@@ -76,4 +78,4 @@
     "vconsole": "^3.14.6",
     "worker-loader": "^3.0.8"
   }
-}
+}

+ 1 - 1
src/business/user/account.ts

@@ -66,7 +66,7 @@ export function useAccountPassword(ModifyPwdType: 0 | 1 | 2) {
 
     const formData = reactive<Proto.ModifyPwdReq>({
         ModifyPwdType, // 修改密码类型1:登陆密码2:资金账户密码
-        ModifyPwdID: ModifyPwdType === 1 ? loginStore.userId : accountStore.currentAccountId, // 被修改的ID(ModifyType=1:LoginIDModifyType=2:AccountID)
+        ModifyPwdID: ModifyPwdType === 1 ? loginStore.loginId : accountStore.currentAccountId, // 被修改的ID(ModifyType=1:LoginIDModifyType=2:AccountID)
         OldPwd: '', // 旧资金密码
         NewPwd: '' // 新资金密码
     })

+ 0 - 0
src/hooks/hqchart/index.ts


+ 9 - 7
src/packages/gstj/views/home/Index.vue

@@ -13,7 +13,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, nextTick, watch, onMounted } from 'vue'
+import { shallowRef, nextTick, watch, onMounted,computed } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { versionToNumber } from '@/filters'
 import { Tabbar } from '@mobile/components/base/tabbar/types'
@@ -31,6 +31,8 @@ const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
 const currentTab = shallowRef(0)
 
+const tabIndex = computed(() => tabList.findIndex((e) => e.name === route.name))
+
 const tabList: Tabbar[] = [
   {
     name: 'home-index',
@@ -86,9 +88,7 @@ const onTabClick = (index: number) => {
 }
 
 onMounted(() => {
-  const { tabIndex } = getGlobalUrlParams()
-  currentTab.value = tabIndex > -1 ? tabIndex : tabList.findIndex((e) => e.name === route.name)
-
+  currentTab.value = tabIndex.value
   const os = plus.getSystemInfo('os')
   const currentVersion = plus.getSystemInfo('version')
   const currentVersionCode = plus.getSystemInfo('versionCode')
@@ -151,9 +151,11 @@ onMounted(() => {
 })
 
 watch(() => route.name, () => {
-  const { tabIndex } = getGlobalUrlParams()
-  if (tabIndex > -1) {
-    onTabClick(tabIndex)
+  const params = getGlobalUrlParams()
+  if (params.tabIndex > -1) {
+    onTabClick(params.tabIndex)
+  } else if (tabIndex.value > -1) {
+    onTabClick(tabIndex.value)
   } else {
     nextTick(() => {
       cssTransition.value = true

+ 82 - 0
src/packages/mobile/components/modules/chart/index.vue

@@ -0,0 +1,82 @@
+<template>
+    <div ref="chartRef" style="width:375px;height: 300px;background-color: #fff;"></div>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { Chart } from 'hqchart'
+import { queryHistoryDatas } from '@/services/api/quote'
+import { useFuturesStore } from '@/stores'
+import moment from 'moment'
+
+const chartRef = shallowRef()
+const historyData = shallowRef<Model.HistoryDatasRsp[]>([])
+const futuresStore = useFuturesStore()
+const quote = futuresStore.getGoodsQuote('AGTD')
+
+// 获取历史行情
+queryHistoryDatas({
+    data: {
+        cycleType: 1,
+        goodsCode: 'AGTD',
+        count: 1440,
+    }
+}).then((res) => {
+    historyData.value = res.data.sort((a, b) => moment(a.ts).valueOf() - moment(b.ts).valueOf())
+
+    const option = {
+        Symbol: '600000.sh', // 必填
+        Type: '历史K线图',
+        IsAutoUpdate: false,
+        NetworkFilter: (data: { Name: string; PreventDefault: boolean; }, callback: (opt: { symbol: string; data: (string | number)[][]; }) => void) => {
+            console.log('历史K线图', data)
+            data.PreventDefault = true
+            switch (data.Name) {
+                // https://blog.csdn.net/jones2000/article/details/100557649
+                case 'KLineChartContainer::ReqeustHistoryMinuteData':
+                    callback({
+                        symbol: '600000.sh', // 必填
+                        data: historyData.value.map((e) => ([
+                            moment(e.ts).format('YYYYMMDD'),
+                            quote.value?.preclose ?? 0,
+                            e.o,
+                            e.h,
+                            e.l,
+                            e.c,
+                            e.tv,
+                            e.tt,
+                            moment(e.ts).format('HHmm'),
+                        ]))
+                    })
+                    break
+            }
+        },
+        Windows: [
+            { Index: 'MA', Modify: false, Change: false },
+            { Index: 'VOL', Modify: false, Change: false }
+        ],
+        IsShowCorssCursorInfo: true,
+        Border: {
+            Left: 1,
+            Right: 1, //右边间距
+            Top: 25,
+            Bottom: 25,
+        },
+        KLine: {
+            Right: 1,
+            // [30001-32000) 秒周期
+            // 0=日线 1=周线 2=月线 3=年线 9=季线  [40001-50000) 自定义日线
+            // 4=1分钟 5=5分钟 6=15分钟 7=30分钟 8=60分钟 11=120分钟 12=240分钟 [20001-30000) 自定义分钟
+            Period: 4,
+            PageSize: 70,
+            IsShowTooltip: true
+        },
+    }
+
+    const resource = Chart.JSChart.GetResource()
+    resource.FrameLogo.Text = ''
+
+    const chart = Chart.JSChart.Init(chartRef.value)
+    chart.SetOption(option)
+})
+</script>

+ 2 - 2
src/packages/mobile/views/goods/detail/components/listing/Index.vue

@@ -116,10 +116,10 @@ const priceStep = computed(() => {
 // 订立可用数量
 const enableQty = computed(() => {
     const { avaiableMoney = 0 } = accountStore.currentAccount
-    const { marketmarginalgorithm = 0, marketmarginvalue = 0, last = 0, presettle = 0, agreeunit = 0 } = quote.value ?? {}
+    const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = quote.value ?? {}
 
     const fixed = agreeunit * marketmarginvalue
-    const ratio = fixed * (last || presettle)
+    const ratio = fixed * (formData.OrderPrice ?? 0)
 
     if (fixed && ratio) {
         if (marketmarginalgorithm === 1) {

+ 6 - 3
src/packages/mobile/views/home/Index.vue

@@ -13,7 +13,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, nextTick, watch, onMounted,computed } from 'vue'
+import { shallowRef, nextTick, watch, onMounted, computed } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { versionToNumber } from '@/filters'
 import { Tabbar } from '@mobile/components/base/tabbar/types'
@@ -25,7 +25,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo } = useNavigation()
+const { route, routerTo, getGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -151,7 +151,10 @@ onMounted(() => {
 })
 
 watch(() => route.name, () => {
-  if (tabIndex.value > -1) {
+  const params = getGlobalUrlParams()
+  if (params.tabIndex > -1) {
+    onTabClick(params.tabIndex)
+  } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
     nextTick(() => {

+ 5 - 3
src/packages/mobile/views/home/main/Index.vue

@@ -5,6 +5,7 @@
     </template>
     <Banner :data-list="topBanners" />
     <PullRefresh class="home-main__container" v-model="refreshing" @refresh="onRefresh">
+      <!-- <HQChart /> -->
       <app-block>
         <Cell title="通知公告" value="更多" :to="{ name: 'notice-list' }" icon="volume" is-link />
       </app-block>
@@ -24,8 +25,8 @@
           </li>
           <!-- <li @click="switchTab('home-ballot')">
             <Iconfont label-direction="bottom" icon="g-icon-presale--line">预售中签</Iconfont>
-          </li> -->
-          <!-- <li @click="switchTab('home-transfer')">
+          </li>
+          <li @click="switchTab('home-transfer')">
             <Iconfont label-direction="bottom" icon="g-icon-transfer--line">定金转让</Iconfont>
           </li> -->
         </ul>
@@ -72,10 +73,11 @@ import { queryNewTitles } from "@/services/api/news";
 import { useLoginStore, useGlobalStore } from '@/stores'
 import Banner from '@mobile/components/base/banner/index.vue'
 import Iconfont from '@mobile/components/base/iconfont/index.vue'
+//import HQChart from '@mobile/components/modules/chart/index.vue'
 
 const globalStore = useGlobalStore()
 const loginStore = useLoginStore();
-const { routerTo, setGlobalUrlParams } = useNavigation();
+const { routerTo } = useNavigation();
 const refreshing = shallowRef(false); // 是否处于加载中状态
 const topBanners = shallowRef<string[]>([]); // 轮播图列表
 const newsList = shallowRef<Model.NewTitlesRsp[]>([]); // 资讯列表

+ 1 - 0
src/packages/mobile/views/home/main/index.less

@@ -28,6 +28,7 @@
                     height: .72rem;
                     font-size: .44rem;
                     color: #fff;
+                    background-color: #000;
                     border-radius: 50%;
                     margin-bottom: .08rem;
 

+ 1 - 1
src/packages/pc/components/layouts/header/index.vue

@@ -25,7 +25,7 @@
                     <el-dropdown-menu>
                         <el-dropdown-item :icon="Avatar" @click="openComponent('avater')">修改头像</el-dropdown-item>
                         <el-dropdown-item :icon="Unlock" @click="openComponent('modify')">修改密码</el-dropdown-item>
-                        <el-dropdown-item :icon="Delete" @click="openComponent('cancel')">注销账户</el-dropdown-item>
+                        <!-- <el-dropdown-item :icon="Delete" @click="openComponent('cancel')">注销账户</el-dropdown-item> -->
                         <el-dropdown-item :icon="SwitchButton"
                             @click="eventBus.$emit('LogoutNotify')">退出登录</el-dropdown-item>
                     </el-dropdown-menu>

+ 2 - 2
src/packages/pc/views/market/trade/goods/list/listing/index.vue

@@ -113,10 +113,10 @@ const priceStep = computed(() => {
 // 订立可用数量
 const enableQty = computed(() => {
     const { avaiableMoney = 0 } = accountStore.currentAccount
-    const { marketmarginalgorithm = 0, marketmarginvalue = 0, last = 0, presettle = 0, agreeunit = 0 } = selectedGoods.value ?? {}
+    const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = selectedGoods.value ?? {}
 
     const fixed = agreeunit * marketmarginvalue
-    const ratio = fixed * (last || presettle)
+    const ratio = fixed * (formData.OrderPrice ?? 0)
 
     if (fixed && ratio) {
         if (marketmarginalgorithm === 1) {

+ 5 - 2
src/packages/qdhs/views/home/Index.vue

@@ -25,7 +25,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo } = useNavigation()
+const { route, routerTo, getGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -145,7 +145,10 @@ onMounted(() => {
 })
 
 watch(() => route.name, () => {
-  if (tabIndex.value > -1) {
+  const params = getGlobalUrlParams()
+  if (params.tabIndex > -1) {
+    onTabClick(params.tabIndex)
+  } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
     nextTick(() => {

+ 9 - 7
src/packages/qxst/views/home/Index.vue

@@ -13,7 +13,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, nextTick, watch, onMounted } from 'vue'
+import { shallowRef, nextTick, watch, onMounted,computed } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { versionToNumber } from '@/filters'
 import { Tabbar } from '@mobile/components/base/tabbar/types'
@@ -31,6 +31,8 @@ const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
 const currentTab = shallowRef(0)
 
+const tabIndex = computed(() => tabList.findIndex((e) => e.name === route.name))
+
 const tabList: Tabbar[] = [
   {
     name: 'home-index',
@@ -74,9 +76,7 @@ const onTabClick = (index: number) => {
 }
 
 onMounted(() => {
-  const { tabIndex } = getGlobalUrlParams()
-  currentTab.value = tabIndex > -1 ? tabIndex : tabList.findIndex((e) => e.name === route.name)
-
+  currentTab.value = tabIndex.value
   const os = plus.getSystemInfo('os')
   const currentVersion = plus.getSystemInfo('version')
   const currentVersionCode = plus.getSystemInfo('versionCode')
@@ -139,9 +139,11 @@ onMounted(() => {
 })
 
 watch(() => route.name, () => {
-  const { tabIndex } = getGlobalUrlParams()
-  if (tabIndex > -1) {
-    onTabClick(tabIndex)
+  const params = getGlobalUrlParams()
+  if (params.tabIndex > -1) {
+    onTabClick(params.tabIndex)
+  } else if (tabIndex.value > -1) {
+    onTabClick(tabIndex.value)
   } else {
     nextTick(() => {
       cssTransition.value = true

+ 1 - 1
src/packages/sbyj/views/delivery/components/completed/list/index.vue

@@ -45,8 +45,8 @@
                     </ul>
                 </div>
                 <div class="g-order-list__btnbar">
-                    <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
                     <Button size="small" @click="showComponent('paydetail', item)" round>货款明细</Button>
+                    <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
                 </div>
             </div>
         </div>

+ 5 - 2
src/packages/sbyj/views/home/index.vue

@@ -24,7 +24,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo } = useNavigation()
+const { route, routerTo, getGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -159,7 +159,10 @@ onMounted(() => {
 })
 
 watch(() => route.name, () => {
-  if (tabIndex.value > -1) {
+  const params = getGlobalUrlParams()
+  if (params.tabIndex > -1) {
+    onTabClick(params.tabIndex)
+  } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
     nextTick(() => {

+ 1 - 1
src/packages/sbyj/views/market/detail/index.vue

@@ -94,13 +94,13 @@
                         </ul>
                     </div>
                     <div class="g-order-list__btnbar">
-                        <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
                         <Button size="small" @click="showComponent('supplement', item)" round
                             v-if="item.tHDetailEx.holderQty">补充</Button>
                         <template v-if="enableqty(item)">
                             <Button size="small" @click="showComponent('delivery', item)" round>交收</Button>
                             <Button size="small" @click="showComponent('closeholder', item)" round>转让</Button>
                         </template>
+                        <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
                     </div>
                 </div>
             </div>

+ 1 - 1
src/packages/sbyj/views/order/list/index.vue

@@ -62,13 +62,13 @@
                         </ul>
                     </div>
                     <div class="g-order-list__btnbar">
-                        <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
                         <Button size="small" @click="showComponent('supplement', item)" round
                             v-if="item.tHDetailEx.holderQty">补充</Button>
                         <template v-if="enableqty(item)">
                             <Button size="small" @click="showComponent('delivery', item)" round>交收</Button>
                             <Button size="small" @click="showComponent('closeholder', item)" round>转让</Button>
                         </template>
+                        <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
                     </div>
                 </div>
             </div>

+ 9 - 7
src/packages/tc/views/home/Index.vue

@@ -13,7 +13,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, nextTick, watch, onMounted } from 'vue'
+import { shallowRef, nextTick, watch, onMounted ,computed} from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { versionToNumber } from '@/filters'
 import { Tabbar } from '@mobile/components/base/tabbar/types'
@@ -31,6 +31,8 @@ const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
 const currentTab = shallowRef(0)
 
+const tabIndex = computed(() => tabList.findIndex((e) => e.name === route.name))
+
 const tabList: Tabbar[] = [
   {
     name: 'home-index',
@@ -86,9 +88,7 @@ const onTabClick = (index: number) => {
 }
 
 onMounted(() => {
-  const { tabIndex } = getGlobalUrlParams()
-  currentTab.value = tabIndex > -1 ? tabIndex : tabList.findIndex((e) => e.name === route.name)
-
+  currentTab.value = tabIndex.value
   const os = plus.getSystemInfo('os')
   const currentVersion = plus.getSystemInfo('version')
   const currentVersionCode = plus.getSystemInfo('versionCode')
@@ -151,9 +151,11 @@ onMounted(() => {
 })
 
 watch(() => route.name, () => {
-  const { tabIndex } = getGlobalUrlParams()
-  if (tabIndex > -1) {
-    onTabClick(tabIndex)
+  const params = getGlobalUrlParams()
+  if (params.tabIndex > -1) {
+    onTabClick(params.tabIndex)
+  } else if (tabIndex.value > -1) {
+    onTabClick(tabIndex.value)
   } else {
     nextTick(() => {
       cssTransition.value = true

+ 1 - 24
src/packages/tc/views/home/main/Index.vue

@@ -25,39 +25,16 @@
 import { shallowRef } from "vue";
 import { Cell, CellGroup, PullRefresh } from "vant";
 import { formatDate } from "@/filters";
-import { useNavigation } from '@mobile/router/navigation';
 import { queryImageConfigs } from "@/services/api/common";
 import { queryNewTitles } from "@/services/api/news";
-import { useLoginStore, useGlobalStore } from '@/stores'
+import {  useGlobalStore } from '@/stores'
 import Banner from '@mobile/components/base/banner/index.vue'
 
 const globalStore = useGlobalStore()
-const loginStore = useLoginStore();
-const { routerTo, setGlobalUrlParams } = useNavigation();
 const refreshing = shallowRef(false); // 是否处于加载中状态
 const topBanners = shallowRef<string[]>([]); // 轮播图列表
 const newsList = shallowRef<Model.NewTitlesRsp[]>([]); // 资讯列表
 
-// 跳转导航页面
-const switchTab = (tabIndex: number) => {
-  if (loginStore.token) {
-    setGlobalUrlParams({ tabIndex })
-    switch (tabIndex) {
-      case 1:
-        routerTo('home-ballot', true)
-        break
-      case 2:
-        routerTo('home-transfer', true)
-        break
-      case 3:
-        routerTo('home-50101', true)
-        break
-    }
-  } else {
-    routerTo('user-login')
-  }
-}
-
 // 下拉刷新
 const onRefresh = () => {
   if (!topBanners.value.length) {

+ 5 - 2
src/packages/zrwyt/views/home/Index.vue

@@ -25,7 +25,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo } = useNavigation()
+const { route, routerTo, getGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -151,7 +151,10 @@ onMounted(() => {
 })
 
 watch(() => route.name, () => {
-  if (tabIndex.value > -1) {
+  const params = getGlobalUrlParams()
+  if (params.tabIndex > -1) {
+    onTabClick(params.tabIndex)
+  } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
     nextTick(() => {

+ 2 - 1
src/shims-vue.d.ts

@@ -17,4 +17,5 @@ declare module 'worker-loader!*' {
   export default WebpackWorker;
 }
 
-declare module 'element-plus/dist/locale/zh-cn.mjs'
+declare module 'element-plus/dist/locale/zh-cn.mjs'
+declare module 'hqchart'

+ 1 - 0
src/stores/modules/futures.ts

@@ -201,6 +201,7 @@ export const useFuturesStore = defineStore(() => {
             askvolume5: quote.askvolume5 ?? 0,
             lastvolume: quote.lastvolume ?? 0,
             presettle: quote.presettle ?? 0,
+            preclose: quote.preclose ?? 0,
             opened: quote.opened ?? 0,
             highest: quote.highest ?? 0,
             lowest: quote.lowest ?? 0,

+ 1 - 0
src/types/model/market.d.ts

@@ -102,6 +102,7 @@ declare namespace Model {
         askvolume5: number; // 卖量5
         lastvolume: number; // 现量
         presettle: number; // 昨结价
+        preclose: number; // 昨收
         opened: number; // 开盘
         highest: number; // 最高
         lowest: number; // 最低

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio