dxz1228 лет назад: 2
Родитель
Сommit
fecae1a4f0
47 измененных файлов с 1490 добавлено и 753 удалено
  1. 18 1
      src/apis/auth.api.ts
  2. 5 0
      src/apis/model/login.model.ts
  3. 1 1
      src/apis/model/shopping.model.ts
  4. 1 1
      src/apis/order.api.ts
  5. 1 1
      src/apis/product.ts
  6. 27 27
      src/apis/user.ts
  7. 15 13
      src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue
  8. 17 0
      src/components/CXBSkuPopup/CXBSkuPopup.vue
  9. 1 1
      src/components/FButton/FButton.vue
  10. 3 0
      src/constants/index.ts
  11. 1 1
      src/pages.json
  12. 2 0
      src/pages/after-sales-order-list/index.vue
  13. 151 66
      src/pages/annuity/index.vue
  14. 1 1
      src/pages/article/detail.vue
  15. 28 27
      src/pages/dacang/list/components/dacang-header.vue
  16. 82 37
      src/pages/dacang/list/index.vue
  17. 65 77
      src/pages/home/components/navs.vue
  18. 1 1
      src/pages/home/index.vue
  19. 100 27
      src/pages/immediate-withdrawal/index.vue
  20. 16 14
      src/pages/miaosha/index.vue
  21. 17 37
      src/pages/my-integral/index.vue
  22. 22 1
      src/pages/my-invitation/index.vue
  23. 19 10
      src/pages/my-rules/index.vue
  24. 1 2
      src/pages/order/components/AllItemList.vue
  25. 56 24
      src/pages/order/components/OrderItem.vue
  26. 104 28
      src/pages/order/components/OrderObligationItem.vue
  27. 1 1
      src/pages/order/index.vue
  28. 1 1
      src/pages/order/logistics.vue
  29. 172 109
      src/pages/order/obligation-detail.vue
  30. 1 1
      src/pages/order_addcart/index-bak.vue
  31. 1 1
      src/pages/order_addcart/index-new.vue
  32. 46 19
      src/pages/order_addcart/index.vue
  33. 1 1
      src/pages/payment/index.vue
  34. 2 0
      src/pages/pension_account/index.vue
  35. 79 75
      src/pages/product/dingshenglianmeng.vue
  36. 2 2
      src/pages/real-name-authentication/index.vue
  37. 1 1
      src/pages/setting/index.vue
  38. 5 2
      src/pages/store/home/components/MerchantProductCard.vue
  39. 173 46
      src/pages/store/product/detail.vue
  40. 70 9
      src/pages/store/product/other.vue
  41. 1 1
      src/pages/user/address/index.vue
  42. 3 5
      src/pages/user/index.vue
  43. 10 6
      src/pages/user/login/index.vue
  44. 37 22
      src/pages/user/login/other-phone.vue
  45. 108 41
      src/pages/vip/index.vue
  46. 3 6
      src/stores/dacangStore.ts
  47. 18 6
      src/stores/userStore.ts

+ 18 - 1
src/apis/auth.api.ts

@@ -1,5 +1,5 @@
1
 import {defHttp} from "~/utils/http";
1
 import {defHttp} from "~/utils/http";
2
-import type {LoginModel} from "~/apis/model/login.model";
2
+import type {AccountModel, LoginModel} from "~/apis/model/login.model";
3
 
3
 
4
 enum API {
4
 enum API {
5
     // 短信验证码
5
     // 短信验证码
@@ -61,4 +61,21 @@ export function authSmsLogin(params: {
61
             ...params
61
             ...params
62
         }
62
         }
63
     })
63
     })
64
+}
65
+
66
+/**
67
+ * 绑定提现账户
68
+ * 
69
+ */
70
+
71
+export function Accountbind(params: {
72
+    openid: string,
73
+    wx_type: string,
74
+}): Promise<AccountModel> {
75
+    return defHttp.post({
76
+        url: API.USER_EXTRACT_BAND_OPENID,
77
+        data: {
78
+            ...params
79
+        }
80
+    })
64
 }
81
 }

+ 5 - 0
src/apis/model/login.model.ts

@@ -6,6 +6,11 @@ export interface LoginModel {
6
     // 用户信息
6
     // 用户信息
7
     user: LoginUserModel
7
     user: LoginUserModel
8
 }
8
 }
9
+export interface AccountModel {
10
+    
11
+    openid: string
12
+    wx_type: string
13
+}
9
 
14
 
