fix: 修复可选链问题,确保交易对符号的安全访问
feat: 更新版本配置,调整最低支持版本为0.0.1
This commit is contained in:
@@ -28,21 +28,21 @@ const versionConfig: VersionConfig = {
|
|||||||
forceUpdate: false,
|
forceUpdate: false,
|
||||||
updateMessage: "修复了一些问题并优化了性能",
|
updateMessage: "修复了一些问题并优化了性能",
|
||||||
updateUrl: "https://apps.apple.com/app/id123456789",
|
updateUrl: "https://apps.apple.com/app/id123456789",
|
||||||
minSupportVersion: "0.9.0",
|
minSupportVersion: "0.0.1",
|
||||||
},
|
},
|
||||||
android: {
|
android: {
|
||||||
version: "0.0.1",
|
version: "0.0.1",
|
||||||
forceUpdate: false,
|
forceUpdate: false,
|
||||||
updateMessage: "修复了一些问题并优化了性能",
|
updateMessage: "修复了一些问题并优化了性能",
|
||||||
updateUrl: "https://play.google.com/store/apps/details?id=riwa.ionic.app",
|
updateUrl: "https://play.google.com/store/apps/details?id=riwa.ionic.app",
|
||||||
minSupportVersion: "0.9.0",
|
minSupportVersion: "0.0.1",
|
||||||
},
|
},
|
||||||
browser: {
|
browser: {
|
||||||
version: "0.0.1",
|
version: "0.0.1",
|
||||||
forceUpdate: false,
|
forceUpdate: false,
|
||||||
updateMessage: "修复了一些问题并优化了性能",
|
updateMessage: "修复了一些问题并优化了性能",
|
||||||
updateUrl: "",
|
updateUrl: "",
|
||||||
minSupportVersion: "0.9.0",
|
minSupportVersion: "0.0.1",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ const props = defineProps<{
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tradingViewInst = useTemplateRef<HTMLDivElement>("tradingViewInst");
|
const tradingViewInst = useTemplateRef<HTMLDivElement>("tradingViewInst");
|
||||||
const { data: tickerData } = safeClient(client.api.market_data.pairs.ticker.get({
|
const { data: tickerData } = safeClient(client.api.market_data.pairs.ticker.get({
|
||||||
query: { symbol: props.data?.asset?.tradingPairsAsBase?.[0].symbol || "" },
|
query: { symbol: props.data?.asset?.tradingPairsAsBase?.[0]?.symbol || "" },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
useTradingView(tradingViewInst, {
|
useTradingView(tradingViewInst, {
|
||||||
type: "Area",
|
type: "Area",
|
||||||
data: async () => {
|
data: async () => {
|
||||||
const { data } = safeClient(client.api.market_cap.history.get({
|
const { data } = safeClient(client.api.market_cap.history.get({
|
||||||
query: { symbol: props.data?.asset?.tradingPairsAsBase?.[0].symbol || "" },
|
query: { symbol: props.data?.asset?.tradingPairsAsBase?.[0]?.symbol || "" },
|
||||||
}));
|
}));
|
||||||
return data.value?.map(item => ({
|
return data.value?.map(item => ({
|
||||||
time: dayjs(item.ts).format("YYYY-MM-DD"),
|
time: dayjs(item.ts).format("YYYY-MM-DD"),
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const tradingviewOptions: Partial<ChartingLibraryWidgetOptions> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const tradingViewInst = useTemplateRef<TradingViewInst>("tradingViewInst");
|
const tradingViewInst = useTemplateRef<TradingViewInst>("tradingViewInst");
|
||||||
const symbol = computed(() => props.data?.asset?.tradingPairsAsBase?.[0].symbol || "");
|
const symbol = computed(() => props.data?.asset?.tradingPairsAsBase?.[0]?.symbol || "");
|
||||||
const { data } = await safeClient(client.api.trading_pairs.orderbook.get({ query: { symbol: symbol.value, depth: 30 } }));
|
const { data } = await safeClient(client.api.trading_pairs.orderbook.get({ query: { symbol: symbol.value, depth: 30 } }));
|
||||||
const { data: tickerData } = await safeClient(client.api.market_data.pairs.ticker.get({ query: { symbol: symbol.value } }));
|
const { data: tickerData } = await safeClient(client.api.market_data.pairs.ticker.get({ query: { symbol: symbol.value } }));
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const { t } = useI18n();
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
function gotoTrade(mode: TradeTypeEnum) {
|
function gotoTrade(mode: TradeTypeEnum) {
|
||||||
router.push(`/layout/trade?mode=${mode}&symbol=${data.value?.asset?.tradingPairsAsBase?.[0].symbol}`);
|
router.push(`/layout/trade?mode=${mode}&symbol=${data.value?.asset?.tradingPairsAsBase?.[0]?.symbol}`);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { confirmOrderSubmitSchema, TradeWayValueEnum } from "./config";
|
|||||||
|
|
||||||
const { data } = await safeClient(client.api.trading_pairs.get({ query: { limit: 1 } }));
|
const { data } = await safeClient(client.api.trading_pairs.get({ query: { limit: 1 } }));
|
||||||
const mode = useRouteQuery<TradeTypeEnum>("mode", TradeTypeEnum.BUY);
|
const mode = useRouteQuery<TradeTypeEnum>("mode", TradeTypeEnum.BUY);
|
||||||
const symbol = useRouteQuery<string>("symbol", data.value?.data?.[0].symbol);
|
const symbol = useRouteQuery<string>("symbol", data.value?.data?.[0]?.symbol);
|
||||||
const tradingviewOptions: Partial<ChartingLibraryWidgetOptions> = {
|
const tradingviewOptions: Partial<ChartingLibraryWidgetOptions> = {
|
||||||
disabled_features: [
|
disabled_features: [
|
||||||
"create_volume_indicator_by_default",
|
"create_volume_indicator_by_default",
|
||||||
|
|||||||
Reference in New Issue
Block a user