瀏覽代碼

fix: 优化

Basil 2 年之前
父節點
當前提交
e188efde4b
共有 100 個文件被更改,包括 672 次插入524 次删除
  1. 1 1
      .env.production
  2. 12 1
      src/apis/common.ts
  3. 1 0
      src/apis/model/accumulateIncomeModel.ts
  4. 2 2
      src/apis/user.ts
  5. 1 1
      src/components/CXBDialogSignIn/CXBDialogSIgnIn.vue
  6. 1 1
      src/components/CXBSkuPopup/CXBSkuPopup.vue
  7. 1 1
      src/pages.json
  8. 54 12
      src/pages/accumulate-income/index.vue
  9. 57 18
      src/pages/home/index.vue
  10. 2 2
      src/pages/immediate-withdrawal/index.vue
  11. 1 1
      src/pages/invite-partners/index.vue
  12. 6 0
      src/pages/miaosha/index.vue
  13. 80 7
      src/pages/my-integral/detail.vue
  14. 2 2
      src/pages/my-invitation/index.vue
  15. 2 1
      src/pages/my-relation-merchant/index.vue
  16. 5 2
      src/pages/my-reply/index.vue
  17. 52 20
      src/pages/order-confirm/index.vue
  18. 1 1
      src/pages/order/components/ObligationOrderList.vue
  19. 23 21
      src/pages/order/components/OrderItem.vue
  20. 7 7
      src/pages/order/components/OrderObligationItem.vue
  21. 4 3
      src/pages/order/index.vue
  22. 8 4
      src/pages/order/obligation-detail.vue
  23. 8 7
      src/pages/order_addcart/index.vue
  24. 42 35
      src/pages/payment/index.vue
  25. 19 3
      src/pages/payment/success.vue
  26. 24 0
      src/pages/product/test.json
  27. 22 0
      src/pages/product/test1.json
  28. 1 1
      src/pages/red-integral/index.vue
  29. 7 3
      src/pages/refund/drawback.vue
  30. 54 52
      src/pages/refund/index.vue
  31. 8 4
      src/pages/refund/option.vue
  32. 4 6
      src/pages/revenue-sharing/index.vue
  33. 14 4
      src/pages/store/home/components/MerchantProductCard.vue
  34. 4 0
      src/pages/store/home/index.vue
  35. 1 1
      src/pages/store/nearby/index.vue
  36. 0 132
      src/pages/store/product/detail.json
  37. 7 2
      src/pages/store/product/detail.vue
  38. 82 73
      src/pages/store/product/other.vue
  39. 0 74
      src/pages/store/product/test.json
  40. 18 15
      src/pages/user/address/create-4-level.vue
  41. 1 1
      src/pages/user/address/index.vue
  42. 1 1
      src/pages/user/index.vue
  43. 32 2
      src/pages/vip/index.vue
  44. 二進制
      src/static 2/assets/a_guest_member_bg.png
  45. 二進制
      src/static 2/assets/a_yindao.png
  46. 二進制
      src/static 2/assets/a_yindao_bg.png
  47. 二進制
      src/static 2/assets/add_photos_220711.png
  48. 二進制
      src/static 2/assets/add_pic_220708.png
  49. 二進制
      src/static 2/assets/address_modify_220625.png
  50. 二進制
      src/static 2/assets/address_not_selected.png
  51. 二進制
      src/static 2/assets/address_selected.png
  52. 二進制
      src/static 2/assets/after_sale_220620.png
  53. 二進制
      src/static 2/assets/agreement_checked.png
  54. 二進制
      src/static 2/assets/agreement_toast.png
  55. 二進制
      src/static 2/assets/agreement_unselected.png
  56. 二進制
      src/static 2/assets/akuang.png
  57. 二進制
      src/static 2/assets/annuity_yuan_220713.png
  58. 二進制
      src/static 2/assets/annuitytop_bg_220713.png
  59. 二進制
      src/static 2/assets/apply_chennel_banner.png
  60. 二進制
      src/static 2/assets/authentication_success_220714.png
  61. 二進制
      src/static 2/assets/b_yindao.png
  62. 二進制
      src/static 2/assets/b_yindao_bg.png
  63. 二進制
      src/static 2/assets/back_white.png
  64. 二進制
      src/static 2/assets/bangzhushuoming.png
  65. 二進制
      src/static 2/assets/bangzhuzhongxin_220620.png
  66. 二進制
      src/static 2/assets/banner-dacang.png
  67. 二進制
      src/static 2/assets/bctp_221023.png
  68. 二進制
      src/static 2/assets/bfzx3.png
  69. 二進制
      src/static 2/assets/biaoqianyi.png
  70. 二進制
      src/static 2/assets/biaoqianyi_221025.png
  71. 二進制
      src/static 2/assets/big_storehouse_top_bg.png
  72. 二進制
      src/static 2/assets/big_warehouse_220607.png
  73. 二進制
      src/static 2/assets/bkuang.png
  74. 二進制
      src/static 2/assets/btn_close_black.png
  75. 二進制
      src/static 2/assets/business_circle_220920.png
  76. 二進制
      src/static 2/assets/c_yindao.png
  77. 二進制
      src/static 2/assets/c_yindao_bg.png
  78. 二進制
      src/static 2/assets/calendar_220801.png
  79. 二進制
      src/static 2/assets/chan_bottom_220914.png
  80. 二進制
      src/static 2/assets/chan_gtylk_220914.png
  81. 二進制
      src/static 2/assets/chan_ktsh_220914.png
  82. 二進制
      src/static 2/assets/chan_shlsfy_220914.png
  83. 二進制
      src/static 2/assets/chan_sshxt_220914.png
  84. 二進制
      src/static 2/assets/chan_tjdlbdsy_220914.png
  85. 二進制
      src/static 2/assets/chan_tjqdbdsy_220914.png
  86. 二進制
      src/static 2/assets/chan_tjyhbdsy_220914.png
  87. 二進制
      src/static 2/assets/chan_vip_220915.png
  88. 二進制
      src/static 2/assets/chan_yhxfsy_220914.png
  89. 二進制
      src/static 2/assets/check_in_button.png
  90. 二進制
      src/static 2/assets/chuxubao_huiyuan_220818.png
  91. 二進制
      src/static 2/assets/chuxubao_name.png
  92. 二進制
      src/static 2/assets/cxb_logo_230316.png
  93. 二進制
      src/static 2/assets/d_yindao.png
  94. 二進制
      src/static 2/assets/d_yindao_bg.png
  95. 二進制
      src/static 2/assets/dacang_banner_220829.png
  96. 二進制
      src/static 2/assets/dacang_d_220914.png
  97. 二進制
      src/static 2/assets/dacang_member_bg_220719.png
  98. 二進制
      src/static 2/assets/dacang_member_select.png
  99. 二進制
      src/static 2/assets/dacang_song.png
  100. 0 0
      src/static 2/assets/dacang_x_220914.png

+ 1 - 1
.env.production

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

+ 12 - 1
src/apis/common.ts

@@ -44,7 +44,18 @@ enum API {
44 44
     // 意见反馈提交
45 45
     FEEDBACK = '/api/user/feedback',
46 46
     // 获取热门搜索关键词
47
-    HOT_KEYWORD = '/api/common/hot_keyword'
47
+    HOT_KEYWORD = '/api/common/hot_keyword',
48
+
49
+    HOME_BANNER = '/api/newhome/nologin/banner/home_banner_new'
50
+}
51
+
52
+/**
53
+ * 获取首页轮播图
54
+ */
55
+export function getHomeBanner() {
56
+    return defHttp.get({
57
+        url: API.HOME_BANNER,
58
+    })
48 59
 }
49 60
 
50 61
 // 获取热门搜索关键ygnk

+ 1 - 0
src/apis/model/accumulateIncomeModel.ts

@@ -3,6 +3,7 @@ export interface UserInviteProfitParams {
3 3
     pageNum: number
4 4
     pageSize: number
5 5
     uid: string
6
+    commission_type?: string
6 7
 }
7 8
 
