Przeglądaj źródła

feat: 登录跳转路径调整

Basil 2 lat temu
rodzic
commit
b2bb708e25
36 zmienionych plików z 243 dodań i 54 usunięć
  1. 5 2
      src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue
  2. 1 1
      src/pages/article/detail.vue
  3. 1 1
      src/pages/bangfuzhongxin/index.vue
  4. 1 1
      src/pages/feedback/index.vue
  5. 2 0
      src/pages/home/index.vue
  6. 1 1
      src/pages/invite-friends/index.vue
  7. 2 2
      src/pages/invite-partners/index.vue
  8. 1 1
      src/pages/miaosha/index.vue
  9. 2 2
      src/pages/my-integral/index.vue
  10. 1 1
      src/pages/my-integral/user-invation.vue
  11. 2 2
      src/pages/my-invitation/index.vue
  12. 1 1
      src/pages/my-relation-merchant/index.vue
  13. 5 5
      src/pages/order-confirm/index.vue
  14. 1 1
      src/pages/order/components/AllItemList.vue
  15. 1 1
      src/pages/order/components/Order2List.vue
  16. 1 1
      src/pages/order/components/Order3List.vue
  17. 1 1
      src/pages/order/components/Order4List.vue
  18. 18 6
      src/pages/order/index.vue
  19. 1 1
      src/pages/order/logistics.vue
  20. 1 1
      src/pages/order_addcart/index-bak.vue
  21. 1 1
      src/pages/order_addcart/index-new.vue
  22. 2 0
      src/pages/order_addcart/index.vue
  23. 1 1
      src/pages/pension_record/list.vue
  24. 1 1
      src/pages/red-integral/index.vue
  25. 2 2
      src/pages/revenue-sharing/index.vue
  26. 38 9
      src/pages/store/product/detail.vue
  27. 1 1
      src/pages/store/product/other.vue
  28. 1 1
      src/pages/user/address/create.vue
  29. 3 1
      src/pages/user/index.vue
  30. 1 0
      src/pages/user/login/other-phone.vue
  31. 1 1
      src/pages/version-update/index.vue
  32. 1 1
      src/pages/vip/index.vue
  33. 2 2
      src/pages/withdrawal-record/index.vue
  34. 116 0
      src/test.json
  35. 22 0
      src/utils/index.ts
  36. 1 1
      src/utils/product-page.ts

+ 5 - 2
src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue

@@ -13,9 +13,10 @@ const props = defineProps({
13 13
   }
14 14
 })
