Explorar o código

提现记录添加时分秒,添加快速回顶

dxz1228 %!s(int64=2) %!d(string=hai) anos
pai
achega
9d909c68ce

+ 1 - 1
.env.development

@@ -1 +1 @@
1
-VITE_GLOB_API_URL = 'https://app.bjtdba.com'
1
+VITE_GLOB_API_URL = 'https://test.bjtdba.com'

+ 1 - 1
.env.production

@@ -1 +1 @@
1
-VITE_GLOB_API_URL = 'https://app.bjtdba.com'
1
+VITE_GLOB_API_URL = 'https://test.bjtdba.com'

+ 1 - 0
components.d.ts

@@ -10,6 +10,7 @@ export {}
10 10
 declare module '@vue/runtime-core' {
11 11
   export interface GlobalComponents {
12 12
     CXBAuthorize: typeof import('./src/components/CXBAuthorize/CXBAuthorize.vue')['default']
13
+    CXBBackTop: typeof import('./src/components/CXBBackTop/CXBBackTop.vue')['default']
13 14
     CXBBanner: typeof import('./src/components/CXBBanner/CXBBanner.vue')['default']
14 15
     CXBBasePage: typeof import('./src/components/CXBBasePage/CXBBasePage.vue')['default']
15 16
     CXBButton: typeof import('./src/components/CXBButton/CXBButton.vue')['default']

+ 51 - 0
src/components/CXBBackTop/CXBBackTop.vue

@@ -0,0 +1,51 @@
1
+<template>
2
+<div v-show="flag" class="backtop">
3
+  <img @click="scrollToTop" class="backTopImg" src="../../static/icon/home-on.png" alt="">
4
+</div>
5
+</template>
6
+
7
+<script setup lang='ts'>
8
+import { ref, reactive ,defineProps} from 'vue'
9
+
10
+let flag = ref(false)
11
+
12
+const props = defineProps({
13
+  Scroll_X: Number
14
+})
15
+
16
+watch(()=>props.Scroll_X,()=>{
17
+  if(props.Scroll_X as number > 400){
18
+    flag.value = true
19
+  }
20
+  if(props.Scroll_X as number < 400){
21
+    flag.value = false
22
+  }
23
+})
24
+
25
+const scrollToTop = function () {
26
+  console.log('返回顶部');
27
+  
28
+    uni.pageScrollTo({
29
+        scrollTop: 0
30
+    });
31
+}
32
+
33
+</script>
34
+
35
+<style scoped>
36
+.backtop{
37
+  width: 40px;
38
+  height: 40px;
39
+  position: fixed;
40
+  background-color: purple;
41
+  border-radius: 50%;
42
+  z-index: 999;
43
+  right: 15px;
44
+  bottom: 60px;
45
+}
46
+.backTopImg{
47
+  width: 40px;
48
+  height: 40px;
49
+  border-radius: 50%;
50
+}
51
+</style>

+ 6 - 0
src/pages/dacang/list/index.vue

@@ -7,6 +7,7 @@ import type {DcProductModel} from "~/apis/model/dacang.model";
7 7
 import {useDacangStore} from "~/stores/dacangStore";
8 8
 import {CDN_URL} from "~/config/app";
9 9
 import DacangHeader from "~/pages/dacang/list/components/dacang-header.vue";
10
+import CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
10 11
 import {getProductShare} from "~/apis/common";
11 12
 import {useUserStore} from "~/stores/userStore";
12 13
 import Cache from "~/utils/cache";
@@ -28,6 +29,9 @@ const state = reactive({
28 29
   totalPage: 1
29 30
 })
30 31
 
32
+// 距离顶部距离
33
+let Scroll_X = ref(0)
34
+
31 35
 const dacangStore = useDacangStore()
32 36
 const userStore = useUserStore()
33 37
 
@@ -130,6 +134,7 @@ function handleTabItemClick(classifyId) {
130 134
 const headerClass = ref('')
131 135
 
132 136
 onPageScroll((page) => {
137
+  Scroll_X.value = Number(page.scrollTop.toFixed())
133 138
   // page.scrollTop
134 139
   if (page.scrollTop >= 76 ) {
135 140
     headerClass.value = '!bg-primary !text-white'
@@ -167,6 +172,7 @@ onPullDownRefresh(() => {
167 172
     <DacangHeader :ex-class="headerClass" :tabs="state.tabs" @click:item="handleTabItemClick"/>
168 173
 
169 174
     <div class="flex flex-col gap-2 ">
175
+      <CXBBackTop :Scroll_X="Scroll_X"/>
170 176
       <image :src="headerImage" mode="widthFix" class="w-full h-50"></image>
171 177
     <ProductList :list="state.productList" />
172 178
       <div class="pb-safe flex justify-center items-center text-[12px] text-gray-500" v-if="state.productList.length > 0">

+ 6 - 0
src/pages/home/index.vue

@@ -18,6 +18,7 @@ import {getShareId} from "~/apis/product";
18 18
 // import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
19 19
 import Cache from "~/utils/cache";
20 20
 
21
+import CXBBackTopVue from "~/components/CXBBackTop/CXBBackTop.vue";
21 22
 const userStore = useUserStore()
22 23
 const usePageStore = usePageStoreWidthOut()
23 24
 usePageStore.setPageConfig({
@@ -54,6 +55,8 @@ const state = reactive({
54 55
   duration: 500,
55 56
   currents: "0",
56 57
 })
58
+// 距离顶部距离
59
+let Scroll_X = ref(0)
57 60
 onShow(() => {
58 61
   usePageStore.setPageConfig({
59 62
     currentPage: {
@@ -159,6 +162,8 @@ watch(() => state.isShowSignIn, (val) => {
159 162
 const headerClass = ref('')
160 163
 
161 164
 onPageScroll((page) => {
165
+  // console.log(page.scrollTop.toFixed(),'距离顶部的距离')
166
+  Scroll_X.value = Number(page.scrollTop.toFixed())
162 167
   // page.scrollTop
163 168
   if (page.scrollTop >= 76 ) {
164 169
     headerClass.value = 'bg-white !text-gray-900'
@@ -244,6 +249,7 @@ function getIsShow(){
244 249
 </script>
245 250
 <template>
246 251
   <div class="h-screen ">
252
+    <CXBBackTopVue :Scroll_X="Scroll_X"/>
247 253
     <Header :yanglaojin="state.all_yanglao"
248 254
             :exClass="headerClass"
249 255
     />

+ 33 - 1
src/pages/order_addcart/index.vue

@@ -17,6 +17,7 @@ import {encodeBase64} from "~/utils/http/helper";
17 17
 import {CDN_URL} from "~/config/app";
18 18
 import {uniq} from "lodash-es";
19 19
 import {cartChange} from "~/apis/order.api";
20
+import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
20 21
 const gouwucheImage = CDN_URL + '/static/assets/gouwuche.png'
21 22
 const like_adorn_220628Image = CDN_URL + '/static/assets/like_adorn_220628.png'
22 23
 const pageStore = usePageStoreWidthOut()
@@ -40,6 +41,9 @@ const state = reactive({
40 41
   currentType: '',
41 42
 })
42 43
 
44
+// 距离顶部距离
45
+let Scroll_X = ref(0)
46
+
43 47
 const shopping = ref<ShoppingResult>()
44 48
 
45 49
 onBeforeMount(() => {
@@ -424,8 +428,35 @@ function handleNumberChange(num, goodItem) {
424 428
   // goodItem.productAttr.price = goodItem.productAttr.price * num
425 429
   // goodItem.productAttr.price = goodItem.productAttr.price * goodItem.cart_num
426 430
 }
431
+const headerClass = ref('')
432
+onPageScroll((page) => {
433
+  // console.log('滚轮事件触发了',page.scrollTop.toFixed());
434
+  
435
+  // console.log(page.scrollTop.toFixed(),'距离顶部的距离')
436
+  Scroll_X.value = Number(page.scrollTop.toFixed())
437
+  if (page.scrollTop >= 76 ) {
438
+    headerClass.value = 'bg-white !text-gray-900'
439
+  } else {
440
+    headerClass.value = ''
441
+  }
442
+})
443
+const changeSku = ref(false)
444
+const openTestLog = ()=>{
445
+  console.log('测试点击sku,多规模');
446
+  changeSku.value = true
447
+  
448
+}
449
+const closeTestLog = ()=>{
450
+  console.log('测试点击sku,多规模');
451
+  changeSku.value = false
452
+
453
+}
427 454
 </script>
428 455
 <template>
456
+  <div v-if="changeSku" style="width: 100%; height: 100%; background-color: skyblue; margin-top: 100px;">
457
+    <p>sku信息</p>
458
+    <button @click="closeTestLog">关闭</button>
459
+  </div>
429 460
   <div class="">
430 461
     <div
431 462
         v-if="hasShopping"
@@ -498,7 +529,7 @@ function handleNumberChange(num, goodItem) {
498 529
                   class="text-overflow line-clamp-2 text-xs">{{ goodItem.product.store_name }}</div>
499 530
               <div class="flex flex-col justify-start gap-1">
500 531
                 <div
501
-                    class="text-[10px] text-gray min-w-5  p-1  items-center flex">
532
+                    class="text-[10px] text-gray min-w-5  p-1  items-center flex" @click="openTestLog">
502 533
                   {{ goodItem.productAttr.sku }}
503 534
                 </div>
504 535
                 <div class="flex">
@@ -519,6 +550,7 @@ function handleNumberChange(num, goodItem) {
519 550
       </div>
520 551
     </div>
521 552
 
553
+    <CXBBackTop :Scroll_X="Scroll_X"/>
522 554
     <div class="pb-12">
523 555
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
524 556
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>

+ 2 - 2
src/pages/store/nearby/index.vue

@@ -3,6 +3,7 @@ import {getMerchantCategory, getSelectMerchant, getSelectMerchantSort} from "~/a
3 3
 import type {StoreResult} from "~/apis/model/storeModel";
4 4
 import {StoreParams} from "~/apis/model/storeModel";
5 5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6
+import CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
6 7
 import {USER_LATITUDE, USER_LONGITUDE} from "~/constants";
7 8
 import {getProductShare} from "~/apis/common";
8 9
 import {useUserStore} from "~/stores/userStore";
@@ -284,7 +285,7 @@ function handleScrollToLower() {
284 285
           </nut-menu-item>
285 286
         </nut-menu>
286 287
       </div>
287
-
288
+      <CXBBackTop/>
288 289
       <scroll-view
289 290
           :scroll-y="true"
290 291
           :style="{ height: `${state.scrollHeight -60}px` }"
@@ -329,7 +330,6 @@ function handleScrollToLower() {
329 330
 
330 331
           </div>
331 332
         </div>
332
-
333 333
         <div class=" flex justify-center items-center text-[12px] text-gray-500"
334 334
         >
335 335
           <div v-if="state.status === 'loading'">

+ 17 - 0
src/pages/store/product/detail.vue

@@ -5,6 +5,7 @@ import MerchantProductCard from "~/pages/store/home/components/MerchantProductCa
5 5
 import FCell from "~/components/FCell/FCell.vue";
6 6
 import type {SkuModel} from "~/apis/model/product.model";
7 7
 import CXBSkuPopup from "~/components/CXBSkuPopup/CXBSkuPopup.vue";
8
+import CXBBackTop from '~/components/CXBBackTop/CXBBackTop.vue';
8 9
 import {createShopping} from "~/apis/order.api";
9 10
 import {getAgentInfo, getCartCount, relation, removeMyRelation, xcxBanding} from "~/apis/user";
10 11
 import {
@@ -457,10 +458,26 @@ function handleShowCustomer() {
457 458
   })
458 459
 }
459 460
 
461
+// 距离顶部距离
462
+let Scroll_X = ref(0)
463
+
464
+const headerClass = ref('')
465
+onPageScroll((page) => {
466
+  // console.log('滚轮事件触发了',page.scrollTop.toFixed());
467
+  
468
+  // console.log(page.scrollTop.toFixed(),'距离顶部的距离')
469
+  Scroll_X.value = Number(page.scrollTop.toFixed())
470
+  if (page.scrollTop >= 76 ) {
471
+    headerClass.value = 'bg-white !text-gray-900'
472
+  } else {
473
+    headerClass.value = ''
474
+  }
475
+})
460 476
 </script>
461 477
 
462 478
 <template>
463 479
   <div class="flex flex-col gap-3 pb-20" v-if="detail">
480
+    <CXBBackTop :Scroll_X="Scroll_X"/>
464 481
     <div class="bg-white ">
465 482
       <div class="w-screen h-94">
466 483
         <swiper

+ 18 - 0
src/pages/store/product/other.vue

@@ -18,6 +18,7 @@ import type {
18 18
 import FPrice from "~/components/FPrice/FPrice.vue";
19 19
 import FButton from "~/components/FButton/FButton.vue";
20 20
 import CXBButton from "~/components/CXBButton/CXBButton.vue";
21
+import CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
21 22
 import {debounce, merge} from "lodash-es";
22 23
 
23 24
 import {useDebounceFn} from '@vueuse/core';
@@ -383,6 +384,22 @@ function handleBuyNow() {
383 384
 const hasCoupon = computed(() => {
384 385
   return detail.value?.coupon && detail.value?.coupon.startTime
385 386
 })
387
+
388
+// 距离顶部距离
389
+let Scroll_X = ref(0)
390
+
391
+const headerClass = ref('')
392
+onPageScroll((page) => {
393
+  // console.log('滚轮事件触发了',page.scrollTop.toFixed());
394
+  
395
+  // console.log(page.scrollTop.toFixed(),'距离顶部的距离')
396
+  Scroll_X.value = Number(page.scrollTop.toFixed())
397
+  if (page.scrollTop >= 76 ) {
398
+    headerClass.value = 'bg-white !text-gray-900'
399
+  } else {
400
+    headerClass.value = ''
401
+  }
402
+})
386 403
 </script>
387 404
 <template>
388 405
   <CXBBasePage>
@@ -407,6 +424,7 @@ const hasCoupon = computed(() => {
407 424
           />
408 425
         </swiper-item>
409 426
       </swiper>
427
+      <CXBBackTop :Scroll_X="Scroll_X"/>
410 428
       <div>
411 429
         <div class="relative p-3 bg-white">
412 430
           <div class="flex gap-2 items-end">

+ 20 - 1
src/pages/withdrawal-record/index.vue

@@ -16,7 +16,7 @@ onLoad((option) => {
16 16
 </script>
17 17
 <template>
18 18
   <CXBBasePage>
19
-    <div v-if="list.length > 0" class="flex flex-col gap-3  p-3">
19
+    <!-- <div v-if="list.length > 0" class="flex flex-col gap-3  p-3">
20 20
       <div v-for="(item, index) in list" :key="index" class="flex-1 text-xs f-hairline-bottom bg-white p-3">
21 21
         <div class="flex justify-between">
22 22
           <div>
@@ -33,6 +33,25 @@ onLoad((option) => {
33 33
 
34 34
 
35 35
       </div>
36
+    </div> -->
37
+    <!-- 提现日期添加时分秒  -->
38
+    <div v-if="list.length > 0" class="flex flex-col gap-3  p-3">
39
+      <div v-for="(item, index) in 2" :key="index" class="flex-1 text-xs f-hairline-bottom bg-white p-3">
40
+        <div class="flex justify-between">
41
+          <div>
42
+            <div>提现至{{ item.widthdrawal_type === '1' ? '微信' : '支付宝' }}</div>
43
+            <div class="text-gray text-[11px]">{{ dayjs(item.create_time).format('YYYY-MM-DD HH:mm:ss') }}</div>
44
+          </div>
45
+          <div>
46
+            <div>-{{ item.extract_price }}</div>
47
+            <div class="text-[11px]"
48
+                 :class="item.status === '0' ? 'text-primary' : 'text-gray'"
49
+            >{{ item.status === '-1' ? '已失败' : item.status === '0' ? '提现中' : item.status === '1'? '已到账' : ''}}</div>
50
+          </div>
51
+        </div>
52
+
53
+
54
+      </div>
36 55
     </div>
37 56
     <div v-else>
38 57
       <CXBEmpty />