dxz1228 лет назад: 2
Родитель
Сommit
51d9bd16d3

+ 1 - 1
src/apis/order.api.ts

@@ -77,7 +77,7 @@ enum API {
77 77
  * 申请退款
78 78
  */
79 79
 export function refundApply(id: string, request: RefundApplyRequest) {
80
-    return defHttp.post({
80
+    return detailHttp.post({
81 81
         url: API.REFUND_APPLY + `/${id}`,
82 82
         data: {
83 83
             ...request

+ 1 - 0
src/components/FNavBar/FNavBar.vue

@@ -4,6 +4,7 @@ import { useNavBar } from './use-nav-bar'
4 4
 
5 5
 const props = defineProps(navBarProps)
6 6
 const emit = defineEmits(navBarEmits)
7
+console.log('props',props);
7 8
 
8 9
 const {
9 10
   navBarRef,

+ 1 - 1
src/pages/after-sales-order-list/index.vue

@@ -109,7 +109,7 @@ function loadAllOrderList() {
109 109
     page: 1,
110 110
     limit: 10
111 111
   }).then(res => {
112
-    // console.log(res)
112
+    console.log('更新列表',res)
113 113
     state.allOrderTotal = res.total
114 114
     state.allOrderList = res.list
115 115
     // console.log(res)

+ 1 - 1
src/pages/home/components/header.vue

@@ -106,7 +106,7 @@ function handleShowMessage() {
106 106
 
107 107
 
108 108
     </div>
109
-    <div class="p-3">
109
+    <div class="">
110 110
       <FSearch />
111 111
 
112 112
     </div>

+ 8 - 3
src/pages/order-confirm/index.vue

@@ -60,6 +60,7 @@ onLoad(async (options) => {
60 60
   //   })
61 61
   // }
62 62
   const res = await getUserAddressList()
63
+  console.log('我可是res啊',res)
63 64
   if (res.list && res.list.length > 0) {
64 65
     data.addressInfo = res.list[0]
65 66
     data.addressId = res.list[0].address_id
@@ -246,9 +247,12 @@ function reTotal() {
246 247
     cart_id: data.cartId.split(','),
247 248
     address_id: data.addressId
248 249
   }).then(res => {
249
-    console.log(res)
250
+    console.log('我可是res啊',res)
250 251
     data.is_dacang_vip_product = res.is_dacang_vip_product
251 252
     data.cartOrder = res.order
253
+    console.log('data.cartOrder',data.cartOrder);
254
+    
255
+    
252 256
     data.totalPrice = res.order_price
253 257
     data.orderStatus = res.status
254 258
     // data.proPrice = res.proPrice
@@ -357,17 +361,18 @@ function reTotal() {
357 361
 
358 362
           </div>
359 363
           <div>
364
+            <!-- 优惠券数据 先写死 -->
360 365
             <FCell
361 366
                 v-if="item.mer_id != '148'"
362 367
                 title="优惠劵"
363
-                :value="item.order.coupon_price ? item.order.coupon_price : '暂无优惠券'"
368
+                :value="item.order.youhui_price!=0 ? item.order.youhui_price : '暂无优惠券'"
364 369
                 arrow
365 370
                 @click="gotoCoupon"
366 371
             ></FCell>
367 372
             <FCell
368 373
                 v-if="item.mer_id == '148'"
369 374
                 title="积分"
370
-                :value="userStore.userInfo.score ? userStore.userInfo.score : '暂无积分'"
375
+                :value="userStore.userInfo.score!='0' ? userStore.userInfo.score : '暂无积分'"
371 376
                 arrow
372 377
             ></FCell>
373 378
             <FCell

+ 38 - 24
src/pages/order/components/OrderItem.vue

@@ -1,16 +1,17 @@
1 1
 <script setup lang="ts">
2 2
 import FPrice from "~/components/FPrice/FPrice.vue";
3
-import {OrderListModel} from "~/apis/model/order.model";
4
-import {cancelOrder, takeOrder} from "~/apis/order.api";
5
-import {encodeBase64} from "~/utils/http/helper";
6
-import {deleteAddress} from "~/apis/user";
3
+import { OrderListModel } from "~/apis/model/order.model";
4
+import { cancelOrder, takeOrder } from "~/apis/order.api";
5
+import { encodeBase64 } from "~/utils/http/helper";
6
+import { deleteAddress } from "~/apis/user";
7 7
 import {
8 8
   DyProductModel,
9 9
   JdProductModel,
10 10
   SuNingProductModel,
11 11
   TaobaoProductThirdPartyWaresModel, VipProductModel
12 12
 } from "~/apis/model/product.model";
13
-import {DcProductModel} from "~/apis/model/dacang.model";
13
+import { DcProductModel } from "~/apis/model/dacang.model";
14
+import { error } from "console";
14 15
 const props = defineProps({
15 16
   orderItem: {
16 17
     type: Object,
@@ -93,6 +94,11 @@ function handleCancelOrder() {
93 94
 
94 95
     }, 300)
95 96
 
97
+  }).catch(error => {
98
+    // uni.showToast({
99
+    //   title: error,
100
+    //   icon: 'none'
101
+    // })
96 102
   })
97 103
 }
98 104
 
@@ -159,7 +165,7 @@ function handleComment(orderItem) {
159 165
 }
160 166
 
161 167
 function handleProductItemClick(
162
-    item
168
+  item
163 169
 ) {
164 170
   // function navigateToDetail(params) {
165 171
   //   let otherDetailUrl = `/pages/store/product/other`
@@ -167,15 +173,17 @@ function handleProductItemClick(
167 173
   //     url: `${otherDetailUrl}?params=${params}`
168 174
   //   })
169 175
   // }
170
-  // console.log(item)
176
+  console.log('我是item', item)
171 177
   // 大仓
172 178
   uni.navigateTo({
173
-    url: `/pages/store/product/detail?id=${item.orderProduct[0].product_id}`
179
+    url: `/pages/store/product/detail?id=${(item.orderProduct[0])?.product_id}`
174 180
   })
175 181
 }
176 182
 
177 183
 
178 184
 function handeRefund(orderItem) {
185
+  console.log('申请售后', orderItem);
186
+
179 187
   uni.navigateTo({
180 188
     // url: `/pages/refund/drawback?detail=${encodeBase64(orderItem)}`
181 189
     url: `/pages/refund/option?detail=${encodeBase64(orderItem)}&from=${props.tabValue}`
@@ -191,9 +199,7 @@ function handleShowObligationOrderDetail(orderItem) {
191 199
 
192 200
 <template>
193 201
   <div class="bg-white rounded p-3">
194
-    <div
195
-        @tap.stop="handleHeaderClick"
196
-        class="flex items-center justify-between f-hairline-bottom pb-3">
202
+    <div @tap.stop="handleHeaderClick" class="flex items-center justify-between f-hairline-bottom pb-3">
197 203
       <div class="flex items-center font-bold gap-2 text-sm justify-between">
198 204
         <div class="flex-1 flex items-center gap-2">
199 205
           <image :src="orderItem.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
@@ -237,18 +243,23 @@ function handleShowObligationOrderDetail(orderItem) {
237 243
 
238 244
             </div>
239 245
             <div class="flex justify-end gap-2" v-if="orderProduct.type == 5">
240
-              <nut-button size="small" type="default" @tap.stop="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
246
+              <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
247
+                <div class="text-black">取消订单</div>
248
+              </nut-button>
241 249
               <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
242 250
 
243 251
             </div>
244 252
             <div class="flex justify-end gap-2" v-if="orderProduct.type == 0">
245
-              <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery"><div class="text-black">提醒发货</div></nut-button>
253
+              <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
254
+                <div class="text-black">提醒发货</div>
255
+              </nut-button>
246 256
               <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderProduct)">申请售后</nut-button>
247 257
             </div>
248 258
 
249 259
 
250 260
             <div class="flex justify-end gap-2" v-if="orderProduct.type == 1">
251
-              <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderProduct)">查看物流</nut-button>
261
+              <nut-button size="small" plain type="default"
262
+                @tap.stop="handleShowLogistics(orderProduct)">查看物流</nut-button>
252 263
               <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderProduct)">申请售后</nut-button>
253 264
 
254 265
               <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderProduct)">确认收货</nut-button>
@@ -256,7 +267,8 @@ function handleShowObligationOrderDetail(orderItem) {
256 267
             </div>
257 268
 
258 269
             <div class="flex justify-end gap-2" v-if="orderProduct.status == 2">
259
-              <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderProduct)">再次购买</nut-button>
270
+              <nut-button size="small" plain type="default"
271
+                @tap.stop="handleProductItemClick(orderProduct)">再次购买</nut-button>
260 272
               <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderProduct)">去评价</nut-button>
261 273
 
262 274
             </div>
@@ -265,8 +277,9 @@ function handleShowObligationOrderDetail(orderItem) {
265 277
 
266 278
       </div>
267 279
 
268
-      <div v-else  @tap.stop="handleShowOrderDetail(orderItem)">
269
-        <div v-for="(orderProduct, orderProductIndex) in orderItem.orderProduct" :key="orderProductIndex" class="flex flex-col gap-3">
280
+      <div v-else @tap.stop="handleShowOrderDetail(orderItem)">
281
+        <div v-for="(orderProduct, orderProductIndex) in orderItem.orderProduct" :key="orderProductIndex"
282
+          class="flex flex-col gap-3">
270 283
           <div class="flex py-2 gap-3">
271 284
             <div class="flex-1 flex gap-2">
272 285
               <div class="flex w-20">
@@ -284,7 +297,7 @@ function handleShowObligationOrderDetail(orderItem) {
284 297
             </div>
285 298
 
286 299
             <div class="flex flex-col justify-center items-center">
287
-<!--              <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
300
+              <!--              <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
288 301
               <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
289 302
               <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
290 303
             </div>
@@ -294,12 +307,16 @@ function handleShowObligationOrderDetail(orderItem) {
294 307
         </div>
295 308
 
296 309
         <div class="flex justify-end gap-2" v-if="orderItem.status == 5">
297
-          <nut-button size="small" type="default" @tap.stop="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
310
+          <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
311
+            <div class="text-black">取消订单</div>
312
+          </nut-button>
298 313
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
299 314
 
300 315
         </div>
301 316
         <div class="flex justify-end gap-2" v-if="orderItem.status == 0">
302
-          <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery"><div class="text-black">提醒发货</div></nut-button>
317
+          <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
318
+            <div class="text-black">提醒发货</div>
319
+          </nut-button>
303 320
           <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
304 321
         </div>
305 322
 
@@ -316,10 +333,7 @@ function handleShowObligationOrderDetail(orderItem) {
316 333
           <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
317 334
 
318 335
         </div>
319
-      </div>
320 336
     </div>
321
-
322 337
   </div>
323 338
 
324
-
325
-</template>
339
+</div></template>

+ 1 - 1
src/pages/order/components/OrderObligationItem.vue

@@ -87,7 +87,7 @@ function handleCancelOrder() {
87 87
       })
88 88
 
89 89
       uni.$emit('orderCancelFromList')
90
-
90
+      
91 91
     }, 300)
92 92
 
93 93
   })

+ 1 - 1
src/pages/order/components/OtherOrderItem.vue

@@ -51,7 +51,7 @@ function handleClick() {
51 51
   //   id: product.goods_id,
52 52
   //   featured: [product.goods_img]
53 53
   // })
54
-  console.log(product)
54
+  console.log('woshi111',product)
55 55
   // if (product.source == '6') {
56 56
   const productId = props.item.source == '1' ? product.goods_sign : product.goods_id
57 57
   // console.log(productId)

+ 139 - 135
src/pages/order/detail.vue

@@ -1,11 +1,11 @@
1 1
 <script setup lang="ts">
2 2
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
3
-import {encodePhone} from "~/utils";
4
-import {CDN_URL} from "~/config/app";
5
-import {useAddressStore} from "~/stores/addressStore";
3
+import { encodePhone } from "~/utils";
4
+import { CDN_URL } from "~/config/app";
5
+import { useAddressStore } from "~/stores/addressStore";
6 6
 import FPrice from "~/components/FPrice/FPrice.vue";
7
-import {cancelOrder, takeOrder} from "~/apis/order.api";
8
-import {decodeBase64, encodeBase64} from "~/utils/http/helper";
7
+import { cancelOrder, takeOrder } from "~/apis/order.api";
8
+import { decodeBase64, encodeBase64 } from "~/utils/http/helper";
9 9
 
10 10
 const addressIcon = CDN_URL + '/static/assets/dingwi_220624.png'
11 11
 const addressStore = useAddressStore()
@@ -25,7 +25,7 @@ onLoad((options) => {
25 25
   // console.log(options.detail)
26 26
   if (options.detail) {
27 27
     detail.value = JSON.parse(decodeBase64(options.detail))
28
-  // detail.value = JSON.parse(decodeBase64(base64Json))
28
+    // detail.value = JSON.parse(decodeBase64(base64Json))
29 29
   }
30 30
   if (options.type) {
31 31
     state.type = options.type
@@ -64,6 +64,8 @@ onLoad((options) => {
64 64
 function handleCancelOrder() {
65 65
   console.log('取消订单操作')
66 66
   cancelOrder(detail.value.group_order_id).then(res => {
67
+    console.log('RES',res);
68
+    
67 69
     uni.showToast({
68 70
       title: '取消成功',
69 71
       icon: 'none'
@@ -73,11 +75,15 @@ function handleCancelOrder() {
73 75
       uni.navigateBack()
74 76
     }, 300)
75 77
 
76
-  }).catch(error => {
77
-
78
-    uni.navigateTo({
79
-      url: '/pages/user/login/index?key=30'
80
-    })
78
+  })
79
+  .catch(error => {
80
+    // uni.showToast({
81
+    //   title: error,
82
+    //   icon: 'none'
83
+    // })
84
+    // uni.navigateTo({
85
+    //   url: '/pages/user/login/index?key=30'
86
+    // })
81 87
   })
82 88
 }
83 89
 
@@ -86,7 +92,7 @@ function handlePayment() {
86 92
   // const { orderItem } = detail.value
87 93
   // console.log(orderItem)
88 94
   uni.navigateTo({
89
-    url: '/pages/payment/index?' + `pay_price=${ detail.value.pay_price}&order_id=${ detail.value.group_order_id}&OrderList=${JSON.stringify( detail.value)}`
95
+    url: '/pages/payment/index?' + `pay_price=${detail.value.pay_price}&order_id=${detail.value.group_order_id}&OrderList=${JSON.stringify(detail.value)}`
90 96
     // url: `/pages/payment/index`
91 97
   })
92 98
 }
@@ -181,14 +187,14 @@ const payType = computed(() => {
181 187
 })
182 188
 
183 189
 const getSymbol = (pay_type: string) => {
184
-    if (pay_type === '5') {
185
-      return '积分'
186
-    } else {
187
-      return '¥'
188
-    }
190
+  if (pay_type === '5') {
191
+    return '积分'
192
+  } else {
193
+    return '¥'
194
+  }
189 195
 }
190 196
 function handleProductItemClick(
191
-    item
197
+  item
192 198
 ) {
193 199
   console.log(item.product_id)
194 200
   // 大仓
@@ -200,167 +206,165 @@ function handleProductItemClick(
200 206
 
201 207
 </script>
202 208
 <template>
203
-    <div class="p-3 flex flex-col gap-3 pb-safe text-[12px]" v-if="detail">
204
-      <div
205
-          class="rounded bg-white p-3 flex">
206
-        <div class="flex flex-col flex-1 gap-2">
207
-          <div class="flex items-center gap-2">
208
-            <div class="flex text-sm text-gray-500 justify-between items-center w-full">
209
-              <div class="flex-1 flex items-center gap-2">
210
-                <div class="w-fit flex">
211
-                  <image :src="addressIcon" mode="widthFix" class="w-4 h-4"></image>
212
-                </div>
213
-                <div class="flex-1 flex">
214
-                  {{ detail.user_address }}
215
-                </div>
209
+  <div class="p-3 flex flex-col gap-3 pb-safe text-[12px]" v-if="detail">
210
+    <div class="rounded bg-white p-3 flex">
211
+      <div class="flex flex-col flex-1 gap-2">
212
+        <div class="flex items-center gap-2">
213
+          <div class="flex text-sm text-gray-500 justify-between items-center w-full">
214
+            <div class="flex-1 flex items-center gap-2">
215
+              <div class="w-fit flex">
216
+                <image :src="addressIcon" mode="widthFix" class="w-4 h-4"></image>
217
+              </div>
218
+              <div class="flex-1 flex">
219
+                {{ detail.user_address }}
216 220
               </div>
221
+            </div>
217 222
 
218
-              <div class="w-4 flex i-tabler-chevron-right text-gray"></div>
223
+            <div class="w-4 flex i-tabler-chevron-right text-gray"></div>
219 224
 
220
-            </div>
221 225
           </div>
222
-          <!--          <div class="flex text-sm font-bold">{{ data.addressInfo.detail }}</div>-->
223
-          <div class="flex gap-2 items-center text-xs text-gray-500">
224
-            <div>
225
-              {{ detail.real_name }}
226
-            </div>
227
-            <div v-if="detail.user_phone">
228
-              {{ encodePhone(detail.user_phone) }}
229
-            </div>
226
+        </div>
227
+        <!--          <div class="flex text-sm font-bold">{{ data.addressInfo.detail }}</div>-->
228
+        <div class="flex gap-2 items-center text-xs text-gray-500">
229
+          <div>
230
+            {{ detail.real_name }}
231
+          </div>
232
+          <div v-if="detail.user_phone">
233
+            {{ encodePhone(detail.user_phone) }}
230 234
           </div>
231 235
         </div>
232 236
       </div>
237
+    </div>
233 238
 
234
-      <div class="bg-white rounded">
235
-        <div class="flex items-center gap-2 text-sm font-bold f-hairline-bottom p-3" v-if="detail.merchant">
236
-          <image :src="detail.merchant.mer_avatar" mode="widthFix" class="w-5 h-5"></image>
237
-          <div>{{ detail.merchant.mer_name }}</div>
238
-        </div>
239
+    <div class="bg-white rounded">
240
+      <div class="flex items-center gap-2 text-sm font-bold f-hairline-bottom p-3" v-if="detail.merchant">
241
+        <image :src="detail.merchant.mer_avatar" mode="widthFix" class="w-5 h-5"></image>
242
+        <div>{{ detail.merchant.mer_name }}</div>
243
+      </div>
239 244
 
240
-        <div v-for="(productItem, productIndex) in detail.orderProduct" :key="productIndex" class="p-3">
241
-          <div class="flex gap-2">
242
-            <div  @tap.stop="handleProductItemClick(productItem)">
243
-              <image :src="productItem.cart_info.product.image" mode="widthFix" class="rounded w-20 h-20"></image>
245
+      <div v-for="(productItem, productIndex) in detail.orderProduct" :key="productIndex" class="p-3">
246
+        <div class="flex gap-2">
247
+          <div @tap.stop="handleProductItemClick(productItem)">
248
+            <image :src="productItem.cart_info.product.image" mode="widthFix" class="rounded w-20 h-20"></image>
244 249
 
245
-            </div>
246
-            <div class="flex flex-col w-full">
247
-              <div class="flex flex-col text-sm ">
248
-                <div class="flex justify-between" @tap.stop="handleProductItemClick(productItem)">
249
-                  <div class="flex">
250
-                    {{ productItem.cart_info.product.store_name }}
251
-                  </div>
252
-                  <div class="flex">¥{{ productItem.product_price }}</div>
250
+          </div>
251
+          <div class="flex flex-col w-full">
252
+            <div class="flex flex-col text-sm ">
253
+              <div class="flex justify-between" @tap.stop="handleProductItemClick(productItem)">
254
+                <div class="flex">
255
+                  {{ productItem.cart_info.product.store_name }}
253 256
                 </div>
257
+                <div class="flex">¥{{ productItem.product_price }}</div>
258
+              </div>
254 259
 
255 260
 
256
-                <div class="text-[11px] text-gray-500 flex justify-between">
257
-                  <div class="">{{ productItem.cart_info.productAttr.sku }}</div>
258
-                  <div class="">共{{ productItem.product_num }}件</div>
259
-                </div>
260
-
261
+              <div class="text-[11px] text-gray-500 flex justify-between">
262
+                <div class="">{{ productItem.cart_info.productAttr.sku }}</div>
263
+                <div class="">共{{ productItem.product_num }}件</div>
261 264
               </div>
265
+
262 266
             </div>
263 267
           </div>
264 268
         </div>
269
+      </div>
265 270
 
266 271
 
267
-        <div class=" flex flex-col gap-3 p-3">
268
-          <div class="flex justify-end" v-if="detail.status == 1 || detail.status == 2 || detail.status == 3 || detail.status == 0">
269
-            <nut-button size="small" plain type="default" @tap.stop="handeRefund">申请售后</nut-button>
270
-          </div>
271
-<!--          <div class="flex justify-end" v-if="detail.status == 0">-->
272
-<!--            <nut-button size="small" plain type="default" @tap.stop="handeRefund">申请退款</nut-button>-->
273
-<!--          </div>-->
272
+      <div class=" flex flex-col gap-3 p-3">
273
+        <div class="flex justify-end"
274
+          v-if="detail.status == 1 || detail.status == 2 || detail.status == 3 || detail.status == 0">
275
+          <nut-button size="small" plain type="default" @tap.stop="handeRefund">申请售后</nut-button>
276
+        </div>
277
+        <!--          <div class="flex justify-end" v-if="detail.status == 0">-->
278
+        <!--            <nut-button size="small" plain type="default" @tap.stop="handeRefund">申请退款</nut-button>-->
279
+        <!--          </div>-->
274 280
 
275
-          <div class="flex justify-between">
276
-            <div>商品总额</div>
277
-            <div class="text-gray">{{getSymbol(detail.pay_type)}}{{ detail.total_price }}</div>
278
-          </div>
279
-          <div class="flex justify-between">
280
-            <div>优惠金额</div>
281
-            <div class="text-gray">{{getSymbol(detail.pay_type)}}{{ detail.coupon_price }}</div>
282
-          </div>
283
-          <div class="flex justify-between">
284
-            <div>运费</div>
285
-            <div class="text-gray">
286
-              {{getSymbol(detail.pay_type)}}{{ detail.pay_postage }}
287
-            </div>
281
+        <div class="flex justify-between">
282
+          <div>商品总额</div>
283
+          <div class="text-gray">{{ getSymbol(detail.pay_type) }}{{ detail.total_price }}</div>
284
+        </div>
285
+        <div class="flex justify-between">
286
+          <div>优惠金额</div>
287
+          <div class="text-gray">{{ getSymbol(detail.pay_type) }}{{ detail.coupon_price }}</div>
288
+        </div>
289
+        <div class="flex justify-between">
290
+          <div>运费</div>
291
+          <div class="text-gray">
292
+            {{ getSymbol(detail.pay_type) }}{{ detail.pay_postage }}
288 293
           </div>
289
-          <div class="flex justify-between">
294
+        </div>
295
+        <div class="flex justify-between">
290 296
 
291
-            <div>实付款</div>
292
-            <div class="text-gray">
293
-              <FPrice :price="detail.pay_price" ex-class="font-bold text-xl" symbol="积分" v-if="detail.pay_type == 5"></FPrice>
294
-              <FPrice :price="detail.pay_price" ex-class="font-bold text-xl" v-else></FPrice>
295
-            </div>
297
+          <div>实付款</div>
298
+          <div class="text-gray">
299
+            <FPrice :price="detail.pay_price" ex-class="font-bold text-xl" symbol="积分" v-if="detail.pay_type == 5">
300
+            </FPrice>
301
+            <FPrice :price="detail.pay_price" ex-class="font-bold text-xl" v-else></FPrice>
296 302
           </div>
303
+        </div>
297 304
 
298
-          <div class="h-0.2 bg-gray-100 my-2"></div>
305
+        <div class="h-0.2 bg-gray-100 my-2"></div>
299 306
 
300
-<!--          <div class="flex justify-between">-->
307
+        <!--          <div class="flex justify-between">-->
301 308
 
302
-<!--            <div>订单编号</div>-->
303
-<!--            <div class="text-gray">{{ detail.order_sn }}</div>-->
304
-<!--          </div>-->
305
-          <div class="flex justify-between">
306
-            <div>订单编号</div>
307
-            <div class="flex gap-2">
308
-              <div class="text-gray-400">{{ detail.order_sn }}</div>
309
-              <div @click="handleClipboard">复制</div>
310
-            </div>
309
+        <!--            <div>订单编号</div>-->
310
+        <!--            <div class="text-gray">{{ detail.order_sn }}</div>-->
311
+        <!--          </div>-->
312
+        <div class="flex justify-between">
313
+          <div>订单编号</div>
314
+          <div class="flex gap-2">
315
+            <div class="text-gray-400">{{ detail.order_sn }}</div>
316
+            <div @click="handleClipboard">复制</div>
311 317
           </div>
312
-          <div class="flex justify-between">
318
+        </div>
319
+        <div class="flex justify-between">
313 320
 
314
-            <div>支付方式</div>
321
+          <div>支付方式</div>
315 322
 
316
-            <div class="text-gray">{{ payType }}</div>
317
-<!--            <div class="text-gray">{{ detail.pay_type === '0' ? '微信' : '支付宝' }}</div>-->
318
-          </div>
323
+          <div class="text-gray">{{ payType }}</div>
324
+          <!--            <div class="text-gray">{{ detail.pay_type === '0' ? '微信' : '支付宝' }}</div>-->
325
+        </div>
319 326
 
320
-          <div class="flex justify-between">
327
+        <div class="flex justify-between">
321 328
 
322
-            <div>下单时间</div>
323
-            <div class="text-gray">{{ detail.create_time }}</div>
324
-          </div>
329
+          <div>下单时间</div>
330
+          <div class="text-gray">{{ detail.create_time }}</div>
331
+        </div>
325 332
 
326
-          <div class="flex justify-between" v-if="detail.status != 5">
333
+        <div class="flex justify-between" v-if="detail.status != 5">
327 334
 
328
-            <div>支付时间</div>
329
-            <div class="text-gray">{{ detail.pay_time }}</div>
330
-            <!--            <div class="text-gray">{{ detail.pay_type === '0' ? '微信' : '支付宝' }}</div>-->
331
-          </div>
335
+          <div>支付时间</div>
336
+          <div class="text-gray">{{ detail.pay_time }}</div>
337
+          <!--            <div class="text-gray">{{ detail.pay_type === '0' ? '微信' : '支付宝' }}</div>-->
332 338
         </div>
333
-
334 339
       </div>
340
+
335 341
     </div>
342
+  </div>
336 343
 
337
-    <div class="fixed bottom-0 bg-white p-safe items-center  w-full">
338
-      <div class="flex justify-end gap-2 p-3"
339
-           v-if="detail.status == 5 || detail.type == 5"
340
-      >
341
-        <nut-button size="small" type="default" @tap.stop="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
342
-        <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
344
+  <div class="fixed bottom-0 bg-white p-safe items-center  w-full">
345
+    <div class="flex justify-end gap-2 p-3" v-if="detail.status == 5 || detail.type == 5">
346
+      <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
347
+        <div class="text-black">取消订单</div>
348
+      </nut-button>
349
+      <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
343 350
 
344
-      </div>
345
-      <div class="flex justify-end gap-2 p-3"
346
-           v-if="detail.status == 0 || detail.type == 0"
347
-      >
348
-        <nut-button size="small" type="primary" plain
349
-                    @tap.stop="handleRemindTheDelivery">提醒发货</nut-button>
351
+    </div>
352
+    <div class="flex justify-end gap-2 p-3" v-if="detail.status == 0 || detail.type == 0">
353
+      <nut-button size="small" type="primary" plain @tap.stop="handleRemindTheDelivery">提醒发货</nut-button>
350 354
 
351
-      </div>
352
-      <div class="flex justify-end gap-2 p-3" v-if="detail.status == 1 || detail.type == 1">
353
-        <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics">查看物流</nut-button>
355
+    </div>
356
+    <div class="flex justify-end gap-2 p-3" v-if="detail.status == 1 || detail.type == 1">
357
+      <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics">查看物流</nut-button>
354 358
 
355
-        <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder">确认收货</nut-button>
359
+      <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder">确认收货</nut-button>
356 360
 
357
-      </div>
361
+    </div>
358 362
 
359
-      <div class="flex justify-end gap-2 p-3" v-if="detail.status == 2 || detail.type == 2">
360
-        <nut-button size="small" plain type="primary" @tap.stop="handleComment">去评价</nut-button>
363
+    <div class="flex justify-end gap-2 p-3" v-if="detail.status == 2 || detail.type == 2">
364
+      <nut-button size="small" plain type="primary" @tap.stop="handleComment">去评价</nut-button>
361 365
 
362
-      </div>
363 366
     </div>
367
+  </div>
364 368
 </template>
365 369
 
366 370
 <route lang="yaml">

+ 3 - 3
src/pages/order/obligation-detail.vue

@@ -42,9 +42,9 @@ function handleCancelOrder() {
42 42
 
43 43
   }).catch(error => {
44 44
 
45
-    uni.navigateTo({
46
-      url: '/pages/user/login/index?key=30'
47
-    })
45
+    // uni.navigateTo({
46
+    //   url: '/pages/user/login/index?key=30'
47
+    // })
48 48
   })
49 49
 }
50 50
 

+ 2 - 2
src/pages/payment/index.vue

@@ -102,8 +102,8 @@ function handleConfirm() {
102 102
       OrderLists: state.orderList,
103 103
       type: 'tdbaspzf'
104 104
     },
105
-    envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
106
-    // envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
105
+    // envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
106
+    envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
107 107
     success(res) {
108 108
       // 打开成功
109 109
       uni.showToast({

+ 21 - 2
src/pages/refund/drawback.vue

@@ -90,7 +90,10 @@ function handleSubmit() {
90 90
       if (res.confirm) {
91 91
         refundApply(state.orderId.toString(), formData).then(res => {
92 92
           // {"status":200,"message":"申请退款成功","data":{"refund_order_id":"671"}}
93
-          uni.showToast({
93
+          console.log('申请退款成功',res);
94
+          
95
+          if(res.status===200){
96
+             uni.showToast({
94 97
             title: '申请退款成功',
95 98
             icon: 'none'
96 99
           })
@@ -99,10 +102,26 @@ function handleSubmit() {
99 102
               url: `/pages/refund/index?from=${state.from}`
100 103
             })
101 104
           }, 300)
105
+          }else{
106
+            uni.showToast({
107
+            title: res.message,
108
+            icon: 'none'
109
+          })
110
+          setTimeout(() => {
111
+            uni.navigateTo({
112
+              url: `/pages/refund/index?from=${state.from}`
113
+            })
114
+          }, 300)
115
+          }
116
+         
102 117
         })
103 118
 
104 119
       }
105
-    }
120
+    },
121
+    fail: function (error) {
122
+    // 模态框显示失败,可能是因为参数不合法等原因
123
+    console.log('模态框显示失败', error);
124
+  }
106 125
   })
107 126
   // if (state.orderId) {
108 127
   // }

+ 104 - 82
src/pages/store/product/detail.vue

@@ -15,7 +15,7 @@ import {
15 15
   TaobaoProductThirdPartyWaresModel, VipProductModel
16 16
 } from "~/apis/model/product.model";
17 17
 import { DcProductModel } from "~/apis/model/dacang.model";
18
-import { CDN_URL,CDM_URL } from "~/config/app";
18
+import { CDN_URL, CDM_URL } from "~/config/app";
19 19
 import dayjs from "dayjs";
20 20
 import { getShareId } from "~/apis/product";
21 21
 import { debounce } from "lodash-es";
@@ -64,7 +64,7 @@ const state = reactive({
64 64
   shareImage: '',
65 65
 })
66 66
 const detail: any = ref(null)
67
-const isTo= ref(3)
67
+const isTo = ref(3)
68 68
 let isShow = ref(false)
69 69
 onShow(() => {
70 70
   uni.showLoading({
@@ -84,8 +84,8 @@ onShow(() => {
84 84
 })
85 85
 //下架图片
86 86
 const outImg = computed(() => {
87
-  if(isShow){
88
-    return  CDM_URL+'/image/2023-11-24/20231124182002679.png'
87
+  if (isShow) {
88
+    return CDM_URL + '/image/2023-11-24/20231124182002679.png'
89 89
   }
90 90
 
91 91
 })
@@ -139,8 +139,8 @@ function loadProductDetail() {
139 139
     // console.log(res);
140 140
     if (res.status === 200) {
141 141
       detail.value = res.data
142
-      console.log('我是detail',detail.value);
143
-      
142
+      console.log('我是detail', detail.value);
143
+
144 144
       state.shareImage = detail.value.image
145 145
       if (res && res.mer_id && res.mer_id === '148') {
146 146
         if (detail.value && detail.value.price) {
@@ -299,12 +299,12 @@ function handleShowShopCart() {
299 299
   })
300 300
 }
301 301
 
302
-function onSelectedSku(item :any) {
302
+function onSelectedSku(item: any) {
303 303
   state.currentSku = item
304 304
 }
305 305
 
306 306
 function handleAddCart() {
307
-  isTo.value=1
307
+  isTo.value = 1
308 308
   state.isShowSku = true
309 309
   state.flag = 2
310 310
 
@@ -313,7 +313,7 @@ function handleAddCart() {
313 313
 
314 314
 function handleCreateShopping() {
315 315
   // console.log(state.flag)
316
-  console.log('我是detail数据',detail.value)
316
+  console.log('我是detail数据', detail.value)
317 317
   createShopping({
318 318
     product_id: detail.value.product_id,
319 319
     // product_attr_unique: JSON.stringify(state.currentSku),
@@ -321,18 +321,18 @@ function handleCreateShopping() {
321 321
     cart_num: state.cartNum,
322 322
     is_new: (state.flag === '1' || state.flag === '3') ? '1' : '0'
323 323
   }).then(res => {
324
-    console.log('resres',res)
325
-  
324
+    console.log('resres', res)
325
+
326 326
     if (res.cart_id) {
327 327
       // console.log(state.flag)
328 328
       if (state.flag == '1' || state.flag == '3') {
329
-        isTo.value=state.flag
329
+        isTo.value = state.flag
330 330
         console.log(isTo.value)
331 331
         uni.navigateTo({
332 332
           url: `/pages/order-confirm/index?cartId=${res.cart_id}&type=${state.flag}&product_id=${detail.value.product_id}`
333 333
         })
334
-      } else if(state.flag == '2') {
335
-        isTo.value=1
334
+      } else if (state.flag == '2') {
335
+        isTo.value = 1
336 336
         uni.$emit('cart-reload')
337 337
         loadProductDetail()
338 338
         uni.showToast({
@@ -344,27 +344,40 @@ function handleCreateShopping() {
344 344
       }
345 345
     }
346 346
   }).catch(error => {
347
-    if (error === '会员礼包不能加入购物车') {
348
-      return uni.showToast({
349
-        title: error,
350
-        icon: 'none'
351
-      })
352
-    } else if (error === '库存不足') {
353
-      return uni.showToast({
354
-        title: error,
355
-        icon: 'none'
356
-      })
357
-    }
358
-    else {
359
-      return uni.navigateTo({
360
-        url: '/pages/user/login/index'
361
-      })
362
-    }
347
+    // if (error === '会员礼包不能加入购物车') {
348
+    //   return uni.showToast({
349
+    //     title: error,
350
+    //     icon: 'none'
351
+    //   })
352
+    // } else if (error === '库存不足') {
353
+    //   return uni.showToast({
354
+    //     title: error,
355
+    //     icon: 'none'
356
+    //   })
357
+    // }
358
+    // else if(error==='您已是高级会员,分红满额后可再次购买~') {
359
+    //   uni.showToast({
360
+    //         title: error,
361
+    //         icon: 'none'
362
+    //       })
363
+
364
+    // }else{
365
+    //   console.log('我是error>>>',error);
366
+    //   uni.showToast({
367
+    //         title: error,
368
+    //         icon: 'none'
369
+    //       })
370
+    // }
371
+    console.log('我是error>>>', error);
372
+    uni.showToast({
373
+      title: error,
374
+      icon: 'none'
375
+    })
363 376
 
364 377
   })
365 378
 }
366 379
 function handleBuyshow() {
367
-  console.log('我是detail数据',detail.value)
380
+  console.log('我是detail数据', detail.value)
368 381
   createShopping({
369 382
     product_id: detail.value.product_id,
370 383
     // product_attr_unique: JSON.stringify(state.currentSku),
@@ -372,31 +385,35 @@ function handleBuyshow() {
372 385
     cart_num: state.cartNum,
373 386
     is_new: (state.flag === '1' || state.flag === '3') ? '1' : '0'
374 387
   }).then(res => {
375
-    console.log('resres',res)
376
-  
388
+    console.log('resres', res)
389
+
377 390
     if (res.cart_id) {
378 391
       uni.navigateTo({
379
-          url: `/pages/order-confirm/index?cartId=${res.cart_id}&type=${state.flag}&product_id=${detail.value.product_id}`
380
-        })
381
-    }
382
-  }).catch(error => {
383
-    if (error === '会员礼包不能加入购物车') {
384
-      return uni.showToast({
385
-        title: error,
386
-        icon: 'none'
387
-      })
388
-    } else if (error === '库存不足') {
389
-      return uni.showToast({
390
-        title: error,
391
-        icon: 'none'
392
-      })
393
-    }
394
-    else {
395
-      return uni.navigateTo({
396
-        url: '/pages/user/login/index'
392
+        url: `/pages/order-confirm/index?cartId=${res.cart_id}&type=${state.flag}&product_id=${detail.value.product_id}`
397 393
       })
398 394
     }
399
-
395
+  }).catch(error => {
396
+    // if (error === '会员礼包不能加入购物车') {
397
+    //   return uni.showToast({
398
+    //     title: error,
399
+    //     icon: 'none'
400
+    //   })
401
+    // } else if (error === '库存不足') {
402
+    //   return uni.showToast({
403
+    //     title: error,
404
+    //     icon: 'none'
405
+    //   })
406
+    // }
407
+    // else {
408
+    //   return uni.navigateTo({
409
+    //     url: '/pages/user/login/index'
410
+    //   })
411
+    // }
412
+    console.log('我是error>>>', error);
413
+    uni.showToast({
414
+      title: error,
415
+      icon: 'none'
416
+    })
400 417
   })
401 418
 }
402 419
 function handleAddshow() {
@@ -414,37 +431,41 @@ function handleAddshow() {
414 431
     if (res.cart_id) {
415 432
       // console.log(state.flag)
416 433
       uni.$emit('cart-reload')
417
-        loadProductDetail()
418
-        uni.showToast({
419
-          title: '添加购物车成功',
420
-          icon: 'none'
421
-        })
422
-        loadCartCount()
423
-        state.isShowSku = false
424
-    }
425
-  }).catch(error => {
426
-    if (error === '会员礼包不能加入购物车') {
427
-      return uni.showToast({
428
-        title: error,
429
-        icon: 'none'
430
-      })
431
-    } else if (error === '库存不足') {
432
-      return uni.showToast({
433
-        title: error,
434
+      loadProductDetail()
435
+      uni.showToast({
436
+        title: '添加购物车成功',
434 437
         icon: 'none'
435 438
       })
439
+      loadCartCount()
440
+      state.isShowSku = false
436 441
     }
437
-    else {
438
-      return uni.navigateTo({
439
-        url: '/pages/user/login/index'
440
-      })
441
-    }
442
-
442
+  }).catch(error => {
443
+    // if (error === '会员礼包不能加入购物车') {
444
+    //   return uni.showToast({
445
+    //     title: error,
446
+    //     icon: 'none'
447
+    //   })
448
+    // } else if (error === '库存不足') {
449
+    //   return uni.showToast({
450
+    //     title: error,
451
+    //     icon: 'none'
452
+    //   })
453
+    // }
454
+    // else {
455
+    //   return uni.navigateTo({
456
+    //     url: '/pages/user/login/index'
457
+    //   })
458
+    // }
459
+    console.log('我是error>>>', error);
460
+    uni.showToast({
461
+      title: error,
462
+      icon: 'none'
463
+    })
443 464
   })
444 465
 }
445 466
 // 规格显示双按钮
446
-function handleTwobtn(){
447
-  isTo.value=2
467
+function handleTwobtn() {
468
+  isTo.value = 2
448 469
   state.isShowSku = !state.isShowSku
449 470
 }
450 471
 
@@ -453,6 +474,8 @@ function handleTwobtn(){
453 474
  * @param flag //1表示立即购买;2表示加入购物车,3表示立即兑换
454 475
  */
455 476
 function handleOrderConfirm(flag: '1' | '2' | '3') {
477
+  console.log('我是》》》》》》', userStore.uid);
478
+
456 479
   debounce(() => {
457 480
     if (!userStore.uid) {
458 481
       return uni.showToast({
@@ -473,7 +496,7 @@ function handleOrderConfirm(flag: '1' | '2' | '3') {
473 496
   })
474 497
 
475 498
   state.flag = flag
476
-  isTo.value=flag
499
+  isTo.value = flag
477 500
   state.isShowSku = true
478 501
   // if (is148Merchant.value) {
479 502
   //   state.isNew = '1'
@@ -799,7 +822,7 @@ onPageScroll((page) => {
799 822
 
800 823
   </div>
801 824
   <!-- 商品下架 -->
802
-  <CXBBackTop :Scroll_X="Scroll_X" :isCss="2"  v-if="isShow" />
825
+  <CXBBackTop :Scroll_X="Scroll_X" :isCss="2" v-if="isShow" />
803 826
   <div class="relative w-screen " v-if="isShow">
804 827
     <div class="box-out">
805 828
       <div class="flex-box pb-3 px-3 ">
@@ -880,9 +903,8 @@ onPageScroll((page) => {
880 903
   </div>
881 904
 
882 905
   <CXBSkuPopup v-model:show="state.isShowSku" :detail="detail" @selected:item="onSelectedSku"
883
-    @submit="handleCreateShopping" @count-change="handleCountChange" @subBuy="handleBuyshow"   @subAdd="handleAddshow"
884
-    :isTo="isTo"
885
-    />
906
+    @submit="handleCreateShopping" @count-change="handleCountChange" @subBuy="handleBuyshow" @subAdd="handleAddshow"
907
+    :isTo="isTo" />
886 908
   <!--  <nut-sku-->
887 909
   <!--      v-model:visible="state.isShowSku"-->
888 910
   <!--      :goods="state.goods"-->

+ 9 - 2
src/pages/store/product/other.vue

@@ -29,7 +29,7 @@ import { debounce, merge } from "lodash-es";
29 29
 import { useDebounceFn } from '@vueuse/core';
30 30
 import dayjs from "dayjs";
31 31
 import { decodeBase64 } from "~/utils/http/helper";
32
-import { CDN_URL } from "~/config/app";
32
+import { CDN_URL,CDM_URL } from "~/config/app";
33 33
 import { getRecommendList } from "~/apis/merchant";
34 34
 import type { DcProductModel } from "~/apis/model/dacang.model";
35 35
 
@@ -484,6 +484,13 @@ function handleProductItemClick(
484 484
   })
485 485
 }
486 486
 
487
+const outImg = computed(() => {
488
+  if(isShow){
489
+    return  CDM_URL+'/image/2023-11-24/20231124182002679.png'
490
+  }
491
+
492
+})
493
+
487 494
 // 距离顶部距离
488 495
 let Scroll_X = ref(0)
489 496
 
@@ -566,7 +573,7 @@ onPageScroll((page) => {
566 573
       <div class="box-out">
567 574
         <div class="flex-box pb-3 px-3 ">
568 575
           <div class="img-div">
569
-            <image lazy-load src="../../../static/icon/商品下架不存在@3x.png" mode="widthFix" class=" top-0 right-0 sold-out ">
576
+            <image lazy-load :src="outImg" mode="widthFix" class=" top-0 right-0 sold-out ">
570 577
             </image>
571 578
           </div>
572 579
           <div class="out-conter">该商品下架不存在</div>

+ 2 - 0
src/pages/user/login/index.vue

@@ -90,6 +90,8 @@ async function handleWexinLogin() {
90 90
                     })
91 91
                   }
92 92
                 } else {
93
+                  console.log(state.key);
94
+                  
93 95
                   switch (state.key) {
94 96
                     case '10': {
95 97
                       uni.switchTab({