diff --git a/api/customerServicePlatform/customerServicePlatform.js b/api/customerServicePlatform/customerServicePlatform.js index 0345ab0..042baf1 100644 --- a/api/customerServicePlatform/customerServicePlatform.js +++ b/api/customerServicePlatform/customerServicePlatform.js @@ -9,9 +9,24 @@ export const uploadImageApi = (data) => { data }) } - -//问题回答 -export const getAnswerApi = (data) => { +//问题回答最终内容 +export const getAnswerContentApi = (data) => { + return http({ + method: 'POST', + url: '/api/customer/getAnswer', + data + }) +} +//问题回答轮询 +export const getAnswerStatusApi = (data) => { + return http({ + method: 'POST', + url: '/api/customer/getState', + data + }) +} +//问题回答获取Id +export const getAnswerIdApi = (data) => { return http({ method: 'POST', url: '/api/customer/askQuestion', diff --git a/components/IndexCard.vue b/components/IndexCard.vue index 8bd62df..ac5447a 100644 --- a/components/IndexCard.vue +++ b/components/IndexCard.vue @@ -63,7 +63,18 @@ const props = defineProps({ }); const judgeSymbol = (num) => { - return num[0] === "-" ? num : "+" + num; + // 兼容 undefined/null/数字/字符串 + if (num === null || num === undefined) return ''; + const n = Number(num); + if (!isNaN(n)) { + // 数值:正数加'+',负数原样 + return (n < 0 ? '' : '+') + n; + } + // 字符串:去空格后判断前缀 + const s = String(num).trim(); + if (s.startsWith('-')) return s; + if (s.startsWith('+')) return s; + return '+' + s; }; const getMarketFlag = (market) => { diff --git a/components/login-prompt.vue b/components/login-prompt.vue index a7d0783..088ec4b 100644 --- a/components/login-prompt.vue +++ b/components/login-prompt.vue @@ -109,6 +109,7 @@ const continueAsVisitor = async () => { const res = await LoginApi({ loginType: "VISITOR", //登录方式EMAIL,PHONE,DCCODE,APPLE,GOOGLE,VISITOR account: "", //登陆账号 手机号/邮箱/dccode + phoneCountry: "", //手机号所属地区 verifyCode: "", //验证码 password: "", //密码 useCode: "", //是否使用验证码 true/false diff --git a/pages/customerServicePlatform/questionDetail.vue b/pages/customerServicePlatform/questionDetail.vue index 2bbba38..4a19766 100644 --- a/pages/customerServicePlatform/questionDetail.vue +++ b/pages/customerServicePlatform/questionDetail.vue @@ -14,7 +14,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -66,7 +66,9 @@ diff --git a/pages/marketSituation/marketCondition.vue b/pages/marketSituation/marketCondition.vue index 66f66e6..0708109 100644 --- a/pages/marketSituation/marketCondition.vue +++ b/pages/marketSituation/marketCondition.vue @@ -660,6 +660,8 @@ const toLeftPage = () => { nextStockInformation = marketSituationStore.marketDetailCardData[currentStockIndex.value]; } else if (currentStockFrom.value == "globalIndex") { nextStockInformation = marketSituationStore.gloablCardData[currentStockParentIndex.value].list[currentStockIndex.value]; + } else if (currentStockFrom.value == "countryMarket") { + nextStockInformation = marketSituationStore.countryMarketCardData[currentStockIndex.value]; } else { uni.showToast({ title: "没有更多股票了", @@ -713,6 +715,19 @@ const toRightPage = () => { nextStockInformation = marketSituationStore.gloablCardData[currentStockParentIndex.value].list[currentStockIndex.value]; updateStockInformation(nextStockInformation); } + } else if (currentStockFrom.value == "countryMarket") { + if (currentStockIndex.value == marketSituationStore.countryMarketCardData.length) { + uni.showToast({ + title: "没有更多股票了", + icon: "none", + duration: 1000, + }); + return; + } else { + currentStockIndex.value++; + nextStockInformation = marketSituationStore.countryMarketCardData[currentStockIndex.value]; + updateStockInformation(nextStockInformation); + } } else { uni.showToast({ title: "没有更多股票了", diff --git a/pages/marketSituation/marketOverview.vue b/pages/marketSituation/marketOverview.vue index 007cceb..b0e071d 100644 --- a/pages/marketSituation/marketOverview.vue +++ b/pages/marketSituation/marketOverview.vue @@ -8,16 +8,16 @@ 道琼斯{{ judgeSymbol(INDU.value) }}道琼斯{{ judgeSymbol(INDU.value) }} 纳斯达克{{ judgeSymbol(NDX.value) }}纳斯达克{{ judgeSymbol(NDX.value) }} 恒生指数{{ judgeSymbol(HSI.value) }}恒生指数{{ judgeSymbol(HSI.value) }} 上证指数{{ judgeSymbol(CN.value) }}上证指数{{ judgeSymbol(CN.value) }} @@ -83,6 +83,12 @@ const CN = ref({ stockName: "上证指数", stockCode: "1A0001", value: "" }); const pageIndex = ref(0); const scrollToView = ref(""); +const viewDetail = (item) => { + uni.navigateTo({ + url: `/pages/marketSituation/marketCondition?stockInformation=${encodeURIComponent(JSON.stringify(item))}&from=map`, + }); +}; + // 计算属性:精准计算content区域的top值 const contentTopPosition = computed(() => { const statusBarHeight = iSMT.value || 0; @@ -800,8 +806,8 @@ watch(headerHeight, (newHeight) => { .NDX { position: absolute; - top: 30%; - left: 17%; + top: 23vh; + left: 17vw; transform: translate(-50%, -50%); font-size: 11rpx; color: #000000; @@ -815,8 +821,8 @@ watch(headerHeight, (newHeight) => { } .INDU { position: absolute; - top: 22%; - left: 35%; + top: 15vh; + left: 35vw; transform: translate(-50%, -50%); font-size: 11rpx; color: #000000; @@ -830,8 +836,8 @@ watch(headerHeight, (newHeight) => { } .HSI { position: absolute; - top: 30%; - right: 4%; + top: 23vh; + right: 4vw; transform: translate(-50%, -50%); font-size: 11rpx; color: #000000; @@ -845,8 +851,8 @@ watch(headerHeight, (newHeight) => { } .CN { position: absolute; - top: 23%; - right: 8%; + top: 16vh; + right: 8vw; transform: translate(-50%, -50%); font-size: 11rpx; color: #000000; diff --git a/pages/marketSituation/marketSituation.vue b/pages/marketSituation/marketSituation.vue index bec52f2..c531253 100644 --- a/pages/marketSituation/marketSituation.vue +++ b/pages/marketSituation/marketSituation.vue @@ -177,11 +177,10 @@ const selected = () => { // 历史记录点击事件 const history = () => { - uni.showToast({ - title: "历史记录", - icon: "none", - }); - // 这里可以跳转到历史页面 + // 跳转到自定义股票列表页面 + uni.navigateTo({ + url: '/pages/customStockList/customStockList' + }) }; // Tab 栏点击事件 diff --git a/pages/start/Registration/Registration.vue b/pages/start/Registration/Registration.vue index 994a2c3..fe1a22f 100644 --- a/pages/start/Registration/Registration.vue +++ b/pages/start/Registration/Registration.vue @@ -189,7 +189,7 @@