调整订单相关页面逻辑和功能

- 修改环境配置,确定使用生产环境
- 优化订单商品组件,调整导航逻辑
- 移除待确认和核销弹窗
- 更新订单详情页,增加商家判断逻辑
This commit is contained in:
mkm 2024-10-08 22:48:16 +08:00
parent a54ba0632e
commit a8d038b011
4 changed files with 8 additions and 16 deletions

View File

@ -3,9 +3,9 @@ let WSS_URL
import store from "@/store/user.js" import store from "@/store/user.js"
// 环境 // 环境
// let env = "dev" // let env = "dev"
// let env = "prod" let env = "prod"
// let env = "release"; // let env = "release";
let env = "local"; // let env = "local";
switch (env) { switch (env) {
case 'dev': case 'dev':

View File

@ -87,18 +87,9 @@
}) })
const navTo = () => { const navTo = () => {
if (props.datas.status == -1) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/afterSales/afterSalesOrderDetail", url: `/pagesOrder/detail/detail?is_mer=1&id=${props.datas.id}`
success(res) {
res.eventChannel.emit('afterSalesDetail', props.datas)
}
}) })
} else {
uni.navigateTo({
url: `/pagesOrder/detail/detail?type=${props.datas.paid}&id=${props.datas.id}`
})
}
} }
const emit = defineEmits(['cancleOrder', 'rePay', 'takeOrder', 'purchaseAgain']); const emit = defineEmits(['cancleOrder', 'rePay', 'takeOrder', 'purchaseAgain']);

View File

@ -41,8 +41,6 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<orderCanclePopup :show="showCancel" @close="showCancel=false" @change="submitCancel" />
<modal :show="showTake" title="确认收货" content="请确认您已收到货" @close="showTake=false" @change="confirmReceipt" />
</template> </template>
<script setup> <script setup>

View File

@ -104,7 +104,7 @@
</view> </view>
</view> </view>
<view class="qr_code" v-if="datas.paid == 1 && datas.status == 1"> <view class="qr_code" v-if="datas.paid == 1 && datas.status == 1 &&is_mer!=1">
<up-image :src="datas.verify_base64" width="404rpx" height="60rpx"></up-image> <up-image :src="datas.verify_base64" width="404rpx" height="60rpx"></up-image>
<view style="font-weight: bold;color: #333;font-size: 26;margin-top: 20rpx;"> <view style="font-weight: bold;color: #333;font-size: 26;margin-top: 20rpx;">
核销码 {{datas.verify_code}} 核销码 {{datas.verify_code}}
@ -190,7 +190,7 @@
</block> </block>
<block v-else> <block v-else>
<view></view> <view></view>
<view style="width: 450rpx;"> <view style="width: 450rpx;" v-if="is_mer!=1">
<!-- <up-button v-if="datas.status==0||datas.status==1" color="#20B128" shape="circle" <!-- <up-button v-if="datas.status==0||datas.status==1" color="#20B128" shape="circle"
@click="showTake=true">确认收货</up-button> --> @click="showTake=true">确认收货</up-button> -->
<up-button color="#20B128" plain shape="circle" @click="purchaseAgain">再次购买</up-button> <up-button color="#20B128" plain shape="circle" @click="purchaseAgain">再次购买</up-button>
@ -263,9 +263,11 @@
const store_info = ref({}) const store_info = ref({})
const datas = ref({}) const datas = ref({})
const is_mer = ref(0)
const getDetails = () => { const getDetails = () => {
orderDetailApi({ orderDetailApi({
order_id: datas.value.id, order_id: datas.value.id,
is_mer:is_mer.value
// ...location // ...location
}).then(res => { }).then(res => {
datas.value = res.data; datas.value = res.data;
@ -516,6 +518,7 @@
}); });
if (option.id) { if (option.id) {
datas.value.id = option.id; datas.value.id = option.id;
is_mer.value = option.is_mer;
getLocation() getLocation()
} }
}) })