Handy_Cao 1 年間 前
コミット
0e025f0bc2

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

@@ -5,6 +5,7 @@
   "versionCode": "100013",
   "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
   "tradeChannel": "ws",
+  "showLoginAlert": true,
   "modules": [
     "register"
   ],

+ 2 - 1
public/locales/en-US.json

@@ -1364,7 +1364,8 @@
             "tips3": "Login failed:",
             "tips4": "Offline notification",
             "tips5": "The account has been logged out",
-            "tips6": "Switching language changes require a re-login to take effect!"
+            "tips6": "Switching language changes require a re-login to take effect!",
+            "tips7": "尊Dear user: Hello, please pay the full amount for your pre-order before 04:00 on Saturday to ensure shipment, otherwise our platform will cancel the pre-order according to the agreement."
         },
         "register": {
             "title": "User Register",

+ 2 - 1
public/locales/th-TH.json

@@ -1369,7 +1369,8 @@
             "tips3": "ล้มเหลวในการล็อกอิน:",
             "tips4": "การแจ้งให้ทราบแบบออฟไลน์",
             "tips5": "ออกจากระบบบัญชีแล้ว",
-            "tips6": "การเปลี่ยนภาษาจะต้องมีการล็อกอินใหม่จนกว่า จะมีผล!"
+            "tips6": "การเปลี่ยนภาษาจะต้องมีการล็อกอินใหม่จนกว่า จะมีผล!",
+            "tips7": "เรียนผู้ใช้ที่เคารพ: สวัสดีครับ/ค่ะ โปรดชำระเงินค่าสินค้าตามคำสั่งซื้อล่วงหน้าให้ครบถ้วนก่อนเวลา 04:00 น. ของวันเสาร์เพื่อให้สามารถจัดส่งสินค้าได้ มิฉะนั้นแพลตฟอร์มของเราจะยกเลิกคำสั่งซื้อล่วงหน้าตามข้อตกลง"
         },
         "register": {
             "title": "ลงทะเบียนผู้ใช้",

+ 2 - 1
public/locales/zh-CN.json

@@ -1369,7 +1369,8 @@
             "tips3": "登录失败:",
             "tips4": "下线通知",
             "tips5": "账号已登出",
-            "tips6": "切换语言更改需要重新登录才生效!"
+            "tips6": "切换语言更改需要重新登录才生效!",
+            "tips7": "尊敬的用户:您好,请于周六04:00点前补足预订单全额货款以便发货,否则本平台将按照协议取消预订单。"
         },
         "register": {
             "title": "用户注册",

+ 2 - 1
public/locales/zh-TW.json

@@ -1369,7 +1369,8 @@
             "tips3": "登錄失敗:",
             "tips4": "下線通知",
             "tips5": "賬號已登出",
-            "tips6": "切換語言更改需要重新登錄才生效!"
+            "tips6": "切換語言更改需要重新登錄才生效!",
+            "tips7": "尊敬的用戶:您好,請於週六04:00點前補足預訂單全額貨款以便發貨,否則本平臺將按照協議取消預訂單。"
         },
         "register": {
             "title": "用戶註冊",

+ 58 - 1
src/packages/mobile/components/layouts/login/index.vue

@@ -1,6 +1,7 @@
 <template>
   <app-statusbar class="login">
     <app-navback class="login-navback" />
+   
     <div class="login-logo">
       <slot name="logo">
         <img :src="logoSrc" />
@@ -17,6 +18,9 @@
             <SliderVerify @statu="slide" style="max-width: 100%;margin: auto;" v-if="showSliderVerify" />
           </template>
         </Field>
+        <div style="margin: 10px 16px;">
+        <app-select v-model="luanguage" :options="dataList.filter(e => e.isvalid === 1)" :optionProps="{ label: 'langname', value: 'langcode' }" @confirm="changeLuanguage"/>
+      </div>
       </CellGroup>
       <div class="button-submit">
         <Button type="primary" native-type="submit" round block>{{ $t('user.login.login') }}</Button>
@@ -43,15 +47,24 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
+import { shallowRef, computed } from 'vue'
 import { Button, Field, CellGroup, Form, Checkbox, showFailToast, showToast } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import { useNavigation } from '@mobile/router/navigation'
 import { useGlobalStore, i18n } from '@/stores'
+import { useRequest } from '@/hooks/request'
+import { getI18nConfigs } from '@/services/api/common'
+import { Locale } from 'vant'
+import { localData } from '@/stores/storage'
 import service from '@/services'
 import SliderVerify from '@/components/base/slider-verify/index.vue' // 临时调用,待优化
 import logoImage from '../../../assets/images/login-logo.png'
+import AppSelect from '@mobile/components/base/select/index.vue'
+import enUS from 'vant/es/locale/lang/en-US'
+import enCN from 'vant/es/locale/lang/zh-CN'
+import thTH from 'vant/es/locale/lang/th-TH'
+import zhTW from 'vant/es/locale/lang/zh-TW'
 
 defineProps({
   logoSrc: {
@@ -75,6 +88,46 @@ const sliderVerifyStatus = shallowRef(false) // 滑块验证状态
 const meta = document.getElementsByTagName('meta')
 const appVersion = meta.namedItem('revised')?.content ?? '0'
 
+const { dataList, run } = useRequest(getI18nConfigs, {
+  manual: true
+})
+
+const luanguage = computed(() => {
+    switch (i18n.global.locale) {
+        case 'zh-CN':
+            return 'zh-CN'
+        case 'en-US':
+            return 'en'
+        case 'zh-TW':
+            return 'zh-TW'
+        default:
+            return 'th'
+    }
+})
+
+const changeLuanguage = (e: string) => {
+    switch (e) {
+        case 'zh-CN':
+            i18n.global.locale = 'zh-CN'
+            Locale.use(i18n.global.locale, enCN)
+            break;
+        case 'en':
+            i18n.global.locale = 'en-US'
+            Locale.use(i18n.global.locale, enUS)
+            break;
+        case 'zh-TW':
+            i18n.global.locale ='zh-TW'
+            Locale.use(i18n.global.locale, zhTW)
+            break;
+        default:
+            i18n.global.locale = 'th'
+            Locale.use(i18n.global.locale, thTH)
+            break;
+    }
+    /// 设置语言
+    localData.setValue('appLanguage', i18n.global.locale)
+}
+
 // 导航跳转
 const navigationTo = (name: string) => {
   fullloading((hideLoading) => {
@@ -126,6 +179,10 @@ const formSubmit = () => {
     }
   }
 }
+
+service.onReady().then(() => {
+  run()
+})
 </script>
 
 <style lang="less">

+ 10 - 1
src/packages/mobile/views/home/Index.vue

@@ -18,12 +18,13 @@ import { shallowRef, nextTick, watch, onMounted, onActivated, computed } from 'v
 import { Tabbar } from '@mobile/components/base/tabbar/types'
 import { useNavigation } from '@mobile/router/navigation'
 import { useMarketSection } from '@/business/market'
-import { useLoginStore, useFuturesStore } from '@/stores'
+import { useLoginStore, useFuturesStore, useGlobalStore } from '@/stores'
 import { i18n } from '@/stores'
 import { displayname } from "@/filters"
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import AppUpdater from '@mobile/components/base/updater/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
+import { dialog } from '@/utils/vant'
 
 const { global: { t } } = i18n
 
@@ -34,6 +35,7 @@ defineProps({
 const { route, routerTo } = useNavigation()
 const loginStore = useLoginStore()
 const futuresStore = useFuturesStore()
+const globalStore = useGlobalStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
 const currentTab = shallowRef(0)
 const marketSection = shallowRef() // 当前选中的板块
@@ -181,6 +183,13 @@ onActivated(() => {
   if (loginStore.token && futuresStore.goodsList.length) {
     futuresStore.getQuoteDay()
   }
+
+  // 是否需要弹出提示信息
+  const showLoginAlert = globalStore.getSystemInfo('showLoginAlert')
+  if (showLoginAlert) {
+    dialog(t('user.login.tips7'))
+  }
+  
 })
 </script>
   

+ 38 - 46
src/packages/mobile/views/pricing/trade/Index.vue

@@ -3,7 +3,7 @@
         <template #header>
             <app-navbar :title="quote ? `${quote.goodscode}/${quote.goodsname}` : $t('quote.pricing.title')" >
                 <template #right>
-                    <Icon name="bars" size="20px" @click="openComponent('detail')" />
+                    <Icon v-if="system_1012 != '0'" name="bars" size="20px" @click="openComponent('detail')" />
                 </template>
             </app-navbar>
         </template>
@@ -62,11 +62,11 @@
                     </template>
                 </Field> -->
                 <!-- 允许成交范围 -->
-                <Field name="MarketMaxSub" :rules="formRules.MarketMaxSub" :label="$t('quote.pricing.marketmaxsub')" v-if="formData.PriceMode === PriceMode.Market">
+                <!-- <Field name="MarketMaxSub" :rules="formRules.MarketMaxSub" :label="$t('quote.pricing.marketmaxsub')" v-if="formData.PriceMode === PriceMode.Market">
                     <template #input>
                         <Stepper v-model="formData.MarketMaxSub" :min="0" :max="999" theme="round" button-size="22" :auto-fixed="false" integer />
                     </template>
-                </Field>
+                </Field> -->
                 <!-- 限价 -->
                 <Field name="OrderPrice" :rules="formRules.OrderPrice" :label="$t('quote.pricing.price')" v-if="formData.PriceMode === PriceMode.Limit">
                     <template #input>
@@ -151,7 +151,7 @@
 </template>
 
 <script lang="ts" setup>
-import { useFuturesStore, usePositionStore, i18n } from '@/stores'
+import { useFuturesStore, usePositionStore, useUserStore, i18n } from '@/stores'
 import { useNavigation } from '@mobile/router/navigation'
 import { shallowRef, onMounted, computed, defineAsyncComponent } from 'vue'
 import { Form, Field, Button, FieldRule, FormInstance, Radio, RadioGroup, CellGroup, Icon, Tab, Tabs } from 'vant'
@@ -160,7 +160,7 @@ import { BuyOrSell, getBuyOrSellList, BuildType, getPricemode2List, PriceMode }
 import { useComponent } from '@/hooks/component'
 import { fullloading, dialog } from '@/utils/vant'
 import { formatDecimal, handleNumberValue, handleRequestBigNumber } from '@/filters'
-import service from '@/services'
+// import service from '@/services'
 import Stepper from '@mobile/components/base/stepper/index.vue'
 import eventBus from '@/services/bus'
 
@@ -180,17 +180,25 @@ const quoteminunit = quote.value?.quoteminunit ?? 1.0
 const decimalvalue = Math.pow(10.0, -decimalplace)*(quoteminunit == 0 ? 1 : quoteminunit)
 const isTrademode16 = computed(() => quote.value?.trademode === 16)
 
+const { getSystemParamValue } = useUserStore()
+const system_1012 = getSystemParamValue('1012') ?? '1'
+
+// const accountStore = useAccountStore()
+const positionStore = usePositionStore()
+
 const { formData, formSubmit } = useOrder()
 const formRef = shallowRef<FormInstance>()
-const qtyStepList = [1, 5, 10, 20, 30, 50] // 数量步长列表
-const qtyStep = shallowRef(qtyStepList[0]) // 数量步长
+// 数量步长列表
+const qtyStepList = computed(() => {
+    const system_1009 = Number(getSystemParamValue('1009')) ?? 1
+    return [1*system_1009, 5*system_1009, 10*system_1009, 20*system_1009, 30*system_1009, 50*system_1009]
+}) 
+const qtyStep = shallowRef(qtyStepList.value[0]) // 数量步长
 const fromTrade = true
 
-// const accountStore = useAccountStore()
-const positionStore = usePositionStore()
 // 持仓汇总
 const position = shallowRef<Model.TradePositionRsp[]>([]) 
-const oem = service.getConfig('oem')
+// const oem = service.getConfig('oem')
 
 // 点击返回
 const itemBack = (isPosition: number, buyorsell: BuyOrSell, tradeId: string) => {
@@ -202,42 +210,26 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
 
 const active = shallowRef('position')
 
-const components = oem === "TCE" ? 
-    [{
-        name: 'cancel',
-        title: t('quote.pricing.ordercancel'),
-        component: defineAsyncComponent(() => import('../trade/components/cancel/Index.vue')),
-    },
-    {
-        name: 'position',
-        title: t('quote.pricing.position'),
-        component: defineAsyncComponent(() => import('@mobile/views/order/position/components/pricing/list/Index.vue')),
-    },
-    {
-        name: 'holdlb2',
-        title: t('pcroute.bottom.bottom_pricing_detail2'),
-        component: defineAsyncComponent(() => import('../trade/holdlb2/Index.vue')),
-    }] : 
-    [{
-        name: 'cancel',
-        title: t('quote.pricing.ordercancel'),
-        component: defineAsyncComponent(() => import('../trade/components/cancel/Index.vue')),
-    },
-    {
-        name: 'position',
-        title: t('quote.pricing.position'),
-        component: defineAsyncComponent(() => import('@mobile/views/order/position/components/pricing/list/Index.vue')),
-    },
-    {
-        name: 'holdlb',
-        title: t('quote.pricing.holdlb'),
-        component: defineAsyncComponent(() => import('../trade/holdlb/Index.vue')),
-    },
-    {
-        name: 'holdlb2',
-        title: t('pcroute.bottom.bottom_pricing_detail2'),
-        component: defineAsyncComponent(() => import('../trade/holdlb2/Index.vue')),
-    }]
+const components = [{
+    name: 'cancel',
+    title: t('quote.pricing.ordercancel'),
+    component: defineAsyncComponent(() => import('../trade/components/cancel/Index.vue')),
+},
+{
+    name: 'position',
+    title: t('quote.pricing.position'),
+    component: defineAsyncComponent(() => import('@mobile/views/order/position/components/pricing/list/Index.vue')),
+},
+// {
+//     name: 'holdlb',
+//     title: t('quote.pricing.holdlb'),
+//     component: defineAsyncComponent(() => import('../trade/holdlb/Index.vue')),
+// },
+{
+    name: 'holdlb2',
+    title: t('pcroute.bottom.bottom_pricing_detail2'),
+    component: defineAsyncComponent(() => import('../trade/holdlb2/Index.vue')),
+}]
     
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('./components/detail/Index.vue'))],

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

@@ -46,6 +46,7 @@ import { localData } from '@/stores/storage'
 // import enUS from 'vant/es/locale/lang/en-US'
 import eventBus from '@/services/bus'
 import AppIcon from '@pc/components/base/icon/index.vue'
+import { ElMessage, ElMessageBox, FormInstance, FormRules } from 'element-plus'
 
 const componentMap = new Map<string, unknown>([
     ['notice', defineAsyncComponent(() => import('./components/notice/index.vue'))],
@@ -100,6 +101,18 @@ onMounted(() => {
             fullScreen.value = false;
         }
     })
+
+    // 是否需要弹出提示信息
+    const showLoginAlert = globalStore.getSystemInfo('showLoginAlert')
+    if (showLoginAlert) {
+        ElMessageBox.confirm(
+            t('user.login.tips7'),
+            t('common.tips'),
+            {
+                showCancelButton: false
+            }
+        )
+    }
 })
 </script>
 

+ 6 - 2
src/packages/pc/views/market/trade/pricing/index.vue

@@ -48,11 +48,12 @@
 import { shallowRef, onMounted, onUnmounted, defineAsyncComponent } from 'vue'
 import { useComponent } from '@/hooks/component'
 import { parsePercent, handleNumberValue, formatDecimal } from '@/filters'
-import { useFuturesStore, useGlobalStore } from '@/stores'
+import { useFuturesStore, useGlobalStore, useUserStore } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 
 const futuresStore = useFuturesStore()
 const globalStore = useGlobalStore()
+const { getSystemParamValue } = useUserStore()
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => true, false)
 
@@ -76,7 +77,10 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 
 const onRowClick = (row: Model.GoodsQuote) => {
     futuresStore.selectedGoodsId = row.goodsid
-    openComponent('detail')
+    const system_1012 = getSystemParamValue('1012') ?? '1'
+    if (system_1012 != '0') {
+        openComponent('detail')
+    }
 }
 
 onMounted(() => {

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

@@ -93,12 +93,18 @@ const accountStore = useAccountStore()
 const settingStore = useSettingStore()
 const futuresStore = useFuturesStore()
 
+const { getSystemParamValue } = useUserStore()
+
 const { selectedGoodsId, selectedGoods, marketGoodsList } = futuresStore.$toRefs()
 const { formData, formSubmit, loading } = useOrder()
 const positionStore = usePositionStore()
 const formRef = shallowRef<FormInstance>()
-const qtyStepList = [1, 10, 100] // 数量步长列表
-const qtyStep = shallowRef(qtyStepList[0]) // 数量步长
+// 数量步长列表
+const qtyStepList = computed(() => {
+    const system_1009 = Number(getSystemParamValue('1009')) ?? 1
+    return [1*system_1009, 10*system_1009, 100*system_1009]
+}) 
+const qtyStep = shallowRef(qtyStepList.value[0]) // 数量步长
 const { t } = i18n.global
 
 const { riskcontrolmode } = useUserStore().userData.markets.find(e => e.marketid === selectedGoods.value?.marketid) ?? {}

+ 2 - 0
src/stores/modules/global.ts

@@ -11,6 +11,7 @@ export interface SystemInfo {
     versionCode: string; // 应用版本号
     apiUrl: string; // 接口地址
     tradeChannel: 'http' | 'ws'; // 交易通道
+    showLoginAlert: false, // 登录是否显示弹窗
     modules: ('register' | 'delivery')[]; // 应用包含的模块
     quotationPropertys: (keyof Model.QuoteDayRsp)[]; // 盘面可显示的属性
     forcedPasswordChange: boolean; // 首次登录是否强制修改密码
@@ -35,6 +36,7 @@ export const useGlobalStore = defineStore(() => {
             versionCode: '100000',
             apiUrl: 'http://localhost',
             tradeChannel: 'ws',
+            showLoginAlert: false,
             modules: [],
             quotationPropertys: [],
             forcedPasswordChange: false,