瀏覽代碼

feat: fix

Basil 2 年之前
父節點
當前提交
7764df5f50

+ 4 - 1
README.md

@@ -127,4 +127,7 @@ pnpm build:mp-weixin
127 127
     - [x] 退出登录
128 128
 
129 129
 
130
-登录 退出 商品展示 、购买、收益
130
+登录 退出 商品展示 、购买、收益
131
+
132
+
133
+ciyid 要传,不然出现请选择正确地址异常

+ 22 - 1
src/apis/user.ts

@@ -565,13 +565,34 @@ export function getUserYangLaoJin(): Promise<UserYanglaoJinModel> {
565 565
 }
566 566
 
567 567
 /**
568
+ * 获取养老金记录(线上/线下)
569
+ * @param params
570
+ */
571
+export function getUserYanglaoJinLog(params: {
572
+    page: number
573
+    limit: number
574
+    // 1 线下 0 线上
575
+    // source: '0' | '1'
576
+    source: string
577
+}): Promise<YanglaoLogXxResult> {
578
+    return defHttp.get({
579
+        url: API.GET_YANGLAO_LOG,
580
+        data: {
581
+            ...params
582
+        }
583
+    })
584
+}
585
+
586
+
587
+/**
568 588
  * 获取线下养老金记录
569 589
  */