10
 export interface LoginUserModel {
15
 export interface LoginUserModel {
11
     uid: string//用户id
16
     uid: string//用户id

+ 1 - 1
src/apis/model/shopping.model.ts

@@ -1,5 +1,5 @@
1
 export interface ShoppingResult {
1
 export interface ShoppingResult {
2
-    list: Array<ShopModel>
2
+    list?: Array<ShopModel>
3
 }
3
 }
4
 
4
 
5
 export interface ShopModel {
5
 export interface ShopModel {

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

@@ -280,7 +280,7 @@ export function getIntegralOrderCreate(params: CreateOrderRequest): Promise<Inte
280
  */
280
  */
281
 export function getOrderListFromStatus(params: {
281
 export function getOrderListFromStatus(params: {
282
     page: number
282
     page: number
283
-    //   订单状态(0:待发货;1:待收货;2:待评价;3:已完成;4已申请退款;-1:已退款)5未支付
283
+    //   订单状态(0:待发货;1:待收货;2:待评价;3:已完成;4已申请退款;-1:已退款)5未支付 6已取消
284
     status: number
284
     status: number
285
     limit: number
285
     limit: number
286
 }): Promise<OrderListResult> {
286
 }): Promise<OrderListResult> {

+ 1 - 1
src/apis/product.ts

@@ -53,7 +53,7 @@ enum API {
53
     // 拼多多商品列表
53
     // 拼多多商品列表
54
     PDD_LIST = '/api/pdd/list',
54
     PDD_LIST = '/api/pdd/list',
55
     // 拼多多商品搜索
55
     // 拼多多商品搜索
56
-    PDD_SEARCH = '/api/pdd/search',
56
+    PDD_SEARCH = '/api/pdd/list',
57
     // 拼多多商品详情
57
     // 拼多多商品详情
58
     PDD_DETAIL = '/api/pdd/detail',
58
     PDD_DETAIL = '/api/pdd/detail',
59
 
59
 

+ 27 - 27
src/apis/user.ts

@@ -1,35 +1,35 @@
1
-import {defHttp} from '~/utils/http'
2
-import type {UserUnionParams, UserUnionResult} from "~/apis/model/userUnionModel";
1
+import { defHttp } from '~/utils/http'
2
+import type { UserUnionParams, UserUnionResult } from "~/apis/model/userUnionModel";
3
 import Cache from '~/utils/cache'
3
 import Cache from '~/utils/cache'
4
-import {EXPIRES_TIME, LOGIN_STATUS, STATE_R_KEY, USER_INFO} from "~/constants";
5
-import {useUserStore} from "~/stores/userStore";
6
-import type {YanglaoStatisticsResult} from "~/apis/model/yanglaoStatisticsModel";
7
-import type {UpdateUserInfoRequestModel, UserInfoModel} from "~/apis/model/userInfoModel";
8
-import type {InvitePartnerModel, UserInviteParams} from "~/apis/model/invitePartnerModel";
9
-import type {UserShareProductListModel, UserShareProductParams} from "~/apis/model/userShareProductModel";
10
-import type {RevenueSharingModel, RevenueSharingParams} from "~/apis/model/revenueSharingModel";
11
-import type {AccumulateIncomeModel, UserInviteProfitParams} from "~/apis/model/accumulateIncomeModel";
12
-import type {SpreadInfoModel} from "~/apis/model/spreadInfoModel";
13
-import type {WithdrawalParams, WithdrawalServiceModel} from "~/apis/model/withdrawalService";
14
-import type {UserYanglaoJinModel} from "~/apis/model/userYanglaoJinModel";
15
-import type {WithdrawalModel} from "~/apis/model/withdrawalModel";
16
-import type {MyRelationMerchantParams, MyRelationMerchantResult} from "~/apis/model/myRelationMerchantModel";
17
-import type {MyRelationProductPrams, MyRelationProductResult} from "~/apis/model/myRelationProductModel";
18
-import type {IntegralParams, IntegralResult} from "~/apis/model/integralModel";
4
+import { EXPIRES_TIME, LOGIN_STATUS, OPEN_ID, STATE_R_KEY, USER_INFO } from "~/constants";
5
+import { useUserStore } from "~/stores/userStore";
6
+import type { YanglaoStatisticsResult } from "~/apis/model/yanglaoStatisticsModel";
7
+import type { UpdateUserInfoRequestModel, UserInfoModel } from "~/apis/model/userInfoModel";
8
+import type { InvitePartnerModel, UserInviteParams } from "~/apis/model/invitePartnerModel";
9
+import type { UserShareProductListModel, UserShareProductParams } from "~/apis/model/userShareProductModel";
10
+import type { RevenueSharingModel, RevenueSharingParams } from "~/apis/model/revenueSharingModel";
11
+import type { AccumulateIncomeModel, UserInviteProfitParams } from "~/apis/model/accumulateIncomeModel";
12
+import type { SpreadInfoModel } from "~/apis/model/spreadInfoModel";
13
+import type { WithdrawalParams, WithdrawalServiceModel } from "~/apis/model/withdrawalService";
14
+import type { UserYanglaoJinModel } from "~/apis/model/userYanglaoJinModel";
15
+import type { WithdrawalModel } from "~/apis/model/withdrawalModel";
16
+import type { MyRelationMerchantParams, MyRelationMerchantResult } from "~/apis/model/myRelationMerchantModel";
17
+import type { MyRelationProductPrams, MyRelationProductResult } from "~/apis/model/myRelationProductModel";
18
+import type { IntegralParams, IntegralResult } from "~/apis/model/integralModel";
19
 import type {
19
 import type {
20
     SharePosterClassifyResult,
20
     SharePosterClassifyResult,
21
     SharePosterImageResult,
21
     SharePosterImageResult,
22
     SharePostersImagesListParams,
22
     SharePostersImagesListParams,
23
 } from "~/apis/model/inviteFriendsModel";
23
 } from "~/apis/model/inviteFriendsModel";
24
-import type {ReplyParams, ReplyResult} from "~/apis/model/replyModel";
25
-import type {SignInInfoModel, SignInModel} from "~/apis/model/signIninfo.model";
26
-import type {ShoppingResult} from "~/apis/model/shopping.model";
27
-import type {AddressResult, OneAddressModel} from "~/apis/model/address.model";
28
-import type {UserVipInfoModel} from "~/apis/model/user-vip-info.model";
29
-import type {CertificationRequest} from "~/apis/model/certification.model";
30
-import type {RelationRequest} from "~/apis/model/relation.model";
31
-import type {YanglaoLogXsResult, YanglaoLogXxResult} from "~/apis/model/yanglao-log.model";
32
-import type {InvitePHPModel} from "~/apis/model/invite.model";
24
+import type { ReplyParams, ReplyResult } from "~/apis/model/replyModel";
25
+import type { SignInInfoModel, SignInModel } from "~/apis/model/signIninfo.model";
26
+import type { ShoppingResult } from "~/apis/model/shopping.model";
27
+import type { AddressResult, OneAddressModel } from "~/apis/model/address.model";
28
+import type { UserVipInfoModel } from "~/apis/model/user-vip-info.model";
29
+import type { CertificationRequest } from "~/apis/model/certification.model";
30
+import type { RelationRequest } from "~/apis/model/relation.model";
31
+import type { YanglaoLogXsResult, YanglaoLogXxResult } from "~/apis/model/yanglao-log.model";
32
+import type { InvitePHPModel } from "~/apis/model/invite.model";
33
 
33
 
34
 // 会员中心的提现
34
 // 会员中心的提现
35
 // export function entropy(data) {
35
 // export function entropy(data) {
@@ -187,7 +187,7 @@ export function xcxBanding(params: { mer_id: string, share_id: string }) {
187
  * 生成用户图片
187
  * 生成用户图片
188
  * @param params
188
  * @param params
189
  */
189
  */
190
-export function getGenerateImage(params: {uid: string, img_id: string}) {
190
+export function getGenerateImage(params: { uid: string, img_id: string }) {
191
     return defHttp.post({
191
     return defHttp.post({
192
         url: API.POSTER_SERVICE_IMAGES,
192
         url: API.POSTER_SERVICE_IMAGES,
193
         data: {
193
         data: {

+ 15 - 13
src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue

@@ -1,6 +1,6 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-import {authAppletPhone, bindPhone, getUserUnionId} from "~/apis/user";
3
-import {useUserStore} from "~/stores/userStore";
2
+import { authAppletPhone, bindPhone, getUserUnionId } from "~/apis/user";
3
+import { useUserStore } from "~/stores/userStore";
4
 import Cache from "~/utils/cache";
4
 import Cache from "~/utils/cache";
5
 const userStore = useUserStore()
5
 const userStore = useUserStore()
6
 const props = defineProps({
6
 const props = defineProps({
@@ -24,6 +24,10 @@ function getPhoneNumber(e) {
24
           code: result.code,
24
           code: result.code,
25
           source,
25
           source,
26
         }).then(unionRes => {
26
         }).then(unionRes => {
27
+          console.log(111111, unionRes)
28
+          // const shareId = Cache.get('SHARE_ID')
29
+          //存储openid
30
+          // userStore.setOpenid(unionRes.openid)
27
           // getShareId(shareI)
31
           // getShareId(shareI)
28
           const shareId = Cache.get('SHARE_ID')
32
           const shareId = Cache.get('SHARE_ID')
29
 
33
 
@@ -36,7 +40,7 @@ function getPhoneNumber(e) {
36
             params.share_id = shareId
40
             params.share_id = shareId
37
           }
41
           }
38
 
42
 
39
-          let redirectPageObj: {page: string, type: 'page' | 'tab'}
43
+          let redirectPageObj: { page: string, type: 'page' | 'tab' }
40
           if (Cache.get('SHARE_REDIRECT_PAGE')) {
44
           if (Cache.get('SHARE_REDIRECT_PAGE')) {
41
             redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
45
             redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
42
           }
46
           }
@@ -125,21 +129,18 @@ function getPhoneNumber(e) {
125
 }
129
 }
126
 </script>
130
 </script>
127
 <template>
131
 <template>
128
-  <div class="bg-white border border-solid border-1 border-gray-300 rounded-md py-3 gap-2 flex justify-center items-center">
129
-    <image
130
-        src="https://test.bjtdba.com/applet/static/home/4879edf0b6e2b0ad29fa7d4053d676b.png" mode="widthFix"
131
-        class="w-4 h-4"
132
-    ></image>
133
-    <button
134
-        open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
135
-    >
132
+  <div
133
+    class="bg-white border border-solid border-1 border-gray-300 rounded-md py-3 gap-2 flex justify-center items-center">
134
+    <image src="https://test.bjtdba.com/applet/static/home/4879edf0b6e2b0ad29fa7d4053d676b.png" mode="widthFix"
135
+      class="w-4 h-4"></image>
136
+    <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
136
       {{ text }}
137
       {{ text }}
137
     </button>
138
     </button>
138
   </div>
139
   </div>
139
 </template>
140
 </template>
140
 
141
 
141
 <style>
142
 <style>
142
-button{
143
+button {
143
   margin: 0;
144
   margin: 0;
144
   padding: 0;
145
   padding: 0;
145
   outline: none;
146
   outline: none;
@@ -147,7 +148,8 @@ button{
147
   background-color: transparent;
148
   background-color: transparent;
148
   line-height: inherit;
149
   line-height: inherit;
149
 }
150
 }
150
-button::after{
151
+
152
+button::after {
151
   border: none;
153
   border: none;
152
 }
154
 }
153
 </style>
155
 </style>

+ 17 - 0
src/components/CXBSkuPopup/CXBSkuPopup.vue

@@ -87,6 +87,8 @@ onMounted(() => {
87
 })
87
 })
88
 
88
 
89
 function handleSelectedSku(skuItem: any) {
89
 function handleSelectedSku(skuItem: any) {
90
+  console.log(skuItem);
91
+
90
   currentSku.value = skuItem
92
   currentSku.value = skuItem
91
   console.log('我是数据', currentSku.value);
93
   console.log('我是数据', currentSku.value);
92
 
94
 
@@ -107,6 +109,9 @@ function handleBuyNow() {
107
 function handleJiaCart() {
109
 function handleJiaCart() {
108
   emit('subAdd')
110
   emit('subAdd')
109
 }
111
 }
112
+function handleSubQg() {
113
+  emit('subQg')
114
+}
110
 
115
 
111
 function handleCountChange(value) {
116
 function handleCountChange(value) {
112
   emit('count-change', value)
117
   emit('count-change', value)
@@ -187,6 +192,18 @@ function handleCountChange(value) {
187
         </FButton>
192
         </FButton>
188
 
193
 
189
       </div>
194
       </div>
195
+      <div class="px-3 pb-10" v-if="isTo == 4">
196
+        <FButton @click="handleSubQg" size="small" :exClass="['!bg-primary', 'rounded-full', 'text-white']" block>
197
+          立即抢购
198
+        </FButton>
199
+
200
+      </div>
201
+      <div class="px-3 pb-10" v-if="isTo == 5">
202
+        <FButton @click="handleAddCart" size="small" :exClass="['!bg-primary', 'rounded-full', 'text-white']" block>
203
+          立即抢购
204
+        </FButton>
205
+
206
+      </div>
190
       <div class="px-3 pb-10" v-if="isTo == 3">
207
       <div class="px-3 pb-10" v-if="isTo == 3">
191
         <FButton @click="handleAddCart" size="small" :exClass="['!bg-primary', 'rounded-full', 'text-white']" block>
208
         <FButton @click="handleAddCart" size="small" :exClass="['!bg-primary', 'rounded-full', 'text-white']" block>
192
           立即兑换
209
           立即兑换

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

@@ -6,7 +6,7 @@ const props = defineProps(buttonProps)
6
 const emit = defineEmits(buttonEmits)
6
 const emit = defineEmits(buttonEmits)
7
 
7
 
8
 const { disabled, clickHandler } = useButton(props, emit)
8
 const { disabled, clickHandler } = useButton(props, emit)
9
-console.log(props);
9
+
10
 
10
 
11
 </script>
11
 </script>
12
 
12
 

+ 3 - 0
src/constants/index.ts

@@ -9,6 +9,9 @@ export const  LOGIN_STATUS = 'LOGIN_STATUS_TOKEN'
9
     // uid
9
     // uid
10
 export const UID = 'UID'
10
 export const UID = 'UID'
11
 export const USER_INFO = 'USER_INFO'
11
 export const USER_INFO = 'USER_INFO'
12
+export const  OPEN_ID= 'OPEN_ID'
13
+export const SHARE_REDIRECT_PAGE = 'SHARE_REDIRECT_PAGE'
14
+
12
     //token 过期时间
15
     //token 过期时间
13
 export const  EXPIRES_TIME = 'EXPIRES_TIME'
16
 export const  EXPIRES_TIME = 'EXPIRES_TIME'
14
     //�Ƿ���Ȩ
17
     //�Ƿ���Ȩ

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
src/pages.json


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

@@ -116,6 +116,8 @@ function loadAllOrderList() {
116
   })
116
   })
117
 }
117
 }
118
 watch(() => state.tabvalue, (val) => {
118
 watch(() => state.tabvalue, (val) => {
119
+  console.log('我是val',val);
120
+  
119
   switch (val) {
121
   switch (val) {
120
     case '0': {
122
     case '0': {
121
       loadAllOrderList()
123
       loadAllOrderList()

+ 151 - 66
src/pages/annuity/index.vue

@@ -1,9 +1,18 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {getAmountFromGzc, getYanglaojinStatistics} from "~/apis/user";
3
-import {CDN_URL} from "~/config/app";
2
+import { getAmountFromGzc, getYanglaojinStatistics, getUserYangLaoJin } from "~/apis/user";
3
+import { CDN_URL, CDM_URL } from "~/config/app";
4
+import dayjs from "dayjs";
5
+
4
 const get_to_know_buttons_220713Image = CDN_URL + '/static/assets/get_to_know_buttons_220713.png'
6
 const get_to_know_buttons_220713Image = CDN_URL + '/static/assets/get_to_know_buttons_220713.png'
5
 const ylj_fh_220914Image = CDN_URL + '/static/assets/ylj_fh_220914.png'
7
 const ylj_fh_220914Image = CDN_URL + '/static/assets/ylj_fh_220914.png'
6
 
8
 
9
+
10
+const annuity_yuan_220713Image = CDN_URL + '/static/assets/annuity_yuan_220713.png'
11
+const agreement_checkedImage = CDN_URL + '/static/assets/agreement_checked.png'
12
+const yrzImg = CDM_URL + '/image/2023-12-04/20231204124659874.png'
13
+const smrzImg = CDM_URL + '/image/2023-12-04/20231204124635512.png'
14
+
15
+
7
 const userStore = useUserStore()
16
 const userStore = useUserStore()
8
 const progress = [{
17
 const progress = [{
9
   type: 'item',
18
   type: 'item',
@@ -18,24 +27,24 @@ const progress = [{
18
   title: '绑定微信支付宝',
27
   title: '绑定微信支付宝',
19
   icon: CDN_URL + '/static/assets/ylj_bd_220914.png'
28
   icon: CDN_URL + '/static/assets/ylj_bd_220914.png'
20
 },
29
 },
21
-  {
22
-    type: 'separator',
23
-    icon: CDN_URL + '/static/assets/ylj_fh_220914.png'
24
-  }, {
25
-    type: 'item',
26
-
27
-    title: '平台结算',
28
-    icon: CDN_URL + '/static/assets/ylj_js_220914.png'
29
-  },
30
-  {
31
-    type: 'separator',
32
-    icon: CDN_URL + '/static/assets/ylj_fh_220914.png'
33
-  }, {
34
-    type: 'item',
35
-
36
-    title: '计入账号开通',
37
-    icon: CDN_URL + '/static/assets/ylj_kt_220914.png'
38
-  }]
30
+{
31
+  type: 'separator',
32
+  icon: CDN_URL + '/static/assets/ylj_fh_220914.png'
33
+}, {
34
+  type: 'item',
35
+
36
+  title: '平台结算',
37
+  icon: CDN_URL + '/static/assets/ylj_js_220914.png'
38
+},
39
+{
40
+  type: 'separator',
41
+  icon: CDN_URL + '/static/assets/ylj_fh_220914.png'
42
+}, {
43
+  type: 'item',
44
+
45
+  title: '计入账号开通',
46
+  icon: CDN_URL + '/static/assets/ylj_kt_220914.png'
47
+}]
39
 
48
 
40
 const state = reactive({
49
 const state = reactive({
41
   all_yanglao: 0,
50
   all_yanglao: 0,
@@ -44,11 +53,13 @@ const state = reactive({
44
     amount: 0
53
     amount: 0
45
   }
54
   }
46
 })
55
 })
56
+const userYangLaoJin = ref({})
47
 
57
 
48
 const yanglaoStatistics = ref()
58
 const yanglaoStatistics = ref()
49
 onLoad(() => {
59
 onLoad(() => {
50
   getYanglaojinStatistics().then(res => {
60
   getYanglaojinStatistics().then(res => {
51
     // state.all_yanglao = res.all_yanglao
61
     // state.all_yanglao = res.all_yanglao
62
+
52
     yanglaoStatistics.value = res
63
     yanglaoStatistics.value = res
53
   }).catch(error => {
64
   }).catch(error => {
54
     if (error === '未登录') {
65
     if (error === '未登录') {
@@ -61,7 +72,45 @@ onLoad(() => {
61
   getAmountFromGzc().then(res => {
72
   getAmountFromGzc().then(res => {
62
     state.amountFromGzc = res
73
     state.amountFromGzc = res
63
   })
74
   })
75
+  //养老金账户
76
+  console.log('页面显示了');
77
+  getUserYangLaoJin().then(res => {
78
+    console.log('养老保险', res);
79
+
80
+    if (res.birthday60 === "未实名认证") {
81
+      console.log('触发条件');
82
+
83
+      setTimeout(() => {
84
+        uni.showModal({
85
+          title: '温馨提示',
86
+          content: '实名认证后才可查看获得的养老金哦~',
87
+          cancelText: "取消", // 取消按钮的文字
88
+          confirmText: "去认证", // 确认按钮的文字
89
+          showCancel: true, // 是否显示取消按钮,默认为 true
90
+          confirmColor: '#f55850',
91
+          success: (res) => {
92
+            if (res.confirm) {
93
+              console.log('comfirm') //点击确定之后执行的代码
94
+              setTimeout(() => {
95
+                uni.navigateTo({
96
+                  url: '/pages/real-name-authentication/index'
97
+                })
98
+              }, 300);
99
+            } else {
100
+              console.log('cancel') //点击取消之后执行的代码
101
+            }
102
+          }
103
+        })
104
+      }, 300);
105
+    }
106
+    userYangLaoJin.value = res;
107
+  })
64
 })
108
 })
109
+
110
+onShow(() => {
111
+
112
+})
113
+
65
 function handleThirdBind() {
114
 function handleThirdBind() {
66
   uni.navigateTo({
115
   uni.navigateTo({
67
     url: '/pages/third_party_binding/index'
116
     url: '/pages/third_party_binding/index'
@@ -106,6 +155,22 @@ function handleShowAgreement(type) {
106
     url: '/pages/webview/agreement?type=' + type
155
     url: '/pages/webview/agreement?type=' + type
107
   })
156
   })
108
 }
157
 }
158
+
159
+//展示图片
160
+const ImgType = computed(() => {
161
+  if (userStore.userInfo?.is_ertification) {
162
+    const img = userStore.userInfo.is_ertification
163
+    if (img == 1) {
164
+      return yrzImg
165
+    } else {
166
+      return smrzImg
167
+    }
168
+
169
+  }
170
+
171
+})
172
+
173
+
109
 </script>
174
 </script>
110
 
175
 
111
 <template>
176
 <template>
@@ -118,48 +183,37 @@ function handleShowAgreement(type) {
118
       </div>
183
       </div>
119
       <div class="flex flex-col bg-white rounded  p-4">
184
       <div class="flex flex-col bg-white rounded  p-4">
120
         <div class="flex items-center w-full gap-2">
185
         <div class="flex items-center w-full gap-2">
121
-          <image v-if="userStore.userInfo && userStore.userInfo.avatar"
122
-                 :src="userStore.userInfo.avatar"
123
-                 mode="widthFix"
124
-                 class="w-9 h-9 rounded-full"
125
-          />
126
-          <image
127
-              v-else
128
-              src="https://app.bjtdba.com/uploads/logo.jpg"
129
-              mode="widthFix"
130
-              class="w-9 h-9 rounded-full"
131
-          />
186
+          <image v-if="userStore.userInfo && userStore.userInfo.avatar" :src="userStore.userInfo.avatar" mode="widthFix"
187
+            class="w-9 h-9 rounded-full" />
188
+          <image v-else src="https://app.bjtdba.com/uploads/logo.jpg" mode="widthFix" class="w-9 h-9 rounded-full" />
132
           <div>
189
           <div>
133
             {{ userStore.userInfo.nickname }}
190
             {{ userStore.userInfo.nickname }}
134
           </div>
191
           </div>
135
-          <div
136
-              @tap="handleRealName"
137
-              class="text-xs underline text-[#fe0032]"
138
-          >
139
-            {{userStore.userInfo.is_ertification == 1 ? '已认证' : '实名认证'}}
140
-
192
+          <div @tap="handleRealName" class="box_img">
193
+            <!-- {{ userStore.userInfo.is_ertification == 1 ? '已认证' : '实名认证' }} -->
194
+            <image lazy-load :src="ImgType" class="w-full h-full"></image>
141
           </div>
195
           </div>
142
         </div>
196
         </div>
143
         <div class="flex-1 flex flex-col justify-between items-center py-4 gap-4">
197
         <div class="flex-1 flex flex-col justify-between items-center py-4 gap-4">
144
           <div class="flex flex-col justify-center items-center">
198
           <div class="flex flex-col justify-center items-center">
145
             <div class="text-xs">总养老金</div>
199
             <div class="text-xs">总养老金</div>
146
-            <div class="text-[#F94032] font-bold text-[28px]" v-if="yanglaoStatistics">¥{{yanglaoStatistics.all_yanglao}}</div>
200
+            <div class="text-[#F94032] font-bold text-[28px]" v-if="yanglaoStatistics">¥{{ yanglaoStatistics.all_yanglao
201
+            }}
202
+            </div>
147
           </div>
203
           </div>
148
           <div class=" flex justify-around w-full">
204
           <div class=" flex justify-around w-full">
149
             <div class="flex flex-col justify-center items-center " v-if="yanglaoStatistics">
205
             <div class="flex flex-col justify-center items-center " v-if="yanglaoStatistics">
150
               <div class="font-bold">
206
               <div class="font-bold">
151
-                ¥ {{(yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a).toFixed(2)}}
207
+                ¥ {{ (yanglaoStatistics.all_yanglao - yanglaoStatistics.all_yanglao_a).toFixed(2) }}
152
               </div>
208
               </div>
153
               <div class="text-xs text-gray-400">预估养老金</div>
209
               <div class="text-xs text-gray-400">预估养老金</div>
154
             </div>
210
             </div>
155
 
211
 
156
             <div class="flex flex-col justify-center items-center pl-3" v-if="yanglaoStatistics">
212
             <div class="flex flex-col justify-center items-center pl-3" v-if="yanglaoStatistics">
157
-              <div>¥ {{yanglaoStatistics.all_yanglao_a}}</div>
213
+              <div>¥ {{ (yanglaoStatistics.all_yanglao_a).toFixed(2) }}</div>
158
               <div class="text-xs text-gray-400">已结算</div>
214
               <div class="text-xs text-gray-400">已结算</div>
159
             </div>
215
             </div>
160
-            <div
161
-                @tap="handleToCitic"
162
-                class="flex flex-col justify-center items-center pl-3">
216
+            <div @tap="handleToCitic" class="flex flex-col justify-center items-center pl-3">
163
               <div>¥{{ state.amountFromGzc.amount }}</div>
217
               <div>¥{{ state.amountFromGzc.amount }}</div>
164
               <div class="text-xs text-gray-400">中信公证处</div>
218
               <div class="text-xs text-gray-400">中信公证处</div>
165
             </div>
219
             </div>
@@ -173,47 +227,73 @@ function handleShowAgreement(type) {
173
         <div>养老金账号开通流程</div>
227
         <div>养老金账号开通流程</div>
174
         <div class="flex flex-row justify-center items-center w-full h-full">
228
         <div class="flex flex-row justify-center items-center w-full h-full">
175
           <div v-for="(item, index) in progress" :key="index" class="flex flex-1 justify-center">
229
           <div v-for="(item, index) in progress" :key="index" class="flex flex-1 justify-center">
176
-            <div
177
-                v-if="item.type === 'item'"
178
-                class="flex flex-col justify-between items-center w-12 text-center ">
230
+            <div v-if="item.type === 'item'" class="flex flex-col justify-between items-center w-12 text-center ">
179
               <image :src="item.icon" mode="widthFix" class="w-10 h-10"></image>
231
               <image :src="item.icon" mode="widthFix" class="w-10 h-10"></image>
180
               <div class="text-xs h-8 flex flex-col justify-center items-center">{{ item.title }}</div>
232
               <div class="text-xs h-8 flex flex-col justify-center items-center">{{ item.title }}</div>
181
             </div>
233
             </div>
182
-            <div
183
-                v-if="item.type === 'separator'"
184
-                class="flex flex-col justify-start items-start h-10"
185
-            >
186
-              <image
187
-                  :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
234
+            <div v-if="item.type === 'separator'" class="flex flex-col justify-start items-start h-10">
235
+              <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
188
             </div>
236
             </div>
189
 
237
 
190
           </div>
238
           </div>
191
 
239
 
192
         </div>
240
         </div>
193
       </div>
241
       </div>
242
+      <!-- 养老金账户 -->
243
+      <div class="flex flex-col bg-white rounded p-4 text-sm gap-3">
244
+        <div>养老金账号余额提取</div>
245
+
246
+        <div class="relative">
247
+          <div class="absolute top-0 left-0 mt-2 w-full  ">
248
+            <div class="px-9">
249
+              <div class="py-px bg-red"></div>
250
+            </div>
251
+          </div>
252
+          <div class="relative flex items-center justify-between">
253
+            <div class="text-center">
254
+              <div class="inline-block  rounded-full bg-white">
255
+                <image :src="annuity_yuan_220713Image" mode="widthFix" class="w-4 h-4"></image>
256
+              </div>
257
+              <div class="block mt-3">
258
+                <div>加入时间</div>
259
+                <div class="text-gray">
260
+                  {{ userYangLaoJin.create_time && dayjs(userYangLaoJin.create_time).format('YYYY-MM-DD') }}
261
+                </div>
262
+              </div>
263
+            </div>
264
+            <div class="text-center">
265
+              <div class="inline-block rounded-full bg-white">
266
+                <image :src="agreement_checkedImage" mode="widthFix" class="w-4 h-4"></image>
267
+              </div>
268
+              <div class="block mt-3">
269
+                <div>法定提取时间</div>
270
+                <div class="text-gray">
271
+                  {{ userYangLaoJin.birthday60 }}
272
+                </div>
273
+              </div>
274
+            </div>
275
+
276
+          </div>
277
+        </div>
278
+      </div>
194
 
279
 
195
       <div class="flex flex-col bg-white rounded text-sm px-3">
280
       <div class="flex flex-col bg-white rounded text-sm px-3">
196
-        <div
197
-            @tap="handleThirdBind"
198
-            class="flex justify-between items-center border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b py-3">
281
+        <!-- <div @tap="handleThirdBind"
282
+          class="flex justify-between items-center border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b py-3">
199
           <div>支付平台绑定</div>
283
           <div>支付平台绑定</div>
200
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
284
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
201
-        </div>
202
-        <div
203
-            @tap="handlePensionAccount"
204
-            class="flex justify-between items-center border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b py-3">
285
+        </div> -->
286
+        <!-- <div @tap="handlePensionAccount"
287
+          class="flex justify-between items-center border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b py-3">
205
           <div>养老金账户</div>
288
           <div>养老金账户</div>
206
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
289
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
207
-        </div>
208
-        <div
209
-            @tap="handlePensionRecord"
210
-            class="flex justify-between items-center border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b py-3">
290
+        </div> -->
291
+        <div @tap="handlePensionRecord"
292
+          class="flex justify-between items-center border border-solid border-1 border-gray-100 border-x-0 border-t-0 !border-b py-3">
211
           <div>养老金记录</div>
293
           <div>养老金记录</div>
212
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
294
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
213
         </div>
295
         </div>
214
-        <div
215
-            @tap="handleToCitic"
216
-            class="flex justify-between items-center py-3">
296
+        <div @tap="handleToCitic" class="flex justify-between items-center py-3">
217
           <div>中信公证处查看</div>
297
           <div>中信公证处查看</div>
218
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
298
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
219
         </div>
299
         </div>
@@ -234,6 +314,11 @@ function handleShowAgreement(type) {
234
 page {
314
 page {
235
   background: #f8f8f8;
315
   background: #f8f8f8;
236
 }
316
 }
317
+
318
+.box_img {
319
+  width: 144rpx;
320
+  height: 50rpx;
321
+}
237
 </style>
322
 </style>
238
 <route lang="yaml">
323
 <route lang="yaml">
239
 style:
324
 style:

+ 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
       })

+ 28 - 27
src/pages/dacang/list/components/dacang-header.vue

@@ -1,9 +1,9 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-import {computed, PropType} from "vue";
2
+import { computed, PropType } from "vue";
3
 import FSearch from "~/components/FSearch/FSearch.vue";
3
 import FSearch from "~/components/FSearch/FSearch.vue";
4
-import type {UserInfoModel} from "~/apis/model/userInfoModel";
5
-import {useUserStore} from "~/stores/userStore";
6
-import {useDacangStore} from "~/stores/dacangStore";
4
+import type { UserInfoModel } from "~/apis/model/userInfoModel";
5
+import { useUserStore } from "~/stores/userStore";
6
+import { useDacangStore } from "~/stores/dacangStore";
7
 // import {useUserStore} from "~/stores/userStore";
7
 // import {useUserStore} from "~/stores/userStore";
8
 const userStore = useUserStore()
8
 const userStore = useUserStore()
9
 const dacangStore = useDacangStore()
9
 const dacangStore = useDacangStore()
@@ -74,7 +74,7 @@ function handleClick() {
74
 //
74
 //
75
 // }
75
 // }
76
 const emit = defineEmits<{
76
 const emit = defineEmits<{
77
-  (e: 'click:item', value:string): void
77
+  (e: 'click:item', value: string): void
78
 }>()
78
 }>()
79
 function handleTabItemClick(currentTab) {
79
 function handleTabItemClick(currentTab) {
80
   emit('click:item', tabValue.value)
80
   emit('click:item', tabValue.value)
@@ -86,19 +86,15 @@ function handleShowSearchPage() {
86
 }
86
 }
87
 </script>
87
 </script>
88
 <template>
88
 <template>
89
-  <div class="dacang-header fixed w-screen text-white z-10 w-full h-20"
90
-       :style="navBarStyle"
91
-       :class="exClass"
92
-  >
89
+  <div class="dacang-header fixed w-screen text-white z-10 w-full h-20" :style="navBarStyle" :class="exClass">
93
     <div class="pl-2 pt-2">
90
     <div class="pl-2 pt-2">
94
-      <div class="w-60% bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-red">
91
+      <div
92
+        class="w-60% bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-red">
95
 
93
 
96
-        <image src="https://cdn.bjtdba.com/vod/image/2023-02-15/20230215112840149.png"
97
-               mode="widthFix"
98
-               class="w-4 h-4  pl-2 py-1"
99
-        ></image>
94
+        <image src="https://cdn.bjtdba.com/vod/image/2023-02-15/20230215112840149.png" mode="widthFix"
95
+          class="w-4 h-4  pl-2 py-1"></image>
100
         <div class="flex flex-1 items-center w-100%" @tap.stop="handleShowSearchPage">
96
         <div class="flex flex-1 items-center w-100%" @tap.stop="handleShowSearchPage">
101
-          <div class="flex-1 pl-2 text-gray">搜索商品关键词</div>
97
+          <div class="flex-1 pl-2  font_size ">搜索商品关键词</div>
102
           <div class="bg-[#D71608] text-white text-xs w-11 rounded-full text-center py-1 my-0.5 mr-0.5 ">
98
           <div class="bg-[#D71608] text-white text-xs w-11 rounded-full text-center py-1 my-0.5 mr-0.5 ">
103
             搜索
99
             搜索
104
           </div>
100
           </div>
@@ -109,19 +105,17 @@ function handleShowSearchPage() {
109
 
105
 
110
     </div>
106
     </div>
111
 
107
 
112
-<!--    <div class="p-3">-->
113
-      <div class=" ">
114
-       <nut-tabs v-model="tabValue" title-scroll title-gutter="10" name="catePanel" @change="handleTabItemClick">
115
-<!--         <nut-tab-panel :title="全部"></nut-tab-panel>-->
116
-          <nut-tab-pane v-for="item in tabs" :title="item.cate_name"
117
-                        :pane-key="item.store_category_id"
118
-                        :key="item.store_category_id"
119
-          >
120
-          </nut-tab-pane>
121
-       </nut-tabs>
108
+    <!--    <div class="p-3">-->
109
+    <div class=" ">
110
+      <nut-tabs v-model="tabValue" title-scroll title-gutter="10" name="catePanel" @change="handleTabItemClick">
111
+        <!--         <nut-tab-panel :title="全部"></nut-tab-panel>-->
112
+        <nut-tab-pane v-for="item in tabs" :title="item.cate_name" :pane-key="item.store_category_id"
113
+          :key="item.store_category_id">
114
+        </nut-tab-pane>
115
+      </nut-tabs>
122
 
116
 
123
-      </div>
124
-<!--    </div>-->
117
+    </div>
118
+    <!--    </div>-->
125
 
119
 
126
   </div>
120
   </div>
127
 </template>
121
 </template>
@@ -132,4 +126,11 @@ function handleShowSearchPage() {
132
   --nut-tabs-titles-item-color: #fff;
126
   --nut-tabs-titles-item-color: #fff;
133
   --nut-tabs-titles-item-active-color: #fff;
127
   --nut-tabs-titles-item-active-color: #fff;
134
 }
128
 }
129
+
130
+
131
+.font_size {
132
+  font-size: 24rpx;
133
+  line-height: 42rpx;
134
+  color: #c0c5cc;
135
+}
135
 </style>
136
 </style>

+ 82 - 37
src/pages/dacang/list/index.vue

@@ -19,12 +19,13 @@ const usePageStore = usePageStoreWidthOut()
19
 
19
 
20
 
20
 
21
 const state = reactive({
21
 const state = reactive({
22
-  tabs: [{ store_category_id: '-1', cate_name: '全部' }],
22
+  tabs: [],
23
+  lists: {},
23
   productList: <Array<DcProductModel>>[],
24
   productList: <Array<DcProductModel>>[],
24
-  currentClassify: '',
25
+  currentClassify: '-1',
25
   keyword: '',
26
   keyword: '',
26
   status: 'noMore',
27
   status: 'noMore',
27
-  banner:'',
28
+  banner: '',
28
   currentPage: 1,
29
   currentPage: 1,
29
   pageSize: 10,
30
   pageSize: 10,
30
   totalPage: 1
31
   totalPage: 1
@@ -33,6 +34,7 @@ const state = reactive({
33
 // 距离顶部距离
34
 // 距离顶部距离
34
 let Scroll_X = ref(0)
35
 let Scroll_X = ref(0)
35
 
36
 
37
+let scrollPositions = reactive({})
36
 const dacangStore = useDacangStore()
38
 const dacangStore = useDacangStore()
37
 const userStore = useUserStore()
39
 const userStore = useUserStore()
38
 
40
 
@@ -40,7 +42,6 @@ const userStore = useUserStore()
40
 onLoad(async (option) => {
42
 onLoad(async (option) => {
41
   state.tabs = [{ store_category_id: '-1', cate_name: '全部' }]
43
   state.tabs = [{ store_category_id: '-1', cate_name: '全部' }]
42
   const classifyRes = await getDcProductClassify()
44
   const classifyRes = await getDcProductClassify()
43
-
44
   state.tabs.push(...classifyRes)
45
   state.tabs.push(...classifyRes)
45
   usePageStore.setPageConfig({
46
   usePageStore.setPageConfig({
46
     currentPage: {
47
     currentPage: {
@@ -60,11 +61,11 @@ onLoad(async (option) => {
60
     console.log(message)
61
     console.log(message)
61
   })
62
   })
62
   userStore.setRedirectPage(`/pages/dacang/list/index`, 'tab')
63
   userStore.setRedirectPage(`/pages/dacang/list/index`, 'tab')
63
-  getBannerImg().then(res=>{
64
-    console.log('banner',res);
65
-    state.banner=res[0].pic
64
+  getBannerImg().then(res => {
65
+    console.log('banner', res);
66
+    state.banner = res[0].pic
66
     console.log(state.banner);
67
     console.log(state.banner);
67
-    
68
+
68
   })
69
   })
69
 
70
 
70
 })
71
 })
@@ -89,7 +90,8 @@ onShareTimeline(() => {
89
   }
90
   }
90
 })
91
 })
91
 
92
 
92
-onShow(async (options) => {
93
+onShow((options) => {
94
+
93
   usePageStore.setPageConfig({
95
   usePageStore.setPageConfig({
94
     currentPage: {
96
     currentPage: {
95
       type: 'tab',
97
       type: 'tab',
@@ -99,7 +101,7 @@ onShow(async (options) => {
99
   loadList('reload')
101
   loadList('reload')
100
 })
102
 })
101
 
103
 
102
-function loadList(action: 'page' | 'reload', callback?: (items) => void) {
104
+const loadList = async (action: 'page' | 'reload', callback?: (items) => void) => {
103
   console.log(action);
105
   console.log(action);
104
   let params: any = {
106
   let params: any = {
105
     page: state.currentPage,
107
     page: state.currentPage,
@@ -107,41 +109,79 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
107
     keyword: state.keyword
109
     keyword: state.keyword
108
   }
110
   }
109
   console.log(params);
111
   console.log(params);
110
-  if (dacangStore.currentClassify !== '-1') {
111
-    params.classify = dacangStore.currentClassify
112
+  if (state.currentClassify !== '-1') {
113
+    params.classify = state.currentClassify
114
+  }
115
+  let res = await getDcProductList({
116
+    ...params
117
+  })
118
+  console.log('res>>>>', res);
119
+  if (action === 'page') {
120
+    state.lists[state.currentClassify] = state.lists[state.currentClassify].concat(res)
121
+  }
122
+  if (action === 'reload') {
123
+    state.lists[state.currentClassify] = res
112
   }
124
   }
113
 
125
 
126
+  if (callback) {
127
+    callback(res)
128
+  }
114
 
129
 
115
 
130
 
116
-  getDcProductList({
117
-    ...params
118
-  }).then(res => {
119
-    if (action === 'page') {
120
-      state.productList = state.productList.concat(res)
121
-    }
122
-    if (action === 'reload') {
123
-      state.productList = res
124
-    }
125
-
126
-    if (callback) {
127
-      callback(res)
128
-    }
129
-  })
130
 }
131
 }
131
 
132
 
132
-function handleTabItemClick(classifyId) {
133
+function handleTabItemClick(classifyId: string) {
133
   state.currentClassify = classifyId
134
   state.currentClassify = classifyId
134
-  dacangStore.setClassify(classifyId)
135
+  // uni.pageScrollTo({
136
+  //   scrollTop: 0
137
+  // });
138
+  state.currentPage = 1
139
+  state.pageSize = 10
140
+
135
   setTimeout(() => {
141
   setTimeout(() => {
136
     loadList('reload')
142
     loadList('reload')
137
   }, 300)
143
   }, 300)
138
-  // }
144
+
139
 }
145
 }
140
 
146
 
147
+// function handleTabItemClick(classifyId) {
148
+//   // 保存当前分类页的滚动位置
149
+//   scrollPositions[state.currentClassify] = Scroll_X.value;
150
+
151
+//   console.log(111, scrollPositions[classifyId]);
152
+
153
+//   // 切换当前分类页
154
+//   state.currentClassify = classifyId;
155
+
156
+//   // 检查当前分类页是否有保存的滚动位置
157
+//   if (scrollPositions[classifyId] !== undefined) {
158
+//     // 如果有保存的滚动位置,恢复滚动位置
159
+//     uni.pageScrollTo({
160
+//       scrollTop: scrollPositions[classifyId],
161
+//     });
162
+//   } else {
163
+//     // 如果没有保存的滚动位置,重新加载数据
164
+//     state.currentPage = 1;
165
+//     state.pageSize = 10;
166
+//     loadList('reload');
167
+//   }
168
+// }
169
+
170
+function toHuiyuan() {
171
+  
172
+  uni.navigateTo({
173
+    url: `/pages/guest_member_new/index?is_merchant=${userStore.userInfo.is_merchant}`
174
+  })
175
+}
176
+
177
+
141
 const headerClass = ref('')
178
 const headerClass = ref('')
142
 
179
 
143
 onPageScroll((page) => {
180
 onPageScroll((page) => {
181
+
182
+
144
   Scroll_X.value = Number(page.scrollTop.toFixed())
183
   Scroll_X.value = Number(page.scrollTop.toFixed())
184
+
145
   // page.scrollTop
185
   // page.scrollTop
146
   if (page.scrollTop >= 76) {
186
   if (page.scrollTop >= 76) {
147
     headerClass.value = '!bg-primary !text-white'
187
     headerClass.value = '!bg-primary !text-white'
@@ -165,11 +205,13 @@ onReachBottom(() => {
165
   })
205
   })
166
 })
206
 })
167
 onPullDownRefresh(() => {
207
 onPullDownRefresh(() => {
168
-  uni.showLoading()
169
-  loadList('reload', (items) => {
170
-    uni.hideLoading()
171
-    uni.stopPullDownRefresh()
172
-  })
208
+  // uni.showLoading()
209
+  // state.currentPage = 1
210
+  // state.pageSize = 10
211
+  // loadList('reload', (items) => {
212
+  //   uni.hideLoading()
213
+  //   uni.stopPullDownRefresh()
214
+  // })
173
 })
215
 })
174
 
216
 
175
 
217
 
@@ -180,9 +222,12 @@ onPullDownRefresh(() => {
180
 
222
 
181
     <div class="flex flex-col gap-2 ">
223
     <div class="flex flex-col gap-2 ">
182
       <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
224
       <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
183
-      <image lazy-load :src="state.banner" mode="widthFix" class="w-full h-50"></image>
184
-      <ProductList :list="state.productList" />
185
-      <div class="pb-safe flex justify-center items-center text-[12px] text-gray-500" v-if="state.productList.length > 0">
225
+      <image lazy-load :src="state.banner" mode="widthFix" @click="toHuiyuan" class="w-full h-50"></image>
226
+      <div>
227
+        <ProductList :list="state.lists[state.currentClassify]" />
228
+      </div>
229
+      <div class="pb-safe flex justify-center items-center text-[12px] text-gray-500"
230
+        v-if="state.lists[state.currentClassify]?.length > 0">
186
         <div v-if="state.status === 'loading'">
231
         <div v-if="state.status === 'loading'">
187
           加载中...
232
           加载中...
188
         </div>
233
         </div>

+ 65 - 77
src/pages/home/components/navs.vue

@@ -1,8 +1,8 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-import {getHomeQuickLink} from "~/apis/common";
3
-import {PLATFORM_NAME} from "~/apis/model/common.model";
4
-import {useDacangStore} from "~/stores/dacangStore";
5
-import {CDN_URL,CDM_URL} from "~/config/app";
2
+import { getHomeQuickLink } from "~/apis/common";
3
+import { PLATFORM_NAME } from "~/apis/model/common.model";
4
+import { useDacangStore } from "~/stores/dacangStore";
5
+import { CDN_URL, CDM_URL } from "~/config/app";
6
 
6
 
7
 const navList = ref([{
7
 const navList = ref([{
8
   image: CDM_URL + '/image/2023-11-20/20231120155257975.png',
8
   image: CDM_URL + '/image/2023-11-20/20231120155257975.png',
@@ -12,29 +12,34 @@ const navList = ref([{
12
   image: CDN_URL + '/static/home-nav/home_xianshimiaosha_220614.png',
12
   image: CDN_URL + '/static/home-nav/home_xianshimiaosha_220614.png',
13
   title: '限时秒杀',
13
   title: '限时秒杀',
14
   key: 'miaosha'
14
   key: 'miaosha'
15
-}, {
16
-  image: CDN_URL + '/static/home-nav/jingdongshengqian_220920.png',
17
-  title: '京东',
18
-  key: PLATFORM_NAME.JD
19
-}, {
15
+},{
16
+  image: CDM_URL + '/image/2023-11-30/20231130092625318.png',
17
+  title: '会员专区',
18
+  key: 'user',
19
+},{
20
   image: '',
20
   image: '',
21
   title: '鼎盛联盟',
21
   title: '鼎盛联盟',
22
   key: 'dingsheng',
22
   key: 'dingsheng',
23
-  // categoryId: '430'
24
-  // 测试库
23
+  // https://cdn.bjtdba.com/vod/image/2023-11-30/20231130092553801.png  gc
24
+  // https://cdn.bjtdba.com/vod/image/2023-11-30/20231130092625318.png  会员
25
   // categoryId: '149'
25
   // categoryId: '149'
26
 },{
26
 },{
27
-  image: CDM_URL + '/image/2023-11-24/20231124150424710.png',
28
-  title: '拼多多',
29
-  key: PLATFORM_NAME.PDD
27
+  image: CDN_URL + '/static/home-nav/icon_hmyh_221014.png',
28
+  title: '惠民专区',
29
+  key: PLATFORM_NAME.DC,
30
+  categoryId: '567',
31
+},{
32
+  image: CDN_URL + '/static/home-nav/jingdongshengqian_220920.png',
33
+  title: '京东',
34
+  key: PLATFORM_NAME.JD
30
 }, {
35
 }, {
31
   image: CDN_URL + '/static/home-nav/home_taobaoyanglao_220920.png',
36
   image: CDN_URL + '/static/home-nav/home_taobaoyanglao_220920.png',
32
   title: '淘宝',
37
   title: '淘宝',
33
   key: PLATFORM_NAME.TB
38
   key: PLATFORM_NAME.TB
34
 }, {
39
 }, {
35
-  image: CDN_URL + '/static/home-nav/douyin_logo_230317.png',
36
-  title: '抖音',
37
-  key: PLATFORM_NAME.DY
40
+  image: CDM_URL + '/image/2023-11-24/20231124150424710.png',
41
+  title: '拼多多',
42
+  key: PLATFORM_NAME.PDD
38
 }, {
43
 }, {
39
   image: CDN_URL + '/static/home-nav/home_weipinhui_220920.png',
44
   image: CDN_URL + '/static/home-nav/home_weipinhui_220920.png',
40
   title: '唯品会',
45
   title: '唯品会',
@@ -43,43 +48,25 @@ const navList = ref([{
43
   image: CDN_URL + '/static/home-nav/home_suningyigou_220920.png',
48
   image: CDN_URL + '/static/home-nav/home_suningyigou_220920.png',
44
   title: '苏宁易购',
49
   title: '苏宁易购',
45
   key: PLATFORM_NAME.SU
50
   key: PLATFORM_NAME.SU
51
+},{
52
+  image: CDN_URL + '/static/home-nav/douyin_logo_230317.png',
53
+  title: '抖音',
54
+  key: PLATFORM_NAME.DY
46
 }, {
55
 }, {
47
-  image: CDN_URL + '/static/home-nav/home_jinfentongdui_220615.png',
48
-  title: '积分通兑',
49
-  key: 'integral'
50
-}, {
51
-  image: CDN_URL + '/static/home-nav/elderly_zone_220920.png',
52
-  title: '老年专区',
53
-  key: PLATFORM_NAME.DC,
56
+  image: CDM_URL + '/image/2023-11-30/20231130092553801.png',
57
+  title: '工厂直供',
58
+  key: 'gongchang',
54
   categoryId: '571'
59
   categoryId: '571'
55
-}, 
56
- {
60
+},
61
+{
57
   image: '',
62
   image: '',
58
-  title: '滋补保健',
63
+  title: '滋补养生',
59
   key: 'zibu',
64
   key: 'zibu',
60
   categoryId: '430'
65
   categoryId: '430'
61
-  // 测试库
62
-  // categoryId: '149'
63
-},
64
-
65
-// {
66
-//   image: CDN_URL + '/static/home-nav/the_student_zone_220920.png',
67
-//   title: '学生专区',
68
-//   key: PLATFORM_NAME.DC,
69
-//   categoryId: '576'
70
-// }, 
71
-{
72
-  image: CDM_URL + '/image/2023-11-20/20231120155340358.png',
73
-  title: '会员专区',
74
-  key: 'member',
75
-  // key: PLATFORM_NAME.DC,
76
-  // categoryId: '567',
77
 }, {
66
 }, {
78
-  image: CDN_URL + '/static/home-nav/icon_hmyh_221014.png',
79
-  title: '惠民专区',
80
-  key: PLATFORM_NAME.DC,
81
-  categoryId: '567',
82
-
67
+  image: CDN_URL + '/static/home-nav/home_jinfentongdui_220615.png',
68
+  title: '积分通兑',
69
+  key: 'integral'
83
 }, {
70
 }, {
84
   image: CDN_URL + '/static/home-nav/home_gengduo.png',
71
   image: CDN_URL + '/static/home-nav/home_gengduo.png',
85
   title: '更多',
72
   title: '更多',
@@ -88,10 +75,12 @@ const navList = ref([{
88
 
75
 
89
 onBeforeMount(() => {
76
 onBeforeMount(() => {
90
   getHomeQuickLink().then(res => {
77
   getHomeQuickLink().then(res => {
78
+    console.log('res>>>>>', res);
79
+
91
     if (res) {
80
     if (res) {
92
-		navList.value[11] = res[0]
93
-		navList.value[3] = res[1]
94
-		// navList.value[3] = res[0]
81
+      navList.value[12] = res[0]
82
+      navList.value[3] = res[1]
83
+      // navList.value[3] = res[0]
95
       // console.log(res)
84
       // console.log(res)
96
     }
85
     }
97
   })
86
   })
@@ -108,15 +97,12 @@ function handleItemClick(item: any) {
108
       uni.switchTab({
97
       uni.switchTab({
109
         url: '/pages/dacang/list/index'
98
         url: '/pages/dacang/list/index'
110
       })
99
       })
111
-      // uni.navigateTo({
112
-      //   url: '/pagesC/goods_details/index?id=4858'
113
-      // })
114
       break;
100
       break;
115
     }
101
     }
116
     // 会员专区
102
     // 会员专区
117
-    case 'member': {
103
+    case 'user': {
118
       uni.navigateTo({
104
       uni.navigateTo({
119
-        url: '/pages/vip/index'
105
+        url: `/pages/vip/index?type=`+item.key
120
       })
106
       })
121
       break;
107
       break;
122
     }
108
     }
@@ -135,18 +121,25 @@ function handleItemClick(item: any) {
135
       })
121
       })
136
       break;
122
       break;
137
     }
123
     }
138
-	case 'dingsheng': {
139
-	  uni.navigateTo({
140
-	    url: `/pages/product/dingshenglianmeng?type=`+item.key
141
-	  })
142
-	  break;
143
-	}
144
-	case 'jingpin': {
145
-	  uni.navigateTo({
146
-	    url: `/pages/product/dingshenglianmeng?type=`+item.key
147
-	  })
148
-	  break;
149
-	}
124
+    case 'dingsheng': {
125
+      uni.navigateTo({
126
+        url: `/pages/product/dingshenglianmeng?type=` + item.key
127
+      })
128
+      break;
129
+    }
130
+    //工厂直供
131
+    case 'gongchang': {
132
+      uni.navigateTo({
133
+        url: `/pages/vip/index?type=`+item.key
134
+      })
135
+      break;
136
+    }
137
+    case 'jingpin': {
138
+      uni.navigateTo({
139
+        url: `/pages/product/dingshenglianmeng?type=` + item.key
140
+      })
141
+      break;
142
+    }
150
     // 积分通兑
143
     // 积分通兑
151
     case 'integral': {
144
     case 'integral': {
152
       uni.navigateTo({
145
       uni.navigateTo({
@@ -178,16 +171,11 @@ function handleItemClick(item: any) {
178
   <div class="">
171
   <div class="">
179
     <div class="rounded bg-white pt-4 pb-2 px-5">
172
     <div class="rounded bg-white pt-4 pb-2 px-5">
180
       <div class="flex justify-around flex-wrap ">
173
       <div class="flex justify-around flex-wrap ">
181
-        <div
182
-            @tap="handleItemClick(navItem)"
183
-            class="flex flex-col items-center justify-center gap-y-1 mb-2 flex-[0_0_20%]"
184
-             v-for="(navItem, index) in navList" :key="index">
185
-          <image :src="navItem.image"
186
-                 mode="widthFix"
187
-                 class="w-10 h-10"
188
-          ></image>
174
+        <div @tap="handleItemClick(navItem)" class="flex flex-col items-center justify-center gap-y-1 mb-2 flex-[0_0_20%]"
175
+          v-for="(navItem, index) in navList" :key="index">
176
+          <image :src="navItem.image" mode="widthFix" class="w-10 h-10"></image>
189
           <div class="text-xs">
177
           <div class="text-xs">
190
-            {{navItem.title}}
178
+            {{ navItem.title }}
191
           </div>
179
           </div>
192
         </div>
180
         </div>
193
       </div>
181
       </div>

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

@@ -208,7 +208,7 @@ const homeBanner = CDN_URL + '/static/assets/home-banner.png'
208
 function handleBannerClick(item) {
208
 function handleBannerClick(item) {
209
   if(item.url == 'rich') {
209
   if(item.url == 'rich') {
210
     uni.navigateTo({
210
     uni.navigateTo({
211
-      url: '/pages/vip/index'
211
+      url: '/pages/vip/index?type=user'
212
     })
212
     })
213
   }
213
   }
214
 }
214
 }

+ 100 - 27
src/pages/immediate-withdrawal/index.vue

@@ -7,16 +7,18 @@ import {
7
   getWithdrawalConfig,
7
   getWithdrawalConfig,
8
   getWithdrawalService
8
   getWithdrawalService
9
 } from "~/apis/user";
9
 } from "~/apis/user";
10
-import {SpreadInfoModel} from "~/apis/model/spreadInfoModel";
11
-import type {UserYanglaoJinModel} from "~/apis/model/userYanglaoJinModel";
12
-import {CDN_URL} from "~/config/app";
13
-import {isNumber} from "~/utils";
10
+import { SpreadInfoModel } from "~/apis/model/spreadInfoModel";
11
+import type { UserYanglaoJinModel } from "~/apis/model/userYanglaoJinModel";
12
+import { CDN_URL } from "~/config/app";
13
+import { isNumber } from "~/utils";
14
+import { Accountbind } from "~/apis/auth.api";
14
 
15
 
15
 const zfb_logoImage = CDN_URL + '/static/assets/zfb_logo.png'
16
 const zfb_logoImage = CDN_URL + '/static/assets/zfb_logo.png'
16
 const wx_logoImage = CDN_URL + '/static/assets/wx_logo.png'
17
 const wx_logoImage = CDN_URL + '/static/assets/wx_logo.png'
17
 const userStore = useUserStore()
18
 const userStore = useUserStore()
18
 const userSpreadInfo = ref<SpreadInfoModel>()
19
 const userSpreadInfo = ref<SpreadInfoModel>()
19
-
20
+//微信绑定标识
21
+const iswxshow = ref(false)
20
 const withdrawalCal = ref({})
22
 const withdrawalCal = ref({})
21
 const yanglaojin = ref<UserYanglaoJinModel>()
23
 const yanglaojin = ref<UserYanglaoJinModel>()
22
 
24
 
@@ -27,7 +29,46 @@ const cashWithdrawalAmount = ref()
27
 const isDisabled = ref(true)
29
 const isDisabled = ref(true)
28
 const userBrokeragePrice = ref(0)
30
 const userBrokeragePrice = ref(0)
29
 // userSpreadInfo.value.brokerage_price
31
 // userSpreadInfo.value.brokerage_price
30
-onLoad(async () => {
32
+onShow(async () => {
33
+  cashWithdrawalAmount.value = null
34
+  getBandAccountInfo({ type: '1' }).then(res => {
35
+    iswxshow.value = true
36
+
37
+  }).catch((error) => {
38
+    setTimeout(() => {
39
+      uni.showModal({
40
+        title: '温馨提示',
41
+        content: '您还未绑定提现账号,是否绑定?',
42
+        cancelText: "取消", // 取消按钮的文字
43
+        confirmText: "确认绑定", // 确认按钮的文字
44
+        showCancel: true, // 是否显示取消按钮,默认为 true
45
+        confirmColor: '#f55850',
46
+        success: (res) => {
47
+          if (res.confirm) {
48
+            console.log('comfirm') //点击确定之后执行的代码
49
+            Accountbind({ openid: userStore.openid, wx_type: '1' }).then(resg => {
50
+              console.log('我是resg', resg);
51
+
52
+              uni.showToast({
53
+                title: '绑定成功',
54
+                icon: 'none'
55
+              })
56
+              iswxshow.value = true
57
+            }).catch((error) => {
58
+              uni.showToast({
59
+                title: error,
60
+                icon: 'none'
61
+              })
62
+            })
63
+          } else {
64
+            console.log('cancel') //点击取消之后执行的代码
65
+            iswxshow.value = false
66
+          }
67
+        }
68
+      })
69
+    }, 300);
70
+
71
+  })
31
   await userStore.getUserInfo()
72
   await userStore.getUserInfo()
32
   // 佣金信息
73
   // 佣金信息
33
   userSpreadInfo.value = await getUserSpreadInfo()
74
   userSpreadInfo.value = await getUserSpreadInfo()
@@ -48,6 +89,7 @@ onLoad(async () => {
48
       icon: 'none'
89
       icon: 'none'
49
     })
90
     })
50
   }
91
   }
92
+
51
   // }
93
   // }
52
 })
94
 })
53
 
95
 
@@ -65,6 +107,37 @@ watch(() => cashWithdrawalAmount.value, (val) => {
65
   }
107
   }
66
 })
108
 })
67
 
109
 
110
+function Tochecked() {
111
+  iswxshow.value = !iswxshow.value
112
+  console.log(iswxshow.value);
113
+  if (iswxshow.value == true) {
114
+    Accountbind({ openid: userStore.openid, wx_type: '1' }).then(resg => {
115
+      console.log('我是resg', resg);
116
+
117
+      uni.showToast({
118
+        title: '绑定成功',
119
+        icon: 'none'
120
+      })
121
+      iswxshow.value = true
122
+    }).catch((error) => {
123
+      uni.showToast({
124
+        title: error,
125
+        icon: 'none'
126
+      })
127
+      if(error=='此微信已绑定其他账户'){
128
+        iswxshow.value=false
129
+      }
130
+    })
131
+  }else{
132
+    console.log(111);
133
+    
134
+  }
135
+}
136
+
137
+
138
+
139
+
140
+
68
 function handleInputAll() {
141
 function handleInputAll() {
69
   // console.log(userSpreadInfo.value?.brokerage_price)
142
   // console.log(userSpreadInfo.value?.brokerage_price)
70
   if (userSpreadInfo.value && userSpreadInfo.value.brokerage_price && userSpreadInfo.value?.brokerage_price >= widthdrawalConfig.value.withdrawal_money) {
143
   if (userSpreadInfo.value && userSpreadInfo.value.brokerage_price && userSpreadInfo.value?.brokerage_price >= widthdrawalConfig.value.withdrawal_money) {
@@ -81,6 +154,7 @@ function handleInputAll() {
81
  * 立即提现
154
  * 立即提现
82
  */
155
  */
83
 function handleImmediateWithdrawal() {
156
 function handleImmediateWithdrawal() {
157
+  
84
   if (isDisabled.value) {
158
   if (isDisabled.value) {
85
     return
159
     return
86
   }
160
   }
@@ -139,20 +213,25 @@ function handleImmediateWithdrawal() {
139
     })
213
     })
140
   }
214
   }
141
 
215
 
216
+  if(iswxshow.value==false){
217
+    uni.showToast({
218
+      title: '请先勾选提现方式',
219
+      icon: 'none'
220
+    })
221
+    return
222
+  }
223
+
224
+  getApplicationWithdrawal({ extract_price: cashWithdrawalAmount.value, extract_type: 1 }).then(res => {
142
 
225
 
143
-  getApplicationWithdrawal({extract_price: cashWithdrawalAmount.value, extract_type: 1}).then(res => {
144
-    // uni.showToast({
145
-    //   title: res,
146
-    //   icon: 'none'
147
-    // })
148
     uni.showToast({
226
     uni.showToast({
149
-      title: '提现成功',
227
+      title: '提现已申请',
150
       icon: 'none'
228
       icon: 'none'
151
-    }).then(res => {
229
+    })
230
+    setTimeout(() => {
152
       uni.navigateTo({
231
       uni.navigateTo({
153
-        url: '/pages/immediate-withdrawal/index'
232
+        url: '/pages/withdrawal-record/index'
154
       })
233
       })
155
-    })
234
+    }, 300)
156
   }).catch(error => {
235
   }).catch(error => {
157
     uni.showToast({
236
     uni.showToast({
158
       title: error,
237
       title: error,
@@ -190,10 +269,7 @@ function handleShowAgreement(type) {
190
       <div class="flex justify-center items-center pt-4 f-hairline-bottom">
269
       <div class="flex justify-center items-center pt-4 f-hairline-bottom">
191
         <div class="text-lg font-bold">¥</div>
270
         <div class="text-lg font-bold">¥</div>
192
         <div class="flex-1">
271
         <div class="flex-1">
193
-          <input placeholder="请输入金额" class="w-full"
194
-                 type="number"
195
-                 v-model="cashWithdrawalAmount"
196
-          />
272
+          <input placeholder="请输入金额" class="w-full" type="digit" v-model="cashWithdrawalAmount" />
197
         </div>
273
         </div>
198
         <div class="text-xs text-red" @click="handleInputAll">全部提现</div>
274
         <div class="text-xs text-red" @click="handleInputAll">全部提现</div>
199
       </div>
275
       </div>
@@ -215,10 +291,11 @@ function handleShowAgreement(type) {
215
         <div class="flex items-center justify-between py-3">
291
         <div class="flex items-center justify-between py-3">
216
           <div class="flex items-center gap-2">
292
           <div class="flex items-center gap-2">
217
             <image :src="wx_logoImage" mode="widthFix" class="w-8 h-8"></image>
293
             <image :src="wx_logoImage" mode="widthFix" class="w-8 h-8"></image>
218
-            <div>微信支付</div>
294
+            <div>微信</div>
219
           </div>
295
           </div>
220
           <div>
296
           <div>
221
-            <radio checked/>
297
+            <radio :checked="true" v-if="iswxshow==true" />
298
+            <radio :checked="false"  v-if="iswxshow==false" @click="Tochecked"  />
222
           </div>
299
           </div>
223
         </div>
300
         </div>
224
 
301
 
@@ -236,11 +313,8 @@ function handleShowAgreement(type) {
236
 
313
 
237
     <div class="flex flex-col">
314
     <div class="flex flex-col">
238
       <div class=" flex rounded-full bg-red-300">
315
       <div class=" flex rounded-full bg-red-300">
239
-        <nut-button type="primary" block
240
-                    :disabled="isDisabled"
241
-                    :class="isDisabled && 'bg-gray-800'"
242
-                    @tap="handleImmediateWithdrawal"
243
-        >
316
+        <nut-button type="primary" block :disabled="isDisabled" :class="isDisabled && 'bg-gray-800'"
317
+          @tap="handleImmediateWithdrawal">
244
           立即提现
318
           立即提现
245
         </nut-button>
319
         </nut-button>
246
       </div>
320
       </div>
@@ -267,7 +341,6 @@ page {
267
   height: 16px !important;
341
   height: 16px !important;
268
   width: 16px !important;
342
   width: 16px !important;
269
 }
343
 }
270
-
271
 </style>
344
 </style>
272
 <route lang="yaml">
345
 <route lang="yaml">
273
 style:
346
 style:

+ 16 - 14
src/pages/miaosha/index.vue

@@ -12,7 +12,7 @@ const currentSeckillDate = ref()
12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
14
 const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
14
 const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
15
-
15
+const userStore = useUserStore()
16
 // const list = ref<Array<DcSeckillModel>>()
16
 // const list = ref<Array<DcSeckillModel>>()
17
 const currentProductList = ref([])
17
 const currentProductList = ref([])
18
 
18
 
@@ -24,6 +24,7 @@ const state = reactive({
24
 
24
 
25
   list: []
25
   list: []
26
 })
26
 })
27
+
27
 onLoad((options) => {
28
 onLoad((options) => {
28
   loadList('reload')
29
   loadList('reload')
29
 })
30
 })
@@ -43,33 +44,34 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
43
   }).then( res => {
44
   }).then( res => {
44
     if (action === 'reload') {
45
     if (action === 'reload') {
45
       if (res && res.length > 0) {
46
       if (res && res.length > 0) {
46
-        console.log(res)
47
+        console.log('秒杀>>>',res)
47
         const resList = res
48
         const resList = res
48
         // const status3List = orderBy(list.value, (val) => {
49
         // const status3List = orderBy(list.value, (val) => {
49
         //   return val.status == 3
50
         //   return val.status == 3
50
         // })
51
         // })
51
-        let status3FilterList = filter(resList, (val) => {
52
-          return val.status == 3
53
-        })
52
+        //val.status 1 开始抢 2 即将开始 3 已结束
53
+        // let status3FilterList = filter(resList, (val) => {
54
+        //   return val.status == 3
55
+        // })
54
         let status2FilterList = filter(resList, (val) => {
56
         let status2FilterList = filter(resList, (val) => {
55
           return val.status == 2
57
           return val.status == 2
56
         })
58
         })
57
         let status1FilterList = filter(resList, (val) => {
59
         let status1FilterList = filter(resList, (val) => {
58
           return val.status == 1
60
           return val.status == 1
59
         })
61
         })
60
-        if (status3FilterList.length >= 3) {
61
-          status3FilterList = orderBy(status3FilterList,  ['ctime'], ['desc'])
62
-          console.log(status3FilterList)
63
-          state.list.push(...status3FilterList[0])
64
-          console.log(state.list)
65
-        } else {
66
-          state.list.push(...status3FilterList)
67
-        }
62
+        // if (status3FilterList.length >= 3) {
63
+        //   status3FilterList = orderBy(status3FilterList,  ['ctime'], ['desc'])
64
+        //   console.log(status3FilterList)
65
+        //   state.list.push(...status3FilterList[0])
66
+        //   console.log(state.list)
67
+        // } else {
68
+        //   state.list.push(...status3FilterList)
69
+        // }
68
         if (status2FilterList.length > 0) {
70
         if (status2FilterList.length > 0) {
69
           state.list.push(...status2FilterList)
71
           state.list.push(...status2FilterList)
70
         }
72
         }
71
         if (status1FilterList.length > 0) {
73
         if (status1FilterList.length > 0) {
72
-          state.list.push(...status1FilterList)
74
+          state.list.unshift(...status1FilterList)
73
         }
75
         }
74
 
76
 
75
         if (state.list.length > 0) {
77
         if (state.list.length > 0) {

+ 17 - 37
src/pages/my-integral/index.vue

@@ -1,6 +1,6 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import {useUserStore} from "~/stores/userStore";
3
-import {getNewSignInInfo, getUserInfo} from "~/apis/user";
2
+import { useUserStore } from "~/stores/userStore";
3
+import { getNewSignInInfo, getUserInfo } from "~/apis/user";
4
 import FButton from "~/components/FButton/FButton.vue";
4
 import FButton from "~/components/FButton/FButton.vue";
5
 import CXBButton from "~/components/CXBButton/CXBButton.vue";
5
 import CXBButton from "~/components/CXBButton/CXBButton.vue";
6
 import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
6
 import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
@@ -27,7 +27,7 @@ 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) {
@@ -68,7 +68,7 @@ if (userStore.userInfo) {
68
 function handleSign() {
68
 function handleSign() {
69
   // console.log(state.signToday)
69
   // console.log(state.signToday)
70
   // if (state.signToday == 0)  {
70
   // if (state.signToday == 0)  {
71
-    state.isShowSignIn = true
71
+  state.isShowSignIn = true
72
   // } else {
72
   // } else {
73
   //   return uni.showToast({
73
   //   return uni.showToast({
74
   //     title: '今日已签到过',
74
   //     title: '今日已签到过',
@@ -117,27 +117,19 @@ function handleShowAgreement() {
117
         {{ userStore.userInfo.score }}
117
         {{ userStore.userInfo.score }}
118
       </div>
118
       </div>
119
     </div>
119
     </div>
120
-
120
+    <div @tap="handleShowIntegralDetail" class="bg-white rounded-md text-sm flex justify-between p-3">
121
+      <div class="">积分明细</div>
122
+      <div class="f-text-color-2 i-tabler-chevron-right transform transition-300" />
123
+    </div>
121
     <div class="bg-white rounded-md text-sm flex justify-between p-3">
124
     <div class="bg-white rounded-md text-sm flex justify-between p-3">
122
       <div class="">积分通兑</div>
125
       <div class="">积分通兑</div>
123
-      <FButton
124
-          @tap="handleToZibuyangsheng"
125
-          size="mini"
126
-          :exClass="['rounded-full','!text-[12px]', 'text-white', `bg-primary`, 'w-full']"
127
-
128
-      >
126
+      <FButton @tap="handleToZibuyangsheng" size="mini"
127
+        :exClass="['rounded-full', '!text-[12px]', 'text-white', `bg-primary`, 'w-full']">
129
         去兑换
128
         去兑换
130
       </FButton>
129
       </FButton>
131
     </div>
130
     </div>
132
 
131
 
133
-    <div
134
-        @tap="handleShowIntegralDetail"
135
-        class="bg-white rounded-md text-sm flex justify-between p-3">
136
-      <div class="">积分明细</div>
137
-      <div
138
-          class="f-text-color-2 i-tabler-chevron-right transform transition-300"
139
-      />
140
-    </div>
132
+
141
 
133
 
142
     <div class="bg-white rounded-md text-sm flex flex-col p-3">
134
     <div class="bg-white rounded-md text-sm flex flex-col p-3">
143
       <div class="f-hairline-bottom pb-3">积分任务</div>
135
       <div class="f-hairline-bottom pb-3">积分任务</div>
@@ -147,11 +139,8 @@ function handleShowAgreement() {
147
             <div class="text-xs">每日签到</div>
139
             <div class="text-xs">每日签到</div>
148
             <div class="text-xs text-gray-500">每日签到得奖励</div>
140
             <div class="text-xs text-gray-500">每日签到得奖励</div>
149
           </div>
141
           </div>
150
-          <FButton
151
-              @click="handleSign"
152
-              size="mini"
153
-              :exClass="['rounded-full','!text-[12px]', 'text-white', `${state.signToday === 0 ? 'bg-primary' : 'bg-gray' }`, 'w-full']"
154
-          >
142
+          <FButton @click="handleSign" size="mini"
143
+            :exClass="['rounded-full', '!text-[12px]', 'text-white', `${state.signToday === 0 ? 'bg-primary' : 'bg-gray'}`, 'w-full']">
155
             {{ state.signToday === 0 ? '去签到' : '已签到' }}
144
             {{ state.signToday === 0 ? '去签到' : '已签到' }}
156
           </FButton>
145
           </FButton>
157
         </div>
146
         </div>
@@ -160,12 +149,8 @@ function handleShowAgreement() {
160
             <div class="text-xs">邀请好友得积分</div>
149
             <div class="text-xs">邀请好友得积分</div>
161
             <div class="text-xs text-gray-500">邀请好友赚奖励</div>
150
             <div class="text-xs text-gray-500">邀请好友赚奖励</div>
162
           </div>
151
           </div>
163
-          <FButton
164
-              @tap="handleToPoster"
165
-              size="mini"
166
-              :exClass="['rounded-full','!text-[12px]', 'text-white', `bg-primary`, 'w-full']"
167
-
168
-          >
152
+          <FButton @tap="handleToPoster" size="mini"
153
+            :exClass="['rounded-full', '!text-[12px]', 'text-white', `bg-primary`, 'w-full']">
169
             去邀请
154
             去邀请
170
 
155
 
171
           </FButton>
156
           </FButton>
@@ -176,13 +161,8 @@ function handleShowAgreement() {
176
     </div>
161
     </div>
177
   </div>
162
   </div>
178
 
163
 
179
-  <CXBDialogSIgnIn
180
-      :show="state.isShowSignIn"
181
-      :today="state.signToday"
182
-      :day="state.day"
183
-      @confirm="state.isShowSignIn = false"
184
-      @close="state.isShowSignIn = false"
185
-  />
164
+  <CXBDialogSIgnIn :show="state.isShowSignIn" :today="state.signToday" :day="state.day"
165
+    @confirm="state.isShowSignIn = false" @close="state.isShowSignIn = false" />
186
 </template>
166
 </template>
187
 
167
 
188
 <style>
168
 <style>

+ 22 - 1
src/pages/my-invitation/index.vue

@@ -1,7 +1,7 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
 import FCellGroup from "~/components/FCellGroup/FCellGroup.vue";
2
 import FCellGroup from "~/components/FCellGroup/FCellGroup.vue";
3
 import FCell from "~/components/FCell/FCell.vue";
3
 import FCell from "~/components/FCell/FCell.vue";
4
-import {getAgentInfo, getSelectUserInviteProfit} from "~/apis/user";
4
+import {getAgentInfo, getSelectUserInviteProfit, getUserUnionId} from "~/apis/user";
5
 const userStore = useUserStore()
5
 const userStore = useUserStore()
6
 const list = [{
6
 const list = [{
7
   title: '邀请伙伴',
7
   title: '邀请伙伴',
@@ -18,6 +18,9 @@ const list = [{
18
 }, {
18
 }, {
19
   title: '去提现',
19
   title: '去提现',
20
   url: '/pages/immediate-withdrawal/index'
20
   url: '/pages/immediate-withdrawal/index'
21
+},{
22
+  title: '支付平台绑定',
23
+  url: '/pages/third_party_binding/index'
21
 }]
24
 }]
22
 
25
 
23
 
26
 
@@ -43,6 +46,24 @@ const userInviteProfit = reactive({
43
 })
46
 })
44
 onLoad(() => {
47
 onLoad(() => {
45
   console.log('load...')
48
   console.log('load...')
49
+  uni.login({
50
+    provider: 'weixin',
51
+    univerifyStyle: {
52
+      fullScreen: true
53
+    },
54
+    success: result => {
55
+      // console.log(result)
56
+      getUserUnionId({
57
+        code: result.code,
58
+        source: 'cxb'
59
+      }).then(unionRes => {
60
+        console.log(111111, unionRes)
61
+        // const shareId = Cache.get('SHARE_ID')
62
+        //存储openid
63
+        userStore.setOpenid(unionRes.openid)
64
+      })
65
+    }
66
+  })
46
   getSelectUserInviteProfit({ uid: userStore.uid }).then(res => {
67
   getSelectUserInviteProfit({ uid: userStore.uid }).then(res => {
47
     console.log(res)
68
     console.log(res)
48
     const inviteData = res.data
69
     const inviteData = res.data

+ 19 - 10
src/pages/my-rules/index.vue

@@ -252,25 +252,32 @@ function handleShowAnnuityDetail() {
252
 const ruleId = computed(() => {
252
 const ruleId = computed(() => {
253
   const userRichType = userStore.userInfo?.user_rich_type
253
   const userRichType = userStore.userInfo?.user_rich_type
254
 
254
 
255
-  // console.log(userRichType)
255
+  console.log('我是》》》',userRichType)
256
   // 创始人
256
   // 创始人
257
-  if (userRichType === 3) {
257
+  if (userRichType == 3) {
258
     return 21
258
     return 21
259
   }
259
   }
260
   // 用户
260
   // 用户
261
-  if (userRichType === 0) {
261
+  if (userRichType == 0) {
262
     return 18
262
     return 18
263
   }
263
   }
264
   // 会员
264
   // 会员
265
-  if (userRichType === 1) {
265
+  if (userRichType ==1) {
266
     return 19
266
     return 19
267
   }
267
   }
268
-  // 合伙人
269
-  if (userRichType === 2 || userRichType == 4) {
268
+  // 高级会员
269
+  if (userRichType == 4) {
270
     return 20
270
     return 20
271
   }
271
   }
272
-
273
-  return 18
272
+  // 合伙人
273
+  if (userRichType == 8 ) {
274
+    return 24
275
+  }
276
+  //联合创始人
277
+  if (userRichType == 9 ) {
278
+    return 22
279
+  }
280
+  
274
 })
281
 })
275
 const agentInfo = ref({})
282
 const agentInfo = ref({})
276
 
283
 
@@ -279,6 +286,8 @@ onShow(() => {
279
   if (ruleId.value) {
286
   if (ruleId.value) {
280
     // console.log(ruleId.value)
287
     // console.log(ruleId.value)
281
     getRules(ruleId.value).then(res => {
288
     getRules(ruleId.value).then(res => {
289
+      console.log(1111111222,res);
290
+      
282
       ruleDetail.value = res
291
       ruleDetail.value = res
283
     }).catch(error => {
292
     }).catch(error => {
284
       uni.showToast({
293
       uni.showToast({
@@ -299,7 +308,7 @@ function handleUserUpgrade() {
299
   if (ruleId.value < 20) {
308
   if (ruleId.value < 20) {
300
     const id = ruleId.value + 1
309
     const id = ruleId.value + 1
301
     getRules(id).then(res => {
310
     getRules(id).then(res => {
302
-      console.log(res);
311
+      console.log('woshi111',res);
303
       
312
       
304
       ruleDetail.value = res
313
       ruleDetail.value = res
305
       showUpgradeInfo.value = true
314
       showUpgradeInfo.value = true
@@ -307,7 +316,7 @@ function handleUserUpgrade() {
307
   }else if(ruleId.value = 20){
316
   }else if(ruleId.value = 20){
308
     const id = ruleId.value + 4
317
     const id = ruleId.value + 4
309
     getRules(id).then(res => {
318
     getRules(id).then(res => {
310
-      console.log(res);
319
+      console.log('我是合伙人',res);
311
       
320
       
312
       ruleDetail.value = res
321
       ruleDetail.value = res
313
       showUpgradeInfo.value = true
322
       showUpgradeInfo.value = true

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

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

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

@@ -39,7 +39,10 @@ const props = defineProps({
39
 //     }
39
 //     }
40
 //   }
40
 //   }
41
 // })
41
 // })
42
+//全部订单页面
42
 function getStatusText(orderItem: OrderListModel) {
43
 function getStatusText(orderItem: OrderListModel) {
44
+  // console.log('我是》',orderItem.status);
45
+
43
   // if (props.status === 5) {
46
   // if (props.status === 5) {
44
   //   return '未支付'
47
   //   return '未支付'
45
   // }
48
   // }
@@ -66,8 +69,11 @@ function getStatusText(orderItem: OrderListModel) {
66
   if (orderItem.status == 4) {
69
   if (orderItem.status == 4) {
67
     return '已申请退款'
70
     return '已申请退款'
68
   }
71
   }
69
-  if (orderItem.status == 5) {
70
-    return '未支付'
72
+  if (orderItem.status === 5) {
73
+    return '已取消订单'
74
+  }
75
+  if (orderItem.status === '5') {
76
+    return '待付款'
71
   }
77
   }
72
 }
78
 }
73
 
79
 
@@ -80,28 +86,39 @@ function handleHeaderClick() {
80
 /**
86
 /**
81
  * 取消订单
87
  * 取消订单
82
  */
88
  */
89
+
83
 function handleCancelOrder() {
90
 function handleCancelOrder() {
84
-  console.log('取消订单操作')
85
-  cancelOrder(props.orderItem.group_order_id).then(res => {
86
-    setTimeout(() => {
87
-      uni.showToast({
88
-        title: '取消成功',
89
-        icon: 'none'
90
-      })
91
-
92
-      // if (props.tabValue)
93
-      uni.$emit('orderCancelFromList', props.tabValue)
94
-
95
-    }, 300)
96
-
97
-  }).catch(error => {
98
-    // uni.showToast({
99
-    //   title: error,
100
-    //   icon: 'none'
101
-    // })
102
-  })
91
+  uni.showModal({
92
+    title: '取消订单',
93
+    content: '您确定要取消订单吗?',
94
+    confirmColor: '#FE0032',
95
+    success: function (modalRes) {
96
+      if (modalRes.confirm) {
97
+        console.log('用户点击确定', props.orderItem.group_order_id);
98
+        cancelOrder(props.orderItem.group_order_id)
99
+          .then(res => {
100
+            uni.showToast({
101
+              title: '取消成功',
102
+              icon: 'none'
103
+            });
104
+            // 如果需要刷新订单列表,可以触发事件
105
+            // if (props.tabValue)
106
+            uni.$emit('orderCancelFromList', props.tabValue);
107
+          })
108
+          .catch(error => {
109
+            uni.showToast({
110
+              title: error, // 或者使用 error 信息
111
+              icon: 'none'
112
+            });
113
+          });
114
+      } else if (modalRes.cancel) {
115
+        console.log('用户点击取消', props.orderItem.group_order_id);
116
+      }
117
+    }
118
+  });
103
 }
119
 }
104
 
120
 
121
+
105
 function handlePayment() {
122
 function handlePayment() {
106
   const { orderItem } = props
123
   const { orderItem } = props
107
   uni.navigateTo({
124
   uni.navigateTo({
@@ -306,13 +323,18 @@ function handleShowObligationOrderDetail(orderItem) {
306
 
323
 
307
         </div>
324
         </div>
308
 
325
 
309
-        <div class="flex justify-end gap-2" v-if="orderItem.status == 5">
326
+        <div class="flex justify-end gap-2" v-if="orderItem.status === '5'">
327
+          <div class="title-line">09:02:00后订单将关闭</div>
310
           <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
328
           <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
311
             <div class="text-black">取消订单</div>
329
             <div class="text-black">取消订单</div>
312
           </nut-button>
330
           </nut-button>
313
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
331
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
314
 
332
 
315
         </div>
333
         </div>
334
+        <div class="flex justify-end gap-2" v-if="orderItem.status === 5">
335
+
336
+
337
+        </div>
316
         <div class="flex justify-end gap-2" v-if="orderItem.status == 0">
338
         <div class="flex justify-end gap-2" v-if="orderItem.status == 0">
317
           <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
339
           <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
318
             <div class="text-black">提醒发货</div>
340
             <div class="text-black">提醒发货</div>
@@ -333,7 +355,17 @@ function handleShowObligationOrderDetail(orderItem) {
333
           <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
355
           <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
334
 
356
 
335
         </div>
357
         </div>
358
+      </div>
336
     </div>
359
     </div>
337
-  </div>
338
 
360
 
339
-</div></template>
361
+  </div>
362
+</template>
363
+<style  scoped>
364
+.title-line {
365
+  font-size: 24rpx;
366
+  /* 字体大小 */
367
+  color: #333;
368
+  line-height: 56rpx;
369
+  margin-right: 80rpx;
370
+}
371
+</style> 

+ 104 - 28
src/pages/order/components/OrderObligationItem.vue

@@ -1,16 +1,16 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
 import FPrice from "~/components/FPrice/FPrice.vue";
2
 import FPrice from "~/components/FPrice/FPrice.vue";
3
-import {OrderListModel} from "~/apis/model/order.model";
4
-import {cancelOrder, takeOrder} from "~/apis/order.api";
5
-import {encodeBase64} from "~/utils/http/helper";
6
-import {deleteAddress} from "~/apis/user";
3
+import { OrderListModel } from "~/apis/model/order.model";
4
+import { cancelOrder, takeOrder } from "~/apis/order.api";
5
+import { encodeBase64 } from "~/utils/http/helper";
6
+import { deleteAddress } from "~/apis/user";
7
 import {
7
 import {
8
   DyProductModel,
8
   DyProductModel,
9
   JdProductModel,
9
   JdProductModel,
10
   SuNingProductModel,
10
   SuNingProductModel,
11
   TaobaoProductThirdPartyWaresModel, VipProductModel
11
   TaobaoProductThirdPartyWaresModel, VipProductModel
12
 } from "~/apis/model/product.model";
12
 } from "~/apis/model/product.model";
13
-import {DcProductModel} from "~/apis/model/dacang.model";
13
+import { DcProductModel } from "~/apis/model/dacang.model";
14
 const props = defineProps({
14
 const props = defineProps({
15
   orderItem: {
15
   orderItem: {
16
     type: Object,
16
     type: Object,
@@ -24,6 +24,9 @@ const props = defineProps({
24
   }
24
   }
25
 })
25
 })
26
 
26
 
27
+
28
+
29
+
27
 // function detailOrderList(p) {}
30
 // function detailOrderList(p) {}
28
 // const dealOrderList =computed(() => {
31
 // const dealOrderList =computed(() => {
29
 //   if (props.orderItem) {
32
 //   if (props.orderItem) {
@@ -63,8 +66,11 @@ function getStatusText(orderItem: OrderListModel) {
63
   if (orderItem.status == 4) {
66
   if (orderItem.status == 4) {
64
     return '已申请退款'
67
     return '已申请退款'
65
   }
68
   }
66
-  if (orderItem.status == 5) {
67
-    return '未支付'
69
+  if (orderItem.status === 5) {
70
+    return '待付款'
71
+  }
72
+  if (orderItem.status === '5') {
73
+    return '已取消'
68
   }
74
   }
69
 }
75
 }
70
 
76
 
@@ -78,19 +84,34 @@ function handleHeaderClick() {
78
  * 取消订单
84
  * 取消订单
79
  */
85
  */
80
 function handleCancelOrder() {
86
 function handleCancelOrder() {
81
-  console.log('取消订单操作')
82
-  cancelOrder(props.orderItem.group_order_id).then(res => {
83
-    setTimeout(() => {
84
-      uni.showToast({
85
-        title: '取消成功',
86
-        icon: 'none'
87
-      })
88
-
89
-      uni.$emit('orderCancelFromList')
90
-      
91
-    }, 300)
92
-
93
-  })
87
+  uni.showModal({
88
+    title: '取消订单',
89
+    content: '您确定要取消订单吗?',
90
+    confirmColor: '#FE0032',
91
+    success: function (modalRes) {
92
+      if (modalRes.confirm) {
93
+        console.log('用户点击确定', props.orderItem.group_order_id);
94
+        cancelOrder(props.orderItem.group_order_id)
95
+          .then(res => {
96
+            uni.showToast({
97
+              title: '取消成功',
98
+              icon: 'none'
99
+            });
100
+            // 如果需要刷新订单列表,可以触发事件
101
+            // if (props.tabValue)
102
+            uni.$emit('orderCancelFromList', props.tabValue);
103
+          })
104
+          .catch(error => {
105
+            uni.showToast({
106
+              title: error, // 或者使用 error 信息
107
+              icon: 'none'
108
+            });
109
+          });
110
+      } else if (modalRes.cancel) {
111
+        console.log('用户点击取消', props.orderItem.group_order_id);
112
+      }
113
+    }
114
+  });
94
 }
115
 }
95
 
116
 
96
 function handlePayment() {
117
 function handlePayment() {
@@ -156,7 +177,7 @@ function handleComment(orderItem) {
156
 }
177
 }
157
 
178
 
158
 function handleProductItemClick(
179
 function handleProductItemClick(
159
-    item
180
+  item
160
 ) {
181
 ) {
161
   // function navigateToDetail(params) {
182
   // function navigateToDetail(params) {
162
   //   let otherDetailUrl = `/pages/store/product/other`
183
   //   let otherDetailUrl = `/pages/store/product/other`
@@ -184,13 +205,56 @@ function handleShowObligationOrderDetail(orderItem) {
184
     url: '/pages/order/obligation-detail?detail=' + `${encodeBase64(orderItem)}&type=1`
205
     url: '/pages/order/obligation-detail?detail=' + `${encodeBase64(orderItem)}&type=1`
185
   })
206
   })
186
 }
207
 }
208
+
209
+
210
+
211
+// const remainingTime: any = ref({
212
+//   hours: 0,
213
+//   minutes: 0,
214
+//   seconds: 0
215
+// })
216
+// //计算取消时间
217
+// function updateRemainingTime(detail: any) {
218
+//   const currentTime = new Date().getTime();
219
+//   const endTime = new Date(detail.close_time).getTime();
220
+//   const timeDifference = endTime - currentTime;
221
+
222
+//   // 计算剩余时间
223
+//   const hours = Math.floor(timeDifference / (1000 * 60 * 60));
224
+//   const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
225
+//   const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
226
+
227
+//   // 更新数据
228
+//   remainingTime.value = {
229
+//     hours: hours < 10 ? '0' + hours : hours,
230
+//     minutes: minutes < 10 ? '0' + minutes : minutes,
231
+//     seconds: seconds < 10 ? '0' + seconds : seconds
232
+//   }
233
+// }
234
+
235
+
236
+// // 每秒更新剩余时间
237
+// const timer = setInterval(() => {
238
+//   if (remainingTime.hours <= 0 && remainingTime.minutes <= 0) {
239
+//     // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
240
+//     clearInterval(timer);
241
+//     console.log('自动关闭');
242
+//   }
243
+//   updateRemainingTime(props.orderItem)
244
+// }, 1000);
245
+
246
+// onUnload(() => {
247
+//   clearInterval(timer);
248
+//   console.log('卸载关闭');
249
+// })
250
+
251
+
252
+
187
 </script>
253
 </script>
188
 
254
 
189
 <template>
255
 <template>
190
   <div class="mb-3 bg-white rounded p-3">
256
   <div class="mb-3 bg-white rounded p-3">
191
-    <div
192
-        @click.stop="handleHeaderClick"
193
-        class="flex items-center justify-between f-hairline-bottom pb-3">
257
+    <div @click.stop="handleHeaderClick" class="flex items-center justify-between f-hairline-bottom pb-3">
194
       <div class="flex items-center font-bold gap-2 text-sm justify-between">
258
       <div class="flex items-center font-bold gap-2 text-sm justify-between">
195
         <div class="flex-1 flex items-center gap-2">
259
         <div class="flex-1 flex items-center gap-2">
196
           <image :src="orderItem.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
260
           <image :src="orderItem.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
@@ -214,7 +278,7 @@ function handleShowObligationOrderDetail(orderItem) {
214
               <div class="flex-1 flex gap-2">
278
               <div class="flex-1 flex gap-2">
215
                 <div class="flex w-20 h-20">
279
                 <div class="flex w-20 h-20">
216
 
280
 
217
-                <image :src="orderProduct.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
281
+                  <image :src="orderProduct.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
218
                 </div>
282
                 </div>
219
                 <div class="flex flex-col">
283
                 <div class="flex flex-col">
220
                   <div class="line-clamp-2 text-[12px]">
284
                   <div class="line-clamp-2 text-[12px]">
@@ -236,7 +300,11 @@ function handleShowObligationOrderDetail(orderItem) {
236
           </div>
300
           </div>
237
         </div>
301
         </div>
238
         <div class="flex justify-end gap-2">
302
         <div class="flex justify-end gap-2">
239
-          <nut-button size="small" type="default" @tap.stop="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
303
+          <!-- <div class="title-line">{{ remainingTime.hours }}:{{ remainingTime.minutes }}:{{ remainingTime.seconds }}后订单将关闭
304
+          </div> -->
305
+          <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
306
+            <div class="text-black">取消订单</div>
307
+          </nut-button>
240
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
308
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
241
 
309
 
242
         </div>
310
         </div>
@@ -245,6 +313,14 @@ function handleShowObligationOrderDetail(orderItem) {
245
     </div>
313
     </div>
246
 
314
 
247
   </div>
315
   </div>
248
-
249
-
250
 </template>
316
 </template>
317
+
318
+<style scoped>
319
+.title-line {
320
+  font-size: 24rpx;
321
+  /* 字体大小 */
322
+  color: #333;
323
+  line-height: 56rpx;
324
+  margin-right: 80rpx;
325
+}
326
+</style>

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

@@ -78,7 +78,7 @@ const getStatusVal = () => {
78
   }
78
   }
79
 }
79
 }
80
 onLoad(options => {
80
 onLoad(options => {
81
-  console.log(options)
81
+  console.log('我是options》》',options)
82
   if (options && options.tabIndex) {
82
   if (options && options.tabIndex) {
83
     state.tabvalue = options.tabIndex
83
     state.tabvalue = options.tabIndex
84
   }
84
   }

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

@@ -196,7 +196,7 @@ function handleMakePhoneCall() {
196
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3">
196
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3">
197
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
197
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
198
         <div>
198
         <div>
199
-          大家都在买
199
+          精品推荐
200
         </div>
200
         </div>
201
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
201
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
202
       </div>
202
       </div>

Разница между файлами не показана из-за своего большого размера
+ 172 - 109
src/pages/order/obligation-detail.vue


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

@@ -569,7 +569,7 @@ function handleNumberChange(num, goodItem) {
569
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
569
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
570
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
570
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
571
         <div>
571
         <div>
572
-          猜你喜欢
572
+      精品推荐
573
         </div>
573
         </div>
574
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
574
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
575
       </div>
575
       </div>

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

@@ -439,7 +439,7 @@ function handleNumberChange(num, goodItem) {
439
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
439
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
440
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
440
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
441
         <div>
441
         <div>
442
-          猜你喜欢
442
+          精品推荐
443
         </div>
443
         </div>
444
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
444
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
445
       </div>
445
       </div>

+ 46 - 19
src/pages/order_addcart/index.vue

@@ -86,7 +86,6 @@ function handleCreateShopping() {
86
     //     })
86
     //     })
87
     //   } else {
87
     //   } else {
88
     //     uni.$emit('cart-reload')
88
     //     uni.$emit('cart-reload')
89
-
90
     //     uni.showToast({
89
     //     uni.showToast({
91
     //       title: '添加购物车成功',
90
     //       title: '添加购物车成功',
92
     //       icon: 'none'
91
     //       icon: 'none'
@@ -126,17 +125,19 @@ function handleCountChange(val) {
126
 let Scroll_X = ref(0)
125
 let Scroll_X = ref(0)
127
 
126
 
128
 const shopping = ref<ShoppingResult>()
127
 const shopping = ref<ShoppingResult>()
129
-
130
 onBeforeMount(() => {
128
 onBeforeMount(() => {
129
+  userStore.setRedirectPage(`/pages/order_addcart/index`, 'tab')
130
+})
131
+onLoad((options) => {
132
+
131
   if (!userStore.uid) {
133
   if (!userStore.uid) {
132
-    return uni.navigateTo({
133
-      url: '/user/login/index'
134
+    return uni.redirectTo({
135
+      url: '/pages/user/login/index'
134
     })
136
     })
135
   }
137
   }
136
-})
137
-onLoad((options) => {
138
   uni.$on('cart-reload', () => {
138
   uni.$on('cart-reload', () => {
139
     // console.log('新商品添加...')
139
     // console.log('新商品添加...')
140
+    state.recommendList = []
140
     state.cart_id = []
141
     state.cart_id = []
141
     loadCartList()
142
     loadCartList()
142
   })
143
   })
@@ -155,6 +156,7 @@ onShow(() => {
155
     state.isManage = true
156
     state.isManage = true
156
   }
157
   }
157
   loadCartCount()
158
   loadCartCount()
159
+  loadCartList()
158
   loadList('reload')
160
   loadList('reload')
159
 })
161
 })
160
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
162
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
@@ -203,8 +205,21 @@ onReachBottom(() => {
203
 
205
 
204
 })
206
 })
205
 
207
 
208
+//监视用户变化
209
+// watch(() => userStore.uid, (newUid, oldUid) => {
210
+//   // 在这里处理 uid 变化的逻辑
211
+//   console.log('uid 变化了,新值:', newUid, '旧值:', oldUid);
212
+//   if (newUid != oldUid && newUid != null) {
213
+//     loadCartList()
214
+//   }
215
+
216
+//   // 你可以在这里执行其他操作,例如发起网络请求等
217
+// })
218
+
219
+
206
 // 加载购物车数据
220
 // 加载购物车数据
207
 function loadCartList() {
221
 function loadCartList() {
222
+
208
   uni.showLoading({
223
   uni.showLoading({
209
     title: '加载中',
224
     title: '加载中',
210
     icon: 'none'
225
     icon: 'none'
@@ -212,6 +227,8 @@ function loadCartList() {
212
   // state.totalCartCount = 0
227
   // state.totalCartCount = 0
213
   getCartList().then(res => {
228
   getCartList().then(res => {
214
     uni.hideLoading()
229
     uni.hideLoading()
230
+    console.log('我是初始化gwc数据', res);
231
+
215
     shopping.value = res
232
     shopping.value = res
216
 
233
 
217
     // console.log('shoping',res)
234
     // console.log('shoping',res)
@@ -563,6 +580,12 @@ function openTestLog(element) {
563
   })
580
   })
564
 }
581
 }
565
 
582
 
583
+//卸载
584
+onUnload(() => {
585
+  state.recommendList = []
586
+  state.cart_id = []
587
+})
588
+
566
 </script>
589
 </script>
567
 <template>
590
 <template>
568
   <div class="">
591
   <div class="">
@@ -582,9 +605,9 @@ function openTestLog(element) {
582
         暂无商品,去添加喜欢的商品
605
         暂无商品,去添加喜欢的商品
583
       </div>
606
       </div>
584
     </div>
607
     </div>
585
-    <div v-else class="mt-10">
608
+    <div v-else class="mt-10 pb-10 ">
586
 
609
 
587
-      <div v-if="shopping && shopping.list" class="flex flex-col gap-4 p-3">
610
+      <div v-if="shopping && shopping.list" class="flex flex-col gap-4 px-3 pt-3 pb-8 ">
588
         <div v-for="(shopItem, index) in shopping.list" :key="index" class="bg-white rounded-lg  ">
611
         <div v-for="(shopItem, index) in shopping.list" :key="index" class="bg-white rounded-lg  ">
589
           <div class="f-hairline-bottom flex  items-center font-bold p-3">
612
           <div class="f-hairline-bottom flex  items-center font-bold p-3">
590
             <div @tap.stop="handleShopTitleClick(shopItem)">
613
             <div @tap.stop="handleShopTitleClick(shopItem)">
@@ -639,7 +662,7 @@ function openTestLog(element) {
639
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
662
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
640
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
663
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
641
         <div>
664
         <div>
642
-          猜你喜欢
665
+          精品推荐
643
         </div>
666
         </div>
644
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
667
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
645
       </div>
668
       </div>
@@ -698,28 +721,32 @@ page {
698
   border-radius: 10px;
721
   border-radius: 10px;
699
   height: 38rpx;
722
   height: 38rpx;
700
   line-height: 38rpx;
723
   line-height: 38rpx;
701
-  font-size: 28rpx;
702
-  color: #666666;
724
+  font-size: 24rpx;
725
+  color: #919191;
703
   display: flex;
726
   display: flex;
704
 }
727
 }
705
 
728
 
706
 .m-live {
729
 .m-live {
707
   max-width: 350rpx;
730
   max-width: 350rpx;
708
-  margin-left: 4rpx;
731
+  margin-left: 8rpx;
709
   margin-right: 4rpx;
732
   margin-right: 4rpx;
710
-  overflow: hidden; /* 溢出内容隐藏 */
711
-  white-space: nowrap; /* 不换行 */
712
-  text-overflow: ellipsis; /* 超出部分显示省略号 */
733
+  overflow: hidden;
734
+  /* 溢出内容隐藏 */
735
+  white-space: nowrap;
736
+  /* 不换行 */
737
+  text-overflow: ellipsis;
738
+  /* 超出部分显示省略号 */
713
 }
739
 }
714
 
740
 
715
 .m-lift {
741
 .m-lift {
716
-  margin-left: 4rpx;
717
-  margin-right: 4rpx;
742
+  margin-left: 8rpx;
743
+  margin-right: 8rpx;
718
 }
744
 }
719
 
745
 
720
 .thumbnail_1 {
746
 .thumbnail_1 {
721
-  width: 24rpx;
722
-  height: 14rpx;
747
+  width: 12rpx;
748
+  height: 7rpx;
749
+  margin-bottom: 6rpx;
723
 }
750
 }
724
 </style>
751
 </style>
725
 <route lang="yaml">
752
 <route lang="yaml">

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

@@ -27,7 +27,7 @@
27
 
27
 
28
 
28
 
29
     <div class="fixed bottom-0 pb-safe  w-full">
29
     <div class="fixed bottom-0 pb-safe  w-full">
30
-      <div class="px-3">
30
+      <div class="p-4">
31
         <nut-button block type="primary" @click="handleConfirm">立即支付</nut-button>
31
         <nut-button block type="primary" @click="handleConfirm">立即支付</nut-button>
32
       </div>
32
       </div>
33
 
33
 

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

@@ -10,6 +10,8 @@ const userYangLaoJin = ref({})
10
 
10
 
11
 onLoad(() => {
11
 onLoad(() => {
12
   getUserYangLaoJin().then(res => {
12
   getUserYangLaoJin().then(res => {
13
+    console.log('养老保险',res);
14
+    
13
     userYangLaoJin.value = res
15
     userYangLaoJin.value = res
14
   })
16
   })
15
 })
17
 })

+ 79 - 75
src/pages/product/dingshenglianmeng.vue

@@ -1,32 +1,23 @@
1
 <template>
1
 <template>
2
   <CXBBasePage>
2
   <CXBBasePage>
3
     <scroll-view>
3
     <scroll-view>
4
-		<div class="h-45">
5
-		  <swiper
6
-		      v-if="state.banners"
7
-		      :indicator-dots="state.indicatorDots"
8
-		      indicator-active-color="#e93323"
9
-		      :autoplay="state.autoplay"
10
-		      :circular="state.circular"
11
-		      :interval="state.interval"
12
-		      :duration="state.duration"
13
-		      class=" h-full"
14
-		  >
15
-		    <swiper-item v-for="(item, index) in state.banners" :key="index">
16
-		      <image :src="item.pic" class="!w-full !h-full" mode="aspectFill"/>
17
-		    </swiper-item>
18
-		  </swiper>
19
-		</div>
4
+      <div class="h-45">
5
+        <swiper v-if="state.banners" :indicator-dots="state.indicatorDots" indicator-active-color="#e93323"
6
+          :autoplay="state.autoplay" :circular="state.circular" :interval="state.interval" :duration="state.duration"
7
+          class=" h-full">
8
+          <swiper-item v-for="(item, index) in state.banners" :key="index">
9
+            <image :src="item.pic" class="!w-full !h-full" mode="aspectFill" />
10
+          </swiper-item>
11
+        </swiper>
12
+      </div>
20
       <div class="p-3">
13
       <div class="p-3">
14
+        <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
21
         <div>
15
         <div>
22
-          <grid-view type="masonry" cross-axis-count="2" 	cross-axis-gap="10px" main-axis-gap="10px">
23
-            <div v-for="(item, index) in list"
24
-                 @tap="handleItemClick(item)"
25
-                 :key="index"
26
-            >
16
+          <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
17
+            <div v-for="(item, index) in list" @tap="handleItemClick(item)" :key="index">
27
 
18
 
28
               <div class="bg-white rounded-lg">
19
               <div class="bg-white rounded-lg">
29
-                <image :src="item.image" mode="widthFix" 	:fade-in="true" class="rounded-t-lg  !w-full aspect-square" />
20
+                <image :src="item.image" mode="widthFix" :fade-in="true" class="rounded-t-lg  !w-full aspect-square" />
30
                 <div class="text-sm p-2 flex flex-col gap-2">
21
                 <div class="text-sm p-2 flex flex-col gap-2">
31
                   <div class="line-clamp-2">
22
                   <div class="line-clamp-2">
32
                     {{ item.store_name }}
23
                     {{ item.store_name }}
@@ -37,7 +28,7 @@
37
                   </div>
28
                   </div>
38
                   <div class="line-through text-xs font-bold text-gray-400 flex ">
29
                   <div class="line-through text-xs font-bold text-gray-400 flex ">
39
                     <div>
30
                     <div>
40
-                      ¥ {{item.ot_price}}
31
+                      ¥ {{ item.ot_price }}
41
                     </div>
32
                     </div>
42
                   </div>
33
                   </div>
43
                 </div>
34
                 </div>
@@ -52,15 +43,15 @@
52
 
43
 
53
 <script setup lang="ts">
44
 <script setup lang="ts">
54
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
45
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
55
-import {getTypeProductList} from "~/apis/merchant";
56
-import {getHomeBanner} from "~/apis/common";
57
-
46
+import { getTypeProductList } from "~/apis/merchant";
47
+import { getHomeBanner } from "~/apis/common";
48
+import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
58
 const state = reactive({
49
 const state = reactive({
59
   currentPage: 1,
50
   currentPage: 1,
60
   pageSize: 10,
51
   pageSize: 10,
61
   totalPage: 1,
52
   totalPage: 1,
62
   banners: [],
53
   banners: [],
63
-  keyword: '' ,
54
+  keyword: '',
64
   status: 'noMore',
55
   status: 'noMore',
65
   indicatorDots: true,
56
   indicatorDots: true,
66
   circular: true,
57
   circular: true,
@@ -68,61 +59,61 @@ const state = reactive({
68
   interval: 5000,
59
   interval: 5000,
69
   duration: 500,
60
   duration: 500,
70
   currents: "0",
61
   currents: "0",
71
-  title:'',
72
-  type:'',
62
+  title: '',
63
+  type: '',
73
 })
64
 })
74
-const list = ref()
65
+const list = ref([])
75
 
66
 
76
 function handleItemClick(item) {
67
 function handleItemClick(item) {
77
   uni.navigateTo({
68
   uni.navigateTo({
78
-    url: `/pages/store/product/detail?id=`+item.product_id
69
+    url: `/pages/store/product/detail?id=` + item.product_id
79
   })
70
   })
80
 }
71
 }
81
 
72
 
82
 onLoad((option) => {
73
 onLoad((option) => {
83
-	state.type=option.type;	//获取url参数
84
-	if(state.type=='jingpin'){
85
-		state.title='精品大仓'
86
-	}else if(state.type=='dingsheng'){
87
-		state.title='鼎盛联盟'
88
-	}
89
-
90
-
91
-	getHomeBanner(state.type+"_banner").then(res => {
92
-		state.banners = res
93
-	})
94
-	loadList('reload')
95
-	
74
+  state.type = option.type;	//获取url参数
75
+  if (state.type == 'jingpin') {
76
+    state.title = '精品商城'
77
+  } else if (state.type == 'dingsheng') {
78
+    state.title = '鼎盛联盟'
79
+  } 
80
+
81
+
82
+  getHomeBanner(state.type + "_banner").then(res => {
83
+    state.banners = res
84
+  })
85
+  loadList('reload')
86
+
96
 })
87
 })
97
 
88
 
98
 
89
 
99
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
90
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
100
-	if (action === 'reload') {
101
-	  state.currentPage = 1
102
-	}
103
-	
104
-	const params = {
105
-		type :state.type,
106
-		page: state.currentPage,
107
-		limit: state.pageSize
108
-	}
109
-	getTypeProductList({
110
-		...params
111
-	}).then(res => {
112
-		if (res) {
113
-			if (action === 'reload') {
114
-				list.value = res.list
115
-			}else if (action === 'page') {
116
-			  list.value = list.value.concat(res.list)
117
-			}
118
-			state.totalPage = Math.ceil(res.count / state.pageSize);
119
-			state.status = 'more'
120
-			
121
-			if (callback) {
122
-			      callback(res.list)
123
-			}
124
-		}
125
-	})
91
+  if (action === 'reload') {
92
+    state.currentPage = 1
93
+  }
94
+
95
+  const params = {
96
+    type: state.type,
97
+    page: state.currentPage,
98
+    limit: state.pageSize
99
+  }
100
+  getTypeProductList({
101
+    ...params
102
+  }).then(res => {
103
+    if (res) {
104
+      if (action === 'reload') {
105
+        list.value = res.list
106
+      } else if (action === 'page') {
107
+        list.value = list.value.concat(res.list)
108
+      }
109
+      state.totalPage = Math.ceil(res.count / state.pageSize);
110
+      state.status = 'more'
111
+
112
+      if (callback) {
113
+        callback(res.list)
114
+      }
115
+    }
116
+  })
126
 }
117
 }
127
 
118
 
128
 
119
 
@@ -149,20 +140,33 @@ onReachBottom(() => {
149
 })
140
 })
150
 
141
 
151
 onPullDownRefresh(() => {
142
 onPullDownRefresh(() => {
152
-  loadList('reload', function() {
143
+  loadList('reload', function () {
153
     setTimeout(() => {
144
     setTimeout(() => {
154
       uni.stopPullDownRefresh()
145
       uni.stopPullDownRefresh()
155
     }, 300)
146
     }, 300)
156
   })
147
   })
157
 })
148
 })
158
 
149
 
159
-onShow(() =>{
160
-    uni.setNavigationBarTitle({
161
-      title: state.title // 设置新的导航栏标题
162
-    });
150
+onShow(() => {
151
+  uni.setNavigationBarTitle({
152
+    title: state.title // 设置新的导航栏标题
153
+  });
163
 })
154
 })
164
 
155
 
165
 
156
 
157
+// 距离顶部距离
158
+let Scroll_X = ref(0)
159
+const headerClass = ref('')
160
+onPageScroll((page) => {
161
+  Scroll_X.value = Number(page.scrollTop.toFixed())
162
+  // page.scrollTop
163
+  if (page.scrollTop >= 76) {
164
+    headerClass.value = '!bg-primary !text-white'
165
+  } else {
166
+    headerClass.value = ''
167
+  }
168
+})
169
+
166
 </script>
170
 </script>
167
 
171
 
168
 <route lang="yaml">
172
 <route lang="yaml">

+ 2 - 2
src/pages/real-name-authentication/index.vue

@@ -263,7 +263,7 @@ function formatName (str) {
263
           <image  v-if="formData.card_positive && !state.isCertified"
263
           <image  v-if="formData.card_positive && !state.isCertified"
264
                   :src="formData.card_positive"
264
                   :src="formData.card_positive"
265
                   @tap="handleUploadImg('positive')"
265
                   @tap="handleUploadImg('positive')"
266
-                  mode="aspectFit" class="w-60 h-40"></image>
266
+                  mode="scaleToFill" class="w-60 h-40"></image>
267
           <image v-else
267
           <image v-else
268
                  :src="front_220714Image"
268
                  :src="front_220714Image"
269
                  @tap="handleUploadImg('positive')"
269
                  @tap="handleUploadImg('positive')"
@@ -279,7 +279,7 @@ function formatName (str) {
279
           <image  v-if="formData.card_reverse && !state.isCertified"
279
           <image  v-if="formData.card_reverse && !state.isCertified"
280
                   :src="formData.card_reverse"
280
                   :src="formData.card_reverse"
281
                   @tap="handleUploadImg('reverse')"
281
                   @tap="handleUploadImg('reverse')"
282
-                  mode="widthFix" class="w-60"></image>
282
+                  mode="scaleToFill" class="w-60 h-40 "></image>
283
           <image v-else
283
           <image v-else
284
                  :src="verso_220714Image"
284
                  :src="verso_220714Image"
285
                  @tap="handleUploadImg('reverse')"
285
                  @tap="handleUploadImg('reverse')"

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

@@ -64,7 +64,7 @@ function onOk() {
64
     </div>
64
     </div>
65
 
65
 
66
     <div class="fixed bottom-0 pb-safe w-full">
66
     <div class="fixed bottom-0 pb-safe w-full">
67
-      <div class="px-10 ">
67
+      <div class="px-10 py-4 ">
68
         <div
68
         <div
69
             @tap="handleLogout"
69
             @tap="handleLogout"
70
             class="text-center text-white bg-primary rounded-full text-sm p-2"
70
             class="text-center text-white bg-primary rounded-full text-sm p-2"

+ 5 - 2
src/pages/store/home/components/MerchantProductCard.vue

@@ -57,15 +57,18 @@ const is148Merchant = computed(() => {
57
       <div class="line-clamp-2">
57
       <div class="line-clamp-2">
58
         {{item.store_name}}
58
         {{item.store_name}}
59
       </div>
59
       </div>
60
-      <div v-if="!is148Merchant" class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
60
+      <div v-if="item.type!=15" >
61
+        <div v-if="!is148Merchant" class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
61
         <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
62
         <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
62
                mode="widthFix" class="!w-8.5"></image>
63
                mode="widthFix" class="!w-8.5"></image>
63
-        <div class="px-2 flex items-center jusitify-center text-xs">
64
+        <div class="px-2 flex items-center jusitify-center text-xs"  >
64
           <div>
65
           <div>
65
             养老金 ¥{{item.yanglao || item.yanglao_price}}
66
             养老金 ¥{{item.yanglao || item.yanglao_price}}
66
           </div>
67
           </div>
67
         </div>
68
         </div>
68
       </div>
69
       </div>
70
+      </div>
71
+      
69
       <div class="flex flex-row items-center gap-2">
72
       <div class="flex flex-row items-center gap-2">
70
         <div v-if="is148Merchant && item.price" class="flex justify-end items-end gap-2 text-[#FE0032]">
73
         <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>
74
           <div class="!text-[24px]">{{ Number.parseFloat(item.price * 30).toFixed(2) }} </div>

+ 173 - 46
src/pages/store/product/detail.vue

@@ -62,6 +62,10 @@ const state = reactive({
62
   cartNum: 1,
62
   cartNum: 1,
63
   cartCount: NaN,
63
   cartCount: NaN,
64
   shareImage: '',
64
   shareImage: '',
65
+  status: '', //加载状态
66
+  currentPage: 1,
67
+  pageSize: 10,
68
+  totalPage: 0
65
 })
69
 })
66
 const detail: any = ref(null)
70
 const detail: any = ref(null)
67
 const isTo = ref(3)
71
 const isTo = ref(3)
@@ -94,9 +98,29 @@ uni.showShareMenu({
94
   withShareTicket: true,
98
   withShareTicket: true,
95
   menus: ['shareAppMessage', 'shareTimeline']
99
   menus: ['shareAppMessage', 'shareTimeline']
96
 })
100
 })
101
+
97
 onLoad((option: any) => {
102
 onLoad((option: any) => {
98
-  console.log("我是商品详情页");
103
+  // console.log("我是商品详情页");
104
+  //二维码扫码传id/shareid
105
+  if (option.scene) {
106
+    let queryString = decodeURIComponent(option.scene)
107
+    // 将字符串按 '&' 分割成数组
108
+    const paramsArray = queryString.split('&');
109
+    for (const param of paramsArray) {
110
+      if (param.includes('id=')) {
111
+        // 使用 split('=') 获取参数值
112
+        option.id = param.split('=')[1];
113
+        break;
114
+      }
115
+      if (param.includes('shareID=')) {
116
+        // 使用 split('=') 获取参数值
117
+        option.shareID = param.split('=')[1];
118
+        break;
119
+      }
99
 
120
 
121
+    }
122
+
123
+  }
100
   uni.showLoading({
124
   uni.showLoading({
101
     title: '数据加载中',
125
     title: '数据加载中',
102
     icon: 'none'
126
     icon: 'none'
@@ -116,13 +140,6 @@ onLoad((option: any) => {
116
 
140
 
117
   }
141
   }
118
 
142
 
119
-  // }
120
-  getRecommendList({
121
-    page: 1,
122
-    limit: 10
123
-  }).then(res => {
124
-    state.recommendList = res.list
125
-  })
126
 
143
 
127
   getShareId({ pid: state.id, type: 1 }).then(res => {
144
   getShareId({ pid: state.id, type: 1 }).then(res => {
128
     state.shareId = res.share_id
145
     state.shareId = res.share_id
@@ -142,7 +159,7 @@ function loadProductDetail() {
142
     if (res.status === 200) {
159
     if (res.status === 200) {
143
       detail.value = res.data
160
       detail.value = res.data
144
       console.log('我是detail', detail.value);
161
       console.log('我是detail', detail.value);
145
-
162
+      loadList('reload')
146
       state.shareImage = detail.value.image
163
       state.shareImage = detail.value.image
147
       if (res && res.mer_id && res.mer_id === '148') {
164
       if (res && res.mer_id && res.mer_id === '148') {
148
         if (detail.value && detail.value.price) {
165
         if (detail.value && detail.value.price) {
@@ -158,12 +175,10 @@ function loadProductDetail() {
158
           console.info(res)
175
           console.info(res)
159
         })
176
         })
160
       }
177
       }
161
-
162
-      // if (detail.value.mer_id === '148') {
163
-      // }
164
       uni.hideLoading()
178
       uni.hideLoading()
165
     } else {
179
     } else {
166
       isShow.value = true
180
       isShow.value = true
181
+      loadList('reload')
167
       uni.setNavigationBarTitle({
182
       uni.setNavigationBarTitle({
168
         title: '商品下架不存在'
183
         title: '商品下架不存在'
169
       })
184
       })
@@ -258,6 +273,55 @@ function loadCartCount() {
258
     }
273
     }
259
   })
274
   })
260
 }
275
 }
276
+
277
+//列表加载
278
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
279
+  const params = {
280
+    page: state.currentPage,
281
+    limit: state.pageSize
282
+  }
283
+
284
+  if (action === 'reload') {
285
+    params.page = 1
286
+  }
287
+
288
+  getRecommendList({
289
+    ...params
290
+  }).then(res => {
291
+    if (action === 'page') {
292
+      state.recommendList = state.recommendList.concat(res.list)
293
+    }
294
+    if (action === 'reload') {
295
+      // state.list = state.list.concat(res.list)
296
+      state.recommendList = res.list
297
+    }
298
+    state.totalPage = Math.ceil(res.count / state.pageSize);
299
+    state.status = 'more'
300
+    if (callback) {
301
+      callback(res.list)
302
+    }
303
+  })
304
+}
305
+
306
+function handleScrollToLower() {
307
+  state.status = 'loading';
308
+  state.currentPage += 1;
309
+  // console.log(state.totalPage)
310
+  if (state.currentPage > state.totalPage) {
311
+    state.status = 'noMore';
312
+  } else {
313
+    setTimeout(() => {
314
+      loadList('page')
315
+    }, 300)
316
+  }
317
+}
318
+
319
+onReachBottom(() => {
320
+  handleScrollToLower()
321
+
322
+})
323
+
324
+
261
 // const skuData = computed(() => {
325
 // const skuData = computed(() => {
262
 //   const skuList = []
326
 //   const skuList = []
263
 //   if (detail.value && detail.sku) {
327
 //   if (detail.value && detail.sku) {
@@ -272,6 +336,7 @@ function loadCartCount() {
272
 //     }
336
 //     }
273
 //   }
337
 //   }
274
 // })
338
 // })
339
+
275
 const is148Merchant = computed(() => {
340
 const is148Merchant = computed(() => {
276
   return detail.value && detail.value.mer_id && detail.value.mer_id == '148'
341
   return detail.value && detail.value.mer_id && detail.value.mer_id == '148'
277
 })
342
 })
@@ -301,6 +366,8 @@ function handleShowShopCart() {
301
 }
366
 }
302
 
367
 
303
 function onSelectedSku(item: any) {
368
 function onSelectedSku(item: any) {
369
+  console.log('我是item', item);
370
+
304
   state.currentSku = item
371
   state.currentSku = item
305
 }
372
 }
306
 
373
 
@@ -311,6 +378,10 @@ function handleAddCart() {
311
 
378
 
312
 
379
 
313
 }
380
 }
381
+function handleSubQg() {
382
+  isTo.value = 4
383
+  state.isShowSku = false
384
+}
314
 
385
 
315
 function handleCreateShopping() {
386
 function handleCreateShopping() {
316
   // console.log(state.flag)
387
   // console.log(state.flag)
@@ -320,13 +391,13 @@ function handleCreateShopping() {
320
     // product_attr_unique: JSON.stringify(state.currentSku),
391
     // product_attr_unique: JSON.stringify(state.currentSku),
321
     product_attr_unique: state.currentSku.unique,
392
     product_attr_unique: state.currentSku.unique,
322
     cart_num: state.cartNum,
393
     cart_num: state.cartNum,
323
-    is_new: (state.flag === '1' || state.flag === '3') ? '1' : '0'
394
+    is_new: (state.flag === '1' || state.flag === '3'|| state.flag == '5') ? '1' : '0'
324
   }).then(res => {
395
   }).then(res => {
325
     console.log('resres', res)
396
     console.log('resres', res)
326
 
397
 
327
     if (res.cart_id) {
398
     if (res.cart_id) {
328
       // console.log(state.flag)
399
       // console.log(state.flag)
329
-      if (state.flag == '1' || state.flag == '3') {
400
+      if (state.flag == '1' || state.flag == '3' || state.flag == '5') {
330
         isTo.value = state.flag
401
         isTo.value = state.flag
331
         console.log(isTo.value)
402
         console.log(isTo.value)
332
         uni.navigateTo({
403
         uni.navigateTo({
@@ -370,15 +441,15 @@ function handleCreateShopping() {
370
     //       })
441
     //       })
371
     // }
442
     // }
372
     console.log('我是error>>>', error);
443
     console.log('我是error>>>', error);
373
-
444
+    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
374
     if (error === '请登录') {
445
     if (error === '请登录') {
375
       uni.showToast({
446
       uni.showToast({
376
         title: '请登录',
447
         title: '请登录',
377
         icon: 'none'
448
         icon: 'none'
378
       })
449
       })
379
       setTimeout(() => {
450
       setTimeout(() => {
380
-        uni.navigateTo({
381
-          url: '/pages/user/login/index'
451
+        uni.redirectTo({
452
+          url: '/pages/user/login/index?key=4'
382
         })
453
         })
383
       }, 500)
454
       }, 500)
384
     } else {
455
     } else {
@@ -424,15 +495,15 @@ function handleBuyshow() {
424
     //   })
495
     //   })
425
     // }
496
     // }
426
     console.log('我是error>>>', error);
497
     console.log('我是error>>>', error);
427
-
498
+    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
428
     if (error === '请登录') {
499
     if (error === '请登录') {
429
       uni.showToast({
500
       uni.showToast({
430
         title: '请登录',
501
         title: '请登录',
431
         icon: 'none'
502
         icon: 'none'
432
       })
503
       })
433
       setTimeout(() => {
504
       setTimeout(() => {
434
-        uni.navigateTo({
435
-          url: '/pages/user/login/index'
505
+        uni.redirectTo({
506
+          url: '/pages/user/login/index?key=4'
436
         })
507
         })
437
       }, 500)
508
       }, 500)
438
     } else {
509
     } else {
@@ -485,14 +556,16 @@ function handleAddshow() {
485
     //   })
556
     //   })
486
     // }
557
     // }
487
     console.log('我是error>>>', error);
558
     console.log('我是error>>>', error);
559
+    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
488
     if (error === '请登录') {
560
     if (error === '请登录') {
561
+
489
       uni.showToast({
562
       uni.showToast({
490
         title: '请登录',
563
         title: '请登录',
491
         icon: 'none'
564
         icon: 'none'
492
       })
565
       })
493
       setTimeout(() => {
566
       setTimeout(() => {
494
-        uni.navigateTo({
495
-          url: '/pages/user/login/index'
567
+        uni.redirectTo({
568
+          url: '/pages/user/login/index?key=4'
496
         })
569
         })
497
       }, 500)
570
       }, 500)
498
     } else {
571
     } else {
@@ -503,29 +576,46 @@ function handleAddshow() {
503
     }
576
     }
504
   })
577
   })
505
 }
578
 }
579
+
580
+//活动未开始
581
+function notStarted() {
582
+  setTimeout(() => {
583
+    uni.showToast({
584
+      title: '秒杀未开始',
585
+      icon: 'none'
586
+    })
587
+  }, 300)
588
+
589
+}
590
+
506
 // 规格显示双按钮
591
 // 规格显示双按钮
507
 function handleTwobtn() {
592
 function handleTwobtn() {
508
   isTo.value = 2
593
   isTo.value = 2
509
   state.isShowSku = !state.isShowSku
594
   state.isShowSku = !state.isShowSku
510
 }
595
 }
596
+function handleQgbtn() {
597
+  isTo.value = 4
598
+  state.isShowSku = !state.isShowSku
599
+}
511
 
600
 
512
 /**
601
 /**
513
  *
602
  *
514
  * @param flag //1表示立即购买;2表示加入购物车,3表示立即兑换
603
  * @param flag //1表示立即购买;2表示加入购物车,3表示立即兑换
515
  */
604
  */
516
-function handleOrderConfirm(flag: '1' | '2' | '3') {
605
+function handleOrderConfirm(flag: '1' | '2' | '3' | '5') {
517
   console.log('我是》》》》》》', userStore.uid);
606
   console.log('我是》》》》》》', userStore.uid);
518
 
607
 
519
   debounce(() => {
608
   debounce(() => {
609
+    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
520
     if (!userStore.uid) {
610
     if (!userStore.uid) {
521
       return uni.showToast({
611
       return uni.showToast({
522
         title: '请登录',
612
         title: '请登录',
523
         icon: 'none'
613
         icon: 'none'
524
       }).then(() => {
614
       }).then(() => {
525
         setTimeout(() => {
615
         setTimeout(() => {
526
-          return uni.navigateTo({
527
-            url: '/pages/user/login/index'
528
-          })
616
+          uni.redirectTo({
617
+          url: '/pages/user/login/index?key=4'
618
+        })
529
         }, 500)
619
         }, 500)
530
 
620
 
531
       })
621
       })
@@ -674,7 +764,7 @@ onPageScroll((page) => {
674
         <div class="flex flex-col">
764
         <div class="flex flex-col">
675
           <div class="flex gap-2 items-center text-white">
765
           <div class="flex gap-2 items-center text-white">
676
             <div class="text-[30px] font-bold">
766
             <div class="text-[30px] font-bold">
677
-              <text class="text-[20px]">¥</text>{{ detail.price }}
767
+              <text class="text-[20px]">¥</text>{{ detail.seckill_s == 0 ? detail.price : detail.dc_price }}
678
             </div>
768
             </div>
679
             <image :src="miaoshaIcon" mode="widthFix" class="w-10"></image>
769
             <image :src="miaoshaIcon" mode="widthFix" class="w-10"></image>
680
           </div>
770
           </div>
@@ -715,7 +805,7 @@ onPageScroll((page) => {
715
           </div>
805
           </div>
716
           <div v-else>
806
           <div v-else>
717
             <div v-if="detail.price">
807
             <div v-if="detail.price">
718
-              ¥ {{ detail.price }}
808
+              ¥ {{ detail.seckill_s == 0 ? detail.price : detail.dc_price }}
719
             </div>
809
             </div>
720
           </div>
810
           </div>
721
           <div v-if="!is148Merchant" class="line-through text-xs font-bold flex text-gray-600">
811
           <div v-if="!is148Merchant" class="line-through text-xs font-bold flex text-gray-600">
@@ -770,7 +860,17 @@ onPageScroll((page) => {
770
       </div>
860
       </div>
771
     </div>
861
     </div>
772
 
862
 
773
-    <FCell arrow @tap="handleTwobtn">
863
+    <FCell arrow @tap="handleQgbtn" v-if="detail.seckill_s != 0">
864
+      <template #title>
865
+        <div class="flex items-center" v-if="state.currentSku">
866
+          <div class="font-bold">规格:</div>
867
+
868
+          {{ state.currentSku.sku }}
869
+        </div>
870
+
871
+      </template>
872
+    </FCell>
873
+    <FCell arrow @tap="handleTwobtn" v-if="detail.seckill_s == 0">
774
       <template #title>
874
       <template #title>
775
         <div class="flex items-center" v-if="state.currentSku">
875
         <div class="flex items-center" v-if="state.currentSku">
776
           <div class="font-bold">规格:</div>
876
           <div class="font-bold">规格:</div>
@@ -788,8 +888,8 @@ onPageScroll((page) => {
788
 
888
 
789
     <!-- 店铺信息 -->
889
     <!-- 店铺信息 -->
790
     <div @tap="handleShowMerchant(detail.mer_id)" class="flex gap-3 p-3 bg-white">
890
     <div @tap="handleShowMerchant(detail.mer_id)" class="flex gap-3 p-3 bg-white">
791
-      <div v-if="detail && detail.merchant">
792
-        <image :src="detail.merchant.mer_avatar" mode="widthFix" class=" h-12 w-12"></image>
891
+      <div v-if="detail && detail.merchant" class=" h-12 w-12">
892
+        <image :src="detail.merchant.mer_avatar" mode="aspectFit" class="img_full"></image>
793
       </div>
893
       </div>
794
       <div class="flex flex-col gap-2 justify-center" v-if="detail && detail.merchant">
894
       <div class="flex flex-col gap-2 justify-center" v-if="detail && detail.merchant">
795
         <div class="flex text-xs items-center">
895
         <div class="flex text-xs items-center">
@@ -802,12 +902,12 @@ onPageScroll((page) => {
802
       </div>
902
       </div>
803
 
903
 
804
     </div>
904
     </div>
805
-    <div class="flex flex-col bg-white">
905
+    <div class="flex flex-col bg-white" v-if="detail.merchant.recommend.length>=3" >
806
       <div class="p-3">
906
       <div class="p-3">
807
         <div
907
         <div
808
           class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
908
           class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
809
           <div class="pl-2">
909
           <div class="pl-2">
810
-            为你推荐
910
+            店铺推荐
811
           </div>
911
           </div>
812
         </div>
912
         </div>
813
       </div>
913
       </div>
@@ -849,7 +949,7 @@ onPageScroll((page) => {
849
         <div
949
         <div
850
           class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
950
           class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
851
           <div class="pl-2">
951
           <div class="pl-2">
852
-            猜你喜欢
952
+            精品推荐
853
           </div>
953
           </div>
854
         </div>
954
         </div>
855
       </div>
955
       </div>
@@ -860,6 +960,14 @@ onPageScroll((page) => {
860
 
960
 
861
           </div>
961
           </div>
862
         </grid-view>
962
         </grid-view>
963
+        <div class=" flex justify-center items-center text-[12px] text-gray-500">
964
+          <div v-if="state.status === 'loading'">
965
+            加载中...
966
+          </div>
967
+          <div v-if="state.status === 'noMore'">
968
+            没有更多了~
969
+          </div>
970
+        </div>
863
       </div>
971
       </div>
864
 
972
 
865
     </div>
973
     </div>
@@ -883,17 +991,25 @@ onPageScroll((page) => {
883
         <div
991
         <div
884
           class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
992
           class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
885
           <div class="pl-2">
993
           <div class="pl-2">
886
-            猜你喜欢
994
+            精品推荐
887
           </div>
995
           </div>
888
         </div>
996
         </div>
889
       </div>
997
       </div>
890
-      <div class="pb-3 px-3" v-if="state.recommendList.length != 0">
998
+      <div class="pb-3 px-3" v-if="state.recommendList">
891
         <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
999
         <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
892
           <div v-for="(item, index) in state.recommendList" :key="index" @click="handleProductItemClick(item)">
1000
           <div v-for="(item, index) in state.recommendList" :key="index" @click="handleProductItemClick(item)">
893
             <MerchantProductCard :item="item" />
1001
             <MerchantProductCard :item="item" />
894
 
1002
 
895
           </div>
1003
           </div>
896
         </grid-view>
1004
         </grid-view>
1005
+        <div class=" flex justify-center items-center text-[12px] text-gray-500">
1006
+          <div v-if="state.status === 'loading'">
1007
+            加载中...
1008
+          </div>
1009
+          <div v-if="state.status === 'noMore'">
1010
+            没有更多了~
1011
+          </div>
1012
+        </div>
897
       </div>
1013
       </div>
898
 
1014
 
899
     </div>
1015
     </div>
@@ -926,7 +1042,7 @@ onPageScroll((page) => {
926
           <div class="text-[11px]">购物车</div>
1042
           <div class="text-[11px]">购物车</div>
927
         </div>
1043
         </div>
928
       </div>
1044
       </div>
929
-      <div class="flex flex-row text-sm text-white gap-2 pr-3">
1045
+      <div class="flex flex-row text-sm text-white gap-2 pr-3" v-if="detail.seckill_s == 0">
930
         <div @tap="handleAddCart" v-if="!is148Merchant"
1046
         <div @tap="handleAddCart" v-if="!is148Merchant"
931
           class="bg-[#FFA319] rounded-full w-25 flex justify-center items-center h-9">
1047
           class="bg-[#FFA319] rounded-full w-25 flex justify-center items-center h-9">
932
           加入购物车
1048
           加入购物车
@@ -936,17 +1052,23 @@ onPageScroll((page) => {
936
           <div v-else @click="handleOrderConfirm('1')">立即购买</div>
1052
           <div v-else @click="handleOrderConfirm('1')">立即购买</div>
937
         </div>
1053
         </div>
938
       </div>
1054
       </div>
939
-      <!-- <div class="flex flex-row text-sm text-white gap-2 pr-3">
940
-        <div class="bg-[#F94032] rounded-full w-25 flex justify-center items-center h-9">
941
-          <div @click="handleOrderConfirm('1')">立即抢购</div>
1055
+
1056
+      <div class="flex flex-row text-sm text-white gap-2 px-4" v-if="detail.seckill_s == 2">
1057
+        <div class="bg-[#F94032] rounded-full w-52 flex justify-center items-center h-9">
1058
+          <div @click="notStarted">立即抢购</div>
1059
+        </div>
1060
+      </div>
1061
+      <div class="flex flex-row text-sm text-white gap-2 px-4" v-if="detail.seckill_s == 1">
1062
+        <div class="bg-[#F94032] rounded-full w-52 flex justify-center items-center h-9">
1063
+          <div @click="handleOrderConfirm('5')">立即抢购</div>
942
         </div>
1064
         </div>
943
-      </div> -->
1065
+      </div>
944
     </div>
1066
     </div>
945
 
1067
 
946
 
1068
 
947
   </div>
1069
   </div>
948
 
1070
 
949
-  <CXBSkuPopup v-model:show="state.isShowSku" :detail="detail" @selected:item="onSelectedSku"
1071
+  <CXBSkuPopup v-model:show="state.isShowSku" :detail="detail" @selected:item="onSelectedSku" @subQg="handleSubQg"
950
     @submit="handleCreateShopping" @count-change="handleCountChange" @subBuy="handleBuyshow" @subAdd="handleAddshow"
1072
     @submit="handleCreateShopping" @count-change="handleCountChange" @subBuy="handleBuyshow" @subAdd="handleAddshow"
951
     :isTo="isTo" />
1073
     :isTo="isTo" />
952
   <!--  <nut-sku-->
1074
   <!--  <nut-sku-->
@@ -996,6 +1118,11 @@ page {
996
   background-color: #f8f8f8;
1118
   background-color: #f8f8f8;
997
 }
1119
 }
998
 
1120
 
1121
+.img_full {
1122
+  width: 100%;
1123
+  height: 100%;
1124
+}
1125
+
999
 button {
1126
 button {
1000
   margin: 0;
1127
   margin: 0;
1001
   padding: 0;
1128
   padding: 0;
@@ -1011,12 +1138,12 @@ button::after {
1011
 
1138
 
1012
 .box-out {
1139
 .box-out {
1013
   background: #f8f8f8;
1140
   background: #f8f8f8;
1014
-  height: 200px;
1141
+  height: 400rpx;
1015
 }
1142
 }
1016
 
1143
 
1017
 .flex-box {
1144
 .flex-box {
1018
   background: #ffffff;
1145
   background: #ffffff;
1019
-  box-shadow: 3px;
1146
+  box-shadow: 6rpx;
1020
   height: 80%;
1147
   height: 80%;
1021
   display: flex;
1148
   display: flex;
1022
   flex-direction: column;
1149
   flex-direction: column;
@@ -1030,8 +1157,8 @@ button::after {
1030
 
1157
 
1031
 .sold-out {
1158
 .sold-out {
1032
   display: block;
1159
   display: block;
1033
-  width: 120px;
1034
-  height: 120px;
1160
+  width: 240rpx;
1161
+  height: 240rpx;
1035
   margin: 0 auto;
1162
   margin: 0 auto;
1036
 }
1163
 }
1037
 
1164
 

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

@@ -29,7 +29,7 @@ import { debounce, merge } from "lodash-es";
29
 import { useDebounceFn } from '@vueuse/core';
29
 import { useDebounceFn } from '@vueuse/core';
30
 import dayjs from "dayjs";
30
 import dayjs from "dayjs";
31
 import { decodeBase64 } from "~/utils/http/helper";
31
 import { decodeBase64 } from "~/utils/http/helper";
32
-import { CDN_URL,CDM_URL } from "~/config/app";
32
+import { CDN_URL, CDM_URL } from "~/config/app";
33
 import { getRecommendList } from "~/apis/merchant";
33
 import { getRecommendList } from "~/apis/merchant";
34
 import type { DcProductModel } from "~/apis/model/dacang.model";
34
 import type { DcProductModel } from "~/apis/model/dacang.model";
35
 
35
 
@@ -37,7 +37,11 @@ const discount_coupon_bg_220804Image = CDN_URL + '/static/assets/discount_coupon
37
 const productId = ref('')
37
 const productId = ref('')
38
 //推荐商品列表
38
 //推荐商品列表
39
 let skuInfo = reactive({
39
 let skuInfo = reactive({
40
-  recommendList: []
40
+  recommendList: [],
41
+  totalPage: 0,
42
+  pageSize: 10,
43
+  status: '',
44
+  currentPage: 1
41
 })
45
 })
42
 
46
 
43
 const userStore = useUserStore()
47
 const userStore = useUserStore()
@@ -86,7 +90,7 @@ onShow(() => {
86
   isSubmit.value = false
90
   isSubmit.value = false
87
 })
91
 })
88
 
92
 
89
-//猜你喜欢
93
+//精品推荐
90
 function YouLike() {
94
 function YouLike() {
91
   getRecommendList({
95
   getRecommendList({
92
     page: 1,
96
     page: 1,
@@ -104,7 +108,7 @@ function soldOut() {
104
   uni.setNavigationBarTitle({
108
   uni.setNavigationBarTitle({
105
     title: '商品下架不存在'
109
     title: '商品下架不存在'
106
   })
110
   })
107
-  YouLike()
111
+  loadList('reload')
108
   uni.hideLoading()
112
   uni.hideLoading()
109
 }
113
 }
110
 
114
 
@@ -485,8 +489,8 @@ function handleProductItemClick(
485
 }
489
 }
486
 
490
 
487
 const outImg = computed(() => {
491
 const outImg = computed(() => {
488
-  if(isShow){
489
-    return  CDM_URL+'/image/2023-11-24/20231124182002679.png'
492
+  if (isShow) {
493
+    return CDM_URL + '/image/2023-11-24/20231124182002679.png'
490
   }
494
   }
491
 
495
 
492
 })
496
 })
@@ -506,6 +510,56 @@ onPageScroll((page) => {
506
     headerClass.value = ''
510
     headerClass.value = ''
507
   }
511
   }
508
 })
512
 })
513
+
514
+
515
+//列表加载
516
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
517
+  const params = {
518
+    page: skuInfo.currentPage,
519
+    limit: skuInfo.pageSize
520
+  }
521
+
522
+  if (action === 'reload') {
523
+    params.page = 1
524
+  }
525
+
526
+  getRecommendList({
527
+    ...params
528
+  }).then(res => {
529
+    if (action === 'page') {
530
+      skuInfo.recommendList = skuInfo.recommendList.concat(res.list)
531
+    }
532
+    if (action === 'reload') {
533
+      // state.list = state.list.concat(res.list)
534
+      skuInfo.recommendList = res.list
535
+    }
536
+    skuInfo.totalPage = Math.ceil(res.count / skuInfo.pageSize);
537
+    skuInfo.status = 'more'
538
+    if (callback) {
539
+      callback(res.list)
540
+    }
541
+  })
542
+}
543
+
544
+function handleScrollToLower() {
545
+  skuInfo.status = 'loading';
546
+  skuInfo.currentPage += 1;
547
+  // console.log(state.totalPage)
548
+  if (skuInfo.currentPage > skuInfo.totalPage) {
549
+    skuInfo.status = 'noMore';
550
+  } else {
551
+    setTimeout(() => {
552
+      loadList('page')
553
+    }, 300)
554
+  }
555
+}
556
+
557
+onReachBottom(() => {
558
+  handleScrollToLower()
559
+
560
+})
561
+
562
+
509
 </script>
563
 </script>
510
 <template>
564
 <template>
511
   <CXBBasePage>
565
   <CXBBasePage>
@@ -585,7 +639,7 @@ onPageScroll((page) => {
585
           <div
639
           <div
586
             class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
640
             class="before:content-[''] before:block before:absolute before:w-1 before:h-full before:bg-gradient-to-b from-red-500 to-red-600 before:rounded relative inline-block">
587
             <div class="pl-2">
641
             <div class="pl-2">
588
-              猜你喜欢
642
+              精品推荐
589
             </div>
643
             </div>
590
           </div>
644
           </div>
591
         </div>
645
         </div>
@@ -596,13 +650,20 @@ onPageScroll((page) => {
596
 
650
 
597
             </div>
651
             </div>
598
           </grid-view>
652
           </grid-view>
653
+          <div class=" flex justify-center items-center text-[12px] text-gray-500">
654
+            <div v-if="skuInfo.status === 'loading'">
655
+              加载中...
656
+            </div>
657
+            <div v-if="skuInfo.status === 'noMore'">
658
+              没有更多了~
659
+            </div>
660
+          </div>
599
         </div>
661
         </div>
600
 
662
 
601
       </div>
663
       </div>
602
     </div>
664
     </div>
603
-    
604
-  </CXBBasePage>
605
 
665
 
666
+  </CXBBasePage>
606
 </template>
667
 </template>
607
 <style scoped>
668
 <style scoped>
608
 .box-out {
669
 .box-out {

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

@@ -37,7 +37,7 @@
37
       <CXBEmpty text="您还没有收货地址" type="address" v-else/>
37
       <CXBEmpty text="您还没有收货地址" type="address" v-else/>
38
 
38
 
39
       <div class="fixed bottom-0 p-safe w-full bg-white ">
39
       <div class="fixed bottom-0 p-safe w-full bg-white ">
40
-        <div class="px-3">
40
+        <div class="p-3">
41
           <nut-button block type="primary" @click="handleCreateAddress">新建收货地址</nut-button>
41
           <nut-button block type="primary" @click="handleCreateAddress">新建收货地址</nut-button>
42
         </div>
42
         </div>
43
       </div>
43
       </div>

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

@@ -199,9 +199,7 @@ function handleService(item: {
199
   })
199
   })
200
 }
200
 }
201
 
201
 
202
-// onShow(async () => {
203
-// await userStore.getUserInfo()
204
-// })
202
+
205
 
203
 
206
 function encodePhone(phone: string) {
204
 function encodePhone(phone: string) {
207
   // let tel = '13600136000';
205
   // let tel = '13600136000';
@@ -467,7 +465,7 @@ function handleShowMyRulePage() {
467
               <div class="text-xs">养老金</div>
465
               <div class="text-xs">养老金</div>
468
             </div>
466
             </div>
469
             <div @tap="handleShowMyInvitation" class="w-1/3  flex flex-col justify-center items-center">
467
             <div @tap="handleShowMyInvitation" class="w-1/3  flex flex-col justify-center items-center">
470
-              <div>{{ agentInfo.brokerage_price ? agentInfo.brokerage_price : '0.00' }}</div>
468
+              <div>{{ agentInfo.brokerage_price}}</div>
471
               <div class="text-xs">我的佣金</div>
469
               <div class="text-xs">我的佣金</div>
472
             </div>
470
             </div>
473
             <div @tap="handleShowMyIntegral" class="w-1/3  flex flex-col justify-center items-center">
471
             <div @tap="handleShowMyIntegral" class="w-1/3  flex flex-col justify-center items-center">
@@ -477,7 +475,7 @@ function handleShowMyRulePage() {
477
           </div>
475
           </div>
478
           <div v-if="userStore.userInfo" class="flex">
476
           <div v-if="userStore.userInfo" class="flex">
479
             <div @click="handleToRedIntegral" class="w-1/2 flex flex-col justify-center items-center">
477
             <div @click="handleToRedIntegral" class="w-1/2 flex flex-col justify-center items-center">
480
-              <div>{{ userStore.userInfo.red }}</div>
478
+              <div>{{ userStore.userInfo.member_brokerage_price}}</div>
481
               <div class="text-xs">红积分提现</div>
479
               <div class="text-xs">红积分提现</div>
482
             </div>
480
             </div>
483
             <div class="w-1/2 flex flex-col  justify-center items-center">
481
             <div class="w-1/2 flex flex-col  justify-center items-center">

+ 10 - 6
src/pages/user/login/index.vue

@@ -54,8 +54,10 @@ async function handleWexinLogin() {
54
         code: result.code,
54
         code: result.code,
55
         source: 'cxb'
55
         source: 'cxb'
56
       }).then(unionRes => {
56
       }).then(unionRes => {
57
-        // console.log(unionRes)
57
+        console.log(111111,unionRes)
58
         // const shareId = Cache.get('SHARE_ID')
58
         // const shareId = Cache.get('SHARE_ID')
59
+        //存储openid
60
+        // userStore.setOpenid(unionRes.openid)
59
         let redirectPageObj: {page: string, type: 'page' | 'tab'}
61
         let redirectPageObj: {page: string, type: 'page' | 'tab'}
60
         if (Cache.get('SHARE_REDIRECT_PAGE')) {
62
         if (Cache.get('SHARE_REDIRECT_PAGE')) {
61
           redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
63
           redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
@@ -66,19 +68,21 @@ async function handleWexinLogin() {
66
           // params = Object.assign({}, params, { shareId })
68
           // params = Object.assign({}, params, { shareId })
67
         // }
69
         // }
68
         wechatCheck(unionRes.unionid).then(checkRes => {
70
         wechatCheck(unionRes.unionid).then(checkRes => {
69
-          // console.log(checkRes)
71
+          
70
           userStore.login(checkRes.token, checkRes.exp)
72
           userStore.login(checkRes.token, checkRes.exp)
71
           userStore.setUID(checkRes.user.uid)
73
           userStore.setUID(checkRes.user.uid)
72
           userStore.setUserInfo(checkRes.user)
74
           userStore.setUserInfo(checkRes.user)
73
           // console.log(checkRes)
75
           // console.log(checkRes)
74
           uni.hideLoading();
76
           uni.hideLoading();
75
-
77
+          console.log('我存在吗111',redirectPageObj);
76
             uni.showToast({
78
             uni.showToast({
77
               title: '登录成功'
79
               title: '登录成功'
78
             }).then(() => {
80
             }).then(() => {
79
               setTimeout(() => {
81
               setTimeout(() => {
80
-
82
+                console.log('我存在吗222',redirectPageObj);
83
+                
81
                 if (redirectPageObj) {
84
                 if (redirectPageObj) {
85
+                  console.log('我存在吗333',redirectPageObj);
82
                   if (redirectPageObj.type === 'page') {
86
                   if (redirectPageObj.type === 'page') {
83
                     return uni.redirectTo({
87
                     return uni.redirectTo({
84
                       url: redirectPageObj.page
88
                       url: redirectPageObj.page
@@ -90,7 +94,7 @@ async function handleWexinLogin() {
90
                     })
94
                     })
91
                   }
95
                   }
92
                 } else {
96
                 } else {
93
-                  console.log(state.key);
97
+                  console.log('我是key>>>aaa',state.key);
94
                   
98
                   
95
                   switch (state.key) {
99
                   switch (state.key) {
96
                     case '10': {
100
                     case '10': {
@@ -107,7 +111,7 @@ async function handleWexinLogin() {
107
                     }
111
                     }
108
                     case '1': {
112
                     case '1': {
109
                       uni.switchTab({
113
                       uni.switchTab({
110
-                        url: '/pages/order_addcart/order_addcart'
114
+                        url: '/pages/order_addcart/index'
111
                       })
115
                       })
112
                       break;
116
                       break;
113
                     }
117
                     }

+ 37 - 22
src/pages/user/login/other-phone.vue

@@ -1,33 +1,26 @@
1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-    <CXBBanner/>
3
+    <CXBBanner />
4
 
4
 
5
-    <nut-input
6
-        v-model="state.phone"
7
-        placeholder="请输入手机号"
8
-    >
5
+    <nut-input v-model="state.phone" placeholder="请输入手机号" type="number">
9
       <template #right>
6
       <template #right>
10
         <nut-button type='primary' size="small" @click="handleGetCode" :loading="state.isAuthVerify">
7
         <nut-button type='primary' size="small" @click="handleGetCode" :loading="state.isAuthVerify">
11
-        {{ state.buttonText }}
12
-      </nut-button>
8
+          {{ state.buttonText }}
9
+        </nut-button>
13
       </template>
10
       </template>
14
     </nut-input>
11
     </nut-input>
15
-    <nut-input
16
-        v-model="state.code"
17
-        placeholder="请输入验证码"
18
-        clearable
19
-    >
12
+    <nut-input v-model="state.code" placeholder="请输入验证码" clearable type="number">
20
     </nut-input>
13
     </nut-input>
21
 
14
 
22
     <div class="flex w-full">
15
     <div class="flex w-full">
23
       <div class="p-3 w-full">
16
       <div class="p-3 w-full">
24
         <nut-button type="primary" @click="handleLogin" block :disabled="!isFormVerify">登录</nut-button>
17
         <nut-button type="primary" @click="handleLogin" block :disabled="!isFormVerify">登录</nut-button>
25
-<!--        <div class="text-xs text-gray flex flex-col justify-center items-center p-3">-->
26
-<!--          <div>-->
27
-<!--            我已阅读并同意<span class="text-red text-xs" @click="handleViewXieyi(2)">《注册协议》</span>和<span-->
28
-<!--              class="text-red text-xs" @click="handleViewXieyi(1)">《隐私协议》</span>-->
29
-<!--          </div>-->
30
-<!--        </div>-->
18
+        <!--        <div class="text-xs text-gray flex flex-col justify-center items-center p-3">-->
19
+        <!--          <div>-->
20
+        <!--            我已阅读并同意<span class="text-red text-xs" @click="handleViewXieyi(2)">《注册协议》</span>和<span-->
21
+        <!--              class="text-red text-xs" @click="handleViewXieyi(1)">《隐私协议》</span>-->
22
+        <!--          </div>-->
23
+        <!--        </div>-->
31
 
24
 
32
       </div>
25
       </div>
33
 
26
 
@@ -38,8 +31,9 @@
38
 <script setup lang="ts">
31
 <script setup lang="ts">
39
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
32
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
40
 import CXBBanner from "~/components/CXBBanner/CXBBanner.vue";
33
 import CXBBanner from "~/components/CXBBanner/CXBBanner.vue";
41
-import {authSmsLogin, authVerify} from "~/apis/auth.api";
34
+import { authSmsLogin, authVerify } from "~/apis/auth.api";
42
 import Cache from "~/utils/cache";
35
 import Cache from "~/utils/cache";
36
+import { getUserUnionId } from "~/apis/user";
43
 const userStore = useUserStore()
37
 const userStore = useUserStore()
44
 
38
 
45
 const state = reactive({
39
 const state = reactive({
@@ -104,8 +98,28 @@ function handleViewXieyi(type: number) {
104
 }
98
 }
105
 
99
 
106
 function handleLogin() {
100
 function handleLogin() {
101
+  uni.showLoading({
102
+    title: '登录中'
103
+  });
107
   const shareId = Cache.get('SHARE_ID')
104
   const shareId = Cache.get('SHARE_ID')
108
-
105
+  // uni.login({
106
+  //   provider: 'weixin',
107
+  //   univerifyStyle: {
108
+  //     fullScreen: true
109
+  //   },
110
+  //   success: result => {
111
+  //     // console.log(result)
112
+  //     getUserUnionId({
113
+  //       code: result.code,
114
+  //       source: 'cxb'
115
+  //     }).then(unionRes => {
116
+  //       console.log(111111, unionRes)
117
+  //       // const shareId = Cache.get('SHARE_ID')
118
+  //       //存储openid
119
+  //       userStore.setOpenid(unionRes.openid)
120
+  //     })
121
+  //   }
122
+  // })
109
   let params = {
123
   let params = {
110
     phone: state.phone,
124
     phone: state.phone,
111
     sms_code: state.code,
125
     sms_code: state.code,
@@ -117,17 +131,18 @@ function handleLogin() {
117
   authSmsLogin({
131
   authSmsLogin({
118
     ...params
132
     ...params
119
   }).then(authRes => {
133
   }).then(authRes => {
120
-    console.log(authRes)
134
+    console.log(111111, authRes)
121
     userStore.login(authRes.token, authRes.exp)
135
     userStore.login(authRes.token, authRes.exp)
122
     userStore.setUID(authRes.user.uid)
136
     userStore.setUID(authRes.user.uid)
123
     userStore.setUserInfo(authRes.user)
137
     userStore.setUserInfo(authRes.user)
138
+    uni.hideLoading();
124
     uni.showToast({
139
     uni.showToast({
125
       title: '登录成功',
140
       title: '登录成功',
126
       icon: 'none'
141
       icon: 'none'
127
     })
142
     })
128
     Cache.clear('SHARE_ID')
143
     Cache.clear('SHARE_ID')
129
     state.isAuthVerify = false
144
     state.isAuthVerify = false
130
-    let redirectPageObj: {page: string, type: 'page' | 'tab'}
145
+    let redirectPageObj: { page: string, type: 'page' | 'tab' }
131
     if (Cache.get('SHARE_REDIRECT_PAGE')) {
146
     if (Cache.get('SHARE_REDIRECT_PAGE')) {
132
       redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
147
       redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
133
     }
148
     }

+ 108 - 41
src/pages/vip/index.vue

@@ -22,18 +22,21 @@
22
 
22
 
23
     <!--      <image :src="homeBanner" mode="widthFix" class="h-10 w-full "></image>-->
23
     <!--      <image :src="homeBanner" mode="widthFix" class="h-10 w-full "></image>-->
24
 
24
 
25
-    <div class="w-screen h-45">
25
+    <div class="w-screen h-32">
26
       <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
26
       <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
27
-      <swiper v-if="state.banners" :indicator-dots="state.indicatorDots" indicator-active-color="#e93323"
28
-        :autoplay="state.autoplay" :circular="state.circular" :interval="state.interval" :duration="state.duration"
29
-        class="w-full h-full">
30
-        <swiper-item v-for="(item, index) in state.banners" :key="index">
31
-          <image :src="item.pic" class="!w-full !h-full" mode="	aspectFit" />
32
-        </swiper-item>
33
-      </swiper>
27
+      <div class="px-3 h-32">
28
+        <swiper v-if="state.banners" :indicator-dots="state.indicatorDots" indicator-active-color="#e93323"
29
+          :autoplay="state.autoplay" :circular="state.circular" :interval="state.interval" :duration="state.duration"
30
+          class="w-full h-full rounded-md overflow-hidden ">
31
+          <swiper-item v-for="(item, index) in state.banners" :key="index">
32
+            <image :src="item.pic" class="w-full h-full object-cover" mode="aspectFill" />
33
+          </swiper-item>
34
+        </swiper>
35
+      </div>
34
     </div>
36
     </div>
35
 
37
 
36
-    <div class="flex px-3">
38
+
39
+    <div class="flex px-3" v-if="state.type == 'user'">
37
       会员专区
40
       会员专区
38
     </div>
41
     </div>
39
     <div class="px-3" v-if="list && list.length > 0">
42
     <div class="px-3" v-if="list && list.length > 0">
@@ -99,7 +102,7 @@ import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
99
 import FSearch from "~/components/FSearch/FSearch.vue";
102
 import FSearch from "~/components/FSearch/FSearch.vue";
100
 import { computed } from "vue";
103
 import { computed } from "vue";
101
 import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
104
 import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
102
-import { getVipAreaList } from "~/apis/merchant";
105
+import { getTypeProductList, getVipAreaList } from "~/apis/merchant";
103
 import { CDN_URL } from "~/config/app";
106
 import { CDN_URL } from "~/config/app";
104
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
107
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
105
 import { getHomeBanner, getProductShare } from "~/apis/common";
108
 import { getHomeBanner, getProductShare } from "~/apis/common";
@@ -132,13 +135,20 @@ const state = reactive({
132
   interval: 5000,
135
   interval: 5000,
133
   duration: 500,
136
   duration: 500,
134
   currents: "0",
137
   currents: "0",
138
+  title: '',
139
+  type: '',
135
 })
140
 })
136
 const list = ref([])
141
 const list = ref([])
137
 const count = ref()
142
 const count = ref()
138
 
143
 
139
 onLoad((option) => {
144
 onLoad((option) => {
140
-  console.log(option.shareId);
141
 
145
 
146
+  state.type = option.type
147
+  if (state.type == 'user') {
148
+    state.title = '一壶茶会员中心'
149
+  } else if (state.type == 'gongchang') {
150
+    state.title = '工厂直供'
151
+  }
142
   if (option && option.shareId) {
152
   if (option && option.shareId) {
143
     userStore.setShareId(option.shareId)
153
     userStore.setShareId(option.shareId)
144
   }
154
   }
@@ -154,10 +164,10 @@ onLoad((option) => {
154
     //   })
164
     //   })
155
     // }
165
     // }
156
   })
166
   })
157
-  userStore.setRedirectPage(`/pages/vip/index`, 'page')
167
+  userStore.setRedirectPage(`/pages/vip/index?type` + state.type, 'page')
158
 
168
 
159
-  getHomeBanner("user_banner").then(res => {
160
-    console.log("user_banner", res)
169
+  getHomeBanner(state.type + "_banner").then(res => {
170
+    console.log(state.type + "_banner>>", res)
161
     state.banners = res
171
     state.banners = res
162
   })
172
   })
163
   loadList('reload')
173
   loadList('reload')
@@ -204,35 +214,81 @@ onShareTimeline(() => {
204
 
214
 
205
 
215
 
206
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
216
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
207
-
208
-
209
-  // console.log(state.keyword)
210
-  const params = {
211
-    page: state.currentPage,
212
-    limit: state.pageSize
213
-  }
214
-  if (state.keyword) {
215
-    params.keyword = state.keyword
216
-  }
217
-  console.log('我是params', params)
218
-
219
-  getVipAreaList({
220
-    ...params
221
-  }).then(res => {
222
-    console.log(res.count)
223
-    // console.log(res.list)
224
-    count.value = res.count
225
-    console.log(action);
226
-    if (action === 'page') {
227
-      list.value = list.value.concat(res.list)
217
+  if (state.type == 'user') {
218
+    const params = {
219
+      page: state.currentPage,
220
+      limit: state.pageSize
221
+    }
222
+    if (state.keyword) {
223
+      params.keyword = state.keyword
228
     }
224
     }
225
+    console.log('我是会员params>>', params)
226
+    getVipAreaList({
227
+      ...params
228
+    }).then(res => {
229
+      console.log(res.count)
230
+      // console.log(res.list)
231
+      count.value = res.count
232
+      console.log(action);
233
+      if (action === 'page') {
234
+        list.value = list.value.concat(res.list)
235
+      }
236
+      if (action === 'reload') {
237
+        list.value = res.list
238
+      }
239
+      if (callback) {
240
+        callback(res)
241
+      }
242
+    })
243
+  } else if (state.type == 'gongchang') {
229
     if (action === 'reload') {
244
     if (action === 'reload') {
230
-      list.value = res.list
245
+      state.currentPage = 1
246
+    }
247
+
248
+    const params = {
249
+      type: state.type,
250
+      page: state.currentPage,
251
+      limit: state.pageSize
231
     }
252
     }
232
-    if (callback) {
233
-      callback(res)
253
+    if (state.keyword) {
254
+      params.keyword = state.keyword
234
     }
255
     }
235
-  })
256
+    getTypeProductList({
257
+      ...params
258
+    }).then(res => {
259
+      if (res) {
260
+        if (action === 'reload') {
261
+          list.value = res.list
262
+        } else if (action === 'page') {
263
+          list.value = list.value.concat(res.list)
264
+        }
265
+        state.totalPage = Math.ceil(res.count / state.pageSize);
266
+        state.status = 'more'
267
+
268
+        if (callback) {
269
+          callback(res.list)
270
+        }
271
+      }
272
+    })
273
+
274
+  }
275
+  // getVipAreaList({
276
+  //   ...params
277
+  // }).then(res => {
278
+  //   console.log(res.count)
279
+  //   // console.log(res.list)
280
+  //   count.value = res.count
281
+  //   console.log(action);
282
+  //   if (action === 'page') {
283
+  //     list.value = list.value.concat(res.list)
284
+  //   }
285
+  //   if (action === 'reload') {
286
+  //     list.value = res.list
287
+  //   }
288
+  //   if (callback) {
289
+  //     callback(res)
290
+  //   }
291
+  // })
236
 }
292
 }
237
 
293
 
238
 function handleItemClick(item) {
294
 function handleItemClick(item) {
@@ -254,7 +310,7 @@ function handleScrollToLower() {
254
 }
310
 }
255
 
311
 
256
 onReachBottom(() => {
312
 onReachBottom(() => {
257
-  // console.log('到底了。。。')
313
+  console.log('到底了。。。')
258
   handleScrollToLower()
314
   handleScrollToLower()
259
 })
315
 })
260
 
316
 
@@ -297,11 +353,17 @@ onPageScroll((page) => {
297
 })
353
 })
298
 
354
 
299
 
355
 
356
+onShow(() => {
357
+  uni.setNavigationBarTitle({
358
+    title: state.title // 设置新的导航栏标题
359
+  });
360
+})
361
+
300
 </script>
362
 </script>
301
 
363
 
302
 <route lang="yaml">
364
 <route lang="yaml">
303
 style:
365
 style:
304
-  navigationBarTitleText: 一壶茶会员中心
366
+  navigationBarTitleText: 储蓄保
305
   enablePullDownRefresh: true
367
   enablePullDownRefresh: true
306
 </route>
368
 </route>
307
 <style>
369
 <style>
@@ -311,4 +373,9 @@ page {
311
   --nut-searchbar-input-background: #f8f8f8;
373
   --nut-searchbar-input-background: #f8f8f8;
312
   --nut-searchbar-input-box-shadow: none;
374
   --nut-searchbar-input-box-shadow: none;
313
 }
375
 }
376
+
377
+
378
+.box_y {
379
+  border-radius: 20rpx;
380
+}
314
 </style>
381
 </style>

+ 3 - 6
src/stores/dacangStore.ts

@@ -1,16 +1,13 @@
1
-import {defineStore} from "pinia";
1
+import { defineStore } from "pinia";
2
 
2
 
3
 export const useDacangStore = defineStore('dacangStore', {
3
 export const useDacangStore = defineStore('dacangStore', {
4
     state: () => ({
4
     state: () => ({
5
-        currentClassify: '-1'
5
+        currentClassify: '-1',
6
     }),
6
     }),
7
     actions: {
7
     actions: {
8
         setClassify(classify: string) {
8
         setClassify(classify: string) {
9
             // console.log('class' + classify)
9
             // console.log('class' + classify)
10
             this.currentClassify = classify
10
             this.currentClassify = classify
11
-        },
12
-        loadList() {
13
-
14
-        }
11
+        },  
15
     }
12
     }
16
 })
13
 })

+ 18 - 6
src/stores/userStore.ts

@@ -1,8 +1,8 @@
1
-import {defineStore} from "pinia";
2
-import {getUserInfo, getYanglaojinStatistics} from "~/apis/user";
1
+import { defineStore } from "pinia";
2
+import { getUserInfo, getYanglaojinStatistics } from "~/apis/user";
3
 import Cache from '~/utils/cache'
3
 import Cache from '~/utils/cache'
4
-import {LOGIN_STATUS, UID, USER_INFO} from "~/constants";
5
-import type {UserInfoModel} from "~/apis/model/userInfoModel";
4
+import { LOGIN_STATUS, SHARE_REDIRECT_PAGE, UID, USER_INFO,OPEN_ID } from "~/constants";
5
+import type { UserInfoModel } from "~/apis/model/userInfoModel";
6
 
6
 
7
 interface UserStoreState {
7
 interface UserStoreState {
8
     userInfo: UserInfoModel
8
     userInfo: UserInfoModel
@@ -14,6 +14,7 @@ interface UserStoreState {
14
     yanglao: number,
14
     yanglao: number,
15
     redirectPage: string | null,
15
     redirectPage: string | null,
16
     shareId: string | null
16
     shareId: string | null
17
+    openid:string
17
 }
18
 }
18
 
19
 
19
 export const useUserStore = defineStore('userStore', {
20
 export const useUserStore = defineStore('userStore', {
@@ -28,6 +29,7 @@ export const useUserStore = defineStore('userStore', {
28
         shareId: null,
29
         shareId: null,
29
         redirectPage: null,
30
         redirectPage: null,
30
         permissionList: null, // 权限列表
31
         permissionList: null, // 权限列表
32
+        openid:Cache.get(OPEN_ID) || null
31
     }) as UserStoreState,
33
     }) as UserStoreState,
32
     actions: {
34
     actions: {
33
         // getYanglaojinStatistics().then(res => {
35
         // getYanglaojinStatistics().then(res => {
@@ -35,7 +37,7 @@ export const useUserStore = defineStore('userStore', {
35
         // })
37
         // })
36
         setRedirectPage(page: string, type: 'page' | 'tab') {
38
         setRedirectPage(page: string, type: 'page' | 'tab') {
37
             this.redirectPage = page
39
             this.redirectPage = page
38
-            Cache.set('SHARE_REDIRECT_PAGE', JSON.stringify({page, type}))
40
+            Cache.set('SHARE_REDIRECT_PAGE', JSON.stringify({ page, type }))
39
         },
41
         },
40
         setShareId(shareId: string) {
42
         setShareId(shareId: string) {
41
             this.shareId = shareId
43
             this.shareId = shareId
@@ -70,8 +72,12 @@ export const useUserStore = defineStore('userStore', {
70
             this.token = null
72
             this.token = null
71
             this.uid = null
73
             this.uid = null
72
             this.userInfo = null
74
             this.userInfo = null
75
+            //清空登录信息
76
+            Cache.clear(USER_INFO);
77
+            Cache.clear(OPEN_ID);
73
             Cache.clear(LOGIN_STATUS)
78
             Cache.clear(LOGIN_STATUS)
74
             Cache.clear(UID)
79
             Cache.clear(UID)
80
+            Cache.clear(SHARE_REDIRECT_PAGE)
75
         },
81
         },
76
         setUID(uid: string) {
82
         setUID(uid: string) {
77
             this.uid = uid
83
             this.uid = uid
@@ -80,7 +86,13 @@ export const useUserStore = defineStore('userStore', {
80
         setUserInfo(userInfo: UserInfoModel) {
86
         setUserInfo(userInfo: UserInfoModel) {
81
             this.userInfo = userInfo
87
             this.userInfo = userInfo
82
             // 这个是存储的对象数据
88
             // 这个是存储的对象数据
83
-            Cache.set('USERINFO', userInfo)
89
+            Cache.set('USER_INFO', userInfo)
90
+            // Cache.set(USER_INFO, JSON.stringify(userInfo))
91
+        },
92
+        setOpenid(openid: string) {
93
+            this.openid = openid
94
+            // 这个是存储的对象数据
95
+            Cache.set('OPEN_ID', openid)
84
             // Cache.set(USER_INFO, JSON.stringify(userInfo))
96
             // Cache.set(USER_INFO, JSON.stringify(userInfo))
85
         },
97
         },
86
         setToken(token: string) {
98
         setToken(token: string) {