8 9
 export interface AccumulateIncomeModel {

+ 2 - 2
src/apis/user.ts

@@ -368,8 +368,8 @@ export function addressNewCreate(params: {
368 368
     is_default: string,
369 369
     code_list: string,
370 370
     city_id: string,
371
-    village_id: string,
372
-    village: string
371
+    village_id?: string,
372
+    village?: string
373 373
 
374 374
 }) {
375 375
     return defHttp.post({

+ 1 - 1
src/components/CXBDialogSignIn/CXBDialogSIgnIn.vue

@@ -130,7 +130,7 @@ function handleSignInSucceedClose() {
130 130
              class="absolute "
131 131
       ></image>
132 132
       <div class="flex flex-col justify-around items-center relative top-10 gap-3 ">
133
-        <div class="flex gap-2 justify-center items-center mb-4 " v-if="props.day <=6 ">
133
+        <div class="flex gap-2 justify-center items-center mb-4 p-2" v-if="props.day <=6 ">
134 134
           <template v-if="props.day > 0">
135 135
 
136 136
             <SignRedPacket

+ 1 - 1
src/components/CXBSkuPopup/CXBSkuPopup.vue

@@ -128,7 +128,7 @@ function handleCountChange(value) {
128 128
                   剩余库存{{currentSku.stock}}
129 129
                 </div>
130 130
                 <div class="flex items-end gap-2" v-if="detail.mer_id === '148'">
131
-                  {{ currentSku.ot_price * 30 }} 积分
131
+                  {{ (currentSku.price * 30).toFixed(2) }} 积分
132 132
                 </div>
133 133
                 <div class="flex items-end gap-2" v-else>
134 134
                   <FPrice :price="currentSku.price"/>

File diff suppressed because it is too large
+ 1 - 1
src/pages.json


+ 54 - 12
src/pages/accumulate-income/index.vue

@@ -12,12 +12,20 @@ const state = reactive({
12 12
     value: ''
13 13
   }, {
14 14
     text: '分享收益',
15
-    value: 0
15
+    value: '0'
16 16
   }, {
17 17
     text: '奖励收益',
18
-    value: 8
18
+    value: '8'
19 19
   }],
20 20
   selectValue: '',
21
+
22
+  status: 'noMore',
23
+
24
+  currentPage: 1,
25
+  pageSize: 1000,
26
+  totalPage: 1,
27
+
28
+
21 29
   list: [{
22 30
     // number: 0.19,
23 31
     // title: '分享收益',
@@ -30,18 +38,50 @@ const {windowHeight} = uni.getSystemInfoSync()
30 38
 state.scrollHeight = windowHeight - 320
31 39
 onLoad((option: any) => {
32 40
   if (userStore.uid) {
33
-    getUserInviteProfitList({
34
-      pageNum: 1,
35
-      pageSize: 20,
36
-      uid: userStore.uid,
37
-    }).then(res => {
38
-      accumulateIncome.value = res
39
-      state.list = res.pageInfo.list
40
-
41
-    })
41
+    loadList('reload')
42
+    // getUserInviteProfitList({
43
+    //   pageNum: 1,
44
+    //   pageSize: 20,
45
+    //   uid: userStore.uid,
46
+    // }).then(res => {
47
+    //   accumulateIncome.value = res
48
+    //   state.list = res.pageInfo.list
49
+    //
50
+    // })
42 51
   }
43 52
 })
44 53
 
54
+
55
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
56
+  let params: any = {
57
+    pageNum: state.currentPage,
58
+    pageSize: state.pageSize,
59
+    uid: userStore.uid
60
+  }
61
+  if (action === 'reload') {
62
+    params.pageNum = 1
63
+  }
64
+  console.log(state.selectValue)
65
+  if (state.selectValue == 8 || state.selectValue == 0) {
66
+    params.commission_type = state.selectValue
67
+  }
68
+  getUserInviteProfitList({
69
+    ...params
70
+  }).then(res => {
71
+    accumulateIncome.value = res
72
+    if (action === 'page') {
73
+      state.list = state.list.concat(res.pageInfo.list)
74
+    }
75
+    if (action === 'reload') {
76
+      state.list = []
77
+      state.list = res.pageInfo.list
78
+    }
79
+
80
+    if (callback) {
81
+      callback(res)
82
+    }
83
+  })
84
+}
45 85
 // function loadList()
46 86
 </script>
47 87
 <template>
@@ -86,7 +126,9 @@ onLoad((option: any) => {
86 126
 <!--          全部类型-->
87 127
 <!--        </div>-->
88 128
         <nut-menu>
89
-          <nut-menu-item v-model="state.selectValue" :options="state.options" />
129
+          <nut-menu-item v-model="state.selectValue" :options="state.options"
130
+                         @change="loadList('reload')"
131
+          />
90 132
         </nut-menu>
91 133
         <div class="text-xs">金额</div>
92 134
       </div>

+ 57 - 18
src/pages/home/index.vue

@@ -7,7 +7,7 @@ import Announcement from "~/pages/home/components/announcement.vue";
7 7
 import Banner from "~/pages/home/components/banner.vue";
8 8
 import Header from "~/pages/home/components/header.vue";
9 9
 import ProductList from "~/pages/home/components/product-list.vue";
10
-import {getHomeQuickLink, getLocal, getNoticeList} from "~/apis/common";
10
+import {getHomeBanner, getHomeQuickLink, getLocal, getNoticeList} from "~/apis/common";
11 11
 import {useUserStore} from "~/stores/userStore";
12 12
 import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
13 13
 import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
@@ -22,7 +22,6 @@ usePageStore.setPageConfig({
22 22
     url:  '/pages/home/index'
23 23
   }
24 24
 })
25
-console.log(usePageStore.currentPage)
26 25
 
27 26
 // const list = ref([])
28 27
 const state = reactive({
@@ -38,8 +37,15 @@ const state = reactive({
38 37
   all_yanglao: NaN,
39 38
   signToday: NaN,
40 39
   isShowSignIn: false,
40
+  banners: [],
41
+  announcementList: [],
41 42
 
42
-  announcementList: []
43
+  indicatorDots: true,
44
+  circular: true,
45
+  autoplay: true,
46
+  interval: 5000,
47
+  duration: 500,
48
+  currents: "0",
43 49
 })
44 50
 onShow(() => {
45 51
   usePageStore.setPageConfig({
@@ -63,6 +69,10 @@ onShow(() => {
63 69
 })
64 70
 onLoad(() => {
65 71
   getLocal()
72
+  getHomeBanner().then(res => {
73
+    console.log(res)
74
+    state.banners = res
75
+  })
66 76
   // 加载地址数据
67 77
   // orderStore.getCurrentAddress()
68 78
   // 1加载首页数据
@@ -71,14 +81,21 @@ onLoad(() => {
71 81
   getNoticeList().then(res => {
72 82
     state.announcementList = res.list
73 83
   })
74
-  if (userStore.userInfo) {
84
+  state.page = 1
85
+  loadProductList()
86
+})
87
+onShow(() => {
88
+  if (userStore.uid) {
75 89
     // 2 检查用户签到信息
76 90
     getNewSignInInfo().then(res => {
91
+      console.log(res)
77 92
       const {today, day} = res
78
-      state.signToday = day
93
+      state.signToday = today
79 94
       if (today === 0) {
80 95
         state.isShowSignIn = true
81 96
       }
97
+      state.day = day
98
+
82 99
       // // if (today === 0) {
83 100
       //   2.1 弹出签到窗口
84 101
       // }
@@ -86,10 +103,8 @@ onLoad(() => {
86 103
       console.error(error + '->GetNewsSignInInfo')
87 104
     })
88 105
   }
89
-  state.page = 1
90
-  loadProductList()
91
-})
92 106
 
107
+})
93 108
 watch(() => state.isShowSignIn, (val) => {
94 109
   val ? uni.hideTabBar() : uni.showTabBar()
95 110
 })
@@ -137,11 +152,15 @@ function loadProductList() {
137 152
 }
138 153
 const homeBanner = CDN_URL + '/static/assets/home-banner.png'
139 154
 
140
-function handleBannerClick() {
141
-  uni.navigateTo({
142
-    url: '/pages/vip/index'
143
-  })
155
+function handleBannerClick(item) {
156
+  if(item.url == 'rich') {
157
+    uni.navigateTo({
158
+      url: '/pages/vip/index'
159
+    })
160
+  }
144 161
 }
162
+
163
+
145 164
 </script>
146 165
 <template>
147 166
   <div class="h-screen ">
@@ -149,11 +168,29 @@ function handleBannerClick() {
149 168
             :exClass="headerClass"
150 169
     />
151 170
     <div class="flex flex-col gap-3 ">
152
-      <image
153
-          @click="handleBannerClick"
154
-          :src="homeBanner"
155
-             mode="widthFix" class="h-60 w-full "
156
-      ></image>
171
+<!--      <image-->
172
+<!--          @click="handleBannerClick"-->
173
+<!--          :src="homeBanner"-->
174
+<!--             mode="widthFix" class="h-60 w-full "-->
175
+<!--      ></image>-->
176
+
177
+      <div class="w-screen h-65">
178
+        <swiper
179
+            v-if="state.banners"
180
+            :indicator-dots="state.indicatorDots"
181
+            indicator-active-color="#e93323"
182
+            :autoplay="state.autoplay"
183
+            :circular="state.circular"
184
+            :interval="state.interval"
185
+            :duration="state.duration"
186
+            class="w-full h-full"
187
+        >
188
+          <swiper-item v-for="(item, index) in state.banners" :key="index">
189
+            <image :src="item.pic" @tap="handleBannerClick(item)" class="!w-full !h-full" mode="aspectFill"/>
190
+          </swiper-item>
191
+        </swiper>
192
+      </div>
193
+
157 194
       <Navs/>
158 195
 
159 196
       <Announcement :list="state.announcementList"/>
@@ -168,6 +205,8 @@ function handleBannerClick() {
168 205
   <CXBDialogSIgnIn
169 206
       :show="state.isShowSignIn"
170 207
       :today="state.signToday"
208
+      :day="state.day"
209
+
171 210
       @confirm="state.isShowSignIn = false"
172 211
       @close="state.isShowSignIn = false"
173 212
   />
@@ -177,7 +216,7 @@ page {
177 216
   background-color: #f8f8f8;
178 217
 }
179 218
 </style>
180
-<route lang="yaml" type="home">
219
+<route lang="yaml"   type="home">
181 220
 style:
182 221
   navigationStyle: custom
183 222
   navigationBarTitleText: 储蓄保

+ 2 - 2
src/pages/immediate-withdrawal/index.vue

@@ -67,7 +67,7 @@ watch(() => cashWithdrawalAmount.value, (val) => {
67 67
 
68 68
 function handleInputAll() {
69 69
   // console.log(userSpreadInfo.value?.brokerage_price)
70
-  if (userSpreadInfo.value && userSpreadInfo.value.brokerage_price && Number.parseFloat(userSpreadInfo.value?.brokerage_price) >= widthdrawalConfig.value.widthdrawal_money) {
70
+  if (userSpreadInfo.value && userSpreadInfo.value.brokerage_price && userSpreadInfo.value?.brokerage_price >= widthdrawalConfig.value.withdrawal_money) {
71 71
     cashWithdrawalAmount.value = userSpreadInfo.value.brokerage_price
72 72
   } else {
73 73
     uni.showToast({
@@ -109,7 +109,7 @@ function handleImmediateWithdrawal() {
109 109
   }
110 110
 
111 111
   // 2 当输入金额≤可提现余额<最低提现额度
112
-  if (Number.parseFloat(cashWithdrawalAmount.value) <= Number.parseFloat(userBrokeragePrice.value) < widthdrawalConfig.value.withdrawal_money) {
112
+  if (Number.parseFloat(cashWithdrawalAmount.value) <= Number.parseFloat(userBrokeragePrice.value) && Number.parseFloat(cashWithdrawalAmount.value) < widthdrawalConfig.value.withdrawal_money) {
113 113
     // 1 判断是否需要实名
114 114
     if (!yanglaojin.value?.is_certification == 1) {
115 115
       return uni.navigateTo({

+ 1 - 1
src/pages/invite-partners/index.vue

@@ -113,7 +113,7 @@ page {
113 113
 style:
114 114
   navigationBarBackgroundColor: "#FD1642"
115 115
   navigationBarTextStyle: "white"
116
-  navigationBarTitleText: 邀请伙伴a
116
+  navigationBarTitleText: 邀请伙伴
117 117
   enablePullDownRefresh: false
118 118
 
119 119
 </route>

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

@@ -86,6 +86,12 @@ function handleSeckillDateClick(seckill) {
86 86
 }
87 87
 
88 88
 function handleItemClick(seckillItem) {
89
+  if (seckillItem.status == 3) {
90
+    return uni.showToast({
91
+      title: '本场秒杀已结束~',
92
+      icon: 'none'
93
+    })
94
+  }
89 95
   uni.navigateTo({
90 96
     url: `/pages/store/product/detail?id=${seckillItem.product_id}`
91 97
   })

+ 80 - 7
src/pages/my-integral/detail.vue

@@ -3,20 +3,83 @@ import {getUserSignList} from "~/apis/user";
3 3
 import {Ref} from "vue";
4 4
 import type {IntegralModel} from "~/apis/model/integral.model";
5 5
 const list: Ref<Array<IntegralModel> | undefined> = ref<Array<IntegralModel>>()
6
+
7
+const state = reactive({
8
+  status: 'noMore',
9
+
10
+  currentPage: 1,
11
+  pageSize: 20,
12
+  totalPage: 1,
13
+  list: []
14
+})
6 15
 onLoad((option: any) => {
16
+  // getUserSignList({
17
+  //   page: 1,
18
+  //   limit: 10
19
+  // }).then(res => {
20
+  //   list.value = res.list
21
+  //   console.log(res)
22
+  // })
23
+
24
+  loadList('reload')
25
+})
26
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
27
+  if (action == 'reload') {
28
+    state.currentPage = 1
29
+  }
30
+
7 31
   getUserSignList({
8
-    page: 1,
9
-    limit: 10
32
+    page: state.currentPage,
33
+    limit: state.pageSize
10 34
   }).then(res => {
11
-    list.value = res.list
12
-    console.log(res)
35
+    if (action === 'page') {
36
+      state.list = state.list.concat(res.list)
37
+    }
38
+    if (action === 'reload') {
39
+      state.list = res.list
40
+    }
41
+    if (callback) {
42
+      callback(res)
43
+    }
44
+  }).catch(error => {
45
+    uni.showToast({
46
+      title: error,
47
+      icon: 'none'
48
+    })
49
+  })
50
+}
51
+
52
+function handleScrollToLower() {
53
+  state.status = "loading";
54
+  state.currentPage += 1;
55
+  loadList("page", (items) => {
56
+    if (!items.length > 0) {
57
+      console.log("没有更多了");
58
+      state.status = "noMore";
59
+      state.currentPage -= 1;
60
+    }
61
+  });
62
+}
63
+onReachBottom(() => {
64
+  console.log('到底了。。。')
65
+
66
+  handleScrollToLower()
67
+
68
+})
69
+
70
+onPullDownRefresh(() => {
71
+  loadList('reload', items => {
72
+    setTimeout(() => {
73
+      uni.stopPullDownRefresh()
74
+    }, 300)
13 75
   })
14 76
 })
77
+
15 78
 </script>
16 79
 <template>
17
-  <div v-if="list && list.length > 0" class="my-3">
80
+  <div v-if="state.list && state.list.length > 0" class="my-3">
18 81
     <div
19
-        v-for="(item, index) in list"
82
+        v-for="(item, index) in state.list"
20 83
         :key="index"
21 84
         class="bg-white f-hairline-bottom text-sm flex flex-row justify-between p-3">
22 85
       <div class="flex flex-col gap-1">
@@ -28,10 +91,20 @@ onLoad((option: any) => {
28 91
         </div>
29 92
       </div>
30 93
       <div class="flex flex-col gap-1 items-end">
31
-        <div class="text-red font-bold">+{{ item.reward_socre }}</div>
94
+        <div class="text-red font-bold">{{ item.pm == '1' ? '+' : '-' }}{{ item.reward_socre }}</div>
32 95
         <div class="text-[11px]">余额 {{ item.surplus }}</div>
33 96
       </div>
34 97
     </div>
98
+
99
+
100
+    <div class=" flex justify-center items-center text-[12px] text-gray-500" >
101
+      <div v-if="state.status === 'loading'">
102
+        加载中...
103
+      </div>
104
+      <div v-if="state.status === 'noMore'">
105
+        没有更多了~
106
+      </div>
107
+    </div>
35 108
   </div>
36 109
 </template>
37 110
 

+ 2 - 2
src/pages/my-invitation/index.vue

@@ -120,8 +120,8 @@ function handleShowAgreement() {
120 120
 
121 121
     </div>
122 122
 
123
-    <div class="bg-white rounded-lg py-3">
124
-      <FCellGroup divider arrow>
123
+    <div class="bg-white  ">
124
+      <FCellGroup divider arrow :ex-class="['rounded-xl']">
125 125
         <FCell v-for="(item, index) in list" :key="index" :title="item.title" exClass="text-sm font-bold" @click="handleClick(item)"/>
126 126
       </FCellGroup>
127 127
     </div>

+ 2 - 1
src/pages/my-relation-merchant/index.vue

@@ -3,8 +3,9 @@ import FSearch from "~/components/FSearch/FSearch.vue";
3 3
 import {getMyRelationMerchantList, removeMyRelation} from "~/apis/user";
4 4
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
5 5
 const list = ref<any[]>()
6
-onLoad((option: any) => {
6
+onShow(() => {
7 7
   loadMyRelationMerchantList()
8
+
8 9
 })
9 10
 const searchValue = ref('')
10 11
 

+ 5 - 2
src/pages/my-reply/index.vue

@@ -1,10 +1,8 @@
1 1
 <template>
2
-  <CXBBasePage>
3 2
     <div v-if="list && list.length > 0"></div>
4 3
     <div v-else>
5 4
       <CXBEmpty />
6 5
     </div>
7
-  </CXBBasePage>
8 6
 </template>
9 7
 <script setup lang="ts">
10 8
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
@@ -22,6 +20,11 @@ onLoad((options)=> {
22 20
   })
23 21
 } )
24 22
 </script>
23
+<style>
24
+page {
25
+  background: #f8f8f8;
26
+}
27
+</style>
25 28
 <route lang="yaml">
26 29
 style:
27 30
   navigationBarTitleText: 我的评价

+ 52 - 20
src/pages/order-confirm/index.vue

@@ -99,7 +99,6 @@ onLoad(async (options) => {
99 99
 
100 100
   }).catch(error => {
101 101
     uni.hideLoading()
102
-    console.log(error + '----')
103 102
     uni.showToast({
104 103
       title: error,
105 104
       icon: 'none'
@@ -140,15 +139,15 @@ function handleSubmit() {
140 139
   //     })
141 140
   //   }
142 141
   // }
143
-
142
+  console.log(data.type)
144 143
   const paymentData: CreateOrderRequest = {
145 144
     cart_id: data.cartId.split(','),
146 145
     address_id: data.addressId,
147 146
     // 优惠券
148 147
     // coupon:
149 148
     // pay_type;//支付方式:0: 余额;1: 微信;2: 小程序;4: 支付宝;5: 特殊商户积分
150
-    // pay_type:  data.type && data.type == '3' ? '5' : 'weixin',
151
-    pay_type: data.type,
149
+    pay_type:  data.type && data.type == '3' ? '5' : '2',
150
+    // pay_type: data.type,
152 151
     mer_id: data.type && data.type == '3' ? '148': '',
153 152
     // 用户留言
154 153
     mark: data.mark,
@@ -170,23 +169,56 @@ function payment(createOrderData: CreateOrderRequest) {
170 169
     mask: false
171 170
   })
172 171
 
173
-  orderCreate(createOrderData).then(res => {
174
-    if (res) {
175
-      // console.log('order_create')
176
-      console.log(res)
172
+  if (createOrderData.mer_id == '148') {
173
+    orderCreate(createOrderData).then(res => {
174
+      if (res) {
175
+        uni.hideLoading()
176
+        console.log(res)
177
+        // uni.navigateTo({
178
+        //   url: '/pages/payment/success'
179
+        // })
180
+        uni.showToast({
181
+          title: '积分兑换成功',
182
+          icon: 'none'
183
+        }).then(() => {
184
+          setTimeout(() => {
185
+            uni.switchTab({
186
+              url: '/pages/home/index'
187
+            })
188
+          }, 500)
189
+        })
190
+        // uni.navigateTo({
191
+          //   // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`
192
+          // url: '/pages/payment/index?' + `pay_price=${res.groupOrder.pay_price}&order_id=${res.order_id}&OrderList=${JSON.stringify(res.groupOrder)}`
193
+        // })
194
+      }
195
+    }).catch(err => {
177 196
       uni.hideLoading()
178
-      uni.navigateTo({
179
-        // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`
180
-        url: '/pages/payment/index?' + `pay_price=${res.groupOrder.pay_price}&order_id=${res.order_id}&OrderList=${JSON.stringify(res.groupOrder)}`
197
+      return uni.showToast({
198
+        title: err,
199
+        icon: "none"
181 200
       })
182
-    }
183
-  }).catch(err => {
184
-    uni.hideLoading()
185
-    return uni.showToast({
186
-      title: err,
187
-      icon: "none"
188 201
     })
189
-  })
202
+  } else {
203
+    orderCreate(createOrderData).then(res => {
204
+      if (res) {
205
+        console.log(res)
206
+        // console.log('order_create')
207
+        console.log(res)
208
+        uni.hideLoading()
209
+        uni.navigateTo({
210
+          //   // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`
211
+          url: '/pages/payment/index?' + `pay_price=${res.groupOrder.pay_price}&order_id=${res.order_id}&OrderList=${JSON.stringify(res.groupOrder)}`
212
+        })
213
+      }
214
+    }).catch(err => {
215
+      uni.hideLoading()
216
+      return uni.showToast({
217
+        title: err,
218
+        icon: "none"
219
+      })
220
+    })
221
+  }
190 222
 }
191 223
 
192 224
 function handleAddressSelect() {
@@ -310,7 +342,7 @@ function reTotal() {
310 342
                 </div>
311 343
                 <div class="flex justify-between ">
312 344
                   <FPrice :price="orderProductItem.productAttr.price" v-if="item.mer_id != '148'"></FPrice>
313
-                  <FPrice :price="orderProductItem.productAttr.price * 30" v-if="item.mer_id == '148'"></FPrice>
345
+                  <FPrice :price="orderProductItem.productAttr.price * 30" v-if="item.mer_id == '148'"  symbol="积分" position="after"></FPrice>
314 346
                   <nut-input-number v-model="orderProductItem.cart_num" @change="(num) => handleNumberChange(num, orderProductItem)"/>
315 347
 
316 348
                 </div>
@@ -353,7 +385,7 @@ function reTotal() {
353 385
       <div class="flex justify-between items-center p-3">
354 386
         <div class="flex-1 flex text-sm font-bold">
355 387
           应付金额:
356
-          <FPrice v-if="data.type && data.type == '3'" :price="data.totalPrice * 30"></FPrice>
388
+          <FPrice v-if="data.type && data.type == '3'" :price="data.totalPrice * 30" symbol="积分" position="after"></FPrice>
357 389
          <FPrice  v-else :price="data.totalPrice"></FPrice>
358 390
         </div>
359 391
         <div class="flex">

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

@@ -14,6 +14,7 @@ const state = reactive({
14 14
   currentPage: 1,
15 15
   pageSize: 10,
16 16
   totalPage: 1,
17
+  status: 'noMore',
17 18
 
18 19
   list: []
19 20
 })
@@ -34,7 +35,6 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
34 35
     page: state.currentPage,
35 36
     limit: state.pageSize
36 37
   }).then(res => {
37
-    console.log(res)
38 38
     if (action === 'page') {
39 39
       state.list = state.list.concat(res.list)
40 40
     }

+ 23 - 21
src/pages/order/components/OrderItem.vue

@@ -178,7 +178,7 @@ function handleProductItemClick(
178 178
 function handeRefund(orderItem) {
179 179
   uni.navigateTo({
180 180
     // url: `/pages/refund/drawback?detail=${encodeBase64(orderItem)}`
181
-    url: `/pages/refund/option?detail=${encodeBase64(orderItem)}`
181
+    url: `/pages/refund/option?detail=${encodeBase64(orderItem)}&from=${props.tabValue}`
182 182
   })
183 183
 }
184 184
 
@@ -192,7 +192,7 @@ function handleShowObligationOrderDetail(orderItem) {
192 192
 <template>
193 193
   <div class="bg-white rounded p-3">
194 194
     <div
195
-        @stop.stop="handleHeaderClick"
195
+        @tap.stop="handleHeaderClick"
196 196
         class="flex items-center justify-between f-hairline-bottom pb-3">
197 197
       <div class="flex items-center font-bold gap-2 text-sm justify-between">
198 198
         <div class="flex-1 flex items-center gap-2">
@@ -266,10 +266,10 @@ function handleShowObligationOrderDetail(orderItem) {
266 266
       </div>
267 267
 
268 268
       <div v-else  @tap.stop="handleShowOrderDetail(orderItem)">
269
-        <div v-for="(orderProduct, orderProductIndex) in orderItem.orderProduct" :key="orderProductIndex">
269
+        <div v-for="(orderProduct, orderProductIndex) in orderItem.orderProduct" :key="orderProductIndex" class="flex flex-col gap-3">
270 270
           <div class="flex py-2 gap-3">
271 271
             <div class="flex-1 flex gap-2">
272
-              <div class="flex w-20 h-20">
272
+              <div class="flex w-20">
273 273
                 <image :src="orderProduct.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
274 274
 
275 275
               </div>
@@ -290,29 +290,31 @@ function handleShowObligationOrderDetail(orderItem) {
290 290
             </div>
291 291
 
292 292
           </div>
293
-          <div class="flex justify-end gap-2" v-if="orderItem.status == 5">
294
-            <nut-button size="small" type="default" @tap.stop="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
295
-            <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
296 293
 
297
-          </div>
298
-          <div class="flex justify-end gap-2" v-if="orderItem.status == 0">
299
-            <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery"><div class="text-black">提醒发货</div></nut-button>
300
-            <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
301
-          </div>
294
+        </div>
295
+
296
+        <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>
298
+          <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
299
+
300
+        </div>
301
+        <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>
303
+          <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
304
+        </div>
302 305
 
303
-          <div class="flex justify-end gap-2" v-if="orderItem.status == 1">
304
-            <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
305
-            <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
306
+        <div class="flex justify-end gap-2" v-if="orderItem.status == 1">
307
+          <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
308
+          <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
306 309
 
307
-            <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
310
+          <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
308 311
 
309
-          </div>
312
+        </div>
310 313
 
311
-          <div class="flex justify-end gap-2" v-if="orderItem.status == 2">
312
-            <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderItem)">再次购买</nut-button>
313
-            <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
314
+        <div class="flex justify-end gap-2" v-if="orderItem.status == 2">
315
+          <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderItem)">再次购买</nut-button>
316
+          <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
314 317
 
315
-          </div>
316 318
         </div>
317 319
       </div>
318 320
     </div>

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

@@ -208,7 +208,7 @@ function handleShowObligationOrderDetail(orderItem) {
208 208
 
209 209
     <div>
210 210
       <div v-if="orderItem.orderList" @tap.stop="handleShowObligationOrderDetail(orderItem)">
211
-        <div v-for="(order, index) in orderItem.orderList" :key="index">
211
+        <div v-for="(order, index) in orderItem.orderList" :key="index" class="flex flex-col gap-3">
212 212
           <div v-for="(orderProduct, orderProductIndex) in order.orderProduct" :key="orderProductIndex">
213 213
             <div class="flex py-2 gap-3">
214 214
               <div class="flex-1 flex gap-2">
@@ -227,19 +227,19 @@ function handleShowObligationOrderDetail(orderItem) {
227 227
               </div>
228 228
 
229 229
               <div class="flex flex-col justify-center items-center">
230
-<!--                <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
231
-                <FPrice :price="orderProduct.cart_info.productAttr.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
230
+                <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
232 231
                 <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
233 232
               </div>
234 233
 
235 234
             </div>
236
-            <div class="flex justify-end gap-2">
237
-              <nut-button size="small" type="default" @tap.stop="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
238
-              <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
239 235
 
240
-            </div>
241 236
           </div>
242 237
         </div>
238
+        <div class="flex justify-end gap-2">
239
+          <nut-button size="small" type="default" @tap.stop="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
240
+          <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
241
+
242
+        </div>
243 243
 
244 244
       </div>
245 245
     </div>

+ 4 - 3
src/pages/order/index.vue

@@ -1,5 +1,6 @@
1 1
 <template>
2 2
 <!--  <CXBBasePage>-->
3
+  <div class="bg-white">
3 4
   <FNavBar
4 5
       title="我的订单" :left-arrow="true" fixed placeholder z-index="999"
5 6
       ex-class="bg-white w-screen"
@@ -9,7 +10,7 @@
9 10
 
10 11
   <!--    <nut-navbar>-->
11 12
     <!--      <template #content>-->
12
-    <div class="fixed top-20 bg-white w-full z-2">
13
+    <div class="fixed top-18 bg-white w-full z-2">
13 14
       <nut-tabs v-model="state.tabvalue" class="bg-white">
14 15
         <nut-tab-pane title="全部"></nut-tab-pane>
15 16
         <nut-tab-pane title="待付款"></nut-tab-pane>
@@ -19,14 +20,14 @@
19 20
       </nut-tabs>
20 21
     </div>
21 22
 
22
-    <div class="mt-32  pb-safe">
23
+    <div class="mt-30  pb-safe bg-[#f8f8f8]">
23 24
       <AllItemList v-if="state.tabvalue == 0" :tab-value="0"/>
24 25
       <ObligationOrderList v-if="state.tabvalue == 1" :tab-value="1"/>
25 26
       <Order2List v-if="state.tabvalue == 2" :status="'0'"/>
26 27
       <Order3List v-if="state.tabvalue == 3" :status="'1'"/>
27 28
       <Order4List v-if="state.tabvalue == 4" :status="'2'"/>
28 29
     </div>
29
-
30
+</div>
30 31
 <!--  </CXBBasePage>-->
31 32
 </template>
32 33
 <script lang="ts" setup>

+ 8 - 4
src/pages/order/obligation-detail.vue

@@ -22,6 +22,7 @@ onLoad((options) => {
22 22
   // console.log(options.detail)
23 23
   if (options.detail) {
24 24
     detail.value = JSON.parse(decodeBase64(options.detail))
25
+    console.log(detail.value)
25 26
     // console.log(detail.value)
26 27
   // detail.value = JSON.parse(decodeBase64(base64Json))
27 28
   }
@@ -192,11 +193,14 @@ function handleProductItemClick(
192 193
           <image :src="detail.merchant.mer_avatar" mode="widthFix" class="w-5 h-5"></image>
193 194
           <div>{{ detail.merchant.mer_name }}</div>
194 195
         </div>
195
-        <div v-for="(order, index) in detail.orderList" :key="index">
196
+        <div v-for="(order, index) in detail.orderList" :key="index" class="flex flex-col gap-3">
196 197
           <div v-for="(orderProduct, orderProductIndex) in order.orderProduct" :key="orderProductIndex">
197
-            <div class="flex py-2 gap-3">
198
+            <div class="flex p-2 gap-3">
198 199
               <div class="flex-1 flex gap-2"  @tap.stop="handleProductItemClick(orderProduct)">
199
-                <image :src="orderProduct.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
200
+                <div class="w-20 h-20 flex">
201
+                  <image :src="orderProduct.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
202
+
203
+                </div>
200 204
 
201 205
                 <div class="flex flex-col">
202 206
                   <div class="line-clamp-2 text-[12px]"
@@ -212,7 +216,7 @@ function handleProductItemClick(
212 216
 
213 217
               <div class="flex flex-col justify-center items-center">
214 218
 <!--                <FPrice :price="orderProduct.cart_info.productAttr.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
215
-                <FPrice :price="detail.total_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
219
+                <FPrice :price="orderProduct.product_price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
216 220
                 <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
217 221
               </div>
218 222
 

+ 8 - 7
src/pages/order_addcart/index.vue

@@ -53,12 +53,12 @@ onLoad((options) => {
53 53
   loadCartList()
54 54
 })
55 55
 onShow(() => {
56
-  // pageStore.setPageConfig({
57
-  //   orderBack: {
58
-  //     type: 'tab',
59
-  //     url:  '/pages/order_addcart/index'
60
-  //   }
61
-  // })
56
+  pageStore.setPageConfig({
57
+    orderBack: {
58
+      type: 'tab',
59
+      url:  '/pages/order_addcart/index'
60
+    }
61
+  })
62 62
   if (!state.isManage) {
63 63
     state.isManage = true
64 64
   }
@@ -203,7 +203,8 @@ function cartAllCheck(type: 'single' | 'all') {
203 203
   let totalMoney = 0
204 204
   let totalNum = 0
205 205
   state.currentType = type
206
-
206
+  // 解决下单多次
207
+  state.cart_id = []
207 208
   // console.log(type)
208 209
   shopping.value?.list.forEach((goods, index) => {
209 210
     if (type === 'single') {

+ 42 - 35
src/pages/payment/index.vue

@@ -4,35 +4,35 @@
4 4
       ex-class="bg-white w-screen"
5 5
       @click-left="onClickLeft"
6 6
   />
7
-    <div class="w-full mt-20">
8
-      <div class=" flex flex-col gap-3 p-3">
9
-        <div class="flex flex-col justify-center items-center bg-white rounded p-4">
10
-          <div class="text-xs text-gray-500">支付金额</div>
11
-          <FPrice :price="state.payPrice" ex-class="!text-xl font-bold"></FPrice>
7
+  <div class="w-full mt-20">
8
+    <div class=" flex flex-col gap-3 p-3">
9
+      <div class="flex flex-col justify-center items-center bg-white rounded p-4">
10
+        <div class="text-xs text-gray-500">支付金额</div>
11
+        <FPrice :price="state.payPrice" ex-class="!text-xl font-bold"></FPrice>
12
+      </div>
13
+      <div class="bg-white rounded-lg text-sm p-3 flex flex-col">
14
+        <div class="flex f-hairline-bottom text-sm pb-2">
15
+          支付方式
12 16
         </div>
13
-        <div class="bg-white rounded-lg text-sm p-3 flex flex-col">
14
-          <div class="flex f-hairline-bottom text-sm pb-2">
15
-            支付方式
16
-          </div>
17
-          <div>
18
-            <div class="flex items-center justify-between py-3">
19
-              <div class="flex items-center gap-2">
20
-                <image :src="wxLogoImage" mode="widthFix" class="w-8 h-8"></image>
21
-                <div>微信支付</div>
22
-              </div>
17
+        <div>
18
+          <div class="flex items-center justify-between py-3">
19
+            <div class="flex items-center gap-2">
20
+              <image :src="wxLogoImage" mode="widthFix" class="w-8 h-8"></image>
21
+              <div>微信支付</div>
23 22
             </div>
24 23
           </div>
25 24
         </div>
26 25
       </div>
26
+    </div>
27 27
 
28 28
 
29
-      <div class="fixed bottom-0 pb-safe  w-full">
30
-        <div class="px-3">
31
-          <nut-button block type="primary" @click="handleConfirm">立即支付</nut-button>
32
-        </div>
33
-
29
+    <div class="fixed bottom-0 pb-safe  w-full">
30
+      <div class="px-3">
31
+        <nut-button block type="primary" @click="handleConfirm">立即支付</nut-button>
34 32
       </div>
33
+
35 34
     </div>
35
+  </div>
36 36
 </template>
37 37
 <script setup lang="ts">
38 38
 import FPrice from "~/components/FPrice/FPrice.vue";
@@ -101,7 +101,8 @@ function handleConfirm() {
101 101
       OrderLists: state.orderList,
102 102
       type: 'tdbaspzf'
103 103
     },
104
-    envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
104
+    // envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
105
+    envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
105 106
     success(res) {
106 107
       // 打开成功
107 108
       uni.showToast({
@@ -125,7 +126,7 @@ function onClickLeft() {
125 126
     confirmColor: '#FE0032',
126 127
     confirmText: '继续支付',
127 128
     cancelText: '确认离开',
128
-    success: (res) =>  {
129
+    success: (res) => {
129 130
       if (res.confirm) {
130 131
         handleConfirm()
131 132
         uni.$emit('cart-reload')
@@ -146,19 +147,25 @@ function onClickLeft() {
146 147
             }
147 148
           })
148 149
         }
149
-        setTimeout(() => {
150
-          if (state.tabIndex) {
151
-            uni.navigateTo({
152
-              url: `/pages/order/index?tabIndex=${state.tabIndex}&from=payment`,
153
-            })
154
-          } else {
155
-            uni.navigateTo({
156
-              url: `/pages/order/index?tabIndex=1&from=payment`,
157
-            })
158
-          }
159
-          // const tabIndex =
160
-
161
-        }, 300)
150
+        // setTimeout(() => {
151
+        if (state.tabIndex == 0) {
152
+          uni.navigateTo({
153
+            url: '/pages/order/index'
154
+          })
155
+        }
156
+        if (state.tabIndex > 0) {
157
+
158
+          uni.navigateTo({
159
+            url: `/pages/order/index?tabIndex=${state.tabIndex}&from=payment`,
160
+          })
161
+        } else {
162
+          uni.navigateTo({
163
+            url: `/pages/order/index?tabIndex=1&from=payment`,
164
+          })
165
+        }
166
+        // const tabIndex =
167
+
168
+        // }, 300)
162 169
 
163 170
       }
164 171
     },

+ 19 - 3
src/pages/payment/success.vue

@@ -1,21 +1,37 @@
1 1
 <script setup lang="ts">
2 2
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
3
+import FNavBar from "~/components/FNavBar/FNavBar.vue";
3 4
 
4 5
 const icon = 'https://cdn.bjtdba.com/vod/image/2023-09-21/20230921160115229.png'
6
+function onClickLeft() {
7
+  uni.redirectTo({
8
+    url: '/pages/my-integral/index'
9
+  })
10
+}
5 11
 </script>
6 12
 
7 13
 <template>
8
-<CXBBasePage>
9
-  <div class="flex flex-col h-screen w-screen items-center pt-20">
14
+<!--<CXBBasePage>-->
15
+  <FNavBar
16
+      title="我的订单" :left-arrow="true" fixed placeholder z-index="999"
17
+      ex-class="bg-white w-screen"
18
+      @click-left="onClickLeft"
19
+  />
20
+
21
+
22
+  <div class="flex flex-col h-screen w-screen items-center mt-20 pt-20">
10 23
 
11 24
     <image :src="icon" mode="widthFix" class="w-40"></image>
12 25
     <div>支付成功</div>
13 26
   </div>
14
-</CXBBasePage>
27
+<!--</CXBBasePage>-->
15 28
 </template>
16 29
 
17 30
 
18 31
 <route lang="yaml">
19 32
 style:
33
+  navigationStyle: custom
20 34
   navigationBarTitleText: 支付成功
35
+  enablePullDownRefresh: false
36
+
21 37
 </route>

+ 24 - 0
src/pages/product/test.json

@@ -0,0 +1,24 @@
1
+{
2
+  "status": 200,
3
+  "message": "success",
4
+  "data": {
5
+    "address_id": "339",
6
+    "uid": "420",
7
+    "real_name": "石头",
8
+    "phone": "15357047038",
9
+    "province": "北京",
10
+    "city": "北京市",
11
+    "city_id": "67449",
12
+    "district": "顺义区",
13
+    "village": "光明街道",
14
+    "village_id": "493",
15
+    "detail": "临河悦园8号楼一单元1203",
16
+    "post_code": "0",
17
+    "longitude": "0",
18
+    "latitude": "0",
19
+    "is_default": "1",
20
+    "is_del": "0",
21
+    "create_time": "2023-09-26 14:40:40",
22
+    "code_list": "1,67449,35,493"
23
+  }
24
+}

+ 22 - 0
src/pages/product/test1.json

@@ -0,0 +1,22 @@
1
+{
2
+  "status": 200,
3
+  "message": "success",
4
+  "data": {
5
+    "address_id": "31",
6
+    "uid": "420",
7
+    "real_name": "记得记得",
8
+    "phone": "15810674432",
9
+    "province": "北京",
10
+    "city": "北京市",
11
+    "city_id": "2",
12
+    "district": "顺义区",
13
+    "detail": "记得记得",
14
+    "post_code": "0",
15
+    "longitude": "0",
16
+    "latitude": "0",
17
+    "is_default": "1",
18
+    "is_del": "0",
19
+    "create_time": "2022-12-08 11:54:49",
20
+    "code_list": "1,67449,35,493"
21
+  }
22
+}

+ 1 - 1
src/pages/red-integral/index.vue

@@ -135,7 +135,7 @@ function handleImmediateWithdrawal() {
135 135
                   <div class="text-sm" v-if="userStore.userInfo">
136 136
                     {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
137 137
                   </div>
138
-                  <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center px-2">
138
+                  <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-fit h-5 justify-center items-center px-2">
139 139
                     {{userType}}
140 140
                   </div>
141 141
                 </div>

+ 7 - 3
src/pages/refund/drawback.vue

@@ -14,7 +14,8 @@ const state = reactive({
14 14
   showReasonPopup: false,
15 15
   // detail: {}
16 16
   total_price: '0.00',
17
-  orderId: ''
17
+  orderId: '',
18
+  from: '',
18 19
 
19 20
 })
20 21
 const userStore = useUserStore()
@@ -56,6 +57,9 @@ function handleUploadSuccess({ data, option, fileItem }) {
56 57
   // console.log(fileItem)
57 58
 }
58 59
 onLoad(async (options) => {
60
+  if (options && options.from !== '') {
61
+    state.from = options.from
62
+  }
59 63
   await userStore.getUserInfo()
60 64
   formData.refund_type = options.refund_type
61 65
   formData.ids = options.ids
@@ -84,14 +88,14 @@ function handleSubmit() {
84 88
     confirmColor: '#FE0032',
85 89
     success: function (res) {
86 90
       if (res.confirm) {
87
-        refundApply(state.orderId, formData).then(res => {
91
+        refundApply(state.orderId.toString(), formData).then(res => {
88 92
           // {"status":200,"message":"申请退款成功","data":{"refund_order_id":"671"}}
89 93
           uni.showToast({
90 94
             title: '申请退款成功'
91 95
           })
92 96
           setTimeout(() => {
93 97
             uni.navigateTo({
94
-              url: '/pages/refund/index'
98
+              url: `/pages/refund/index?from=${state.from}`
95 99
             })
96 100
           }, 300)
97 101
         })

+ 54 - 52
src/pages/refund/index.vue

@@ -2,6 +2,7 @@
2 2
 import {refundList} from "~/apis/order.api";
3 3
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
4 4
 import RefundOrderItem from "~/pages/order/components/RefundOrderItem.vue";
5
+import FNavBar from "~/components/FNavBar/FNavBar.vue";
5 6
 
6 7
 const state = reactive({
7 8
   tabvalue: 0,
@@ -14,14 +15,22 @@ const state = reactive({
14 15
   totalPage: 1,
15 16
 
16 17
   status: 'noMore',
18
+
19
+  from: null
17 20
 })
18 21
 
19
-onLoad(() => {
22
+onLoad((options) => {
23
+  if (options && options.from) {
24
+    state.from = options.from
25
+  }
20 26
   loadList('reload')
21 27
 })
22 28
 
23 29
 
24 30
 function loadList(action: 'page' | 'reload',  callback?: (items) => void) {
31
+  if (action == 'reload') {
32
+    state.list = []
33
+  }
25 34
   const params = {
26 35
     page: state.currentPage,
27 36
     limit: state.pageSize,
@@ -79,71 +88,64 @@ function handleTabChange(	{title,paneKey,disabled}) {
79 88
     loadList('reload')
80 89
   }
81 90
 }
91
+
92
+function onClickLeft() {
93
+
94
+  if (state.from) {
95
+    uni.navigateTo({
96
+      url: '/pages/order/index?tabIndex=' + state.from
97
+    })
98
+  } else {
99
+    uni.navigateBack()
100
+  }
101
+}
82 102
 </script>
83 103
 <template>
84
-  <div>
85
-    <nut-tabs v-model="state.tabvalue" @change="handleTabChange">
86
-      <nut-tab-pane title="全部">
87
-          <div v-if="state.list.length > 0" class="flex flex-col">
88
-            <div v-for="(orderItem, index) in state.list" :key="index">
89
-              <RefundOrderItem :order-item="orderItem"/>
90
-            </div>
91
-            <div class=" flex justify-center items-center text-[12px] text-gray-500" >
92
-              <div v-if="state.status === 'loading'">
93
-                加载中...
94
-              </div>
95
-              <div v-if="state.status === 'noMore'">
96
-                没有更多了~
97
-              </div>
98
-            </div>
99
-          </div>
100
-          <CXBEmpty v-else/>
101
-      </nut-tab-pane>
102
-      <nut-tab-pane title="退款中">
103
-        <div v-if="state.list.length > 0" class="flex flex-col gap-3">
104
-          <div v-for="(orderItem, index) in state.list" :key="index">
105
-            <RefundOrderItem :order-item="orderItem"/>
106
-          </div>
107
-          <div class=" flex justify-center items-center text-[12px] text-gray-500" >
108
-            <div v-if="state.status === 'loading'">
109
-              加载中...
110
-            </div>
111
-            <div v-if="state.status === 'noMore'">
112
-              没有更多了~
113
-            </div>
114
-          </div>
115
-        </div>
116
-        <CXBEmpty v-else/>
117
-      </nut-tab-pane>
118
-      <nut-tab-pane title="退款完成">
119
-        <div v-if="state.list.length > 0" class="flex flex-col gap-3">
120
-          <div v-for="(orderItem, index) in state.list" :key="index">
121
-            <RefundOrderItem :order-item="orderItem"/>
122
-          </div>
123
-          <div class=" flex justify-center items-center text-[12px] text-gray-500" >
124
-            <div v-if="state.status === 'loading'">
125
-              加载中...
126
-            </div>
127
-            <div v-if="state.status === 'noMore'">
128
-              没有更多了~
129
-            </div>
130
-          </div>
131
-        </div>
132
-        <CXBEmpty v-else/>
133
-      </nut-tab-pane>
104
+  <FNavBar
105
+      title="我的订单" :left-arrow="true" fixed placeholder z-index="999"
106
+      ex-class="bg-white w-screen"
107
+      @click-left="onClickLeft"
108
+  />
109
+  <div class="fixed top-18 bg-white w-full z-2">
110
+    <nut-tabs v-model="state.tabvalue" class="bg-white" @change="handleTabChange">
111
+      <nut-tab-pane title="全部"></nut-tab-pane>
112
+      <nut-tab-pane title="退款中"></nut-tab-pane>
113
+      <nut-tab-pane title="退款完成"></nut-tab-pane>
134 114
     </nut-tabs>
135 115
   </div>
116
+  <div v-if="state.list.length > 0" class="mt-30 flex flex-col p-3">
117
+    <div v-for="(orderItem, index) in state.list" :key="index">
118
+      <RefundOrderItem :order-item="orderItem"/>
119
+    </div>
120
+    <div class=" flex justify-center items-center text-[12px] text-gray-500" >
121
+      <div v-if="state.status === 'loading'">
122
+        加载中...
123
+      </div>
124
+      <div v-if="state.status === 'noMore'">
125
+        没有更多了~
126
+      </div>
127
+    </div>
128
+  </div>
129
+  <CXBEmpty v-else/>
130
+
136 131
 </template>
137 132
 <route lang="yaml">
138 133
 style:
139 134
   navigationBarTitleText: 退款/售后
135
+  navigationStyle: custom
136
+
140 137
 </route>
141 138
 
142 139
 <style>
143 140
 page {
144 141
   background: #f8f8f8;
145 142
 }
143
+
144
+.nut-tabs__titles {
145
+  background: white !important;
146
+}
147
+
146 148
 .nut-tab-pane {
147
-  background: #f8f8f8 !important;
149
+  display: none !important;
148 150
 }
149 151
 </style>

File diff suppressed because it is too large
+ 8 - 4
src/pages/refund/option.vue


+ 4 - 6
src/pages/revenue-sharing/index.vue

@@ -208,12 +208,12 @@ onReachBottom(() => {
208 208
 
209 209
 
210 210
     </div>
211
-    <div class="px-3 py-3 flex flex-col gap-3 pt-45 pb-safe">
212
-      <div>
213
-        <div v-if="state.list && state.list.length > 0" class="  gap-3 flex flex-col">
214
-          <div class="bg-white p-3">
211
+    <div class="px-3 py-3 flex flex-col gap-3 mt-45 pb-safe bg-[#f8f8f8] h-full">
212
+        <div v-if="state.list && state.list.length > 0" class=" ">
213
+          <div class="   flex flex-col gap-3">
215 214
             <div v-for="(item, index) in state.list" :key="index"
216 215
                  @click="handleItemClick(item)"
216
+                 class="bg-white rounded p-3"
217 217
             >
218 218
               <div class="flex flex-col">
219 219
                 <div class="flex justify-between text-gray text-xs items-center f-hairline-bottom pb-3">
@@ -255,7 +255,6 @@ onReachBottom(() => {
255 255
         </div>
256 256
 
257 257
         <CXBEmpty v-else/>
258
-      </div>
259 258
 
260 259
     </div>
261 260
   </div>
@@ -271,6 +270,5 @@ style:
271 270
 <style>
272 271
 page {
273 272
   background: #f8f8f8;
274
-  overflow: hidden;
275 273
 }
276 274
 </style>

+ 14 - 4
src/pages/store/home/components/MerchantProductCard.vue

@@ -11,6 +11,7 @@ import {DcProductModel} from "~/apis/model/dacang.model";
11 11
 import {encodeBase64} from "~/utils/http/helper";
12 12
 
13 13
 interface ProductDetail {
14
+  mer_id: '',
14 15
   product_id: '',
15 16
   type: string
16 17
   image: string
@@ -38,6 +39,9 @@ const props = defineProps({
38 39
   // ...styleProps
39 40
 })
40 41
 
42
+const is148Merchant = computed(() => {
43
+  return props.item.mer_id && props.item.mer_id == '148'
44
+})
41 45
 
42 46
 </script>
43 47
 
@@ -63,7 +67,11 @@ const props = defineProps({
63 67
         </div>
64 68
       </div>
65 69
       <div class="flex flex-row items-center gap-2">
66
-        <div class="flex text-[#FE0032] font-bold text-lg">
70
+        <div v-if="is148Merchant && item.price" class="flex justify-end items-end gap-2 text-[#FE0032]">
71
+          <div class="!text-[24px]">{{ Number.parseFloat(item.price * 30).toFixed(2) }} </div>
72
+          <div class="text-sm">积分</div>
73
+        </div>
74
+        <div class="flex text-[#FE0032] font-bold text-lg" v-else>
67 75
           <div>
68 76
69 77
           </div>
@@ -71,11 +79,13 @@ const props = defineProps({
71 79
             {{ item.price }}
72 80
           </div>
73 81
         </div>
74
-      </div>
75 82
 
76
-      <div class="line-through text-xs font-bold flex " v-if="item.ot_price">
77
-          ¥ {{item.ot_price}}
78 83
       </div>
84
+      <div class="line-through text-xs font-bold flex " v-if="item.ot_price && !is148Merchant">
85
+        ¥ {{item.ot_price}}
86
+      </div>
87
+
88
+
79 89
     </div>
80 90
   </div>
81 91
 </template>

+ 4 - 0
src/pages/store/home/index.vue

@@ -71,6 +71,10 @@ onLoad((options: any) => {
71 71
   }
72 72
 })
73 73
 
74
+const is148Merchant = computed(() => {
75
+  return merchant.value && merchant.value.mer_id && merchant.value.mer_id == '148'
76
+})
77
+
74 78
 // onShow(() => {
75 79
 //
76 80
 // })

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

@@ -54,6 +54,7 @@ onLoad(() => {
54 54
   getSelectMerchantSort().then(res => {
55 55
     state.merchantCategory = res.merchantCategory
56 56
   })
57
+  loadAll()
57 58
 
58 59
   // loadSelectMerchant('reload')
59 60
 })
@@ -65,7 +66,6 @@ onShow(() => {
65 66
       url:  '/pages/store/nearby/index'
66 67
     }
67 68
   })
68
-  loadAll()
69 69
 
70 70
 })
71 71
 

+ 0 - 132
src/pages/store/product/detail.json

@@ -1,132 +0,0 @@
1
-{
2
-  "status": 200,
3
-  "message": "success",
4
-  "data": {
5
-    "product_id": "4858",
6
-    "mer_id": "321",
7
-    "image": "https:\/\/img.yunzhonghe.com\/image\/1594102082351snWdknfIaZ.jpg",
8
-    "slider_image": [
9
-      "https:\/\/img.yunzhonghe.com\/image\/1594102082351snWdknfIaZ.jpg"
10
-    ],
11
-    "store_name": "壳子妃子玫瑰红葡萄干235gS011 香槟黄 香槟黄",
12
-    "store_info": "1",
13
-    "unit_name": "个",
14
-    "price": "29.10",
15
-    "cost": "26.46",
16
-    "ot_price": "67.00",
17
-    "stock": "1000",
18
-    "sales": 100,
19
-    "video_link": "",
20
-    "product_type": "0",
21
-    "type": "5",
22
-    "dc_price": "29.90",
23
-    "seckill": "1",
24
-    "isRelation": false,
25
-    "sku": {
26
-      "默认": {
27
-        "sku": "默认",
28
-        "price": "29.10",
29
-        "stock": "100",
30
-        "image": "https:\/\/img.yunzhonghe.com\/image\/1594102082351snWdknfIaZ.jpg",
31
-        "bar_code": "",
32
-        "weight": "0.00",
33
-        "volume": "0.00",
34
-        "ot_price": "67.00",
35
-        "unique": "6b0753bbacf0",
36
-        "dacang": "29.90"
37
-      }
38
-    },
39
-    "replayData": {
40
-      "best": 0,
41
-      "rate": "",
42
-      "count": 0
43
-    },
44
-    "unique": "6b0753bbacf0",
45
-    "attr": [
46
-      {
47
-        "product_id": "4858",
48
-        "attr_name": "规格",
49
-        "attr_values": [
50
-          "默认"
51
-        ],
52
-        "type": "0",
53
-        "attr_id": null,
54
-        "attr_value": [
55
-          {
56
-            "attr": "默认",
57
-            "check": false
58
-          }
59
-        ]
60
-      }
61
-    ],
62
-    "yanglao": "1.49",
63
-    "product_count": 89,
64
-    "merchant_type": "3",
65
-    "seckill_date_end": "2023-08-22 18:00:00",
66
-    "seckill_s": 0,
67
-    "content": {
68
-      "product_id": "4858",
69
-      "content": "<img src='https:\/\/img.yunzhonghe.com\/image\/1594102142038jrPEvcMTXF.jpg'>",
70
-      "type": "0"
71
-    },
72
-    "topReply": null,
73
-    "merchant": {
74
-      "mer_id": "321",
75
-      "mer_name": "大仓创客",
76
-      "mer_avatar": "https:\/\/app.bjtdba.com\/uploads\/def\/20220428\/d616961db8aefbe92f72972a1d7db88a.png",
77
-      "product_score": "3.8",
78
-      "service_score": "3.6",
79
-      "postage_score": "3.6",
80
-      "service_phone": "13260336036",
81
-      "care_count": "11",
82
-      "business_id": "0",
83
-      "sxy_submerchant_id": "895152791",
84
-      "im": {
85
-        "im": "0",
86
-        "im_uuid": null,
87
-        "account": "12222222222"
88
-      },
89
-      "recommend": [
90
-        {
91
-          "mer_id": "321",
92
-          "product_id": "6183",
93
-          "store_name": "苏泊尔(SUPOR)ZMD安心系列 智能电饭煲电饭锅 5L容量 球釜内胆 多功能智能预约 香槟金色CFXB50FC59-75",
94
-          "image": "https:\/\/img13.360buyimg.com\/n12\/jfs\/t1\/52232\/37\/17532\/79491\/63282471Ec5d2ca36\/7c12d780f0be4a38.jpg",
95
-          "price": "240.79",
96
-          "is_show": "1",
97
-          "status": "1",
98
-          "is_gift_bag": "0",
99
-          "is_good": "0",
100
-          "ot_price": "279.00",
101
-          "yanglao": "5.47"
102
-        },
103
-        {
104
-          "mer_id": "321",
105
-          "product_id": "6193",
106
-          "store_name": "瑞士宾爵手表钟表高端绿面钢带防水配饰女表B1530L",
107
-          "image": "https:\/\/oss-hxq-prod.szbaoly.com\/bjsc\/goods\/16396d71ec8e4552a5530b33f517a344.jpg",
108
-          "price": "251.55",
109
-          "is_show": "1",
110
-          "status": "1",
111
-          "is_gift_bag": "0",
112
-          "is_good": "0",
113
-          "ot_price": "1217.00",
114
-          "yanglao": "5.71"
115
-        },
116
-        {
117
-          "mer_id": "321",
118
-          "product_id": "6201",
119
-          "store_name": "瑞士宾爵手表钟表小方表轻奢时尚配饰女表B1020L",
120
-          "image": "https:\/\/oss-hxq-prod.szbaoly.com\/bjsc\/goods\/1d66a54c8c454ece98e1b042adf093f3.jpg",
121
-          "price": "247.56",
122
-          "is_show": "1",
123
-          "status": "1",
124
-          "is_gift_bag": "0",
125
-          "is_good": "0",
126
-          "ot_price": "2980.00",
127
-          "yanglao": "5.62"
128
-        }
129
-      ]
130
-    }
131
-  }
132
-}

+ 7 - 2
src/pages/store/product/detail.vue

@@ -62,6 +62,12 @@ const state = reactive({
62 62
 const detail: any = ref(null)
63 63
 
64 64
 onShow(() => {
65
+  uni.showLoading({
66
+    title: '数据加载中',
67
+    icon: 'none'
68
+  })
69
+  loadProductDetail()
70
+
65 71
   usePageStore.setPageConfig({
66 72
     orderBack: {
67 73
       type: 'page',
@@ -89,7 +95,6 @@ onLoad((option: any) => {
89 95
     state.recommendList = res.list
90 96
   })
91 97
 
92
-  loadProductDetail()
93 98
 })
94 99
 
95 100
 function loadProductDetail() {
@@ -104,6 +109,7 @@ function loadProductDetail() {
104 109
     state.isRelation = res.isRelation
105 110
     // if (detail.value.mer_id === '148') {
106 111
     // }
112
+    uni.hideLoading()
107 113
   }).catch(error => {
108 114
     // console.log(error)
109 115
     uni.showToast({
@@ -446,7 +452,6 @@ function handleShowCustomer() {
446 452
 
447 453
       <div
448 454
           class="flex flex-col p-3 gap-3"
449
-          v-if="!detail.seckill == 1"
450 455
       >
451 456
         <div class="flex flex-row  items-center text-[#FE0032] font-bold text-lg gap-2">
452 457
           <div v-if="is148Merchant && detail.price" class="flex justify-end items-end gap-2">

+ 82 - 73
src/pages/store/product/other.vue

@@ -49,6 +49,9 @@ const props = defineProps({
49 49
   }
50 50
 })
51 51
 
52
+const state = reactive({
53
+  data: {}
54
+})
52 55
 const detail = ref<IProductDetail>()
53 56
 onLoad((options: any) => {
54 57
 
@@ -56,12 +59,15 @@ onLoad((options: any) => {
56 59
   // console.log(data)
57 60
   mergeProductDetail(data)
58 61
   // if (options.platform && options.id) {
62
+  uni.showLoading({
63
+    title: '数据加载中',
64
+    icon: 'none'
65
+  })
59 66
   loadProductDetail(data)
60 67
   // }
61 68
 })
62 69
 onShow(() => {
63 70
   isSubmit.value = false
64
-
65 71
 })
66 72
 
67 73
 function mergeProductDetail(data: Partial<IProductDetail> = {}) {
@@ -80,6 +86,8 @@ function loadProductDetail(product: Partial<IProductDetail>) {
80 86
         },
81 87
         ...jdProduct
82 88
       })
89
+
90
+      uni.hideLoading()
83 91
     })
84 92
   }
85 93
   // 淘宝
@@ -94,6 +102,8 @@ function loadProductDetail(product: Partial<IProductDetail>) {
94 102
         },
95 103
         ...product
96 104
       })
105
+      uni.hideLoading()
106
+
97 107
     })
98 108
   }
99 109
 
@@ -124,6 +134,9 @@ function loadProductDetail(product: Partial<IProductDetail>) {
124 134
           coupon: null
125 135
         })
126 136
       }
137
+
138
+      uni.hideLoading()
139
+
127 140
     })
128 141
   }
129 142
 
@@ -148,6 +161,9 @@ function loadProductDetail(product: Partial<IProductDetail>) {
148 161
           }
149 162
         })
150 163
       }
164
+
165
+      uni.hideLoading()
166
+
151 167
     })
152 168
   }
153 169
   // 苏宁
@@ -158,6 +174,9 @@ function loadProductDetail(product: Partial<IProductDetail>) {
158 174
         images: res.detail,
159 175
         ...res
160 176
       })
177
+
178
+      uni.hideLoading()
179
+
161 180
     })
162 181
   }
163 182
   // 抖音
@@ -169,7 +188,12 @@ function loadProductDetail(product: Partial<IProductDetail>) {
169 188
         images: res.imgs,
170 189
         ...res
171 190
       })
191
+
192
+      uni.hideLoading()
193
+
172 194
     })
195
+
196
+
173 197
   }
174 198
 }
175 199
 function handleBuyNow() {
@@ -181,83 +205,68 @@ function handleBuyNow() {
181 205
       url: '/pages/user/login/index'
182 206
     })
183 207
   }
184
-    // debounce(() => {
185
-    //   console.log('debounce.....')
186
-    // }, 300)
187
-    // _debounce(() => {
188
-    //   return uni.navigateTo({
189
-    //     url: '/pages/user/login/index'
190
-    //   })
191
-    // }, 300)
192
-
193
-    // console.log('没登录')
194
-    // return _debounce(() => {
195
-    //     return uni.navigateTo({
196
-    //       url: '/pages/user/login/index'
197
-    //     })
198
-    // }, 300)
199
-  // 京东
200
-  if (detail.value?.platform == 6 && detail.value?.materialUrl) {
201
-    // console.log(detail.value?.spreadUrl)
202
-    console.log(detail.value)
203
-    if (detail.value && detail.value.materialUrl) {
204
-      uni.navigateToMiniProgram({
205
-        appId: 'wx91d27dbf599dff74',
206
-        // path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(detail.value?.spreadUrl),
207
-        path: 'pages/union/proxy/proxy?spreadUrl=' + detail.value.materialUrl,
208
-        extraData: {
209
-          foo: 'bar'
210
-        },
211
-        envVersion: 'release',
212
-        success(res) {
213
-          // 打开成功
214
-          console.log(res);
215
-        },
216
-        fail: (error) => {
217
-          console.log(error);
218
-        }
219
-      })
208
+  if (detail.value?.platform) {
209
+    // 京东
210
+    if (detail.value?.platform == 6 && detail.value?.materialUrl) {
211
+      // console.log(detail.value?.spreadUrl)
212
+      console.log(detail.value)
213
+      if (detail.value && detail.value.materialUrl) {
214
+        uni.navigateToMiniProgram({
215
+          appId: 'wx91d27dbf599dff74',
216
+          // path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(detail.value?.spreadUrl),
217
+          path: 'pages/union/proxy/proxy?spreadUrl=' + detail.value.materialUrl,
218
+          extraData: {
219
+            foo: 'bar'
220
+          },
221
+          envVersion: 'release',
222
+          success(res) {
223
+            // 打开成功
224
+            console.log(res);
225
+          },
226
+          fail: (error) => {
227
+            console.log(error);
228
+          }
229
+        })
230
+      } else {
231
+        return uni.showToast({
232
+          title: '跳转失败请重试',
233
+          icon: 'none'
234
+        })
235
+      }
236
+    } else if (detail.value?.platform == 1) {
237
+      // console.log(detail.value)
238
+      const pddWx = detail.value.pddlink.wx
239
+      if (pddWx) {
240
+        uni.navigateToMiniProgram({
241
+          appId: pddWx.app_id,
242
+          path: pddWx.page_path,
243
+          // extraData: {
244
+          //  foo: 'bar'
245
+          // },
246
+          envVersion: 'release',
247
+          success(res) {
248
+            // 打开成功
249
+            console.log(res);
250
+          },
251
+          fail: (error) => {
252
+            console.log(error);
253
+          }
254
+        })
255
+
256
+      } else {
257
+        uni.showToast({
258
+          title: '跳转失败请重试',
259
+          icon: 'none'
260
+        })
261
+      }
262
+      // console.log(detail.value.pddlink)
263
+      // console.log(pddWx)
220 264
     } else {
221 265
       return uni.showToast({
222
-        title: '跳转失败请重试',
223
-        icon: 'none'
224
-      })
225
-    }
226
-  }
227
-  else if (detail.value?.platform == 1) {
228
-    // console.log(detail.value)
229
-    const pddWx = detail.value.pddlink.wx
230
-    if (pddWx) {
231
-      uni.navigateToMiniProgram({
232
-        appId: pddWx.app_id,
233
-        path: pddWx.page_path,
234
-        // extraData: {
235
-        //  foo: 'bar'
236
-        // },
237
-        envVersion: 'release',
238
-        success(res) {
239
-          // 打开成功
240
-          console.log(res);
241
-        },
242
-        fail: (error) => {
243
-          console.log(error);
244
-        }
245
-      })
246
-
247
-    } else  {
248
-      uni.showToast({
249
-        title: '跳转失败请重试',
266
+        title: '商品维护中,请稍后再试',
250 267
         icon: 'none'
251 268
       })
252 269
     }
253
-    // console.log(detail.value.pddlink)
254
-    // console.log(pddWx)
255
-  }
256
-  else {
257
-    return uni.showToast({
258
-      title: '商品维护中,请稍后再试',
259
-      icon: 'none'
260
-    })
261 270
   }
262 271
   /*
263 272
   if (detail.value?.platform == 3) {

+ 0 - 74
src/pages/store/product/test.json

@@ -1,74 +0,0 @@
1
-{
2
-  "status": 200,
3
-  "message": "success",
4
-  "data": [
5
-    {
6
-      "seckill_date": "22日17:00已结束",
7
-      "ctime": "2023-02-15 01:00:00",
8
-      "product_id": "4508",
9
-      "status": "1",
10
-      "product_data": [
11
-        {
12
-          "mer_id": "321",
13
-          "product_id": "4508",
14
-          "store_name": "韩后熬夜甜睡修护面膜135ml 免洗睡眠面膜补水保湿深层滋养男女可用",
15
-          "image": "https:\/\/img13.360buyimg.com\/n12\/jfs\/t1\/219531\/21\/20940\/41092\/6311db6bE054cabee\/ed882adff197adfb.jpg",
16
-          "ot_price": "109.00",
17
-          "seckill_price": "24.80",
18
-          "yanglao": "1.24",
19
-          "status": 3,
20
-          "img_text": "已结束"
21
-        },
22
-        {
23
-          "mer_id": "321",
24
-          "product_id": "4858",
25
-          "store_name": "壳子妃子玫瑰红葡萄干235gS011 香槟黄 香槟黄",
26
-          "image": "https:\/\/img.yunzhonghe.com\/image\/1594102082351snWdknfIaZ.jpg",
27
-          "ot_price": "67.00",
28
-          "seckill_price": "29.90",
29
-          "yanglao": "1.49",
30
-          "status": 3,
31
-          "img_text": "已结束"
32
-        }
33
-      ]
34
-    },
35
-    {
36
-      "seckill_date": "22日21:00已结束",
37
-      "ctime": "2023-02-14 01:00:00",
38
-      "product_id": "4957",
39
-      "status": 3,
40
-      "product_data": [
41
-        {
42
-          "mer_id": "321",
43
-          "product_id": "4957",
44
-          "store_name": "云南白药清逸堂携爽舒缓棒(简装)  黑  ",
45
-          "image": "https:\/\/img.yunzhonghe.com\/image\/1649999225845LKCOiTiTOm.jpg",
46
-          "ot_price": "59.00",
47
-          "seckill_price": "28.90",
48
-          "yanglao": "1.44",
49
-          "status": 3,
50
-          "img_text": "已结束"
51
-        }
52
-      ]
53
-    },
54
-    {
55
-      "seckill_date": "14日14:00已结束",
56
-      "ctime": "2023-09-14 14:28:33",
57
-      "product_id": "6103",
58
-      "status": "1",
59
-      "product_data": [
60
-        {
61
-          "mer_id": "465",
62
-          "product_id": "6103",
63
-          "store_name": "测试001商品",
64
-          "image": "https:\/\/cdn.bjtdba.com\/chuxubao\/images\/2023-09-09\/3e1a8202309091612417658.jpg",
65
-          "ot_price": "200.00",
66
-          "seckill_price": "10.00",
67
-          "yanglao": "0.50",
68
-          "status": 3,
69
-          "img_text": "已结束"
70
-        }
71
-      ]
72
-    }
73
-  ]
74
-}

+ 18 - 15
src/pages/user/address/create-4-level.vue

@@ -84,7 +84,9 @@ export default {
84 84
       phone: '',
85 85
       address: [],
86 86
       is_default: false,
87
-      code_list: ''
87
+      code_list: '',
88
+      village: '',
89
+      village_id: ''
88 90
     });
89 91
     const state = reactive({
90 92
       cartId: '', // 购物车 id
@@ -108,8 +110,8 @@ export default {
108 110
       country: '',
109 111
       countryId: '',
110 112
       // 街道
111
-      village: '',
112
-      villageId: ''
113
+      // village: '',
114
+      // villageId: ''
113 115
     });
114 116
 
115 117
     const addressData = reactive({
@@ -155,7 +157,7 @@ export default {
155 157
       getUserAddressDetail(state.addressId).then(res => {
156 158
         // console.log(res)
157 159
         // let region = [res.province, res.city, res.district]
158
-        formData.address = [res.province, res.city, res.district]
160
+        formData.address = [res.province, res.city, res.district, res.town]
159 161
         // state.cityId = res.city_id
160 162
         formData.address_id = res.address_id
161 163
         formData.uid = res.uid
@@ -168,8 +170,8 @@ export default {
168 170
         // console.log(formData.address)
169 171
         formData.is_default = res.is_default == '1'
170 172
         formData.code_list = res.code_list
171
-        formData.village = res.village
172
-        formData.village_id = res.village_id
173
+        // formData.village = res.village
174
+        // formData.village_id = res.village_id
173 175
       })
174 176
     }
175 177
     const loadCityList = () => {
@@ -202,6 +204,7 @@ export default {
202 204
           const province = formData.address[0]
203 205
           const city = formData.address[1]
204 206
           const district = formData.address[2]
207
+          // const village = formData.address[3]
205 208
           // const country = formData.address[3]
206 209
           // const village = formData.address[3]
207 210
           let provinceId = ''
@@ -236,9 +239,9 @@ export default {
236 239
             provinceId = basicData.addressObject[0].id
237 240
             cityId = basicData.addressObject[1].id
238 241
             // console.log('city_id: ' + cityId)
239
-            if (!cityId) {
240
-              cityId = '1'
241
-            }
242
+            // if (!cityId) {
243
+            //   cityId = '1'
244
+            // }
242 245
 
243 246
             districtId = basicData.addressObject[2].id
244 247
             countryId = basicData.addressObject[3].id
@@ -248,9 +251,9 @@ export default {
248 251
             } else {
249 252
               formData.code_list = provinceId + ',' + cityId + ',' + districtId
250 253
             }
251
-            if (formData.address[4]) {
252
-              formData.viilage_id = basicData.addressObject[4].id
253
-              formData.village = basicData.addressObject[4].value
254
+            if (formData.address[3]) {
255
+              formData.village_id = basicData.addressObject[3].id
256
+              formData.village = basicData.addressObject[3].value
254 257
             }
255 258
           }
256 259
           addressNewCreate({
@@ -262,10 +265,10 @@ export default {
262 265
             real_name: formData.name,
263 266
             detail: formData.detail,
264 267
             code_list: formData.code_list,
265
-            city_id: cityId ? cityId : '1',
266 268
             // city_id: cityId,
267
-            village_id: formData.villageId,
268
-            village: formData.village,
269
+            city_id: '2',
270
+            // village_id: formData.village_id,
271
+            // village: formData.village,
269 272
             address_id: formData.address_id
270 273
             // address_id
271 274
           }).then(res => {

+ 1 - 1
src/pages/user/address/index.vue

@@ -13,7 +13,7 @@
13 13
               >
14 14
                 默认
15 15
               </div>
16
-              <div class="flex text-sm text-gray-500">{{ item.province + ' ' + item.city + ' ' + item.district + ' ' + item.village}}</div>
16
+              <div class="flex text-sm text-gray-500">{{ item.province + ' ' + item.city + ' ' + item.district + ' ' + (item.town ? item.town : '')}}</div>
17 17
             </div>
18 18
             <div class="flex text-sm font-bold">{{ item.detail }}</div>
19 19
             <div class="flex gap-2 items-center text-xs text-gray-500">

+ 1 - 1
src/pages/user/index.vue

@@ -82,7 +82,7 @@ const myServiceList = [{
82 82
   text: '商铺入驻',
83 83
   url: ''
84 84
 }, {
85
-  icon: CDN_URL + '/static/assets/bfzx3.png',
85
+  icon: '/static/icon/bangfu.png',
86 86
   text: '帮扶中心',
87 87
   url: '/pages/bangfuzhongxin/index'
88 88
 }, {

+ 32 - 2
src/pages/vip/index.vue

@@ -3,7 +3,7 @@
3 3
 
4 4
     <div class="flex flex-col gap-3 ">
5 5
       <div
6
-          class="overflow-hidden fixed top-0 w-full"
6
+          class="overflow-hidden fixed top-0 w-full z-10"
7 7
       >
8 8
         <nut-searchbar
9 9
             v-model="state.keyword" @search="loadList('reload')" @clear="loadList('reload')">
@@ -19,7 +19,25 @@
19 19
           </template>
20 20
         </nut-searchbar>
21 21
       </div>
22
-      <image :src="homeBanner" mode="widthFix" class="h-10 w-full "></image>
22
+<!--      <image :src="homeBanner" mode="widthFix" class="h-10 w-full "></image>-->
23
+
24
+      <div class="w-screen h-65">
25
+        <swiper
26
+            v-if="state.banners"
27
+            :indicator-dots="state.indicatorDots"
28
+            indicator-active-color="#e93323"
29
+            :autoplay="state.autoplay"
30
+            :circular="state.circular"
31
+            :interval="state.interval"
32
+            :duration="state.duration"
33
+            class="w-full h-full"
34
+        >
35
+          <swiper-item v-for="(item, index) in state.banners" :key="index">
36
+            <image :src="item.pic" class="!w-full !h-full" mode="aspectFill"/>
37
+          </swiper-item>
38
+        </swiper>
39
+      </div>
40
+
23 41
       <div class="flex px-3">
24 42
         会员专区
25 43
       </div>
@@ -99,6 +117,7 @@ import {computed} from "vue";
99 117
 import {getVipAreaList} from "~/apis/merchant";
100 118
 import {CDN_URL} from "~/config/app";
101 119
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
120
+import {getHomeBanner} from "~/apis/common";
102 121
 
103 122
 const homeBanner = CDN_URL + '/static/assets/home-banner.png'
104 123
 
@@ -115,9 +134,16 @@ const state = reactive({
115 134
   currentPage: 1,
116 135
   pageSize: 10,
117 136
   totalPage: 1,
137
+  banners: [],
118 138
 
119 139
   keyword: '' ,
120 140
   status: 'noMore',
141
+  indicatorDots: true,
142
+  circular: true,
143
+  autoplay: true,
144
+  interval: 5000,
145
+  duration: 500,
146
+  currents: "0",
121 147
 })
122 148
 const list = ref()
123 149
 
@@ -132,6 +158,10 @@ onLoad(() => {
132 158
   //     list.value = res.list
133 159
   //   }
134 160
   // })
161
+  getHomeBanner().then(res => {
162
+    console.log(res)
163
+    state.banners = res
164
+  })
135 165
   loadList('reload')
136 166
 })
137 167
 

二進制
src/static 2/assets/a_guest_member_bg.png


二進制
src/static 2/assets/a_yindao.png


二進制
src/static 2/assets/a_yindao_bg.png


二進制
src/static 2/assets/add_photos_220711.png


二進制
src/static 2/assets/add_pic_220708.png


二進制
src/static 2/assets/address_modify_220625.png


二進制
src/static 2/assets/address_not_selected.png


二進制
src/static 2/assets/address_selected.png


二進制
src/static 2/assets/after_sale_220620.png


二進制
src/static 2/assets/agreement_checked.png


二進制
src/static 2/assets/agreement_toast.png


二進制
src/static 2/assets/agreement_unselected.png


二進制
src/static 2/assets/akuang.png


二進制
src/static 2/assets/annuity_yuan_220713.png


二進制
src/static 2/assets/annuitytop_bg_220713.png


二進制
src/static 2/assets/apply_chennel_banner.png


二進制
src/static 2/assets/authentication_success_220714.png


二進制
src/static 2/assets/b_yindao.png


二進制
src/static 2/assets/b_yindao_bg.png


二進制
src/static 2/assets/back_white.png


二進制
src/static 2/assets/bangzhushuoming.png


二進制
src/static 2/assets/bangzhuzhongxin_220620.png


二進制
src/static 2/assets/banner-dacang.png


二進制
src/static 2/assets/bctp_221023.png


二進制
src/static 2/assets/bfzx3.png


二進制
src/static 2/assets/biaoqianyi.png


二進制
src/static 2/assets/biaoqianyi_221025.png


二進制
src/static 2/assets/big_storehouse_top_bg.png


二進制
src/static 2/assets/big_warehouse_220607.png


二進制
src/static 2/assets/bkuang.png


二進制
src/static 2/assets/btn_close_black.png


二進制
src/static 2/assets/business_circle_220920.png


二進制
src/static 2/assets/c_yindao.png


二進制
src/static 2/assets/c_yindao_bg.png


二進制
src/static 2/assets/calendar_220801.png


二進制
src/static 2/assets/chan_bottom_220914.png


二進制
src/static 2/assets/chan_gtylk_220914.png


二進制
src/static 2/assets/chan_ktsh_220914.png


二進制
src/static 2/assets/chan_shlsfy_220914.png


二進制
src/static 2/assets/chan_sshxt_220914.png


二進制
src/static 2/assets/chan_tjdlbdsy_220914.png


二進制
src/static 2/assets/chan_tjqdbdsy_220914.png


二進制
src/static 2/assets/chan_tjyhbdsy_220914.png


二進制
src/static 2/assets/chan_vip_220915.png


二進制
src/static 2/assets/chan_yhxfsy_220914.png


二進制
src/static 2/assets/check_in_button.png


二進制
src/static 2/assets/chuxubao_huiyuan_220818.png


二進制
src/static 2/assets/chuxubao_name.png


二進制
src/static 2/assets/cxb_logo_230316.png


二進制
src/static 2/assets/d_yindao.png


二進制
src/static 2/assets/d_yindao_bg.png


二進制
src/static 2/assets/dacang_banner_220829.png


二進制
src/static 2/assets/dacang_d_220914.png


二進制
src/static 2/assets/dacang_member_bg_220719.png


二進制
src/static 2/assets/dacang_member_select.png


二進制
src/static 2/assets/dacang_song.png


+ 0 - 0
src/static 2/assets/dacang_x_220914.png


Some files were not shown because too many files changed in this diff