15 15
 function getPhoneNumber(e) {
16
-  // console.log(e.detail)
17
-  // console.log(e)
16
+  console.log('get phone....')
17
+  console.log(e)
18 18
   if (e.detail.errMsg === 'getPhoneNumber:ok') {
19
+    
19 20
     uni.login({
20 21
       provider: 'weixin',
21 22
       success: result => {
@@ -45,10 +46,12 @@ function getPhoneNumber(e) {
45 46
           authAppletPhone({
46 47
             ...params
47 48
           }).then(authRes => {
49
+            console.log(authRes)
48 50
             userStore.login(authRes.token, authRes.exp)
49 51
             userStore.setUID(authRes.user.uid)
50 52
             userStore.setUserInfo(authRes.user)
51 53
 
54
+            console.log(authRes)
52 55
             // 绑定手机号
53 56
             bindPhone({
54 57
               phone: authRes.user.account,

+ 1 - 1
src/pages/article/detail.vue

@@ -7,7 +7,7 @@ const article: Ref<ArticleModel | undefined> = ref<ArticleModel>()
7 7
 onLoad((option: any) => {
8 8
   if (option.article_id) {
9 9
     getArticleDetail(option.article_id).then(res => {
10
-      console.log(res)
10
+      // console.log(res)
11 11
       uni.setNavigationBarTitle({
12 12
         title: res.title
13 13
       })

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

@@ -67,7 +67,7 @@ function encodePhone(phone: string) {
67 67
 
68 68
 function handleApplyBangFu() {
69 69
   applyBangFu().then(res => {
70
-    console.log(res)
70
+    // console.log(res)
71 71
   }).catch(error => {
72 72
     uni.showToast({
73 73
       title: error,

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

@@ -88,7 +88,7 @@ const currentTypeId = ref('')
88 88
 const feedbackTypes = ref([])
89 89
 onLoad(() => {
90 90
   getFeedbackType().then(res => {
91
-    console.log(res)
91
+    // console.log(res)
92 92
     feedbackTypes.value = res
93 93
     formData.type = res[0].feedback_category_id
94 94
     currentTypeId.value = res[0].feedback_category_id

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

@@ -97,6 +97,7 @@ function checkSignIn() {
97 97
   // }
98 98
 }
99 99
 onLoad((option) => {
100
+  console.log(option)
100 101
   if (option && option.shareId) {
101 102
     userStore.setShareId(option.shareId)
102 103
   }
@@ -118,6 +119,7 @@ onLoad((option) => {
118 119
   loadProductList()
119 120
 
120 121
   getProductShare().then(res => {
122
+    // console.log(res)
121 123
     if (res) {
122 124
       userStore.setShareId(res.share_id)
123 125
     }

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

@@ -164,7 +164,7 @@ function handleItemClick(item) {
164 164
     uid: userStore.uid,
165 165
     imgId: item.id
166 166
   }).then(res => {
167
-    console.log(res)
167
+    // console.log(res)
168 168
     if (res && res.shareImgs) {
169 169
       state.currentImg = res.shareImgs
170 170
     }

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

@@ -23,7 +23,7 @@ onLoad(() => {
23 23
   }).then(res => {
24 24
     if (res) {
25 25
       invitePartnerModel.value = res
26
-      console.log(res)
26
+      // console.log(res)
27 27
     }
28 28
   })
29 29
 })
@@ -38,7 +38,7 @@ function handleSearch() {
38 38
   }).then(res => {
39 39
     if (res) {
40 40
       invitePartnerModel.value = res
41
-      console.log(res)
41
+      // console.log(res)
42 42
     }
43 43
   })
44 44
 }

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

@@ -43,7 +43,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
43 43
   }).then( res => {
44 44
     if (action === 'reload') {
45 45
       if (res && res.length > 0) {
46
-        console.log(res)
46
+        // console.log(res)
47 47
         const resList = res
48 48
         // const status3List = orderBy(list.value, (val) => {
49 49
         //   return val.status == 3

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

@@ -26,10 +26,10 @@ onShow(() => {
26 26
 function loadSignInInfo() {
27 27
   // 2 检查用户签到信息
28 28
   getNewSignInInfo().then(res => {
29
-    console.log(res)
29
+    // console.log(res)
30 30
     const {today, day} = res
31 31
     state.signToday = today
32
-    console.log(res)
32
+    // console.log(res)
33 33
     if (today == 0) {
34 34
       state.isShowSignIn = true
35 35
     }

+ 1 - 1
src/pages/my-integral/user-invation.vue

@@ -28,7 +28,7 @@ onLoad(() => {
28 28
   }).then(res => {
29 29
     if (res) {
30 30
       invitePartnerModel.value = res
31
-      console.log(res)
31
+      // console.log(res)
32 32
     }
33 33
   })
34 34
 

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

@@ -44,14 +44,14 @@ const userInviteProfit = reactive({
44 44
 onLoad(() => {
45 45
   console.log('load...')
46 46
   getSelectUserInviteProfit({ uid: userStore.uid }).then(res => {
47
-    console.log(res)
47
+    // console.log(res)
48 48
     const inviteData = res.data
49 49
     userInviteProfit.numberSun = res.numberSun
50 50
     userInviteProfit.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit
51 51
     userInviteProfit.UserYesterdayInviteProfit = res.UserYesterdayInviteProfit
52 52
   })
53 53
   getAgentInfo().then(res => {
54
-    console.log(res)
54
+    // console.log(res)
55 55
     if (res) {
56 56
       data.value = res
57 57
     }

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

@@ -16,7 +16,7 @@ function loadMyRelationMerchantList(keywords = '') {
16 16
     keywords,
17 17
   }).then(res => {
18 18
     if (res) {
19
-      console.log(res)
19
+      // console.log(res)
20 20
       list.value = res.list
21 21
     }
22 22
   })

+ 5 - 5
src/pages/order-confirm/index.vue

@@ -73,7 +73,7 @@ onLoad(async (options) => {
73 73
   // console.log(addressStore.address)
74 74
   /// 查看用户VIP信息
75 75
   getUserVipInfo().then(res => {
76
-    console.log(res)
76
+    // console.log(res)
77 77
     data.vipType = res.da_type
78 78
   })
79 79
   /// 检查商品
@@ -89,7 +89,7 @@ onLoad(async (options) => {
89 89
     cart_id: data.cartId.split(','),
90 90
     address_id: data.addressId
91 91
   }).then(res => {
92
-    console.log(res)
92
+    // console.log(res)
93 93
     data.is_dacang_vip_product = res.is_dacang_vip_product
94 94
     data.cartOrder = res.order
95 95
     data.totalPrice = res.order_price
@@ -173,7 +173,7 @@ function payment(createOrderData: CreateOrderRequest) {
173 173
     orderCreate(createOrderData).then(res => {
174 174
       if (res) {
175 175
         uni.hideLoading()
176
-        console.log(res)
176
+        // console.log(res)
177 177
         // uni.navigateTo({
178 178
         //   url: '/pages/payment/success'
179 179
         // })
@@ -202,9 +202,9 @@ function payment(createOrderData: CreateOrderRequest) {
202 202
   } else {
203 203
     orderCreate(createOrderData).then(res => {
204 204
       if (res) {
205
-        console.log(res)
205
+        // console.log(res)
206 206
         // console.log('order_create')
207
-        console.log(res)
207
+        // console.log(res)
208 208
         uni.hideLoading()
209 209
         uni.navigateTo({
210 210
           //   // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`

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

@@ -35,7 +35,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
35 35
     page: state.currentPage,
36 36
     limit: state.pageSize
37 37
   }).then(res => {
38
-    console.log(res)
38
+    // console.log(res)
39 39
     if (action === 'page') {
40 40
       state.list = state.list.concat(res.list)
41 41
     }

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

@@ -33,7 +33,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
33 33
     limit: state.pageSize,
34 34
     status: props.status,
35 35
   }).then(res => {
36
-    console.log(res)
36
+    // console.log(res)
37 37
     if (action === 'page') {
38 38
       state.list = state.list.concat(res.list)
39 39
     }

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

@@ -33,7 +33,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
33 33
     limit: state.pageSize,
34 34
     status: props.status,
35 35
   }).then(res => {
36
-    console.log(res)
36
+    // console.log(res)
37 37
     if (action === 'page') {
38 38
       state.list = state.list.concat(res.list)
39 39
     }

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

@@ -33,7 +33,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
33 33
     limit: state.pageSize,
34 34
     status: props.status,
35 35
   }).then(res => {
36
-    console.log(res)
36
+    // console.log(res)
37 37
     if (action === 'page') {
38 38
       state.list = state.list.concat(res.list)
39 39
     }

+ 18 - 6
src/pages/order/index.vue

@@ -49,7 +49,9 @@ import Order2List from "~/pages/order/components/Order2List.vue";
49 49
 import Order3List from "~/pages/order/components/Order3List.vue";
50 50
 import Order4List from "~/pages/order/components/Order4List.vue";
51 51
 import FNavBar from "~/components/FNavBar/FNavBar.vue";
52
+import {useUserStore} from "~/stores/userStore";
52 53
 const pageStore = usePageStoreWidthOut()
54
+const userStore = useUserStore()
53 55
 
54 56
 
55 57
 const state = reactive({
@@ -78,12 +80,22 @@ const getStatusVal = () => {
78 80
   }
79 81
 }
80 82
 onLoad(options => {
81
-  console.log(options)
82
-  if (options && options.tabIndex) {
83
-    state.tabvalue = options.tabIndex
84
-  }
85
-  if (options && options.from) {
86
-    state.from = options.from
83
+  // console.log(options)
84
+  if (uni.getStorageSync('UID')) {
85
+    if (options && options.tabIndex) {
86
+      state.tabvalue = options.tabIndex
87
+    }
88
+    if (options && options.from) {
89
+      state.from = options.from
90
+    }
91
+  } else {
92
+    // uni.navigateTo({})
93
+    userStore.setRedirectPage(`/pages/order/index`, "page");
94
+    setTimeout(() => {
95
+      uni.navigateTo({
96
+        url: '/pages/user/login/index'
97
+      })
98
+    })
87 99
   }
88 100
   // loadAllOrderList()
89 101
 

+ 1 - 1
src/pages/order/logistics.vue

@@ -32,7 +32,7 @@ onLoad((options) => {
32 32
   if (options && options.id) {
33 33
   getLogistics(options.id).then(res => {
34 34
   // getLogistics(4127).then(res => {
35
-    console.log(res)
35
+  //   console.log(res)
36 36
     if (res && res.order) {
37 37
       state.orderDetail = res.order
38 38
     }

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

@@ -100,7 +100,7 @@ function loadCartList() {
100 100
   getCartList().then(res => {
101 101
     shopping.value = res
102 102
 
103
-    console.log(res)
103
+    // console.log(res)
104 104
     shopping.value?.list.forEach((shopItem, index) => {
105 105
       // shopItem.allCheck = true
106 106
 

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

@@ -97,7 +97,7 @@ function loadCartList() {
97 97
   getCartList().then(res => {
98 98
     shopping.value = res
99 99
 
100
-    console.log(res)
100
+    // console.log(res)
101 101
     shopping.value?.list.forEach((shopItem, index) => {
102 102
       // shopItem.allCheck = true
103 103
       shopItem.indeterminate = false

+ 2 - 0
src/pages/order_addcart/index.vue

@@ -44,6 +44,8 @@ const shopping = ref<ShoppingResult>()
44 44
 
45 45
 onBeforeMount(() => {
46 46
   if (!userStore.uid) {
47
+    userStore.setRedirectPage(`/pages/user/index`, "tab");
48
+
47 49
     return uni.navigateTo({
48 50
       url: '/user/login/index'
49 51
     })

+ 1 - 1
src/pages/pension_record/list.vue

@@ -39,7 +39,7 @@ function _load01List(action: 'reload' | 'page', params: {
39 39
     source: params.source
40 40
   }).then(res => {
41 41
     // list.value = res.list
42
-    console.log(res)
42
+    // console.log(res)
43 43
     if (res && res.list) {
44 44
       if (action === 'page') {
45 45
         // state.list = res.list

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

@@ -11,7 +11,7 @@ const data = ref([])
11 11
 onLoad((options) => {
12 12
   userStore.getUserInfo()
13 13
   getRedIntegralList({page: 1, limit: 20}).then(res => {
14
-    console.log(res)
14
+    // console.log(res)
15 15
     if (res && res.length > 0) {
16 16
       for (let item of res) {
17 17
         // data.value = res

+ 2 - 2
src/pages/revenue-sharing/index.vue

@@ -42,14 +42,14 @@ const state = reactive({
42 42
 onLoad((option: any) => {
43 43
   // 未结算收益
44 44
   getSelectUserInviteProfit({uid: userStore.uid}).then(res => {
45
-    console.log(res)
45
+    // console.log(res)
46 46
     state.numberSun = res.numberSun
47 47
     state.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit ? res.UserUnsettledInviteProfit : '0.00'
48 48
     state.UserYesterdayInviteProfit = res.UserUnsettledInviteProfit ? res.UserUnsettledInviteProfit : '0.00'
49 49
   })
50 50
 
51 51
   getAgentInfo().then(res => {
52
-    console.log(res)
52
+    // console.log(res)
53 53
     state.nickname = res.nickname
54 54
     state.avatar = res.avatar
55 55
     state.brokerage_price = res.brokerage_price

+ 38 - 9
src/pages/store/product/detail.vue

@@ -18,6 +18,7 @@ import {CDN_URL} from "~/config/app";
18 18
 import dayjs from "dayjs";
19 19
 import {getShareId} from "~/apis/product";
20 20
 import {debounce} from "lodash-es";
21
+import {getUrlParams} from "~/utils";
21 22
 
22 23
 const usePageStore = usePageStoreWidthOut()
23 24
 
@@ -35,6 +36,7 @@ const state = reactive({
35 36
   id: '',
36 37
   // 推荐人绑定id
37 38
   shareId: '',
39
+  shareCover: '',
38 40
   // 是否收藏
39 41
   isRelation: false,
40 42
   indicatorDots: true,
@@ -88,8 +90,14 @@ uni.showShareMenu({
88 90
 onLoad((option: any) => {
89 91
   // const id = '4858'
90 92
   state.id = option.id
93
+  let fromShareId = option.shareID
94
+
95
+  if (option && option.scene) {
96
+    const sceneValue = getUrlParams(decodeURIComponent(option.scene))
97
+    state.id = sceneValue.id
98
+    fromShareId = sceneValue.shareID
99
+  }
91 100
   // state.id = 4858
92
-  const fromShareId = option.shareID
93 101
   // console.log(fromShareId + '---share_id...')
94 102
   // if (state.shareId) {
95 103
   if (fromShareId) {
@@ -108,7 +116,9 @@ onLoad((option: any) => {
108 116
   })
109 117
 
110 118
   getShareId({ pid: state.id, type: 1}).then(res => {
119
+    console.log(res)
111 120
     state.shareId = res.share_id
121
+    state.shareCover = res.url
112 122
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
113 123
 
114 124
   })
@@ -164,6 +174,7 @@ onShareAppMessage(async () => {
164 174
       uni.hideLoading()
165 175
       return {
166 176
         title: `${detail.value.store_name}`,
177
+        imageUrl: `${res.url}`,
167 178
         path: `pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`
168 179
       }
169 180
     }
@@ -210,7 +221,7 @@ onShareTimeline(() => {
210 221
 function loadCartCount() {
211 222
   state.cartCount = NaN
212 223
   getCartCount().then(res => {
213
-    console.log(res)
224
+    // console.log(res)
214 225
     state.cartCount = res[0].count
215 226
   }).catch(error => {
216 227
     console.log(error)
@@ -258,7 +269,7 @@ function previewImage(index: number) {
258 269
 
259 270
 function handleShowMerchant(merId: string) {
260 271
 
261
-  console.log(merId)
272
+  // console.log(merId)
262 273
   uni.navigateTo({
263 274
     url: `/pages/store/home/index?id=${merId}`
264 275
   })
@@ -335,6 +346,13 @@ function handleCreateShopping() {
335 346
  * @param flag //1表示立即购买;2表示加入购物车,3表示立即兑换
336 347
  */
337 348
 function handleOrderConfirm(flag: '1' | '2'| '3') {
349
+  console.log(detail.value.seckill)
350
+  if (detail.value.seckill == 1 && detail.value.seckill_s !== 1) {
351
+    return uni.showToast({
352
+      title: '秒杀未开始',
353
+      icon: 'none'
354
+    })
355
+  }
338 356
   debounce(() => {
339 357
     if (!userStore.uid) {
340 358
       return uni.showToast({
@@ -449,10 +467,10 @@ function handleShowCustomer() {
449 467
     },
450 468
     corpId: 'wwaeb55681929a37ae',
451 469
     success: (res => {
452
-      console.log(res)
470
+      // console.log(res)
453 471
     }),
454 472
     fail: (res => {
455
-      console.log(res)
473
+      // console.log(res)
456 474
     })
457 475
   })
458 476
 }
@@ -483,7 +501,7 @@ function handleShowCustomer() {
483 501
         <div class="flex flex-col">
484 502
           <div class="flex gap-2 items-center text-white">
485 503
             <div class="text-[30px] font-bold">
486
-              <text class="text-[20px]">¥</text>{{ detail.price }}
504
+              <text class="text-[20px]">¥</text>{{ detail.dc_price }}
487 505
             </div>
488 506
             <image :src="miaoshaIcon" mode="widthFix" class="w-10"></image>
489 507
           </div>
@@ -522,7 +540,9 @@ function handleShowCustomer() {
522 540
       <div
523 541
           class="flex flex-col p-3 gap-3"
524 542
       >
525
-        <div class="flex flex-row  items-center text-[#FE0032] font-bold text-lg gap-2">
543
+        <div class="flex flex-row  items-center text-[#FE0032] font-bold text-lg gap-2"
544
+             v-if="detail.seckill == 0"
545
+        >
526 546
           <div v-if="is148Merchant && detail.price" class="flex justify-end items-end gap-2">
527 547
             <div class="!text-[24px]">{{ Number.parseFloat(detail.price).toFixed(2) }} </div>
528 548
             <div class="text-sm">积分</div>
@@ -544,7 +564,7 @@ function handleShowCustomer() {
544 564
             class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
545 565
           <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
546 566
                  mode="widthFix" class="!w-8 h-4"></image>
547
-          <div class="px-2 flex items-center jusitify-center" v-if="detail.yanglao">
567
+          <div class="px-2 flex items-center jusitify-center" v-if="detail">
548 568
             <div>
549 569
               养老金 ¥{{ detail.yanglao }}
550 570
             </div>
@@ -732,7 +752,16 @@ function handleShowCustomer() {
732 752
           <div class="text-[11px]">购物车</div>
733 753
         </div>
734 754
       </div>
735
-      <div class="flex flex-row text-sm text-white gap-2 pr-3">
755
+      <div class="flex flex-1 flex-row text-sm text-white px-4" v-if="detail.seckill == 1">
756
+        <div
757
+            class="bg-[#F94032] rounded-full w-full  flex justify-center items-center h-9"
758
+        >
759
+          <div
760
+              @click="handleOrderConfirm('1')"
761
+          >立即抢购</div>
762
+        </div>
763
+      </div>
764
+      <div class="flex flex-row text-sm text-white gap-2 pr-3" v-else>
736 765
         <div
737 766
             @tap="handleAddCart"
738 767
             v-if="!is148Merchant"

+ 1 - 1
src/pages/store/product/other.vue

@@ -189,7 +189,7 @@ function loadProductDetail(product: Partial<IProductDetail>) {
189 189
   // 抖音
190 190
   if (product.platform == 9) {
191 191
     getDyProductDetail(product.id).then(res => {
192
-      console.log(res)
192
+      // console.log(res)
193 193
       mergeProductDetail({
194 194
         mallName: res.shopName,
195 195
         images: res.imgs,

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

@@ -475,7 +475,7 @@ export default {
475 475
           addressNewCreate({
476 476
             ...formValue
477 477
           }).then(res => {
478
-            console.log(res)
478
+            // console.log(res)
479 479
             if (res) {
480 480
               uni.showToast({
481 481
                 title: '保存成功'

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

@@ -137,6 +137,8 @@ onShow(async () => {
137 137
     // })
138 138
 
139 139
   } else {
140
+    userStore.setRedirectPage(`/pages/user/index`, "tab");
141
+
140 142
     uni.navigateTo({
141 143
       url: '/pages/user/login/index?key=3'
142 144
     })
@@ -318,7 +320,7 @@ function handleToContact(item) {
318 320
       },
319 321
       corpId: 'wwaeb55681929a37ae',
320 322
       success: (res => {
321
-        console.log(res)
323
+        // console.log(res)
322 324
       }),
323 325
       fail: (res => {
324 326
         console.log(res)

+ 1 - 0
src/pages/user/login/other-phone.vue

@@ -114,6 +114,7 @@ function handleLogin() {
114 114
   if (shareId && shareId !== '') {
115 115
     params.share_id = shareId
116 116
   }
117
+  console.log(params)
117 118
   authSmsLogin({
118 119
     ...params
119 120
   }).then(authRes => {

+ 1 - 1
src/pages/version-update/index.vue

@@ -11,7 +11,7 @@ const state = reactive({
11 11
 
12 12
 onLoad(() => {
13 13
   getAboutConfig().then(res => {
14
-    console.log(res)
14
+    // console.log(res)
15 15
   })
16 16
 })
17 17
 

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

@@ -164,7 +164,7 @@ onLoad((option) => {
164 164
   userStore.setRedirectPage(`/pages/vip/index`, 'page')
165 165
 
166 166
   getHomeBanner().then(res => {
167
-    console.log(res)
167
+    // console.log(res)
168 168
     state.banners = res
169 169
   })
170 170
   loadList('reload')

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

@@ -8,8 +8,8 @@ onLoad((option) => {
8 8
   getWithdrawal({
9 9
     type: 1
10 10
   }).then(res => {
11
-    console.log('提现记录')
12
-    console.log(res)
11
+    // console.log('提现记录')
12
+    // console.log(res)
13 13
     list.value = res
14 14
   })
15 15
 })

Plik diff jest za duży
+ 116 - 0
src/test.json


+ 22 - 0
src/utils/index.ts

@@ -34,4 +34,26 @@ export function deepMerge<T = any>(src: any = {}, target: any = {}): T {
34 34
 export function encodePhone(phone: string) {
35 35
     // let tel = '13600136000';
36 36
     return phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")
37
+}
38
+
39
+export function getUrlParams (param, k, p) {
40
+    if (typeof param != 'string') return {};
41
+    k = k ? k : '&'; //整体参数分隔符
42
+    p = p ? p : '='; //单个参数分隔符
43
+    var value = {};
44
+    if (param.indexOf(k) !== -1) {
45
+        param = param.split(k);
46
+        for (var val in param) {
47
+            if (param[val].indexOf(p) !== -1) {
48
+                var item = param[val].split(p);
49
+                value[item[0]] = item[1];
50
+            }
51
+        }
52
+    } else if (param.indexOf(p) !== -1) {
53
+        var item = param.split(p);
54
+        value[item[0]] = item[1];
55
+    } else {
56
+        return param;
57
+    }
58
+    return value;
37 59
 }

+ 1 - 1
src/utils/product-page.ts

@@ -148,7 +148,7 @@ export function loadProductList(platform: PLATFORM_NAME) {
148 148
                 limit: 10
149 149
             }).then(res => {
150 150
                 list.value = res
151
-                console.log(res)
151
+                // console.log(res)
152 152
 
153 153
             })
154 154
             break;