Merge branch 'Branch_1' of https://git.u8t.cn/tangxinyue/alipay-emulator into Branch_1

This commit is contained in:
小李 2026-05-30 17:32:13 +08:00
commit 73b2b3cf25
10 changed files with 90 additions and 25 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

@ -1,5 +1,6 @@
<template>
<view class="list-card-container" v-if="item" @click="toDetail(item.id)" @longpress="onLongPress">
<view class="list-card-container" v-if="item" @click="handleCardClick(item.id)" @touchstart="handleTouchStart"
@touchmove="handleTouchMove" @touchend="handleTouchEnd" @touchcancel="handleTouchEnd">
<!-- 头部店铺信息和状态 -->
<view class="header-box flex-between flex-align-center">
<view class="shop-info flex-align-center">
@ -121,8 +122,45 @@ const props = defineProps({
const emit = defineEmits(['longpress']);
const onLongPress = (e) => {
emit('longpress', e);
let longPressTimer = null;
let isLongPressTriggered = false;
let startX = 0;
let startY = 0;
const handleTouchStart = (e) => {
isLongPressTriggered = false;
const touch = e.touches[0] || e.changedTouches[0];
if (touch) {
startX = touch.clientX;
startY = touch.clientY;
}
longPressTimer = setTimeout(() => {
isLongPressTriggered = true;
uni.vibrateShort();
emit('longpress', e);
}, 1200); // 1200ms
};
const handleTouchMove = (e) => {
if (longPressTimer) {
const touch = e.touches[0] || e.changedTouches[0];
if (touch) {
const moveX = touch.clientX;
const moveY = touch.clientY;
// 15px
if (Math.abs(moveX - startX) > 15 || Math.abs(moveY - startY) > 15) {
clearTimeout(longPressTimer);
longPressTimer = null;
}
}
}
};
const handleTouchEnd = () => {
if (longPressTimer) {
clearTimeout(longPressTimer);
longPressTimer = null;
}
};
const toDetail = (id) => {
@ -130,6 +168,11 @@ const toDetail = (id) => {
url: `/pages/shopping/pdd/order-detail/order-detail?id=${id}`
});
};
const handleCardClick = (id) => {
if (isLongPressTriggered) return;
toDetail(id);
};
</script>
<style lang="less" scoped>
@ -200,18 +243,19 @@ const toDetail = (id) => {
font-size: 28rpx;
color: #1A1A1A;
line-height: 24rpx;
margin-right: 8rpx;
// margin-right: 8rpx;
}
.brand-img {
width: 94rpx;
height: 28rpx;
margin-right: 10rpx;
margin-left: 8rpx;
}
.flag-img {
width: 74rpx;
height: 28rpx;
margin-left: 8rpx;
}
.status-text {

View File

@ -424,7 +424,12 @@
"name": "五粮液"
}
],
"avatars": [],
"avatars": [
"/static/image/shopping/pdd/avatars/avatars4.jpg",
"/static/image/shopping/pdd/avatars/avatars1.jpg",
"/static/image/shopping/pdd/avatars/avatars3.jpg",
"/static/image/shopping/pdd/avatars/avatars2.jpg"
],
"address": {
"name": "张三",
"phone": "13888888888",
@ -511,7 +516,12 @@
"name": "Sony"
}
],
"avatars": [],
"avatars": [
"/static/image/shopping/pdd/avatars/avatars4.jpg",
"/static/image/shopping/pdd/avatars/avatars1.jpg",
"/static/image/shopping/pdd/avatars/avatars2.jpg",
"/static/image/shopping/pdd/avatars/avatars3.jpg"
],
"address": {
"name": "张三",
"phone": "13888888888",
@ -598,7 +608,11 @@
"name": "Apple iPhone 17 Pro"
}
],
"avatars": [],
"avatars": [
"/static/image/shopping/pdd/avatars/avatars1.jpg",
"/static/image/shopping/pdd/avatars/avatars2.jpg",
"/static/image/shopping/pdd/avatars/avatars4.jpg"
],
"activePayIndex": 2,
"address": {
"name": "张三",

View File

@ -459,6 +459,13 @@ onShow(() => {
if (cachedTab2) {
tab2List.value = cachedTab2;
}
// #ifdef APP-PLUS
util.setAndroidSystemBarColor('#FFFFFF')
setTimeout(() => {
plus.navigator.setStatusBarStyle("dark");
}, 500);
// #endif
});
//

View File

@ -89,7 +89,7 @@
</image>
<image v-if="order.shop.hasFlagship" class="flagship-tag"
src="/static/image/shopping/pdd/qijiandian.png" mode="heightFix"></image>
<image v-if="order.shop.has618" style="margin-left: 12rpx;height: 28rpx;" class="flagship-tag"
<image v-if="order.shop.has618" style="margin-left: 8rpx;height: 28rpx;" class="flagship-tag"
src="/static/image/shopping/pdd/618.png" mode="heightFix"></image>
</view>
@ -177,7 +177,7 @@
<text class="value">{{ item.value }}</text>
<view class="avatars flex-align-center" v-if="item.hasAvatars && order.avatars">
<image class="avatar" v-for="(avatar, aIdx) in order.avatars" :key="aIdx" :src="avatar"
mode="aspectFill" :style="{ zIndex: 2 - aIdx, marginLeft: aIdx > 0 ? '-12rpx' : '0' }">
mode="aspectFill" :style="{ zIndex: 3 - aIdx, marginLeft: aIdx > 0 ? '-12rpx' : '0' }">
</image>
</view>
<uni-icons v-if="item.hasArrow" style="margin-top: 2rpx;" type="right" size="12"
@ -606,16 +606,16 @@ const selectPayMethod = (index) => {
font-size: 28rpx;
color: #1A1A1A;
line-height: 24rpx;
margin-right: 8rpx;
}
.brand-auth-tag {
height: 28rpx;
margin-right: 10rpx;
margin-left: 8rpx;
}
.flagship-tag {
height: 28rpx;
margin-left: 8rpx;
}
}
@ -934,7 +934,7 @@ const selectPayMethod = (index) => {
padding: 0 24rpx;
padding-top: 20rpx;
width: 100%;
height: 80rpx;
height: 84rpx;
justify-content: flex-end;
.more {

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) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB