diff --git a/pages/config/config.vue b/pages/config/config.vue
index 20f0e4a..6164d3b 100755
--- a/pages/config/config.vue
+++ b/pages/config/config.vue
@@ -23,27 +23,8 @@
选择逻辑模板
-
-
-
-
-
- {{ selectedStrategy.name }}
-
- 点击选择逻辑规则
-
-
-
-
-
-
+
{{ selectedStrategy.name }}
@@ -52,34 +33,17 @@
-
{{ selectedStrategy.desc }}
组合币种
-
-
-
- {{ currencyList[currencyIndex].name }}
-
-
-
-
-
-
+
{{ currencyList[currencyIndex].name }}
-
创建后币种不可修改,所有交易只能使用该币种
@@ -210,14 +174,9 @@ const currencyList = ref([
]);
const currencyIndex = ref(0); // 默认CNY
-// Picker 控制变量
-const showStrategyPicker = ref(false);
-const showCurrencyPicker = ref(false);
-
// 小程序原生 picker 事件处理
const onStrategyChange = (e) => {
strategyIndex.value = e.detail.value;
- showStrategyPicker.value = false;
// 调用原有的策略变更逻辑
const strategy = strategies.value[strategyIndex.value];
@@ -235,7 +194,6 @@ const onStrategyChange = (e) => {
const onCurrencyChange = (e) => {
currencyIndex.value = e.detail.value;
- showCurrencyPicker.value = false;
};
// 防止重复请求的标志
@@ -346,32 +304,6 @@ const onDateChange = (e, index) => {
form.value.stocks[index].date = e.detail.value;
};
-// u-picker 确认方法
-const onStrategyPickerConfirm = (e) => {
- const { value, index } = e;
- strategyIndex.value = index[0];
- showStrategyPicker.value = false;
-
- // 调用原有的策略变更逻辑
- const strategy = strategies.value[strategyIndex.value];
- if (strategy && strategy.parameters && strategy.parameters.assets) {
- form.value.stocks = strategy.parameters.assets.map(asset => ({
- name: asset.symbol,
- price: '',
- amount: '',
- date: ''
- }));
- } else {
- form.value.stocks = [{ name: '', price: '', amount: '', date: '' }];
- }
-};
-
-const onCurrencyPickerConfirm = (e) => {
- const { value, index } = e;
- currencyIndex.value = index[0];
- showCurrencyPicker.value = false;
-};
-
const submitForm = async () => {
if (!form.value.name) {
proxy?.$refs.uToastRef?.show({
diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue
index 82852e6..150ac6a 100755
--- a/pages/detail/detail.vue
+++ b/pages/detail/detail.vue
@@ -249,32 +249,14 @@
{{ transactionType === 'sell' ? '选择持仓' : '股票代码' }}
-
-
-
-
-
-
-
-
数量{{ transactionType === 'sell' && maxSellAmount > 0 ? ` (最多可卖 ${maxSellAmount} 份)` : '' }}
-
价格
-
交易时间
-
-
-
- {{ transactionForm.transactionDate || '请选择日期' }}
-
-
-
-
-
{{ transactionForm.transactionDate || '请选择日期' }}
-
@@ -464,7 +429,6 @@ const searchResults = ref([]);
const searchTimer = ref(null);
const handleStockInputClick = () => {
- // #ifdef H5 || APP-PLUS
if (transactionType.value === 'sell') {
searchResults.value = positions.value.map(pos => ({
ticker: pos.stockCode,
@@ -480,14 +444,9 @@ const handleStockInputClick = () => {
};
const onStockInput = (e) => {
- // #ifdef H5 || APP-PLUS
const keyword = e.detail.value;
console.log('🔍 股票输入:', keyword);
searchStock(keyword);
- // #endif
- // #ifdef MP-WEIXIN
- // 小程序中不触发搜索,直接输入代码
- // #endif
};
const searchStock = async (keyword) => {
@@ -961,9 +920,28 @@ const deletePortfolio = async () => {
margin-bottom: 12rpx;
}
-/* .stock-input 已替换为 u-input,样式已通过 customStyle 设置 */
.stock-input {
- /* 样式已内联设置 */
+ width: 100%;
+ height: 80rpx;
+ background-color: #F9FAFB;
+ border: 2rpx solid #E5E7EB;
+ border-radius: 16rpx;
+ padding: 0 20rpx;
+ font-size: 28rpx;
+ color: #1F2937;
+ box-sizing: border-box;
+}
+
+.form-input {
+ width: 100%;
+ height: 80rpx;
+ background-color: #F9FAFB;
+ border: 2rpx solid #E5E7EB;
+ border-radius: 16rpx;
+ padding: 0 20rpx;
+ font-size: 28rpx;
+ color: #1F2937;
+ box-sizing: border-box;
}
.form-select {