570 590
 export function getUserYanglaoJinLogXx(params: {
571 591
     page: number
572 592
     limit: number
573 593
     // 1 线下 0 线上
574
-    source: '99'
594
+    // source: '0' | '1'
595
+    source: string
575 596
 }): Promise<YanglaoLogXxResult> {
576 597
     return defHttp.get({
577 598
         url: API.GET_YANGLAO_LOG

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

@@ -101,7 +101,7 @@ function handleCountChange(value) {
101 101
       v-model:show="showValue"
102 102
       @close="onCancel"
103 103
       position="bottom"
104
-      exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe h-min-[60%] max-h-[80%]"
104
+      exClass="rounded-rt-xl rounded-lt-xl flex flex-col pb-safe min-h-[70%] max-h-[80%] h-full"
105 105
 
106 106
   >
107 107
     <div class="flex flex-col justify-between h-full">
@@ -114,7 +114,7 @@ function handleCountChange(value) {
114 114
             <div class="flex flex-col w-full">
115 115
 
116 116
               <div class="flex gap-2 justify-between w-full">
117
-                <div class="text-overflow text-xs flex-1" v-if="detail && detail.store_name">
117
+                <div class="text-overflow text-xs flex-1 line-clamp-2 h-fit" v-if="detail && detail.store_name">
118 118
                   {{ detail.store_name }}
119 119
                 </div>
120 120
                 <div
@@ -155,7 +155,7 @@ function handleCountChange(value) {
155 155
               >
156 156
                 <div
157 157
                     v-if="item.sku && item.sku !== ''"
158
-                    class="text-[12px] border border-solid rounded p-1 px-2 "
158
+                    class="text-[11px] border border-solid rounded p-1 px-1 "
159 159
                     :class="currentSku.unique === item.unique ? 'border-primary text-primary' : 'border-gray-500 text-gray-500'"
160 160
                 >
161 161
                   {{ item.sku }}

+ 2 - 2
src/components/CXBYaojinTag/CXBYaojinTag.vue

@@ -1,7 +1,7 @@
1 1
 <script setup lang="ts">
2 2
 const props = defineProps({
3 3
   amount: {
4
-    type: Number,
4
+    type: String,
5 5
     required: true
6 6
   }
7 7
 })
@@ -9,7 +9,7 @@ const props = defineProps({
9 9
 <template>
10 10
   <div class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit h-4">
11 11
     <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
12
-           mode="widthFix" class="!w-7"></image>
12
+           mode="widthFix" class="!w-7 h-4"></image>
13 13
     <div class="px-2 flex items-center jusitify-center text-[11px]">
14 14
       <div>
15 15
         养老金 ¥{{ amount }}

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


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

@@ -42,9 +42,7 @@ watch(() => cashWithdrawalAmount.value, (val) => {
42 42
     getWithdrawalService({
43 43
       money: val
44 44
     }).then(res => {
45
-      // console.log(res)
46 45
       withdrawalCal.value = res
47
-      console.log(res)
48 46
     })
49 47
   } else {
50 48
     isDisabled.value = true
@@ -52,7 +50,7 @@ watch(() => cashWithdrawalAmount.value, (val) => {
52 50
   }
53 51
 })
54 52
 function handleInputAll() {
55
-  console.log(userSpreadInfo.value?.brokerage_price)
53
+  // console.log(userSpreadInfo.value?.brokerage_price)
56 54
   if (userSpreadInfo.value && userSpreadInfo.value.brokerage_price && Number.parseFloat(userSpreadInfo.value?.brokerage_price) >= 100 ) {
57 55
     cashWithdrawalAmount.value = userSpreadInfo.value.brokerage_price
58 56
   } else {
@@ -69,7 +67,6 @@ function handleImmediateWithdrawal() {
69 67
   if (isDisabled.value) {
70 68
     return
71 69
   }
72
-  console.log(yanglaojin.value)
73 70
   // 1 判断是否需要实名
74 71
   if (!yanglaojin.value?.is_certification == 1) {
75 72
     return uni.navigateTo({
@@ -92,7 +89,7 @@ function handleImmediateWithdrawal() {
92 89
       icon: 'none'
93 90
     })
94 91
   }
95
-  if (cashWithdrawalAmount.value > userSpreadInfo.value?.brokerage_price ) {
92
+  if (Number.parseFloat(cashWithdrawalAmount.value) > Number.parseFloat(userSpreadInfo.value?.brokerage_price) ) {
96 93
     isDisabled.value = true
97 94
     return uni.showToast({
98 95
       title: '输入金额超过可提现余额',

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

@@ -28,7 +28,7 @@ function loadSignInInfo() {
28 28
     console.log(res)
29 29
     const {today, day} = res
30 30
     state.signToday = day
31
-    if (today === 0) {
31
+    if (today == 0) {
32 32
       state.isShowSignIn = true
33 33
     }
34 34
     // // if (today === 0) {

+ 106 - 93
src/pages/my-integral/user-invation.vue

@@ -123,8 +123,9 @@ function shareImage() {
123 123
 }
124 124
 </script>
125 125
 <template>
126
-    <div class="relative top-0 left-0 min-h-screen h-full w-screen bg-[#FFCB75] z-0 ">
127
-      <image :src="invite_friends_bg" mode="widthFix" class="w-full h-full absolute"></image>
126
+<!--      <image :src="invite_friends_bg" mode="widthFix" class="w-screen h-full absolute"></image>-->
127
+  <div class="w-screen overflow-x-hidden  h-full">
128
+    <div class="invite_friends_bg relative  top-0 left-0">
128 129
       <image
129 130
           @click="handleShowAgreement(17)"
130 131
           :src="huodongshuomingImg" mode="widthFix" class="w-10 absolute top-0 right-3"></image>
@@ -134,136 +135,148 @@ function shareImage() {
134 135
         邀请码
135 136
       </div>
136 137
 
137
-      <nut-dialog title="邀请码"  v-model:visible="showDialog" @cancel="onCancel" @ok="onOk" >
138
-        <template>
139
-          <input v-model="inviteCode" class="border border-solid border-1px rounded h-10" placeholder="请输入推荐人邀请码"/>
140
-        </template>
141
-      </nut-dialog>
142
-
143
-      <div class="relative top-120 text-white flex flex-col items-center justify-center pb-30">
144
-        <div class=" w-full h-10 relative flex justify-center items-center">
145
-          <div class="relative w-60 text-center z-1 h-10 absolute top-2">
146
-            立即邀请
147
-          </div>
148
-          <image :src="buttonImg" mode="widthFix" class="w-60 h-10 absolute top-0"></image>
138
+    </div>
139
+    <div class="relative  text-white flex flex-col items-center justify-center pb-30">
140
+      <div class="button_bg flex flex-col items-center" @tap.stop="shareImage">
141
+        <div class="flex pt-3.5">
142
+          立即邀请
149 143
         </div>
150
-        <div class="text-primary text-[12px] relative py-3">我的邀请码:{{ userStore && userStore.userInfo && userStore.userInfo.user_number }}</div>
151
-        <div class="relative w-full flex items-center">
152
-          <div class="w-full px-3 flex justify-center items-center  text-gray-600 text-[12px]">
153
-            <div class="integral_bg">
154
-              <div class="pt-20 flex flex-col gap-3 px-5 h-48 ">
155
-                <div class="bg-[#ffedc6] flex justify-around items-center flex-1 ">
156
-                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center gap-2">
157
-                    <div>首次邀请好友</div>
158
-                    <div class="flex gap-1  ">
159
-                      <text>奖励<text class="text-primary text-xl font-bold">99</text>积分</text>
160
-                    </div>
144
+      </div>
145
+      <div class="text-primary text-[12px] relative pb-3">我的邀请码:{{ userStore && userStore.userInfo && userStore.userInfo.user_number }}</div>
146
+      <div class="relative  flex items-center">
147
+        <div class=" px-3 flex justify-center items-center  text-gray-600 text-[12px]">
148
+          <div class="integral_bg">
149
+            <div class="pt-20 flex flex-col gap-3 px-5 h-48 ">
150
+              <div class="bg-[#ffedc6] flex justify-around items-center flex-1 ">
151
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center gap-2">
152
+                  <div>首次邀请好友</div>
153
+                  <div class="flex gap-1  ">
154
+                    <text>奖励<text class="text-primary text-xl font-bold">99</text>积分</text>
161 155
                   </div>
162
-                  <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
163
-                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
164
-                    <div>好友首次获得养老金</div>
165
-                    <div class="flex gap-1  ">
166
-                      <text>奖励<text class="text-primary text-xl font-bold">350</text>积分</text>
167
-                    </div>
156
+                </div>
157
+                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
158
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
159
+                  <div>好友首次获得养老金</div>
160
+                  <div class="flex gap-1  ">
161
+                    <text>奖励<text class="text-primary text-xl font-bold">350</text>积分</text>
168 162
                   </div>
169 163
                 </div>
164
+              </div>
170 165
 
171
-                <div class="bg-[#ffedc6] flex justify-around items-center flex-1">
172
-                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
173
-                    <div>好友签到3天</div>
174
-                    <div class="flex gap-1  ">
175
-                      <text>奖励<text class="text-primary text-xl font-bold">50</text>积分</text>
176
-                    </div>
166
+              <div class="bg-[#ffedc6] flex justify-around items-center flex-1">
167
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
168
+                  <div>好友签到3天</div>
169
+                  <div class="flex gap-1  ">
170
+                    <text>奖励<text class="text-primary text-xl font-bold">50</text>积分</text>
177 171
                   </div>
178
-                  <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
179
-                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
180
-                    <div>好友签到14天</div>
181
-                    <div class="flex gap-1  ">
182
-                      <text>奖励<text class="text-primary text-xl font-bold">100</text>积分</text>
183
-                    </div>
172
+                </div>
173
+                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
174
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
175
+                  <div>好友签到14天</div>
176
+                  <div class="flex gap-1  ">
177
+                    <text>奖励<text class="text-primary text-xl font-bold">100</text>积分</text>
184 178
                   </div>
185
-                  <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
186
-                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
187
-                    <div>好友签到30天</div>
188
-                    <div class="flex gap-1  ">
189
-                      <text>奖励<text class="text-primary text-xl font-bold">300</text>积分</text>
190
-                    </div>
179
+                </div>
180
+                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
181
+                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
182
+                  <div>好友签到30天</div>
183
+                  <div class="flex gap-1  ">
184
+                    <text>奖励<text class="text-primary text-xl font-bold">300</text>积分</text>
191 185
                   </div>
192 186
                 </div>
193
-
194 187
               </div>
195 188
 
196 189
             </div>
197 190
 
198
-
199
-            <!--          <image :src="integral_bg" mode="widthFix" class="w-full h-full relative"></image>-->
200
-
201 191
           </div>
192
+
202 193
         </div>
203
-        <div class="relative w-full">
204
-          <div class="px-4">
205
-            <div class="bg-[#F8F8F8] rounded-lg h-60 text-gray-500">
206
-              <div class="bg-[#FDF5E8] rounded-t-lg flex items-center justify-center py-2">
207
-                <image :src="goodFriendImg" mode="widthFix" class="w-50"></image>
208
-              </div>
209
-              <div v-if="invitePartnerModel && invitePartnerModel.userInviteVoList && invitePartnerModel.userInviteVoList.list.length > 0">
210
-                <swiper autoplay vertical :circular="true" :display-multiple-items="4" class="w-auto h-46">
211
-                  <swiper-item  v-for="(item, index) in invitePartnerModel.userInviteVoList.list" :key="index" class="w-auto text-[12px] h-auto">
212
-                    <div class="p-3 h-30 flex justify-between  f-hairline-bottom">
213
-                      <div class="flex gap-2">
214
-                        <image :src="item.avatar" mode="widthFix" class="w-8 h-8"></image>
215
-                        <div class="flex flex-col">
216
-                          <div class="font-bold">{{ item.nickname }}</div>
217
-                          <div>{{ encodePhone( item.phone ) }}</div>
218
-                        </div>
194
+      </div>
195
+      <div class="relative w-full mt-3">
196
+        <div class="px-4">
197
+          <div class="bg-[#F8F8F8] rounded-lg h-60 text-gray-500">
198
+            <div class="bg-[#FDF5E8] rounded-t-lg flex items-center justify-center py-2">
199
+              <image :src="goodFriendImg" mode="widthFix" class="w-50"></image>
200
+            </div>
201
+            <div v-if="invitePartnerModel && invitePartnerModel.userInviteVoList && invitePartnerModel.userInviteVoList.list.length > 0">
202
+              <swiper autoplay vertical :circular="true" :display-multiple-items="4" class="w-auto h-46">
203
+                <swiper-item  v-for="(item, index) in invitePartnerModel.userInviteVoList.list" :key="index" class="w-auto text-[12px] h-auto">
204
+                  <div class="p-3 h-30 flex justify-between  f-hairline-bottom">
205
+                    <div class="flex gap-2">
206
+                      <image :src="item.avatar" mode="widthFix" class="w-8 h-8"></image>
207
+                      <div class="flex flex-col">
208
+                        <div class="font-bold">{{ item.nickname }}</div>
209
+                        <div>{{ encodePhone( item.phone ) }}</div>
219 210
                       </div>
211
+                    </div>
220 212
 
221
-                      <div class="text-gray">{{ item.promoterTime }}</div>
213
+                    <div class="text-gray">{{ item.promoterTime }}</div>
222 214
 
223 215
 
224
-                    </div>
225
-                  </swiper-item>
226
-                </swiper>
227
-              </div>
228
-
229
-              <div v-else class="flex justify-center items-center text-[12px] text-gray h-48">
230
-                竟然没有好友
231
-              </div>
216
+                  </div>
217
+                </swiper-item>
218
+              </swiper>
232 219
             </div>
233 220
 
221
+            <div v-else class="flex justify-center items-center text-[12px] text-gray h-48">
222
+              竟然没有好友
223
+            </div>
234 224
           </div>
235 225
 
236 226
         </div>
237
-        <div class="relative w-full text-[12px] py-5 text-black flex justify-center items-center">
238
-          <div class="flex gap-4">
239
-            <div
240
-                @click="shareImage"
241
-                class="flex flex-col justify-center items-center gap-3">
242
-              <image :src="wexinLogo" mode="widthFix" class="w-10 h-10"></image>
243
-              <div>微信</div>
244
-            </div>
245
-            <div
246
-                @click="handleShowCode"
247
-                class="flex flex-col justify-center items-center gap-3">
248
-              <image :src="smLogo" mode="widthFix" class="w-10 h-10"></image>
249
-              <div>面对面扫码</div>
250
-            </div>
227
+
228
+      </div>
229
+      <div class="relative w-full text-[12px] py-5 text-black flex justify-center items-center">
230
+        <div class="flex gap-4">
231
+          <div
232
+              @click="shareImage"
233
+              class="flex flex-col justify-center items-center gap-3">
234
+            <image :src="wexinLogo" mode="widthFix" class="w-10 h-10"></image>
235
+            <div>微信</div>
236
+          </div>
237
+          <div
238
+              @click="handleShowCode"
239
+              class="flex flex-col justify-center items-center gap-3">
240
+            <image :src="smLogo" mode="widthFix" class="w-10 h-10"></image>
241
+            <div>面对面扫码</div>
251 242
           </div>
252 243
         </div>
253 244
       </div>
254
-
255 245
     </div>
256 246
 
247
+    <nut-dialog title="邀请码"  v-model:visible="showDialog" @cancel="onCancel" @ok="onOk" >
248
+      <template>
249
+        <input v-model="inviteCode" class="border border-solid border-1px rounded h-10" placeholder="请输入推荐人邀请码"/>
250
+      </template>
251
+    </nut-dialog>
252
+  </div>
253
+
257 254
 </template>
258 255
 
259 256
 <style>
257
+.invite_friends_bg {
258
+  overflow: hidden;
259
+  width: 750rpx;
260
+  height: 994rpx;
261
+  background-image: url('https://cdn.bjtdba.com/chuxubao/static/assets/invite_friends_bg_220826.png');
262
+  background-size: 100% 100%;
263
+}
260 264
 .integral_bg {
265
+  overflow: hidden;
261 266
   width: 710rpx;
262 267
   height: 591rpx;
263 268
   background-image: url('https://cdn.bjtdba.com/vod/image/2023-09-18/20230918140610841.png');
264 269
   background-size: 100% 100%;
265 270
 }
271
+.button_bg {
272
+  width: 630rpx;
273
+  height: 124rpx;
274
+  background-image: url('https://cdn.bjtdba.com/chuxubao/static/assets/invitation_button_220826.png');
275
+  background-size: 100% 100%;
276
+
277
+}
266 278
 page {
279
+  overflow-x: hidden;
267 280
   background: #ffcb75;
268 281
 }
269 282
 

+ 107 - 36
src/pages/order-confirm/index.vue

@@ -1,7 +1,7 @@
1 1
 <script setup lang="ts">
2 2
 import {getUserAddressDetail, getUserAddressList, getUserVipInfo} from "~/apis/user";
3 3
 import {reactive} from "vue";
4
-import {checkProductDaCang, CreateOrderRequest, orderCheck, orderCreate} from "~/apis/order.api";
4
+import {cartChange, checkProductDaCang, CreateOrderRequest, orderCheck, orderCreate} from "~/apis/order.api";
5 5
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
6 6
 import FPrice from "~/components/FPrice/FPrice.vue";
7 7
 import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
@@ -44,6 +44,8 @@ onLoad(async (options) => {
44 44
   if (options && options.product_id) {
45 45
     data.productId = options.product_id
46 46
   }
47
+
48
+  console.log(data)
47 49
   // if (options && options.addressId) {
48 50
   //   // getUserAddressDetail(options.addressId).then(res => {
49 51
   //   //   data.addressInfo = res
@@ -77,6 +79,10 @@ onLoad(async (options) => {
77 79
   //   console.log(res)
78 80
   // })
79 81
   /// 获取订单商品数据
82
+  uni.showLoading({
83
+    title: '数据加载中',
84
+    icon: 'none'
85
+  })
80 86
   orderCheck({
81 87
     cart_id: data.cartId.split(','),
82 88
     address_id: data.addressId
@@ -87,7 +93,10 @@ onLoad(async (options) => {
87 93
     data.totalPrice = res.order_price
88 94
     data.orderStatus = res.status
89 95
     // data.proPrice = res.proPrice
96
+    uni.hideLoading()
97
+
90 98
   }).catch(error => {
99
+    uni.hideLoading()
91 100
     console.log(error + '----')
92 101
     uni.showToast({
93 102
       title: error,
@@ -182,9 +191,58 @@ function handleAddressSelect() {
182 191
     url: '/pages/user/address/index?from=order'
183 192
   })
184 193
 }
194
+function handleNumberChange(num, goodItem) {
195
+  console.log(goodItem)
196
+  uni.showLoading()
197
+  console.log(num)
198
+  cartChange(goodItem.cart_id, num).then(res => {
199
+    reTotal()
200
+    uni.hideLoading()
201
+  })
202
+}
203
+
204
+function reTotal() {
205
+  orderCheck({
206
+    cart_id: data.cartId.split(','),
207
+    address_id: data.addressId
208
+  }).then(res => {
209
+    console.log(res)
210
+    data.is_dacang_vip_product = res.is_dacang_vip_product
211
+    data.cartOrder = res.order
212
+    data.totalPrice = res.order_price
213
+    data.orderStatus = res.status
214
+    // data.proPrice = res.proPrice
215
+    uni.hideLoading()
216
+
217
+  }).catch(error => {
218
+    uni.hideLoading()
219
+    console.log(error + '----')
220
+    uni.showToast({
221
+      title: error,
222
+      icon: 'none'
223
+    })
224
+  })
225
+  // let allArr = []
226
+  // let totalMoney = 0
227
+  // let totalNum = 0
228
+
229
+  // shopping.value?.list.forEach((goods, index) => {
230
+  //   // 总金额|总数
231
+  //   goods.list.forEach(goodItem => {
232
+  //     if (goodItem.check) {
233
+  //       totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
234
+  //       totalNum += Number.parseFloat(goodItem.cart_num)
235
+  //       // state.cart_id.push(goodItem.cart_id)
236
+  //     }
237
+  //   })
238
+  // })
239
+  //
240
+  // // isAllSelect.value = allArr.length === shopping.value?.list.length
241
+  // // state.totalCartCount = totalNum
242
+  // state.totalPrice = totalMoney
243
+}
185 244
 </script>
186 245
 <template>
187
-  <CXBBasePage>
188 246
     <div class="p-3 flex flex-col gap-3 pb-safe">
189 247
       <div
190 248
           @click="handleAddressSelect"
@@ -197,7 +255,7 @@ function handleAddressSelect() {
197 255
                   <image :src="addressIcon" mode="aspectFit" class="w-4 h-4"></image>
198 256
                 </div>
199 257
                 <div class="flex-1 flex">
200
-                  {{ data.addressInfo.province + ' ' + data.addressInfo.city + ' ' + data.addressInfo.district }}
258
+                  {{ data.addressInfo.province + ' ' + data.addressInfo.city + ' ' + data.addressInfo.district + ' ' + data.addressInfo.detail }}
201 259
                 </div>
202 260
               </div>
203 261
 
@@ -217,7 +275,7 @@ function handleAddressSelect() {
217 275
         </div>
218 276
       </div>
219 277
 
220
-      <div class="pb-10">
278
+      <div class="pb-15">
221 279
         <div v-for="(item, index) in data.cartOrder" :key="index"
222 280
              class=" bg-white rounded"
223 281
         >
@@ -234,42 +292,50 @@ function handleAddressSelect() {
234 292
 
235 293
               </div>
236 294
               <div class="flex flex-col ">
237
-                <div class="flex flex-col text-sm">
238
-                  {{ orderProductItem.product.store_name }}
295
+                <div class="flex flex-col ">
296
+                  <div class="line-clamp-2 text-xs">
297
+                    {{ orderProductItem.product.store_name }}
298
+                  </div>
239 299
                   <div class="text-[11px] text-gray-500">{{ orderProductItem.productAttr.sku }}</div>
240 300
                 </div>
241
-                <FPrice :price="orderProductItem.productAttr.price" v-if="item.mer_id != '148'"></FPrice>
242
-                <FPrice :price="orderProductItem.productAttr.price * 30" v-if="item.mer_id == '148'"></FPrice>
243
-                <CXBYaojinTag :amount="orderProductItem.yanglao" v-if="item.mer_id != '148'"/>
301
+                <div class="flex">
302
+                  <CXBYaojinTag :amount="orderProductItem.yanglao" v-if="item.mer_id != '148'"/>
244 303
 
304
+                </div>
305
+                <div class="flex justify-between">
306
+                  <FPrice :price="orderProductItem.productAttr.price" v-if="item.mer_id != '148'"></FPrice>
307
+                  <FPrice :price="orderProductItem.productAttr.price * 30" v-if="item.mer_id == '148'"></FPrice>
308
+                  <nut-input-number v-model="orderProductItem.cart_num" @change="(num) => handleNumberChange(num, orderProductItem)"/>
309
+
310
+                </div>
245 311
               </div>
246 312
 
247 313
             </div>
248 314
 
249
-            <div>
250
-              <FCell
251
-                  v-if="item.mer_id != '148'"
252
-                  title="优惠劵"
253
-                  :value="item.order.coupon_price ? item.order.coupon_price : '暂无优惠券'"
254
-                  arrow
255
-              ></FCell>
256
-              <FCell
257
-                  v-if="item.mer_id == '148'"
258
-                  title="积分"
259
-                  :value="userStore.userInfo.score ? userStore.userInfo.score : '暂无积分'"
260
-                  arrow
261
-              ></FCell>
262
-              <FCell
263
-                  title="运费"
264
-                  :value="item.order.postage_price > 0 ? item.order.postage_price : '免运费'"
265
-                  arrow
266
-              ></FCell>
267
-              <FCell
268
-                  title="留言"
269
-                  value="建议留言前先与商家沟通确认"
270
-                  arrow
271
-              ></FCell>
272
-            </div>
315
+          </div>
316
+          <div>
317
+            <FCell
318
+                v-if="item.mer_id != '148'"
319
+                title="优惠劵"
320
+                :value="item.order.coupon_price ? item.order.coupon_price : '暂无优惠券'"
321
+                arrow
322
+            ></FCell>
323
+            <FCell
324
+                v-if="item.mer_id == '148'"
325
+                title="积分"
326
+                :value="userStore.userInfo.score ? userStore.userInfo.score : '暂无积分'"
327
+                arrow
328
+            ></FCell>
329
+            <FCell
330
+                title="运费"
331
+                :value="item.order.postage_price > 0 ? item.order.postage_price : '免运费'"
332
+                arrow
333
+            ></FCell>
334
+            <FCell
335
+                title="留言"
336
+                value="建议留言前先与商家沟通确认"
337
+                arrow
338
+            ></FCell>
273 339
           </div>
274 340
 
275 341
         </div>
@@ -284,15 +350,20 @@ function handleAddressSelect() {
284 350
          <FPrice  v-else :price="data.totalPrice"></FPrice>
285 351
         </div>
286 352
         <div class="flex">
287
-          <nut-button type="primary" size="small" @click="handleSubmit">提交订单</nut-button>
353
+          <nut-button type="primary" @click="handleSubmit">提交订单</nut-button>
288 354
         </div>
289 355
       </div>
290 356
 
291 357
     </div>
292
-  </CXBBasePage>
293 358
 </template>
294 359
 
295 360
 <route lang="yaml">
296 361
 style:
297 362
   navigationBarTitleText: 提交订单
298
-</route>
363
+</route>
364
+
365
+<style>
366
+page {
367
+  background: #f8f8f8;
368
+}
369
+</style>

+ 13 - 0
src/pages/order/components/AllItemList.vue

@@ -4,6 +4,12 @@ import OrderItem from "~/pages/order/components/OrderItem.vue";
4 4
 import OtherOrderItem from "~/pages/order/components/OtherOrderItem.vue";
5 5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6 6
 
7
+const props = defineProps({
8
+  tabValue: {
9
+    type: Number,
10
+    default: 0
11
+  }
12
+})
7 13
 const state = reactive({
8 14
   currentPage: 1,
9 15
   pageSize: 10,
@@ -78,6 +84,13 @@ function handleScrollToLower() {
78 84
 // })
79 85
 onMounted(() => {
80 86
   loadList('reload')
87
+  uni.$on('orderCancelFromList', () => {
88
+    // loadAllOrderList()
89
+    loadList('reload')
90
+    // state.tabvalue = 0
91
+  })
92
+
93
+
81 94
   uni.$on('onTab0ReachBottom', () => {
82 95
     console.log('alll...')
83 96
     handleScrollToLower()

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

@@ -4,7 +4,12 @@ import OrderItem from "~/pages/order/components/OrderItem.vue";
4 4
 import OtherOrderItem from "~/pages/order/components/OtherOrderItem.vue";
5 5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6 6
 import OrderObligationItem from "~/pages/order/components/OrderObligationItem.vue";
7
-
7
+const props = defineProps({
8
+  tabValue: {
9
+    type: Number,
10
+    default: 0
11
+  }
12
+})
8 13
 const state = reactive({
9 14
   currentPage: 1,
10 15
   pageSize: 10,
@@ -60,6 +65,13 @@ function handleScrollToLower() {
60 65
 
61 66
 onMounted(() => {
62 67
   loadList('reload')
68
+  uni.$on('orderCancelFromList', () => {
69
+    // loadAllOrderList()
70
+    loadList('reload')
71
+    // uni.$emit('orderCancelFromList', 1)
72
+    // state.tabvalue = 0
73
+  })
74
+
63 75
   uni.$on('onTab1ReachBottom', handleScrollToLower)
64 76
   uni.$on('onTab1PullDownRefresh', () => {
65 77
     loadList('reload', items => {

+ 10 - 4
src/pages/order/components/OrderItem.vue

@@ -18,7 +18,12 @@ const props = defineProps({
18 18
   },
19 19
   status: {
20 20
     type: Number,
21
+  },
22
+  tabValue: {
23
+    type: Number,
24
+    default: 0
21 25
   }
26
+
22 27
 })
23 28
 
24 29
 // function detailOrderList(p) {}
@@ -83,7 +88,8 @@ function handleCancelOrder() {
83 88
         icon: 'none'
84 89
       })
85 90
 
86
-      uni.$emit('orderCancelFromList')
91
+      // if (props.tabValue)
92
+      uni.$emit('orderCancelFromList', props.tabValue)
87 93
 
88 94
     }, 300)
89 95
 
@@ -161,7 +167,7 @@ function handleProductItemClick(
161 167
   //     url: `${otherDetailUrl}?params=${params}`
162 168
   //   })
163 169
   // }
164
-  console.log(item)
170
+  // console.log(item)
165 171
   // 大仓
166 172
   uni.navigateTo({
167 173
     url: `/pages/store/product/detail?id=${item.orderProduct[0].product_id}`
@@ -186,7 +192,7 @@ function handleShowObligationOrderDetail(orderItem) {
186 192
 <template>
187 193
   <div class="mb-3 bg-white rounded p-3">
188 194
     <div
189
-        @click.stop="handleHeaderClick"
195
+        @stop.stop="handleHeaderClick"
190 196
         class="flex items-center justify-between f-hairline-bottom pb-3">
191 197
       <div class="flex items-center font-bold gap-2 text-sm justify-between">
192 198
         <div class="flex-1 flex items-center gap-2">
@@ -280,7 +286,7 @@ function handleShowObligationOrderDetail(orderItem) {
280 286
 
281 287
           </div>
282 288
           <div class="flex justify-end gap-2" v-if="orderItem.status == 5">
283
-            <nut-button size="small" type="default" @click="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
289
+            <nut-button size="small" type="default" @tap.stop="handleCancelOrder"><div class="text-black">取消订单</div></nut-button>
284 290
             <nut-button size="small" plain type="primary" @tap.stop="handlePayment">立即支付</nut-button>
285 291
 
286 292
           </div>

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

@@ -222,7 +222,8 @@ function handleShowObligationOrderDetail(orderItem) {
222 222
               </div>
223 223
 
224 224
               <div class="flex flex-col justify-center items-center">
225
-                <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
225
+<!--                <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
226
+                <FPrice :price="orderProduct.cart_info.productAttr.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
226 227
                 <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
227 228
               </div>
228 229
 

+ 19 - 3
src/pages/order/detail.vue

@@ -142,9 +142,26 @@ const payType = computed(() => {
142 142
     return '积分兑换'
143 143
   }
144 144
 })
145
+
146
+function handleProductItemClick(
147
+    item
148
+) {
149
+  // function navigateToDetail(params) {
150
+  //   let otherDetailUrl = `/pages/store/product/other`
151
+  //   return uni.navigateTo({
152
+  //     url: `${otherDetailUrl}?params=${params}`
153
+  //   })
154
+  // }
155
+  console.log(item.product_id)
156
+  // 大仓
157
+  uni.navigateTo({
158
+    url: `/pages/store/product/detail?id=${item.product_id}`
159
+  })
160
+}
161
+
162
+
145 163
 </script>
146 164
 <template>
147
-  <CXBBasePage>
148 165
     <div class="p-3 flex flex-col gap-3 pb-safe text-[12px]" v-if="detail">
149 166
       <div
150 167
           class="rounded bg-white p-3 flex">
@@ -190,7 +207,7 @@ const payType = computed(() => {
190 207
             </div>
191 208
             <div class="flex flex-col w-full">
192 209
               <div class="flex flex-col text-sm ">
193
-                <div class="flex justify-between">
210
+                <div class="flex justify-between" @tap.stop="handleProductItemClick(productItem)">
194 211
                   <div class="flex">
195 212
                     {{ productItem.cart_info.product.store_name }}
196 213
                   </div>
@@ -290,7 +307,6 @@ const payType = computed(() => {
290 307
 
291 308
       </div>
292 309
     </div>
293
-  </CXBBasePage>
294 310
 </template>
295 311
 
296 312
 <route lang="yaml">

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

@@ -14,7 +14,7 @@
14 14
     </div>
15 15
 
16 16
     <div class="mt-12">
17
-      <AllItemList v-if="state.tabvalue == 0"/>
17
+      <AllItemList v-if="state.tabvalue == 0" :tab-value="0"/>
18 18
       <ObligationOrderList v-if="state.tabvalue == 1"/>
19 19
       <Order2List v-if="state.tabvalue == 2" :status="'0'"/>
20 20
       <Order3List v-if="state.tabvalue == 3" :status="'1'"/>
@@ -84,20 +84,22 @@ onLoad(options => {
84 84
   // })
85 85
 })
86 86
 
87
-uni.$on('orderCancelFromList', () => {
88
-  // loadAllOrderList()
89
-  state.tabvalue = 0
90
-})
91
-
92
-uni.$on('orderTakeFromList', () => {
93
-  // loadAllOrderList()
94
-  state.tabvalue = 3
95
-})
87
+// uni.$on('orderCancelFromList', (tabValue) => {
88
+//   if (!tabValue) {
89
+//     state.tabvalue = 0
90
+//   } else {
91
+//     state.tabvalue = tabValue
92
+//   }
93
+//   // loadAllOrderList()
94
+// })
96 95
 
97
-uni.$on('orderComment', () => {
98
-  // loadAllOrderList()
99
-  state.tabvalue = 4
100
-})
96
+// uni.$on('orderTakeFromList', () => {
97
+//   state.tabvalue = 3
98
+// })
99
+//
100
+// uni.$on('orderComment', () => {
101
+//   state.tabvalue = 4
102
+// })
101 103
 
102 104
 onReachBottom(() => {
103 105
   // handleScrollToLower()

+ 7 - 0
src/pages/order/logistics.vue

@@ -129,6 +129,12 @@ function handleClipboard() {
129 129
     }
130 130
   })
131 131
 }
132
+
133
+function handleMakePhoneCall() {
134
+  uni.makePhoneCall({
135
+    phoneNumber: state.orderDetail.user_phone
136
+  })
137
+}
132 138
 </script>
133 139
 
134 140
 <template>
@@ -154,6 +160,7 @@ function handleClipboard() {
154 160
                 复制
155 161
               </div>
156 162
               <div
163
+                  @tap="handleMakePhoneCall"
157 164
                   class="flex items-center border border-solid border-gray-200 text-[12px] rounded min-w-6 text-center  max-w-fit px-2 bg-white"
158 165
               >
159 166
                 电话

+ 2 - 1
src/pages/order/obligation-detail.vue

@@ -22,6 +22,7 @@ onLoad((options) => {
22 22
   // console.log(options.detail)
23 23
   if (options.detail) {
24 24
     detail.value = JSON.parse(decodeBase64(options.detail))
25
+    console.log(detail.value)
25 26
   // detail.value = JSON.parse(decodeBase64(base64Json))
26 27
   }
27 28
 })
@@ -199,7 +200,7 @@ const payType = computed(() => {
199 200
               </div>
200 201
 
201 202
               <div class="flex flex-col justify-center items-center">
202
-                <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
203
+                <FPrice :price="orderProduct.cart_info.productAttr.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>
203 204
                 <div class="text-gray-500 text-[11px]">共{{ orderProduct.product_num }}件</div>
204 205
               </div>
205 206
 

+ 194 - 16
src/pages/order/test.json

@@ -1,21 +1,199 @@
1 1
 {
2 2
   "status": 200,
3
-  "message": "添加成功",
3
+  "message": "success",
4 4
   "data": {
5
-    "address_id": "315",
6
-    "real_name": "TTT",
7
-    "phone": "13488689885",
8
-    "province": "重庆",
9
-    "city": "重庆郊县",
10
-    "city_id": "2",
11
-    "district": "奉节县",
12
-    "village": "",
13
-    "village_id": "",
14
-    "detail": "1111",
15
-    "post_code": "",
16
-    "is_default": "0",
17
-    "code_list": "2,69000,69124,71653",
18
-    "uid": "395",
19
-    "create_time": "2023-09-22 21:53:45"
5
+    "express": [
6
+      {
7
+        "time": "2023-09-20 19:06:01",
8
+        "status": "【廊坊市】 您的快递已签收,签收人在【廊坊三河燕郊四季花都店】取件。如有疑问请联系业务员:15103369570,代理点电话:18133879513,投诉电话:0316-6840606。感谢使用中通快递,期待再次为您服务!"
9
+      },
10
+      {
11
+        "time": "2023-09-20 11:59:15",
12
+        "status": "【廊坊市】 快件已在 快递超市 的【廊坊三河燕郊四季花都店】暂放,【取件地址:四季花都一期底商华联超市里】,请及时取件。如有疑问请联系业务员:15103369570,代理点电话:18133879513,投诉电话:0316-6840606"
13
+      },
14
+      {
15
+        "time": "2023-09-20 08:22:21",
16
+        "status": "【廊坊市】东燕郊 的业务员【5区承包区王田祥,15103369570】正在第2次派件(95720为中通快递员外呼专属号码,请放心接听,如有问题可联系网点:0316-6840606,投诉电话:0316-6840606)"
17
+      },
18
+      {
19
+        "time": "2023-09-20 03:03:24",
20
+        "status": "【廊坊市】 快件已到达 东燕郊"
21
+      },
22
+      {
23
+        "time": "2023-09-19 14:46:55",
24
+        "status": "【保定市】 快件已发往 东燕郊"
25
+      },
26
+      {
27
+        "time": "2023-09-19 14:38:48",
28
+        "status": "【保定市】 快件已到达 京南转运中心"
29
+      },
30
+      {
31
+        "time": "2023-09-18 08:13:02",
32
+        "status": "【广州市】 快件已发往 京南转运中心"
33
+      },
34
+      {
35
+        "time": "2023-09-18 08:09:19",
36
+        "status": "【广州市】 快件已到达 广州中心"
37
+      },
38
+      {
39
+        "time": "2023-09-18 04:00:18",
40
+        "status": "【广州市】 快件已发往 京南转运中心"
41
+      },
42
+      {
43
+        "time": "2023-09-17 23:07:14",
44
+        "status": "【广州市】 广州夏茅(020-22505305)陈美玲(15397525882) 已揽收"
45
+      }
46
+    ],
47
+    "order": {
48
+      "order_id": "4265",
49
+      "group_order_id": "4659",
50
+      "order_sn": "wx1695261950701957251",
51
+      "uid": "10753",
52
+      "real_name": "测试",
53
+      "user_phone": "18513112593",
54
+      "user_address": "北京顺义区光明街道 测试",
55
+      "user_address_ids": "1,35,493,0",
56
+      "area_manage_address_ids": "",
57
+      "cart_id": "11517",
58
+      "total_num": "1",
59
+      "total_price": "600.00",
60
+      "total_postage": "10.00",
61
+      "pay_price": "610.00",
62
+      "pay_postage": "10.00",
63
+      "extension_one": "59.64",
64
+      "extension_two": "0.00",
65
+      "commission_rate": "2.0000",
66
+      "coupon_id": "",
67
+      "coupon_price": "0.00",
68
+      "order_type": "0",
69
+      "paid": "1",
70
+      "pay_time": "2023-09-21 10:31:32",
71
+      "pay_type": "5",
72
+      "create_time": "2023-09-21 10:05:51",
73
+      "status": "1",
74
+      "delivery_type": "1",
75
+      "delivery_name": "中通快递",
76
+      "delivery_id": "78367406471357",
77
+      "mark": "",
78
+      "remark": null,
79
+      "admin_mark": null,
80
+      "verify_code": null,
81
+      "verify_time": null,
82
+      "verify_service_id": "0",
83
+      "mer_id": "465",
84
+      "reconciliation_id": "0",
85
+      "cost": "300.00",
86
+      "is_del": "0",
87
+      "is_system_del": "0",
88
+      "remind": "0",
89
+      "remind_time": null,
90
+      "gzc": "0",
91
+      "trade_no": "",
92
+      "channel_trade_no": "",
93
+      "alipay_no": "",
94
+      "weixin_no": "",
95
+      "table_id": "0",
96
+      "mer_money": "549.00",
97
+      "last_status": null,
98
+      "share_id": "0",
99
+      "pay_mer_id": null,
100
+      "is_split_to_tomorrow": "0",
101
+      "service_money": "361.00",
102
+      "test_order": "0",
103
+      "dacang_id": "0",
104
+      "distribution_mode": "0",
105
+      "da_cang_profit": "0.00",
106
+      "recommended_merchants": "0.00",
107
+      "mer_fanyong": "61.00",
108
+      "is_dacang": "0",
109
+      "cost_price": null,
110
+      "douhuomall": null,
111
+      "douhuomall_status": null,
112
+      "douhuomall_msg": null,
113
+      "address_id": "289",
114
+      "douhuomall_order_no": null,
115
+      "supply_type": null,
116
+      "seckill": "0",
117
+      "orderProduct": [
118
+        {
119
+          "order_product_id": "4535",
120
+          "order_id": "4265",
121
+          "uid": "10753",
122
+          "cart_id": "11517",
123
+          "product_id": "6101",
124
+          "extension_one": "0.00",
125
+          "extension_two": "0.00",
126
+          "product_sku": "4fdae5562b10",
127
+          "is_refund": "0",
128
+          "product_num": "1",
129
+          "refund_num": "1",
130
+          "is_reply": "0",
131
+          "product_price": "600.00",
132
+          "cart_info": {
133
+            "product": {
134
+              "product_id": "6101",
135
+              "image": "https:\/\/cdn.bjtdba.com\/chuxubao\/images\/2023-09-04\/782c3202309041605416214.png",
136
+              "store_name": "头层牛皮女粗高跟骑士靴2023年秋冬款绑带休闲靴薄绒长筒靴女",
137
+              "is_show": "1",
138
+              "status": "1",
139
+              "is_del": "0",
140
+              "unit_name": "双",
141
+              "price": "500.00",
142
+              "mer_status": "1",
143
+              "temp_id": "257",
144
+              "give_coupon_ids": [],
145
+              "is_gift_bag": "0",
146
+              "is_used": "1",
147
+              "product_type": "0",
148
+              "old_product_id": "0",
149
+              "temp": {
150
+                "shipping_template_id": "257",
151
+                "name": "有运费的模板",
152
+                "type": "0",
153
+                "appoint": "0",
154
+                "undelivery": "0",
155
+                "mer_id": "465",
156
+                "is_default": "0",
157
+                "sort": "10",
158
+                "create_time": "2023-09-09 09:22:39",
159
+                "regionAddress": {
160
+                  "shipping_template_region_id": "609",
161
+                  "temp_id": "257",
162
+                  "city_id": "0",
163
+                  "first": "1.00",
164
+                  "first_price": "10.00",
165
+                  "continue": "1.00",
166
+                  "continue_price": "5.00"
167
+                },
168
+                "undelives": null,
169
+                "freeAddress": null
170
+              }
171
+            },
172
+            "productAttr": {
173
+              "gong_mer_profit": null,
174
+              "gong_pension": null,
175
+              "gong_market_price": null,
176
+              "cost_price": null,
177
+              "product_id": "6101",
178
+              "stock": "7",
179
+              "price": "600.00",
180
+              "unique": "4fdae5562b10",
181
+              "sku": "黄,36",
182
+              "volume": "0.00",
183
+              "weight": "0.00",
184
+              "ot_price": "8000.00",
185
+              "dacang_price": "0.00",
186
+              "cost": "300.00",
187
+              "bc_extension_one": 0,
188
+              "bc_extension_two": 0,
189
+              "seckill": 0
190
+            },
191
+            "product_type": "0"
192
+          },
193
+          "create_time": "2023-09-21 10:05:50",
194
+          "type": "1"
195
+        }
196
+      ]
197
+    }
20 198
   }
21 199
 }

+ 156 - 17
src/pages/order_addcart/index.vue

@@ -29,10 +29,12 @@ const state = reactive({
29 29
 
30 30
   totalCartCount: 0,
31 31
   totalPrice: 0,
32
-  selectAll: false,
32
+  selectAllIndeterminate: false,
33 33
 
34 34
   cart_id: [],
35 35
   isManage: true,
36
+
37
+  currentType: '',
36 38
 })
37 39
 
38 40
 const shopping = ref<ShoppingResult>()
@@ -102,12 +104,15 @@ function loadCartList() {
102 104
       // shopItem.allCheck = true
103 105
 
104 106
       shopItem.allCheck = false
107
+      shopItem.indeterminate = false
105 108
       shopItem.list.forEach(goodItem => {
106 109
         goodItem.check = false
107 110
         // state.cart_id.push(goodItem.cart_id)
108 111
         // if (goodItem.cart_num === 1) {}
112
+        state.totalCartCount += Number.parseInt(goodItem.cart_num)
109 113
       })
110
-      console.log(shopItem)
114
+      // console.log(shopItem)
115
+
111 116
     })
112 117
     // cartAllCheck("all")
113 118
     // if (shopping.value) {
@@ -141,16 +146,23 @@ const totalCartInfo = computed(() => {
141 146
 const totalMoney = ref(0)
142 147
 const isAllSelect = ref(false)
143 148
 
144
-function handleGoodsItemCheck() {
145
-  cartAllCheck('single')
149
+function handleGoodsItemCheck(check) {
150
+  // console.log('good item check....')
151
+  // console.log(check)
152
+  // if (isAllSelect.value) {return}
153
+  // cartAllCheck('single')
154
+  _singleCheck()
146 155
 }
147 156
 
148 157
 function shopCheck(shopItem) {
149
-  if (shopItem.allCheck) {
158
+  console.log('shop check...')
159
+  console.log(shopItem)
160
+  if (shopItem.allCheck && !shopItem.indeterminate) {
150 161
     console.log(shopItem)
151 162
     shopItem.list.forEach((good, index) => {
152 163
       good.check = true
153 164
     })
165
+
154 166
   } else {
155 167
     shopItem.list.forEach((good, index) => {
156 168
       good.check = false
@@ -161,24 +173,39 @@ function cartAllCheck(type: 'single' | 'all') {
161 173
   let allArr = []
162 174
   let totalMoney = 0
163 175
   let totalNum = 0
176
+  state.currentType = type
164 177
 
178
+  console.log(type)
165 179
   shopping.value?.list.forEach((goods, index) => {
166 180
     if (type === 'single') {
167 181
       // 如果单选的情况下, 获取已选中的
168 182
       let tempArr = goods.list.filter(goodItem => {
169
-        console.log(goodItem.check)
170 183
         // if (goodItem.check) {
171 184
           return goodItem.check === true
172 185
         // }
173 186
       })
174
-      console.log(tempArr)
187
+      console.log(goods.list.length + '购物车长度')
175 188
       if (goods.list.length === tempArr.length) {
189
+        console.log('这里是全选状态了。。。。')
176 190
         goods.allCheck = true
177 191
         allArr.push(goods)
178
-      } else {
179
-        // goods.allCheck = false
192
+        goods.indeterminate = false
193
+        return
194
+      }
195
+
196
+      console.log(tempArr.length + '---当长长度')
197
+      if (tempArr.length > 0) {
198
+        goods.indeterminate = true
199
+        return
200
+      }
201
+      if (tempArr.length <= 0) {
202
+        goods.allCheck = false
203
+        state.currentType = 'all'
204
+        state.indeterminate = false
205
+        return
180 206
       }
181 207
     } else {
208
+      console.log('alll type......')
182 209
       goods.list.forEach(goodItem => {
183 210
         goodItem.check = isAllSelect.value
184 211
       })
@@ -199,10 +226,103 @@ function cartAllCheck(type: 'single' | 'all') {
199 226
   })
200 227
 
201 228
   isAllSelect.value = allArr.length === shopping.value?.list.length
202
-  state.totalCartCount = totalNum
229
+  // state.totalCartCount = totalNum
203 230
   state.totalPrice = totalMoney
204 231
 }
205 232
 
233
+function _singleCheck() {
234
+  state.currentType = 'single'
235
+  let allArr = []
236
+  let totalMoney = 0
237
+  let totalNum = 0
238
+  state.cart_id = []
239
+  shopping.value?.list.forEach((goods, index) => {
240
+      // 如果单选的情况下, 获取已选中的
241
+      let tempArr = goods.list.filter(goodItem => {
242
+        // if (goodItem.check) {
243
+        return goodItem.check === true
244
+        // }
245
+      })
246
+      if (goods.list.length === tempArr.length) {
247
+        goods.allCheck = true
248
+        allArr.push(goods)
249
+        goods.indeterminate = false
250
+      }
251
+
252
+      if (tempArr.length > 0) {
253
+        goods.indeterminate = true
254
+      }
255
+      if (tempArr.length <= 0) {
256
+        console.log('没有选中的了。。。')
257
+        goods.allCheck = false
258
+        state.currentType = 'all'
259
+        goods.indeterminate = false
260
+      }
261
+
262
+    // 总金额|总数
263
+    goods.list.forEach(goodItem => {
264
+      if (goodItem.check) {
265
+        console.log(goodItem)
266
+
267
+        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
268
+        console.log(totalMoney)
269
+        totalNum += Number.parseFloat(goodItem.cart_num)
270
+        state.cart_id.push(goodItem.cart_id)
271
+      }
272
+    })
273
+  })
274
+  if (allArr.length === shopping.value?.list.length) {
275
+    isAllSelect.value = true
276
+    state.currentType = 'all'
277
+  } else if (allArr.length > 0){
278
+    state.selectAllIndeterminate = true
279
+  } else {
280
+    isAllSelect.value = false
281
+
282
+  }
283
+  state.totalPrice = totalMoney
284
+}
285
+function _selectAll() {
286
+  // if current == single 说明刚才操作的置为多选是从这里来的?
287
+  console.log(state.currentType)
288
+  state.currentType = 'all'
289
+  let allArr = []
290
+  let totalMoney = 0
291
+  let totalNum = 0
292
+  // state.currentType = type
293
+  //
294
+  // console.log(type)
295
+  shopping.value?.list.forEach((goods, index) => {
296
+
297
+      goods.list.forEach(goodItem => {
298
+        goodItem.check = isAllSelect.value
299
+      })
300
+      goods.allCheck = isAllSelect.value
301
+      if (goods.allCheck) {
302
+        allArr.push(goods)
303
+      }
304
+
305
+    // 总金额|总数
306
+    goods.list.forEach(goodItem => {
307
+      if (goodItem.check) {
308
+        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
309
+        totalNum += Number.parseFloat(goodItem.cart_num)
310
+        state.cart_id.push(goodItem.cart_id)
311
+      }
312
+    })
313
+  })
314
+
315
+  isAllSelect.value = allArr.length === shopping.value?.list.length
316
+  // state.totalCartCount = totalNum
317
+  state.totalPrice = totalMoney
318
+}
319
+
320
+// watch(() => isAllSelect.value, (val) => {
321
+//   if (!val) {
322
+//     state.cart_id = []
323
+//   }
324
+// })
325
+
206 326
 function reTotal() {
207 327
   let allArr = []
208 328
   let totalMoney = 0
@@ -219,16 +339,31 @@ function reTotal() {
219 339
     })
220 340
   })
221 341
 
222
-  isAllSelect.value = allArr.length === shopping.value?.list.length
223
-  state.totalCartCount = totalNum
342
+  // isAllSelect.value = allArr.length === shopping.value?.list.length
343
+  // state.totalCartCount = totalNum
224 344
   state.totalPrice = totalMoney
225 345
 }
226 346
 function handleSelectAll(checked: boolean) {
347
+  // 如何区分是由当前的 checkbox 发起的?要区
348
+  // console.log(state.currentType + '这里是当前类型。。。。')
349
+
350
+  if (state.currentType === 'single') {
351
+    return
352
+  //   _singleCheck()
353
+  }
354
+  _selectAll()
355
+  // if (state.currentType == 'single') {
356
+  //   return
357
+  // }
358
+  // console.log(isAllSelect.value)
359
+  // if (isAllSelect.value) {
360
+  // cartAllCheck('all')
361
+
362
+  // }
227 363
   // console.log('000')
228 364
   // isAllSelect.value = !isAllSelect.value
229 365
   // isAllSelect.value = checked
230 366
   // 这里需要修改 checkbox 的检查
231
-  cartAllCheck('all')
232 367
 }
233 368
 
234 369
 function handleManageCart() {
@@ -373,7 +508,10 @@ function handleNumberChange(num, goodItem) {
373 508
           <div
374 509
               class="f-hairline-bottom flex  items-center font-bold p-3"
375 510
           >
376
-            <nut-checkbox v-model="shopItem.allCheck" @change="shopCheck(shopItem)" label="全选"
511
+            <nut-checkbox v-model="shopItem.allCheck"
512
+                          @change="shopCheck(shopItem)"
513
+                          :indeterminate="shopItem.indeterminate"
514
+                          label="全选"
377 515
                           class="!text-primary"
378 516
             >
379 517
               {{ shopItem.mer_name }}
@@ -398,7 +536,7 @@ function handleNumberChange(num, goodItem) {
398 536
             <div class="flex flex-col gap-1 w-full">
399 537
               <div
400 538
                   @click="handleProductItemClick(goodItem)"
401
-                  class="text-overflow line-clamp-1">{{ goodItem.product.store_name }}</div>
539
+                  class="text-overflow line-clamp-2 text-xs">{{ goodItem.product.store_name }}</div>
402 540
               <div class="flex flex-col justify-start gap-1">
403 541
                 <div
404 542
                     class="text-[10px] text-gray min-w-5  p-1  items-center flex">
@@ -457,11 +595,12 @@ function handleNumberChange(num, goodItem) {
457 595
   </div>
458 596
 
459 597
   <div v-if="hasShopping"
460
-      class="fixed bottom-0 w-full">
598
+      class="fixed bottom-0 w-full z-3">
461 599
     <div class="bg-white h-10 flex justify-between" v-if="shopping && shopping.list">
462 600
       <div class="flex justify-center items-center gap-2 pl-3">
463 601
         <nut-checkbox v-model="isAllSelect"
464 602
                       @change="handleSelectAll"
603
+                      :indeterminate="state.selectAllIndeterminate"
465 604
                       label="全选"
466 605
                       class="!text-primary"
467 606
         >全选
@@ -470,7 +609,7 @@ function handleNumberChange(num, goodItem) {
470 609
       </div>
471 610
 
472 611
       <div class="flex justify-center items-center gap-2 pr-3">
473
-        <div class="flex text-[12px]">
612
+        <div class="flex text-[12px]" v-if="state.isManage">
474 613
           合计:
475 614
           <FPrice :price="state.totalPrice"></FPrice>
476 615
 <!--          {{totalCartInfo.totalPrice}}-->

+ 7 - 4
src/pages/payment/index.vue

@@ -1,5 +1,4 @@
1 1
 <template>
2
-  <CXBBasePage>
3 2
     <div class="w-full">
4 3
       <div class=" flex flex-col gap-3 p-3">
5 4
         <div class="flex flex-col justify-center items-center bg-white rounded p-4">
@@ -29,8 +28,6 @@
29 28
 
30 29
       </div>
31 30
     </div>
32
-
33
-  </CXBBasePage>
34 31
 </template>
35 32
 <script setup lang="ts">
36 33
 import FPrice from "~/components/FPrice/FPrice.vue";
@@ -103,4 +100,10 @@ function handleConfirm() {
103 100
 <route lang="yaml">
104 101
 style:
105 102
   navigationBarTitleText: 支付方式
106
-</route>
103
+</route>
104
+
105
+<style>
106
+page {
107
+  background: #f8f8f8;
108
+}
109
+</style>

+ 242 - 59
src/pages/pension_record/list.vue

@@ -1,84 +1,252 @@
1 1
 <script setup lang="ts">
2
-import {getYanglaoJinLogXs, getUserYanglaoJinLogXx} from "~/apis/user";
2
+import {getYanglaoJinLogXs, getUserYanglaoJinLogXx, getUserYanglaoJinLog, getUserYanglaoJinLogx} from "~/apis/user";
3 3
 import {getThirdOrder} from "~/apis/order.api";
4 4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5 5
 import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
6 6
 import {encodeBase64} from "~/utils/http/helper";
7 7
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
8
+import {searchProductList} from "~/apis/product";
9
+
8 10
 const list = ref([])
9 11
 const state = reactive({
10
-  type: ''
12
+  type: '',
13
+
14
+  status: 'noMore',
15
+
16
+  currentPage: 1,
17
+  pageSize: 10,
18
+  totalPage: 1,
19
+
20
+  list: []
11 21
 })
12 22
 onLoad((options) => {
13 23
   state.type = options.type
14
-  if (state.type == '99') {
15
-    getUserYanglaoJinLogXx({
16
-      page: 1,
17
-      limit: 20,
18
-      source: '1'
19
-    }).then(res => {
20
-      list.value = res.list
21
-    }).catch(error => {
22
-      if (error === '请登录') {
23
-        uni.navigateTo({
24
-          url: '/pages/user/login/index'
25
-        })
24
+  loadList('reload')
25
+})
26
+
27
+function _load01List(action: 'reload' | 'page', params: {
28
+  page: number
29
+  limit: number
30
+  // 1 线下 0 线上
31
+  // source: '0' | '1'
32
+  source: string
33
+}, callback?: (items) => void) {
34
+
35
+  // console.log(params)
36
+  getUserYanglaoJinLog({
37
+    page: params.page,
38
+    limit: params.limit,
39
+    source: params.source
40
+  }).then(res => {
41
+    // list.value = res.list
42
+    console.log(res)
43
+    if (res && res.list) {
44
+      if (action === 'page') {
45
+        // state.list = res.list
46
+        state.list = state.list.concat(res.list)
26 47
       }
27
-    })
28
-  }
48
+      if (action === 'reload') {
49
+        state.list = res.list
50
+      }
51
+
52
+      state.totalPage = Math.ceil(res.count / state.pageSize);
53
+      state.status = 'more'
29 54
 
30
-  if (state.type == '90') {
31
-    getYanglaoJinLogXs({
32
-      page: 1,
33
-      limit: 20,
34
-      source: '0'
35
-    }).then(res => {
36
-      list.value = res.list
37
-    }).catch(error => {
38
-      if (error === '请登录') {
39
-        uni.navigateTo({
40
-          url: '/pages/user/login/index'
41
-        })
55
+      if (callback) {
56
+        callback(res.list)
42 57
       }
43
-    })
44
-  }
58
+    }
59
+
60
+  }).catch(error => {
61
+    if (error === '请登录') {
62
+      uni.navigateTo({
63
+        url: '/pages/user/login/index'
64
+      })
65
+    }
66
+  })
67
+}
68
+
69
+function _loadThirdList(action: 'page' | 'reload', params: {
70
+  page: number
71
+  limit: number
72
+  // 1 线下 0 线上
73
+  // source: '0' | '1'
74
+  type: string
75
+}, callback?: (items: any) => void) {
76
+  getThirdOrder({
77
+    ...params
78
+  }).then(res => {
79
+    if (res && res.list) {
80
+      if (action === 'page') {
81
+        state.list = state.list.concat(res.list)
82
+      }
83
+      if (action === 'reload') {
84
+        state.list = res.list
85
+      }
86
+
87
+      state.status = 'more'
45 88
 
46
-  if (state.type != 90 && state.type !=99) {
47
-    getThirdOrder({
48
-      page: 1,
49
-      limit: 20,
50
-      type
51
-    }).then(res => {
52
-      list.value = res.list
53
-    }).catch(error => {
54
-      if (error === '请登录') {
55
-        uni.navigateTo({
56
-          url: '/pages/user/login/index'
57
-        })
89
+      if (callback) {
90
+        callback(res.list)
58 91
       }
59
-    })
92
+    }
93
+  })
94
+}
95
+
96
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
97
+  if (action == 'reload') {
98
+    state.currentPage = 1
99
+  }
100
+  let pageParams = {
101
+    page: state.currentPage,
102
+    limit: state.pageSize,
103
+  }
104
+  let queryLogParams = {
105
+    source: '0'
106
+  }
107
+
108
+  let queryThirdParams = {
109
+    type: state.type
60 110
   }
111
+  console.log(state.type)
112
+  if (state.type === '99') {
113
+    queryLogParams.source = '1'
114
+    const params = {
115
+      ...pageParams,
116
+      ...queryLogParams
117
+    }
118
+    _load01List(action, params, callback)
119
+  } else if (state.type === '90') {
120
+    queryLogParams.source = '0'
121
+    const params = {
122
+      ...pageParams,
123
+      ...queryLogParams
124
+    }
125
+    _load01List(action, params, callback)
126
+  } else {
127
+    const params = {
128
+      ...pageParams,
129
+      ...queryThirdParams
130
+    }
131
+    _loadThirdList(action, params, callback)
132
+  }
133
+
134
+}
135
+
136
+// 有分页参数
137
+// function handleScrollToLower() {
138
+//   state.status = 'loading';
139
+//   state.currentPage += 1;
140
+//   // console.log(state.totalPage)
141
+//   if (state.currentPage > state.totalPage) {
142
+//     state.status = 'noMore';
143
+//   } else {
144
+//     setTimeout(() => {
145
+//       loadList('page')
146
+//     }, 300)
147
+//   }
148
+// }
149
+// 无分页参数
150
+function handleScrollToLower() {
151
+  state.status = 'loading';
152
+  state.currentPage += 1;
153
+
154
+  if (state.type == '90' || state.type == '99') {
155
+    if (state.currentPage > state.totalPage) {
156
+      state.status = 'noMore';
157
+    } else {
158
+      setTimeout(() => {
159
+        loadList('page')
160
+      }, 300)
161
+    }
162
+  } else {
163
+    setTimeout(() => {
164
+      loadList('page', (items) => {
165
+        // uni.hideLoading()
166
+        if (!items.length > 0) {
167
+          console.log('没有更多了')
168
+          state.status = 'noMore'
169
+          state.currentPage -= 1;
170
+        }
171
+      })
172
+    }, 300)
173
+
174
+  }
175
+
176
+  // loadList('page', (items) => {
177
+  //   // uni.hideLoading()
178
+  //   console.log(items)
179
+  //
180
+  //   if (!items.length > 0) {
181
+  //     console.log('没有更多了')
182
+  //     state.status = 'noMore'
183
+  //     state.currentPage -= 1;
184
+  //   }
185
+  // })
186
+}
187
+
188
+onReachBottom(() => {
189
+  handleScrollToLower()
190
+
191
+})
192
+
193
+onPullDownRefresh(() => {
194
+  loadList('reload', items => {
195
+    setTimeout(() => {
196
+      uni.stopPullDownRefresh()
197
+    }, 300)
198
+  })
61 199
 })
62 200
 
63 201
 function handleItemClick(item) {
64 202
   uni.navigateTo({
65
-    url: '/pages/pension_record/detail?detail=' + encodeBase64(Object.assign({}, item, { tradeType: '', remark: ''}))
203
+    url: '/pages/pension_record/detail?detail=' + encodeBase64(Object.assign({}, item, {tradeType: '', remark: ''}))
66 204
   })
67 205
 }
68 206
 </script>
69 207
 
70 208
 <template>
71
-  <CXBBasePage>
72
-    <div v-if="list && list.length > 0" class="flex flex-col gap-3 p-3">
209
+  <div class="pb-safe">
210
+    <div v-if="state.list && state.list.length > 0" class="flex flex-col gap-3 p-3">
211
+
73 212
       <div
74
-          v-if="state.type != 90"
213
+          v-if="state.type == '90'"
75 214
           @tap="handleItemClick(item)"
76
-          v-for="(item, index) in list" :key="index" class="bg-white rounded p-3 text-[12px]">
215
+          v-for="(item, index) in state.list" :key="index" class="bg-white rounded p-3 text-[12px]">
77 216
         <div class="flex items-center gap-3 text-[12px]">
78
-          <image :src="item.goods_img" mode="widthFix" class="w-15 h-15"></image>
217
+          <image :src="item.product.product.image" mode="widthFix" class="w-15 h-15"></image>
79 218
           <div class="flex flex-col">
80
-            <div class=" text-[12px] line-clamp-2 w-[90%]">{{ item.goods_name }}</div>
81
-            <CXBYaojinTag :amount="item.yanglao" />
219
+            <div class=" text-[12px] line-clamp-2 w-[90%]">{{ item.product.product.store_name }}</div>
220
+            <CXBYaojinTag :amount="item.number"/>
221
+          </div>
222
+        </div>
223
+        <div class="flex text-gray text-[12px] f-hairline-bottom py-3">
224
+          订单号:{{ item.order_sn }}
225
+        </div>
226
+        <div class="flex flex-col gap-2 pt-3">
227
+          <div class="flex">
228
+            下单时间:{{ item.create_time }}
229
+          </div>
230
+          <div class="flex justify-between items-center">
231
+            <div>
232
+              养老金来源:购买商品
233
+            </div>
234
+            <div class="flex items-center text-gray">
235
+              <div>详情</div>
236
+              <div class="f-text-color-2 i-tabler-chevron-right"></div>
237
+            </div>
238
+          </div>
239
+        </div>
240
+      </div>
241
+      <div
242
+          v-else-if="state.type == '99'"
243
+          @tap="handleItemClick(item)"
244
+          v-for="(item, index) in state.list" :key="index" class="bg-white rounded p-3 text-[12px]">
245
+        <div class="flex items-center gap-3 text-[12px]">
246
+          <image :src="item.mer_avatar" mode="widthFix" class="w-15 h-15"></image>
247
+          <div class="flex flex-col">
248
+            <div class=" text-[12px] line-clamp-2 w-[90%]">{{ item.mer_name }}</div>
249
+            <CXBYaojinTag :amount="item.number"/>
82 250
           </div>
83 251
         </div>
84 252
         <div class="flex text-gray text-[12px] f-hairline-bottom py-3">
@@ -102,12 +270,12 @@ function handleItemClick(item) {
102 270
       <div
103 271
           v-else
104 272
           @tap="handleItemClick(item)"
105
-          v-for="(item, index) in list" :key="index" class="bg-white rounded p-3 text-[12px]">
273
+          v-for="(item, index) in state.list" :key="index" class="bg-white rounded p-3 text-[12px]">
106 274
         <div class="flex items-center gap-3 text-[12px]">
107
-          <image :src="item.product.product.image" mode="widthFix" class="w-15 h-15"></image>
275
+          <image :src="item.goods_img" mode="widthFix" class="w-15 h-15"></image>
108 276
           <div class="flex flex-col">
109
-            <div class=" text-[12px] line-clamp-2 w-[90%]">{{ item.product.product.store_name }}</div>
110
-            <CXBYaojinTag :amount="item.number" />
277
+            <div class=" text-[12px] line-clamp-2 w-[90%]">{{ item.goods_name }}</div>
278
+            <CXBYaojinTag :amount="item.yanglao"/>
111 279
           </div>
112 280
         </div>
113 281
         <div class="flex text-gray text-[12px] f-hairline-bottom py-3">
@@ -128,15 +296,30 @@ function handleItemClick(item) {
128 296
           </div>
129 297
         </div>
130 298
       </div>
299
+      <div class=" flex justify-center items-center text-[12px] text-gray-500"
300
+           v-if="state.list && state.list.length > 0">
301
+        <div v-if="state.status === 'loading'">
302
+          加载中...
303
+        </div>
304
+        <div v-if="state.status === 'noMore'">
305
+          没有更多了~
306
+        </div>
307
+      </div>
131 308
 
132 309
     </div>
133 310
 
134
-    <CXBEmpty v-else />
135
-  </CXBBasePage>
311
+    <CXBEmpty v-else/>
312
+  </div>
313
+
136 314
 </template>
137 315
 
138 316
 <route lang="yaml">
139 317
 style:
140
-  navigationBarTitleText: 养老金
141
-  enablePullDownRefresh: true
318
+navigationBarTitleText: 养老金
319
+enablePullDownRefresh: true
142 320
 </route>
321
+<style>
322
+page {
323
+  background: #f8f8f8;
324
+}
325
+</style>

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

@@ -44,8 +44,8 @@ onLoad((option: any) => {
44 44
   getSelectUserInviteProfit({uid: userStore.uid}).then(res => {
45 45
     console.log(res)
46 46
     state.numberSun = res.numberSun
47
-    state.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit
48
-    state.UserYesterdayInviteProfit = res.UserYesterdayInviteProfit
47
+    state.UserUnsettledInviteProfit = res.UserUnsettledInviteProfit ? res.UserUnsettledInviteProfit : '0.00'
48
+    state.UserYesterdayInviteProfit = res.UserUnsettledInviteProfit ? res.UserUnsettledInviteProfit : '0.00'
49 49
   })
50 50
 
51 51
   getAgentInfo().then(res => {
@@ -99,9 +99,10 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
99 99
   })
100 100
 }
101 101
 
102
-function handleTabClick(type) {
102
+function handleTabClick(type: number) {
103 103
   state.currentTab = type
104 104
   state.type = type
105
+  state.list = []
105 106
   loadList('reload')
106 107
   // loadList(type)
107 108
 }

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

@@ -191,7 +191,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
191 191
     if (res && res.pageInfo) {
192 192
       state.triggered = false
193 193
       if (action === 'page') {
194
-        productList.value = productList.value.contact(res.pageInfo.list)
194
+        productList.value = productList.value.concat(res.pageInfo.list)
195 195
       }
196 196
       if (action === 'reload') {
197 197
         productList.value = res.pageInfo.list

+ 1 - 1
src/pages/store/home/search.vue

@@ -97,7 +97,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
97 97
   }).then(res => {
98 98
     state.triggered = false
99 99
     if (action === 'page') {
100
-      productList.value = productList.value.contact(res.pageInfo.list)
100
+      productList.value = productList.value.concat(res.pageInfo.list)
101 101
     }
102 102
     if (action === 'reload') {
103 103
       productList.value = res.pageInfo.list

+ 20 - 4
src/pages/store/product/detail.vue

@@ -186,6 +186,7 @@ function handleAddCart() {
186 186
 
187 187
 function handleCreateShopping() {
188 188
   console.log(state.flag)
189
+  console.log(state.currentSku.unique)
189 190
   createShopping({
190 191
     product_id: detail.value.product_id,
191 192
     // product_attr_unique: JSON.stringify(state.currentSku),
@@ -193,6 +194,7 @@ function handleCreateShopping() {
193 194
     cart_num: state.cartNum,
194 195
     is_new: (state.flag === '1' || state.flag === '3') ? '1': '0'
195 196
   }).then(res => {
197
+    console.log(res)
196 198
     if (res.cart_id) {
197 199
       console.log(state.flag)
198 200
       if (state.flag == '1' || state.flag == '3') {
@@ -413,12 +415,14 @@ function handleShowCustomer() {
413 415
 
414 416
         <div class="flex gap-3 text-[12px]">
415 417
           <div>分享:</div>
416
-          <div class="flex-1  items-center flex  " @click="shareShowTips = true">
417
-            <div class="flex gap-2 w-1/2">
418
+          <div class="flex-1  items-center flex  ">
419
+              <button open-type="share" class="flex gap-2 w-1/2 text-[12px]">
420
+
418 421
               <image :src="wx_shareImg" mode="widthFix" class="w-5 h-5"></image>
419 422
               <div>微信</div>
420
-            </div>
421
-            <div class="flex gap-2 w-1/2">
423
+              </button>
424
+
425
+            <div class="flex gap-2 w-1/2" @click="shareShowTips = true">
422 426
               <image :src="pyqImg" mode="widthFix" class="w-5 h-5"></image>
423 427
               <div>朋友圈</div>
424 428
             </div>
@@ -652,6 +656,18 @@ function handleShowCustomer() {
652 656
 page {
653 657
   background-color: #f8f8f8;
654 658
 }
659
+ button {
660
+   margin: 0;
661
+   padding: 0;
662
+   outline: none;
663
+   border-radius: 0;
664
+   background-color: transparent;
665
+   line-height: inherit;
666
+ }
667
+
668
+button::after {
669
+  border: none;
670
+}
655 671
 
656 672
 </style>
657 673
 <route lang="yaml">

+ 22 - 11
src/pages/user/address/create-4-level.vue

@@ -153,7 +153,7 @@ export default {
153 153
       if (!state.addressId) return false
154 154
 
155 155
       getUserAddressDetail(state.addressId).then(res => {
156
-        console.log(res)
156
+        // console.log(res)
157 157
         // let region = [res.province, res.city, res.district]
158 158
         formData.address = [res.province, res.city, res.district]
159 159
         // state.cityId = res.city_id
@@ -191,14 +191,14 @@ export default {
191 191
       })
192 192
     }
193 193
     const validate = (item: any) => {
194
-      console.log(item);
194
+      // console.log(item);
195 195
     };
196 196
     const ruleForm = ref<any>(null);
197 197
 
198 198
     const submit = () => {
199 199
       ruleForm.value.validate().then(({ valid, errors }: any) => {
200 200
         if (valid) {
201
-          console.log('success', formData);
201
+          // console.log('success', formData);
202 202
           const province = formData.address[0]
203 203
           const city = formData.address[1]
204 204
           const district = formData.address[2]
@@ -232,9 +232,14 @@ export default {
232 232
           // }
233 233
 
234 234
           if (basicData.addressObject.length > 0) {
235
-            console.log(basicData.addressObject)
235
+            // console.log(basicData.addressObject)
236 236
             provinceId = basicData.addressObject[0].id
237 237
             cityId = basicData.addressObject[1].id
238
+            // console.log('city_id: ' + cityId)
239
+            if (!cityId) {
240
+              cityId = '1'
241
+            }
242
+
238 243
             districtId = basicData.addressObject[2].id
239 244
             countryId = basicData.addressObject[3].id
240 245
             if (formData.address[3]) {
@@ -257,14 +262,14 @@ export default {
257 262
             real_name: formData.name,
258 263
             detail: formData.detail,
259 264
             code_list: formData.code_list,
260
-            // city_id: '2',
261
-            city_id: cityId,
265
+            city_id: cityId ? cityId : '1',
266
+            // city_id: cityId,
262 267
             village_id: formData.villageId,
263 268
             village: formData.village,
264 269
             address_id: formData.address_id
265 270
             // address_id
266 271
           }).then(res => {
267
-            console.log(res)
272
+            // console.log(res)
268 273
             if (res) {
269 274
               uni.showToast({
270 275
                 title: '保存成功'
@@ -298,7 +303,7 @@ export default {
298 303
               }, 1000)
299 304
             }
300 305
           }).catch(message => {
301
-            console.log(message)
306
+            // console.log(message)
302 307
             uni.hideLoading()
303 308
 
304 309
             uni.showToast({
@@ -307,7 +312,7 @@ export default {
307 312
             })
308 313
           })
309 314
           // formData.address
310
-          console.log(formData.address.length)
315
+          // console.log(formData.address.length)
311 316
         } else {
312 317
           console.log('error submit!!', errors);
313 318
         }
@@ -320,7 +325,7 @@ export default {
320 325
     const customBlurValidate = (prop: string) => {
321 326
       ruleForm.value.validate(prop).then(({ valid, errors }: any) => {
322 327
         if (valid) {
323
-          console.log('success', formData);
328
+          // console.log('success', formData);
324 329
 
325 330
         } else {
326 331
           console.log('error submit!!', errors);
@@ -349,7 +354,7 @@ export default {
349 354
         basicData.addressObject = arg2
350 355
       },
351 356
       pathChange(...args: any) {
352
-        console.log('pathChange', ...args);
357
+        // console.log('pathChange', ...args);
353 358
       },
354 359
     };
355 360
 
@@ -397,6 +402,12 @@ export default {
397 402
   background: none !important;
398 403
   box-shadow: none !important;
399 404
 }
405
+.nut-cell__value .nut-form-item__body {
406
+  color: #000 !important;
407
+}
408
+.input-text {
409
+  color: #000 !important;
410
+}
400 411
 </style>
401 412
 <route lang="yaml">
402 413
 style: