Compare commits

...

11 Commits

21 changed files with 371 additions and 862 deletions

View File

@ -7,4 +7,5 @@ export const apiArr = {
revokeApply: "/api/v2/wechat/commodity/after-sales/revoke-apply", //撤销售后申请
changeGoodsList: "/api/v2/wechat/commodity/after-sales/change-goods-list", //商品售后换货商品列表
updateApply: "/api/v2/wechat/commodity/after-sales/update-apply", //商品订单售后修改申请
createReview: "/api/v2/wechat/commodity/review/create", //创建订单评价
};

View File

@ -1,6 +1,6 @@
.foot-fixed {
position: fixed;
bottom: -1px;
bottom: -10px;
left: 0;
right: 0;
z-index: 999;
@ -8,6 +8,7 @@
background: #ffffff;
border-top: 1px solid #E8E8E8;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
/* height: 8%; */
}
.foot-fixed .foot-item {

View File

@ -310,7 +310,7 @@ export default {
const isMe = uni.getStorageSync("is_me");
// is_metruefalse
if (isMe === true || isMe === undefined || isMe === null || isMe === '') {
this.getCommunityList();
await this.getCommunityList();
}
this.getfunctionNum();
this.getAdvertising();
@ -382,6 +382,8 @@ export default {
if (targetItem.front_end_display == 1) {
uni.removeStorageSync("changeCommData");
}
}else{
uni.removeStorageSync("changeCommData");
}
res.rows = res.rows.filter((item) => {

View File

@ -1,190 +0,0 @@
[
{
"id": 9001,
"after_sales_no": "AS202508130001",
"commodity_order_id": 1001,
"after_sales_status": 1,
"applicant": "张三",
"after_sales_reason": "拍错商品/不想要了",
"after_sales_type": 1,
"application_description": "请尽快处理退款",
"application_images": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"is_need_process": 1,
"process_status": 1,
"refund_amount": 68.00,
"after_sales_goods": "1@8001",
"refund_method": 1,
"review_status": 1,
"creator": "customer",
"create_time": "2025-08-13T11:20:00Z",
"commodity_order_item": [
{
"id": 7001,
"goods_id": 8001,
"goods_name": "澳洲牛排",
"is_support_same_day": 1,
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"sales_price": 68.00,
"count": 1,
"after_sales_status": 1
}
]
},
{
"id": 9002,
"after_sales_no": "AS202508130002",
"commodity_order_id": 1002,
"after_sales_status": 1,
"after_sales_type": 1,
"refund_no": "RF202508130001",
"refund_completed_time": "2025-08-13T14:30:00Z",
"is_need_process": 2,
"process_status": 2,
"refund_amount": 45.80,
"after_sales_goods": "2@8004",
"refund_method": 1,
"review_status": 2,
"review_remark": "审核通过,已原路退款",
"reviewer": "客服008",
"review_time": "2025-08-13T14:15:00Z",
"create_time": "2025-08-13T13:45:00Z",
"commodity_order_item": [
{
"id": 7004,
"goods_id": 8004,
"goods_name": "东北大米",
"sales_price": 22.90,
"count": 2,
"after_sales_status": 3
}
]
},
{
"id": 9003,
"after_sales_no": "AS202508130003",
"commodity_order_id": 1003,
"after_sales_status": 1,
"applicant": "李四",
"after_sales_reason": "商品质量问题",
"after_sales_type": 2,
"application_description": "商品包装破损",
"application_images": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"return_description": "已通过顺丰寄回",
"return_images": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"return_tracking_no": "SF1234567890",
"return_logistics_company": "顺丰速运",
"return_contact_phone": "13800138000",
"is_need_process": 1,
"process_status": 1,
"refund_amount": 152.00,
"after_sales_goods": "1@8003",
"refund_method": 1,
"review_status": 1,
"create_time": "2025-08-13T15:30:00Z",
"commodity_order_item": [
{
"id": 7003,
"goods_id": 8003,
"goods_name": "精品榴莲",
"sales_price": 152.00,
"count": 1,
"after_sales_status": 1
}
]
},
{
"id": 9004,
"after_sales_no": "AS202508130004",
"after_sales_type": 2,
"after_sales_status": 1,
"process_status": 2,
"refund_amount": 39.90,
"review_status": 2,
"review_remark": "商品已验货,符合退款条件",
"reviewer": "质检005",
"review_time": "2025-08-13T16:45:00Z",
"refund_no": "RF202508130002",
"refund_completed_time": "2025-08-13T17:30:00Z",
"create_time": "2025-08-13T09:30:00Z",
"commodity_order_item": [
{
"id": 7005,
"goods_name": "酸奶套装",
"sales_price": 39.90,
"count": 1,
"after_sales_status": 2
}
]
},
{
"id": 9005,
"after_sales_no": "AS202508130005",
"commodity_order_id": 1004,
"after_sales_type": 3,
"after_sales_status": 1,
"applicant": "王五",
"after_sales_reason": "商品发错型号",
"application_description": "购买的是XL码收到L码",
"application_images": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"is_need_process": 1,
"process_status": 1,
"after_sales_goods": "1@8006",
"receiving_address": "上海市浦东新区张江高科88号",
"review_status": 1,
"create_time": "2025-08-13T10:15:00Z",
"commodity_order_item": [
{
"id": 7006,
"goods_id": 8006,
"goods_name": "冷冻虾仁",
"sales_price": 76.50,
"count": 1,
"after_sales_status": 1
}
]
},
{
"id": 9006,
"after_sales_no": "AS202508130006",
"after_sales_type": 3,
"after_sales_status": 1,
"process_status": 2,
"processor": "客服012",
"process_time": "2025-08-13T14:20:00Z",
"process_remark": "已补发新商品物流单号YT987654321",
"review_status": 2,
"reviewer": "客服主管",
"review_time": "2025-08-13T13:40:00Z",
"create_time": "2025-08-13T09:00:00Z",
"commodity_order_item": [
{
"id": 7007,
"goods_id": 8007,
"goods_name": "进口橙子",
"sales_price": 32.00,
"count": 2,
"after_sales_status": 2
}
]
},
{
"id": 9007,
"after_sales_no": "AS202508130007",
"after_sales_status": 2,
"revoke_time": "2025-08-13T11:05:00Z",
"after_sales_type": 1,
"applicant": "赵六",
"after_sales_reason": "商品运输损坏",
"create_time": "2025-08-13T10:30:00Z",
"update_time": "2025-08-13T11:05:00Z",
"commodity_order_item": [
{
"id": 7002,
"goods_name": "有机西兰花",
"sales_price": 10.50,
"count": 1,
"after_sales_status": 4
}
]
}
]

View File

@ -52,7 +52,6 @@
</template>
<script>
import afterSaleData from './afterSale.json';
import { apiArr } from "../../../api/afterSale";
import {
isPhone,
@ -71,7 +70,6 @@ export default {
},
data() {
return {
// currentAfterSale: afterSaleData
currentAfterSale: this.afterSaleList,
};
},
@ -156,7 +154,6 @@ export default {
});
},
pendingPage(item) {
console.log("🚀 ~ pendingPage ~ item:", item)
// NavgateTo(`/packages/myOrders/sendBack/index?item=${JSON.stringify(item)}`);
if (item.after_sales_type === 3) {

View File

@ -2,27 +2,23 @@
<view class="order-list">
<view class="order-item" v-for="(item, index) in orderList" :key="index">
<view class="order-header">
<text class="order-name">{{ item.orderName }}</text>
<text class="order-number">{{ item.orderNumber }}</text>
<text class="order-name">{{ item.supplier_name }}</text>
<text class="order-number">{{ item.order_no }}</text>
</view>
<view class="product-list">
<view
class="product-item"
v-for="(product, pIndex) in item.products"
:key="pIndex"
>
<view class="product-item" v-for="(product, pIndex) in item.commodity_order_item_list" :key="pIndex">
<view class="product-info">
<view class="product-img">
<image :src="product.imageUrl" mode="aspectFit"></image>
<view class="tag" v-if="product.tag">{{ product.tag }}</view>
<image :src="product.commodity_pic"></image>
<view class="tag" v-if="product.is_same_day === 1">当日达</view>
</view>
<view class="product-details">
<text class="product-name">{{ product.name }}</text>
<text class="product-spec">{{ product.spec }}</text>
<text class="product-unit">{{ product.unit }}</text>
<text class="product-name">{{ product.goods_name }}</text>
<text class="product-spec">{{ product.goods_spec }}</text>
<text class="product-unit">{{ product.sales_price }}/{{ product.goods_unit }}</text>
</view>
</view>
<button class="evaluate-btn" @click="evaluateOrder(product)">
<button class="evaluate-btn" @click="evaluateOrder(item)">
评价
</button>
</view>
@ -35,64 +31,35 @@
import { request, NavgateTo } from "../../../utils";
export default {
props: {
orderData: {
type: Array,
default: () => []
}
},
data() {
return {
orderList: [
{
orderName: "衡水商贸国际公司",
orderNumber: "4534534255",
products: [
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "当日达",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "当日达",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
],
},
{
orderNumber: "54352342331",
products: [
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
{
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tag: "",
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
],
},
],
orderList: [],
};
},
methods: {
evaluateOrder(item) {
console.log("🚀 ~ evaluateOrder ~ orderNumber:", item);
NavgateTo(`../evaluate/index?item=${JSON.stringify(item)}`);
},
},
mounted() {
//
this.orderList = this.orderData;
},
watch: {
// orderData
orderData: {
handler(newVal) {
this.orderList = newVal;
},
deep: true
}
}
};
</script>

View File

@ -6,11 +6,11 @@
<!-- 订单编号 -->
<view class="order-info">
<text class="order-label">订单编号</text>
<text class="order-value">38757328485</text>
<text class="order-value">{{ itemObj.order_no }}</text>
</view>
<view class="goods">
<view>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png" class="goodsImg"></image>
<image :src="itemObj.commodity_order_item_list[0].commodity_pic" class="goodsImg"></image>
</view>
<view class="rating">
<view>很差</view>
@ -23,70 +23,38 @@
<!-- 商品品质 -->
<view class="rating-item">
<text class="rating-label">商品品质</text>
<u-rate
v-model="qualityRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
<u-rate v-model="qualityRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
</view>
<!-- 配送速度 -->
<view class="rating-item">
<text class="rating-label">配送速度</text>
<u-rate
v-model="speedRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
<u-rate v-model="speedRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
</view>
<!-- 快递员服务 -->
<view class="rating-item">
<text class="rating-label">快递员服务</text>
<u-rate
v-model="serviceRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
<u-rate v-model="serviceRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
</view>
<!-- 评价输入 -->
<view class="comment-section">
<textarea
class="comment-input"
placeholder="展开说说对商品的想法吧…"
v-model="comment"
></textarea>
<textarea class="comment-input" placeholder="展开说说对商品的想法吧…" v-model="comment"></textarea>
</view>
<!-- 图片上传 -->
<view class="upload-section">
<view class="image-list">
<view
class="image-item"
v-for="(img, index) in imageList"
:key="index"
>
<view class="image-item" v-for="(img, index) in imageList" :key="index">
<image :src="img" class="uploaded-img"></image>
<view class="delete-btn" @click="deleteImage(index)">
<text class="delete-icon">×</text>
</view>
</view>
</view>
<view
class="upload-btn"
@click="chooseImage"
v-if="imageList.length < 3"
>
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/upload.png"
class="upload-icon"
></image>
<view class="upload-btn" @click="chooseImage" v-if="imageList.length < 3">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/upload.png" class="upload-icon">
</image>
<view class="upload-text">上传图片</view>
<view class="upload-count">({{ imageList.length }}/3)</view>
</view>
@ -101,31 +69,22 @@
<script>
import uImage from "../../../uni_modules/uview-ui/components/u--image/u--image.vue";
import { picUrl, NavgateTo, request } from "../../../utils";
import { apiArr } from "../../../api/afterSale";
export default {
components: { uImage },
data() {
return {
//
goods: [
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
],
//
qualityRating: 5,
qualityRating: 0,
speedRating: 0,
serviceRating: 0,
//
comment: "",
//
imageList: [],
itemObj: {},
};
},
methods: {
@ -160,19 +119,29 @@ export default {
});
return;
}
//
uni.showToast({
title: "评价提交成功",
icon: "success",
const params = {
order_id: this.itemObj.id,
goods_id: this.itemObj.commodity_order_item_list[0].goods_id,
user_id: uni.getStorageSync("userId"),
quality_score: this.qualityRating,
speed_score: this.speedRating,
service_score: this.serviceRating,
user_review: this.comment,
review_image: this.imageList,
}
request(apiArr.createReview, "POST", params).then((res) => {
uni.showToast({
title: "评价提交成功",
icon: "success",
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
},
},
onLoad(options) {
console.log("🚀 ~ onLoad ~ options:", options);
const itemObj = JSON.parse(decodeURIComponent(options.item));
this.itemObj = JSON.parse(decodeURIComponent(options.item));
},
};
</script>

View File

@ -10,12 +10,12 @@
<view class="content">
<view v-if="selectedTab === 6">
<awaitRated />
<awaitRated :orderData="orderData" />
</view>
<view v-if="selectedTab === 7">
<rated />
<view v-else-if="selectedTab === 7">
<rated :orderData="orderData" />
</view>
<view v-if="selectedTab === 8">
<view v-else-if="selectedTab === 8">
<afterSale :afterSaleList="afterSaleList" @revokeApply="revokeApply" />
</view>
<view v-else>
@ -33,7 +33,7 @@
</view>
<view v-else class="order_status">{{
getOrderStatus(item.order_status)
}}</view>
}}</view>
</view>
<text>提交订单{{ item.order_time }}</text>
</view>
@ -69,17 +69,17 @@
<view class="btn-group" v-if="item.order_status === 5">
<text class="afterSaleNum">{{ item.commodity_order_item_list.length }}笔售后</text>
<button class="cancel-btn" @click="afterSale(item)">退换/售后</button>
<button class="pay-btn">评价</button>
<button class="pay-btn" @click="orderEvaluate(item)" :disabled="item.evauate_status === 1">评价</button>
</view>
<view class="btn-group" v-if="item.order_status === 6">
<!-- <button class="cancel-btn" @click="orderEvaluate">
服务评价
</button>
<button class="yfd-btn" @click="cancelOrder">运费单</button>
<button class="pay-btn" @click="cancelOrder">再来一单</button> -->
<button class="yfd-btn" @click="cancelOrder">运费单</button> -->
<button class="pay-btn" @click="goToPay(item)">再来一单</button>
</view>
<view class="btn-group" v-if="item.order_status === 7">
<button class="pay-btn" @click="cancelOrder">再来一单</button>
<button class="pay-btn" @click="goToPay(item)">再来一单</button>
</view>
</view>
</view>
@ -128,7 +128,6 @@ import AfterSale from "../afterSale/index.vue";
import cancelOrderPopup from './popup/cancelOrder/cancelOrder.vue';
import refundPopup from './popup/refund/refund.vue';
import afterSalePopup from './popup/afterSale/index.vue';
import orderMockData from "./orderMockData.json";
export default {
@ -164,14 +163,27 @@ export default {
showTkPopup: false,//退
afterSaleItem: '',//
afterSaleList: [],//
selectStatus: '',//status
evaluateStatus: '',//
};
},
methods: {
selectTab(index, item) {
this.selectedTab = index;
if (index !== 6) {
this.getOrderList();
if (index == 6) {
this.evaluateStatus = 2;
this.selectStatus = ''
} else if (index == 7) {
this.evaluateStatus = 1;
this.selectStatus = ''
} else if (index == 2) {
this.selectStatus = 6;
this.evaluateStatus = ''
} else {
this.selectStatus = index;
this.evaluateStatus = ''
}
this.getOrderList();
},
//
cancelOrder(item) {
@ -181,7 +193,6 @@ export default {
//
handleOrderCancelled(data) {
console.log("🚀 ~ handleOrderCancelled ~ 取消原因:", data.reason);
const params = {
order_id: this.afterSaleItem.id,
method: 1,
@ -195,7 +206,6 @@ export default {
//
afterSale(item) {
console.log("🚀 ~ afterSale ~ item:", item)
this.afterSaleGoods = item.commodity_order_item_list;
//
this.afterSaleOrderItem = item;
@ -206,7 +216,6 @@ export default {
// request(afterSaleApi.isAllow, "POST", {
// order_id: item.id,
// }).then((res) => {
// console.log("🚀 ~ afterSale ~ res:", res)
// if (res.data.is_allow_after_sales) {
// this.afterSaleGoods = res.data.allow_items;
// // this.selectedAsGood = item.commodity_order_item_list[0].id;
@ -219,8 +228,6 @@ export default {
// 退
handleRefundSubmitted(data) {
console.log("🚀 ~ handleRefundSubmitted ~ handleRefundSubmitted:", this.afterSaleOrderItem)
console.log("🚀 ~ handleRefundSubmitted ~ 退款申请提交成功:", data);
const params = {
nick_name: uni.getStorageSync("nickName"),
order_id: this.afterSaleOrderItem.id,
@ -236,7 +243,6 @@ export default {
receiving_address: data.merchantAddress,
change_goods_id: data.changeServiceId
}
console.log("🚀 ~ handleRefundConfirmed ~ parasm:", params)
// request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
// this.getOrderList();
// });
@ -256,8 +262,6 @@ export default {
// 退
handleRefundConfirmed(data) {
console.log("🚀 ~ handleRefundConfirmed ~ handleRefundConfirmed:", this.afterSaleItem)
console.log("🚀 ~ handleRefundConfirmed ~ 退款原因:", data.reason);
const params = {
nick_name: uni.getStorageSync("nickName"),
order_id: this.afterSaleItem.id,
@ -267,7 +271,6 @@ export default {
refund_amount: this.afterSaleItem.total_amount,
order_status: 3
}
console.log("🚀 ~ handleRefundConfirmed ~ parasm:", params)
request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
this.getOrderList();
});
@ -284,7 +287,6 @@ export default {
order_id: item.id,
method: 2,
}
console.log("🚀 ~ confirmReceiving ~ params:", params)
request(afterSaleApi.cancelOrConfirm, "POST", params).then((res) => {
this.getOrderList();
});
@ -293,7 +295,44 @@ export default {
});
},
goToPay(item) {
console.log(item);
//
const transformedItems = item.commodity_order_item_list.map(goods => ({
checked: true,
commodity_goods_info: {
commodity_brief: "",
commodity_id: goods.goods_id,
commodity_pic: goods.commodity_pic,
goods_alias: goods.goods_name,
goods_carousel: "",
goods_detail_pic: "",
goods_intro: goods.goods_name,
goods_name: goods.goods_name,
goods_no: "",
goods_spec: goods.goods_spec,
goods_status: 1,
goods_unit: goods.goods_unit,
goods_video: "",
group_buy_activity_info: null,
id: goods.id,
is_same_day: goods.is_same_day || false,
is_support_same_day: goods.is_support_same_day || 2,
market_price: goods.sales_price,
sales_price: goods.sales_price,
stock_quantity: goods.stock_quantity
},
commodity_id: goods.goods_id,
count: goods.count,
create_time: item.create_time,
goods_id: goods.id,
group_buy_id: 0,
id: goods.id,
supplier_id: item.supplier_id,
supplier_name: item.supplier_name,
update_time: item.update_time,
user_id: item.user_id
}));
NavgateTo(`/packages/shop/groupPurchaseSubmit/index?shopCarList=${JSON.stringify(transformedItems)}`)
},
toDetails(item) {
NavgateTo(
@ -305,8 +344,8 @@ export default {
NavgateTo(`/packages/myOrders/logistics/index`);
},
orderEvaluate() {
NavgateTo(`/packages/myOrders/orderEvaluate/index`);
orderEvaluate(item) {
NavgateTo(`/packages/myOrders/orderEvaluate/index?item=${JSON.stringify(item)}`);
},
getOrderStatus(order_status) {
@ -331,8 +370,10 @@ export default {
},
getOrderList() {
this.orderData = []
request(afterSaleApi.orderList, "POST", {
order_status: this.selectedTab,
order_status: this.selectStatus,
evaluate_status: this.evaluateStatus,
user_id: uni.getStorageSync("userId"),
}).then((res) => {
res.order_list.forEach(item => {

View File

@ -1,349 +0,0 @@
[
{
"id": 1001,
"user_id": 20001,
"supplier_id": 3001,
"supplier_name": "鲜丰水果供应链有限公司",
"order_group_id": 40001,
"order_no": "SH20240823001001",
"total_amount": 156.80,
"total_count": 3,
"order_status": 3,
"cancelled_by": "",
"cancel_time": "",
"cancel_reason": "",
"evauate_status": 2,
"after_sales_status": 2,
"receiving_name": "李佳",
"receiving_phone": "15901518415",
"receiving_address": "北京市朝阳区珠江绿洲文化广场3号楼2单元1002室",
"pay_method": "微信支付",
"payment_amount": 156.80,
"payment_status": "已支付",
"payment_time": "2024-08-23 10:15:30",
"payment_serial": "WX202408231015300012345678",
"payer_name": "李佳",
"completed_at": "",
"order_time": "2024-08-23 10:10:22",
"is_same_day": 2,
"estimated_delivery_time": "2024-08-24 09:00-18:00",
"remark": "请放在小区丰巢柜,谢谢",
"shiliu_score": 156.8,
"shiliu_seed": 28.5,
"timeout_time_stamp": 1724413822,
"order_cate": 1,
"create_time": "2024-08-23 10:10:22",
"update_time": "2024-08-23 10:15:30",
"after_sales_count": 0,
"commodity_order_item_list": [
{
"id": 50001,
"order_id": 1001,
"goods_id": 6001,
"goods_name": "泰国金枕榴莲2-2.5斤/个)",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "个",
"goods_spec": "2-2.5斤",
"cost_price": 45.00,
"sales_price": 69.90,
"count": 1,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": false
},
{
"id": 50002,
"order_id": 1001,
"goods_id": 6002,
"goods_name": "阳光玫瑰葡萄1斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "1斤",
"cost_price": 12.00,
"sales_price": 25.90,
"count": 2,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": false
}
]
},
{
"id": 1002,
"user_id": 20002,
"supplier_id": 3002,
"supplier_name": "优选生鲜超市供应链",
"order_group_id": 40002,
"order_no": "SH20240823001002",
"total_amount": 89.50,
"total_count": 2,
"order_status": 6,
"cancelled_by": "用户",
"cancel_time": "2024-08-23 09:45:10",
"cancel_reason": "临时改变需求,不需要该商品",
"evauate_status": 2,
"after_sales_status": 2,
"receiving_name": "张伟",
"receiving_phone": "13812345678",
"receiving_address": "上海市浦东新区张江高科技园区博云路2号",
"pay_method": "支付宝支付",
"payment_amount": 0.00,
"payment_status": "未支付",
"payment_time": "",
"payment_serial": "",
"payer_name": "",
"completed_at": "",
"order_time": "2024-08-23 09:30:05",
"is_same_day": 1,
"estimated_delivery_time": "2024-08-23 12:00-14:00",
"remark": "无",
"shiliu_score": 0.0,
"shiliu_seed": 0.0,
"timeout_time_stamp": 1724399405,
"order_cate": 2,
"create_time": "2024-08-23 09:30:05",
"update_time": "2024-08-23 09:45:10",
"after_sales_count": 0,
"commodity_order_item_list": [
{
"id": 50003,
"order_id": 1002,
"goods_id": 6003,
"goods_name": "精品富士苹果5斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "5斤",
"cost_price": 3.50,
"sales_price": 9.90,
"count": 1,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": true
},
{
"id": 50004,
"order_id": 1002,
"goods_id": 6004,
"goods_name": "蒙牛纯牛奶200ml*16盒",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "箱",
"goods_spec": "200ml*16盒",
"cost_price": 35.00,
"sales_price": 79.60,
"count": 1,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": true
}
]
},
{
"id": 1003,
"user_id": 20003,
"supplier_id": 3003,
"supplier_name": "美菜网餐饮供应链",
"order_group_id": 40003,
"order_no": "SH20240822001003",
"total_amount": 328.00,
"total_count": 5,
"order_status": 5,
"cancelled_by": "",
"cancel_time": "",
"cancel_reason": "",
"evauate_status": 1,
"after_sales_status": 1,
"receiving_name": "王芳",
"receiving_phone": "13987654321",
"receiving_address": "广州市天河区天河路385号天俊阁15楼",
"pay_method": "企业对公转账",
"payment_amount": 328.00,
"payment_status": "已支付",
"payment_time": "2024-08-22 15:20:40",
"payment_serial": "BANK202408221520400098765",
"payer_name": "王芳(企业代付)",
"completed_at": "2024-08-22 18:30:15",
"order_time": "2024-08-22 14:50:33",
"is_same_day": 2,
"estimated_delivery_time": "2024-08-23 08:00-10:00",
"remark": "餐饮用食材,请优先配送,包装需防震",
"shiliu_score": 328.0,
"shiliu_seed": 45.2,
"timeout_time_stamp": 1724319033,
"order_cate": 1,
"create_time": "2024-08-22 14:50:33",
"update_time": "2024-08-22 18:30:15",
"after_sales_count": 1,
"supplier_address": "供应商收货地址",
"supplier_phone": "11111111111",
"commodity_order_item_list": [
{
"id": 50005,
"order_id": 1003,
"goods_id": 6005,
"goods_name": "新鲜生菜1斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "1斤",
"cost_price": 1.80,
"sales_price": 3.50,
"count": 2,
"after_sales_status": 1,
"is_support_same_day": 2,
"is_same_day": false
},
{
"id": 50006,
"order_id": 1003,
"goods_id": 6006,
"goods_name": "冷冻鸡胸肉1kg装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "袋",
"goods_spec": "1kg",
"cost_price": 12.00,
"sales_price": 22.80,
"count": 3,
"after_sales_status": 2,
"is_support_same_day": 2,
"is_same_day": false
}
]
},
{
"id": 1004,
"user_id": 20004,
"supplier_id": 3004,
"supplier_name": "美菜网餐饮供应链",
"order_group_id": 40004,
"order_no": "SH20240822001003",
"total_amount": 328.00,
"total_count": 5,
"order_status": 4,
"cancelled_by": "",
"cancel_time": "",
"cancel_reason": "",
"evauate_status": 1,
"after_sales_status": 1,
"receiving_name": "王芳",
"receiving_phone": "13987654321",
"receiving_address": "广州市天河区天河路385号天俊阁15楼",
"pay_method": "企业对公转账",
"payment_amount": 328.00,
"payment_status": "已支付",
"payment_time": "2024-08-24 10:20:40",
"payment_serial": "BANK202408221520400098765",
"payer_name": "王芳(企业代付)",
"completed_at": "2024-08-24 18:30:15",
"order_time": "2024-08-24 14:50:33",
"is_same_day": 2,
"estimated_delivery_time": "2024-08-23 08:00-10:00",
"remark": "餐饮用食材,请优先配送,包装需防震",
"shiliu_score": 328.0,
"shiliu_seed": 45.2,
"timeout_time_stamp": 1724319033,
"order_cate": 1,
"create_time": "2024-08-24 14:50:33",
"update_time": "2024-08-24 18:30:15",
"after_sales_count": 1,
"commodity_order_item_list": [
{
"id": 50005,
"order_id": 1003,
"goods_id": 6005,
"goods_name": "新鲜生菜1斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "1斤",
"cost_price": 1.80,
"sales_price": 3.50,
"count": 2,
"after_sales_status": 1,
"is_support_same_day": 2,
"is_same_day": false
},
{
"id": 50006,
"order_id": 1003,
"goods_id": 6006,
"goods_name": "冷冻鸡胸肉1kg装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "袋",
"goods_spec": "1kg",
"cost_price": 12.00,
"sales_price": 22.80,
"count": 3,
"after_sales_status": 2,
"is_support_same_day": 2,
"is_same_day": false
}
]
},
{
"id": 1005,
"user_id": 20005,
"supplier_id": 3005,
"supplier_name": "鲜丰水果供应链有限公司",
"order_group_id": 40005,
"order_no": "SH20240823001001",
"total_amount": 156.80,
"total_count": 3,
"order_status": 1,
"cancelled_by": "",
"cancel_time": "",
"cancel_reason": "",
"evauate_status": 2,
"after_sales_status": 2,
"receiving_name": "李佳",
"receiving_phone": "15901518415",
"receiving_address": "北京市朝阳区珠江绿洲文化广场3号楼2单元1002室",
"pay_method": "微信支付",
"payment_amount": 156.80,
"payment_status": "已支付",
"payment_time": "2024-08-23 10:15:30",
"payment_serial": "WX202408231015300012345678",
"payer_name": "李佳",
"completed_at": "",
"order_time": "2024-08-23 10:10:22",
"is_same_day": 2,
"estimated_delivery_time": "2024-08-24 09:00-18:00",
"remark": "请放在小区丰巢柜,谢谢",
"shiliu_score": 156.8,
"shiliu_seed": 28.5,
"timeout_time_stamp": 1724413822,
"order_cate": 1,
"create_time": "2024-08-23 10:10:22",
"update_time": "2024-08-23 10:15:30",
"after_sales_count": 0,
"commodity_order_item_list": [
{
"id": 50001,
"order_id": 1001,
"goods_id": 6001,
"goods_name": "泰国金枕榴莲2-2.5斤/个)",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "个",
"goods_spec": "2-2.5斤",
"cost_price": 45.00,
"sales_price": 69.90,
"count": 1,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": false
},
{
"id": 50002,
"order_id": 1001,
"goods_id": 6002,
"goods_name": "阳光玫瑰葡萄1斤装",
"commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png",
"goods_unit": "斤",
"goods_spec": "1斤",
"cost_price": 12.00,
"sales_price": 25.90,
"count": 2,
"after_sales_status": 2,
"is_support_same_day": 1,
"is_same_day": false
}
]
}
]

View File

@ -140,17 +140,17 @@
<view class="bottom-buttons" v-if="status === '4'">
<button class="cancel-btn" @click="checkLogistics">查看物流</button>
<!-- <button class="yfd-btn" @click="cancelOrder">运费单</button> -->
<button class="pay-btn" @click="gotoPayment">立即支付</button>
<button class="pay-btn" @click="confirmReceiving">确认收货</button>
</view>
<view class="bottom-buttons" v-if="status === '5'">
<!-- <button class="cancel-btn" @click="orderEvaluate">服务评价</button> -->
<!-- <button class="cancel-btn" @click="afterSale">退换/售后</button> -->
<!-- <button class="yfd-btn" @click="cancelOrder">运费单</button> -->
<button class="pay-btn" @click="gotoPayment">立即支付</button>
<button class="pay-btn" @click="orderEvaluate" :disabled="orderInfo.evauate_status === 1">评价</button>
</view>
<view class="bottom-buttons" v-if="status === '6'">
<!-- <button class="yfd-btn" @click="cancelOrder">运费单</button> -->
<!-- <button class="cancel-btn" @click="cancelOrder">服务评价</button> -->
<!-- <button class="pay-btn" @click="gotoPayment">再来一单</button> -->
<button class="pay-btn" @click="gotoPayment">再来一单</button>
</view>
</view>
</view>
@ -267,17 +267,56 @@ export default {
});
},
gotoPayment() {
//
// uni.navigateTo({
// url: "/kitchen/pay/index",
// });
//
const transformedItems = this.orderInfo.commodity_order_item_list.map(goods => ({
checked: true,
commodity_goods_info: {
commodity_brief: "",
commodity_id: goods.goods_id,
commodity_pic: goods.commodity_pic,
goods_alias: goods.goods_name,
goods_carousel: "",
goods_detail_pic: "",
goods_intro: goods.goods_name,
goods_name: goods.goods_name,
goods_no: "",
goods_spec: goods.goods_spec,
goods_status: 1,
goods_unit: goods.goods_unit,
goods_video: "",
group_buy_activity_info: null,
id: goods.id,
is_same_day: goods.is_same_day || false,
is_support_same_day: goods.is_support_same_day || 2,
market_price: goods.sales_price,
sales_price: goods.sales_price,
stock_quantity: goods.stock_quantity
},
commodity_id: goods.goods_id,
count: goods.count,
create_time: this.orderInfo.create_time,
goods_id: goods.id,
group_buy_id: 0,
id: goods.id,
supplier_id: this.orderInfo.supplier_id,
supplier_name: this.orderInfo.supplier_name,
update_time: this.orderInfo.update_time,
user_id: this.orderInfo.user_id
}));
NavgateTo(`/packages/shop/groupPurchaseSubmit/index?shopCarList=${JSON.stringify(transformedItems)}`)
},
checkLogistics() {
NavgateTo(`/packages/myOrders/logistics/index`);
},
orderEvaluate() {
NavgateTo(`/packages/myOrders/orderEvaluate/index`);
NavgateTo(`/packages/myOrders/orderEvaluate/index?item=${JSON.stringify(this.orderInfo)}`);
},
//
afterSale() {
NavgateTo(`/packages/myOrders/afterSale/index`);
}
},
};

View File

@ -3,8 +3,8 @@
<!-- 商品图片区域 -->
<scroll-view class="goods-scroll" scroll-x>
<view class="goods-list">
<view class="goods-item" v-for="(item, index) in goods" :key="index">
<image :src="item.image" class="goods-img"></image>
<view class="goods-item" v-for="(item, index) in itemObj.commodity_order_item_list" :key="index">
<image :src="item.commodity_pic" class="goods-img"></image>
</view>
</view>
</scroll-view>
@ -14,7 +14,7 @@
<!-- 订单编号 -->
<view class="order-info">
<text class="order-label">订单编号</text>
<text class="order-value">38757328485</text>
<text class="order-value">{{ itemObj.order_no }}</text>
</view>
<view class="rating">
<view>很差</view>
@ -26,70 +26,38 @@
<!-- 商品品质 -->
<view class="rating-item">
<text class="rating-label">商品品质</text>
<u-rate
v-model="qualityRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
<u-rate v-model="qualityRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
</view>
<!-- 配送速度 -->
<view class="rating-item">
<text class="rating-label">配送速度</text>
<u-rate
v-model="speedRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
<u-rate v-model="speedRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
</view>
<!-- 快递员服务 -->
<view class="rating-item">
<text class="rating-label">快递员服务</text>
<u-rate
v-model="serviceRating"
size="40"
active-color="#FFB400"
inactive-color="#EEEEEE"
gutter="60"
></u-rate>
<u-rate v-model="serviceRating" size="40" active-color="#FFB400" inactive-color="#EEEEEE" gutter="60"></u-rate>
</view>
<!-- 评价输入 -->
<view class="comment-section">
<textarea
class="comment-input"
placeholder="亲,可以从其他角度评价商品,可以帮助我们为您提供更好的服务~"
v-model="comment"
></textarea>
<textarea class="comment-input" placeholder="亲,可以从其他角度评价商品,可以帮助我们为您提供更好的服务~" v-model="comment"></textarea>
</view>
<!-- 图片上传 -->
<view class="upload-section">
<view class="image-list">
<view
class="image-item"
v-for="(img, index) in imageList"
:key="index"
>
<view class="image-item" v-for="(img, index) in imageList" :key="index">
<image :src="img" class="uploaded-img"></image>
<view class="delete-btn" @click="deleteImage(index)">
<text class="delete-icon">×</text>
</view>
</view>
</view>
<view
class="upload-btn"
@click="chooseImage"
v-if="imageList.length < 3"
>
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/upload.png"
class="upload-icon"
></image>
<view class="upload-btn" @click="chooseImage" v-if="imageList.length < 3">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/upload.png" class="upload-icon">
</image>
<view class="upload-text">上传图片</view>
<view class="upload-count">({{ imageList.length }}/3)</view>
</view>
@ -103,24 +71,14 @@
</template>
<script>
import { picUrl, NavgateTo, request } from "../../../utils";
import { apiArr } from "../../../api/afterSale";
export default {
data() {
return {
//
goods: [
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index1.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index2.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index3.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index4.png" },
{ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/myOrder/order_index5.png" },
],
itemObj: {},
//
qualityRating: 5,
qualityRating: 0,
speedRating: 0,
serviceRating: 0,
//
@ -129,6 +87,9 @@ export default {
imageList: [],
};
},
onLoad(options) {
this.itemObj = JSON.parse(decodeURIComponent(options.item));
},
methods: {
//
chooseImage() {
@ -161,14 +122,25 @@ export default {
});
return;
}
// API
uni.showToast({
title: "评价提交成功",
icon: "success",
const params = {
order_id: this.itemObj.id,
goods_id: this.itemObj.commodity_order_item_list[0].goods_id,
user_id: uni.getStorageSync("userId"),
quality_score: this.qualityRating,
speed_score: this.speedRating,
service_score: this.serviceRating,
user_review: this.comment,
review_image: this.imageList,
}
request(apiArr.createReview, "POST", params).then((res) => {
uni.showToast({
title: "评价提交成功",
icon: "success",
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
},
},
};

View File

@ -66,8 +66,8 @@
}
.image-item image {
width: 80rpx;
height: 80rpx;
width: 100%;
height: 100%;
}
.image-text {

View File

@ -1,44 +1,38 @@
<template>
<view class="evaluation-container">
<!-- 评价内容区域 -->
<view class="evaluation-content">
<!-- 订单头部信息 -->
<view class="order-header">
<text class="order-name">{{ orderInfo.orderName }}</text>
<text class="order-number">{{ orderInfo.orderNumber }}</text>
</view>
<view class="evaluation-area">
<text class="evaluation-text">{{ evaluationInfo.content }}</text>
<!-- 评价图片区域 -->
<view class="image-list">
<view
class="image-item"
v-for="(img, index) in evaluationInfo.images"
:key="index"
>
<image :src="img.url" mode="aspectFill"></image>
<text class="image-text">{{ img.text }}</text>
<view>
<view v-for="(item, index) in orderList" :key="index">
<view class="evaluation-content">
<!-- 订单头部信息 -->
<view class="order-header">
<text class="order-name">{{ item.supplier_name }}</text>
<text class="order-number">{{ item.order_no }}</text>
</view>
</view>
<text class="order-date">{{ orderInfo.date }}</text>
</view>
<!-- 商品信息区域 -->
<view class="product-info">
<view class="product-img">
<image :src="productInfo.imageUrl" mode="aspectFit"></image>
<view
class="tag"
v-for="(tag, index) in productInfo.tags"
:key="index"
>{{ tag }}</view
>
</view>
<view class="product-details">
<text class="product-name">{{ productInfo.name }}</text>
<text class="product-spec">{{ productInfo.spec }}</text>
<text class="product-unit">{{ productInfo.unit }}</text>
<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"></image>
</view>
</view>
<text class="order-date">{{ item.evaluate_info.create_time }}</text>
</view>
<!-- 商品信息区域 -->
<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>
</view>
<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>
</view>
</view>
</view>
</view>
</view>
@ -47,30 +41,61 @@
<script>
export default {
props: {
orderData: {
type: Array,
default: () => []
}
},
data() {
return {
orderInfo: {
orderName: "衡水商贸国际公司",
orderNumber: "4534534255",
date: "2025-07-21",
},
evaluationInfo: {
content: "评价文字内容",
images: [
{ url: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/eval1.png", text: "评价图片" },
{ url: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/eval2.png", text: "评价图片" },
{ url: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/eval3.png", text: "评价图片" },
],
},
productInfo: {
imageUrl: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/product.png",
tags: ["当日达", "当日达"],
name: "货品名称",
spec: "货品规格",
unit: "货品单位",
},
orderList: [],
};
},
methods: {
//
parseReviewImages(reviewImage) {
try {
//
if (typeof reviewImage === 'string' && reviewImage.trim()) {
//
const cleanStr = reviewImage.replace(/^"|"$/g, '').replace(/^'|'$/g, '').trim();
let images = [];
// 使JSON
if (cleanStr.startsWith('[') && cleanStr.endsWith(']')) {
images = JSON.parse(cleanStr);
} else if (cleanStr.includes(',')) {
//
images = cleanStr.split(',').map(img => img.trim());
}
// URL
return Array.isArray(images) ? images : [];
}
//
return Array.isArray(reviewImage) ? reviewImage : [];
} catch (error) {
console.error('解析评价图片失败:', error);
return [];
}
}
},
mounted() {
//
this.orderList = this.orderData;
console.log("🚀 ~ mounted ~ this.orderList:", this.orderList);
},
watch: {
// orderData
orderData: {
handler(newVal) {
this.orderList = newVal;
console.log("🚀 ~ watch orderData ~ this.orderList:", this.orderList);
},
deep: true
}
}
};
</script>

View File

@ -98,7 +98,7 @@
font-weight: bold;
margin-bottom: 8rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
@ -107,6 +107,10 @@
font-size: 22rpx;
color: #666;
margin-bottom: 10rpx;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
.goods-price {

View File

@ -653,7 +653,6 @@ export default {
//
changeGG(item, index) {
console.log("🚀 ~ changeGG ~ item:", item)
this.currentGG = item;
this.currentGGIndex = index;
if (this.currentGG.cart_count) {
@ -666,7 +665,10 @@ export default {
this.changePrice = item.sales_price
},
car() {
NavgateTo("../shopCar/index");
const item = {
is_group_buy: 1,
}
NavgateTo("../shopCar/index?item=" + JSON.stringify(item));
},
//
@ -712,6 +714,7 @@ export default {
count: countVal,
},
],
group_buy_id: this.info.commodity_goods_info_list[this.currentGGIndex].group_buy_activity_id,
}
request(apiArr.updateCar, "POST", params).then((res) => {
that.getShopCar();
@ -734,6 +737,7 @@ export default {
count: newCount,
},
],
group_buy_id: this.info.commodity_goods_info_list[this.currentGGIndex].group_buy_activity_id,
};
request(apiArr.updateCar, "POST", params).then((res) => {

View File

@ -334,7 +334,7 @@ page {
bottom: 50rpx;
left: 15%;
width: 70%;
z-index: 99;
/* z-index: 99; */
}
/* 自提样式 */

View File

@ -233,7 +233,7 @@
已支付成功
</view>
<view class="boxshadow_img">
<view style="margin-bottom: 15rpx;">0230 7559 1358</view>
<view style="margin-bottom: 15rpx;">{{verifyCode}}</view>
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share_img.png">
</image>
@ -316,6 +316,9 @@ export default {
// id
group_buy_activity_id: 0,
//
verifyCode: '',
};
},
computed: {
@ -334,6 +337,7 @@ export default {
},
onLoad(options) {
this.carList = JSON.parse(options.shopCarList)
console.log("🚀 ~ onLoad ~ JSON.parse(options.shopCarList):", JSON.parse(options.shopCarList))
},
onShow() {
this.getUserAddress()
@ -615,9 +619,9 @@ export default {
group_buy_activity_id: this.group_buy_activity_id,
}
request(apiArr.queryOrder, "POST", params).then(res => {
this.verifyCode = res.verification_code
this.boxshadow1 = true
})
},
fail: (payErr) => {
uni.showToast({

View File

@ -77,9 +77,9 @@ page {
}
.grid_Pic {
width: 61.5rpx;
height: 63.14rpx;
margin-bottom: 20rpx;
width: 80rpx;
height: 80rpx;
margin-bottom: 15rpx;
}
.searchBox {

View File

@ -82,7 +82,7 @@
<view class="tabList">
<u-grid :col="rowNum" :border="false">
<u-grid-item v-for="(item, index) in tabList" @click="headerServerClick(item)" :key="index">
<image class="grid_Pic" :src="item.icon_src" mode=""></image>
<image class="grid_Pic" :src="item.icon_src" mode="aspectFill"></image>
<text>{{ item.title }}</text>
</u-grid-item>
</u-grid>
@ -1071,7 +1071,7 @@ export default {
this.switchCategory(id);
this.showDropdown = false;
},
//
obtainLocation() {
//
@ -1079,10 +1079,10 @@ export default {
title: '定位中...',
mask: true
});
//
uni.removeStorageSync('location');
//
try {
this.getUserLocation();
@ -1132,7 +1132,7 @@ export default {
}
},
onShow() {
this.showNav = uni.getStorageSync("is_worker")
this.showNav = uni.getStorageSync("userId") ? uni.getStorageSync("is_worker") : false
this.flag = false
this.bottomPageNum = 1
console.log('当前页面展示的城市信息', this.currentCity)

View File

@ -163,7 +163,8 @@ margin-right: 20rpx;
margin-bottom: 20rpx;
}
.grid-text {
font-size: 24rpx;
font-size: 28rpx;
font-weight: bold;
}

View File

@ -8,33 +8,51 @@ export const picUrl = 'https://test.hshuishang.com'; // 图片地址前缀
* @param {String} path - 跳转的目标页面路径
* @param {Object} options - 配置选项对象
* @param {Boolean} options.isLogin - 是否需要校验登录态默认为 true
* @param {Boolean} options.forceReplace - 是否强制替换当前页面解决webview数量限制问题默认为 false
*/
export const NavgateTo = (path, options = {}) => {
// 首页不需要登录验证
// 首页不需要登录验证
if (path === '/pages/index/index') {
uni.navigateTo({ url: path });
return;
}
const { isLogin = true } = options;
const { isLogin = true, forceReplace = false } = options;
const ctoken = uni.getStorageSync('ctoken');
if (isLogin) {
if (!ctoken) {
uni.redirectTo({ url: '/pages/login/login' })
return
} else {
if (path == '1') {
uni.navigateBack({
delta: 1
})
return
}
uni.navigateTo({
url: path
});
return;
}
// 登录校验
if (isLogin && !ctoken) {
uni.redirectTo({ url: '/pages/login/login' })
return
}
// 返回上一页
if (path == '1') {
uni.navigateBack({
delta: 1
})
return
}
// 选择合适的跳转方式
const navigateOptions = {
url: path,
fail: (err) => {
// 处理webview数量限制错误
if (err.errMsg && err.errMsg.includes('webview count limit')) {
console.warn('检测到webview数量限制自动切换为redirectTo模式');
uni.redirectTo({ url: path });
} else {
console.error('页面跳转失败:', err);
}
}
};
// 如果强制替换使用redirectTo
if (forceReplace) {
uni.redirectTo(navigateOptions);
} else {
uni.navigateTo(navigateOptions);
}
uni.navigateTo({ url: path })
}
/**
@ -82,6 +100,9 @@ export const request = (url, method = 'POST', data = {}, options = {}) => {
success: (res) => {
// console.log('请求成功,接口返参', res);
if (res.statusCode == 401 || (res.statusCode == 500 && res.data.msg == "效验令牌失败")) {
uni.removeStorageSync('ctoken');
uni.removeStorageSync('userId');
uni.removeStorageSync('is_worker');
uni.showModal({
title: '提示',
content: '请登录后查看',