From 9287e9a02f9a9a85b0c4dc49f04d1426af4a0ede Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期六, 25 四月 2026 15:16:51 +0800
Subject: [PATCH] 支付宝支付ddd
---
small-program/shop/pages/write-off/write-off.vue | 64 ++++++++++++++++---------------
1 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/small-program/shop/pages/write-off/write-off.vue b/small-program/shop/pages/write-off/write-off.vue
index e777cba..f001417 100644
--- a/small-program/shop/pages/write-off/write-off.vue
+++ b/small-program/shop/pages/write-off/write-off.vue
@@ -2,12 +2,12 @@
<view class="box">
<view class="title">杈撳叆鏍搁獙鐮�</view>
<view class="input">
- <input type="number" v-model="code" placeholder="璇疯緭鍏�6浣嶅彇浠剁爜" />
+ <input type="number" v-model="code" placeholder="璇疯緭鍏�6浣嶆牳楠岀爜" />
</view>
<view class="btn" v-if="!loading" @click="confirmDo">纭</view>
<view class="btn1" v-if="loading" >姝e湪鏌ヨ</view>
<view class="footer" @click="scanCodeDo">
- <image src="/shop/images/ic_saoma@2x.png" mode="widthFix"></image>
+ <image src="/shop/static/images/ic_saoma@2x.png" mode="widthFix"></image>
<text>鎵爜鏍搁攢</text>
</view>
<u-popup :show="show1" round="15" :safeAreaInsetBottom="false" mode="center">
@@ -15,7 +15,7 @@
<view class="tc-contemt">
<view class="tc-contemt-title">璁㈠崟鏌ヨ缁撴灉</view>
<view class="tc-contemt-nr">
- 璁㈠崟銆恵{info.code}}銆戜笉婊¤冻鏍搁攢鏉′欢锛�
+ 璇ヨ鍗曚笉婊¤冻鏍搁攢鏉′欢锛�
</view>
</view>
<view class="tc-btn">
@@ -30,7 +30,7 @@
import { mapState } from 'vuex'
export default {
computed: {
- ...mapState(['navHeight', 'statusbarHeight'])
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
},
data() {
return {
@@ -42,11 +42,13 @@
};
},
onShow() {
- // this.loading =false
- // this.show1 =false
- // this.info={}
- // this.code =''
- // this.checkShopLogin()
+ this.loading =false
+ this.show1 =false
+ this.info={}
+ this.code =''
+ this.checkShopLogin()
+ },
+ onLoad(options) {
},
methods:{
scanCodeDo(){
@@ -73,10 +75,10 @@
this.getShopDetail()
}
},
- jumpWriteoffA(){
- if(this.info && this.info.orderId){
+ jumpWriteoffA(type){
+ if(this.info && this.info.id){
uni.navigateTo({
- url: '/pagesA/pages/write-off-a/write-off-a?id='+this.info.orderId
+ url: '/shop/pages/write-off-a/write-off-a?id='+this.info.id+'&type='+type
})
}
},
@@ -89,32 +91,32 @@
}
this.loading =true
var that =this
- that.$u.api.getOrderDetailByCode({exchangeCode:this.code,tokenType:1 })
- .then(res=>{
- console.log(res)
- if (res.code === 200) {
- that.info = res.data
- if(res.data.orderStatus == 1 && res.data.receiveType ==1){
- that.jumpWriteoffA()
- }else{
- this.show1 = !this.show1
- this.loading =false
- }
- }
- }).catch(e=>{
+ try{
+ that.$u.api.shopOrderDetail({verifyCode:this.code,tokenType:1 })
+ .then(res=>{
+ console.log(res)
+ if (res.code === 200) {
+ that.info = res.data
+ if(res.data.status === 1 || res.data.status === 5 || res.data.status === 3){
+ that.jumpWriteoffA(0)
+ } else{
+ this.show1 = !this.show1
+ }
+ }
+ this.loading =false
+ })
+ }catch(e){
this.loading =false
- }).finally(e=>{
- // this.loading =false
- })
+ }
},
checkShopLogin(){
var that =this
- if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){
+ if( this.shopInfo ==null || this.shopToken==null || this.shopToken == ''){
uni.navigateTo({
- url: '/pages/login/login'
+ url: '/shop/pages/login/login'
})
}
- },
+ }
}
}
</script>
--
Gitblit v1.9.3