diff --git a/App.vue b/App.vue
index 52a8170..e4403f4 100644
--- a/App.vue
+++ b/App.vue
@@ -7,7 +7,7 @@ export default {
},
onLaunch: function (options) {
- console.log=()=>{}
+ // console.log=()=>{}
// === wgt 包启动诊断日志 ===
console.log('=== App Launch 开始 ===')
console.log('启动参数:', JSON.stringify(options))
diff --git a/components/common/auto-width-input.vue b/components/common/auto-width-input.vue
index 43d2ac5..a25414a 100644
--- a/components/common/auto-width-input.vue
+++ b/components/common/auto-width-input.vue
@@ -8,12 +8,15 @@
+ :style="[inputStyle, { width: finalInputWidth }]" @input="onInput" :maxlength="maxlength" :focus="isFocus" @blur="onBlur" />
+ :style="[inputStyle]" @input="onInput" :maxlength="maxlength" auto-height :focus="isFocus" @blur="onBlur" />
+
+
+
@@ -60,12 +63,28 @@ const props = defineProps({
extraWidth: {
type: Number,
default: 10 // 额外的缓冲像素,防止文字抖动
+ },
+ showEdit: {
+ type: Boolean,
+ default: false
}
});
const emit = defineEmits(['update:modelValue', 'change']);
const instance = getCurrentInstance();
const inputWidth = ref(props.minWidth);
+// 最终应用的宽度样式
+const finalInputWidth = computed(() => {
+ // 如果是 textarea 或者设置了填满父级,则不使用测量出的宽度
+ if (props.type === 'textarea') return '100%';
+ // 尝试检测 class 中是否包含撑开逻辑
+ const classStr = instance.proxy.$attrs.class || '';
+ if (classStr.includes('flex-1') || classStr.includes('w100')) {
+ return '100%';
+ }
+ return inputWidth.value;
+});
+const isFocus = ref(false);
const inputStyle = computed(() => ({
fontSize: props.fontSize,
@@ -74,11 +93,29 @@ const inputStyle = computed(() => ({
fontFamily: 'inherit'
}));
+/**
+ * 点击图标触发聚焦
+ */
+const handleFocusIcon = () => {
+ isFocus.value = false;
+ nextTick(() => {
+ isFocus.value = true;
+ });
+};
+
+/**
+ * 失去焦点处理
+ */
+const onBlur = () => {
+ isFocus.value = false;
+};
+
/**
* 核心逻辑:测量隐藏文本的物理宽度
*/
const updateWidth = () => {
if (props.type === 'textarea') return;
+ // 如果是强制撑开模式,理论上不需要测量,但为了防止切换状态时的布局闪烁,我们仍保持测量
nextTick(() => {
const query = uni.createSelectorQuery().in(instance.proxy);
query.select('.measure-text').boundingClientRect(data => {
@@ -114,11 +151,23 @@ onMounted(() => {
diff --git a/components/shopping/jingdong/shopping-card.vue b/components/shopping/jingdong/shopping-card.vue
index a353b5a..b9167aa 100644
--- a/components/shopping/jingdong/shopping-card.vue
+++ b/components/shopping/jingdong/shopping-card.vue
@@ -14,7 +14,7 @@
- {{ item.statusDesc }}
+ {{ formatStatusDesc(item.statusDesc) }}
{{
@@ -87,8 +87,7 @@
¥
- {{ item.price || (item.products && item.products[0] &&
- item.products[0].price) }}
+ {{ safeFormatPrice(item) }}
共{{
@@ -162,6 +161,21 @@ const onLongPress = (e) => {
emit('longpress', { event: e, item: props.item });
};
+const formatStatusDesc = (desc) => {
+ if (!desc || !desc.includes(' : ')) return desc;
+ const parts = desc.split(' : ');
+ if (parts.length >= 2) {
+ return `${parts[0]}时${parts[1]}分`;
+ }
+ return desc;
+};
+
+const safeFormatPrice = (item) => {
+ const val = item.price || (item.products && item.products[0] && item.products[0].price);
+ const num = Number(val);
+ return isNaN(num) ? '0.00' : num.toFixed(2);
+};
+
const getButtons = (shopType, status, item) => {
const buttons = [];
if (status == '等待付款') {
diff --git a/main.js b/main.js
index 299796a..8ad5efd 100644
--- a/main.js
+++ b/main.js
@@ -27,7 +27,7 @@ export function createApp() {
const systemInfo = uni.getStorageSync('systemInfo') || {}
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
app.config.globalProperties.$systemInfo = systemInfo
- uni.setStorageSync('version', '1.0.4.sp2')
+ uni.setStorageSync('version', '1.0.4.sp3')
app.config.globalProperties.$version = uni.getStorageSync('version')
app.use(globalMethods);
return {
diff --git a/pages/index/index.nvue b/pages/index/index.nvue
index d5fb984..77cb7ee 100644
--- a/pages/index/index.nvue
+++ b/pages/index/index.nvue
@@ -275,16 +275,16 @@ const otherList = [{
name: "通话",
path: "/pages/common/call-and-message-entry/call-and-message-entry?type=call"
},
-// {
-// icon: "/static/image/index/qita/gouwu.png",
-// name: "购物",
-// path: "/pages/shopping/index"
-// },
{
icon: "/static/image/index/qita/ranking.png",
name: "从夯倒拉排名",
path: "/pages/other/ranking/ranking"
},
+{
+ icon: "/static/image/index/qita/gouwu.png",
+ name: "购物",
+ path: "/pages/shopping/index"
+},
]
const data = reactive({
diff --git a/pages/shopping/jingdong/add-order/add-order.vue b/pages/shopping/jingdong/add-order/add-order.vue
index 281b92f..9acd08f 100644
--- a/pages/shopping/jingdong/add-order/add-order.vue
+++ b/pages/shopping/jingdong/add-order/add-order.vue
@@ -1,275 +1,553 @@
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
- 还剩
- {{ order.statusDesc }}
-
- 订单自动取消
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 修改
+
+
+
+
+ {{ item.label }}
-
-
-
-
-
-
-
-
+
+
+
+
+ 还剩
+ {{ order.statusDesc
+ }}
+
+ 订单自动取消
+
+
+
+
+
- 已下单
- 预计明天 09:00-15:00送达
-
-
-
- 快递运输 · 温馨提示:您的订单预计3月11日09:00- 15:53送达
-
-
- 华哈哈哈哈哈哈哈哈哈2栋 22-1
- 修改
-
- 肖战123****1234
-
-
-
-
-
-
-
-
-
-
-
-
+
- 取消/退款进度
+
+
+
+
+
+
-
-
-
- 您的订单已取消,请查看取消进度详情。
-
-
-
-
-
-
-
-
-
- 已下单
-
+
+
+
-
- 您提交了订单,请等待系统确认
-
-
-
-
- 华哈哈哈哈哈哈哈哈哈2栋 22-1
- 肖战123****1234
-
-
-
-
+
-
-
-
-
-
+
+
+ 出库时间
+ {{
+ order.trackingTime }}
+
+
+
+
+
-
-
- 已签收
+
+
+
+ 已下单
+
+
+
+
-
-
-
- 快递运输 · 温馨提示:您的订单预计3月11日09:00- 15:53送达
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+
+
+
+
+
+
- 肖战
-
- 联系Ta
- 打赏Ta
-
-
-
-
-
- 华哈哈哈哈哈哈哈哈哈2栋 22-1
- 肖战123****1234
+
+
+
+
+
+
+
+
+
+
+ 取消/退款进度
+
+
+
+
+ 您的订单已取消,请查看取消进度详情。
+
+
+
+
+
+
+
+ 已下单
+
+
+
+
+
+ 您提交了订单,请等待系统确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 签收时间
+ {{
+ order.trackingTime }}
+
+
+
+
+
+
+
+
+
+ 已签收
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 联系Ta
+ 打赏Ta
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 商店类型
+
+
+ {{ shopTypeOptions[shopTypeIndex]
+ }}
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+ ¥
+
+
-
-
+
+ style="font-size: 36rpx;">{{
+ order.totalPrice }}
+
+ -->
+
+
+
+
+
+ 店铺客服
+ 商品/活动
+
+
+
+
+
+ 京东客服
+ 物流/平台
+
+
+
+
+
+
+
+ {{ btn }}
-
-
-
-
- 店铺客服
- 商品/活动
+
+
+
+
+ 商品总价
+ ¥
+ {{ order.products[0].price }}
+
-
-
-
- 京东客服
- 物流/平台
+
+ 运费
+ ¥
+
+
+
+ 需付款
+ ¥{{ (Number(order.products[0].price) + Number(order.carriage)) ?
+ (Number(order.products[0].price)
+ + Number(order.carriage)) :
+ 0 }}
+
+
+
+
+
+ 订单信息
+
+
+ 实付款
+
+
+
+ 共减¥
+
+
+
+
+
+ 合计¥
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
-
-
-
-
- {{ btn }}
-
-
+
-
-
-
-
- 商品总价
- ¥
-
-
-
-
-
- 运费
- ¥
-
-
-
-
- 需付款 ¥{{ (Number(order.totalPrice) +
- Number(order.carriage))
- }}
-
-
-
+
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+ {{ item }}
+
+
+
+
+ {{ item }}
+
+
+
+
+ {{ item }}
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/shopping/jingdong/json/order.json b/pages/shopping/jingdong/json/order.json
index 9584e3a..77ff18c 100644
--- a/pages/shopping/jingdong/json/order.json
+++ b/pages/shopping/jingdong/json/order.json
@@ -1,32 +1,33 @@
{
"shoppingClassfiy": {
"dengdaifukuan": {
- "id": 8562245551,
+ "id": "",
"shopType": "self",
- "shopName": "安野屋 (AARYE) 京联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦",
+ "shopName": "",
"status": "等待付款",
- "statusDesc": "18 : 25 : 46",
- "consignee": "肖战",
- "phone": "152633221112",
- "fullAddress": "上海市浦东新区世纪大道123号",
- "totalPrice": "69.00",
- "carriage": "0.00",
+ "statusDesc": "",
+ "consignee": "",
+ "phone": "",
+ "fullAddress": "",
+ "totalPrice": "",
+ "carriage": "",
"products": [
{
"image": "",
- "name": "哈哈哈哈哈",
- "title": "安野屋(AARYE)红红火火恍恍惚惚哈哈哈哈哈好",
- "desc": "联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦",
- "service": "无理由退货政策",
- "price": "69.00",
- "count": "1"
+ "name": "",
+ "title": "",
+ "desc": "",
+ "service": "",
+ "price": "",
+ "count": ""
}
],
"orderInfo": [
{
"label": "订单编号",
"key": "orderNumber",
- "value": "8562245551"
+ "value": "",
+ "type": "number"
},
{
"label": "交易快照",
@@ -46,7 +47,8 @@
{
"label": "下单时间",
"key": "orderTime",
- "value": "2022-01-01 12:00:00"
+ "value": "",
+ "type": "time"
}
],
"sendType": [
@@ -58,42 +60,48 @@
{
"label": "期望配送时间",
"key": "expectedDeliveryTime",
- "value": "大王 122555662221555"
+ "value": " ",
+ "type": "timeRange"
},
{
"label": "收货方式",
"key": "shippingMethod",
- "value": "送货上门"
+ "value": ""
}
],
"promoType": "text",
"promoHighlight": "白条支付券0.5元优惠券"
},
"zhengzaichuku": {
- "id": 5504455,
- "shopType": "none",
- "shopName": "甜小南旗舰店",
+ "id": "",
+ "shopType": "self",
+ "shopName": "",
"status": "正在出库",
"trackingTitle": "仓库处理中",
- "trackingDesc": "预计 3月12日24:00 前发货,3月15日 24:00 前送达",
- "trackingTime": "2026-03-10 15:14:30",
+ "trackingDesc": "",
+ "trackingDesc2": "",
+ "trackingTime": "",
+ "consignee": "",
+ "phone": "",
+ "fullAddress": "",
+ "totalPrice": "",
+ "carriage": "",
"products": [
{
- "image": "/static/image/shopping/jingdong/product1.png",
- "title": "安野哈哈哈哈哈哈哈哈哈哈哈哈好好",
- "desc": "联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦",
- "tags": [
- "无理由退货政策"
- ],
- "price": "69.00",
- "count": 1
+ "image": "",
+ "title": "",
+ "desc": "",
+ "service": "",
+ "price": "",
+ "count": ""
}
],
"orderInfo": [
{
"label": "订单编号",
"key": "orderNumber",
- "value": "8562245551"
+ "value": "",
+ "type": "number"
},
{
"label": "交易快照",
@@ -108,12 +116,13 @@
{
"label": "支付时间",
"key": "paymentTime",
- "value": "2022-01-01 12:00:00"
+ "value": "",
+ "type": "time"
},
{
"label": "下单时间",
"key": "orderTime",
- "value": "2022-01-01 12:00:00"
+ "value": ""
}
],
"sendType": [
@@ -125,17 +134,18 @@
{
"label": "收货信息",
"key": "userInfo",
- "value": "大王 122555662221555"
+ "value": ""
},
{
"label": "收货地址",
"key": "address",
- "value": "哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈"
+ "value": ""
},
{
"label": "期望配送时间",
"key": "expectedDeliveryTime",
- "value": "大王 122555662221555"
+ "value": "",
+ "type": "timeRange"
},
{
"label": "收货方式",
@@ -147,31 +157,32 @@
"promoText": "告别凑单, 享免运优惠"
},
"yiqianshou": {
- "id": 585552,
+ "id": "",
"shopType": "self",
- "shopName": "甜小南旗舰店",
+ "shopName": "",
"status": "完成",
"statusColor": "gray",
"trackingTitle": "已签收",
+ "courier": "",
"trackingDesc": "您的订单已签收,可对快递员的服务进行评价或打赏哦~",
- "trackingTime": "2026-03-10 15: 14: 30",
+ "trackingDesc2": "",
+ "trackingTime": "",
"products": [
{
- "image": "/static/image/shopping/jingdong/product1.png",
- "title": "安野哈哈哈哈哈哈哈哈哈哈哈哈好好",
- "desc": "联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦",
- "tags": [
- "无理由退货政策"
- ],
- "price": "69.00",
- "count": 1
+ "image": "",
+ "title": "",
+ "desc": "",
+ "service": "",
+ "price": "",
+ "count": ""
}
],
"orderInfo": [
{
"label": "订单编号",
"key": "orderNumber",
- "value": "8562245551"
+ "value": "",
+ "type": "number"
},
{
"label": "交易快照",
@@ -186,12 +197,12 @@
{
"label": "支付时间",
"key": "paymentTime",
- "value": "2022-01-01 12:00:00"
+ "value": ""
},
{
"label": "下单时间",
"key": "orderTime",
- "value": "2022-01-01 12:00:00"
+ "value": ""
}
],
"sendType": [
@@ -203,7 +214,8 @@
{
"label": "期望配送时间",
"key": "expectedDeliveryTime",
- "value": "大王 122555662221555"
+ "value": "",
+ "type": "timeRange"
},
{
"label": "收货方式",
@@ -216,28 +228,27 @@
"hasMore": true
},
"wancheng": {
- "id": 4545451,
+ "id": "",
"shopType": "jd",
- "shopName": "甜小南旗舰店",
+ "shopName": "",
"status": "完成",
"statusColor": "gray",
"products": [
{
- "image": "/static/image/shopping/jingdong/product1.png",
- "title": "安野哈哈哈哈哈哈哈哈哈哈哈哈好好",
- "desc": "联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦",
- "tags": [
- "无理由退货政策"
- ],
- "price": "69.00",
- "count": 1
+ "image": "",
+ "title": "",
+ "desc": "",
+ "service": "",
+ "price": "",
+ "count": ""
}
],
"orderInfo": [
{
"label": "订单编号",
"key": "orderNumber",
- "value": "8562245551"
+ "value": "",
+ "type": "number"
},
{
"label": "交易快照",
@@ -252,12 +263,13 @@
{
"label": "支付时间",
"key": "paymentTime",
- "value": "2022-01-01 12:00:00"
+ "value": "",
+ "type": "time"
},
{
"label": "下单时间",
"key": "orderTime",
- "value": "2022-01-01 12:00:00"
+ "value": ""
}
],
"sendType": [
@@ -269,39 +281,38 @@
{
"label": "收货信息",
"key": "userInfo",
- "value": "大王 122555662221555"
+ "value": ""
},
{
"label": "收货地址",
"key": "address",
- "value": "哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈"
+ "value": ""
}
],
"hasMore": true
},
"yiquxiao": {
- "id": 1236524,
+ "id": "",
"shopType": "self",
- "shopName": "甜小南旗舰店",
+ "shopName": "",
"status": "已取消",
"statusColor": "gray",
"products": [
{
- "image": "/static/image/shopping/jingdong/product1.png",
- "title": "安野哈哈哈哈哈哈哈哈哈哈哈哈好好",
- "desc": "联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦",
- "tags": [
- "无理由退货政策"
- ],
- "price": "1669.00",
- "count": 1
+ "image": "",
+ "title": "",
+ "desc": "",
+ "service": "",
+ "price": "",
+ "count": ""
}
],
"orderInfo": [
{
"label": "订单编号",
"key": "orderNumber",
- "value": "8562245551"
+ "value": "",
+ "type": "number"
},
{
"label": "交易快照",
@@ -321,7 +332,7 @@
{
"label": "下单时间",
"key": "orderTime",
- "value": "2022-01-01 12:00:00"
+ "value": ""
}
],
"sendType": [
@@ -333,7 +344,8 @@
{
"label": "期望配送时间",
"key": "expectedDeliveryTime",
- "value": "大王 122555662221555"
+ "value": "",
+ "type": "timeRange"
},
{
"label": "收货方式",
diff --git a/pages/shopping/jingdong/list-index.vue b/pages/shopping/jingdong/list-index.vue
index 8dc10a3..d34d798 100644
--- a/pages/shopping/jingdong/list-index.vue
+++ b/pages/shopping/jingdong/list-index.vue
@@ -78,6 +78,7 @@