优化pdd商品价格可输入小数点

This commit is contained in:
tangxinyue 2026-05-30 15:11:45 +08:00
parent 033a3bd9ba
commit 85996e19b1
2 changed files with 12 additions and 12 deletions

View File

@ -177,7 +177,7 @@
type="textarea" show-edit />
</view>
<view class="price-box flex-column align-end">
<text class="price">¥<auto-width-input v-model="product.price" type="number"
<text class="price">¥<auto-width-input v-model="product.price" type="digit"
show-edit /></text>
<text class="count">x<auto-width-input v-model="product.count" type="number"
show-edit /></text>
@ -209,7 +209,7 @@
<view style="flex: 1;"></view>
<text class="label">{{ order.orderType === 'wait_pay' ? '应付: ' : '实付: ' }} </text>
<text class="symbol">¥</text>
<auto-width-input class="amount" v-model="order.payment.totalAmount" type="number" color="#DF2E26"
<auto-width-input class="amount" v-model="order.payment.totalAmount" type="digit" color="#DF2E26"
show-edit />
<auto-width-input class="freight" v-model="order.payment.freightDesc" show-edit />
@ -281,7 +281,7 @@
<view class="flex-align-end">
<text class="label">应付: </text>
<text class="symbol"></text>
<auto-width-input class="amount" v-model="order.payment.totalAmount" type="number" show-edit />
<auto-width-input class="amount" v-model="order.payment.totalAmount" type="digit" show-edit />
<text class="discount"><auto-width-input class="discount" color="#E02E24" fontSize="26rpx" show-edit
v-model="order.payment.discountText" type="text" /></text>

View File

@ -227,18 +227,18 @@ onShow(() => {
}, 500);
// #endif
//
let storageData = uni.getStorageSync('taobaoShopping');
//
if (!storageData || (Array.isArray(storageData) && storageData.length === 0)) {
console.log('检测到淘宝订单缓存为空,注入初始默认数据');
storageData = JSON.parse(JSON.stringify(defualtData));
const isInitialized = uni.getStorageSync('isTaobaoShoppingInitialized');
if (!isInitialized) {
console.log('首次进入页面,注入初始默认数据');
const storageData = JSON.parse(JSON.stringify(defualtData));
uni.setStorageSync('taobaoShopping', storageData);
uni.setStorageSync('isTaobaoShoppingInitialized', true);
mockList.value = storageData;
} else {
let storageData = uni.getStorageSync('taobaoShopping');
mockList.value = storageData || [];
}
mockList.value = storageData || [];
// ()
let savedScreenshot = uni.getStorageSync('taobao_screenshot');
if (!savedScreenshot) {