|
@@ -109,7 +109,7 @@ const _sfc_main = {
|
|
|
const kw = (keyword.value || "").trim();
|
|
const kw = (keyword.value || "").trim();
|
|
|
if (!kw) {
|
|
if (!kw) {
|
|
|
common_vendor.index.showToast({
|
|
common_vendor.index.showToast({
|
|
|
- title: "请输入股票代码或名称",
|
|
|
|
|
|
|
+ title: "请输入市场代码或名称",
|
|
|
icon: "none"
|
|
icon: "none"
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
@@ -172,10 +172,9 @@ const _sfc_main = {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
- const onInputBlur = () => {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- showDropdown.value = false;
|
|
|
|
|
- }, 300);
|
|
|
|
|
|
|
+ const closeDropdown = () => {
|
|
|
|
|
+ showDropdown.value = false;
|
|
|
|
|
+ suggestions.value = [];
|
|
|
};
|
|
};
|
|
|
const getPriceClass = (changePercent) => {
|
|
const getPriceClass = (changePercent) => {
|
|
|
if (!changePercent)
|
|
if (!changePercent)
|
|
@@ -225,7 +224,7 @@ const _sfc_main = {
|
|
|
return common_vendor.e({
|
|
return common_vendor.e({
|
|
|
a: common_vendor.o([($event) => keyword.value = $event.detail.value, onKeywordChange]),
|
|
a: common_vendor.o([($event) => keyword.value = $event.detail.value, onKeywordChange]),
|
|
|
b: common_vendor.o(handleSearchClick),
|
|
b: common_vendor.o(handleSearchClick),
|
|
|
- c: common_vendor.o(onInputBlur),
|
|
|
|
|
|
|
+ c: common_vendor.o(($event) => showDropdown.value = true),
|
|
|
d: keyword.value,
|
|
d: keyword.value,
|
|
|
e: common_vendor.o(handleSearchClick),
|
|
e: common_vendor.o(handleSearchClick),
|
|
|
f: showDropdown.value && suggestions.value && suggestions.value.length > 0
|
|
f: showDropdown.value && suggestions.value && suggestions.value.length > 0
|
|
@@ -240,93 +239,97 @@ const _sfc_main = {
|
|
|
})
|
|
})
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
h: common_vendor.t(isLoggedIn.value ? "" : "(需登录)"),
|
|
h: common_vendor.t(isLoggedIn.value ? "" : "(需登录)"),
|
|
|
- i: hasSearched.value
|
|
|
|
|
|
|
+ i: showDropdown.value && suggestions.value.length > 0
|
|
|
|
|
+ }, showDropdown.value && suggestions.value.length > 0 ? {
|
|
|
|
|
+ j: common_vendor.o(closeDropdown)
|
|
|
|
|
+ } : {}, {
|
|
|
|
|
+ k: hasSearched.value
|
|
|
}, hasSearched.value ? common_vendor.e({
|
|
}, hasSearched.value ? common_vendor.e({
|
|
|
- j: loading.value
|
|
|
|
|
|
|
+ l: loading.value
|
|
|
}, loading.value ? {} : errorMsg.value ? {
|
|
}, loading.value ? {} : errorMsg.value ? {
|
|
|
- l: common_vendor.t(errorMsg.value)
|
|
|
|
|
|
|
+ n: common_vendor.t(errorMsg.value)
|
|
|
} : result.value ? common_vendor.e({
|
|
} : result.value ? common_vendor.e({
|
|
|
- n: common_vendor.t(result.value.stockName),
|
|
|
|
|
- o: common_vendor.t(result.value.stockCode),
|
|
|
|
|
- p: common_vendor.t(result.value.currentPrice || "--"),
|
|
|
|
|
- q: common_vendor.n(getPriceClass(result.value.changePercent)),
|
|
|
|
|
- r: common_vendor.t(result.value.priceChange || "--"),
|
|
|
|
|
- s: common_vendor.t(result.value.changePercent || "--"),
|
|
|
|
|
- t: common_vendor.n(getPriceClass(result.value.changePercent)),
|
|
|
|
|
- v: result.value.currentPrice
|
|
|
|
|
|
|
+ p: common_vendor.t(result.value.stockName),
|
|
|
|
|
+ q: common_vendor.t(result.value.stockCode),
|
|
|
|
|
+ r: common_vendor.t(result.value.currentPrice || "--"),
|
|
|
|
|
+ s: common_vendor.n(getPriceClass(result.value.changePercent)),
|
|
|
|
|
+ t: common_vendor.t(result.value.priceChange || "--"),
|
|
|
|
|
+ v: common_vendor.t(result.value.changePercent || "--"),
|
|
|
|
|
+ w: common_vendor.n(getPriceClass(result.value.changePercent)),
|
|
|
|
|
+ x: result.value.currentPrice
|
|
|
}, result.value.currentPrice ? {
|
|
}, result.value.currentPrice ? {
|
|
|
- w: common_vendor.t(result.value.openPrice || "--"),
|
|
|
|
|
- x: common_vendor.t(result.value.highPrice || "--"),
|
|
|
|
|
- y: common_vendor.t(result.value.lowPrice || "--"),
|
|
|
|
|
- z: common_vendor.t(result.value.volume || "--"),
|
|
|
|
|
- A: common_vendor.t(result.value.amount || "--"),
|
|
|
|
|
- B: common_vendor.t(result.value.turnoverRate || "--")
|
|
|
|
|
|
|
+ y: common_vendor.t(result.value.openPrice || "--"),
|
|
|
|
|
+ z: common_vendor.t(result.value.highPrice || "--"),
|
|
|
|
|
+ A: common_vendor.t(result.value.lowPrice || "--"),
|
|
|
|
|
+ B: common_vendor.t(result.value.volume || "--"),
|
|
|
|
|
+ C: common_vendor.t(result.value.amount || "--"),
|
|
|
|
|
+ D: common_vendor.t(result.value.turnoverRate || "--")
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- C: result.value.score
|
|
|
|
|
|
|
+ E: result.value.score
|
|
|
}, result.value.score ? {
|
|
}, result.value.score ? {
|
|
|
- D: common_vendor.t(result.value.score)
|
|
|
|
|
|
|
+ F: common_vendor.t(result.value.score)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- E: hasSearched.value && result.value
|
|
|
|
|
|
|
+ G: hasSearched.value && result.value
|
|
|
}, hasSearched.value && result.value ? common_vendor.e({
|
|
}, hasSearched.value && result.value ? common_vendor.e({
|
|
|
- F: common_vendor.o(onDateChange),
|
|
|
|
|
- G: historyData.value && historyData.value.recordDate
|
|
|
|
|
|
|
+ H: common_vendor.o(onDateChange),
|
|
|
|
|
+ I: historyData.value && historyData.value.recordDate
|
|
|
}, historyData.value && historyData.value.recordDate ? {
|
|
}, historyData.value && historyData.value.recordDate ? {
|
|
|
- H: common_vendor.t(historyData.value.recordDate)
|
|
|
|
|
|
|
+ J: common_vendor.t(historyData.value.recordDate)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- I: !historyData.value || !historyData.value.strengthScore && !historyData.value.highTrend
|
|
|
|
|
|
|
+ K: !historyData.value || !historyData.value.strengthScore && !historyData.value.highTrend
|
|
|
}, !historyData.value || !historyData.value.strengthScore && !historyData.value.highTrend ? {
|
|
}, !historyData.value || !historyData.value.strengthScore && !historyData.value.highTrend ? {
|
|
|
- J: common_vendor.t(selectedDate.value ? "未找到该日期的历史数据" : "暂无历史数据")
|
|
|
|
|
|
|
+ L: common_vendor.t(selectedDate.value ? "未找到该日期的历史数据" : "暂无历史数据")
|
|
|
} : common_vendor.e({
|
|
} : common_vendor.e({
|
|
|
- K: historyData.value.strengthScore !== null && historyData.value.strengthScore !== void 0
|
|
|
|
|
|
|
+ M: historyData.value.strengthScore !== null && historyData.value.strengthScore !== void 0
|
|
|
}, historyData.value.strengthScore !== null && historyData.value.strengthScore !== void 0 ? {
|
|
}, historyData.value.strengthScore !== null && historyData.value.strengthScore !== void 0 ? {
|
|
|
- L: common_vendor.t(formatStrengthScore(historyData.value.strengthScore)),
|
|
|
|
|
- M: common_vendor.n(historyData.value.strengthScore >= 0 ? "capsule-up" : "capsule-down")
|
|
|
|
|
|
|
+ N: common_vendor.t(formatStrengthScore(historyData.value.strengthScore)),
|
|
|
|
|
+ O: common_vendor.n(historyData.value.strengthScore >= 0 ? "capsule-up" : "capsule-down")
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- N: historyData.value.closePrice
|
|
|
|
|
|
|
+ P: historyData.value.closePrice
|
|
|
}, historyData.value.closePrice ? {
|
|
}, historyData.value.closePrice ? {
|
|
|
- O: common_vendor.t(historyData.value.closePrice)
|
|
|
|
|
|
|
+ Q: common_vendor.t(historyData.value.closePrice)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- P: historyData.value.changePercent
|
|
|
|
|
|
|
+ R: historyData.value.changePercent
|
|
|
}, historyData.value.changePercent ? {
|
|
}, historyData.value.changePercent ? {
|
|
|
- Q: common_vendor.t(formatPercent(historyData.value.changePercent)),
|
|
|
|
|
- R: common_vendor.n(getChangeClass(historyData.value.changePercent))
|
|
|
|
|
|
|
+ S: common_vendor.t(formatPercent(historyData.value.changePercent)),
|
|
|
|
|
+ T: common_vendor.n(getChangeClass(historyData.value.changePercent))
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- S: historyData.value.totalAmount
|
|
|
|
|
|
|
+ U: historyData.value.totalAmount
|
|
|
}, historyData.value.totalAmount ? {
|
|
}, historyData.value.totalAmount ? {
|
|
|
- T: common_vendor.t(formatAmount(historyData.value.totalAmount))
|
|
|
|
|
|
|
+ V: common_vendor.t(formatAmount(historyData.value.totalAmount))
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- U: historyData.value.circulationMarketValue
|
|
|
|
|
|
|
+ W: historyData.value.circulationMarketValue
|
|
|
}, historyData.value.circulationMarketValue ? {
|
|
}, historyData.value.circulationMarketValue ? {
|
|
|
- V: common_vendor.t(formatAmount(historyData.value.circulationMarketValue))
|
|
|
|
|
|
|
+ X: common_vendor.t(formatAmount(historyData.value.circulationMarketValue))
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- W: historyData.value.mainRisePeriod
|
|
|
|
|
|
|
+ Y: historyData.value.mainRisePeriod
|
|
|
}, historyData.value.mainRisePeriod ? {
|
|
}, historyData.value.mainRisePeriod ? {
|
|
|
- X: common_vendor.t(historyData.value.mainRisePeriod)
|
|
|
|
|
|
|
+ Z: common_vendor.t(historyData.value.mainRisePeriod)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- Y: historyData.value.recentLimitUp
|
|
|
|
|
|
|
+ aa: historyData.value.recentLimitUp
|
|
|
}, historyData.value.recentLimitUp ? {
|
|
}, historyData.value.recentLimitUp ? {
|
|
|
- Z: common_vendor.t(historyData.value.recentLimitUp)
|
|
|
|
|
|
|
+ ab: common_vendor.t(historyData.value.recentLimitUp)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- aa: historyData.value.dayHighestPrice
|
|
|
|
|
|
|
+ ac: historyData.value.dayHighestPrice
|
|
|
}, historyData.value.dayHighestPrice ? {
|
|
}, historyData.value.dayHighestPrice ? {
|
|
|
- ab: common_vendor.t(historyData.value.dayHighestPrice)
|
|
|
|
|
|
|
+ ad: common_vendor.t(historyData.value.dayHighestPrice)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- ac: historyData.value.dayLowestPrice
|
|
|
|
|
|
|
+ ae: historyData.value.dayLowestPrice
|
|
|
}, historyData.value.dayLowestPrice ? {
|
|
}, historyData.value.dayLowestPrice ? {
|
|
|
- ad: common_vendor.t(historyData.value.dayLowestPrice)
|
|
|
|
|
|
|
+ af: common_vendor.t(historyData.value.dayLowestPrice)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- ae: historyData.value.dayClosePrice
|
|
|
|
|
|
|
+ ag: historyData.value.dayClosePrice
|
|
|
}, historyData.value.dayClosePrice ? {
|
|
}, historyData.value.dayClosePrice ? {
|
|
|
- af: common_vendor.t(historyData.value.dayClosePrice)
|
|
|
|
|
|
|
+ ah: common_vendor.t(historyData.value.dayClosePrice)
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- ag: historyData.value.highTrend !== null && historyData.value.highTrend !== void 0
|
|
|
|
|
|
|
+ ai: historyData.value.highTrend !== null && historyData.value.highTrend !== void 0
|
|
|
}, historyData.value.highTrend !== null && historyData.value.highTrend !== void 0 ? {
|
|
}, historyData.value.highTrend !== null && historyData.value.highTrend !== void 0 ? {
|
|
|
- ah: common_vendor.t(formatPercent(historyData.value.highTrend)),
|
|
|
|
|
- ai: common_vendor.n(getChangeClass(historyData.value.highTrend))
|
|
|
|
|
|
|
+ aj: common_vendor.t(formatPercent(historyData.value.highTrend)),
|
|
|
|
|
+ ak: common_vendor.n(getChangeClass(historyData.value.highTrend))
|
|
|
} : {})) : {}, {
|
|
} : {})) : {}, {
|
|
|
- aj: result.value.history && result.value.history.length > 0
|
|
|
|
|
|
|
+ al: result.value.history && result.value.history.length > 0
|
|
|
}, result.value.history && result.value.history.length > 0 ? {
|
|
}, result.value.history && result.value.history.length > 0 ? {
|
|
|
- ak: common_vendor.f(result.value.history, (item, index, i0) => {
|
|
|
|
|
|
|
+ am: common_vendor.f(result.value.history, (item, index, i0) => {
|
|
|
return {
|
|
return {
|
|
|
a: common_vendor.t(item.date),
|
|
a: common_vendor.t(item.date),
|
|
|
b: common_vendor.t(item.score),
|
|
b: common_vendor.t(item.score),
|
|
@@ -335,9 +338,9 @@ const _sfc_main = {
|
|
|
};
|
|
};
|
|
|
})
|
|
})
|
|
|
} : {}, {
|
|
} : {}, {
|
|
|
- al: result.value.factors && result.value.factors.length > 0
|
|
|
|
|
|
|
+ an: result.value.factors && result.value.factors.length > 0
|
|
|
}, result.value.factors && result.value.factors.length > 0 ? {
|
|
}, result.value.factors && result.value.factors.length > 0 ? {
|
|
|
- am: common_vendor.f(result.value.factors, (item, index, i0) => {
|
|
|
|
|
|
|
+ ao: common_vendor.f(result.value.factors, (item, index, i0) => {
|
|
|
return {
|
|
return {
|
|
|
a: common_vendor.t(item.name),
|
|
a: common_vendor.t(item.name),
|
|
|
b: common_vendor.t(item.value),
|
|
b: common_vendor.t(item.value),
|
|
@@ -345,8 +348,8 @@ const _sfc_main = {
|
|
|
};
|
|
};
|
|
|
})
|
|
})
|
|
|
} : {}) : {}, {
|
|
} : {}) : {}, {
|
|
|
- k: errorMsg.value,
|
|
|
|
|
- m: result.value
|
|
|
|
|
|
|
+ m: errorMsg.value,
|
|
|
|
|
+ o: result.value
|
|
|
}) : {});
|
|
}) : {});
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|