From 3f9032e92fdd383bfefc87a0bec9b242e1223851 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 09 六月 2026 17:08:44 +0800
Subject: [PATCH] 改bug
---
small-program/pages/delivery-order-detail/delivery-order-detail.vue | 128 ++++++++++++++++--------------------------
1 files changed, 49 insertions(+), 79 deletions(-)
diff --git a/small-program/pages/delivery-order-detail/delivery-order-detail.vue b/small-program/pages/delivery-order-detail/delivery-order-detail.vue
index 993ec80..ca14691 100644
--- a/small-program/pages/delivery-order-detail/delivery-order-detail.vue
+++ b/small-program/pages/delivery-order-detail/delivery-order-detail.vue
@@ -58,9 +58,9 @@
<view class="item-qrcode" v-if=" (info.type ===0 && info.status >=1 &&info.status <7) || (info.type ===1 && (info.status ===1 || (info.takeShopId && info.status ===5)))">
<!-- <image src="/static/image/btn_upload@2x.png" mode="widthFix"></image> -->
<text style="font-size: 36rpx;font-weight: 600;margin-bottom: 20rpx;">琛屾潕缂栧彿锛歿{info.sortnum || ''}}</text>
- <view style="width: 360rpx; height: 360rpx;">
- <canvas canvas-id="qrcodeCanvas" id="qrcodeCanvas":style="'width: '+width+'px; height:'+height+'px;'"></canvas>
- <image class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image>
+ <view class="qrcode-box" style="width: 360rpx; height: 360rpx;">
+ <canvas v-if="!qrcodeImage" canvas-id="qrcodeCanvas" id="qrcodeCanvas" :style="'width: '+width+'px; height:'+height+'px;'+'opacity: 0;'"></canvas>
+ <image v-else class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image>
</view>
<text>{{info.memberVerifyCode || ''}}</text>
<text @tap="copyCode(info.memberVerifyCode||'')">鏍搁攢鐮�</text>
@@ -253,10 +253,9 @@
<view class="footer-btns">
<view class="btn kong" @click="contactPhone(info,0)" v-if="info.status ===1 || info.status==2 || info.status===98">鑱旂郴闂ㄥ簵</view>
<view class="btn kong" @click="openTrackPopup">璁㈠崟杞ㄨ抗</view>
- <view class="btn kong" v-if="[0,1].includes(info.status) && info.abnormalOrder !== 1" @click="cancelOrder(info)">鍙栨秷璁㈠崟</view>
+ <view class="btn kong" v-if="[0,1].includes(info.status) && info.exceptionStatus !== 1" @click="cancelOrder(info)">鍙栨秷璁㈠崟</view>
<view class="btn kong" @click="deleteOrder(info)" v-if="info.status ===7 || info.status===96 || info.status == 99">鍒犻櫎璁㈠崟</view>
<view class="btn you" @click="payOrder(info)" v-if="info.status ===0">绔嬪嵆鏀粯</view>
-<!-- <view class="btn you" v-if="info.status >=1 &&info.status <7 " @click="openQrcode(info)" >鏍搁攢鐮�</view>
--> <view class="btn you" @click="evaluateOrder(info)" v-if="info.status ===7 && !info.commentStatus ">璇勪环璁㈠崟</view>
<view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus===3 ">绔嬪嵆鏀粯</view>
</view>
@@ -267,11 +266,10 @@
<view class="btn kong" @click="openTrackPopup">璁㈠崟杞ㄨ抗</view>
<view class="btn kong" @click="contactPhone(info,2)" v-if="[3,4,5].includes(info.status) && !info.takeShopId">鑱旂郴楠戞墜</view>
<view class="btn kong" @click="contactPhone(info,1)" v-if="info.status ===5 && info.takeShopId">鑱旂郴闂ㄥ簵</view>
- <view class="btn kong" v-if="[0,1,2].includes(info.status)" @click="cancelOrder(info)">鍙栨秷璁㈠崟</view>
+ <view class="btn kong" v-if="[0].includes(info.status)" @click="cancelOrder(info)">鍙栨秷璁㈠崟</view>
<view class="btn you" @click="payOrder(info)" v-if="info.status ===0">绔嬪嵆鏀粯</view>
<view class="btn kong" @click="deleteOrder(info)" v-if="info.status ===7 || info.status===96 || info.status == 99">鍒犻櫎璁㈠崟</view>
- <view class="btn you" @click="cancelOrder(info)" v-if="info.status ===1">鐢宠閫�娆�</view>
-<!-- <view class="btn you" v-if="info.status ===1 || (info.takeShopId && info.status ===5)" @click="openQrcode(info)" >鏍搁攢鐮�</view>
+ <view class="btn you" @click="cancelOrder(info)" v-if="info.exceptionStatus === 0 && [1,2].includes(info.status)">鐢宠閫�娆�</view>
--> <view class="btn you" @click="doneOrder(info)" v-if="!info.takeShopId && info.status ===5">纭鏀惰揣</view>
<view class="btn you" @click="evaluateOrder(info)" v-if="info.status ===7 && !info.commentStatus ">璇勪环璁㈠崟</view>
<view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus ===3">绔嬪嵆鏀粯</view>
@@ -318,6 +316,7 @@
:key="track.key + '-' + imgIndex"
:src="img"
mode="aspectFill"
+ @tap="previewImage(trackList[index].images, imgIndex)"
></image>
</view>
</view>
@@ -371,19 +370,6 @@
</view>
</view>
</u-popup>
- <!-- <u-popup :show="showQrcode" round="15" @close="openQrcode()" :safeAreaInsetBottom="false" mode="bottom" :closeable="true" :closeOnClickOverlay="false">
- <view class="tc" style="height: 700rpx;width: 100%; ">
- <view class="tc-contemt" style="text-align: center;">
- <view class="tc-contemt-title" style="text-align: center;">鏍搁攢鐮�</view>
- <view class="qrcode-box">
- <canvas canvas-id="qrcodeCanvas1" id="qrcodeCanvas1" style="width: 100px; height: 100px;"></canvas>
- <image class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image>
- </view>
- <text class="pickup-code">{{ info.memberVerifyCode||'' }}</text>
- <text class="pickup-tip" @tap="copyCode(info.memberVerifyCode||'')">鐐瑰嚮澶嶅埗鑷彁鐮�</text>
- </view>
- </view>
- </u-popup> -->
</view>
</template>
@@ -439,6 +425,12 @@
this.linkItem={title:'',linkname:'',linkphone:''}
},
methods:{
+ previewImage(images, current) {
+ uni.previewImage({
+ urls: images,
+ current: current
+ })
+ },
async openTrackPopup() {
uni.showLoading({
title: '鍔犺浇涓�...',
@@ -647,30 +639,6 @@
}
})
},
- async openQrcode(){
- this.qrcodeImage=null
- var that =this
- if(!this.showQrcode){
- this.showQrcode =true
- drawQrcode({
- canvasId: 'qrcodeCanvas1',
- text: this.info.memberVerifyCode,
- width: this.rpxToPx(360),
- height: this.rpxToPx(360),
- correctLevel: 2
- })
- that.$nextTick(() => {
- uni.canvasToTempFilePath({
- canvasId: 'qrcodeCanvas',
- success: (res) => {
- that.qrcodeImage = res.tempFilePath
- }
- }, that)
- })
- }else{
- this.showQrcode = false
- }
- },
async showQrcodeImg(){
console.log("showQrcodeImg")
if((this.info.type ===0 && this.info.status >=1 &&this.info.status <7)
@@ -681,37 +649,35 @@
}
this.qrcodeImage=null
var that =this
- drawQrcode({
- canvasId: 'qrcodeCanvas',
- text: this.info.memberVerifyCode,
- width: this.rpxToPx(360),
- height: this.rpxToPx(360),
- correctLevel: 2
- })
- that.$nextTick(() => {
- uni.canvasToTempFilePath({
+ this.$nextTick(() => {
+ drawQrcode({
canvasId: 'qrcodeCanvas',
- success: (res) => {
- console.log("showQrcodeImg-------鎴愬姛",res)
- that.qrcodeImage = res.tempFilePath
- },
- fail: (err) => {
- console.log("showQrcodeImg-------澶辫触",err)
- }
- }, that)
+ text: this.info.memberVerifyCode,
+ width: this.rpxToPx(360),
+ height: this.rpxToPx(360),
+ correctLevel: 2
+ })
+ setTimeout(() => {
+ uni.canvasToTempFilePath({
+ canvasId: 'qrcodeCanvas',
+ x: 0,
+ y: 0,
+ width: that.width,
+ height: that.height,
+ destWidth: that.width,
+ destHeight: that.height,
+ success: (res) => {
+ console.log("showQrcodeImg-------鎴愬姛",res)
+ that.qrcodeImage = res.tempFilePath
+ },
+ fail: (err) => {
+ console.log("showQrcodeImg-------澶辫触",err)
+ // 濡傛灉澶辫触锛屼娇鐢� canvas 鐩存帴鏄剧ず
+ that.qrcodeImage = ''
+ }
+ }, that)
+ }, 300)
})
- // setTimeout(() => {
- // uni.canvasToTempFilePath({
- // canvasId: 'qrcodeCanvas',
- // success: (res) => {
- // console.log("showQrcodeImg-------鎴愬姛",res)
- // that.qrcodeImage = res.tempFilePath
- // },
- // fail: (err) => {
- // console.log("showQrcodeImg-------澶辫触",err)
- // }
- // }, this)
- // }, 100)
}
},
@@ -1367,11 +1333,15 @@
width: 360rpx;
height: 360rpx;
}
- #qrcodeCanvas {
- position: fixed;
- top: -100%;
- left: -100%;
- opacity: 0;
+ .qrcode-box {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+ canvas {
+ width: 360rpx;
+ height: 360rpx;
+ }
}
text {
&:nth-child(2) {
--
Gitblit v1.9.3