Browse Source

feat: 登录跳转路径调整

Basil 3 years ago
parent
commit
b2bb708e25
36 changed files with 243 additions and 54 deletions
  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
 function getPhoneNumber(e) {
15
 function getPhoneNumber(e) {
16
-  // console.log(e.detail)
17
-  // console.log(e)
16
+  console.log('get phone....')
17
+  console.log(e)
18
   if (e.detail.errMsg === 'getPhoneNumber:ok') {
18
   if (e.detail.errMsg === 'getPhoneNumber:ok') {
19
+    
19
     uni.login({
20
     uni.login({
20
       provider: 'weixin',
21
       provider: 'weixin',
21
       success: result => {
22
       success: result => {
@@ -45,10 +46,12 @@ function getPhoneNumber(e) {
45
           authAppletPhone({
46
           authAppletPhone({
46
             ...params
47
             ...params
47
           }).then(authRes => {
48
           }).then(authRes => {
49
+            console.log(authRes)
48
             userStore.login(authRes.token, authRes.exp)
50
             userStore.login(authRes.token, authRes.exp)
49
             userStore.setUID(authRes.user.uid)
51
             userStore.setUID(authRes.user.uid)
50
             userStore.setUserInfo(authRes.user)
52
             userStore.setUserInfo(authRes.user)
51
 
53
 
54
+            console.log(authRes)
52
             // 绑定手机号
55
             // 绑定手机号
53
             bindPhone({
56
             bindPhone({
54
               phone: authRes.user.account,
57
               phone: authRes.user.account,

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

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

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

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

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

@@ -88,7 +88,7 @@ const currentTypeId = ref('')
88
 const feedbackTypes = ref([])
88
 const feedbackTypes = ref([])
89
 onLoad(() => {
89
 onLoad(() => {
90
   getFeedbackType().then(res => {
90
   getFeedbackType().then(res => {
91
-    console.log(res)
91
+    // console.log(res)
92
     feedbackTypes.value = res
92
     feedbackTypes.value = res
93
     formData.type = res[0].feedback_category_id
93
     formData.type = res[0].feedback_category_id
94
     currentTypeId.value = res[0].feedback_category_id
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
 onLoad((option) => {
99
 onLoad((option) => {
100
+  console.log(option)
100
   if (option && option.shareId) {
101
   if (option && option.shareId) {
101
     userStore.setShareId(option.shareId)
102
     userStore.setShareId(option.shareId)
102
   }
103
   }
@@ -118,6 +119,7 @@ onLoad((option) => {
118
   loadProductList()
119
   loadProductList()
119
 
120
 
120
   getProductShare().then(res => {
121
   getProductShare().then(res => {
122
+    // console.log(res)
121
     if (res) {
123
     if (res) {
122
       userStore.setShareId(res.share_id)
124
       userStore.setShareId(res.share_id)
123
     }
125
     }

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

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

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

@@ -23,7 +23,7 @@ onLoad(() => {
23
   }).then(res => {
23
   }).then(res => {
24
     if (res) {
24
     if (res) {
25
       invitePartnerModel.value = res
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
   }).then(res => {
38
   }).then(res => {
39
     if (res) {
39
     if (res) {
40
       invitePartnerModel.value = res
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
   }).then( res => {
43
   }).then( res => {
44
     if (action === 'reload') {
44
     if (action === 'reload') {
45
       if (res && res.length > 0) {
45
       if (res && res.length > 0) {
46
-        console.log(res)
46
+        // console.log(res)
47
         const resList = res
47
         const resList = res
48
         // const status3List = orderBy(list.value, (val) => {
48
         // const status3List = orderBy(list.value, (val) => {
49
         //   return val.status == 3
49
         //   return val.status == 3

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

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

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

@@ -28,7 +28,7 @@ onLoad(() => {
28
   }).then(res => {
28
   }).then(res => {
29
     if (res) {
29
     if (res) {
30
       invitePartnerModel.value = res
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
 onLoad(() => {
44
 onLoad(() => {
45
   console.log('load...')
45
   console.log('load...')
46
   getSelectUserInviteProfit({ uid: userStore.uid }).then(res => {
46
   getSelectUserInviteProfit({ uid: userStore.uid }).then(res => {
47
-    console.log(res)
47
+    // console.log(res)
48
     const inviteData = res.data
48
     const inviteData = res.data
49
     userInviteProfit.numberSun = res.numberSun
49
     userInviteProfit.numberSun = res.numberSun
50
     userInviteProfit.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit
50
     userInviteProfit.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit
51
     userInviteProfit.UserYesterdayInviteProfit = res.UserYesterdayInviteProfit
51
     userInviteProfit.UserYesterdayInviteProfit = res.UserYesterdayInviteProfit
52
   })
52
   })
53
   getAgentInfo().then(res => {
53
   getAgentInfo().then(res => {
54
-    console.log(res)
54
+    // console.log(res)
55
     if (res) {
55
     if (res) {
56
       data.value = res
56
       data.value = res
57
     }
57
     }

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

@@ -16,7 +16,7 @@ function loadMyRelationMerchantList(keywords = '') {
16
     keywords,
16
     keywords,
17
   }).then(res => {
17
   }).then(res => {
18
     if (res) {
18
     if (res) {
19
-      console.log(res)
19
+      // console.log(res)
20
       list.value = res.list
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
   // console.log(addressStore.address)
73
   // console.log(addressStore.address)
74
   /// 查看用户VIP信息
74
   /// 查看用户VIP信息
75
   getUserVipInfo().then(res => {
75
   getUserVipInfo().then(res => {
76
-    console.log(res)
76
+    // console.log(res)
77
     data.vipType = res.da_type
77
     data.vipType = res.da_type
78
   })
78
   })
79
   /// 检查商品
79
   /// 检查商品
@@ -89,7 +89,7 @@ onLoad(async (options) => {
89
     cart_id: data.cartId.split(','),
89
     cart_id: data.cartId.split(','),
90
     address_id: data.addressId
90
     address_id: data.addressId
91
   }).then(res => {
91
   }).then(res => {
92
-    console.log(res)
92
+    // console.log(res)
93
     data.is_dacang_vip_product = res.is_dacang_vip_product
93
     data.is_dacang_vip_product = res.is_dacang_vip_product
94
     data.cartOrder = res.order
94
     data.cartOrder = res.order
95
     data.totalPrice = res.order_price
95
     data.totalPrice = res.order_price
@@ -173,7 +173,7 @@ function payment(createOrderData: CreateOrderRequest) {
173
     orderCreate(createOrderData).then(res => {
173
     orderCreate(createOrderData).then(res => {
174
       if (res) {
174
       if (res) {
175
         uni.hideLoading()
175
         uni.hideLoading()
176
-        console.log(res)
176
+        // console.log(res)
177
         // uni.navigateTo({
177
         // uni.navigateTo({
178
         //   url: '/pages/payment/success'
178
         //   url: '/pages/payment/success'
179
         // })
179
         // })
@@ -202,9 +202,9 @@ function payment(createOrderData: CreateOrderRequest) {
202
   } else {
202
   } else {
203
     orderCreate(createOrderData).then(res => {
203
     orderCreate(createOrderData).then(res => {
204
       if (res) {
204
       if (res) {
205
-        console.log(res)
205
+        // console.log(res)
206
         // console.log('order_create')
206
         // console.log('order_create')
207
-        console.log(res)
207
+        // console.log(res)
208
         uni.hideLoading()
208
         uni.hideLoading()
209
         uni.navigateTo({
209
         uni.navigateTo({
210
           //   // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`
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
     page: state.currentPage,
35
     page: state.currentPage,
36
     limit: state.pageSize
36
     limit: state.pageSize
37
   }).then(res => {
37
   }).then(res => {
38
-    console.log(res)
38
+    // console.log(res)
39
     if (action === 'page') {
39
     if (action === 'page') {
40
       state.list = state.list.concat(res.list)
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
     limit: state.pageSize,
33
     limit: state.pageSize,
34
     status: props.status,
34
     status: props.status,
35
   }).then(res => {
35
   }).then(res => {
36
-    console.log(res)
36
+    // console.log(res)
37
     if (action === 'page') {
37
     if (action === 'page') {
38
       state.list = state.list.concat(res.list)
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
     limit: state.pageSize,
33
     limit: state.pageSize,
34
     status: props.status,
34
     status: props.status,
35
   }).then(res => {
35
   }).then(res => {
36
-    console.log(res)
36
+    // console.log(res)
37
     if (action === 'page') {
37
     if (action === 'page') {
38
       state.list = state.list.concat(res.list)
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
     limit: state.pageSize,
33
     limit: state.pageSize,
34
     status: props.status,
34
     status: props.status,
35
   }).then(res => {
35
   }).then(res => {
36
-    console.log(res)
36
+    // console.log(res)
37
     if (action === 'page') {
37
     if (action === 'page') {
38
       state.list = state.list.concat(res.list)
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
 import Order3List from "~/pages/order/components/Order3List.vue";
49
 import Order3List from "~/pages/order/components/Order3List.vue";
50
 import Order4List from "~/pages/order/components/Order4List.vue";
50
 import Order4List from "~/pages/order/components/Order4List.vue";
51
 import FNavBar from "~/components/FNavBar/FNavBar.vue";
51
 import FNavBar from "~/components/FNavBar/FNavBar.vue";
52
+import {useUserStore} from "~/stores/userStore";
52
 const pageStore = usePageStoreWidthOut()
53
 const pageStore = usePageStoreWidthOut()
54
+const userStore = useUserStore()
53
 
55
 
54
 
56
 
55
 const state = reactive({
57
 const state = reactive({
@@ -78,12 +80,22 @@ const getStatusVal = () => {
78
   }
80
   }
79
 }
81
 }
80
 onLoad(options => {
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
   // loadAllOrderList()
100
   // loadAllOrderList()
89
 
101
 

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

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

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

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

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

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

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

@@ -44,6 +44,8 @@ const shopping = ref<ShoppingResult>()
44
 
44
 
45
 onBeforeMount(() => {
45
 onBeforeMount(() => {
46
   if (!userStore.uid) {
46
   if (!userStore.uid) {
47
+    userStore.setRedirectPage(`/pages/user/index`, "tab");
48
+
47
     return uni.navigateTo({
49
     return uni.navigateTo({
48
       url: '/user/login/index'
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
     source: params.source
39
     source: params.source
40
   }).then(res => {
40
   }).then(res => {
41
     // list.value = res.list
41
     // list.value = res.list
42
-    console.log(res)
42
+    // console.log(res)
43
     if (res && res.list) {
43
     if (res && res.list) {
44
       if (action === 'page') {
44
       if (action === 'page') {
45
         // state.list = res.list
45
         // state.list = res.list

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

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

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

@@ -42,14 +42,14 @@ const state = reactive({
42
 onLoad((option: any) => {
42
 onLoad((option: any) => {
43
   // 未结算收益
43
   // 未结算收益
44
   getSelectUserInviteProfit({uid: userStore.uid}).then(res => {
44
   getSelectUserInviteProfit({uid: userStore.uid}).then(res => {
45
-    console.log(res)
45
+    // console.log(res)
46
     state.numberSun = res.numberSun
46
     state.numberSun = res.numberSun
47
     state.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit ? res.UserUnsettledInviteProfit : '0.00'
47
     state.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit ? res.UserUnsettledInviteProfit : '0.00'
48
     state.UserYesterdayInviteProfit = res.UserUnsettledInviteProfit ? res.UserUnsettledInviteProfit : '0.00'
48
     state.UserYesterdayInviteProfit = res.UserUnsettledInviteProfit ? res.UserUnsettledInviteProfit : '0.00'
49
   })
49
   })
50
 
50
 
51
   getAgentInfo().then(res => {
51
   getAgentInfo().then(res => {
52
-    console.log(res)
52
+    // console.log(res)
53
     state.nickname = res.nickname
53
     state.nickname = res.nickname
54
     state.avatar = res.avatar
54
     state.avatar = res.avatar
55
     state.brokerage_price = res.brokerage_price
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
 import dayjs from "dayjs";
18
 import dayjs from "dayjs";
19
 import {getShareId} from "~/apis/product";
19
 import {getShareId} from "~/apis/product";
20
 import {debounce} from "lodash-es";
20
 import {debounce} from "lodash-es";
21
+import {getUrlParams} from "~/utils";
21
 
22
 
22
 const usePageStore = usePageStoreWidthOut()
23
 const usePageStore = usePageStoreWidthOut()
23
 
24
 
@@ -35,6 +36,7 @@ const state = reactive({
35
   id: '',
36
   id: '',
36
   // 推荐人绑定id
37
   // 推荐人绑定id
37
   shareId: '',
38
   shareId: '',
39
+  shareCover: '',
38
   // 是否收藏
40
   // 是否收藏
39
   isRelation: false,
41
   isRelation: false,
40
   indicatorDots: true,
42
   indicatorDots: true,
@@ -88,8 +90,14 @@ uni.showShareMenu({
88
 onLoad((option: any) => {
90
 onLoad((option: any) => {
89
   // const id = '4858'
91
   // const id = '4858'
90
   state.id = option.id
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
   // state.id = 4858
100
   // state.id = 4858
92
-  const fromShareId = option.shareID
93
   // console.log(fromShareId + '---share_id...')
101
   // console.log(fromShareId + '---share_id...')
94
   // if (state.shareId) {
102
   // if (state.shareId) {
95
   if (fromShareId) {
103
   if (fromShareId) {
@@ -108,7 +116,9 @@ onLoad((option: any) => {
108
   })
116
   })
109
 
117
 
110
   getShareId({ pid: state.id, type: 1}).then(res => {
118
   getShareId({ pid: state.id, type: 1}).then(res => {
119
+    console.log(res)
111
     state.shareId = res.share_id
120
     state.shareId = res.share_id
121
+    state.shareCover = res.url
112
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
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
       uni.hideLoading()
174
       uni.hideLoading()
165
       return {
175
       return {
166
         title: `${detail.value.store_name}`,
176
         title: `${detail.value.store_name}`,
177
+        imageUrl: `${res.url}`,
167
         path: `pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`
178
         path: `pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`
168
       }
179
       }
169
     }
180
     }
@@ -210,7 +221,7 @@ onShareTimeline(() => {
210
 function loadCartCount() {
221
 function loadCartCount() {
211
   state.cartCount = NaN
222
   state.cartCount = NaN
212
   getCartCount().then(res => {
223
   getCartCount().then(res => {
213
-    console.log(res)
224
+    // console.log(res)
214
     state.cartCount = res[0].count
225
     state.cartCount = res[0].count
215
   }).catch(error => {
226
   }).catch(error => {
216
     console.log(error)
227
     console.log(error)
@@ -258,7 +269,7 @@ function previewImage(index: number) {
258
 
269
 
259
 function handleShowMerchant(merId: string) {
270
 function handleShowMerchant(merId: string) {
260
 
271
 
261
-  console.log(merId)
272
+  // console.log(merId)
262
   uni.navigateTo({
273
   uni.navigateTo({
263
     url: `/pages/store/home/index?id=${merId}`
274
     url: `/pages/store/home/index?id=${merId}`
264
   })
275
   })
@@ -335,6 +346,13 @@ function handleCreateShopping() {
335
  * @param flag //1表示立即购买;2表示加入购物车,3表示立即兑换
346
  * @param flag //1表示立即购买;2表示加入购物车,3表示立即兑换
336
  */
347
  */
337
 function handleOrderConfirm(flag: '1' | '2'| '3') {
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
   debounce(() => {
356
   debounce(() => {
339
     if (!userStore.uid) {
357
     if (!userStore.uid) {
340
       return uni.showToast({
358
       return uni.showToast({
@@ -449,10 +467,10 @@ function handleShowCustomer() {
449
     },
467
     },
450
     corpId: 'wwaeb55681929a37ae',
468
     corpId: 'wwaeb55681929a37ae',
451
     success: (res => {
469
     success: (res => {
452
-      console.log(res)
470
+      // console.log(res)
453
     }),
471
     }),
454
     fail: (res => {
472
     fail: (res => {
455
-      console.log(res)
473
+      // console.log(res)
456
     })
474
     })
457
   })
475
   })
458
 }
476
 }
@@ -483,7 +501,7 @@ function handleShowCustomer() {
483
         <div class="flex flex-col">
501
         <div class="flex flex-col">
484
           <div class="flex gap-2 items-center text-white">
502
           <div class="flex gap-2 items-center text-white">
485
             <div class="text-[30px] font-bold">
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
             </div>
505
             </div>
488
             <image :src="miaoshaIcon" mode="widthFix" class="w-10"></image>
506
             <image :src="miaoshaIcon" mode="widthFix" class="w-10"></image>
489
           </div>
507
           </div>
@@ -522,7 +540,9 @@ function handleShowCustomer() {
522
       <div
540
       <div
523
           class="flex flex-col p-3 gap-3"
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
           <div v-if="is148Merchant && detail.price" class="flex justify-end items-end gap-2">
546
           <div v-if="is148Merchant && detail.price" class="flex justify-end items-end gap-2">
527
             <div class="!text-[24px]">{{ Number.parseFloat(detail.price).toFixed(2) }} </div>
547
             <div class="!text-[24px]">{{ Number.parseFloat(detail.price).toFixed(2) }} </div>
528
             <div class="text-sm">积分</div>
548
             <div class="text-sm">积分</div>
@@ -544,7 +564,7 @@ function handleShowCustomer() {
544
             class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
564
             class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
545
           <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
565
           <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
546
                  mode="widthFix" class="!w-8 h-4"></image>
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
             <div>
568
             <div>
549
               养老金 ¥{{ detail.yanglao }}
569
               养老金 ¥{{ detail.yanglao }}
550
             </div>
570
             </div>
@@ -732,7 +752,16 @@ function handleShowCustomer() {
732
           <div class="text-[11px]">购物车</div>
752
           <div class="text-[11px]">购物车</div>
733
         </div>
753
         </div>
734
       </div>
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
         <div
765
         <div
737
             @tap="handleAddCart"
766
             @tap="handleAddCart"
738
             v-if="!is148Merchant"
767
             v-if="!is148Merchant"

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

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

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

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

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

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

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

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

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

@@ -11,7 +11,7 @@ const state = reactive({
11
 
11
 
12
 onLoad(() => {
12
 onLoad(() => {
13
   getAboutConfig().then(res => {
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
   userStore.setRedirectPage(`/pages/vip/index`, 'page')
164
   userStore.setRedirectPage(`/pages/vip/index`, 'page')
165
 
165
 
166
   getHomeBanner().then(res => {
166
   getHomeBanner().then(res => {
167
-    console.log(res)
167
+    // console.log(res)
168
     state.banners = res
168
     state.banners = res
169
   })
169
   })
170
   loadList('reload')
170
   loadList('reload')

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

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

File diff suppressed because it is too large
+ 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
 export function encodePhone(phone: string) {
34
 export function encodePhone(phone: string) {
35
     // let tel = '13600136000';
35
     // let tel = '13600136000';
36
     return phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")
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
                 limit: 10
148
                 limit: 10
149
             }).then(res => {
149
             }).then(res => {
150
                 list.value = res
150
                 list.value = res
151
-                console.log(res)
151
+                // console.log(res)
152
 
152
 
153
             })
153
             })
154
             break;
154
             break;