二维码修改 售后修改
This commit is contained in:
parent
173e7051f1
commit
a9071886cc
|
@ -1,101 +1,104 @@
|
|||
<template>
|
||||
<view class="view-popup">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view v-if="nav" style="width: 100%;background-color: #fff;" :style="{height: height + 'px'}"></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view v-if="nav" style="width: 100%;height: calc( var(--status-bar-height) + 44px );background-color: #fff;"></view>
|
||||
<!-- #endif -->
|
||||
<view class="center">
|
||||
<slot></slot>
|
||||
<view class="up" @click="close">
|
||||
<text>点击收起</text>
|
||||
<up-icon name="arrow-up"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-popup">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view v-if="nav" style="width: 100%;background-color: #fff;" :style="{height: height + 'px'}"></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view v-if="nav" style="width: 100%;height: calc( var(--status-bar-height) + 44px );background-color: #fff;">
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="center">
|
||||
<slot></slot>
|
||||
<view class="up" @click="close">
|
||||
<text>点击收起</text>
|
||||
<up-icon name="arrow-up"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import {
|
||||
ref
|
||||
} from "vue"
|
||||
|
||||
const props = defineProps({
|
||||
nav: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
const props = defineProps({
|
||||
nav: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['close', 'click'])
|
||||
const close = () => {
|
||||
emit('close')
|
||||
}
|
||||
const emit = defineEmits(['close', 'click'])
|
||||
const close = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
const height = ref(0);
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
// 获取手机顶部状态栏的高度
|
||||
const statusBarHeight = res.statusBarHeight || 0;
|
||||
// #ifdef MP-WEIXIN
|
||||
const height = ref(0);
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
// 获取手机顶部状态栏的高度
|
||||
const statusBarHeight = res.statusBarHeight || 0;
|
||||
|
||||
// 获取导航栏的高度(手机状态栏高度 + 胶囊高度 + 胶囊的上下间距)
|
||||
const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
const navBarHeight = menuButtonInfo.height + (menuButtonInfo.top - statusBarHeight) * 2;
|
||||
// 获取导航栏的高度(手机状态栏高度 + 胶囊高度 + 胶囊的上下间距)
|
||||
const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
const navBarHeight = menuButtonInfo.height + (menuButtonInfo.top - statusBarHeight) * 2;
|
||||
|
||||
// 计算顶部图标距离
|
||||
const topIconDistance = statusBarHeight + navBarHeight;
|
||||
// 计算顶部图标距离
|
||||
const topIconDistance = statusBarHeight + navBarHeight;
|
||||
|
||||
// 打印顶部图标距离
|
||||
console.log('顶部图标距离:', topIconDistance);
|
||||
height.value = topIconDistance;
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取系统信息失败:', err);
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
// 打印顶部图标距离
|
||||
console.log('顶部图标距离:', topIconDistance);
|
||||
height.value = topIconDistance;
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取系统信息失败:', err);
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-popup {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
background-color: rgba(#000, 0.3);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
.view-popup {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
background-color: rgba(#000, 0.3);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 11;
|
||||
|
||||
.center {
|
||||
animation: slideDown 0.3s forwards;
|
||||
}
|
||||
.center {
|
||||
animation: slideDown 0.3s forwards;
|
||||
}
|
||||
|
||||
.up {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 0 0 28rpx 28rpx;
|
||||
border-top: 1rpx solid #f6f6f6;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.up {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 0 0 28rpx 28rpx;
|
||||
border-top: 1rpx solid #f6f6f6;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
from {
|
||||
transform: translateY(-100%);
|
||||
/* 初始状态:向上偏移100% */
|
||||
}
|
||||
@keyframes slideDown {
|
||||
from {
|
||||
transform: translateY(-100%);
|
||||
/* 初始状态:向上偏移100% */
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateY(0);
|
||||
/* 最终状态:无偏移 */
|
||||
}
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
/* 最终状态:无偏移 */
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -27,7 +27,7 @@
|
|||
<text class="goods_name">{{item.store_name}}</text>
|
||||
</view>
|
||||
<view class="afterSales-goods-right-info">
|
||||
<text class="goods_desc">牛腩块</text>
|
||||
<text class="goods_desc">{{item.unit || ''}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -83,7 +83,7 @@
|
|||
|
||||
onLoad(() => {
|
||||
const eventChannel = instance.getOpenerEventChannel();
|
||||
eventChannel.on('afterSalesOrderDetail', function(data) {
|
||||
eventChannel.on('afterSalesDetail', function(data) {
|
||||
shopInfo.value = data;
|
||||
console.log(shopInfo.value);
|
||||
})
|
||||
|
|
|
@ -274,6 +274,7 @@
|
|||
|
||||
const searchKeyword = () => {
|
||||
where.value.name = keyword.value;
|
||||
where.value.store_name = keyword.value;
|
||||
getGoodList();
|
||||
}
|
||||
|
||||
|
@ -287,6 +288,7 @@
|
|||
page_size: 25,
|
||||
name: '',
|
||||
order: '',
|
||||
store_name: '',
|
||||
store_id: STORE_INFO.id || ''
|
||||
})
|
||||
|
||||
|
@ -307,7 +309,8 @@
|
|||
goodListApi({
|
||||
...where.value,
|
||||
class_all: class_all,
|
||||
class: class_id
|
||||
class: class_id,
|
||||
cate_id: class_id,
|
||||
}).then(res => {
|
||||
if (loadmore) goodList.value.push(...res.data.lists);
|
||||
else goodList.value = res.data.lists;
|
||||
|
@ -427,8 +430,6 @@
|
|||
})
|
||||
}
|
||||
|
||||
// uni.setStorageSync()
|
||||
|
||||
// 选择商品相关
|
||||
const showGoodPopup = ref(false);
|
||||
const goodRef = ref(null);
|
||||
|
@ -517,16 +518,14 @@
|
|||
const instance = getCurrentInstance(); // 获取组件实例
|
||||
const getWXDom = () => {
|
||||
let query = uni.createSelectorQuery().in(instance).select("#drag_area");
|
||||
query
|
||||
.fields({
|
||||
size: true,
|
||||
scrollOffset: true,
|
||||
},
|
||||
(data) => {
|
||||
targetHeight.value = data.scrollHeight - data.height
|
||||
}
|
||||
)
|
||||
.exec();
|
||||
query.fields({
|
||||
size: true,
|
||||
scrollOffset: true,
|
||||
},
|
||||
(data) => {
|
||||
targetHeight.value = data.scrollHeight - data.height
|
||||
}
|
||||
).exec();
|
||||
}
|
||||
setTimeout(() => {
|
||||
getWXDom()
|
||||
|
|
|
@ -82,9 +82,8 @@
|
|||
</view>
|
||||
|
||||
<view class="qr_code" v-if="datas.paid == 1 && datas.status == 1">
|
||||
<w-barcode :options="options"></w-barcode>
|
||||
<!-- <QRCode :val="datas.verify_code" :size="150"></QRCode> -->
|
||||
<view style="font-weight: bold;color: #333;font-size: 26;">
|
||||
<up-image :src="datas.verify_img" width="404rpx" height="60rpx"></up-image>
|
||||
<view style="font-weight: bold;color: #333;font-size: 26;margin-top: 20rpx;">
|
||||
核销码 {{datas.verify_code}}
|
||||
</view>
|
||||
</view>
|
||||
|
@ -196,7 +195,6 @@
|
|||
import orderCanclePopup from "@/components/orderCanclePopup.vue";
|
||||
import shopListPopupVue from "@/components/shopListPopup.vue";
|
||||
import modal from "@/components/modal.vue";
|
||||
// import QRCode from "@/uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue";
|
||||
import {
|
||||
orderDetailApi,
|
||||
cancelOrderApi,
|
||||
|
@ -242,9 +240,7 @@
|
|||
order_id: datas.value.id
|
||||
}).then(res => {
|
||||
datas.value = res.data;
|
||||
|
||||
options.code = datas.value.verify_code; // 生成条形码的值
|
||||
|
||||
shopInfo.value = res.data.store_info;
|
||||
if (addressList.value.length > 0 && res.data.paid) {
|
||||
addressInfo.value = addressList.value.find(item => item.address_id == res.data.address_id);
|
||||
|
@ -504,13 +500,9 @@
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 500rpx;
|
||||
height: 300rpx;
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
|
||||
view {
|
||||
margin-top: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.m-address {
|
||||
|
@ -557,7 +549,6 @@
|
|||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
color: #989898;
|
||||
// background-color: red;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
|
|
|
@ -53,8 +53,9 @@
|
|||
@click="rePay">立即支付</up-button></view>
|
||||
</view>
|
||||
<view v-else class="item-btn">
|
||||
<view @click="showVerifyPop=true,options.code=datas.verify_code" v-if="datas.status==1"
|
||||
style="width: 80px;"><up-button size="small" plain color="#20B128" shape="circle">核销码</up-button></view>
|
||||
<view @click="showVerifyPop=true,options.code=datas.verify_img" v-if="datas.status==1" style="width: 80px;">
|
||||
<up-button size="small" plain color="#20B128" shape="circle">核销码</up-button>
|
||||
</view>
|
||||
<view @click="purchaseAgain" v-if="datas.status==2||datas.status==3" style="width: 80px;"><up-button
|
||||
size="small" plain color="#20B128" shape="circle">再次购买</up-button></view>
|
||||
<view @click="navTo" style="width: 80px;"><up-button size="small" plain color="#20B128"
|
||||
|
@ -68,16 +69,14 @@
|
|||
<up-popup :show="showVerifyPop" @close="showVerifyPop=false" @open="showVerifyPop=true" mode="center">
|
||||
<view style="width: 80vw;height: 20vh;position: relative;">
|
||||
<view style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);">
|
||||
<w-barcode v-if='options.code' :options="options"></w-barcode>
|
||||
<view style="font-weight: bold;color: #333;font-size: 26;text-align: center;">
|
||||
<up-image :src="datas.verify_img" width="404rpx" height="60rpx"></up-image>
|
||||
<view style="font-weight: bold;color: #333;font-size: 26;text-align: center;margin-top: 20rpx;">
|
||||
核销码 {{datas.verify_code}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</up-popup>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
@ -107,9 +106,12 @@
|
|||
})
|
||||
|
||||
const navTo = () => {
|
||||
if (props.status == 4) {
|
||||
if (props.datas.status == -1) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/afterSales/afterSalesOrderDetail?id=" + props.datas.id
|
||||
url: "/pages/afterSales/afterSalesOrderDetail",
|
||||
success(res) {
|
||||
res.eventChannel.emit('afterSalesDetail', props.datas)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
refresher-background="#F6F6F6">
|
||||
<view class="page-box">
|
||||
<view v-if="list.length>0" class="list">
|
||||
<good v-for="(item, index) in list" :datas="item" :key="index" :type="k"
|
||||
<good v-for="(item, index) in list" :datas="item" :key="index" :type="k" :status="status"
|
||||
:order_id='item.order_id' @cancleOrder="cancleOrder" @takeOrder="takeOrder"
|
||||
@rePay="rePay" @purchaseAgain="purchaseAgain" @applyAfterSales="applyAfterSales"></good>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue