Merge branch 'Branch_1' of https://git.u8t.cn/tangxinyue/alipay-emulator into Branch_1
This commit is contained in:
commit
73b2b3cf25
|
|
@ -177,7 +177,7 @@
|
||||||
type="textarea" show-edit />
|
type="textarea" show-edit />
|
||||||
</view>
|
</view>
|
||||||
<view class="price-box flex-column align-end">
|
<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>
|
show-edit /></text>
|
||||||
<text class="count">x<auto-width-input v-model="product.count" type="number"
|
<text class="count">x<auto-width-input v-model="product.count" type="number"
|
||||||
show-edit /></text>
|
show-edit /></text>
|
||||||
|
|
@ -209,7 +209,7 @@
|
||||||
<view style="flex: 1;"></view>
|
<view style="flex: 1;"></view>
|
||||||
<text class="label">{{ order.orderType === 'wait_pay' ? '应付: ' : '实付: ' }} </text>
|
<text class="label">{{ order.orderType === 'wait_pay' ? '应付: ' : '实付: ' }} </text>
|
||||||
<text class="symbol">¥</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 />
|
show-edit />
|
||||||
|
|
||||||
<auto-width-input class="freight" v-model="order.payment.freightDesc" show-edit />
|
<auto-width-input class="freight" v-model="order.payment.freightDesc" show-edit />
|
||||||
|
|
@ -281,7 +281,7 @@
|
||||||
<view class="flex-align-end">
|
<view class="flex-align-end">
|
||||||
<text class="label">应付: </text>
|
<text class="label">应付: </text>
|
||||||
<text class="symbol">¥</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
|
<text class="discount"><auto-width-input class="discount" color="#E02E24" fontSize="26rpx" show-edit
|
||||||
v-model="order.payment.discountText" type="text" /></text>
|
v-model="order.payment.discountText" type="text" /></text>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<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="header-box flex-between flex-align-center">
|
||||||
<view class="shop-info flex-align-center">
|
<view class="shop-info flex-align-center">
|
||||||
|
|
@ -121,8 +122,45 @@ const props = defineProps({
|
||||||
|
|
||||||
const emit = defineEmits(['longpress']);
|
const emit = defineEmits(['longpress']);
|
||||||
|
|
||||||
const onLongPress = (e) => {
|
let longPressTimer = null;
|
||||||
emit('longpress', e);
|
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) => {
|
const toDetail = (id) => {
|
||||||
|
|
@ -130,6 +168,11 @@ const toDetail = (id) => {
|
||||||
url: `/pages/shopping/pdd/order-detail/order-detail?id=${id}`
|
url: `/pages/shopping/pdd/order-detail/order-detail?id=${id}`
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleCardClick = (id) => {
|
||||||
|
if (isLongPressTriggered) return;
|
||||||
|
toDetail(id);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
@ -200,18 +243,19 @@ const toDetail = (id) => {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #1A1A1A;
|
color: #1A1A1A;
|
||||||
line-height: 24rpx;
|
line-height: 24rpx;
|
||||||
margin-right: 8rpx;
|
// margin-right: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-img {
|
.brand-img {
|
||||||
width: 94rpx;
|
width: 94rpx;
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
margin-right: 10rpx;
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flag-img {
|
.flag-img {
|
||||||
width: 74rpx;
|
width: 74rpx;
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-text {
|
.status-text {
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,12 @@
|
||||||
"name": "五粮液"
|
"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": {
|
"address": {
|
||||||
"name": "张三",
|
"name": "张三",
|
||||||
"phone": "13888888888",
|
"phone": "13888888888",
|
||||||
|
|
@ -511,7 +516,12 @@
|
||||||
"name": "Sony"
|
"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": {
|
"address": {
|
||||||
"name": "张三",
|
"name": "张三",
|
||||||
"phone": "13888888888",
|
"phone": "13888888888",
|
||||||
|
|
@ -598,7 +608,11 @@
|
||||||
"name": "Apple iPhone 17 Pro"
|
"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,
|
"activePayIndex": 2,
|
||||||
"address": {
|
"address": {
|
||||||
"name": "张三",
|
"name": "张三",
|
||||||
|
|
|
||||||
|
|
@ -459,6 +459,13 @@ onShow(() => {
|
||||||
if (cachedTab2) {
|
if (cachedTab2) {
|
||||||
tab2List.value = cachedTab2;
|
tab2List.value = cachedTab2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
util.setAndroidSystemBarColor('#FFFFFF')
|
||||||
|
setTimeout(() => {
|
||||||
|
plus.navigator.setStatusBarStyle("dark");
|
||||||
|
}, 500);
|
||||||
|
// #endif
|
||||||
});
|
});
|
||||||
|
|
||||||
// 长按替换截图相关
|
// 长按替换截图相关
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
</image>
|
</image>
|
||||||
<image v-if="order.shop.hasFlagship" class="flagship-tag"
|
<image v-if="order.shop.hasFlagship" class="flagship-tag"
|
||||||
src="/static/image/shopping/pdd/qijiandian.png" mode="heightFix"></image>
|
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>
|
src="/static/image/shopping/pdd/618.png" mode="heightFix"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -177,7 +177,7 @@
|
||||||
<text class="value">{{ item.value }}</text>
|
<text class="value">{{ item.value }}</text>
|
||||||
<view class="avatars flex-align-center" v-if="item.hasAvatars && order.avatars">
|
<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"
|
<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>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<uni-icons v-if="item.hasArrow" style="margin-top: 2rpx;" type="right" size="12"
|
<uni-icons v-if="item.hasArrow" style="margin-top: 2rpx;" type="right" size="12"
|
||||||
|
|
@ -606,16 +606,16 @@ const selectPayMethod = (index) => {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #1A1A1A;
|
color: #1A1A1A;
|
||||||
line-height: 24rpx;
|
line-height: 24rpx;
|
||||||
margin-right: 8rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-auth-tag {
|
.brand-auth-tag {
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
margin-right: 10rpx;
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flagship-tag {
|
.flagship-tag {
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -934,7 +934,7 @@ const selectPayMethod = (index) => {
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 84rpx;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
.more {
|
.more {
|
||||||
|
|
|
||||||
|
|
@ -227,18 +227,18 @@ onShow(() => {
|
||||||
}, 500);
|
}, 500);
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// 加载缓存数据
|
const isInitialized = uni.getStorageSync('isTaobaoShoppingInitialized');
|
||||||
let storageData = uni.getStorageSync('taobaoShopping');
|
if (!isInitialized) {
|
||||||
|
console.log('首次进入页面,注入初始默认数据');
|
||||||
// 如果缓存为空,则初始化默认数据
|
const storageData = JSON.parse(JSON.stringify(defualtData));
|
||||||
if (!storageData || (Array.isArray(storageData) && storageData.length === 0)) {
|
|
||||||
console.log('检测到淘宝订单缓存为空,注入初始默认数据');
|
|
||||||
storageData = JSON.parse(JSON.stringify(defualtData));
|
|
||||||
uni.setStorageSync('taobaoShopping', storageData);
|
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');
|
let savedScreenshot = uni.getStorageSync('taobao_screenshot');
|
||||||
if (!savedScreenshot) {
|
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 |
Loading…
Reference in New Issue