Compare commits
No commits in common. "e9488a27770e9397248b7770d9f3caa9e92a6f53" and "08d3c6bab08a173c822dcb7f2013fba2b6f72bdb" have entirely different histories.
e9488a2777
...
08d3c6bab0
@ -7,7 +7,7 @@
|
||||
</view>
|
||||
<view class="product-list">
|
||||
<view class="product-item" v-for="(product, pIndex) in item.commodity_order_item_list" :key="pIndex">
|
||||
<view class="product-info" @click="toDetail(item)">
|
||||
<view class="product-info">
|
||||
<view class="product-img">
|
||||
<image :src="product.commodity_pic"></image>
|
||||
<view class="tag" v-if="product.is_same_day === 1">当日达</view>
|
||||
@ -43,11 +43,6 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toDetail(item) {
|
||||
const goodId = item.commodity_order_item_list[0].goods_id
|
||||
const orderInfo = item
|
||||
NavgateTo(`/packages/myOrders/goodDetails/index?item=${JSON.stringify(orderInfo)} &goodId=${JSON.stringify(goodId)}`);
|
||||
},
|
||||
evaluateOrder(item) {
|
||||
NavgateTo(`../evaluate/index?item=${JSON.stringify(item)}`);
|
||||
},
|
||||
|
||||
@ -13,19 +13,16 @@
|
||||
<view class="evaluation-area">
|
||||
<text class="evaluation-text">{{ item.evaluate_info.user_review }}</text>
|
||||
<!-- 评价图片区域 -->
|
||||
<view class="image-list"
|
||||
v-if="item.evaluate_info.review_image && item.evaluate_info.review_image.length > 0">
|
||||
<view class="image-item" v-for="(img, index) in parseReviewImages(item.evaluate_info.review_image)"
|
||||
:key="index">
|
||||
<image :src="img" @tap="previewImage(parseReviewImages(item.evaluate_info.review_image), index)">
|
||||
</image>
|
||||
<view class="image-list" v-if="item.evaluate_info.review_image && item.evaluate_info.review_image.length > 0">
|
||||
<view class="image-item" v-for="(img, index) in parseReviewImages(item.evaluate_info.review_image)" :key="index">
|
||||
<image :src="img" @tap="previewImage(parseReviewImages(item.evaluate_info.review_image), index)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<text class="order-date">{{ item.evaluate_info.create_time }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 商品信息区域 -->
|
||||
<view class="product-info" @click="toDetail(item)">
|
||||
<view class="product-info">
|
||||
<view class="product-img">
|
||||
<image :src="item.commodity_order_item_list[0].commodity_pic"></image>
|
||||
<view class="tag" v-if="item.commodity_order_item_list[0].is_same_day === 1" :key="index">当日达</view>
|
||||
@ -33,8 +30,7 @@
|
||||
<view class="product-details">
|
||||
<text class="product-name">{{ item.commodity_order_item_list[0].goods_name }}</text>
|
||||
<text class="product-spec">{{ item.commodity_order_item_list[0].goods_spec }}</text>
|
||||
<text class="product-unit">{{ item.commodity_order_item_list[0].sales_price }}/{{
|
||||
item.commodity_order_item_list[0].goods_unit }}</text>
|
||||
<text class="product-unit">{{ item.commodity_order_item_list[0].sales_price }}/{{ item.commodity_order_item_list[0].goods_unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -44,8 +40,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { picUrl, NavgateTo, request } from "../../../utils";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
orderData: {
|
||||
@ -59,11 +53,6 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toDetail(item) {
|
||||
const goodId = item.commodity_order_item_list[0].goods_id
|
||||
const orderInfo = item
|
||||
NavgateTo(`/packages/myOrders/goodDetails/index?item=${JSON.stringify(orderInfo)} &goodId=${JSON.stringify(goodId)}`);
|
||||
},
|
||||
// 预览图片
|
||||
previewImage(imageList, currentIndex) {
|
||||
uni.previewImage({
|
||||
@ -80,7 +69,7 @@ export default {
|
||||
// 去除可能的引号和空格,然后尝试解析为数组
|
||||
const cleanStr = reviewImage.replace(/^"|"$/g, '').replace(/^'|'$/g, '').trim();
|
||||
let images = [];
|
||||
|
||||
|
||||
// 尝试使用JSON解析
|
||||
if (cleanStr.startsWith('[') && cleanStr.endsWith(']')) {
|
||||
images = JSON.parse(cleanStr);
|
||||
@ -88,7 +77,7 @@ export default {
|
||||
// 如果是逗号分隔的字符串
|
||||
images = cleanStr.split(',').map(img => img.trim());
|
||||
}
|
||||
|
||||
|
||||
// 确保返回的是数组并且每个元素都是有效的URL
|
||||
return Array.isArray(images) ? images : [];
|
||||
}
|
||||
@ -112,7 +101,7 @@ export default {
|
||||
this.orderList = newVal;
|
||||
console.log("🚀 ~ watch orderData ~ this.orderList:", this.orderList);
|
||||
},
|
||||
deep: true
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -210,13 +210,9 @@ export default {
|
||||
});
|
||||
},
|
||||
toDetail(itemObj) {
|
||||
let targetItem = itemObj;
|
||||
if(!targetItem.group_buy_activity_info && targetItem.group_buy_goods_list && targetItem.group_buy_goods_list.length > 0){
|
||||
targetItem = targetItem.group_buy_goods_list[0];
|
||||
}
|
||||
const item = {
|
||||
...targetItem,
|
||||
groupById: targetItem.group_buy_activity_info.id
|
||||
...itemObj,
|
||||
groupById: itemObj.group_buy_activity_info.id
|
||||
};
|
||||
NavgateTo(`/packages/shop/groupPurchaseDetail/index?item=${JSON.stringify(item)}`)
|
||||
},
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* border: 1rpx solid #f7f7f7; */
|
||||
border: 1rpx solid #f7f7f7;
|
||||
}
|
||||
|
||||
.work-order-icon {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user