Basil лет назад: 3
Родитель
Сommit
bb2cfde995

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

@@ -52,7 +52,8 @@ export function authVerify(phone: string) {
52 52
  */
53 53
 export function authSmsLogin(params: {
54 54
     phone: string,
55
-    sms_code: string
55
+    sms_code: string,
56
+    share_id?: string
56 57
 }): Promise<LoginModel> {
57 58
     return defHttp.post({
58 59
         url: API.AUTH_SMS_LOGIN,

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

@@ -23,6 +23,7 @@ export interface CreateOrderRequest {
23 23
     dacang_id: string//大仓id
24 24
     pay_type: string//支付方式:0: 余额: string1: 微信: string2: 小程序: string4: 支付宝: string5: 特殊商户积分
25 25
     mer_id: string//商户id
26
+    share_id: string
26 27
 }
27 28
 
28 29
 enum API {

+ 12 - 0
src/apis/product.ts

@@ -71,6 +71,18 @@ enum API {
71 71
 }
72 72
 
73 73
 /**
74
+ * 获取分享ID
75
+ * @param params
76
+ */
77
+export function getShareId(params: { pid: string, type: 1}): Promise<{ url: string, share_id: string}>{
78
+    return defHttp.get({
79
+        url: API.PRODUCT_SHARE,
80
+        data: {
81
+            ...params
82
+        }
83
+    })
84
+}
85
+/**
74 86
  * 商品详情
75 87
  * @param product_id
76 88
  */

+ 2 - 1
src/apis/user.ts

@@ -810,7 +810,8 @@ export function wechatCheck(openid: string): Promise<{ token: string, exp: numbe
810 810
 export function authAppletPhone(params: {
811 811
     sessionKey: string,
812 812
     encryptedData: string,
813
-    iv: string
813
+    iv: string,
814
+    share_id?: string
814 815
 }): Promise<{ token: string, exp: number, user: any }> {
815 816
     return defHttp.post({
816 817
         url: API.AUTH_APPLET_PHONE,

+ 36 - 4
src/components/CXBDialogSignIn/CXBDialogSIgnIn.vue

@@ -129,7 +129,7 @@ function handleSignInSucceedClose() {
129 129
       <image :src="bgImage" mode="widthFix"
130 130
              class="absolute "
131 131
       ></image>
132
-      <div class="flex flex-col justify-around items-center relative top-10 gap-3 ">
132
+      <div class="flex flex-col justify-around items-center relative top-10 gap-3 w-75 h-75">
133 133
         <div class="flex gap-2 justify-center items-center mb-4 p-2" v-if="props.day <=6 ">
134 134
           <template v-if="props.day > 0">
135 135
 
@@ -152,8 +152,31 @@ function handleSignInSucceedClose() {
152 152
         </div>
153 153
         <div class=" px-4 flex mb-4 ">
154 154
           <div class="flex gap-3 ">
155
+
156
+            <tempalte v-if="props.day in [7, 14, 21, 30]">
157
+            <SignInGiftBag
158
+                v-if="props.day == 7"
159
+                :day="7"
160
+                :text="'已签'"
161
+            />
155 162
             <SignInGiftBag
156
-                v-for="item in [7, 14, 21, 30]"
163
+                v-else-if="props.day == 14"
164
+                :day="props.day"
165
+                :text="'已签'"
166
+            />
167
+            <SignInGiftBag
168
+                v-else-if="props.day == 21"
169
+                :day="props.day"
170
+                :text="'已签'"
171
+            />
172
+            <SignInGiftBag
173
+                v-else-if="props.day == 30"
174
+                :day="props.day"
175
+                :text="'已签'"
176
+            />
177
+            </tempalte>
178
+            <SignInGiftBag
179
+                v-for="item in [7, 14, 21, 30].filter((val) => val != props.day)"
157 180
                 :key="item"
158 181
                 :day="item"
159 182
             />
@@ -165,7 +188,7 @@ function handleSignInSucceedClose() {
165 188
             @click.stop="confirmHandler"
166 189
             class="relative h-13 flex justify-center items-center">
167 190
           <image :src="signInBtnImage" mode="widthFix"
168
-                 class="absolute w-45"></image>
191
+                 class="absolute w-45 h-30"></image>
169 192
           <div class="relative flex w-full text-white top--1.5">
170 193
             <div>立即签到</div>
171 194
             <div class="text-[#ffe980]">{{ signInFor }}</div>
@@ -189,4 +212,13 @@ function handleSignInSucceedClose() {
189 212
   </FOverlay>
190 213
   <CXBDialogSIgnInSucceed :show="signInSuccess" @close="handleSignInSucceedClose"/>
191 214
 
192
-</template>
215
+</template>
216
+
217
+<style>
218
+.signButtonBg {
219
+  width: 435rpx;
220
+  height: 124rpx;
221
+  background-image: url('https://cdn.bjtdba.com/chuxubao/static/assets/sign_in_button.png');
222
+  background-size: 100% 100%;
223
+}
224
+</style>

+ 7 - 2
src/components/CXBDialogSignIn/SignInGiftBag.vue

@@ -18,6 +18,9 @@ const props = defineProps({
18 18
   day: {
19 19
     type: Number,
20 20
     required: true
21
+  },
22
+  text: {
23
+    type: String,
21 24
   }
22 25
 })
23 26
 const cIntegral = computed(() => {
@@ -51,13 +54,15 @@ const cIntegral = computed(() => {
51 54
         <div class="!bg-white p-2 relative rounded-t">
52 55
           <image :src="bgImg"
53 56
                  mode="widthFix"
54
-                 class="relative w-10"
57
+                 class="relative w-10 h-10"
55 58
           ></image>
56 59
         </div>
57 60
 
58 61
         <div class="relative text-[11px] mb-1 bg-[#feeae9] w-full rounded-b text-center">+{{ cIntegral }}</div>
59 62
       </div>
60
-      <div class="relative text-[10px]">第 {{day}} 天</div>
63
+<!--      <div class="relative text-[10px]">第 {{day}} 天</div>-->
64
+      <div class="relative text-[10px]" v-if="text"> {{ text}} </div>
65
+      <div class="relative text-[10px]" v-else> 第 {{ day }} 天</div>
61 66
     </div>
62 67
   </div>
63 68
 

+ 2 - 2
src/components/CXBDialogSignIn/SignRedPacket.vue

@@ -31,13 +31,13 @@ const getScore =computed(() => {
31 31
 <template>
32 32
    <div class=" flex flex-col   items-center  text-xs gap-2" >
33 33
         <div class=" flex flex-col items-center justify-end "
34
-             :class="text ? 'activeBg' : 'defaultBg'"
34
+             :class="[text ? 'activeBg' : 'defaultBg', 'h-29 w-20']"
35 35
         >
36 36
           <div class="text-[11px] text-white mb-1">{{ getScore }}</div>
37 37
         </div>
38 38
         <div>
39 39
           <div class="relative text-[10px]" v-if="text"> {{ text}} </div>
40
-          <div class="relative text-[10px]" v-else> 第 {{ props.day }} 天</div>
40
+          <div class="relative text-[10px]" v-else> 第 {{ day }} 天</div>
41 41
         </div>
42 42
 
43 43
       </div>

+ 16 - 6
src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue

@@ -1,6 +1,7 @@
1 1
 <script lang="ts" setup>
2 2
 import {authAppletPhone, bindPhone, getUserUnionId} from "~/apis/user";
3 3
 import {useUserStore} from "~/stores/userStore";
4
+import Cache from "~/utils/cache";
4 5
 const userStore = useUserStore()
5 6
 const props = defineProps({
6 7
   text: {
@@ -23,11 +24,20 @@ function getPhoneNumber(e) {
23 24
           code: result.code,
24 25
           source,
25 26
         }).then(unionRes => {
26
-          // 手机号授权
27
-          authAppletPhone({
27
+          // getShareId(shareI)
28
+          const shareId = Cache.get('SHARE_ID')
29
+
30
+          let params = {
28 31
             sessionKey: unionRes.session_key,
29 32
             encryptedData: e.detail.encryptedData,
30
-            iv: e.detail.iv
33
+            iv: e.detail.iv,
34
+          }
35
+          if (shareId) {
36
+            params.share_id = shareId
37
+          }
38
+          // 手机号授权
39
+          authAppletPhone({
40
+            ...params
31 41
           }).then(authRes => {
32 42
             userStore.login(authRes.token, authRes.exp)
33 43
             userStore.setUID(authRes.user.uid)
@@ -42,9 +52,9 @@ function getPhoneNumber(e) {
42 52
               third_user_id: unionRes.unionid,
43 53
               type: 1
44 54
             }).then(bindRes => {
45
-              console.log('已绑定手机')
46
-              console.log(bindRes)
47
-
55
+              // console.log('已绑定手机')
56
+              // console.log(bindRes)
57
+              Cache.clear('SHARE_ID')
48 58
               // 跳转
49 59
               switch (props.key) {
50 60
                 case '10':

+ 622 - 51
src/pages/my-reply/test.json

@@ -1,55 +1,626 @@
1 1
 {
2 2
   "status": 200,
3 3
   "message": "success",
4
-  "data": {
5
-    "count": 2,
6
-    "list": [
7
-      {
8
-        "reply_id": "131",
9
-        "uid": "395",
10
-        "mer_id": "323",
11
-        "order_product_id": "3188",
12
-        "unique": null,
13
-        "product_id": "1296",
14
-        "product_type": "0",
15
-        "product_score": "4",
16
-        "service_score": "3",
17
-        "postage_score": "3",
18
-        "rate": "3.3",
19
-        "comment": "dd",
20
-        "pics": "",
21
-        "create_time": "2023-09-22 10:39:39",
22
-        "merchant_reply_content": null,
23
-        "merchant_reply_time": null,
24
-        "is_del": "0",
25
-        "is_reply": "0",
26
-        "is_virtual": "0",
27
-        "nickname": "炸",
28
-        "avatar": "https:\/\/app.bjtdba.com\/uploads\/def\/20210425\/d63bd2aeace508eb83b6fe9194d704b0.png"
29
-      },
30
-      {
31
-        "reply_id": "133",
32
-        "uid": "395",
33
-        "mer_id": "322",
34
-        "order_product_id": "3031",
35
-        "unique": null,
36
-        "product_id": "1637",
37
-        "product_type": "0",
38
-        "product_score": "5",
39
-        "service_score": "5",
40
-        "postage_score": "5",
41
-        "rate": "5.0",
42
-        "comment": "很好,不错,值得推荐",
43
-        "pics": "https:\/\/cdn.bjtdba.com\/chuxubao\/images\/2023-09-22\/9c637202309221100057712.png",
44
-        "create_time": "2023-09-22 11:00:10",
45
-        "merchant_reply_content": null,
46
-        "merchant_reply_time": null,
47
-        "is_del": "0",
48
-        "is_reply": "0",
49
-        "is_virtual": "0",
50
-        "nickname": "炸",
51
-        "avatar": "https:\/\/app.bjtdba.com\/uploads\/def\/20210425\/d63bd2aeace508eb83b6fe9194d704b0.png"
52
-      }
53
-    ]
54
-  }
4
+  "data": [
5
+    {
6
+      "product_id": "10995",
7
+      "mer_id": "321",
8
+      "image": "https:\/\/img13.360buyimg.com\/n12\/jfs\/t1\/92942\/7\/38275\/94380\/64795fffF30424bfb\/5ff47690551d593a.jpg",
9
+      "slider_image": "https:\/\/img13.360buyimg.com\/n12\/jfs\/t1\/92942\/7\/38275\/94380\/64795fffF30424bfb\/5ff47690551d593a.jpg",
10
+      "store_name": "I&W CARNIVAL HWGUOJI瑞士品牌名表女士手表全自动机械表商务防水时尚女表钢带进口机芯",
11
+      "store_info": "1",
12
+      "keyword": "I&W",
13
+      "bar_code": "",
14
+      "brand_id": null,
15
+      "is_show": "1",
16
+      "status": "1",
17
+      "is_del": "0",
18
+      "cate_id": "0",
19
+      "unit_name": "个",
20
+      "sort": "0",
21
+      "rank": "0",
22
+      "sales": "1",
23
+      "price": "1072.06",
24
+      "cost": "974.60",
25
+      "ot_price": "1198.00",
26
+      "stock": "999",
27
+      "is_hot": "0",
28
+      "is_benefit": "0",
29
+      "is_best": "0",
30
+      "is_new": "0",
31
+      "is_good": "0",
32
+      "product_type": "0",
33
+      "ficti": "100",
34
+      "browse": "0",
35
+      "code_path": "",
36
+      "video_link": "",
37
+      "temp_id": "105",
38
+      "spec_type": "1",
39
+      "extension_type": "1",
40
+      "refusal": null,
41
+      "rate": "5",
42
+      "reply_count": "0",
43
+      "mer_status": "1",
44
+      "give_coupon_ids": null,
45
+      "is_gift_bag": "0",
46
+      "create_time": "2023-09-15 01:20:14",
47
+      "care_count": null,
48
+      "is_used": "1",
49
+      "old_product_id": "5176",
50
+      "volunteer": "0",
51
+      "type": "5",
52
+      "pension": "0.00",
53
+      "commission": "5",
54
+      "dc_id": "0",
55
+      "dc_price": null,
56
+      "seckill": "0",
57
+      "is_hide": "0",
58
+      "spu_id": "100017595909",
59
+      "cost_price": null,
60
+      "gong_sku_id": null,
61
+      "plate_mer_profit": "48.73",
62
+      "yanglaojin_scale": "0.02",
63
+      "flag": "1",
64
+      "yanglao": "24.36",
65
+      "da_cang_price": "0.00"
66
+    },
67
+    {
68
+      "product_id": "10994",
69
+      "mer_id": "321",
70
+      "image": "https:\/\/oss-hxq-prod.szbaoly.com\/bjsc\/goods\/3700ae327b1a4dd1a638791d62d0113d.jpg",
71
+      "slider_image": "https:\/\/oss-hxq-prod.szbaoly.com\/bjsc\/goods\/3700ae327b1a4dd1a638791d62d0113d.jpg",
72
+      "store_name": "瑞士宾爵手表钟表白面黑带真皮防水气质配饰女表B1220L",
73
+      "store_info": "1",
74
+      "keyword": "瑞士宾",
75
+      "bar_code": "",
76
+      "brand_id": null,
77
+      "is_show": "1",
78
+      "status": "1",
79
+      "is_del": "0",
80
+      "cate_id": "0",
81
+      "unit_name": "个",
82
+      "sort": "0",
83
+      "rank": "0",
84
+      "sales": "0",
85
+      "price": "236.91",
86
+      "cost": "215.38",
87
+      "ot_price": "1299.00",
88
+      "stock": "1000",
89
+      "is_hot": "0",
90
+      "is_benefit": "0",
91
+      "is_best": "0",
92
+      "is_new": "0",
93
+      "is_good": "0",
94
+      "product_type": "0",
95
+      "ficti": "100",
96
+      "browse": "0",
97
+      "code_path": "",
98
+      "video_link": "",
99
+      "temp_id": "105",
100
+      "spec_type": "0",
101
+      "extension_type": "1",
102
+      "refusal": null,
103
+      "rate": "5",
104
+      "reply_count": "0",
105
+      "mer_status": "1",
106
+      "give_coupon_ids": null,
107
+      "is_gift_bag": "0",
108
+      "create_time": "2023-09-15 01:20:14",
109
+      "care_count": null,
110
+      "is_used": "1",
111
+      "old_product_id": "5175",
112
+      "volunteer": "0",
113
+      "type": "5",
114
+      "pension": "0.00",
115
+      "commission": "5",
116
+      "dc_id": "0",
117
+      "dc_price": null,
118
+      "seckill": "0",
119
+      "is_hide": "0",
120
+      "spu_id": "4-V1490NK4",
121
+      "cost_price": null,
122
+      "gong_sku_id": null,
123
+      "plate_mer_profit": "10.76",
124
+      "yanglaojin_scale": "0.02",
125
+      "flag": "1",
126
+      "yanglao": "5.38",
127
+      "da_cang_price": "0.00"
128
+    },
129
+    {
130
+      "product_id": "10993",
131
+      "mer_id": "321",
132
+      "image": "https:\/\/img.funengscm.com\/19aaa6d49b229fe82e4bc45c6b20140f",
133
+      "slider_image": "https:\/\/img.funengscm.com\/19aaa6d49b229fe82e4bc45c6b20140f",
134
+      "store_name": "阿玛尼银色满天星镶钻女表AR1925",
135
+      "store_info": "1",
136
+      "keyword": "阿玛尼",
137
+      "bar_code": "",
138
+      "brand_id": null,
139
+      "is_show": "1",
140
+      "status": "1",
141
+      "is_del": "0",
142
+      "cate_id": "0",
143
+      "unit_name": "个",
144
+      "sort": "0",
145
+      "rank": "0",
146
+      "sales": "0",
147
+      "price": "785.29",
148
+      "cost": "713.90",
149
+      "ot_price": "3250.00",
150
+      "stock": "1000",
151
+      "is_hot": "0",
152
+      "is_benefit": "0",
153
+      "is_best": "0",
154
+      "is_new": "0",
155
+      "is_good": "0",
156
+      "product_type": "0",
157
+      "ficti": "100",
158
+      "browse": "0",
159
+      "code_path": "",
160
+      "video_link": "",
161
+      "temp_id": "105",
162
+      "spec_type": "0",
163
+      "extension_type": "1",
164
+      "refusal": null,
165
+      "rate": "5",
166
+      "reply_count": "0",
167
+      "mer_status": "1",
168
+      "give_coupon_ids": null,
169
+      "is_gift_bag": "0",
170
+      "create_time": "2023-09-15 01:20:14",
171
+      "care_count": null,
172
+      "is_used": "1",
173
+      "old_product_id": "5174",
174
+      "volunteer": "0",
175
+      "type": "5",
176
+      "pension": "0.00",
177
+      "commission": "5",
178
+      "dc_id": "0",
179
+      "dc_price": null,
180
+      "seckill": "0",
181
+      "is_hide": "0",
182
+      "spu_id": "10-8J6KLUET",
183
+      "cost_price": null,
184
+      "gong_sku_id": null,
185
+      "plate_mer_profit": "35.69",
186
+      "yanglaojin_scale": "0.02",
187
+      "flag": "1",
188
+      "yanglao": "17.84",
189
+      "da_cang_price": "0.00"
190
+    },
191
+    {
192
+      "product_id": "10991",
193
+      "mer_id": "321",
194
+      "image": "https:\/\/img.funengscm.com\/4e06045193c1b52ac98f412c5fb76d8f",
195
+      "slider_image": "https:\/\/img.funengscm.com\/4e06045193c1b52ac98f412c5fb76d8f",
196
+      "store_name": "【拍一发二】食品保鲜袋加厚点断式保鲜袋",
197
+      "store_info": "1",
198
+      "keyword": "【拍一",
199
+      "bar_code": "",
200
+      "brand_id": null,
201
+      "is_show": "1",
202
+      "status": "1",
203
+      "is_del": "0",
204
+      "cate_id": "567",
205
+      "unit_name": "个",
206
+      "sort": "0",
207
+      "rank": "0",
208
+      "sales": "0",
209
+      "price": "9.31",
210
+      "cost": "8.47",
211
+      "ot_price": "19.00",
212
+      "stock": "1000",
213
+      "is_hot": "0",
214
+      "is_benefit": "0",
215
+      "is_best": "0",
216
+      "is_new": "0",
217
+      "is_good": "0",
218
+      "product_type": "0",
219
+      "ficti": "100",
220
+      "browse": "0",
221
+      "code_path": "",
222
+      "video_link": "",
223
+      "temp_id": "105",
224
+      "spec_type": "1",
225
+      "extension_type": "1",
226
+      "refusal": null,
227
+      "rate": "5",
228
+      "reply_count": "0",
229
+      "mer_status": "1",
230
+      "give_coupon_ids": null,
231
+      "is_gift_bag": "0",
232
+      "create_time": "2023-09-15 01:20:14",
233
+      "care_count": null,
234
+      "is_used": "1",
235
+      "old_product_id": "693",
236
+      "volunteer": "0",
237
+      "type": "5",
238
+      "pension": "0.00",
239
+      "commission": "5",
240
+      "dc_id": "0",
241
+      "dc_price": null,
242
+      "seckill": "0",
243
+      "is_hide": "0",
244
+      "spu_id": "10-BPNIGF2D",
245
+      "cost_price": null,
246
+      "gong_sku_id": null,
247
+      "plate_mer_profit": "0.42",
248
+      "yanglaojin_scale": "0.02",
249
+      "flag": "1",
250
+      "yanglao": "0.21",
251
+      "da_cang_price": "0.00"
252
+    },
253
+    {
254
+      "product_id": "10892",
255
+      "mer_id": "321",
256
+      "image": "https:\/\/cbu01.alicdn.com\/img\/ibank\/2019\/987\/163\/11040361789_1908962462.jpg",
257
+      "slider_image": "https:\/\/cbu01.alicdn.com\/img\/ibank\/2019\/987\/163\/11040361789_1908962462.jpg",
258
+      "store_name": "劲波王2800吹风筒机发廊专业大功率家用电吹风机",
259
+      "store_info": "1",
260
+      "keyword": "劲波王",
261
+      "bar_code": "",
262
+      "brand_id": null,
263
+      "is_show": "1",
264
+      "status": "1",
265
+      "is_del": "0",
266
+      "cate_id": "0",
267
+      "unit_name": "个",
268
+      "sort": "0",
269
+      "rank": "0",
270
+      "sales": "0",
271
+      "price": "43.56",
272
+      "cost": "39.60",
273
+      "ot_price": "56.88",
274
+      "stock": "1000",
275
+      "is_hot": "0",
276
+      "is_benefit": "0",
277
+      "is_best": "0",
278
+      "is_new": "0",
279
+      "is_good": "0",
280
+      "product_type": "0",
281
+      "ficti": "100",
282
+      "browse": "0",
283
+      "code_path": "",
284
+      "video_link": "",
285
+      "temp_id": "105",
286
+      "spec_type": "0",
287
+      "extension_type": "1",
288
+      "refusal": null,
289
+      "rate": "5",
290
+      "reply_count": "0",
291
+      "mer_status": "1",
292
+      "give_coupon_ids": null,
293
+      "is_gift_bag": "0",
294
+      "create_time": "2023-09-15 01:20:09",
295
+      "care_count": null,
296
+      "is_used": "1",
297
+      "old_product_id": "5074",
298
+      "volunteer": "0",
299
+      "type": "5",
300
+      "pension": "0.00",
301
+      "commission": "5",
302
+      "dc_id": "0",
303
+      "dc_price": null,
304
+      "seckill": "0",
305
+      "is_hide": "0",
306
+      "spu_id": "12-674-EVDELH9F",
307
+      "cost_price": null,
308
+      "gong_sku_id": null,
309
+      "plate_mer_profit": "1.98",
310
+      "yanglaojin_scale": "0.02",
311
+      "flag": "1",
312
+      "yanglao": "0.99",
313
+      "da_cang_price": "0.00"
314
+    },
315
+    {
316
+      "product_id": "10879",
317
+      "mer_id": "321",
318
+      "image": "https:\/\/img.funengscm.com\/e2407730e64351a6aa181279aed688f4",
319
+      "slider_image": "https:\/\/img.funengscm.com\/e2407730e64351a6aa181279aed688f4",
320
+      "store_name": "HX-361893浣馨内衣洗衣液300ml-2瓶装",
321
+      "store_info": "1",
322
+      "keyword": "HX-",
323
+      "bar_code": "",
324
+      "brand_id": null,
325
+      "is_show": "1",
326
+      "status": "1",
327
+      "is_del": "0",
328
+      "cate_id": "0",
329
+      "unit_name": "个",
330
+      "sort": "0",
331
+      "rank": "0",
332
+      "sales": "0",
333
+      "price": "8.38",
334
+      "cost": "7.62",
335
+      "ot_price": "19.90",
336
+      "stock": "1000",
337
+      "is_hot": "0",
338
+      "is_benefit": "0",
339
+      "is_best": "0",
340
+      "is_new": "0",
341
+      "is_good": "0",
342
+      "product_type": "0",
343
+      "ficti": "100",
344
+      "browse": "0",
345
+      "code_path": "",
346
+      "video_link": "",
347
+      "temp_id": "105",
348
+      "spec_type": "0",
349
+      "extension_type": "1",
350
+      "refusal": null,
351
+      "rate": "5",
352
+      "reply_count": "0",
353
+      "mer_status": "1",
354
+      "give_coupon_ids": null,
355
+      "is_gift_bag": "0",
356
+      "create_time": "2023-09-15 01:20:08",
357
+      "care_count": null,
358
+      "is_used": "1",
359
+      "old_product_id": "5061",
360
+      "volunteer": "0",
361
+      "type": "5",
362
+      "pension": "0.00",
363
+      "commission": "5",
364
+      "dc_id": "0",
365
+      "dc_price": null,
366
+      "seckill": "0",
367
+      "is_hide": "0",
368
+      "spu_id": "F349804944036986880",
369
+      "cost_price": null,
370
+      "gong_sku_id": null,
371
+      "plate_mer_profit": "0.38",
372
+      "yanglaojin_scale": "0.02",
373
+      "flag": "1",
374
+      "yanglao": "0.19",
375
+      "da_cang_price": "0.00"
376
+    },
377
+    {
378
+      "product_id": "10878",
379
+      "mer_id": "321",
380
+      "image": "https:\/\/img.funengscm.com\/edbb0d0a1a4fd0cba83845297abbaaef",
381
+      "slider_image": "https:\/\/img.funengscm.com\/edbb0d0a1a4fd0cba83845297abbaaef",
382
+      "store_name": "LP-364146蓝漂内衣洗衣乳500ml-1瓶",
383
+      "store_info": "1",
384
+      "keyword": "LP-",
385
+      "bar_code": "",
386
+      "brand_id": null,
387
+      "is_show": "1",
388
+      "status": "1",
389
+      "is_del": "0",
390
+      "cate_id": "0",
391
+      "unit_name": "个",
392
+      "sort": "0",
393
+      "rank": "0",
394
+      "sales": "0",
395
+      "price": "7.98",
396
+      "cost": "7.26",
397
+      "ot_price": "9.90",
398
+      "stock": "1000",
399
+      "is_hot": "0",
400
+      "is_benefit": "0",
401
+      "is_best": "0",
402
+      "is_new": "0",
403
+      "is_good": "0",
404
+      "product_type": "0",
405
+      "ficti": "100",
406
+      "browse": "0",
407
+      "code_path": "",
408
+      "video_link": "",
409
+      "temp_id": "105",
410
+      "spec_type": "0",
411
+      "extension_type": "1",
412
+      "refusal": null,
413
+      "rate": "5",
414
+      "reply_count": "0",
415
+      "mer_status": "1",
416
+      "give_coupon_ids": null,
417
+      "is_gift_bag": "0",
418
+      "create_time": "2023-09-15 01:20:08",
419
+      "care_count": null,
420
+      "is_used": "1",
421
+      "old_product_id": "5060",
422
+      "volunteer": "0",
423
+      "type": "5",
424
+      "pension": "0.00",
425
+      "commission": "5",
426
+      "dc_id": "0",
427
+      "dc_price": null,
428
+      "seckill": "0",
429
+      "is_hide": "0",
430
+      "spu_id": "F349804302664990720",
431
+      "cost_price": null,
432
+      "gong_sku_id": null,
433
+      "plate_mer_profit": "0.36",
434
+      "yanglaojin_scale": "0.02",
435
+      "flag": "1",
436
+      "yanglao": "0.18",
437
+      "da_cang_price": "0.00"
438
+    },
439
+    {
440
+      "product_id": "10877",
441
+      "mer_id": "321",
442
+      "image": "https:\/\/img.funengscm.com\/7cfe21040d52b4a8d996deaa05d03985",
443
+      "slider_image": "https:\/\/img.funengscm.com\/7cfe21040d52b4a8d996deaa05d03985",
444
+      "store_name": "361107蓝漂全效洗衣液500G-3袋",
445
+      "store_info": "1",
446
+      "keyword": "361",
447
+      "bar_code": "",
448
+      "brand_id": null,
449
+      "is_show": "1",
450
+      "status": "1",
451
+      "is_del": "0",
452
+      "cate_id": "567",
453
+      "unit_name": "个",
454
+      "sort": "0",
455
+      "rank": "0",
456
+      "sales": "1",
457
+      "price": "9.04",
458
+      "cost": "8.22",
459
+      "ot_price": "9.90",
460
+      "stock": "999",
461
+      "is_hot": "0",
462
+      "is_benefit": "0",
463
+      "is_best": "0",
464
+      "is_new": "0",
465
+      "is_good": "0",
466
+      "product_type": "0",
467
+      "ficti": "100",
468
+      "browse": "0",
469
+      "code_path": "",
470
+      "video_link": "",
471
+      "temp_id": "105",
472
+      "spec_type": "0",
473
+      "extension_type": "1",
474
+      "refusal": null,
475
+      "rate": "5",
476
+      "reply_count": "0",
477
+      "mer_status": "1",
478
+      "give_coupon_ids": null,
479
+      "is_gift_bag": "0",
480
+      "create_time": "2023-09-15 01:20:08",
481
+      "care_count": null,
482
+      "is_used": "1",
483
+      "old_product_id": "714",
484
+      "volunteer": "0",
485
+      "type": "5",
486
+      "pension": "0.00",
487
+      "commission": "5",
488
+      "dc_id": "0",
489
+      "dc_price": null,
490
+      "seckill": "0",
491
+      "is_hide": "0",
492
+      "spu_id": "F349800779290247168",
493
+      "cost_price": null,
494
+      "gong_sku_id": null,
495
+      "plate_mer_profit": "0.41",
496
+      "yanglaojin_scale": "0.02",
497
+      "flag": "1",
498
+      "yanglao": "0.20",
499
+      "da_cang_price": "0.00"
500
+    },
501
+    {
502
+      "product_id": "10876",
503
+      "mer_id": "321",
504
+      "image": "https:\/\/img.funengscm.com\/736d5f2fa33bed2fd8f9274fcd0a1843",
505
+      "slider_image": "https:\/\/img.funengscm.com\/736d5f2fa33bed2fd8f9274fcd0a1843",
506
+      "store_name": "LP-362036蓝漂内衣皂2个",
507
+      "store_info": "1",
508
+      "keyword": "LP-",
509
+      "bar_code": "",
510
+      "brand_id": null,
511
+      "is_show": "1",
512
+      "status": "1",
513
+      "is_del": "0",
514
+      "cate_id": "567",
515
+      "unit_name": "个",
516
+      "sort": "0",
517
+      "rank": "0",
518
+      "sales": "1",
519
+      "price": "6.46",
520
+      "cost": "5.88",
521
+      "ot_price": "9.90",
522
+      "stock": "999",
523
+      "is_hot": "0",
524
+      "is_benefit": "0",
525
+      "is_best": "0",
526
+      "is_new": "0",
527
+      "is_good": "0",
528
+      "product_type": "0",
529
+      "ficti": "100",
530
+      "browse": "0",
531
+      "code_path": "",
532
+      "video_link": "",
533
+      "temp_id": "105",
534
+      "spec_type": "0",
535
+      "extension_type": "1",
536
+      "refusal": null,
537
+      "rate": "5",
538
+      "reply_count": "0",
539
+      "mer_status": "1",
540
+      "give_coupon_ids": null,
541
+      "is_gift_bag": "0",
542
+      "create_time": "2023-09-15 01:20:08",
543
+      "care_count": null,
544
+      "is_used": "1",
545
+      "old_product_id": "705",
546
+      "volunteer": "0",
547
+      "type": "5",
548
+      "pension": "0.00",
549
+      "commission": "5",
550
+      "dc_id": "0",
551
+      "dc_price": null,
552
+      "seckill": "0",
553
+      "is_hide": "0",
554
+      "spu_id": "F349779474465685504",
555
+      "cost_price": null,
556
+      "gong_sku_id": null,
557
+      "plate_mer_profit": "0.29",
558
+      "yanglaojin_scale": "0.02",
559
+      "flag": "1",
560
+      "yanglao": "0.14",
561
+      "da_cang_price": "0.00"
562
+    },
563
+    {
564
+      "product_id": "10875",
565
+      "mer_id": "321",
566
+      "image": "https:\/\/img.yunzhonghe.com\/image\/1593677161572OSovUMPspP.jpg",
567
+      "slider_image": "https:\/\/img.yunzhonghe.com\/image\/1593677161572OSovUMPspP.jpg",
568
+      "store_name": "和正颈椎按摩枕(普通款无震动)HZ-JAZ-2 图片色 图片色",
569
+      "store_info": "1",
570
+      "keyword": "和正颈",
571
+      "bar_code": "",
572
+      "brand_id": null,
573
+      "is_show": "1",
574
+      "status": "1",
575
+      "is_del": "0",
576
+      "cate_id": "0",
577
+      "unit_name": "个",
578
+      "sort": "0",
579
+      "rank": "0",
580
+      "sales": "0",
581
+      "price": "52.70",
582
+      "cost": "47.91",
583
+      "ot_price": "149.00",
584
+      "stock": "1000",
585
+      "is_hot": "0",
586
+      "is_benefit": "0",
587
+      "is_best": "0",
588
+      "is_new": "0",
589
+      "is_good": "0",
590
+      "product_type": "0",
591
+      "ficti": "100",
592
+      "browse": "0",
593
+      "code_path": "",
594
+      "video_link": "",
595
+      "temp_id": "105",
596
+      "spec_type": "0",
597
+      "extension_type": "1",
598
+      "refusal": null,
599
+      "rate": "5",
600
+      "reply_count": "0",
601
+      "mer_status": "1",
602
+      "give_coupon_ids": null,
603
+      "is_gift_bag": "0",
604
+      "create_time": "2023-09-15 01:20:08",
605
+      "care_count": null,
606
+      "is_used": "1",
607
+      "old_product_id": "5059",
608
+      "volunteer": "0",
609
+      "type": "5",
610
+      "pension": "0.00",
611
+      "commission": "5",
612
+      "dc_id": "0",
613
+      "dc_price": null,
614
+      "seckill": "0",
615
+      "is_hide": "0",
616
+      "spu_id": "YZH1125899906849260",
617
+      "cost_price": null,
618
+      "gong_sku_id": null,
619
+      "plate_mer_profit": "2.39",
620
+      "yanglaojin_scale": "0.02",
621
+      "flag": "1",
622
+      "yanglao": "1.19",
623
+      "da_cang_price": "0.00"
624
+    }
625
+  ]
55 626
 }

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

@@ -152,7 +152,7 @@ function handleSubmit() {
152 152
     // 用户留言
153 153
     mark: data.mark,
154 154
     // take: [],
155
-    // share_id: '',
155
+    share_id: '1',
156 156
     // dacang_id:
157 157
     // distribution_address: ''
158 158
     // distribution_mode: ''

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

@@ -100,7 +100,7 @@ function handleClick() {
100 100
       <div class="flex justify-center items-center gap-2">
101 101
         <div class="flex items-center">
102 102
           预估养老金:
103
-          <FPrice :price="item.yanlao"></FPrice>
103
+          <FPrice :price="item.yanglao"></FPrice>
104 104
         </div>
105 105
         <div class="border border-solid border-1px border-gray-500 text-gray rounded px-1">{{ item.status_name }}</div>
106 106
       </div>

+ 1 - 1
src/pages/order/third-order-temp.vue

@@ -30,7 +30,7 @@
30 30
               <div class="flex justify-between text-[11px] items-center">
31 31
                 <div>{{ item.create_time }}</div>
32 32
                 <div class="flex justify-center items-center">
33
-                  预估养老金:<FPrice :price="item.yanlao"></FPrice>
33
+                  预估养老金:<FPrice :price="item.yanglao"></FPrice>
34 34
                   <div class="border border-solid border-1px border-gray-500 text-gray rounded">{{ item.status_name }}</div>
35 35
                 </div>
36 36
               </div>

+ 3 - 3
src/pages/search/index.vue

@@ -1,5 +1,4 @@
1 1
 <script setup lang="ts">
2
-import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
3 2
 import {
4 3
   getDyLiveList,
5 4
   getDyProductList,
@@ -11,7 +10,8 @@ import {
11 10
   searchDyProduct,
12 11
   searchJdProduct,
13 12
   searchPddProduct,
14
-  searchSuProduct, searchVipProduct
13
+  searchSuProduct,
14
+  searchVipProduct
15 15
 } from "~/apis/product";
16 16
 import type {
17 17
   DyProductModel,
@@ -670,7 +670,7 @@ onReachBottom(() => {
670 670
                          mode="widthFix" class="!w-8.5"></image>
671 671
                   <div class="px-2 flex items-center jusitify-center text-xs">
672 672
                     <div>
673
-                      养老金 ¥{{ item.commission }}
673
+                      养老金 ¥{{ state.currentTab === PLATFORM_NAME.DC ? item.yanglao : item.commission }}
674 674
                     </div>
675 675
                   </div>
676 676
                 </div>

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

@@ -17,6 +17,7 @@ import {DcProductModel} from "~/apis/model/dacang.model";
17 17
 import {CDN_URL} from "~/config/app";
18 18
 import {debounce} from "lodash-es";
19 19
 import dayjs from "dayjs";
20
+import {getShareId} from "~/apis/product";
20 21
 
21 22
 const usePageStore = usePageStoreWidthOut()
22 23
 
@@ -87,8 +88,13 @@ onLoad((option: any) => {
87 88
   // const id = '4858'
88 89
   state.id = option.id
89 90
   // state.id = 4858
90
-  state.shareId = option.shareID
91
-
91
+  const fromShareId = option.shareID
92
+  console.log(fromShareId + '---share_id...')
93
+  // if (state.shareId) {
94
+  if (fromShareId) {
95
+    userStore.setShareId(fromShareId)
96
+  }
97
+  // }
92 98
   getRecommendList({
93 99
     page: 1,
94 100
     limit: 10
@@ -96,11 +102,16 @@ onLoad((option: any) => {
96 102
     state.recommendList = res.list
97 103
   })
98 104
 
105
+  getShareId({ pid: state.id, type: 1}).then(res => {
106
+    state.shareId = res.share_id
107
+  })
108
+
99 109
 })
100 110
 
101 111
 function loadProductDetail() {
112
+
102 113
   getProductDetail(state.id).then(res => {
103
-    console.log(res)
114
+    // console.log(res)
104 115
     detail.value = res
105 116
 
106 117
     if (res && res.mer_id && res.mer_id === '148') {
@@ -117,6 +128,7 @@ function loadProductDetail() {
117 128
         console.info(res)
118 129
       })
119 130
     }
131
+
120 132
     // if (detail.value.mer_id === '148') {
121 133
     // }
122 134
     uni.hideLoading()
@@ -133,18 +145,56 @@ function loadProductDetail() {
133 145
   })
134 146
 }
135 147
 
136
-onShareAppMessage(() => {
137
-  return {
138
-    title: `${detail.value.store_name}`,
139
-    path: `pages/store/product/detail?id=${state.id}&from=share`
140
-  }
148
+onShareAppMessage(async () => {
149
+  await uni.showLoading({
150
+    title: '分享中',
151
+    icon: 'none'
152
+  })
153
+  return getShareId({ pid: state.id, type: 1 }).then(res => {
154
+    if (res) {
155
+      state.shareId = res.share_id
156
+      uni.hideLoading()
157
+      return {
158
+        title: `${detail.value.store_name}`,
159
+        path: `pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`
160
+      }
161
+    }
162
+  }).catch(error => {
163
+    uni.showToast({
164
+      title: '请登录后分享',
165
+      icon: 'none'
166
+    }).then(() => {
167
+      setTimeout(() => {
168
+        uni.navigateTo({
169
+          url: '/pages/user/login/index'
170
+        })
171
+      }, 500)
172
+    })
173
+    uni.hideLoading()
174
+  })
175
+
141 176
 })
142 177
 
143 178
 onShareTimeline(() => {
179
+
180
+  if (!userStore.uid) {
181
+    return uni.showToast({
182
+      title: '请登录后分享',
183
+      icon: 'none'
184
+    }).then(() => {
185
+      setTimeout(() => {
186
+        uni.navigateTo({
187
+          url: '/pages/user/login/index'
188
+        })
189
+      }, 500)
190
+    })
191
+  }
192
+
144 193
   return {
145 194
     title: `${detail.value.store_name}`,
146
-    query: `id=${state.id}&from=share`
195
+    query: `id=${state.id}&from=share&shareID=${state.shareId}`
147 196
   }
197
+
148 198
 })
149 199
 
150 200
 

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

@@ -310,7 +310,7 @@ function handleShowMyRulePage() {
310 310
 }
311 311
 </script>
312 312
 <template>
313
-  <div v-if="state.isLogin">
313
+  <div v-if="state.isLogin" class="pb-safe">
314 314
     <div class="bg-[#FD1642] h-40 w-full absolute top-0 left-0"></div>
315 315
     <div class="flex flex-col gap-4 relative px-3 pb-safe">
316 316
       <div class="pt-15 ">

+ 7 - 0
src/pages/user/login/index.vue

@@ -5,6 +5,7 @@ import CXBPhoneLoginButton from "~/components/CXBPhoneLoginButton/CXBPhoneLoginB
5 5
 import CXBNotLoginButton from "~/components/CXBNotLoginButton/CXBNotLoginButton.vue";
6 6
 import {useUserStore} from "~/stores/userStore";
7 7
 import FNavBar from "~/components/FNavBar/FNavBar.vue";
8
+import Cache from "~/utils/cache";
8 9
 // usePageStore.setPageConfig({
9 10
 //   currentPage: {
10 11
 //     type: 'tab',
@@ -54,6 +55,12 @@ async function handleWexinLogin() {
54 55
         source: 'cxb'
55 56
       }).then(unionRes => {
56 57
         console.log(unionRes)
58
+        const shareId = Cache.get('SHARE_ID')
59
+
60
+        if (shareId) {
61
+          params.share_id = shareId
62
+          // params = Object.assign({}, params, { shareId })
63
+        }
57 64
         wechatCheck(unionRes.unionid).then(checkRes => {
58 65
           // console.log(checkRes)
59 66
           userStore.login(checkRes.token, checkRes.exp)

+ 13 - 2
src/pages/user/login/other-phone.vue

@@ -39,6 +39,7 @@
39 39
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
40 40
 import CXBBanner from "~/components/CXBBanner/CXBBanner.vue";
41 41
 import {authSmsLogin, authVerify} from "~/apis/auth.api";
42
+import Cache from "~/utils/cache";
42 43
 const userStore = useUserStore()
43 44
 
44 45
 const state = reactive({
@@ -103,9 +104,18 @@ function handleViewXieyi(type: number) {
103 104
 }
104 105
 
105 106
 function handleLogin() {
106
-  authSmsLogin({
107
+  const shareId = Cache.get('SHARE_ID')
108
+
109
+  let params = {
107 110
     phone: state.phone,
108
-    sms_code: state.code
111
+    sms_code: state.code,
112
+    // share_id:
113
+  }
114
+  if (shareId) {
115
+    params.share_id = shareId
116
+  }
117
+  authSmsLogin({
118
+    ...params
109 119
   }).then(authRes => {
110 120
     console.log(authRes)
111 121
     userStore.login(authRes.token, authRes.exp)
@@ -115,6 +125,7 @@ function handleLogin() {
115 125
       title: '登录成功',
116 126
       icon: 'none'
117 127
     })
128
+    Cache.clear('SHARE_ID')
118 129
     state.isAuthVerify = false
119 130
 
120 131
     setTimeout(() => {

+ 10 - 1
src/stores/userStore.ts

@@ -11,7 +11,8 @@ interface UserStoreState {
11 11
     uid: string | null
12 12
     mer_id: number
13 13
     permissionList: Array<string> | null
14
-    yanglao: number
14
+    yanglao: number,
15
+    shareId: string | null
15 16
 }
16 17
 
17 18
 export const useUserStore = defineStore('userStore', {
@@ -23,12 +24,20 @@ export const useUserStore = defineStore('userStore', {
23 24
         uid: Cache.get(UID) || null,
24 25
         mer_id: 0, // 店铺 ID
25 26
         yanglao: 0,
27
+        shareId: null,
26 28
         permissionList: null // 权限列表
27 29
     }) as UserStoreState,
28 30
     actions: {
29 31
         // getYanglaojinStatistics().then(res => {
30 32
         //     state.all_yanglao = res.all_yanglao
31 33
         // })
34
+        setShareId(shareId: string) {
35
+            this.shareId = shareId
36
+            Cache.set('SHARE_ID', shareId)
37
+        },
38
+        // getShareId(shareId: string) {
39
+        //
40
+        // },
32 41
         async getUserYanglaoJin() {
33 42
             const res = await getYanglaojinStatistics()
34 43
             // this.yanglao = res.all_yanglao