dxz1228 2 yıl önce
ebeveyn
işleme
fecae1a4f0
47 değiştirilmiş dosya ile 1490 ekleme ve 753 silme
  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 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 4
 enum API {
5 5
     // 短信验证码
@@ -61,4 +61,21 @@ export function authSmsLogin(params: {
61 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 7
     user: LoginUserModel
8 8
 }
9
+export interface AccountModel {
10
+    
11
+    openid: string
12
+    wx_type: string
13
+}
9 14
 
10 15
 export interface LoginUserModel {
11 16
     uid: string//用户id

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

@@ -1,5 +1,5 @@
1 1
 export interface ShoppingResult {
2
-    list: Array<ShopModel>
2
+    list?: Array<ShopModel>
3 3
 }
4 4
 
5 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 281
 export function getOrderListFromStatus(params: {
282 282
     page: number
283
-    //   订单状态(0:待发货;1:待收货;2:待评价;3:已完成;4已申请退款;-1:已退款)5未支付
283
+    //   订单状态(0:待发货;1:待收货;2:待评价;3:已完成;4已申请退款;-1:已退款)5未支付 6已取消
284 284
     status: number
285 285
     limit: number
286 286
 }): Promise<OrderListResult> {

+ 1 - 1
src/apis/product.ts

@@ -53,7 +53,7 @@ enum API {
53 53
     // 拼多多商品列表
54 54
     PDD_LIST = '/api/pdd/list',
55 55
     // 拼多多商品搜索
56
-    PDD_SEARCH = '/api/pdd/search',
56
+    PDD_SEARCH = '/api/pdd/list',
57 57
     // 拼多多商品详情
58 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 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 19
 import type {
20 20
     SharePosterClassifyResult,
21 21
     SharePosterImageResult,
22 22
     SharePostersImagesListParams,
23 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 35
 // export function entropy(data) {
@@ -187,7 +187,7 @@ export function xcxBanding(params: { mer_id: string, share_id: string }) {
187 187
  * 生成用户图片
188 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 191
     return defHttp.post({
192 192
         url: API.POSTER_SERVICE_IMAGES,
193 193
         data: {

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

@@ -1,6 +1,6 @@
1 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 4
 import Cache from "~/utils/cache";
5 5
 const userStore = useUserStore()
6 6
 const props = defineProps({
@@ -24,6 +24,10 @@ function getPhoneNumber(e) {
24 24
           code: result.code,
25 25
           source,
26 26
         }).then(unionRes => {
27
+          console.log(111111, unionRes)
28
+          // const shareId = Cache.get('SHARE_ID')
29
+          //存储openid
30
+          // userStore.setOpenid(unionRes.openid)
27 31
           // getShareId(shareI)
28 32
           const shareId = Cache.get('SHARE_ID')
29 33
 
@@ -36,7 +40,7 @@ function getPhoneNumber(e) {
36 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 44
           if (Cache.get('SHARE_REDIRECT_PAGE')) {
41 45
             redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
42 46
           }
@@ -125,21 +129,18 @@ function getPhoneNumber(e) {
125 129
 }
126 130
 </script>
127 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 137
       {{ text }}
137 138
     </button>
138 139
   </div>
139 140
 </template>
140 141
 
141 142
 <style>
142
-button{
143
+button {
143 144
   margin: 0;
144 145
   padding: 0;
145 146
   outline: none;
@@ -147,7 +148,8 @@ button{
147 148
   background-color: transparent;
148 149
   line-height: inherit;
149 150
 }
150
-button::after{
151
+
152
+button::after {
151 153
   border: none;
152 154
 }
153 155
 </style>

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

@@ -87,6 +87,8 @@ onMounted(() => {
87 87
 })
88 88
 
89 89
 function handleSelectedSku(skuItem: any) {
90
+  console.log(skuItem);
91
+
90 92
   currentSku.value = skuItem
91 93
   console.log('我是数据', currentSku.value);
92 94
 
@@ -107,6 +109,9 @@ function handleBuyNow() {
107 109
 function handleJiaCart() {
108 110
   emit('subAdd')
109 111
 }
112
+function handleSubQg() {
113
+  emit('subQg')
114
+}
110 115
 
111 116
 function handleCountChange(value) {
112 117
   emit('count-change', value)
@@ -187,6 +192,18 @@ function handleCountChange(value) {
187 192
         </FButton>
188 193
 
189 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 207
       <div class="px-3 pb-10" v-if="isTo == 3">
191 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 6
 const emit = defineEmits(buttonEmits)
7 7
 
8 8
 const { disabled, clickHandler } = useButton(props, emit)
9
-console.log(props);
9
+
10 10
 
11 11
 </script>
12 12
 

+ 3 - 0
src/constants/index.ts

@@ -9,6 +9,9 @@ export const  LOGIN_STATUS = 'LOGIN_STATUS_TOKEN'
9 9
     // uid
10 10
 export const UID = 'UID'
11 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 15
     //token 过期时间
13 16
 export const  EXPIRES_TIME = 'EXPIRES_TIME'
14 17
     //�Ƿ���Ȩ

Dosya farkı çok büyük olduğundan ihmal edildi
+ 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 118
 watch(() => state.tabvalue, (val) => {
119
+  console.log('我是val',val);
120
+  
119 121
   switch (val) {
120 122
     case '0': {
121 123
       loadAllOrderList()

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

@@ -1,9 +1,18 @@
1 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 6
 const get_to_know_buttons_220713Image = CDN_URL + '/static/assets/get_to_know_buttons_220713.png'
5 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 16
 const userStore = useUserStore()
8 17
 const progress = [{
9 18
   type: 'item',
@@ -18,24 +27,24 @@ const progress = [{
18 27
   title: '绑定微信支付宝',
19 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 49
 const state = reactive({
41 50
   all_yanglao: 0,
@@ -44,11 +53,13 @@ const state = reactive({
44 53
     amount: 0
45 54
   }
46 55
 })
56
+const userYangLaoJin = ref({})
47 57
 
48 58
 const yanglaoStatistics = ref()
49 59
 onLoad(() => {
50 60
   getYanglaojinStatistics().then(res => {
51 61
     // state.all_yanglao = res.all_yanglao
62
+
52 63
     yanglaoStatistics.value = res
53 64
   }).catch(error => {
54 65
     if (error === '未登录') {
@@ -61,7 +72,45 @@ onLoad(() => {
61 72
   getAmountFromGzc().then(res => {
62 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 114
 function handleThirdBind() {
66 115
   uni.navigateTo({
67 116
     url: '/pages/third_party_binding/index'
@@ -106,6 +155,22 @@ function handleShowAgreement(type) {
106 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 174
 </script>
110 175
 
111 176
 <template>
@@ -118,48 +183,37 @@ function handleShowAgreement(type) {
118 183
       </div>
119 184
       <div class="flex flex-col bg-white rounded  p-4">
120 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 189
           <div>
133 190
             {{ userStore.userInfo.nickname }}
134 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 195
           </div>
142 196
         </div>
143 197
         <div class="flex-1 flex flex-col justify-between items-center py-4 gap-4">
144 198
           <div class="flex flex-col justify-center items-center">
145 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 203
           </div>
148 204
           <div class=" flex justify-around w-full">
149 205
             <div class="flex flex-col justify-center items-center " v-if="yanglaoStatistics">
150 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 208
               </div>
153 209
               <div class="text-xs text-gray-400">预估养老金</div>
154 210
             </div>
155 211
 
156 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 214
               <div class="text-xs text-gray-400">已结算</div>
159 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 217
               <div>¥{{ state.amountFromGzc.amount }}</div>
164 218
               <div class="text-xs text-gray-400">中信公证处</div>
165 219
             </div>
@@ -173,47 +227,73 @@ function handleShowAgreement(type) {
173 227
         <div>养老金账号开通流程</div>
174 228
         <div class="flex flex-row justify-center items-center w-full h-full">
175 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 231
               <image :src="item.icon" mode="widthFix" class="w-10 h-10"></image>
180 232
               <div class="text-xs h-8 flex flex-col justify-center items-center">{{ item.title }}</div>
181 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 236
             </div>
189 237
 
190 238
           </div>
191 239
 
192 240
         </div>
193 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 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 283
           <div>支付平台绑定</div>
200 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 288
           <div>养老金账户</div>
206 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 293
           <div>养老金记录</div>
212 294
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
213 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 297
           <div>中信公证处查看</div>
218 298
           <image :src="ylj_fh_220914Image" mode="widthFix" class="w-2 h-2"></image>
219 299
         </div>
@@ -234,6 +314,11 @@ function handleShowAgreement(type) {
234 314
 page {
235 315
   background: #f8f8f8;
236 316
 }
317
+
318
+.box_img {
319
+  width: 144rpx;
320
+  height: 50rpx;
321
+}
237 322
 </style>
238 323
 <route lang="yaml">
239 324
 style:

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

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

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

@@ -1,9 +1,9 @@
1 1
 <script lang="ts" setup>
2
-import {computed, PropType} from "vue";
2
+import { computed, PropType } from "vue";
3 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 7
 // import {useUserStore} from "~/stores/userStore";
8 8
 const userStore = useUserStore()
9 9
 const dacangStore = useDacangStore()
@@ -74,7 +74,7 @@ function handleClick() {
74 74
 //
75 75
 // }
76 76
 const emit = defineEmits<{
77
-  (e: 'click:item', value:string): void
77
+  (e: 'click:item', value: string): void
78 78
 }>()
79 79
 function handleTabItemClick(currentTab) {
80 80
   emit('click:item', tabValue.value)
@@ -86,19 +86,15 @@ function handleShowSearchPage() {
86 86
 }
87 87
 </script>
88 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 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 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 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 100
           </div>
@@ -109,19 +105,17 @@ function handleShowSearchPage() {
109 105
 
110 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 120
   </div>
127 121
 </template>
@@ -132,4 +126,11 @@ function handleShowSearchPage() {
132 126
   --nut-tabs-titles-item-color: #fff;
133 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 136
 </style>

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

@@ -19,12 +19,13 @@ const usePageStore = usePageStoreWidthOut()
19 19
 
20 20
 
21 21
 const state = reactive({
22
-  tabs: [{ store_category_id: '-1', cate_name: '全部' }],
22
+  tabs: [],
23
+  lists: {},
23 24
   productList: <Array<DcProductModel>>[],
24
-  currentClassify: '',
25
+  currentClassify: '-1',
25 26
   keyword: '',
26 27
   status: 'noMore',
27
-  banner:'',
28
+  banner: '',
28 29
   currentPage: 1,
29 30
   pageSize: 10,
30 31
   totalPage: 1
@@ -33,6 +34,7 @@ const state = reactive({
33 34
 // 距离顶部距离
34 35
 let Scroll_X = ref(0)
35 36
 
37
+let scrollPositions = reactive({})
36 38
 const dacangStore = useDacangStore()
37 39
 const userStore = useUserStore()
38 40
 
@@ -40,7 +42,6 @@ const userStore = useUserStore()
40 42
 onLoad(async (option) => {
41 43
   state.tabs = [{ store_category_id: '-1', cate_name: '全部' }]
42 44
   const classifyRes = await getDcProductClassify()
43
-
44 45
   state.tabs.push(...classifyRes)
45 46
   usePageStore.setPageConfig({
46 47
     currentPage: {
@@ -60,11 +61,11 @@ onLoad(async (option) => {
60 61
     console.log(message)
61 62
   })
62 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 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 95
   usePageStore.setPageConfig({
94 96
     currentPage: {
95 97
       type: 'tab',
@@ -99,7 +101,7 @@ onShow(async (options) => {
99 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 105
   console.log(action);
104 106
   let params: any = {
105 107
     page: state.currentPage,
@@ -107,41 +109,79 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
107 109
     keyword: state.keyword
108 110
   }
109 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 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 141
   setTimeout(() => {
136 142
     loadList('reload')
137 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 178
 const headerClass = ref('')
142 179
 
143 180
 onPageScroll((page) => {
181
+
182
+
144 183
   Scroll_X.value = Number(page.scrollTop.toFixed())
184
+
145 185
   // page.scrollTop
146 186
   if (page.scrollTop >= 76) {
147 187
     headerClass.value = '!bg-primary !text-white'
@@ -165,11 +205,13 @@ onReachBottom(() => {
165 205
   })
166 206
 })
167 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 223
     <div class="flex flex-col gap-2 ">
182 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 231
         <div v-if="state.status === 'loading'">
187 232
           加载中...
188 233
         </div>

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

@@ -1,8 +1,8 @@
1 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 7
 const navList = ref([{
8 8
   image: CDM_URL + '/image/2023-11-20/20231120155257975.png',
@@ -12,29 +12,34 @@ const navList = ref([{
12 12
   image: CDN_URL + '/static/home-nav/home_xianshimiaosha_220614.png',
13 13
   title: '限时秒杀',
14 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 20
   image: '',
21 21
   title: '鼎盛联盟',
22 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 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 36
   image: CDN_URL + '/static/home-nav/home_taobaoyanglao_220920.png',
32 37
   title: '淘宝',
33 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 44
   image: CDN_URL + '/static/home-nav/home_weipinhui_220920.png',
40 45
   title: '唯品会',
@@ -43,43 +48,25 @@ const navList = ref([{
43 48
   image: CDN_URL + '/static/home-nav/home_suningyigou_220920.png',
44 49
   title: '苏宁易购',
45 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 59
   categoryId: '571'
55
-}, 
56
- {
60
+},
61
+{
57 62
   image: '',
58
-  title: '滋补保健',
63
+  title: '滋补养生',
59 64
   key: 'zibu',
60 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 71
   image: CDN_URL + '/static/home-nav/home_gengduo.png',
85 72
   title: '更多',
@@ -88,10 +75,12 @@ const navList = ref([{
88 75
 
89 76
 onBeforeMount(() => {
90 77
   getHomeQuickLink().then(res => {
78
+    console.log('res>>>>>', res);
79
+
91 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 84
       // console.log(res)
96 85
     }
97 86
   })
@@ -108,15 +97,12 @@ function handleItemClick(item: any) {
108 97
       uni.switchTab({
109 98
         url: '/pages/dacang/list/index'
110 99
       })
111
-      // uni.navigateTo({
112
-      //   url: '/pagesC/goods_details/index?id=4858'
113
-      // })
114 100
       break;
115 101
     }
116 102
     // 会员专区
117
-    case 'member': {
103
+    case 'user': {
118 104
       uni.navigateTo({
119
-        url: '/pages/vip/index'
105
+        url: `/pages/vip/index?type=`+item.key
120 106
       })
121 107
       break;
122 108
     }
@@ -135,18 +121,25 @@ function handleItemClick(item: any) {
135 121
       })
136 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 144
     case 'integral': {
152 145
       uni.navigateTo({
@@ -178,16 +171,11 @@ function handleItemClick(item: any) {
178 171
   <div class="">
179 172
     <div class="rounded bg-white pt-4 pb-2 px-5">
180 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 177
           <div class="text-xs">
190
-            {{navItem.title}}
178
+            {{ navItem.title }}
191 179
           </div>
192 180
         </div>
193 181
       </div>

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

@@ -208,7 +208,7 @@ const homeBanner = CDN_URL + '/static/assets/home-banner.png'
208 208
 function handleBannerClick(item) {
209 209
   if(item.url == 'rich') {
210 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 7
   getWithdrawalConfig,
8 8
   getWithdrawalService
9 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 16
 const zfb_logoImage = CDN_URL + '/static/assets/zfb_logo.png'
16 17
 const wx_logoImage = CDN_URL + '/static/assets/wx_logo.png'
17 18
 const userStore = useUserStore()
18 19
 const userSpreadInfo = ref<SpreadInfoModel>()
19
-
20
+//微信绑定标识
21
+const iswxshow = ref(false)
20 22
 const withdrawalCal = ref({})
21 23
 const yanglaojin = ref<UserYanglaoJinModel>()
22 24
 
@@ -27,7 +29,46 @@ const cashWithdrawalAmount = ref()
27 29
 const isDisabled = ref(true)
28 30
 const userBrokeragePrice = ref(0)
29 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 72
   await userStore.getUserInfo()
32 73
   // 佣金信息
33 74
   userSpreadInfo.value = await getUserSpreadInfo()
@@ -48,6 +89,7 @@ onLoad(async () => {
48 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 141
 function handleInputAll() {
69 142
   // console.log(userSpreadInfo.value?.brokerage_price)
70 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 156
 function handleImmediateWithdrawal() {
157
+  
84 158
   if (isDisabled.value) {
85 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 226
     uni.showToast({
149
-      title: '提现成功',
227
+      title: '提现已申请',
150 228
       icon: 'none'
151
-    }).then(res => {
229
+    })
230
+    setTimeout(() => {
152 231
       uni.navigateTo({
153
-        url: '/pages/immediate-withdrawal/index'
232
+        url: '/pages/withdrawal-record/index'
154 233
       })
155
-    })
234
+    }, 300)
156 235
   }).catch(error => {
157 236
     uni.showToast({
158 237
       title: error,
@@ -190,10 +269,7 @@ function handleShowAgreement(type) {
190 269
       <div class="flex justify-center items-center pt-4 f-hairline-bottom">
191 270
         <div class="text-lg font-bold">¥</div>
192 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 273
         </div>
198 274
         <div class="text-xs text-red" @click="handleInputAll">全部提现</div>
199 275
       </div>
@@ -215,10 +291,11 @@ function handleShowAgreement(type) {
215 291
         <div class="flex items-center justify-between py-3">
216 292
           <div class="flex items-center gap-2">
217 293
             <image :src="wx_logoImage" mode="widthFix" class="w-8 h-8"></image>
218
-            <div>微信支付</div>
294
+            <div>微信</div>
219 295
           </div>
220 296
           <div>
221
-            <radio checked/>
297
+            <radio :checked="true" v-if="iswxshow==true" />
298
+            <radio :checked="false"  v-if="iswxshow==false" @click="Tochecked"  />
222 299
           </div>
223 300
         </div>
224 301
 
@@ -236,11 +313,8 @@ function handleShowAgreement(type) {
236 313
 
237 314
     <div class="flex flex-col">
238 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 319
         </nut-button>
246 320
       </div>
@@ -267,7 +341,6 @@ page {
267 341
   height: 16px !important;
268 342
   width: 16px !important;
269 343
 }
270
-
271 344
 </style>
272 345
 <route lang="yaml">
273 346
 style:

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

@@ -12,7 +12,7 @@ const currentSeckillDate = ref()
12 12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
13 13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
14 14
 const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
15
-
15
+const userStore = useUserStore()
16 16
 // const list = ref<Array<DcSeckillModel>>()
17 17
 const currentProductList = ref([])
18 18
 
@@ -24,6 +24,7 @@ const state = reactive({
24 24
 
25 25
   list: []
26 26
 })
27
+
27 28
 onLoad((options) => {
28 29
   loadList('reload')
29 30
 })
@@ -43,33 +44,34 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
43 44
   }).then( res => {
44 45
     if (action === 'reload') {
45 46
       if (res && res.length > 0) {
46
-        console.log(res)
47
+        console.log('秒杀>>>',res)
47 48
         const resList = res
48 49
         // const status3List = orderBy(list.value, (val) => {
49 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 56
         let status2FilterList = filter(resList, (val) => {
55 57
           return val.status == 2
56 58
         })
57 59
         let status1FilterList = filter(resList, (val) => {
58 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 70
         if (status2FilterList.length > 0) {
69 71
           state.list.push(...status2FilterList)
70 72
         }
71 73
         if (status1FilterList.length > 0) {
72
-          state.list.push(...status1FilterList)
74
+          state.list.unshift(...status1FilterList)
73 75
         }
74 76
 
75 77
         if (state.list.length > 0) {

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

@@ -1,6 +1,6 @@
1 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 4
 import FButton from "~/components/FButton/FButton.vue";
5 5
 import CXBButton from "~/components/CXBButton/CXBButton.vue";
6 6
 import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
@@ -27,7 +27,7 @@ function loadSignInInfo() {
27 27
   // 2 检查用户签到信息
28 28
   getNewSignInInfo().then(res => {
29 29
     console.log(res)
30
-    const {today, day} = res
30
+    const { today, day } = res
31 31
     state.signToday = today
32 32
     console.log(res)
33 33
     if (today == 0) {
@@ -68,7 +68,7 @@ if (userStore.userInfo) {
68 68
 function handleSign() {
69 69
   // console.log(state.signToday)
70 70
   // if (state.signToday == 0)  {
71
-    state.isShowSignIn = true
71
+  state.isShowSignIn = true
72 72
   // } else {
73 73
   //   return uni.showToast({
74 74
   //     title: '今日已签到过',
@@ -117,27 +117,19 @@ function handleShowAgreement() {
117 117
         {{ userStore.userInfo.score }}
118 118
       </div>
119 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 124
     <div class="bg-white rounded-md text-sm flex justify-between p-3">
122 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 129
       </FButton>
131 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 134
     <div class="bg-white rounded-md text-sm flex flex-col p-3">
143 135
       <div class="f-hairline-bottom pb-3">积分任务</div>
@@ -147,11 +139,8 @@ function handleShowAgreement() {
147 139
             <div class="text-xs">每日签到</div>
148 140
             <div class="text-xs text-gray-500">每日签到得奖励</div>
149 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 144
             {{ state.signToday === 0 ? '去签到' : '已签到' }}
156 145
           </FButton>
157 146
         </div>
@@ -160,12 +149,8 @@ function handleShowAgreement() {
160 149
             <div class="text-xs">邀请好友得积分</div>
161 150
             <div class="text-xs text-gray-500">邀请好友赚奖励</div>
162 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 156
           </FButton>
@@ -176,13 +161,8 @@ function handleShowAgreement() {
176 161
     </div>
177 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 166
 </template>
187 167
 
188 168
 <style>

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

@@ -1,7 +1,7 @@
1 1
 <script setup lang="ts">
2 2
 import FCellGroup from "~/components/FCellGroup/FCellGroup.vue";
3 3
 import FCell from "~/components/FCell/FCell.vue";
4
-import {getAgentInfo, getSelectUserInviteProfit} from "~/apis/user";
4
+import {getAgentInfo, getSelectUserInviteProfit, getUserUnionId} from "~/apis/user";
5 5
 const userStore = useUserStore()
6 6
 const list = [{
7 7
   title: '邀请伙伴',
@@ -18,6 +18,9 @@ const list = [{
18 18
 }, {
19 19
   title: '去提现',
20 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 47
 onLoad(() => {
45 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 67
   getSelectUserInviteProfit({ uid: userStore.uid }).then(res => {
47 68
     console.log(res)
48 69
     const inviteData = res.data

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

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

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

@@ -14,7 +14,6 @@ const state = reactive({
14 14
   currentPage: 1,
15 15
   pageSize: 10,
16 16
   totalPage: 1,
17
-
18 17
   list: []
19 18
 })
20 19
 
@@ -35,7 +34,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
35 34
     page: state.currentPage,
36 35
     limit: state.pageSize
37 36
   }).then(res => {
38
-    console.log(res)
37
+    console.log('>>>>>',res)
39 38
     if (action === 'page') {
40 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 43
 function getStatusText(orderItem: OrderListModel) {
44
+  // console.log('我是》',orderItem.status);
45
+
43 46
   // if (props.status === 5) {
44 47
   //   return '未支付'
45 48
   // }
@@ -66,8 +69,11 @@ function getStatusText(orderItem: OrderListModel) {
66 69
   if (orderItem.status == 4) {
67 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 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 122
 function handlePayment() {
106 123
   const { orderItem } = props
107 124
   uni.navigateTo({
@@ -306,13 +323,18 @@ function handleShowObligationOrderDetail(orderItem) {
306 323
 
307 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 328
           <nut-button size="small" type="default" @tap.stop="handleCancelOrder">
311 329
             <div class="text-black">取消订单</div>
312 330
           </nut-button>
313 331
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
314 332
 
315 333
         </div>
334
+        <div class="flex justify-end gap-2" v-if="orderItem.status === 5">
335
+
336
+
337
+        </div>
316 338
         <div class="flex justify-end gap-2" v-if="orderItem.status == 0">
317 339
           <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
318 340
             <div class="text-black">提醒发货</div>
@@ -333,7 +355,17 @@ function handleShowObligationOrderDetail(orderItem) {
333 355
           <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
334 356
 
335 357
         </div>
358
+      </div>
336 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 1
 <script setup lang="ts">
2 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 7
 import {
8 8
   DyProductModel,
9 9
   JdProductModel,
10 10
   SuNingProductModel,
11 11
   TaobaoProductThirdPartyWaresModel, VipProductModel
12 12
 } from "~/apis/model/product.model";
13
-import {DcProductModel} from "~/apis/model/dacang.model";
13
+import { DcProductModel } from "~/apis/model/dacang.model";
14 14
 const props = defineProps({
15 15
   orderItem: {
16 16
     type: Object,
@@ -24,6 +24,9 @@ const props = defineProps({
24 24
   }
25 25
 })
26 26
 
27
+
28
+
29
+
27 30
 // function detailOrderList(p) {}
28 31
 // const dealOrderList =computed(() => {
29 32
 //   if (props.orderItem) {
@@ -63,8 +66,11 @@ function getStatusText(orderItem: OrderListModel) {
63 66
   if (orderItem.status == 4) {
64 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 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 117
 function handlePayment() {
@@ -156,7 +177,7 @@ function handleComment(orderItem) {
156 177
 }
157 178
 
158 179
 function handleProductItemClick(
159
-    item
180
+  item
160 181
 ) {
161 182
   // function navigateToDetail(params) {
162 183
   //   let otherDetailUrl = `/pages/store/product/other`
@@ -184,13 +205,56 @@ function handleShowObligationOrderDetail(orderItem) {
184 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 253
 </script>
188 254
 
189 255
 <template>
190 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 258
       <div class="flex items-center font-bold gap-2 text-sm justify-between">
195 259
         <div class="flex-1 flex items-center gap-2">
196 260
           <image :src="orderItem.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
@@ -214,7 +278,7 @@ function handleShowObligationOrderDetail(orderItem) {
214 278
               <div class="flex-1 flex gap-2">
215 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 282
                 </div>
219 283
                 <div class="flex flex-col">
220 284
                   <div class="line-clamp-2 text-[12px]">
@@ -236,7 +300,11 @@ function handleShowObligationOrderDetail(orderItem) {
236 300
           </div>
237 301
         </div>
238 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 308
           <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
241 309
 
242 310
         </div>
@@ -245,6 +313,14 @@ function handleShowObligationOrderDetail(orderItem) {
245 313
     </div>
246 314
 
247 315
   </div>
248
-
249
-
250 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 80
 onLoad(options => {
81
-  console.log(options)
81
+  console.log('我是options》》',options)
82 82
   if (options && options.tabIndex) {
83 83
     state.tabvalue = options.tabIndex
84 84
   }

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

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

Dosya farkı çok büyük olduğundan ihmal edildi
+ 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 569
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
570 570
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
571 571
         <div>
572
-          猜你喜欢
572
+      精品推荐
573 573
         </div>
574 574
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
575 575
       </div>

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

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

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

@@ -86,7 +86,6 @@ function handleCreateShopping() {
86 86
     //     })
87 87
     //   } else {
88 88
     //     uni.$emit('cart-reload')
89
-
90 89
     //     uni.showToast({
91 90
     //       title: '添加购物车成功',
92 91
     //       icon: 'none'
@@ -126,17 +125,19 @@ function handleCountChange(val) {
126 125
 let Scroll_X = ref(0)
127 126
 
128 127
 const shopping = ref<ShoppingResult>()
129
-
130 128
 onBeforeMount(() => {
129
+  userStore.setRedirectPage(`/pages/order_addcart/index`, 'tab')
130
+})
131
+onLoad((options) => {
132
+
131 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 138
   uni.$on('cart-reload', () => {
139 139
     // console.log('新商品添加...')
140
+    state.recommendList = []
140 141
     state.cart_id = []
141 142
     loadCartList()
142 143
   })
@@ -155,6 +156,7 @@ onShow(() => {
155 156
     state.isManage = true
156 157
   }
157 158
   loadCartCount()
159
+  loadCartList()
158 160
   loadList('reload')
159 161
 })
160 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 221
 function loadCartList() {
222
+
208 223
   uni.showLoading({
209 224
     title: '加载中',
210 225
     icon: 'none'
@@ -212,6 +227,8 @@ function loadCartList() {
212 227
   // state.totalCartCount = 0
213 228
   getCartList().then(res => {
214 229
     uni.hideLoading()
230
+    console.log('我是初始化gwc数据', res);
231
+
215 232
     shopping.value = res
216 233
 
217 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 589
 </script>
567 590
 <template>
568 591
   <div class="">
@@ -582,9 +605,9 @@ function openTestLog(element) {
582 605
         暂无商品,去添加喜欢的商品
583 606
       </div>
584 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 611
         <div v-for="(shopItem, index) in shopping.list" :key="index" class="bg-white rounded-lg  ">
589 612
           <div class="f-hairline-bottom flex  items-center font-bold p-3">
590 613
             <div @tap.stop="handleShopTitleClick(shopItem)">
@@ -639,7 +662,7 @@ function openTestLog(element) {
639 662
       <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
640 663
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
641 664
         <div>
642
-          猜你喜欢
665
+          精品推荐
643 666
         </div>
644 667
         <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
645 668
       </div>
@@ -698,28 +721,32 @@ page {
698 721
   border-radius: 10px;
699 722
   height: 38rpx;
700 723
   line-height: 38rpx;
701
-  font-size: 28rpx;
702
-  color: #666666;
724
+  font-size: 24rpx;
725
+  color: #919191;
703 726
   display: flex;
704 727
 }
705 728
 
706 729
 .m-live {
707 730
   max-width: 350rpx;
708
-  margin-left: 4rpx;
731
+  margin-left: 8rpx;
709 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 741
 .m-lift {
716
-  margin-left: 4rpx;
717
-  margin-right: 4rpx;
742
+  margin-left: 8rpx;
743
+  margin-right: 8rpx;
718 744
 }
719 745
 
720 746
 .thumbnail_1 {
721
-  width: 24rpx;
722
-  height: 14rpx;
747
+  width: 12rpx;
748
+  height: 7rpx;
749
+  margin-bottom: 6rpx;
723 750
 }
724 751
 </style>
725 752
 <route lang="yaml">

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

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

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

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

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

@@ -1,32 +1,23 @@
1 1
 <template>
2 2
   <CXBBasePage>
3 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 13
       <div class="p-3">
14
+        <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
21 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 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 21
                 <div class="text-sm p-2 flex flex-col gap-2">
31 22
                   <div class="line-clamp-2">
32 23
                     {{ item.store_name }}
@@ -37,7 +28,7 @@
37 28
                   </div>
38 29
                   <div class="line-through text-xs font-bold text-gray-400 flex ">
39 30
                     <div>
40
-                      ¥ {{item.ot_price}}
31
+                      ¥ {{ item.ot_price }}
41 32
                     </div>
42 33
                   </div>
43 34
                 </div>
@@ -52,15 +43,15 @@
52 43
 
53 44
 <script setup lang="ts">
54 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 49
 const state = reactive({
59 50
   currentPage: 1,
60 51
   pageSize: 10,
61 52
   totalPage: 1,
62 53
   banners: [],
63
-  keyword: '' ,
54
+  keyword: '',
64 55
   status: 'noMore',
65 56
   indicatorDots: true,
66 57
   circular: true,
@@ -68,61 +59,61 @@ const state = reactive({
68 59
   interval: 5000,
69 60
   duration: 500,
70 61
   currents: "0",
71
-  title:'',
72
-  type:'',
62
+  title: '',
63
+  type: '',
73 64
 })
74
-const list = ref()
65
+const list = ref([])
75 66
 
76 67
 function handleItemClick(item) {
77 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 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 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 142
 onPullDownRefresh(() => {
152
-  loadList('reload', function() {
143
+  loadList('reload', function () {
153 144
     setTimeout(() => {
154 145
       uni.stopPullDownRefresh()
155 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 170
 </script>
167 171
 
168 172
 <route lang="yaml">

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

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

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

@@ -64,7 +64,7 @@ function onOk() {
64 64
     </div>
65 65
 
66 66
     <div class="fixed bottom-0 pb-safe w-full">
67
-      <div class="px-10 ">
67
+      <div class="px-10 py-4 ">
68 68
         <div
69 69
             @tap="handleLogout"
70 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 57
       <div class="line-clamp-2">
58 58
         {{item.store_name}}
59 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 62
         <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
62 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 65
           <div>
65 66
             养老金 ¥{{item.yanglao || item.yanglao_price}}
66 67
           </div>
67 68
         </div>
68 69
       </div>
70
+      </div>
71
+      
69 72
       <div class="flex flex-row items-center gap-2">
70 73
         <div v-if="is148Merchant && item.price" class="flex justify-end items-end gap-2 text-[#FE0032]">
71 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 62
   cartNum: 1,
63 63
   cartCount: NaN,
64 64
   shareImage: '',
65
+  status: '', //加载状态
66
+  currentPage: 1,
67
+  pageSize: 10,
68
+  totalPage: 0
65 69
 })
66 70
 const detail: any = ref(null)
67 71
 const isTo = ref(3)
@@ -94,9 +98,29 @@ uni.showShareMenu({
94 98
   withShareTicket: true,
95 99
   menus: ['shareAppMessage', 'shareTimeline']
96 100
 })
101
+
97 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 124
   uni.showLoading({
101 125
     title: '数据加载中',
102 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 144
   getShareId({ pid: state.id, type: 1 }).then(res => {
128 145
     state.shareId = res.share_id
@@ -142,7 +159,7 @@ function loadProductDetail() {
142 159
     if (res.status === 200) {
143 160
       detail.value = res.data
144 161
       console.log('我是detail', detail.value);
145
-
162
+      loadList('reload')
146 163
       state.shareImage = detail.value.image
147 164
       if (res && res.mer_id && res.mer_id === '148') {
148 165
         if (detail.value && detail.value.price) {
@@ -158,12 +175,10 @@ function loadProductDetail() {
158 175
           console.info(res)
159 176
         })
160 177
       }
161
-
162
-      // if (detail.value.mer_id === '148') {
163
-      // }
164 178
       uni.hideLoading()
165 179
     } else {
166 180
       isShow.value = true
181
+      loadList('reload')
167 182
       uni.setNavigationBarTitle({
168 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 325
 // const skuData = computed(() => {
262 326
 //   const skuList = []
263 327
 //   if (detail.value && detail.sku) {
@@ -272,6 +336,7 @@ function loadCartCount() {
272 336
 //     }
273 337
 //   }
274 338
 // })
339
+
275 340
 const is148Merchant = computed(() => {
276 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 368
 function onSelectedSku(item: any) {
369
+  console.log('我是item', item);
370
+
304 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 386
 function handleCreateShopping() {
316 387
   // console.log(state.flag)
@@ -320,13 +391,13 @@ function handleCreateShopping() {
320 391
     // product_attr_unique: JSON.stringify(state.currentSku),
321 392
     product_attr_unique: state.currentSku.unique,
322 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 395
   }).then(res => {
325 396
     console.log('resres', res)
326 397
 
327 398
     if (res.cart_id) {
328 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 401
         isTo.value = state.flag
331 402
         console.log(isTo.value)
332 403
         uni.navigateTo({
@@ -370,15 +441,15 @@ function handleCreateShopping() {
370 441
     //       })
371 442
     // }
372 443
     console.log('我是error>>>', error);
373
-
444
+    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
374 445
     if (error === '请登录') {
375 446
       uni.showToast({
376 447
         title: '请登录',
377 448
         icon: 'none'
378 449
       })
379 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 454
       }, 500)
384 455
     } else {
@@ -424,15 +495,15 @@ function handleBuyshow() {
424 495
     //   })
425 496
     // }
426 497
     console.log('我是error>>>', error);
427
-
498
+    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
428 499
     if (error === '请登录') {
429 500
       uni.showToast({
430 501
         title: '请登录',
431 502
         icon: 'none'
432 503
       })
433 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 508
       }, 500)
438 509
     } else {
@@ -485,14 +556,16 @@ function handleAddshow() {
485 556
     //   })
486 557
     // }
487 558
     console.log('我是error>>>', error);
559
+    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
488 560
     if (error === '请登录') {
561
+
489 562
       uni.showToast({
490 563
         title: '请登录',
491 564
         icon: 'none'
492 565
       })
493 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 570
       }, 500)
498 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 592
 function handleTwobtn() {
508 593
   isTo.value = 2
509 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 603
  * @param flag //1表示立即购买;2表示加入购物车,3表示立即兑换
515 604
  */
516
-function handleOrderConfirm(flag: '1' | '2' | '3') {
605
+function handleOrderConfirm(flag: '1' | '2' | '3' | '5') {
517 606
   console.log('我是》》》》》》', userStore.uid);
518 607
 
519 608
   debounce(() => {
609
+    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
520 610
     if (!userStore.uid) {
521 611
       return uni.showToast({
522 612
         title: '请登录',
523 613
         icon: 'none'
524 614
       }).then(() => {
525 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 619
         }, 500)
530 620
 
531 621
       })
@@ -674,7 +764,7 @@ onPageScroll((page) => {
674 764
         <div class="flex flex-col">
675 765
           <div class="flex gap-2 items-center text-white">
676 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 768
             </div>
679 769
             <image :src="miaoshaIcon" mode="widthFix" class="w-10"></image>
680 770
           </div>
@@ -715,7 +805,7 @@ onPageScroll((page) => {
715 805
           </div>
716 806
           <div v-else>
717 807
             <div v-if="detail.price">
718
-              ¥ {{ detail.price }}
808
+              ¥ {{ detail.seckill_s == 0 ? detail.price : detail.dc_price }}
719 809
             </div>
720 810
           </div>
721 811
           <div v-if="!is148Merchant" class="line-through text-xs font-bold flex text-gray-600">
@@ -770,7 +860,17 @@ onPageScroll((page) => {
770 860
       </div>
771 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 874
       <template #title>
775 875
         <div class="flex items-center" v-if="state.currentSku">
776 876
           <div class="font-bold">规格:</div>
@@ -788,8 +888,8 @@ onPageScroll((page) => {
788 888
 
789 889
     <!-- 店铺信息 -->
790 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 893
       </div>
794 894
       <div class="flex flex-col gap-2 justify-center" v-if="detail && detail.merchant">
795 895
         <div class="flex text-xs items-center">
@@ -802,12 +902,12 @@ onPageScroll((page) => {
802 902
       </div>
803 903
 
804 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 906
       <div class="p-3">
807 907
         <div
808 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 909
           <div class="pl-2">
810
-            为你推荐
910
+            店铺推荐
811 911
           </div>
812 912
         </div>
813 913
       </div>
@@ -849,7 +949,7 @@ onPageScroll((page) => {
849 949
         <div
850 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 951
           <div class="pl-2">
852
-            猜你喜欢
952
+            精品推荐
853 953
           </div>
854 954
         </div>
855 955
       </div>
@@ -860,6 +960,14 @@ onPageScroll((page) => {
860 960
 
861 961
           </div>
862 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 971
       </div>
864 972
 
865 973
     </div>
@@ -883,17 +991,25 @@ onPageScroll((page) => {
883 991
         <div
884 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 993
           <div class="pl-2">
886
-            猜你喜欢
994
+            精品推荐
887 995
           </div>
888 996
         </div>
889 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 999
         <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
892 1000
           <div v-for="(item, index) in state.recommendList" :key="index" @click="handleProductItemClick(item)">
893 1001
             <MerchantProductCard :item="item" />
894 1002
 
895 1003
           </div>
896 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 1013
       </div>
898 1014
 
899 1015
     </div>
@@ -926,7 +1042,7 @@ onPageScroll((page) => {
926 1042
           <div class="text-[11px]">购物车</div>
927 1043
         </div>
928 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 1046
         <div @tap="handleAddCart" v-if="!is148Merchant"
931 1047
           class="bg-[#FFA319] rounded-full w-25 flex justify-center items-center h-9">
932 1048
           加入购物车
@@ -936,17 +1052,23 @@ onPageScroll((page) => {
936 1052
           <div v-else @click="handleOrderConfirm('1')">立即购买</div>
937 1053
         </div>
938 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 1064
         </div>
943
-      </div> -->
1065
+      </div>
944 1066
     </div>
945 1067
 
946 1068
 
947 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 1072
     @submit="handleCreateShopping" @count-change="handleCountChange" @subBuy="handleBuyshow" @subAdd="handleAddshow"
951 1073
     :isTo="isTo" />
952 1074
   <!--  <nut-sku-->
@@ -996,6 +1118,11 @@ page {
996 1118
   background-color: #f8f8f8;
997 1119
 }
998 1120
 
1121
+.img_full {
1122
+  width: 100%;
1123
+  height: 100%;
1124
+}
1125
+
999 1126
 button {
1000 1127
   margin: 0;
1001 1128
   padding: 0;
@@ -1011,12 +1138,12 @@ button::after {
1011 1138
 
1012 1139
 .box-out {
1013 1140
   background: #f8f8f8;
1014
-  height: 200px;
1141
+  height: 400rpx;
1015 1142
 }
1016 1143
 
1017 1144
 .flex-box {
1018 1145
   background: #ffffff;
1019
-  box-shadow: 3px;
1146
+  box-shadow: 6rpx;
1020 1147
   height: 80%;
1021 1148
   display: flex;
1022 1149
   flex-direction: column;
@@ -1030,8 +1157,8 @@ button::after {
1030 1157
 
1031 1158
 .sold-out {
1032 1159
   display: block;
1033
-  width: 120px;
1034
-  height: 120px;
1160
+  width: 240rpx;
1161
+  height: 240rpx;
1035 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 29
 import { useDebounceFn } from '@vueuse/core';
30 30
 import dayjs from "dayjs";
31 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 33
 import { getRecommendList } from "~/apis/merchant";
34 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 37
 const productId = ref('')
38 38
 //推荐商品列表
39 39
 let skuInfo = reactive({
40
-  recommendList: []
40
+  recommendList: [],
41
+  totalPage: 0,
42
+  pageSize: 10,
43
+  status: '',
44
+  currentPage: 1
41 45
 })
42 46
 
43 47
 const userStore = useUserStore()
@@ -86,7 +90,7 @@ onShow(() => {
86 90
   isSubmit.value = false
87 91
 })
88 92
 
89
-//猜你喜欢
93
+//精品推荐
90 94
 function YouLike() {
91 95
   getRecommendList({
92 96
     page: 1,
@@ -104,7 +108,7 @@ function soldOut() {
104 108
   uni.setNavigationBarTitle({
105 109
     title: '商品下架不存在'
106 110
   })
107
-  YouLike()
111
+  loadList('reload')
108 112
   uni.hideLoading()
109 113
 }
110 114
 
@@ -485,8 +489,8 @@ function handleProductItemClick(
485 489
 }
486 490
 
487 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 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 563
 </script>
510 564
 <template>
511 565
   <CXBBasePage>
@@ -585,7 +639,7 @@ onPageScroll((page) => {
585 639
           <div
586 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 641
             <div class="pl-2">
588
-              猜你喜欢
642
+              精品推荐
589 643
             </div>
590 644
           </div>
591 645
         </div>
@@ -596,13 +650,20 @@ onPageScroll((page) => {
596 650
 
597 651
             </div>
598 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 661
         </div>
600 662
 
601 663
       </div>
602 664
     </div>
603
-    
604
-  </CXBBasePage>
605 665
 
666
+  </CXBBasePage>
606 667
 </template>
607 668
 <style scoped>
608 669
 .box-out {

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

@@ -37,7 +37,7 @@
37 37
       <CXBEmpty text="您还没有收货地址" type="address" v-else/>
38 38
 
39 39
       <div class="fixed bottom-0 p-safe w-full bg-white ">
40
-        <div class="px-3">
40
+        <div class="p-3">
41 41
           <nut-button block type="primary" @click="handleCreateAddress">新建收货地址</nut-button>
42 42
         </div>
43 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 204
 function encodePhone(phone: string) {
207 205
   // let tel = '13600136000';
@@ -467,7 +465,7 @@ function handleShowMyRulePage() {
467 465
               <div class="text-xs">养老金</div>
468 466
             </div>
469 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 469
               <div class="text-xs">我的佣金</div>
472 470
             </div>
473 471
             <div @tap="handleShowMyIntegral" class="w-1/3  flex flex-col justify-center items-center">
@@ -477,7 +475,7 @@ function handleShowMyRulePage() {
477 475
           </div>
478 476
           <div v-if="userStore.userInfo" class="flex">
479 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 479
               <div class="text-xs">红积分提现</div>
482 480
             </div>
483 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 54
         code: result.code,
55 55
         source: 'cxb'
56 56
       }).then(unionRes => {
57
-        // console.log(unionRes)
57
+        console.log(111111,unionRes)
58 58
         // const shareId = Cache.get('SHARE_ID')
59
+        //存储openid
60
+        // userStore.setOpenid(unionRes.openid)
59 61
         let redirectPageObj: {page: string, type: 'page' | 'tab'}
60 62
         if (Cache.get('SHARE_REDIRECT_PAGE')) {
61 63
           redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
@@ -66,19 +68,21 @@ async function handleWexinLogin() {
66 68
           // params = Object.assign({}, params, { shareId })
67 69
         // }
68 70
         wechatCheck(unionRes.unionid).then(checkRes => {
69
-          // console.log(checkRes)
71
+          
70 72
           userStore.login(checkRes.token, checkRes.exp)
71 73
           userStore.setUID(checkRes.user.uid)
72 74
           userStore.setUserInfo(checkRes.user)
73 75
           // console.log(checkRes)
74 76
           uni.hideLoading();
75
-
77
+          console.log('我存在吗111',redirectPageObj);
76 78
             uni.showToast({
77 79
               title: '登录成功'
78 80
             }).then(() => {
79 81
               setTimeout(() => {
80
-
82
+                console.log('我存在吗222',redirectPageObj);
83
+                
81 84
                 if (redirectPageObj) {
85
+                  console.log('我存在吗333',redirectPageObj);
82 86
                   if (redirectPageObj.type === 'page') {
83 87
                     return uni.redirectTo({
84 88
                       url: redirectPageObj.page
@@ -90,7 +94,7 @@ async function handleWexinLogin() {
90 94
                     })
91 95
                   }
92 96
                 } else {
93
-                  console.log(state.key);
97
+                  console.log('我是key>>>aaa',state.key);
94 98
                   
95 99
                   switch (state.key) {
96 100
                     case '10': {
@@ -107,7 +111,7 @@ async function handleWexinLogin() {
107 111
                     }
108 112
                     case '1': {
109 113
                       uni.switchTab({
110
-                        url: '/pages/order_addcart/order_addcart'
114
+                        url: '/pages/order_addcart/index'
111 115
                       })
112 116
                       break;
113 117
                     }

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

@@ -1,33 +1,26 @@
1 1
 <template>
2 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 6
       <template #right>
10 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 10
       </template>
14 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 13
     </nut-input>
21 14
 
22 15
     <div class="flex w-full">
23 16
       <div class="p-3 w-full">
24 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 25
       </div>
33 26
 
@@ -38,8 +31,9 @@
38 31
 <script setup lang="ts">
39 32
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
40 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 35
 import Cache from "~/utils/cache";
36
+import { getUserUnionId } from "~/apis/user";
43 37
 const userStore = useUserStore()
44 38
 
45 39
 const state = reactive({
@@ -104,8 +98,28 @@ function handleViewXieyi(type: number) {
104 98
 }
105 99
 
106 100
 function handleLogin() {
101
+  uni.showLoading({
102
+    title: '登录中'
103
+  });
107 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 123
   let params = {
110 124
     phone: state.phone,
111 125
     sms_code: state.code,
@@ -117,17 +131,18 @@ function handleLogin() {
117 131
   authSmsLogin({
118 132
     ...params
119 133
   }).then(authRes => {
120
-    console.log(authRes)
134
+    console.log(111111, authRes)
121 135
     userStore.login(authRes.token, authRes.exp)
122 136
     userStore.setUID(authRes.user.uid)
123 137
     userStore.setUserInfo(authRes.user)
138
+    uni.hideLoading();
124 139
     uni.showToast({
125 140
       title: '登录成功',
126 141
       icon: 'none'
127 142
     })
128 143
     Cache.clear('SHARE_ID')
129 144
     state.isAuthVerify = false
130
-    let redirectPageObj: {page: string, type: 'page' | 'tab'}
145
+    let redirectPageObj: { page: string, type: 'page' | 'tab' }
131 146
     if (Cache.get('SHARE_REDIRECT_PAGE')) {
132 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 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 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 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 41
     </div>
39 42
     <div class="px-3" v-if="list && list.length > 0">
@@ -99,7 +102,7 @@ import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
99 102
 import FSearch from "~/components/FSearch/FSearch.vue";
100 103
 import { computed } from "vue";
101 104
 import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
102
-import { getVipAreaList } from "~/apis/merchant";
105
+import { getTypeProductList, getVipAreaList } from "~/apis/merchant";
103 106
 import { CDN_URL } from "~/config/app";
104 107
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
105 108
 import { getHomeBanner, getProductShare } from "~/apis/common";
@@ -132,13 +135,20 @@ const state = reactive({
132 135
   interval: 5000,
133 136
   duration: 500,
134 137
   currents: "0",
138
+  title: '',
139
+  type: '',
135 140
 })
136 141
 const list = ref([])
137 142
 const count = ref()
138 143
 
139 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 152
   if (option && option.shareId) {
143 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 171
     state.banners = res
162 172
   })
163 173
   loadList('reload')
@@ -204,35 +214,81 @@ onShareTimeline(() => {
204 214
 
205 215
 
206 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 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 294
 function handleItemClick(item) {
@@ -254,7 +310,7 @@ function handleScrollToLower() {
254 310
 }
255 311
 
256 312
 onReachBottom(() => {
257
-  // console.log('到底了。。。')
313
+  console.log('到底了。。。')
258 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 362
 </script>
301 363
 
302 364
 <route lang="yaml">
303 365
 style:
304
-  navigationBarTitleText: 一壶茶会员中心
366
+  navigationBarTitleText: 储蓄保
305 367
   enablePullDownRefresh: true
306 368
 </route>
307 369
 <style>
@@ -311,4 +373,9 @@ page {
311 373
   --nut-searchbar-input-background: #f8f8f8;
312 374
   --nut-searchbar-input-box-shadow: none;
313 375
 }
376
+
377
+
378
+.box_y {
379
+  border-radius: 20rpx;
380
+}
314 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 3
 export const useDacangStore = defineStore('dacangStore', {
4 4
     state: () => ({
5
-        currentClassify: '-1'
5
+        currentClassify: '-1',
6 6
     }),
7 7
     actions: {
8 8
         setClassify(classify: string) {
9 9
             // console.log('class' + classify)
10 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 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 7
 interface UserStoreState {
8 8
     userInfo: UserInfoModel
@@ -14,6 +14,7 @@ interface UserStoreState {
14 14
     yanglao: number,
15 15
     redirectPage: string | null,
16 16
     shareId: string | null
17
+    openid:string
17 18
 }
18 19
 
19 20
 export const useUserStore = defineStore('userStore', {
@@ -28,6 +29,7 @@ export const useUserStore = defineStore('userStore', {
28 29
         shareId: null,
29 30
         redirectPage: null,
30 31
         permissionList: null, // 权限列表
32
+        openid:Cache.get(OPEN_ID) || null
31 33
     }) as UserStoreState,
32 34
     actions: {
33 35
         // getYanglaojinStatistics().then(res => {
@@ -35,7 +37,7 @@ export const useUserStore = defineStore('userStore', {
35 37
         // })
36 38
         setRedirectPage(page: string, type: 'page' | 'tab') {
37 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 42
         setShareId(shareId: string) {
41 43
             this.shareId = shareId
@@ -70,8 +72,12 @@ export const useUserStore = defineStore('userStore', {
70 72
             this.token = null
71 73
             this.uid = null
72 74
             this.userInfo = null
75
+            //清空登录信息
76
+            Cache.clear(USER_INFO);
77
+            Cache.clear(OPEN_ID);
73 78
             Cache.clear(LOGIN_STATUS)
74 79
             Cache.clear(UID)
80
+            Cache.clear(SHARE_REDIRECT_PAGE)
75 81
         },
76 82
         setUID(uid: string) {
77 83
             this.uid = uid
@@ -80,7 +86,13 @@ export const useUserStore = defineStore('userStore', {
80 86
         setUserInfo(userInfo: UserInfoModel) {
81 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 96
             // Cache.set(USER_INFO, JSON.stringify(userInfo))
85 97
         },
86 98
         setToken(token: string) {