Quellcode durchsuchen

feat:提交代码

longzhicheng vor 1 Jahr
Ursprung
Commit
e6bae0f1b1
100 geänderte Dateien mit 2311 neuen und 5940 gelöschten Zeilen
  1. 1 1
      .env.development
  2. 1 1
      .env.production
  3. 1 1
      pages.config.ts
  4. 23 0
      src/apis/home.ts
  5. 5 4
      src/apis/order.api.ts
  6. 181 17
      src/apis/quickLink.ts
  7. 215 0
      src/apis/user.ts
  8. 3 2
      src/components/CXBBackTop/CXBBackTop.vue
  9. 1 1
      src/components/CXBDyLive/CXBDyLiveRecommend.vue
  10. 2 19
      src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue
  11. 1 1
      src/components/FSearch/FSearch.vue
  12. 1 1
      src/components/ProductList/ProductList.vue
  13. 4 3
      src/config/app.ts
  14. 1 1
      src/manifest.json
  15. 1 791
      src/pages.json
  16. 1 1
      src/pages/annuity/index.vue
  17. 0 10
      src/pages/dacang/list/components/banner.vue
  18. 0 135
      src/pages/dacang/list/components/dacang-header.vue
  19. 212 0
      src/pages/dacang/list/components/life-product.vue
  20. 265 217
      src/pages/dacang/list/index.vue
  21. 2 2
      src/pages/home/components/banner.vue
  22. 24 17
      src/pages/home/components/header.vue
  23. 2 2
      src/pages/home/components/movies.vue
  24. 15 96
      src/pages/home/components/navs.vue
  25. 10 30
      src/pages/home/components/product-list.vue
  26. 25 17
      src/pages/home/components/product-new.vue
  27. 1 1
      src/pages/home/index.vue
  28. 1 1
      src/pages/miaosha/index-bak-old.vue
  29. 1 1
      src/pages/miaosha/index-bak.vue
  30. 1 1
      src/pages/miaosha/index.vue
  31. 2 5
      src/pages/my-invitation/index.vue
  32. 1 1
      src/pages/my-relation-merchant/index.vue
  33. 1 1
      src/pages/my-relation-product/index.vue
  34. 8 8
      src/pages/my-rules/index.vue
  35. 462 413
      src/pages/order-confirm/index.vue
  36. 11 16
      src/pages/order/components/OrderItem.vue
  37. 8 14
      src/pages/order/components/OrderObligationItem.vue
  38. 1 1
      src/pages/order/components/OtherOrderItem.vue
  39. 7 12
      src/pages/order/components/RefundOrderItem.vue
  40. 0 642
      src/pages/order_addcart/index-bak.vue
  41. 0 511
      src/pages/order_addcart/index-new.vue
  42. 8 39
      src/pages/order_addcart/index.vue
  43. 8 14
      src/pages/payment/index.vue
  44. 1 1
      src/pages/payment/success.vue
  45. 1 1
      src/pages/product/dingshenglianmeng.vue
  46. 1 1
      src/pages/product/integral.vue
  47. 1 2
      src/pages/product/zibuyangsheng.vue
  48. 0 472
      src/pages/quick-fuc/business.vue
  49. 0 26
      src/pages/quick-fuc/constants.js
  50. 1 1
      src/pages/red-integral/index.vue
  51. 6 2
      src/pages/refund/components/GoodStatusPopup.vue
  52. 4 3
      src/pages/refund/components/RefundReasonPopup.vue
  53. 0 655
      src/pages/search/index-bak.vue
  54. 0 859
      src/pages/search/index.vue
  55. 2 2
      src/pages/setting/index.vue
  56. 1 1
      src/pages/store/home/components/MerchantProductList.vue
  57. 1 1
      src/pages/store/nearby/index-bak.vue
  58. 4 13
      src/pages/store/nearby/index.vue
  59. 768 736
      src/pages/user/index.vue
  60. 2 26
      src/pages/vip/index.vue
  61. 0 76
      src/pages/withdrawal-record/index.vue
  62. 0 11
      src/pages/zibuyangsheng/index.vue
  63. BIN
      src/static/icon/bangfu.png
  64. BIN
      src/static/icon/douyin_x_230313.png
  65. BIN
      src/static/icon/home_suningyigou_220920.png
  66. BIN
      src/static/icon/home_xianshimiaosha_220614.png
  67. BIN
      src/static/icon/icon_9_9by.png
  68. BIN
      src/static/icon/icon_aljk.png
  69. BIN
      src/static/icon/icon_bgy.png
  70. BIN
      src/static/icon/icon_bsk.png
  71. BIN
      src/static/icon/icon_cjyx.png
  72. BIN
      src/static/icon/icon_czjb.png
  73. BIN
      src/static/icon/icon_dd.png
  74. BIN
      src/static/icon/icon_djfw.png
  75. BIN
      src/static/icon/icon_dks.png
  76. BIN
      src/static/icon/icon_elm.png
  77. BIN
      src/static/icon/icon_fg.png
  78. BIN
      src/static/icon/icon_flqd.png
  79. BIN
      src/static/icon/icon_fz.png
  80. BIN
      src/static/icon/icon_hbw.png
  81. BIN
      src/static/icon/icon_hls.png
  82. BIN
      src/static/icon/icon_jcsh.png
  83. BIN
      src/static/icon/icon_jd.png
  84. BIN
      src/static/icon/icon_jdsx.png
  85. BIN
      src/static/icon/icon_jhs.png
  86. BIN
      src/static/icon/icon_jkd.png
  87. BIN
      src/static/icon/icon_jzfw.png
  88. BIN
      src/static/icon/icon_kdkf.png
  89. BIN
      src/static/icon/icon_kfc.png
  90. BIN
      src/static/icon/icon_klhg.png
  91. BIN
      src/static/icon/icon_ks.png
  92. BIN
      src/static/icon/icon_lxmp.png
  93. BIN
      src/static/icon/icon_mc.png
  94. BIN
      src/static/icon/icon_mdl.png
  95. BIN
      src/static/icon/icon_mtjd.png
  96. BIN
      src/static/icon/icon_mtwm.png
  97. BIN
      src/static/icon/icon_nxc.png
  98. BIN
      src/static/icon/icon_pdd.png
  99. BIN
      src/static/icon/icon_pv.png
  100. 0 0
      src/static/icon/icon_qiang.png

+ 1 - 1
.env.development

@@ -1,2 +1,2 @@
1
-VITE_GLOB_API_URL = 'https://api.gdjbp.com'
1
+VITE_GLOB_API_URL = 'https://api.hxxfb.com'
2
 
2
 

+ 1 - 1
.env.production

@@ -1 +1 @@
1
-VITE_GLOB_API_URL = 'https://api.gdjbp.com'
1
+VITE_GLOB_API_URL = 'https://api.hxxfb.com'

+ 1 - 1
pages.config.ts

@@ -25,7 +25,7 @@ export default defineUniPages({
25
       pagePath: 'pages/dacang/list/index',
25
       pagePath: 'pages/dacang/list/index',
26
       iconPath: 'static/icon/dacang-off.png',
26
       iconPath: 'static/icon/dacang-off.png',
27
       selectedIconPath: 'static/icon/dacang-on.png',
27
       selectedIconPath: 'static/icon/dacang-on.png',
28
-      text: '大仓'
28
+      text: '精品商城'
29
     }, {
29
     }, {
30
       pagePath: 'pages/order_addcart/index',
30
       pagePath: 'pages/order_addcart/index',
31
       iconPath: 'static/icon/shopcart-off.png',
31
       iconPath: 'static/icon/shopcart-off.png',

+ 23 - 0
src/apis/home.ts

@@ -9,7 +9,30 @@ enum API {
9
 	GET_JD_PRODUCT = '/api/jd/list',
9
 	GET_JD_PRODUCT = '/api/jd/list',
10
 	GET_PDD_PRODUCT = '/api/pdd/list',//拼多多
10
 	GET_PDD_PRODUCT = '/api/pdd/list',//拼多多
11
 	GET_WPH_PRODUCT = '/api/vip/goods',//唯品会
11
 	GET_WPH_PRODUCT = '/api/vip/goods',//唯品会
12
+	GET_DENOMINATION = '/api/huafei/denomination',//充值话费lab
13
+	RECHARGE_INFO = '/api/huafei/recharge',//充值话费
12
 }
14
 }
15
+
16
+
17
+/**
18
+ * 充值充值话费lab
19
+ */
20
+export function apiRecharge(phone:any,money:any) {
21
+	return defHttp.post({
22
+		url: API.RECHARGE_INFO,
23
+		data:{phone:phone,money:money}
24
+	})
25
+}
26
+/**
27
+ * 获取充值话费lab
28
+ */
29
+export function getDenomination() {
30
+	return defHttp.post({
31
+		url: API.GET_DENOMINATION
32
+	})
33
+}
34
+
35
+
13
 /**
36
 /**
14
  * 获取滚动消息
37
  * 获取滚动消息
15
  */
38
  */

+ 5 - 4
src/apis/order.api.ts

@@ -17,13 +17,14 @@ export interface CartIdRequest {
17
 export interface CreateOrderRequest {
17
 export interface CreateOrderRequest {
18
     address_id: string//地址id
18
     address_id: string//地址id
19
     distribution_mode: string//配送方式:  1: 快递, 2: 自提
19
     distribution_mode: string//配送方式:  1: 快递, 2: 自提
20
-    cart_id: Array<string>//购物车id
20
+    cart_id: string//购物车id
21
     // mark: json
21
     // mark: json
22
     mark: string//备注
22
     mark: string//备注
23
-    dacang_id: string//大仓id
23
+    // dacang_id: string//大仓id
24
     pay_type: string//支付方式:0: 余额: string1: 微信: string2: 小程序: string4: 支付宝: string5: 特殊商户积分
24
     pay_type: string//支付方式:0: 余额: string1: 微信: string2: 小程序: string4: 支付宝: string5: 特殊商户积分
25
-    mer_id: string//商户id
26
-    share_id: string
25
+    // mer_id: string//商户id
26
+    // share_id: string,
27
+	fzone_paytype:string,//支付类型
27
 }
28
 }
28
 
29
 
29
 enum API {
30
 enum API {

+ 181 - 17
src/apis/quickLink.ts

@@ -1,35 +1,199 @@
1
 import { defHttp } from '~/utils/http'
1
 import { defHttp } from '~/utils/http'
2
-
2
+import { KINGKONGKEY } from '~/apis/model/common.model'
3
 
3
 
4
 enum API {
4
 enum API {
5
-    GET_CATEGORY = '/gateway/wares_service/waresServiceMerchant/selectMerchantSort',
6
-	GET_PRODUCT_TYPE='/gateway/wares_service/waresServiceMerchant/selectMerchant?pageNum=1&pageSize=30',
7
-	GET_PRODUCT_LIST='/gateway/wares_service/waresService/selectProductList?pageNum=1&pageSize=10'
5
+	GET_CATEGORY = '/gateway/wares_service/waresServiceMerchant/selectMerchantSort',
6
+	GET_PRODUCT_TYPE = '/gateway/wares_service/waresServiceMerchant/selectMerchant?pageNum=1&pageSize=30',
7
+	GET_PRODUCT_LIST = '/gateway/wares_service/waresService/selectProductList?pageNum=1&pageSize=10',
8
+
9
+	GET_CLASSIFY = '/api/dacang/nologin/classify',
10
+	GET_PDD_CLASSIFY = '/api/pdd/cat?parentId=0',
11
+	GET_WPH_CLASSIFY = '/api/get_third_category?type=5',
12
+	GET_SU_CLASSIFY = '/api/get_third_category?type=4',
13
+
14
+
15
+	GET_BANNER = '/api/newhome/nologin/banner/dingsheng_banner',
16
+	GET_VIP_BANNER = '/api/newhome/nologin/banner/user_banner',
17
+
18
+	GET_PRODUCT = '/api/store/merchant/product/type_lst?type=jingpin&',
19
+	GET_VIP_PRODUCT = '/api/store/merchant/product/lst/496?limit=10&',
20
+
21
+
22
+	GET_JD_PRODUCT = '/api/jd/list?limit=10&',
23
+	GET_JD_SEARCH_PRODUCT = '/api/jd/search?limit=10&',
24
+	GET_PDD_PRODUCT = '/api/pdd/list?limit=10&',
25
+	GET_PDD_SEARCH_PRODUCT = '/api/pdd/list?limit=10&',
26
+	
27
+	
28
+	GET_WPH_PRODUCT = '/api/vip/goods?limit=10&',
29
+	GET_WPH_SEARCH_PRODUCT = '/api/vip/search?limit=10&',
30
+	
31
+	
32
+	GET_SU_PRODUCT = '/api/su/list?limit=10&',
33
+	GET_SU_SEARCH_PRODUCT = '/api/su/search?limit=10&',
34
+ 
35
+
36
+}
37
+
38
+
39
+
40
+/**
41
+ * 京东/拼多多/唯品会等相关列表
42
+ */
43
+export function apigetShopProduct(data : any) {
44
+	let url = API.GET_JD_PRODUCT
45
+	if (data.type == KINGKONGKEY.JD) {//京东
46
+		url = API.GET_JD_PRODUCT + `cid=${data.cid}&page=${data.page}`
47
+	} else if (data.type == KINGKONGKEY.PDD) {//拼多多
48
+		url = API.GET_PDD_PRODUCT + `cat_id=${data.cid}&page=${data.page}`
49
+	} else if (data.type == KINGKONGKEY.WPH) {//唯品会
50
+		url = API.GET_WPH_PRODUCT + `cid=${data.cid}&page=${data.page}`
51
+	} else if (data.type == KINGKONGKEY.SN) {//苏宁易购
52
+		url = API.GET_SU_PRODUCT + `cid=${data.cid}&page=${data.page}`
53
+	}
54
+	return defHttp.get({
55
+		url: url
56
+	})
57
+}
58
+export function apigetSearchProduct(data : any) {
59
+	console.log("===apigetSearchProduct", data);
60
+	let url = API.GET_JD_PRODUCT
61
+	if (data.type == KINGKONGKEY.JD) {//京东
62
+		if (data.keyword) {
63
+			url = API.GET_JD_SEARCH_PRODUCT + `page=${data.page}&keyword=${data.keyword}`
64
+		} else {
65
+			url = API.GET_JD_PRODUCT + `page=${data.page}`
66
+		}
67
+	} else if (data.type == KINGKONGKEY.PDD) {//拼多多
68
+		if (data.keyword) {
69
+			url = API.GET_PDD_SEARCH_PRODUCT + `page=${data.page}&keyword=${data.keyword}`
70
+		} else {
71
+			url = API.GET_PDD_PRODUCT + `page=${data.page}`
72
+		}
73
+
74
+	} else if (data.type == KINGKONGKEY.WPH) {//唯品会
75
+		if (data.keyword) {
76
+			url = API.GET_WPH_SEARCH_PRODUCT + `page=${data.page}&keyword=${data.keyword}`
77
+		} else {
78
+			url = API.GET_WPH_PRODUCT + `page=${data.page}`
79
+		}
80
+
81
+	} else if (data.type == KINGKONGKEY.SN) {//苏宁易购
82
+		if (data.keyword) {
83
+			url = API.GET_SU_SEARCH_PRODUCT + `page=${data.page}&keyword=${data.keyword}`
84
+		} else {
85
+			url = API.GET_SU_PRODUCT + `page=${data.page}`
86
+		}
87
+	}
88
+	return defHttp.get({
89
+		url: url
90
+	})
91
+}
92
+
93
+/**
94
+ * 京东/拼多多/唯品会等相关分类
95
+ */
96
+export function apiGetShopClassity(type : any) {
97
+	let url = API.GET_PDD_CLASSIFY
98
+	if (type == KINGKONGKEY.PDD) {//拼多多
99
+		url = API.GET_PDD_CLASSIFY
100
+	} else if (type == KINGKONGKEY.WPH) {//唯品会
101
+		url = API.GET_WPH_CLASSIFY
102
+	} else if (type == KINGKONGKEY.SN) {//苏宁易购
103
+		url = API.GET_SU_CLASSIFY
104
+	}
105
+	return defHttp.get({
106
+		url: url
107
+	})
108
+}
109
+
110
+
111
+/**
112
+ * vip产品列表
113
+ */
114
+export function apiGetVipProduct(data : any) {
115
+	return defHttp.get({
116
+		url: API.GET_VIP_PRODUCT + `page=${data.page}&keyword=${data.keyword}`
117
+	})
118
+}
119
+
120
+/**
121
+ * 精品商城产品列表
122
+ */
123
+export function apiGetJPProduct(data : any) {
124
+
125
+	let params = `pageNum=${data.pageNum}&pageSize=${data.pageSize}&keyword=${data.keyword}`
126
+	if (data.cate_id) {
127
+		params = `pageNum=${data.pageNum}&pageSize=${data.pageSize}&keyword=${data.keyword}&cate_id=${data.cate_id}`
128
+	}
129
+	return defHttp.get({
130
+		url: API.GET_PRODUCT + params
131
+	})
132
+}
133
+/**
134
+ * 精彩生活产品列表
135
+ */
136
+export function apiGetProduct(data : any) {
137
+
138
+	let params = `pageNum=${data.pageNum}&pageSize=${data.pageSize}&keyword=${data.keyword}`
139
+	if (data.cate_id) {
140
+		params = `pageNum=${data.pageNum}&pageSize=${data.pageSize}&keyword=${data.keyword}&cate_id=${data.cate_id}`
141
+	}
142
+	return defHttp.get({
143
+		url: API.GET_PRODUCT + params
144
+	})
145
+}
146
+/**
147
+ * vip头部banner
148
+ */
149
+export function apiVipBanner() {
150
+	return defHttp.get({
151
+		url: API.GET_VIP_BANNER
152
+	})
8
 }
153
 }
9
 /**
154
 /**
155
+ * 精彩生活头部banner
156
+ */
157
+export function apiBanner() {
158
+	return defHttp.get({
159
+		url: API.GET_BANNER
160
+	})
161
+}
162
+
163
+
164
+
165
+/**
166
+ * 精彩生活头部分类
167
+ */
168
+export function apiGetClassity() {
169
+	return defHttp.get({
170
+		url: API.GET_CLASSIFY
171
+	})
172
+}
173
+
174
+/**
10
  * 头部分类
175
  * 头部分类
11
  */
176
  */
12
 export function apiGetCategoryList() {
177
 export function apiGetCategoryList() {
13
-    return defHttp.get({
14
-        url: API.GET_CATEGORY
15
-    },{withToken:false})
178
+	return defHttp.get({
179
+		url: API.GET_CATEGORY
180
+	}, { withToken: false })
16
 }
181
 }
17
 
182
 
18
 /**
183
 /**
19
  * 列表分类
184
  * 列表分类
20
  */
185
  */
21
-export function apiGetProductType(id:any) {
22
-    return defHttp.get({
23
-        url: id?(API.GET_PRODUCT_TYPE+"&category_id="+id):API.GET_PRODUCT_TYPE
24
-    },{withToken:false})
186
+export function apiGetProductType(id : any) {
187
+	return defHttp.get({
188
+		url: id ? (API.GET_PRODUCT_TYPE + "&category_id=" + id) : API.GET_PRODUCT_TYPE
189
+	}, { withToken: false })
25
 }
190
 }
26
 
191
 
27
 /**
192
 /**
28
  *产品
193
  *产品
29
  */
194
  */
30
-export function apiGetProductList(id:any) {
31
-    return defHttp.get({
32
-        url: API.GET_PRODUCT_LIST+"&mer_id="+id
33
-    },{withToken:false,joinTime:false})
34
-}
35
-
195
+export function apiGetProductList(id : any) {
196
+	return defHttp.get({
197
+		url: API.GET_PRODUCT_LIST + "&mer_id=" + id
198
+	}, { withToken: false, joinTime: false })
199
+}

+ 215 - 0
src/apis/user.ts

@@ -177,8 +177,223 @@ enum API {
177
 
177
 
178
     // 绑定微信小程序关系
178
     // 绑定微信小程序关系
179
     XCX_BANDING = '/api/entropy/xcx_banding',
179
     XCX_BANDING = '/api/entropy/xcx_banding',
180
+	
181
+	//获取贡献值
182
+	GONGXIAN_INFO ='/api/user/gongxian_info',
183
+	//获取相关的列表
184
+	GONGXIAN_LIST='/api/user/gongxian_list?limit=10&',
185
+	
186
+	//获取京豆
187
+	JINGDOU_INFO ='/api/user/jingdou_info',
188
+	//获取相关的列表
189
+	JINGDOU_LIST='/api/user/jingdou_list?limit=10&',
190
+	
191
+	//获取VR
192
+	VR_INFO ='/api/user/vr_info',
193
+	//获取相关的列表
194
+	VR_LIST='/api/user/vr_list?limit=10&',
195
+    VR_NAME='/vr_name?uid=',
196
+	
197
+	//获取复购金
198
+	FGJ_INFO ='/api/user/fugou_info',
199
+	//获取相关的列表
200
+	FGJ_LIST='/api/user/fugou_list?limit=10&',
201
+	FGJ_NAME='/api/order/number',
202
+	
203
+	
204
+	//获取红包
205
+	HB_INFO ='/api/user/hongbao_info',
206
+	//获取相关的列表
207
+	HB_LIST='/api/user/hongbao_list?limit=10&',
208
+	
209
+	
210
+	//获取积分
211
+	JF_INFO ='/api/user/spread_info_yhc',
212
+	//获取相关的列表
213
+	JF_LIST='/api/user/green_integral_list?limit=10&',
214
+	
215
+	//获取部门相关数据
216
+	DEPARTMENT_INFO ='/api/user/team_list?limit=100&',
217
+	
218
+	//获取佣金
219
+	BROKERAGE_INFO ='/api/user/get_brokerage_info',
220
+	
221
+	//获取转VR列表
222
+	TRANSITION_VR_INFO ='/api/user/transition_vr_log?limit=10&type=1&',
223
+	
224
+	
225
+	//获取收益详情列表
226
+	INVITE_PROFIT_INFO ='/api/user/user_invite_profit_list?limit=1000&',
227
+	
228
+	//转VR数量
229
+	TRANSITION_VR ='/api/user/transition_vr',
230
+	
231
+	//获取账户
232
+	GETACCOUNT_INFO ='/api/user/getAccount',
233
+	
234
+	GET_BANK_LIST= '/api/bank/list',
235
+	BANK_CREATE ='/api/bank/create',
236
+	//发送验证码
237
+	AUTH_VERIFY ='/api/auth/verify',
238
+	//提现
239
+	EXTRACT_CREATE='/api/user/extract/create',
240
+	
241
+	
242
+}
243
+
244
+export function apiExtractCreate(data:any) {
245
+    return defHttp.post({
246
+        url: API.EXTRACT_CREATE,
247
+		data:data
248
+    })
249
+}
250
+
251
+export function apiAuthVerify(phone:any) {
252
+    return defHttp.post({
253
+        url: API.AUTH_VERIFY,
254
+		data:{phone:phone}
255
+    })
256
+}
257
+
258
+export function apiBankCreate(data:any) {
259
+    return defHttp.post({
260
+        url: API.BANK_CREATE,
261
+		data:data
262
+    })
263
+}
264
+
265
+export function apigetBankList() {
266
+    return defHttp.get({
267
+        url: API.GET_BANK_LIST,
268
+    })
269
+}
270
+export function apigetAccount() {
271
+    return defHttp.post({
272
+        url: API.GETACCOUNT_INFO,
273
+    })
274
+}
275
+
276
+export function apiTransitionVr(num:any) {
277
+    return defHttp.post({
278
+        url: API.TRANSITION_VR,
279
+		data:{extract_amount:num}
280
+    })
281
+}
282
+
283
+export function apiGetInviteInfo(data:any) {
284
+	let url =API.INVITE_PROFIT_INFO+`uid=${data.uid}&month=${data.month}`
285
+	if(data.type!=0){
286
+		url =API.INVITE_PROFIT_INFO+`uid=${data.uid}&month=${data.month}&commission_type=${data.type}`
287
+	}
288
+    return defHttp.get({
289
+        url: url
290
+    })
291
+}
292
+
293
+export function apiGetBrokerageInfo() {
294
+    return defHttp.get({
295
+        url: API.BROKERAGE_INFO
296
+    })
297
+}
298
+
299
+export function apiGetTrVrInfo(data:any) {
300
+    return defHttp.get({
301
+        url: API.TRANSITION_VR_INFO+data.page
302
+    })
303
+}
304
+export function apiGetDPInfo(data:any) {
305
+    return defHttp.get({
306
+        url: API.DEPARTMENT_INFO+`page=${data.page}&type=${data.type}`
307
+    })
308
+}
309
+
310
+export function apiGetJFInfo() {
311
+    return defHttp.get({
312
+        url: API.JF_INFO
313
+    })
314
+}
315
+
316
+export function apiGetJFList(data:any) {
317
+    return defHttp.get({
318
+        url: API.JF_LIST+`page=${data.page}&pm=${data.pm}`
319
+    })
320
+}
180
 
321
 
322
+export function apiGetHBInfo() {
323
+    return defHttp.get({
324
+        url: API.HB_INFO
325
+    })
181
 }
326
 }
327
+
328
+export function apiGetHBList(data:any) {
329
+    return defHttp.get({
330
+        url: API.HB_LIST+`page=${data.page}&pm=${data.pm}`
331
+    })
332
+}
333
+
334
+
335
+
336
+export function apiGetFGJNumber(uid:any) {
337
+    return defHttp.get({
338
+        url: API.FGJ_NAME
339
+    })
340
+}
341
+
342
+export function apiGetFGJInfo() {
343
+    return defHttp.get({
344
+        url: API.FGJ_INFO
345
+    })
346
+}
347
+
348
+export function apiGetFGJList(data:any) {
349
+    return defHttp.get({
350
+        url: API.FGJ_LIST+`page=${data.page}&pm=${data.pm}`
351
+    })
352
+}
353
+
354
+
355
+export function apiGetVRName(uid:any) {
356
+    return defHttp.get({
357
+        url: API.VR_NAME+uid
358
+    })
359
+}
360
+
361
+export function apiGetVRInfo() {
362
+    return defHttp.get({
363
+        url: API.VR_INFO
364
+    })
365
+}
366
+
367
+export function apiGetVRList(data:any) {
368
+    return defHttp.get({
369
+        url: API.VR_LIST+`page=${data.page}&pm=${data.pm}`
370
+    })
371
+}
372
+
373
+export function apiGetGongXianInfo() {
374
+    return defHttp.get({
375
+        url: API.GONGXIAN_INFO
376
+    })
377
+}
378
+
379
+export function apiGetGongXianList(data:any) {
380
+    return defHttp.get({
381
+        url: API.GONGXIAN_LIST+`page=${data.page}&pm=${data.pm}`
382
+    })
383
+}
384
+
385
+export function apiGetJingDouInfo() {
386
+    return defHttp.get({
387
+        url: API.JINGDOU_INFO
388
+    })
389
+}
390
+
391
+export function apiGetJingDouList(data:any) {
392
+    return defHttp.get({
393
+        url: API.JINGDOU_LIST+`page=${data.page}&pm=${data.pm}`
394
+    })
395
+}
396
+
182
 // 绑定微信小程序关系
397
 // 绑定微信小程序关系
183
 export function xcxBanding(params: { mer_id: string, share_id: string }) {
398
 export function xcxBanding(params: { mer_id: string, share_id: string }) {
184
     return defHttp.get({
399
     return defHttp.get({

+ 3 - 2
src/components/CXBBackTop/CXBBackTop.vue

@@ -1,14 +1,15 @@
1
 <template>
1
 <template>
2
 <div v-show="flag" class="backtop1" v-if="isShow" >
2
 <div v-show="flag" class="backtop1" v-if="isShow" >
3
-  <img @click="scrollToTop" class="backTopImg" src="../../static/icon/返回顶部@2x.png" alt="">
3
+  <img @click="scrollToTop" class="backTopImg" :src="ICON_CDN_URL+'返回顶部@2x.png'" alt="">
4
 </div>
4
 </div>
5
 <div v-show="flag" class="backtop2" v-else >
5
 <div v-show="flag" class="backtop2" v-else >
6
-  <img @click="scrollToTop" class="backTopImg" src="../../static/icon/返回顶部@2x.png" alt="">
6
+  <img @click="scrollToTop" class="backTopImg" :src="ICON_CDN_URL+'返回顶部@2x.png'" alt="">
7
 </div>
7
 </div>
8
 </template>
8
 </template>
9
 
9
 
10
 <script setup lang='ts'>
10
 <script setup lang='ts'>
11
 import { ref, reactive ,defineProps} from 'vue'
11
 import { ref, reactive ,defineProps} from 'vue'
12
+import { ICON_CDN_URL } from '~/config/app'
12
 
13
 
13
 let flag = ref(false)
14
 let flag = ref(false)
14
 let isShow = ref(true)
15
 let isShow = ref(true)

+ 1 - 1
src/components/CXBDyLive/CXBDyLiveRecommend.vue

@@ -12,7 +12,7 @@ const props = defineProps({
12
 })
12
 })
13
 function handleItemClick(item: DyLiveModel) {
13
 function handleItemClick(item: DyLiveModel) {
14
   uni.navigateTo({
14
   uni.navigateTo({
15
-    url: `/pages/store/product/dy-live-product-list?data=${encodeBase64(item)}`
15
+    url: `/subPages/pages/store/product/dy-live-product-list?data=${encodeBase64(item)}`
16
   })
16
   })
17
 }
17
 }
18
 </script>
18
 </script>

+ 2 - 19
src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue

@@ -13,8 +13,7 @@ const props = defineProps({
13
   }
13
   }
14
 })
14
 })
15
 function getPhoneNumber(e) {
15
 function getPhoneNumber(e) {
16
-  // console.log(e.detail)
17
-  // console.log(e)
16
+ 
18
   if (e.detail.errMsg === 'getPhoneNumber:ok') {
17
   if (e.detail.errMsg === 'getPhoneNumber:ok') {
19
     uni.login({
18
     uni.login({
20
       provider: 'weixin',
19
       provider: 'weixin',
@@ -24,13 +23,7 @@ function getPhoneNumber(e) {
24
           code: result.code,
23
           code: result.code,
25
           source,
24
           source,
26
         }).then(unionRes => {
25
         }).then(unionRes => {
27
-          console.log(111111, unionRes)
28
-          // const shareId = Cache.get('SHARE_ID')
29
-          //存储openid
30
-          // userStore.setOpenid(unionRes.openid)
31
-          // getShareId(shareI)
32
           const shareId = Cache.get('SHARE_ID')
26
           const shareId = Cache.get('SHARE_ID')
33
-
34
           let params = {
27
           let params = {
35
             sessionKey: unionRes.session_key,
28
             sessionKey: unionRes.session_key,
36
             encryptedData: e.detail.encryptedData,
29
             encryptedData: e.detail.encryptedData,
@@ -62,8 +55,6 @@ function getPhoneNumber(e) {
62
               third_user_id: unionRes.unionid,
55
               third_user_id: unionRes.unionid,
63
               type: 1
56
               type: 1
64
             }).then(bindRes => {
57
             }).then(bindRes => {
65
-              // console.log('已绑定手机')
66
-              // console.log(bindRes)
67
               Cache.clear('SHARE_ID')
58
               Cache.clear('SHARE_ID')
68
               if (redirectPageObj) {
59
               if (redirectPageObj) {
69
                 if (redirectPageObj.type === 'page') {
60
                 if (redirectPageObj.type === 'page') {
@@ -112,16 +103,8 @@ function getPhoneNumber(e) {
112
               }
103
               }
113
             })
104
             })
114
 
105
 
115
-
116
-            // console.log(authRes)
117
-            // authRes.token
118
           })
106
           })
119
-          // 手机号绑定
120
-          // res.openid
121
-          // res.session_key
122
-          // bindPhone({
123
-          //
124
-          // })
107
+         
125
         })
108
         })
126
       }
109
       }
127
     })
110
     })

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

@@ -24,7 +24,7 @@ const {
24
 } = useNavBar(props, emit)
24
 } = useNavBar(props, emit)
25
 function handleClick() {
25
 function handleClick() {
26
   uni.navigateTo({
26
   uni.navigateTo({
27
-    url: '/pages/search/index'
27
+    url: '/subPages/pages/search/index'
28
   })
28
   })
29
 }
29
 }
30
 </script>
30
 </script>

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

@@ -19,7 +19,7 @@ function handleClickItem(item) {
19
   // console.log(item)
19
   // console.log(item)
20
   userStore.isPushToProductDetail = true
20
   userStore.isPushToProductDetail = true
21
   uni.navigateTo({
21
   uni.navigateTo({
22
-    url: `/pages/store/product/detail?id=${item.product_id}`,
22
+    url: `/subPages/pages/store/product/detail?id=${item.product_id}`,
23
   })
23
   })
24
 }
24
 }
25
 </script>
25
 </script>

+ 4 - 3
src/config/app.ts

@@ -6,7 +6,7 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
6
 
6
 
7
 // let httpApi = 'https://mer1.crmeb.net'
7
 // let httpApi = 'https://mer1.crmeb.net'
8
 //let httpApi = 'https://test.bjtdba.com'
8
 //let httpApi = 'https://test.bjtdba.com'
9
-let httpApi = 'https://api.gdjbp.com'
9
+let httpApi = 'https://api.hxxfb.com'
10
  
10
  
11
 // let httpApi = 'https://app.bjtdba.com'
11
 // let httpApi = 'https://app.bjtdba.com'
12
 // let httpApi = 'https://test.bjtdba.com'
12
 // let httpApi = 'https://test.bjtdba.com'
@@ -14,8 +14,9 @@ let httpApi = 'https://api.gdjbp.com'
14
 // let httpApi = 'http://192.168.1.77:8324'
14
 // let httpApi = 'http://192.168.1.77:8324'
15
 export const CDN_URL = 'https://cdn.bjtdba.com/chuxubao'
15
 export const CDN_URL = 'https://cdn.bjtdba.com/chuxubao'
16
 export const CDM_URL = 'https://cdn.bjtdba.com/vod'
16
 export const CDM_URL = 'https://cdn.bjtdba.com/vod'
17
-export const IMG_CDN_URL='https://api.gdjbp.com/share/xcx/'
18
-export const ICON_CDN_URL='https://api.gdjbp.com/share/xcx/icon/'
17
+export const IMG_CDN_URL='https://api.hxxfb.com/share/xcx/'
18
+export const IMG_CDN_NEW_URL='https://api.hxxfb.com/share/img/'
19
+export const ICON_CDN_URL='https://api.hxxfb.com/share/xcx/icon/'
19
 
20
 
20
 // 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
21
 // 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
21
 let wsApi = ''
22
 let wsApi = ''

+ 1 - 1
src/manifest.json

@@ -51,7 +51,7 @@
51
     /* 小程序特有相关 */
51
     /* 小程序特有相关 */
52
     "mp-weixin" : {
52
     "mp-weixin" : {
53
         "__usePrivacyCheck__" : true, //隐私政策
53
         "__usePrivacyCheck__" : true, //隐私政策
54
-        "appid" : "wxfb755febdb800f23",
54
+        "appid" : "wx7b4d857deb0447f3",
55
         "setting" : {
55
         "setting" : {
56
             "urlCheck" : false
56
             "urlCheck" : false
57
         },
57
         },

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 791
src/pages.json


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

@@ -118,7 +118,7 @@ function handleThirdBind() {
118
 
118
 
119
 function handlePensionAccount() {
119
 function handlePensionAccount() {
120
   uni.navigateTo({
120
   uni.navigateTo({
121
-    url: '/pages/pension_account/index',
121
+    url: '/subPages/pages/pension_account/index',
122
   })
122
   })
123
 }
123
 }
124
 
124
 

+ 0 - 10
src/pages/dacang/list/components/banner.vue

@@ -1,10 +0,0 @@
1
-<template>
2
-  <div>
3
-    <image :src="bannerImage" mode="widthFix" class="w-full"></image>
4
-  </div>
5
-</template>
6
-<script setup lang="ts">
7
-import {CDN_URL} from "~/config/app";
8
-
9
-const bannerImage = CDN_URL + '/static/assets/banner-dacang.png'
10
-</script>

+ 0 - 135
src/pages/dacang/list/components/dacang-header.vue

@@ -1,135 +0,0 @@
1
-<script lang="ts" setup>
2
-import { computed } from 'vue'
3
-import { useUserStore } from '~/stores/userStore'
4
-import { useDacangStore } from '~/stores/dacangStore'
5
-
6
-const props = defineProps({
7
-  exClass: {
8
-    type: String,
9
-  },
10
-  tabs: {
11
-    type: Array,
12
-  },
13
-  // userInfo: {
14
-  //   type: Object as PropType<UserInfoModel>,
15
-  //   required: true
16
-  // },
17
-  yanglaojin: {
18
-    type: Number,
19
-    default: Number.NaN,
20
-  },
21
-  current: {
22
-    type: String,
23
-    default: '-1',
24
-  },
25
-})
26
-// function handleShowSearchPage() {
27
-//
28
-// }
29
-const emit = defineEmits<{
30
-  (e: 'click:item', value: string): void
31
-}>()
32
-// import {useUserStore} from "~/stores/userStore";
33
-const userStore = useUserStore()
34
-const dacangStore = useDacangStore()
35
-
36
-const systemInfo = uni.getSystemInfoSync()
37
-const statusBarHeight = systemInfo.statusBarHeight ?? 0
38
-const navBarHeight = computed(() => {
39
-  // const propsHeight = Number(props.height)
40
-  let defaultHeight = 44
41
-  // #ifdef MP
42
-  // if (props.fixed) {
43
-  const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
44
-  const menuHeight = menuButtonInfo.height
45
-  const menuTop = menuButtonInfo.top
46
-  defaultHeight = (menuTop - statusBarHeight) * 2 + menuHeight
47
-  // }
48
-  // #endif
49
-  // return propsHeight || defaultHeight
50
-  return defaultHeight
51
-})
52
-
53
-const navBarStyle = computed(() => {
54
-  return {
55
-    paddingTop: `${statusBarHeight}px`,
56
-  }
57
-})
58
-
59
-const tabValue = ref(dacangStore.currentClassify)
60
-
61
-watch(() => dacangStore.currentClassify, (val) => {
62
-  tabValue.value = val
63
-})
64
-function handleClick() {
65
-  if (userStore.userInfo) {
66
-    uni.navigateTo({
67
-      url: '/pages/annuity/index',
68
-    })
69
-  }
70
-  else {
71
-    uni.navigateTo({
72
-      url: '/pages/user/login/index?key=30',
73
-    })
74
-  }
75
-}
76
-
77
-function handleTabItemClick(currentTab) {
78
-  emit('click:item', tabValue.value)
79
-}
80
-function handleShowSearchPage() {
81
-  uni.navigateTo({
82
-    url: '/pages/search/search-dacang',
83
-  })
84
-}
85
-</script>
86
-
87
-<template>
88
-  <div class="dacang-header fixed w-screen text-white z-10 w-full h-20" :style="navBarStyle" :class="exClass">
89
-    <div class="pl-2 pt-2">
90
-      <div
91
-        class="w-60% bg-white rounded-full flex flex-row justify-between items-center border-solid border-1 border-red"
92
-      >
93
-        <image
94
-          src="https://cdn.bjtdba.com/vod/image/2023-02-15/20230215112840149.png" mode="widthFix"
95
-          class="w-4 h-4  pl-2 py-1"
96
-        />
97
-        <div class="flex flex-1 items-center w-100%" @tap.stop="handleShowSearchPage">
98
-          <div class="flex-1 pl-2  font_size ">
99
-            搜索商品关键词
100
-          </div>
101
-          <div class="bg-[#D71608] text-white text-xs w-11 rounded-full text-center py-1 my-0.5 mr-0.5 ">
102
-            搜索
103
-          </div>
104
-        </div>
105
-      </div>
106
-    </div>
107
-
108
-    <!--    <div class="p-3"> -->
109
-    <div class=" ">
110
-      <nut-tabs v-model="tabValue" title-scroll title-gutter="10" name="catePanel" @change="handleTabItemClick">
111
-        <!--         <nut-tab-panel :title="全部"></nut-tab-panel> -->
112
-        <nut-tab-pane
113
-          v-for="item in tabs" :key="item.store_category_id" :title="item.cate_name"
114
-          :pane-key="item.store_category_id"
115
-        />
116
-      </nut-tabs>
117
-    </div>
118
-    <!--    </div> -->
119
-  </div>
120
-</template>
121
-
122
-<style>
123
-.dacang-header {
124
-  --nut-tabs-horizontal-tab-line-color: #fff;
125
-  --nut-tabs-titles-background-color: none;
126
-  --nut-tabs-titles-item-color: #fff;
127
-  --nut-tabs-titles-item-active-color: #fff;
128
-}
129
-
130
-.font_size {
131
-  font-size: 24rpx;
132
-  line-height: 42rpx;
133
-  color: #c0c5cc;
134
-}
135
-</style>

+ 212 - 0
src/pages/dacang/list/components/life-product.vue

@@ -0,0 +1,212 @@
1
+<script lang="ts" setup>
2
+	import { encodeBase64 } from "~/utils/http/helper";
3
+	const props = defineProps({
4
+		list: {
5
+			type: Array,
6
+			required: true,
7
+			default: () => {
8
+				return []
9
+			}
10
+		},
11
+		pageType:{
12
+			type:Number,
13
+			default:0
14
+		}
15
+	})
16
+
17
+	function dealNum(value) {
18
+		return parseFloat(value).toFixed(2)
19
+	}
20
+	
21
+	
22
+	function handleProductItemClick(item) {
23
+		 uni.navigateTo({
24
+			url: `/subPages/pages/store/product/detail?id=${item.product_id}`
25
+		})
26
+	}
27
+</script>
28
+
29
+<template>
30
+	<view class="product-container">
31
+		<view @click="handleProductItemClick(item)" class="product-card-content" v-for="(item,index) in list"
32
+			:key="'product-card-content-'+index">
33
+			<image class="card-img" :src="item.image" mode="aspectFill"></image>
34
+			<view class="title-content">
35
+				<text class="card-title line-clamp-2">{{item.store_name}}</text>
36
+			</view>
37
+
38
+			<!-- <view class="shop-content">
39
+				<image class="shop-icon" src="/static/icon/icon_shop_name.png" mode="widthFix"></image>
40
+				<text class="shop-name">{{item.shopName}}</text>
41
+			</view> -->
42
+
43
+			<view class="annuity-content">
44
+				<view v-if="item.yanglao" class="annuity-value-x mr-10">养老金:¥{{dealNum(item.yanglao+'')}}</view>
45
+				<view v-if="item.pv" class="annuity-value">pv:{{dealNum(item.pv+'')}}</view>
46
+			</view>
47
+
48
+			<view class="price-content">
49
+				<text class="price">{{item.price}}</text>
50
+				<text class="price-x">{{item.ot_price}}</text>
51
+				<view v-if="pageType==0" class="jf-content">积分</view>
52
+				<view v-if="pageType==0" class="jd-content">京豆</view>
53
+				<text v-if="pageType==1"  class="sell">已售{{item.sales}}件</text>
54
+			</view>
55
+
56
+		</view>
57
+	</view>
58
+</template>
59
+
60
+<style scoped lang="scss">
61
+	.product-container {
62
+		display: flex;
63
+		flex-direction: row;
64
+		flex-wrap: wrap;
65
+		margin-left: 10rpx;
66
+		
67
+
68
+		.product-card-content {
69
+			width: 348rpx;
70
+			background-color: #fff;
71
+			border-radius: 20rpx;
72
+			margin-right: 10rpx;
73
+			margin-left: 10rpx;
74
+			margin-bottom: 20rpx;
75
+			align-items: center;
76
+
77
+			.price-content {
78
+				display: flex;
79
+				flex-direction: row;
80
+				margin-top: 20rpx;
81
+				margin-bottom: 20rpx;
82
+				align-items: center;
83
+
84
+				.price {
85
+					font-size: 28rpx;
86
+					font-weight: bolder;
87
+					color: #F83554;
88
+					margin-left: 20rpx;
89
+					margin-right: 10rpx;
90
+				}
91
+
92
+				.price-x {
93
+					font-size: 24rpx;
94
+					color: #999;
95
+					text-decoration: line-through;
96
+					flex: 1;
97
+				}
98
+
99
+				.sell {
100
+					font-size: 24rpx;
101
+					color: #999;
102
+					margin-right: 20rpx;
103
+				}
104
+				.jf-content{
105
+					background-color: #118013;
106
+					border-radius: 4rpx;
107
+					margin-right: 6rpx;
108
+					font-size: 24rpx;
109
+					padding-left: 4rpx;
110
+					color: #fff;
111
+					padding-right: 4rpx;
112
+				}
113
+				.jd-content{
114
+					background-color: #ffcb17;
115
+					border-radius: 4rpx;
116
+					font-size: 24rpx;
117
+					padding-left: 4rpx;
118
+					padding-right: 4rpx;
119
+					color: #F83554;
120
+					margin-right: 10rpx;
121
+				}
122
+			}
123
+
124
+			.annuity-content {
125
+				display: flex;
126
+				margin-left: 20rpx;
127
+				flex-direction: row;
128
+				align-items: center;
129
+				margin-top: 20rpx;
130
+
131
+				.annuity-value {
132
+					background-color: antiquewhite;
133
+					color: #F83554;
134
+					font-size: 24rpx;
135
+					border-radius: 4rpx;
136
+					padding-left: 4rpx;
137
+					padding-right: 4rpx;
138
+				}
139
+				.annuity-value-x {
140
+					background-color: #faf0f1;
141
+					color: #F83554;
142
+					font-size: 24rpx;
143
+					border-radius: 4rpx;
144
+					padding-left: 4rpx;
145
+					padding-right: 4rpx;
146
+				}
147
+
148
+				.mr-10 {
149
+					margin-right: 10rpx;
150
+				}
151
+
152
+			}
153
+
154
+			.card-img {
155
+				width: 348rpx;
156
+				height: 348rpx;
157
+				border-top-left-radius: 20rpx;
158
+				border-top-right-radius: 20rpx;
159
+			}
160
+
161
+			.shop-content {
162
+				display: flex;
163
+				flex-direction: row;
164
+				align-items: center;
165
+				margin-top: 10rpx;
166
+				margin-left: 20rpx;
167
+
168
+				.shop-icon {
169
+					width: 30rpx;
170
+					height: 30rpx;
171
+					margin-right: 10rpx;
172
+				}
173
+
174
+				.shop-name {
175
+					color: #666;
176
+					font-size: 24rpx;
177
+				}
178
+			}
179
+
180
+
181
+			.title-content {
182
+				display: flex;
183
+				flex-direction: row;
184
+				align-items: center;
185
+				padding-left: 10rpx;
186
+				padding-right: 10rpx;
187
+				position: relative;
188
+
189
+				.title-icon {
190
+					width: 30rpx;
191
+					height: 30rpx;
192
+					min-width: 30rpx;
193
+					position: absolute;
194
+					top: 0;
195
+					left: 0;
196
+					margin-left: 20rpx;
197
+				}
198
+
199
+				.card-title {
200
+					width: 348rpx;
201
+					font-size: 26rpx;
202
+					color: #333;
203
+				}
204
+			}
205
+
206
+
207
+		}
208
+
209
+
210
+
211
+	}
212
+</style>

+ 265 - 217
src/pages/dacang/list/index.vue

@@ -1,60 +1,105 @@
1
-<script lang="ts" setup>
2
-	import FNavBar from "~/components/FNavBar/FNavBar.vue";
3
-	import { getDcProductClassify, getDcProductList } from "~/apis/dacang";
4
-	import FTabs from "~/components/FTabs/FTabs.vue";
5
-	import ProductList from "~/components/ProductList/ProductList.vue";
6
-	import type { DcProductModel } from "~/apis/model/dacang.model";
7
-	import { useDacangStore } from "~/stores/dacangStore";
8
-	import { CDN_URL } from "~/config/app";
9
-	import DacangHeader from "~/pages/dacang/list/components/dacang-header.vue";
10
-	import CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
1
+<template>
2
+
3
+	<div class="dacang-container">
4
+         <view class="swiper-content">
5
+			 <div class="w-screen swiper-height" v-if='state.banners && state.banners.length!=0'>
6
+			 	<div class="swiper-height">
7
+			 		<swiper v-if="state.banners" :indicator-dots="state.indicatorDots" indicator-active-color="#e93323"
8
+			 			:autoplay="state.autoplay" :circular="state.circular" :interval="state.interval"
9
+			 			:duration="state.duration" class="w-full h-full rounded-md overflow-hidden ">
10
+			 			<swiper-item v-for="(item, index) in state.banners" :key="index">
11
+			 				<image :src="item.pic" class="w-full h-full object-cover swiper-bg" mode="aspectFill" />
12
+			 			</swiper-item>
13
+			 		</swiper>
14
+			 	</div>
15
+			 </div>
16
+		 </view>
17
+		
18
+		<view class="lab-content">
19
+			<scroll-view scroll-x="true" class="lab-item">
20
+				<view class="lab-item-x" v-for="(item,index) in tabList" :key="'lab-item-x-'+index">
21
+					<view class="lab-item-small" @click="onTabClick(index,item.store_category_id)">
22
+						<text :class="currentIndex==index?'lab-title':'lab-default-title'">{{item.cate_name}}</text>
23
+						<view :class="currentIndex==index?'lab-line':'lab-default-line'"></view>
24
+					</view>
25
+				</view>
26
+			</scroll-view>
27
+		</view>
28
+
29
+		<view class="bottom-content">
30
+			<ProductList :list="pageList" :pageType='1' v-if="pageList && pageList.length!=0" />
31
+			<CXBEmpty v-else></CXBEmpty>
32
+		</view>
33
+	</div>
34
+	<CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
35
+</template>
36
+
37
+<script setup lang="ts">
38
+	import FSearch from "~/components/FSearch/FSearch.vue";
39
+	import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
40
+	import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
11
 	import { getProductShare } from "~/apis/common";
41
 	import { getProductShare } from "~/apis/common";
12
 	import { useUserStore } from "~/stores/userStore";
42
 	import { useUserStore } from "~/stores/userStore";
13
 	import Cache from "~/utils/cache";
43
 	import Cache from "~/utils/cache";
14
-	import { getBannerImg } from '~/apis/product'
15
-	import Banner from "./components/banner.vue";
16
-
17
-
18
-	const usePageStore = usePageStoreWidthOut()
19
-
20
-
44
+	import { apiGetClassity, apiBanner, apiGetProduct } from '~/apis/quickLink'
45
+	import ProductList from './components/life-product.vue'
46
+	import { IMG_CDN_URL } from '~/config/app.ts'
47
+	const pageStore = usePageStoreWidthOut()
48
+	const userStore = useUserStore()
21
 	const state = reactive({
49
 	const state = reactive({
22
-		tabs: [],
23
-		lists: {},
24
-		productList: <Array<DcProductModel>>[],
25
-		currentClassify: '-1',
26
-		keyword: '',
27
-		status: 'noMore',
28
-		banner: '',
29
 		currentPage: 1,
50
 		currentPage: 1,
30
 		pageSize: 10,
51
 		pageSize: 10,
52
+		page: 1,
53
+		limit: 10,
54
+		cid: 0,
31
 		totalPage: 1,
55
 		totalPage: 1,
32
-		isResponseReachBotton: true, // 是否详情触底事件
56
+		banners: [],
57
+		count: 0,
58
+		pageType: 0,
59
+		keyword: '',
60
+		status: 'noMore',
61
+		indicatorDots: true,
62
+		circular: true,
63
+		autoplay: true,
64
+		interval: 5000,
65
+		duration: 500,
66
+		currents: "0",
67
+		title: '',
68
+		type: '',
33
 	})
69
 	})
34
 
70
 
35
-	// 距离顶部距离
36
-	let Scroll_X = ref(0)
37
-
38
-	let scrollPositions = reactive({})
39
-	const dacangStore = useDacangStore()
40
-	const userStore = useUserStore()
41
-
42
-	let count = 0
43
-	
44
-	onLoad(async (option) => {
45
-		state.tabs = [{ store_category_id: '-1', cate_name: '全部' }]
46
-		const classifyRes = await getDcProductClassify()
47
-		state.tabs.push(...classifyRes)
48
-		usePageStore.setPageConfig({
49
-			currentPage: {
50
-				type: 'tab',
51
-				url: '/pages/dacang/list/index'
52
-			}
53
-		})
71
+	const pageList = ref([])
72
+	const tabList = ref([{ category_name: '测试' }])
73
+	const currentIndex = ref(0)
74
+	const count = ref(1)
75
+
76
+
77
+	onShow(() => {
78
+		if (!uni.getStorageSync('UID')) {
79
+			pageStore.setPageConfig({
80
+				currentPage: {
81
+					type: 'tab',
82
+					url: '/pages/home/index'
83
+				}
84
+			})
85
+			return uni.redirectTo({
86
+				url: '/pages/user/login/index'
87
+			})
88
+		}
89
+	})
54
 
90
 
91
+	onLoad((option) => {
55
 		if (option && option.shareId) {
92
 		if (option && option.shareId) {
56
 			userStore.setShareId(option.shareId)
93
 			userStore.setShareId(option.shareId)
57
 		}
94
 		}
95
+		getClassity()
96
+		getBanner()
97
+		getProduct()
98
+		getProductShareInfo()
99
+		userStore.setRedirectPage(`/pages/vip/index?type` + state.type, 'page')
100
+	})
101
+
102
+	function getProductShareInfo() {
58
 		getProductShare().then(res => {
103
 		getProductShare().then(res => {
59
 			if (res) {
104
 			if (res) {
60
 				userStore.setShareId(res.share_id)
105
 				userStore.setShareId(res.share_id)
@@ -62,22 +107,63 @@
62
 		}).catch(message => {
107
 		}).catch(message => {
63
 			console.log(message)
108
 			console.log(message)
64
 		})
109
 		})
65
-		userStore.setRedirectPage(`/pages/dacang/list/index`, 'tab')
66
-		getBannerImg().then(res => {
67
-			console.log('banner', res);
68
-			state.banner = res[0].pic
69
-			console.log(state.banner);
110
+	}
70
 
111
 
112
+	function getProduct() {
113
+		uni.showLoading()
114
+		apiGetProduct({
115
+			pageNum: state.page,
116
+			pageSize: state.limit,
117
+			cate_id: state.cid,
118
+			keyword: state.keyword
119
+		}).then(res => {
120
+			count.value = res.count
121
+			if (state.page === 1) {
122
+				pageList.value = res.list
123
+			} else {
124
+				setTimeout(() => {
125
+					pageList.value.push(...res.list)
126
+				}, 300)
127
+			}
128
+			uni.hideLoading()
71
 		})
129
 		})
72
-	})
130
+	}
73
 
131
 
132
+	function getBanner() {
133
+		apiBanner().then(res => {
134
+			state.banners = res
135
+		})
136
+	}
137
+
138
+	function getClassity() {
139
+		apiGetClassity().then(res => {
140
+			tabList.value = [{ cate_name: '全部' }, ...res]
141
+		})
142
+	}
143
+
144
+	function onTabClick(index, store_category_id) {
145
+		state.cid = store_category_id
146
+		state.page = 1
147
+		currentIndex.value = index
148
+		getProduct()
149
+	}
150
+	//搜索全部筛选
151
+	function searchkwd() {
152
+		if (!state.keyword) {
153
+			return uni.showToast({
154
+				title: '请输入搜索关键字',
155
+				icon: 'none'
156
+			})
157
+		}
158
+		state.page = 1
159
+		getProduct()
160
+	}
74
 
161
 
75
 	onShareAppMessage(() => {
162
 	onShareAppMessage(() => {
76
 		const shareId = Cache.get('SHARE_ID')
163
 		const shareId = Cache.get('SHARE_ID')
77
-
78
 		return {
164
 		return {
79
 			title: `消费储蓄 保障未来`,
165
 			title: `消费储蓄 保障未来`,
80
-			path: `/pages/dacang/list/index?shareId=${shareId}`,
166
+			path: `/pages/vip/index?shareId=${shareId}`,
81
 			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-09/20231009202402136.png'
167
 			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-09/20231009202402136.png'
82
 		}
168
 		}
83
 	})
169
 	})
@@ -86,117 +172,41 @@
86
 		const shareId = Cache.get('SHARE_ID')
172
 		const shareId = Cache.get('SHARE_ID')
87
 		return {
173
 		return {
88
 			title: `消费储蓄 保障未来`,
174
 			title: `消费储蓄 保障未来`,
89
-			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-11/20231011062523504.png',
90
-			query: `from=share&shareId=${shareId}`
175
+			query: `from=share&shareId=${shareId}`,
176
+			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-11/20231011062523504.png'
91
 		}
177
 		}
92
 	})
178
 	})
93
 
179
 
94
-	onShow((options) => {
95
-
96
-		usePageStore.setPageConfig({
97
-			currentPage: {
98
-				type: 'tab',
99
-				url: '/pages/dacang/list/index'
100
-			}
101
-		})
102
-		
103
-		count = count + 1
104
-		console.log('count ---> ',count)
105
-		if (count > 1) {
106
-			userStore.isPushToProductDetail = false
107
-			count = 1
108
-			return
109
-		}
110
-		
111
-		// if (userStore.isPushToProductDetail) {
112
-		// 	userStore.isPushToProductDetail = false
113
-		// 	return
114
-		// }
115
-		
116
-		if (dacangStore) {
117
-			state.currentClassify = dacangStore.currentClassify
118
-		}
119
-		loadList('reload')
120
-		
121
-	})
122
-
123
-	const loadList = async (action : 'page' | 'reload', callback ?: (items) => void) => {
124
-		console.log(action);
125
-		let params : any = {
126
-			page: state.currentPage,
127
-			limit: state.pageSize,
128
-			keyword: state.keyword
129
-		}
130
-		console.log(params);
131
-		if (state.currentClassify !== '-1') {
132
-			params.classify = state.currentClassify
133
-		}
134
-		let res = await getDcProductList({
135
-			...params
180
+	function handleItemClick(item) {
181
+		uni.navigateTo({
182
+			url: `/subPages/pages/store/product/detail?id=${item.product_id}`
136
 		})
183
 		})
137
-		console.log('res>>>>', res);
138
-		if (action === 'page') {
139
-			state.lists[state.currentClassify] = state.lists[state.currentClassify].concat(res)
140
-		}
141
-		if (action === 'reload') {
142
-			state.lists[state.currentClassify] = res
143
-		}
144
-
145
-		if (callback) {
146
-			callback(res)
147
-		}
148
-
149
-
150
 	}
184
 	}
151
 
185
 
152
-	// function handleTabItemClick(classifyId: string) {
153
-	//   state.currentClassify = classifyId
154
-	//   state.currentPage = 1
155
-	//   state.pageSize = 10
156
-
157
-	//   setTimeout(() => {
158
-	//     loadList('reload')
159
-	//   }, 300)
160
-
161
-	// }
162
-
163
-	function handleTabItemClick(classifyId : string) {
164
-		
165
-		state.isResponseReachBotton = false;
166
-		// 切换当前分类页
167
-		state.currentClassify = classifyId;
168
-		// 检查当前分类页是否有保存的滚动位置
169
-		if (scrollPositions[classifyId] !== undefined) {
170
-			// 如果有保存的滚动位置,恢复滚动位置
171
-			uni.pageScrollTo({
172
-				scrollTop: scrollPositions[classifyId],
173
-				duration: 1
174
-			});
175
-		} else {
176
-			// 如果没有保存的滚动位置,重新加载数据
177
-			state.currentPage = 1;
178
-			state.pageSize = 10;
179
-			setTimeout(() => {
180
-				loadList('reload')
181
-			}, 300)
182
-		}
183
-		// state.isResponseReachBotton = true;
186
+	function clearSearch() {
187
+		state.page = 1
188
+		getProduct()
184
 	}
189
 	}
185
 
190
 
186
-	function toHuiyuan() {
187
-		uni.navigateTo({
188
-			url: `/pages/guest_member_new/index?is_merchant=${userStore.userInfo.is_merchant}`
189
-		})
190
-	}
191
+	onPullDownRefresh(() => {
192
+		state.page = 1
193
+		getClassity()
194
+		getBanner()
195
+		getProduct()
196
+		uni.stopPullDownRefresh()
197
+	})
191
 
198
 
199
+	onReachBottom(() => {
200
+		if (pageList.value.length < count.value) {
201
+			state.page += 1
202
+			getProduct()
203
+		}
204
+	})
205
+	// 距离顶部距离
206
+	let Scroll_X = ref(0)
192
 	const headerClass = ref('')
207
 	const headerClass = ref('')
193
 	onPageScroll((page) => {
208
 	onPageScroll((page) => {
194
-
195
 		Scroll_X.value = Number(page.scrollTop.toFixed())
209
 		Scroll_X.value = Number(page.scrollTop.toFixed())
196
-		console.log('Scroll_X ----> ', Scroll_X.value)
197
-		// 保存当前分类页的滚动位置
198
-		scrollPositions[state.currentClassify] = Scroll_X.value;
199
-
200
 		// page.scrollTop
210
 		// page.scrollTop
201
 		if (page.scrollTop >= 76) {
211
 		if (page.scrollTop >= 76) {
202
 			headerClass.value = '!bg-primary !text-white'
212
 			headerClass.value = '!bg-primary !text-white'
@@ -204,80 +214,118 @@
204
 			headerClass.value = ''
214
 			headerClass.value = ''
205
 		}
215
 		}
206
 	})
216
 	})
217
+</script>
207
 
218
 
208
-	onReachBottom(() => {
219
+<route lang="yaml">
220
+style:
221
+  navigationBarTitleText: 精彩生活
222
+  enablePullDownRefresh: true
223
+  navigationStyle: custom
224
+</route>
225
+
226
+<style>
227
+	page {
228
+		background: #f8f8f8;
229
+		--nut-searchbar-background: #fff;
230
+		--nut-searchbar-input-background: #f8f8f8;
231
+		--nut-searchbar-input-box-shadow: none;
232
+	}
233
+</style>
234
+<style scoped lang="scss">
235
+	
236
+	.dacang-container{
237
+		display: flex;
238
+		flex-direction: column;
239
+	}
240
+	.mt-90 {
241
+		margin-top: 90rpx;
242
+	}
243
+
244
+	.bottom-content {
245
+		display: flex;
246
+		flex-direction: column;
247
+		margin-top: 470rpx;
248
+	}
249
+
250
+	.top-info-content {
251
+		display: flex;
252
+		flex-direction: column;
253
+		position: fixed;
254
+		top: 0;
255
+		left: 0;
256
+		z-index: 22;
257
+	
258
+	}
209
 
259
 
210
-		console.log('是否出发触底事件 = ', state.isResponseReachBotton)
260
+	.swiper-height {
261
+		height: 380rpx;
262
+	}
263
+	
264
+	.swiper-content{
265
+		display: flex;
266
+		flex-direction: row;
267
+		position: fixed;
268
+		top: 0;
269
+		left: 0;
270
+		z-index: 99999;
271
+	}
211
 
272
 
212
-		if (!state.isResponseReachBotton) {
213
-			return
273
+	.lab-content {
274
+		width: 100%;
275
+		height: 90rpx;
276
+		display: flex;
277
+		flex-direction: row;
278
+		align-items: center;
279
+		background-color: #fff;
280
+		z-index: 99999;
281
+		position: fixed;
282
+		top: 0;
283
+		margin-top: 380rpx;
284
+		left: 0;
285
+
286
+		.lab-item {
287
+			display: flex;
288
+			flex-direction: row;
289
+			white-space: nowrap;
290
+			width: 100%;
214
 		}
291
 		}
215
-		console.log('触发了')
216
-		uni.showLoading()
217
 
292
 
218
-		state.status = 'loading'
219
-		state.currentPage += 1
220
-		loadList('page', (items) => {
221
-			uni.hideLoading()
222
-			console.log(items)
223
-			if (!items.length > 0) {
224
-				// console.log('没有更多了')
225
-				state.status = 'noMore'
293
+		.lab-item-x {
294
+			display: inline-block;
295
+			margin-right: 10px;
296
+			text-align: center;
297
+		}
298
+
299
+		.lab-item-small {
300
+			display: flex;
301
+			flex-direction: column;
302
+			align-items: center;
303
+			width: 124rpx;
304
+
305
+			.lab-default-title {
306
+				font-size: 28rpx;
307
+				margin-bottom: 10rpx;
226
 			}
308
 			}
227
-		})
228
-	})
229
-	onPullDownRefresh(() => {
230
-		uni.showLoading()
231
-		state.currentPage = 1
232
-		state.pageSize = 10
233
-		loadList('reload', (items) => {
234
-			uni.hideLoading()
235
-			uni.stopPullDownRefresh()
236
-		})
237
-	})
238
 
309
 
239
-	function moving(event) {
240
-		// console.log('event = ', event)
241
-		state.isResponseReachBotton = true
242
-	}
243
-</script>
310
+			.lab-title {
311
+				font-size: 32rpx;
312
+				margin-bottom: 10rpx;
313
+				color: #FE0032;
314
+			}
244
 
315
 
245
-<template>
246
-	<div class="h-screen" @touchmove="moving">
247
-		<DacangHeader :ex-class="headerClass" :tabs="state.tabs" @click:item="handleTabItemClick" />
248
-		<!-- gap-2 -->
249
-		<div class="flex flex-col gap-2">
250
-			<CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
251
-			<image lazy-load :src="state.banner" mode="widthFix" @click="toHuiyuan" class="w-full h-50 mt--2"></image>
252
-			<div>
253
-				<ProductList :list="state.lists[state.currentClassify]" />
254
-			</div>
255
-			<div class="pb-safe flex justify-center items-center text-[12px] text-gray-500"
256
-				v-if="state.lists[state.currentClassify]?.length > 0">
257
-				<div v-if="state.status === 'loading'">
258
-					加载中...
259
-				</div>
260
-				<div v-if="state.status === 'noMore'">
261
-					没有更多了~
262
-				</div>
263
-			</div>
264
-		</div>
316
+			.lab-line {
317
+				width: 50rpx;
318
+				height: 6rpx;
319
+				background-color: #FE0032;
320
+				border-radius: 4rpx;
321
+			}
265
 
322
 
266
-	</div>
267
-</template>
268
-<style>
269
-	page {
270
-		background-color: #f8f8f8;
271
-	}
323
+			.lab-default-line {
324
+				width: 50rpx;
325
+				height: 6rpx;
326
+				border-radius: 4rpx;
327
+			}
272
 
328
 
273
-	.nut-tab-pane {
274
-		display: none !important;
329
+		}
275
 	}
330
 	}
276
-</style>
277
-
278
-<route lang="yaml" >
279
-style:
280
-  navigationStyle: custom
281
-  navigationBarTitleText: 储蓄保
282
-  enablePullDownRefresh: true
283
-</route>
331
+</style>

+ 2 - 2
src/pages/home/components/banner.vue

@@ -7,11 +7,11 @@ function handleGuestMemberNew() {
7
   
7
   
8
   if (userStore.uid) {
8
   if (userStore.uid) {
9
     uni.navigateTo({
9
     uni.navigateTo({
10
-      url: `/pages/guest_member_new/index?is_merchant=${userStore.userInfo.is_merchant}`
10
+      url: `/subPages/pages/guest_member_new/index?is_merchant=${userStore.userInfo.is_merchant}`
11
     })
11
     })
12
   } else {
12
   } else {
13
     uni.navigateTo({
13
     uni.navigateTo({
14
-      url: '/pages/guest_member_new/index'
14
+      url: '/subPages/pages/guest_member_new/index'
15
     })
15
     })
16
   }
16
   }
17
 }
17
 }

+ 24 - 17
src/pages/home/components/header.vue

@@ -4,7 +4,9 @@
4
 	import type { UserInfoModel } from "~/apis/model/userInfoModel";
4
 	import type { UserInfoModel } from "~/apis/model/userInfoModel";
5
 	import { useUserStore } from "~/stores/userStore";
5
 	import { useUserStore } from "~/stores/userStore";
6
 	import { TOP_LAB_ARR } from '../constants.js';
6
 	import { TOP_LAB_ARR } from '../constants.js';
7
+	import { IMG_CDN_URL,IMG_CDN_NEW_URL } from '~/config/app'
7
     const emit = defineEmits(['onTabClick'])
8
     const emit = defineEmits(['onTabClick'])
9
+	const topBannerBg =ref(`${IMG_CDN_URL}jd_bg.png`)
8
 
10
 
9
 	// import {useUserStore} from "~/stores/userStore";
11
 	// import {useUserStore} from "~/stores/userStore";
10
 	const userStore = useUserStore()
12
 	const userStore = useUserStore()
@@ -41,10 +43,7 @@
41
 		exClass: {
43
 		exClass: {
42
 			type: String
44
 			type: String
43
 		},
45
 		},
44
-		// userInfo: {
45
-		//   type: Object as PropType<UserInfoModel>,
46
-		//   required: true
47
-		// },
46
+	
48
 		yanglaojin: {
47
 		yanglaojin: {
49
 			type: Number,
48
 			type: Number,
50
 			default: NaN
49
 			default: NaN
@@ -61,10 +60,7 @@
61
 			})
60
 			})
62
 		}
61
 		}
63
 	}
62
 	}
64
-	// function handleShowSearchPage() {
65
-	//
66
-	// }
67
-
63
+	
68
 	function handleShowMessage() {
64
 	function handleShowMessage() {
69
 		uni.navigateTo({
65
 		uni.navigateTo({
70
 			url: '/pages/message/index'
66
 			url: '/pages/message/index'
@@ -72,7 +68,7 @@
72
 	}
68
 	}
73
 	function handleClickser() {
69
 	function handleClickser() {
74
 		uni.navigateTo({
70
 		uni.navigateTo({
75
-			url: '/pages/search/index'
71
+			url: '/subPages/pages/search/index'
76
 		})
72
 		})
77
 	}
73
 	}
78
 	
74
 	
@@ -81,13 +77,24 @@
81
 		currentIndex.value=position
77
 		currentIndex.value=position
82
 		emit('onTabClick', position)
78
 		emit('onTabClick', position)
83
 	}
79
 	}
80
+	function onYljClick(){
81
+		if (userStore.userInfo && userStore.uid) {
82
+			uni.navigateTo({
83
+				url: '/pages/annuity/index'
84
+			})
85
+		} else {
86
+			uni.navigateTo({
87
+				url: '/pages/user/login/index?key=30'
88
+			})
89
+		}
90
+	}
84
 </script>
91
 </script>
85
 <template>
92
 <template>
86
 	<div class="home-header-content home-header fixed w-screen text-white z-10" :style="navBarStyle">
93
 	<div class="home-header-content home-header fixed w-screen text-white z-10" :style="navBarStyle">
87
-		<image  class="top-bg" src="/static/img/jd_bg.png" mode="widthFix"></image>
94
+		<image  class="top-bg" :src="topBannerBg" mode="widthFix"></image>
88
 		<div class="flex user-info">
95
 		<div class="flex user-info">
89
 			<div @click="handleClick" class="flex gap-2 mb-2 pl-2 flex-1">
96
 			<div @click="handleClick" class="flex gap-2 mb-2 pl-2 flex-1">
90
-				<image v-if="userStore && userStore.userInfo && userStore.userInfo.avatar"
97
+				<!-- <image v-if="userStore && userStore.userInfo && userStore.userInfo.avatar"
91
 					:src="userStore.userInfo.avatar" style="width:74rpx; height:74rpx;" class="rounded-full" />
98
 					:src="userStore.userInfo.avatar" style="width:74rpx; height:74rpx;" class="rounded-full" />
92
 				<image v-else src="https://app.bjtdba.com/uploads/logo.jpg" mode="widthFix"
99
 				<image v-else src="https://app.bjtdba.com/uploads/logo.jpg" mode="widthFix"
93
 					class="w-9 h-9 rounded-full" />
100
 					class="w-9 h-9 rounded-full" />
@@ -99,13 +106,12 @@
99
 					<div v-else class="text-xs">
106
 					<div v-else class="text-xs">
100
 						领取养老金
107
 						领取养老金
101
 					</div>
108
 					</div>
102
-				</div>
109
+				</div> -->
110
+				<image @click="handleShowMessage" :src="IMG_CDN_NEW_URL+'icon_msg_white.png'" mode="widthFix" class="w-6 h-6" ></image>
103
 			</div>
111
 			</div>
104
-			<div class=" right-26 flex flex-col text-[10px] justify-center items-center " @tap.stop="handleShowMessage"
105
-				:style="{ marginRight: `${menuButtonInfo.width + 15}px` }">
106
-				<image src="/static/icon/message-dark.png" mode="widthFix" class="w-4 h-4" v-if="exClass"></image>
107
-				<image src="/static/icon/message.png" mode="widthFix" class="w-4 h-4" v-else></image>
108
-				<div>消息</div>
112
+			<div class=" right-26 flex flex-col text-[10px] justify-center items-center " 
113
+				:style="{ marginRight: `${menuButtonInfo.width + 15}px` }" @click="onYljClick">
114
+				<image :src="IMG_CDN_NEW_URL+'icon_yanglaojin.png'" mode="widthFix" class="w-6 h-6" ></image>
109
 			</div>
115
 			</div>
110
 		</div>
116
 		</div>
111
 
117
 
@@ -218,6 +224,7 @@
218
 	.head-conent {
224
 	.head-conent {
219
 		z-index: 666;
225
 		z-index: 666;
220
 		display: flex;
226
 		display: flex;
227
+		margin-top: 10rpx;
221
 		flex-direction: column;
228
 		flex-direction: column;
222
 	}
229
 	}
223
 
230
 

+ 2 - 2
src/pages/home/components/movies.vue

@@ -1,5 +1,5 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
-	import { IMG_CDN_URL ,ICON_CDN_URL} from '~/config/app.ts'
2
+	import { IMG_CDN_URL ,ICON_CDN_URL} from '~/config/app'
3
 	const currentIndex = ref(0)
3
 	const currentIndex = ref(0)
4
 
4
 
5
 	const moviesList = ref([
5
 	const moviesList = ref([
@@ -23,7 +23,7 @@
23
 			<text class="small-title">即将上映</text>
23
 			<text class="small-title">即将上映</text>
24
 			<view class="right-title" @click="onItemClick">
24
 			<view class="right-title" @click="onItemClick">
25
 				<text class="more-title">查看全部</text>
25
 				<text class="more-title">查看全部</text>
26
-				<image class="more-icon" src="/static/icon/order_store_entry_220624.png" mode="widthFix"></image>
26
+				<image class="more-icon" :src="ICON_CDN_URL+'order_store_entry_220624.png'" mode="widthFix"></image>
27
 			</view>
27
 			</view>
28
 		</view>
28
 		</view>
29
 
29
 

+ 15 - 96
src/pages/home/components/navs.vue

@@ -9,19 +9,6 @@
9
 	
9
 	
10
 	
10
 	
11
 	const navList = ref(NAVS_HOT_ARR)
11
 	const navList = ref(NAVS_HOT_ARR)
12
-
13
-	onBeforeMount(() => {
14
-		// getHomeQuickLink().then((res) => {
15
-		// 	// console.log('res>>>>>', res);
16
-
17
-		// 	if (res) {
18
-		// 		navList.value[12] = res[0]
19
-		// 		navList.value[3] = res[1]
20
-		// 		// navList.value[3] = res[0]
21
-		// 		// console.log(res)
22
-		// 	}
23
-		// })
24
-	})
25
 	
12
 	
26
 	function onTabClikc(position:number){
13
 	function onTabClikc(position:number){
27
 		currentIndex.value = position
14
 		currentIndex.value = position
@@ -36,116 +23,48 @@
36
 		}
23
 		}
37
 	}
24
 	}
38
 
25
 
39
-	// function goTo()
26
+	
40
 	function handleItemClick(item : any) {
27
 	function handleItemClick(item : any) {
41
-		// console.log(item.key)
42
-		// console.log(item)
28
+	
43
 		switch (item.key) {
29
 		switch (item.key) {
44
-			case PLATFORM_NAME.DC: {
45
-				const dacangStore = useDacangStore()
46
-				console.log('categoryId = ', item.categoryId)
47
-				dacangStore.setClassify(item.categoryId)
48
-				uni.switchTab({
49
-					url: '/pages/dacang/list/index',
50
-				})
51
-				break
52
-			}
53
-			// 会员专区
54
-			case 'user': {
55
-				// uni.navigateTo({
56
-				//   url: `/pages/vip/index?type=`+item.key
57
-				// })
58
-				uni.navigateToMiniProgram({
59
-					appId: 'wx9082e5ac2fdb513f',
60
-					path: 'pages/home/index',
61
-					envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
62
-					success(res) {
63
-						// 打开成功
64
-						console.log(res)
65
-					},
66
-					fail: (error) => {
67
-						console.log(error)
68
-					},
69
-				})
70
-
71
-				break
72
-			}
73
-			// 秒杀
74
-			case 'miaosha': {
30
+			case KINGKONGKEY.RECHARGE:{
75
 				uni.navigateTo({
31
 				uni.navigateTo({
76
-					url: '/pages/miaosha/index?type_show=1',
32
+					url: `/subPages/pages/phone-bill/index`,
77
 				})
33
 				})
78
 				break
34
 				break
79
 			}
35
 			}
80
-			case 'zibu': {
81
-				// if ()
82
-				const id = 430
83
-				uni.navigateTo({
84
-					url: `/pages/product/zibuyangsheng?id=${id}`,
85
-				})
86
-				break
87
-			}
88
-			case 'dingsheng': {
89
-				uni.navigateTo({
90
-					url: `/pages/product/dingshenglianmeng?type=${item.key}`,
91
-				})
92
-				break
93
-			}
94
-			// 工厂直供
95
-			case 'gongchang': {
96
-				uni.navigateTo({
97
-					url: `/pages/vip/index?type=${item.key}`,
98
-				})
99
-				break
100
-			}
101
-			case 'jingpin': {
102
-				uni.navigateTo({
103
-					url: `/pages/product/dingshenglianmeng?type=${item.key}`,
104
-				})
105
-				break
106
-			}
107
-			// 积分通兑
108
-			case 'integral': {
109
-				uni.navigateTo({
110
-					url: '/pages/product/integral',
111
-				})
112
-				break
113
-			}
114
-			case 'chuangke': {
115
-				uni.switchTab({
116
-					url: '/pages/store/nearby/index',
117
-				})
118
-				break
119
-			}
120
-		
121
 			case KINGKONGKEY.VIP:{
36
 			case KINGKONGKEY.VIP:{
122
 				uni.navigateTo({
37
 				uni.navigateTo({
123
-					url: `/pages/quick-fuc/vip?type=${item.key}&title=会员专区`,
38
+					url: `/subPages/pages/quick-fuc/vip`,
124
 				})
39
 				})
125
 				break
40
 				break
126
 			}
41
 			}
127
 			case KINGKONGKEY.JCSH:{
42
 			case KINGKONGKEY.JCSH:{
128
 				uni.navigateTo({
43
 				uni.navigateTo({
129
-					
130
-					url: `/pages/quick-fuc/life?type=${item.key}&title=精彩生活`,
44
+					url: `/subPages/pages/quick-fuc/life`,
131
 				})
45
 				})
132
 				break
46
 				break
133
 			}
47
 			}
134
 			case KINGKONGKEY.SMZQ:{
48
 			case KINGKONGKEY.SMZQ:{
135
 				uni.navigateTo({
49
 				uni.navigateTo({
136
-					url: `/pages/quick-fuc/business?type=${item.key}&title=商贸专区`,
50
+					url: `/subPages/pages/quick-fuc/business`,
137
 				})
51
 				})
138
 				break
52
 				break
139
 			}
53
 			}
140
 			case KINGKONGKEY.JD:
54
 			case KINGKONGKEY.JD:
141
 			case KINGKONGKEY.PDD:
55
 			case KINGKONGKEY.PDD:
142
-			case KINGKONGKEY.DY:
143
-			case KINGKONGKEY.TB:
56
+			case KINGKONGKEY.WPH:
144
 			case KINGKONGKEY.SN:
57
 			case KINGKONGKEY.SN:
145
 				uni.navigateTo({
58
 				uni.navigateTo({
146
-					url: `/pages/search/index?platform=${item.key}`,
59
+					url: `/subPages/pages/quick-fuc/shop?type=${item.key}`,
147
 				})
60
 				})
148
 				break
61
 				break
62
+			default:
63
+			uni.showToast({
64
+				title:'功能升级中...',
65
+				icon:'none'
66
+			})
67
+			break
149
 		}
68
 		}
150
 	}
69
 	}
151
 </script>
70
 </script>

+ 10 - 30
src/pages/home/components/product-list.vue

@@ -34,7 +34,7 @@ function handleProductItemClick(
34
   // console.log(item)
34
   // console.log(item)
35
 
35
 
36
   function navigateToDetail(params) {
36
   function navigateToDetail(params) {
37
-    let otherDetailUrl = `/pages/store/product/other`
37
+    let otherDetailUrl = `/subPages/pages/store/product/other`
38
     // throttle(() => {
38
     // throttle(() => {
39
 
39
 
40
       return uni.navigateTo({
40
       return uni.navigateTo({
@@ -42,17 +42,16 @@ function handleProductItemClick(
42
       })
42
       })
43
     // })
43
     // })
44
   }
44
   }
45
+  
46
+
45
   // 大仓
47
   // 大仓
46
   if (item.type === '5') {
48
   if (item.type === '5') {
47
-    // throttle(() => {
48
-      // uni.navigateTo({
49
-      //   url: `/pages/store/product/detail?id=${item.product_id}`
50
-      // })
49
+    
51
       return uni.navigateTo({
50
       return uni.navigateTo({
52
-        url: `/pages/store/product/detail?id=${item.product_id}`
51
+        url: `/subPages/pages/store/product/detail?id=${item.product_id}`
53
       })
52
       })
54
 
53
 
55
-    // })
54
+    
56
 
55
 
57
   }
56
   }
58
   // 京东
57
   // 京东
@@ -96,9 +95,7 @@ function handleProductItemClick(
96
     }
95
     }
97
 
96
 
98
     return navigateToDetail(encodeBase64(productParams))
97
     return navigateToDetail(encodeBase64(productParams))
99
-    // uni.navigateTo({
100
-    //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}`
101
-    // })
98
+    
102
   }
99
   }
103
 
100
 
104
   // 拼多多
101
   // 拼多多
@@ -122,9 +119,7 @@ function handleProductItemClick(
122
     }
119
     }
123
     // console.log(productParams)
120
     // console.log(productParams)
124
     return navigateToDetail(encodeBase64(productParams))
121
     return navigateToDetail(encodeBase64(productParams))
125
-    // uni.navigateTo({
126
-    //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}&allowance=${item.commission}`
127
-    // })
122
+    
128
   }
123
   }
129
   // 唯品会
124
   // 唯品会
130
   if (item.type === 2) {
125
   if (item.type === 2) {
@@ -185,25 +180,10 @@ function handleProductItemClick(
185
 
180
 
186
 function handleLiveRecommendTitleClick() {
181
 function handleLiveRecommendTitleClick() {
187
   uni.navigateTo({
182
   uni.navigateTo({
188
-    url: `/pages/store/product/dy-live`
183
+    url: `/subPages/pages/store/product/dy-live`
189
   })
184
   })
190
 }
185
 }
191
-// function handleClickItem(item) {
192
-//   handleProductItemClick(item)
193
-  // console.log(item)
194
-  // if (item.type === 5 || item.type === '5') {
195
-  //   uni.navigateTo({
196
-  //     url: `/pages/store/product/detail?id=${item.product_id}`
197
-  //   })
198
-  // } else {
199
-  //   // let otherDetailUrl = `/pages/store/product/other`
200
-  //   // uni.navigateTo({
201
-  //   //   url: `${otherDetailUrl}?params=${params}`
202
-  //   // })
203
-  // }
204
-  // uni.navigateTo({
205
-  // })
206
-// }
186
+
207
 </script>
187
 </script>
208
 <template>
188
 <template>
209
 <!--  <scroll-view type="custom">-->
189
 <!--  <scroll-view type="custom">-->

+ 25 - 17
src/pages/home/components/product-new.vue

@@ -1,5 +1,6 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
 	import { encodeBase64 } from "~/utils/http/helper";
2
 	import { encodeBase64 } from "~/utils/http/helper";
3
+	import{ICON_CDN_URL} from '~/config/app'
3
 	const props = defineProps({
4
 	const props = defineProps({
4
 		list: {
5
 		list: {
5
 			type: Array,
6
 			type: Array,
@@ -18,21 +19,21 @@
18
 	function dealIcon(customType, shopType) {
19
 	function dealIcon(customType, shopType) {
19
 		let icon = ''
20
 		let icon = ''
20
 		if (customType == 6) { //淘宝
21
 		if (customType == 6) { //淘宝
21
-			icon = '/static/icon/jingdong_x.png'
22
+			icon = ICON_CDN_URL+'jingdong_x.png'
22
 		} else if (customType == 5) {
23
 		} else if (customType == 5) {
23
 			if (shopType == 1) {
24
 			if (shopType == 1) {
24
-				icon = '/static/icon/tianmao.png'
25
+				icon = ICON_CDN_URL+'tianmao.png'
25
 			} else {
26
 			} else {
26
-				icon = '/static/icon/taobaoyanglao_x.png'
27
+				icon = ICON_CDN_URL+'taobaoyanglao_x.png'
27
 			}
28
 			}
28
 		} else if (customType == 4) {
29
 		} else if (customType == 4) {
29
-			icon = '/static/icon/douyin_x_230313.png'
30
+			icon = ICON_CDN_URL+'douyin_x_230313.png'
30
 		} else if (customType == 3) {
31
 		} else if (customType == 3) {
31
-			icon = '/static/icon/suningyigou_x.png'
32
+			icon = ICON_CDN_URL+'suningyigou_x.png'
32
 		} else if (customType == 2) {
33
 		} else if (customType == 2) {
33
-			icon = '/static/icon/weipinhui_x.png'
34
+			icon = ICON_CDN_URL+'weipinhui_x.png'
34
 		} else {
35
 		} else {
35
-			icon = '/static/icon/pinduoduo_x.png'
36
+			icon = ICON_CDN_URL+'pinduoduo_x.png'
36
 		}
37
 		}
37
 		return icon
38
 		return icon
38
 	}
39
 	}
@@ -40,7 +41,7 @@
40
 	function handleProductItemClick(item) {
41
 	function handleProductItemClick(item) {
41
 		if (item.type === '5') {//大仓
42
 		if (item.type === '5') {//大仓
42
 			return uni.navigateTo({
43
 			return uni.navigateTo({
43
-				url: `/pages/store/product/detail?id=${item.product_id}`
44
+				url: `/subPages/pages/store/product/detail?id=${item.product_id}`
44
 			})
45
 			})
45
 		} else {
46
 		} else {
46
 			 let  productParams = {}
47
 			 let  productParams = {}
@@ -124,7 +125,7 @@
124
 			}
125
 			}
125
             let param = encodeBase64(productParams)
126
             let param = encodeBase64(productParams)
126
 			uni.navigateTo({
127
 			uni.navigateTo({
127
-				url: `/pages/store/product/other?params=${param}`
128
+				url: `/subPages/pages/store/product/other?params=${param}`
128
 			})
129
 			})
129
 		}
130
 		}
130
 
131
 
@@ -143,12 +144,12 @@
143
 			</view>
144
 			</view>
144
 
145
 
145
 			<view class="shop-content">
146
 			<view class="shop-content">
146
-				<image class="shop-icon" src="/static/icon/icon_shop_name.png" mode="widthFix"></image>
147
+				<image class="shop-icon" :src="ICON_CDN_URL+'icon_shop_name.png'" mode="widthFix"></image>
147
 				<text class="shop-name">{{item.shopName}}</text>
148
 				<text class="shop-name">{{item.shopName}}</text>
148
 			</view>
149
 			</view>
149
 
150
 
150
 			<view class="annuity-content">
151
 			<view class="annuity-content">
151
-				<view v-if="item.yanglaojin" class="annuity-value mr-10">养老金:¥{{dealNum(item.yanglaojin+'')}}</view>
152
+				<view v-if="item.yanglaojin" class="annuity-value-x mr-10">养老金:¥{{dealNum(item.yanglaojin+'')}}</view>
152
 				<view v-if="item.pv" class="annuity-value">pv:{{dealNum(item.pv+'')}}</view>
153
 				<view v-if="item.pv" class="annuity-value">pv:{{dealNum(item.pv+'')}}</view>
153
 			</view>
154
 			</view>
154
 
155
 
@@ -170,7 +171,7 @@
170
 		margin-left: 10rpx;
171
 		margin-left: 10rpx;
171
 
172
 
172
 		.product-card-content {
173
 		.product-card-content {
173
-			width: 340rpx;
174
+			width: 348rpx;
174
 			background-color: #fff;
175
 			background-color: #fff;
175
 			border-radius: 20rpx;
176
 			border-radius: 20rpx;
176
 			margin-right: 10rpx;
177
 			margin-right: 10rpx;
@@ -222,6 +223,14 @@
222
 					padding-left: 4rpx;
223
 					padding-left: 4rpx;
223
 					padding-right: 4rpx;
224
 					padding-right: 4rpx;
224
 				}
225
 				}
226
+				.annuity-value-x {
227
+					background-color: #faf0f1;
228
+					color: #F83554;
229
+					font-size: 24rpx;
230
+					border-radius: 4rpx;
231
+					padding-left: 4rpx;
232
+					padding-right: 4rpx;
233
+				}
225
 
234
 
226
 				.mr-10 {
235
 				.mr-10 {
227
 					margin-right: 10rpx;
236
 					margin-right: 10rpx;
@@ -230,8 +239,8 @@
230
 			}
239
 			}
231
 
240
 
232
 			.card-img {
241
 			.card-img {
233
-				width: 340rpx;
234
-				height: 340rpx;
242
+				width: 348rpx;
243
+				height: 348rpx;
235
 				border-top-left-radius: 20rpx;
244
 				border-top-left-radius: 20rpx;
236
 				border-top-right-radius: 20rpx;
245
 				border-top-right-radius: 20rpx;
237
 			}
246
 			}
@@ -275,11 +284,10 @@
275
 				}
284
 				}
276
 
285
 
277
 				.card-title {
286
 				.card-title {
278
-					text-indent: 20px;
279
-					width: 340rpx;
287
+					text-indent: 24px;
288
+					width: 348rpx;
280
 					font-size: 26rpx;
289
 					font-size: 26rpx;
281
 					color: #333;
290
 					color: #333;
282
-					text-align: center;
283
 				}
291
 				}
284
 			}
292
 			}
285
 
293
 

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

@@ -384,7 +384,7 @@
384
 	// 秒杀跳转详情页
384
 	// 秒杀跳转详情页
385
 	function handleToDeatil(product_id : any) {
385
 	function handleToDeatil(product_id : any) {
386
 		uni.navigateTo({
386
 		uni.navigateTo({
387
-			url: `/pages/store/product/detail?id=${product_id}`,
387
+			url: `/subPages/pages/store/product/detail?id=${product_id}`,
388
 		})
388
 		})
389
 	}
389
 	}
390
 
390
 

+ 1 - 1
src/pages/miaosha/index-bak-old.vue

@@ -90,7 +90,7 @@ function handleSeckillDateClick(seckill) {
90
 
90
 
91
 function handleItemClick(seckillItem) {
91
 function handleItemClick(seckillItem) {
92
   uni.navigateTo({
92
   uni.navigateTo({
93
-    url: `/pages/store/product/detail?id=${seckillItem.product_id}`
93
+    url: `/subPages/pages/store/product/detail?id=${seckillItem.product_id}`
94
   })
94
   })
95
 }
95
 }
96
 </script>
96
 </script>

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

@@ -32,7 +32,7 @@ function handleSeckillDateClick(seckill) {
32
 
32
 
33
 function handleItemClick(seckillItem) {
33
 function handleItemClick(seckillItem) {
34
   uni.navigateTo({
34
   uni.navigateTo({
35
-    url: `/pages/store/product/detail?id=${seckillItem.product_id}`
35
+    url: `/subPages/pages/store/product/detail?id=${seckillItem.product_id}`
36
   })
36
   })
37
 }
37
 }
38
 </script>
38
 </script>

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

@@ -189,7 +189,7 @@ function handleItemClick(seckillItem) {
189
     })
189
     })
190
   }
190
   }
191
   uni.navigateTo({
191
   uni.navigateTo({
192
-    url: `/pages/store/product/detail?id=${seckillItem.product_id}`
192
+    url: `/subPages/pages/store/product/detail?id=${seckillItem.product_id}`
193
   })
193
   })
194
 }
194
 }
195
 
195
 

+ 2 - 5
src/pages/my-invitation/index.vue

@@ -90,7 +90,7 @@ function handleClick(item: { url: string, title: string }) {
90
 function handleClickTomo() {
90
 function handleClickTomo() {
91
   if (userStore.userInfo.is_ertification == 1) {
91
   if (userStore.userInfo.is_ertification == 1) {
92
     uni.navigateTo({
92
     uni.navigateTo({
93
-      url: '/pages/immediate-withdrawal/index?type=1'
93
+      url: '/subPages/pages/immediate-withdrawal/index?type=1'
94
     })
94
     })
95
   } else {
95
   } else {
96
     setTimeout(() => {
96
     setTimeout(() => {
@@ -152,10 +152,7 @@ function handleShowAgreement() {
152
           <div class="font-bold">{{ userInviteProfit.UserUnsettledInviteProfit ?
152
           <div class="font-bold">{{ userInviteProfit.UserUnsettledInviteProfit ?
153
             userInviteProfit.UserUnsettledInviteProfit : '0' }}</div>
153
             userInviteProfit.UserUnsettledInviteProfit : '0' }}</div>
154
         </div>
154
         </div>
155
-        <!-- {
156
-                title: '去提现',
157
-                  url: '/pages/immediate-withdrawal/index?type=1'
158
-        },-->
155
+       
159
 
156
 
160
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
157
         <div class="flex-1 flex flex-col justify-center items-center gap-2">
161
           <div class="text-xs text-gray">累计收益(元)</div>
158
           <div class="text-xs text-gray">累计收益(元)</div>

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

@@ -39,7 +39,7 @@ function loadMyRelationMerchantList(keywords = '') {
39
 function handleItemClick(item) {
39
 function handleItemClick(item) {
40
   console.log(item)
40
   console.log(item)
41
   uni.navigateTo({
41
   uni.navigateTo({
42
-    url: '/pages/store/home/index?id=' + item.mer_id
42
+    url: '/subPages/pages/store/home/index?id=' + item.mer_id
43
   })
43
   })
44
 }
44
 }
45
 
45
 

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

@@ -38,7 +38,7 @@ function loadMyFavorite(keywords = '') {
38
 function handleShowDetail(item) {
38
 function handleShowDetail(item) {
39
   console.log(item)
39
   console.log(item)
40
   uni.navigateTo({
40
   uni.navigateTo({
41
-    url: `/pages/store/product/detail?id=${item.product_id}`
41
+    url: `/subPages/pages/store/product/detail?id=${item.product_id}`
42
   })
42
   })
43
 }
43
 }
44
 function handleRemoveMyRelationProduct(item: any, index: number) {
44
 function handleRemoveMyRelationProduct(item: any, index: number) {

+ 8 - 8
src/pages/my-rules/index.vue

@@ -4,7 +4,7 @@ import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
4
 
4
 
5
 import { encodePhone } from "../../utils";
5
 import { encodePhone } from "../../utils";
6
 import { getAgentInfo, getRules, getUserInfo } from "~/apis/user";
6
 import { getAgentInfo, getRules, getUserInfo } from "~/apis/user";
7
-import { CDM_URL } from '~/config/app';
7
+import { CDM_URL ,ICON_CDN_URL} from '~/config/app';
8
 
8
 
9
 const userStore = useUserStore()
9
 const userStore = useUserStore()
10
 const ruleDetail = ref<{
10
 const ruleDetail = ref<{
@@ -44,14 +44,14 @@ const userType = computed(() => {
44
     // if (bangfu) {
44
     // if (bangfu) {
45
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
45
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
46
     // }
46
     // }
47
-    return ['../../static/img-hy/用户.png']
47
+    return [ICON_CDN_URL+'用户.png']
48
   }
48
   }
49
   // 会员
49
   // 会员
50
   if (userRichType == 1) {
50
   if (userRichType == 1) {
51
     // if (bangfu) {
51
     // if (bangfu) {
52
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
52
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
53
     // }
53
     // }
54
-    return ['../../static/img-hy/会员.png']
54
+    return [ICON_CDN_URL+'会员.png']
55
 
55
 
56
   }
56
   }
57
   // 创始人
57
   // 创始人
@@ -59,7 +59,7 @@ const userType = computed(() => {
59
     // if (bangfu) {
59
     // if (bangfu) {
60
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
60
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
61
     // }
61
     // }
62
-    return ['../../static/img-hy/创始人.png']
62
+    return [ICON_CDN_URL+'创始人.png']
63
   }
63
   }
64
   // 合伙人
64
   // 合伙人
65
   if (userRichType == 4) {
65
   if (userRichType == 4) {
@@ -67,19 +67,19 @@ const userType = computed(() => {
67
     // if (bangfu) {
67
     // if (bangfu) {
68
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
68
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
69
     // }
69
     // }
70
-    return ['../../static/img-hy/高级会员.png']
70
+    return [ICON_CDN_URL+'高级会员.png']
71
   }
71
   }
72
   if (userRichType == 8) {
72
   if (userRichType == 8) {
73
     // if (bangfu) {
73
     // if (bangfu) {
74
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
74
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
75
     // }
75
     // }
76
-    return ['../../static/img-hy/合伙人.png']
76
+    return [ICON_CDN_URL+'合伙人.png']
77
   }
77
   }
78
   if (userRichType == 9) {
78
   if (userRichType == 9) {
79
     // if (bangfu) {
79
     // if (bangfu) {
80
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
80
     //   return ['../../static/img-hy/帮扶中心.png', bangfu]
81
     // }
81
     // }
82
-    return ['../../static/img-hy/联合创始人.png']
82
+    return [ICON_CDN_URL+'联合创始人.png']
83
   }
83
   }
84
   if (!userRichType) {
84
   if (!userRichType) {
85
     // if (bangfu) {
85
     // if (bangfu) {
@@ -144,7 +144,7 @@ function handleShowMyIntegral() {
144
 }
144
 }
145
 function handleShowMyAllOrder(tab?: number) {
145
 function handleShowMyAllOrder(tab?: number) {
146
   uni.navigateTo({
146
   uni.navigateTo({
147
-    url: '/pages/order/index?tabIndex=' + tab
147
+    url: '/subPages/pages/order/index?tabIndex=' + tab
148
   })
148
   })
149
 }
149
 }
150
 function handleToRedIntegral() {
150
 function handleToRedIntegral() {

+ 462 - 413
src/pages/order-confirm/index.vue

@@ -1,417 +1,404 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import { reactive } from 'vue'
3
-import { getUserAddressList, getUserVipInfo } from '~/apis/user'
4
-import type { CreateOrderRequest } from '~/apis/order.api'
5
-import { cartChange, orderCheck, orderCreate } from '~/apis/order.api'
6
-import CXBYaojinTag from '~/components/CXBYaojinTag/CXBYaojinTag.vue'
7
-import FCell from '~/components/FCell/FCell.vue'
8
-import { encodePhone } from '~/utils'
9
-import { CDN_URL } from '~/config/app'
10
-import { useAddressStore } from '~/stores/addressStore'
11
-import FField from '~/components/FField/FField.vue'
12
-
13
-const addressIcon = `${CDN_URL}/static/assets/dingwi_220624.png`
14
-// const addressInfo = ref({})
15
-const addressStore = useAddressStore()
16
-const userStore = useUserStore()
17
-
18
-const data = reactive({
19
-  cartOrder: [],
20
-
21
-  type: '',
22
-  addressInfo: {},
23
-  cartId: '',
24
-  addressId: '',
25
-  productId: '',
26
-  // da_type
27
-  // dahy
28
-  vipType: '',
29
-  is_dacang_vip_product: '',
30
-  totalPrice: '',
31
-  orderStatus: '',
32
-  mark: '',
33
-  // 商品总价?
34
-  // proPrice: ''
35
-
36
-  enabled: false,
37
-})
38
-onLoad(async (options) => {
39
-  if (options && options.type)
40
-    data.type = options.type
41
-
42
-  // console.log(options.cartId)
43
-  if (options && options.cartId)
44
-    data.cartId = options.cartId
45
-
46
-  if (options && options.product_id)
47
-    data.productId = options.product_id
48
-
49
-  // console.log(data)
50
-  // if (options && options.addressId) {
51
-  //   // getUserAddressDetail(options.addressId).then(res => {
52
-  //   //   data.addressInfo = res
53
-  //   //   data.addressId = res.address_id || 0
54
-  //   // })
55
-  // } else {
56
-  //   getUserAddressList().then(res => {
57
-  //     data.addressInfo = res.list.length > 0 ? res.list[0] : {}
58
-  //     data.addressId = res.list.length > 0 ? res.list[0].address_id : '0'
59
-  //   })
60
-  // }
61
-  const res = await getUserAddressList()
62
-  console.log('我可是res啊', res)
63
-  if (res.list && res.list.length > 0) {
64
-    data.addressInfo = res.list[0]
65
-    data.addressId = res.list[0].address_id
66
-  }
67
-  // await addressStore.getCurrentAddress()
68
-  // console.log(addressStore.address)
69
-  // data.addressInfo = addressStore.address
70
-  // data.addressId = addressStore.address.address_id
71
-  // console.log(  data.addressId )
72
-
73
-  // console.log(addressStore.address)
74
-  /// 查看用户VIP信息
75
-  getUserVipInfo().then((res) => {
76
-    console.log(res)
77
-    data.vipType = res.da_type
78
-  })
79
-  /// 检查商品
80
-  // checkProductDaCang(data.productId).then(res => {
81
-  //   console.log(res)
82
-  // })
83
-  /// 获取订单商品数据
84
-  uni.showLoading({
85
-    title: '数据加载中',
86
-    icon: 'none',
87
-  })
88
-  orderCheck({
89
-    cart_id: data.cartId.split(','),
90
-    address_id: data.addressId,
91
-  }).then((res) => {
92
-    console.log(15999999, res)
93
-    data.is_dacang_vip_product = res.is_dacang_vip_product
94
-    data.cartOrder = res.order
95
-    data.totalPrice = res.order_price
96
-    data.orderStatus = res.status
97
-    // data.proPrice = res.proPrice
98
-    uni.hideLoading()
99
-  }).catch((error) => {
100
-    uni.hideLoading()
101
-    uni.showToast({
102
-      title: error,
103
-      icon: 'none',
104
-    })
105
-  })
106
-})
107
-
108
-watch(() => addressStore.address, (val) => {
109
-  data.addressInfo = val
110
-  data.addressId = val.address_id
111
-})
112
-function handleSubmit() {
113
-  if (!data.addressId) {
114
-    return uni.showToast({
115
-      title: '请选择收货地址',
116
-      icon: 'none',
117
-    })
118
-  }
119
-
120
-  // if (data.orderStatus != 'finish') {
121
-  //   return uni.showToast({
122
-  //     title: '请选择收货地址',
123
-  //     icon: 'none'
124
-  //   })
125
-  // }
126
-
127
-  if (data.orderStatus == 'noDeliver') {
128
-    return uni.showToast({
129
-      title: '暂不发货',
130
-    })
131
-  }
132
-
133
-  // if (data.is_dacang_vip_product == 1) {
134
-  //   if (data.is_dacang == '') {
135
-  //     return uni.showToast({
136
-  //       title: '请选择大仓',
137
-  //       icon: 'none'
138
-  //     })
139
-  //   }
140
-  // }
141
-  console.log(data.type)
142
-  const paymentData: CreateOrderRequest = {
143
-    cart_id: data.cartId.split(','),
144
-    address_id: data.addressId,
145
-    // 优惠券
146
-    // coupon:
147
-    // pay_type;//支付方式:0: 余额;1: 微信;2: 小程序;4: 支付宝;5: 特殊商户积分
148
-    pay_type: data.type && data.type == '3' ? '5' : '2',
149
-    // pay_type: data.type,
150
-    mer_id: data.type && data.type == '3' ? '148' : '',
151
-    // 用户留言
152
-    mark: data.mark,
153
-    // take: [],
154
-    share_id: '1',
155
-    // dacang_id:
156
-    // distribution_address: ''
157
-    // distribution_mode: ''
158
-  }
159
-
160
-  // 判断是否自提,附加自提商铺
161
-  // paymentData.take.push(mer_id)
162
-
163
-  data.enabled = true
164
-  payment(paymentData)
165
-}
166
-
167
-function payment(createOrderData: CreateOrderRequest) {
168
-  uni.showLoading({
169
-    title: '加载中',
170
-    mask: false,
171
-  })
172
-
173
-  if (createOrderData.mer_id == '148') {
174
-    orderCreate(createOrderData).then((res) => {
175
-      if (res) {
176
-		  data.enabled = false
177
-        uni.hideLoading()
178
-        console.log(res)
179
-        // uni.navigateTo({
180
-        //   url: '/pages/payment/success'
181
-        // })
182
-        uni.showToast({
183
-          title: '积分兑换成功',
184
-          icon: 'none',
185
-        }).then(() => {
186
-          setTimeout(() => {
187
-            uni.switchTab({
188
-              url: '/pages/home/index',
189
-            })
190
-          }, 500)
191
-        })
192
-        // uni.navigateTo({
193
-        //   // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`
194
-        // url: '/pages/payment/index?' + `pay_price=${res.groupOrder.pay_price}&order_id=${res.order_id}&OrderList=${JSON.stringify(res.groupOrder)}`
195
-        // })
196
-      }
197
-    }).catch((err) => {
198
-      data.enabled = false
199
-      uni.hideLoading()
200
-      return uni.showToast({
201
-        title: err,
202
-        icon: 'none',
203
-      })
204
-    })
205
-  }
206
-  else {
207
-    orderCreate(createOrderData).then((res) => {
208
-      if (res) {
209
-		  data.enabled = false
210
-        console.log(res)
211
-        // console.log('order_create')
212
-        console.log(res)
213
-        uni.hideLoading()
214
-        uni.navigateTo({
215
-          //   // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`
216
-          url: '/pages/payment/index?' + `pay_price=${res.groupOrder.pay_price}&order_id=${res.order_id}&OrderList=${JSON.stringify(res.groupOrder)}`,
217
-        })
218
-      }
219
-    }).catch((err) => {
220
-      data.enabled = false
221
-      uni.hideLoading()
222
-      return uni.showToast({
223
-        title: err,
224
-        icon: 'none',
225
-      })
226
-    })
227
-  }
228
-}
229
-
230
-function handleAddressSelect() {
231
-  uni.navigateTo({
232
-    url: '/pages/user/address/index?from=order',
233
-  })
234
-}
235
-function gotoCoupon() {
236
-  uni.navigateTo({
237
-    url: '/pages/to-coupon/to-coupon',
238
-  })
239
-}
240
-function handleNumberChange(num, goodItem) {
241
-  console.log(goodItem)
242
-  uni.showLoading()
243
-  console.log(num)
244
-  cartChange(goodItem.cart_id, num).then((res) => {
245
-    reTotal()
246
-    uni.hideLoading()
247
-  }).catch((error) => {
248
-	  // uni.hideLoading()
249
-
250
-	  return uni.showToast({
251
-	    title: error,
252
-	    icon: 'none',
253
-	  })
254
-  })
255
-}
256
-
257
-function reTotal() {
258
-  orderCheck({
259
-    cart_id: data.cartId.split(','),
260
-    address_id: data.addressId,
261
-  }).then((res) => {
262
-    console.log('我可是res啊', res)
263
-    data.is_dacang_vip_product = res.is_dacang_vip_product
264
-    data.cartOrder = res.order
265
-    console.log('data.cartOrder', data.cartOrder)
266
-
267
-    data.totalPrice = res.order_price
268
-    data.orderStatus = res.status
269
-    // data.proPrice = res.proPrice
270
-    uni.hideLoading()
271
-  }).catch((error) => {
272
-    uni.hideLoading()
273
-    console.log(`${error}----`)
274
-    uni.showToast({
275
-      title: error,
276
-      icon: 'none',
277
-    })
278
-  })
279
-  // let allArr = []
280
-  // let totalMoney = 0
281
-  // let totalNum = 0
282
-
283
-  // shopping.value?.list.forEach((goods, index) => {
284
-  //   // 总金额|总数
285
-  //   goods.list.forEach(goodItem => {
286
-  //     if (goodItem.check) {
287
-  //       totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
288
-  //       totalNum += Number.parseFloat(goodItem.cart_num)
289
-  //       // state.cart_id.push(goodItem.cart_id)
290
-  //     }
291
-  //   })
292
-  // })
293
-  //
294
-  // // isAllSelect.value = allArr.length === shopping.value?.list.length
295
-  // // state.totalCartCount = totalNum
296
-  // state.totalPrice = totalMoney
297
-}
2
+	import { reactive } from 'vue'
3
+	import { getUserAddressList, getUserVipInfo } from '~/apis/user'
4
+	import type { CreateOrderRequest } from '~/apis/order.api'
5
+	import { cartChange, orderCheck, orderCreate } from '~/apis/order.api'
6
+	import CXBYaojinTag from '~/components/CXBYaojinTag/CXBYaojinTag.vue'
7
+	import FCell from '~/components/FCell/FCell.vue'
8
+	import { encodePhone } from '~/utils'
9
+	import { CDN_URL,IMG_CDN_NEW_URL } from '~/config/app'
10
+	import { useAddressStore } from '~/stores/addressStore'
11
+	import FField from '~/components/FField/FField.vue'
12
+
13
+	const addressIcon = `${CDN_URL}/static/assets/dingwi_220624.png`
14
+	// const addressInfo = ref({})
15
+	const addressStore = useAddressStore()
16
+	const userStore = useUserStore()
17
+
18
+	const data = reactive({
19
+		cartOrder: [],
20
+
21
+		type: '',
22
+		addressInfo: {},
23
+		cartId: '',
24
+		addressId: '',
25
+		productId: '',
26
+		// da_type
27
+		// dahy
28
+		vipType: '',
29
+		is_dacang_vip_product: '',
30
+		totalPrice: '',
31
+		orderStatus: '',
32
+		mark: '',
33
+		// 商品总价?
34
+		// proPrice: ''
35
+
36
+		enabled: false,
37
+	})
38
+
39
+	const defautRadioIcon = ref(IMG_CDN_NEW_URL+'SingleChoice_nor.png')
40
+	const checkRadioIcon = ref(IMG_CDN_NEW_URL+'SingleChoice_sel.png')
41
+	onLoad(async (options) => {
42
+		if (options && options.type)
43
+			data.type = options.type
44
+
45
+		if (options && options.cartId)
46
+			data.cartId = options.cartId
47
+
48
+		if (options && options.product_id)
49
+			data.productId = options.product_id
50
+
51
+		const res = await getUserAddressList()
52
+		console.log('我可是res啊', res)
53
+		if (res.list && res.list.length > 0) {
54
+			data.addressInfo = res.list[0]
55
+			data.addressId = res.list[0].address_id
56
+		}
57
+
58
+		/// 查看用户VIP信息
59
+		getUserVipInfo().then((res) => {
60
+			console.log(res)
61
+			data.vipType = res.da_type
62
+		})
63
+
64
+		/// 获取订单商品数据
65
+		uni.showLoading({
66
+			title: '数据加载中',
67
+			icon: 'none',
68
+		})
69
+		orderCheck({
70
+			cart_id: data.cartId.split(','),
71
+			address_id: data.addressId,
72
+		}).then((res) => {
73
+			console.log(15999999, res)
74
+			data.is_dacang_vip_product = res.is_dacang_vip_product
75
+			data.cartOrder = res.order
76
+			data.totalPrice = res.order_price
77
+			data.orderStatus = res.status
78
+			// data.proPrice = res.proPrice
79
+			uni.hideLoading()
80
+		}).catch((error) => {
81
+			uni.hideLoading()
82
+			uni.showToast({
83
+				title: error,
84
+				icon: 'none',
85
+			})
86
+		})
87
+	})
88
+
89
+	watch(() => addressStore.address, (val) => {
90
+		data.addressInfo = val
91
+		data.addressId = val.address_id
92
+	})
93
+	function handleSubmit() {
94
+		if (!data.addressId) {
95
+			return uni.showToast({
96
+				title: '请选择收货地址',
97
+				icon: 'none',
98
+			})
99
+		}
100
+		if (data.orderStatus == 'noDeliver') {
101
+			return uni.showToast({
102
+				title: '暂不发货',
103
+			})
104
+		}
105
+        let fzone_paytypeX 
106
+		for (var i = 0; i < data.cartOrder.length; i++) {
107
+			let cartOrderList = data.cartOrder[i].list
108
+			for (var j = 0; j < cartOrderList.length; j++) {
109
+			fzone_paytypeX	= cartOrderList[j].fzone_paytypeX
110
+				if (!fzone_paytypeX) {
111
+					uni.showToast({
112
+						title: '请选择支付方式!',
113
+						icon: 'none'
114
+					})
115
+					return
116
+				}
117
+			}
118
+		}
119
+
120
+		const paymentData : CreateOrderRequest = {
121
+			cart_id: data.cartId,
122
+			address_id: data.addressId,
123
+			// pay_type;//支付方式:0: 余额;1: 微信;2: 小程序;4: 支付宝;5: 特殊商户积分
124
+			pay_type: '1',
125
+			// 用户留言
126
+			mark: data.mark,
127
+			distribution_mode: '1',
128
+			fzone_paytype: JSON.stringify(fzone_paytypeX)
129
+		}
130
+		data.enabled = true
131
+		payment(paymentData)
132
+	}
133
+
134
+	function payment(createOrderData : CreateOrderRequest) {
135
+		uni.showLoading({
136
+			title: '加载中',
137
+			mask: false,
138
+		})
139
+
140
+		if (createOrderData.mer_id == '148') {
141
+			orderCreate(createOrderData).then((res) => {
142
+				if (res) {
143
+					data.enabled = false
144
+					uni.hideLoading()
145
+					console.log(res)
146
+					uni.showToast({
147
+						title: '积分兑换成功',
148
+						icon: 'none',
149
+					}).then(() => {
150
+						setTimeout(() => {
151
+							uni.switchTab({
152
+								url: '/pages/home/index',
153
+							})
154
+						}, 500)
155
+					})
156
+				}
157
+			}).catch((err) => {
158
+				data.enabled = false
159
+				uni.hideLoading()
160
+				return uni.showToast({
161
+					title: err,
162
+					icon: 'none',
163
+				})
164
+			})
165
+		}
166
+		else {
167
+			orderCreate(createOrderData).then((res) => {
168
+				if (res) {
169
+					data.enabled = false
170
+					console.log(res)
171
+					// console.log('order_create')
172
+					console.log(res)
173
+					uni.hideLoading()
174
+					uni.navigateTo({
175
+						//   // url: '/pages/payment/index?' + `cardId=${data.cartId}&type=1&product_id=${data.productId}`
176
+						url: '/pages/payment/index?' + `pay_price=${res.groupOrder.pay_price}&order_id=${res.order_id}&OrderList=${JSON.stringify(res.groupOrder)}`,
177
+					})
178
+				}
179
+			}).catch((err) => {
180
+				data.enabled = false
181
+				uni.hideLoading()
182
+				return uni.showToast({
183
+					title: err,
184
+					icon: 'none',
185
+				})
186
+			})
187
+		}
188
+	}
189
+
190
+	function handleAddressSelect() {
191
+		uni.navigateTo({
192
+			url: '/subPages/pages/user/address/index?from=order',
193
+		})
194
+	}
195
+	function gotoCoupon() {
196
+		uni.navigateTo({
197
+			url: '/pages/to-coupon/to-coupon',
198
+		})
199
+	}
200
+	function handleNumberChange(num, goodItem) {
201
+		uni.showLoading()
202
+		cartChange(goodItem.cart_id, num).then((res) => {
203
+			reTotal()
204
+			uni.hideLoading()
205
+		}).catch((error) => {
206
+			return uni.showToast({
207
+				title: error,
208
+				icon: 'none',
209
+			})
210
+		})
211
+	}
212
+
213
+
214
+
215
+	function onRadioClick(index, fIndex, childIndex) {
216
+		let _list = data.cartOrder[index].list[fIndex].fzone_paytype
217
+		for (let s of _list) {
218
+			s.checked = false
219
+		}
220
+		data.cartOrder[index].list[fIndex].fzone_paytype[childIndex].checked = true
221
+		data.cartOrder[index].list[fIndex].fzone_paytypeX = data.cartOrder[index].list[fIndex].fzone_paytype[childIndex]
222
+	}
223
+
224
+	function onNumClick(index, fIndex, type) {
225
+		let _data = JSON.parse(JSON.stringify(data.cartOrder))
226
+		let _num = data.cartOrder[index].list[fIndex].cart_num
227
+		let currentNum = _num
228
+		if (type == 0) {//减
229
+			if (_num == 1) {
230
+				uni.showToast({
231
+					title: '最少购买一件哦!',
232
+					icon: 'none'
233
+				})
234
+			} else {
235
+				currentNum = parseInt(currentNum) - 1
236
+			}
237
+		} else {//加
238
+			currentNum = parseInt(currentNum) + 1
239
+		}
240
+		data.cartOrder[index].list[fIndex].cart_num = currentNum
241
+		handleNumberChange(currentNum, data.cartOrder[index].list[fIndex])
242
+	}
243
+
244
+	function reTotal() {
245
+		orderCheck({
246
+			cart_id: data.cartId.split(','),
247
+			address_id: data.addressId,
248
+		}).then((res) => {
249
+			console.log('我可是res啊', res)
250
+			data.is_dacang_vip_product = res.is_dacang_vip_product
251
+			data.cartOrder = res.order
252
+			console.log('data.cartOrder', data.cartOrder)
253
+
254
+			data.totalPrice = res.order_price
255
+			data.orderStatus = res.status
256
+			// data.proPrice = res.proPrice
257
+			uni.hideLoading()
258
+		}).catch((error) => {
259
+			uni.hideLoading()
260
+			console.log(`${error}----`)
261
+			uni.showToast({
262
+				title: error,
263
+				icon: 'none',
264
+			})
265
+		})
266
+	}
298
 </script>
267
 </script>
299
 
268
 
300
 <template>
269
 <template>
301
-  <div class="p-3 flex flex-col gap-3 pb-safe">
302
-    <div class="rounded bg-white p-3 flex" @click="handleAddressSelect">
303
-      <div class="flex flex-col flex-1 gap-2">
304
-        <div class="flex items-center gap-2">
305
-          <div class="flex text-sm text-gray-500 justify-between items-center w-full">
306
-            <div class="flex-1 flex items-center gap-2">
307
-              <div class="w-fit flex">
308
-                <image :src="addressIcon" mode="aspectFit" class="w-4 h-4" />
309
-              </div>
310
-              <div v-if="data.addressId" class="flex-1 flex">
311
-                {{ `${data.addressInfo.province} ${data.addressInfo.city} ${data.addressInfo.district} ${
270
+	<div class="p-3 flex flex-col gap-3 pb-safe">
271
+		<div class="rounded bg-white p-3 flex" @click="handleAddressSelect">
272
+			<div class="flex flex-col flex-1 gap-2">
273
+				<div class="flex items-center gap-2">
274
+					<div class="flex text-sm text-gray-500 justify-between items-center w-full">
275
+						<div class="flex-1 flex items-center gap-2">
276
+							<div class="w-fit flex">
277
+								<image :src="addressIcon" mode="aspectFit" class="w-4 h-4" />
278
+							</div>
279
+							<div v-if="data.addressId" class="flex-1 flex">
280
+								{{ `${data.addressInfo.province} ${data.addressInfo.city} ${data.addressInfo.district} ${
312
                   data.addressInfo.detail}` }}
281
                   data.addressInfo.detail}` }}
313
-              </div>
314
-              <div v-else class="flex-1 flex">
315
-                请选择收货地址
316
-              </div>
317
-            </div>
318
-
319
-            <div class="w-4 flex i-tabler-chevron-right text-gray" />
320
-          </div>
321
-        </div>
322
-        <!--          <div class="flex text-sm font-bold">{{ data.addressInfo.detail }}</div> -->
323
-        <div class="flex gap-2 items-center text-xs text-gray-500">
324
-          <div>
325
-            {{ data.addressInfo.real_name }}
326
-          </div>
327
-          <div v-if="data.addressInfo && data.addressInfo.phone">
328
-            {{ encodePhone(data.addressInfo.phone) }}
329
-          </div>
330
-        </div>
331
-      </div>
332
-    </div>
333
-
334
-    <div class="pb-15">
335
-      <div v-for="(item, index) in data.cartOrder" :key="index" class=" bg-white rounded">
336
-        <div class="flex items-center gap-2 text-sm font-bold f-hairline-bottom p-3">
337
-          <image :src="item.mer_avatar" mode="widthFix" class="w-5 h-5" />
338
-          <div>{{ item.mer_name }}</div>
339
-          <!--            <div>{{ item.mer_id}}</div> -->
340
-        </div>
341
-
342
-        <div v-for="(orderProductItem, orderProductItemIndex) in item.list" :key="orderProductItemIndex">
343
-          <div class="p-3 flex gap-3 f-hairline-bottom">
344
-            <div>
345
-              <image :src="orderProductItem.product.image" mode="aspectFit" class="rounded w-20 h-20" />
346
-            </div>
347
-            <div class="flex flex-col w-full">
348
-              <div class="flex flex-col ">
349
-                <div class="line-clamp-1 text-xs">
350
-                  {{ orderProductItem.product.store_name }}
351
-                </div>
352
-                <div class="text-[11px] text-gray-500">
353
-                  {{ orderProductItem.productAttr.sku }}
354
-                </div>
355
-              </div>
356
-              <div class="flex">
357
-                <CXBYaojinTag v-if="item.mer_id != '148'" :amount="orderProductItem.yanglao" />
358
-              </div>
359
-              <div class="flex justify-between ">
360
-                <div v-if="item.mer_id != '148'" style="color:#fa4032">
361
-                  ¥{{ orderProductItem.productAttr.price }}
362
-                </div>
363
-                <div v-if="item.mer_id == '148'" style="color:#fa4032">
364
-                  {{ Math.round(orderProductItem.productAttr.price
282
+							</div>
283
+							<div v-else class="flex-1 flex">
284
+								请选择收货地址
285
+							</div>
286
+						</div>
287
+
288
+						<div class="w-4 flex i-tabler-chevron-right text-gray" />
289
+					</div>
290
+				</div>
291
+				<!--          <div class="flex text-sm font-bold">{{ data.addressInfo.detail }}</div> -->
292
+				<div class="flex gap-2 items-center text-xs text-gray-500">
293
+					<div>
294
+						{{ data.addressInfo.real_name }}
295
+					</div>
296
+					<div v-if="data.addressInfo && data.addressInfo.phone">
297
+						{{ encodePhone(data.addressInfo.phone) }}
298
+					</div>
299
+				</div>
300
+			</div>
301
+		</div>
302
+
303
+		<div class="pb-15">
304
+			<div v-for="(item, index) in data.cartOrder" :key="index" class=" bg-white rounded">
305
+				<div class="flex items-center gap-2 text-sm font-bold f-hairline-bottom p-3">
306
+					<image :src="item.mer_avatar" mode="widthFix" class="w-5 h-5" />
307
+					<div>{{ item.mer_name }}</div>
308
+					<!--            <div>{{ item.mer_id}}</div> -->
309
+				</div>
310
+
311
+				<div v-for="(orderProductItem, orderProductItemIndex) in item.list" :key="orderProductItemIndex">
312
+					<div class="p-3 flex gap-3 f-hairline-bottom">
313
+						<div>
314
+							<image :src="orderProductItem.product.image" mode="aspectFit" class="rounded w-20 h-20" />
315
+						</div>
316
+						<div class="flex flex-col w-full">
317
+							<div class="flex flex-col ">
318
+								<div class="line-clamp-1 text-xs">
319
+									{{ orderProductItem.product.store_name }}
320
+								</div>
321
+								<div class="text-[11px] text-gray-500">
322
+									{{ orderProductItem.productAttr.sku }}
323
+								</div>
324
+							</div>
325
+							<div class="flex">
326
+								<CXBYaojinTag v-if="item.mer_id != '148'" :amount="orderProductItem.yanglao" />
327
+							</div>
328
+							<div class="flex justify-between ">
329
+								<div v-if="item.mer_id != '148'" style="color:#fa4032">
330
+									¥{{ orderProductItem.productAttr.price }}
331
+								</div>
332
+								<div v-if="item.mer_id == '148'" style="color:#fa4032">
333
+									{{ Math.round(orderProductItem.productAttr.price
365
                     * 30) }}积分
334
                     * 30) }}积分
366
-                </div>
367
-                <nut-input-number
368
-                  v-model="orderProductItem.cart_num"
369
-                  @change="(num) => handleNumberChange(num, orderProductItem)"
370
-                />
371
-              </div>
372
-            </div>
373
-          </div>
374
-        </div>
375
-        <div>
376
-          <!-- 优惠券数据 先写死 -->
377
-          <FCell
378
-            v-if="item.mer_id != '148'" title="优惠劵"
379
-            :value="item.order.youhui_price != 0 ? item.order.youhui_price : '暂无优惠券'" arrow @click="gotoCoupon"
380
-          />
381
-          <FCell
382
-            v-if="item.mer_id == '148'" title="积分"
383
-            :value="userStore.userInfo.score != '0' ? userStore.userInfo.score : '暂无积分'" arrow
384
-          />
385
-          <FCell title="运费" :value="item.order.postage_price > 0 ? item.order.postage_price : '免运费'" arrow />
386
-          <!--            <FCell -->
387
-          <!--                title="留言" -->
388
-          <!--                value="建议留言前先与商家沟通确认" -->
389
-          <!--                arrow -->
390
-          <!--            ></FCell> -->
391
-          <FField v-model="data.mark" label="留言" placeholder="建议留言前先与商家沟通确认" :ex-class="['text-right']" />
392
-        </div>
393
-      </div>
394
-    </div>
395
-  </div>
396
-
397
-  <div class="fixed bottom-0 pb-safe w-full bg-white">
398
-    <div class="flex justify-between items-center p-3">
399
-      <div class="flex-1 flex text-sm font-bold">
400
-        应付金额:
401
-        <div v-if="data.type && data.type == '3'" style="color:#fa4032">
402
-          {{ Math.round(data.totalPrice * 30) }}积分
403
-        </div>
404
-        <div v-else style="color:#fa4032">
405
-          ¥{{ data.totalPrice }}
406
-        </div>
407
-      </div>
408
-      <div class="flex">
409
-        <nut-button :disabled="data.enabled" type="primary" @click="handleSubmit">
410
-          提交订单
411
-        </nut-button>
412
-      </div>
413
-    </div>
414
-  </div>
335
+								</div>
336
+								<!-- <nut-input-number
337
+				  v-model="orderProductItem.cart_num"
338
+				  @change="(num) => handleNumberChange(num, orderProductItem)"
339
+				/> -->
340
+								<view class="number-content">
341
+									<view @click="onNumClick(index,orderProductItemIndex,0)" class="del">-</view>
342
+									<text class="num-value">{{orderProductItem.cart_num}}</text>
343
+									<view @click="onNumClick(index,orderProductItemIndex,1)" class="add">+</view>
344
+								</view>
345
+							</div>
346
+						</div>
347
+					</div>
348
+					<view class="radio-content">
349
+						<view @click="onRadioClick(index,orderProductItemIndex,labIndex)" :key="'radio-item-'+index"
350
+							class="radio-item" v-for="(labItem,labIndex) in orderProductItem.fzone_paytype">
351
+							<text class="radio-note">{{labItem.note}}</text>
352
+							<image :src="labItem.checked==1?checkRadioIcon:defautRadioIcon" class="radio-icon"></image>
353
+							<text v-if="labItem.type=='b1'"
354
+								class="radio-name">{{labItem.price}}VR+{{labItem.other}}积分</text>
355
+							<text v-if="labItem.type=='b2'"
356
+								class="radio-name">¥{{labItem.price}}+{{labItem.other}}积分</text>
357
+							<text v-if="labItem.type=='b5'" class="radio-name">{{labItem.price}}VR</text>
358
+							<text v-if="labItem.type=='b6'" class="radio-name">¥{{labItem.price}}</text>
359
+						</view>
360
+					</view>
361
+
362
+				</div>
363
+
364
+
365
+				<div>
366
+					<!-- 优惠券数据 先写死 -->
367
+					<FCell v-if="item.mer_id != '148'" title="优惠劵"
368
+						:value="item.order.youhui_price != 0 ? item.order.youhui_price : '暂无优惠券'" arrow
369
+						@click="gotoCoupon" />
370
+					<FCell v-if="item.mer_id == '148'" title="积分"
371
+						:value="userStore.userInfo.score != '0' ? userStore.userInfo.score : '暂无积分'" arrow />
372
+					<FCell title="运费" :value="item.order.postage_price > 0 ? item.order.postage_price : '免运费'" arrow />
373
+					<!--            <FCell -->
374
+					<!--                title="留言" -->
375
+					<!--                value="建议留言前先与商家沟通确认" -->
376
+					<!--                arrow -->
377
+					<!--            ></FCell> -->
378
+					<FField v-model="data.mark" label="留言" placeholder="建议留言前先与商家沟通确认" :ex-class="['text-right']" />
379
+				</div>
380
+			</div>
381
+		</div>
382
+	</div>
383
+
384
+	<div class="fixed bottom-0 pb-safe w-full bg-white">
385
+		<div class="flex justify-between items-center p-3">
386
+			<div class="flex-1 flex text-sm font-bold">
387
+				应付金额:
388
+				<div v-if="data.type && data.type == '3'" style="color:#fa4032">
389
+					{{ Math.round(data.totalPrice * 30) }}积分
390
+				</div>
391
+				<div v-else style="color:#fa4032">
392
+					¥{{ data.totalPrice }}
393
+				</div>
394
+			</div>
395
+			<div class="flex">
396
+				<nut-button :disabled="data.enabled" type="primary" @click="handleSubmit">
397
+					提交订单
398
+				</nut-button>
399
+			</div>
400
+		</div>
401
+	</div>
415
 </template>
402
 </template>
416
 
403
 
417
 <route lang="yaml">
404
 <route lang="yaml">
@@ -419,8 +406,70 @@ style:
419
   navigationBarTitleText: 提交订单
406
   navigationBarTitleText: 提交订单
420
 </route>
407
 </route>
421
 
408
 
422
-<style>
423
-page {
424
-  background: #f8f8f8;
425
-}
426
-</style>
409
+<style lang="scss">
410
+	.number-content {
411
+		display: flex;
412
+		flex-direction: row;
413
+		align-items: center;
414
+
415
+		.del {
416
+			font-size: 38rpx;
417
+			margin-right: 20rpx;
418
+			color: #333;
419
+			font-weight: bolder;
420
+		}
421
+
422
+		.num-value {
423
+			background-color: #f8f8f8;
424
+			border-radius: 10rpx;
425
+			font-size: 30rpx;
426
+			color: #333;
427
+			padding: 10rpx 40rpx;
428
+		}
429
+
430
+		.add {
431
+			margin-left: 20rpx;
432
+			font-size: 38rpx;
433
+			color: #333;
434
+			font-weight: bolder;
435
+		}
436
+	}
437
+
438
+	.radio-content {
439
+		display: flex;
440
+		flex-direction: column;
441
+		margin-top: 20rpx;
442
+		margin-bottom: 20rpx;
443
+
444
+		.radio-item {
445
+			display: flex;
446
+			flex-direction: row;
447
+			align-items: center;
448
+			padding-left: 30rpx;
449
+			padding-right: 30rpx;
450
+			padding-bottom: 10rpx;
451
+			padding-top: 10rpx;
452
+
453
+			.radio-note {
454
+				flex: 1;
455
+				font-size: 28rpx;
456
+				color: #333;
457
+			}
458
+
459
+			.radio-name {
460
+				font-size: 26rpx;
461
+				color: #333;
462
+			}
463
+
464
+			.radio-icon {
465
+				width: 40rpx;
466
+				height: 40rpx;
467
+				margin-right: 10rpx;
468
+			}
469
+		}
470
+	}
471
+
472
+	page {
473
+		background: #f8f8f8;
474
+	}
475
+</style>

+ 11 - 16
src/pages/order/components/OrderItem.vue

@@ -83,7 +83,7 @@ function getStatusText(orderItem: OrderListModel) {
83
 
83
 
84
 function handleHeaderClick() {
84
 function handleHeaderClick() {
85
   uni.navigateTo({
85
   uni.navigateTo({
86
-    url: `/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
86
+    url: `/subPages/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
87
   })
87
   })
88
 }
88
 }
89
 
89
 
@@ -134,7 +134,7 @@ function handlePayment() {
134
 function handleShowOrderDetail(order) {
134
 function handleShowOrderDetail(order) {
135
   console.log(111212121, order)
135
   console.log(111212121, order)
136
   uni.navigateTo({
136
   uni.navigateTo({
137
-    url: '/pages/order/detail?detail=' + `${encodeBase64(order)}`
137
+    url: '/subPages/pages/order/detail?detail=' + `${encodeBase64(order)}`
138
   })
138
   })
139
   // if (order.status === '5') {
139
   // if (order.status === '5') {
140
   //   uni.navigateTo({
140
   //   uni.navigateTo({
@@ -158,7 +158,7 @@ function handleShowLogistics(orderItem) {
158
   // console.log(orderItem)
158
   // console.log(orderItem)
159
   // console.log('查看物流信息')
159
   // console.log('查看物流信息')
160
   uni.navigateTo({
160
   uni.navigateTo({
161
-    url: `/pages/order/logistics?id=${orderItem.order_id}`
161
+    url: `/subPages/pages/order/logistics?id=${orderItem.order_id}`
162
   })
162
   })
163
 }
163
 }
164
 
164
 
@@ -198,23 +198,18 @@ function handleTakeOrder(orderItem) {
198
 
198
 
199
 function handleComment(orderItem) {
199
 function handleComment(orderItem) {
200
   uni.navigateTo({
200
   uni.navigateTo({
201
-    url: '/pages/order/comment?detail=' + encodeBase64(orderItem)
201
+    url: '/subPages/pages/order/comment?detail=' + encodeBase64(orderItem)
202
   })
202
   })
203
 }
203
 }
204
 
204
 
205
 function handleProductItemClick(
205
 function handleProductItemClick(
206
   item
206
   item
207
 ) {
207
 ) {
208
-  // function navigateToDetail(params) {
209
-  //   let otherDetailUrl = `/pages/store/product/other`
210
-  //   return uni.navigateTo({
211
-  //     url: `${otherDetailUrl}?params=${params}`
212
-  //   })
213
-  // }
208
+ 
214
   console.log('我是item', item)
209
   console.log('我是item', item)
215
   // 大仓
210
   // 大仓
216
   uni.navigateTo({
211
   uni.navigateTo({
217
-    url: `/pages/store/product/detail?id=${(item.orderProduct[0])?.product_id}`
212
+    url: `/subPages/pages/store/product/detail?id=${(item.orderProduct[0])?.product_id}`
218
   })
213
   })
219
 }
214
 }
220
 
215
 
@@ -223,20 +218,20 @@ function handeRefund(orderItem) {
223
   console.log('售后详情', orderItem);
218
   console.log('售后详情', orderItem);
224
 
219
 
225
   uni.navigateTo({
220
   uni.navigateTo({
226
-    // url: `/pages/refund/drawback?detail=${encodeBase64(orderItem)}`
227
-    url: `/pages/refund/option?detail=${encodeBase64(orderItem)}&from=${props.tabValue}`
221
+
222
+    url: `/subPages/pages/refund/option?detail=${encodeBase64(orderItem)}&from=${props.tabValue}`
228
   })
223
   })
229
 }
224
 }
230
 
225
 
231
 function handeDetail(orderItem: any) {
226
 function handeDetail(orderItem: any) {
232
   uni.navigateTo({
227
   uni.navigateTo({
233
-    url: '/pages/refund/detail?id=' + orderItem.refund_order_id
228
+    url: '/subPages/pages/refund/detail?id=' + orderItem.refund_order_id
234
   })
229
   })
235
 }
230
 }
236
 function handleShowObligationOrderDetail(orderItem) {
231
 function handleShowObligationOrderDetail(orderItem) {
237
   console.log("hhhhhhhh", orderItem)
232
   console.log("hhhhhhhh", orderItem)
238
   uni.navigateTo({
233
   uni.navigateTo({
239
-    url: '/pages/order/obligation-detail?detail=' + `${encodeBase64(orderItem)}`
234
+    url: '/subPages/pages/order/obligation-detail?detail=' + `${encodeBase64(orderItem)}`
240
   })
235
   })
241
 }
236
 }
242
 
237
 
@@ -294,7 +289,7 @@ onUnload(() => {
294
 function handleShowDetail(orderItem: any) {
289
 function handleShowDetail(orderItem: any) {
295
   console.log(orderItem)
290
   console.log(orderItem)
296
   uni.navigateTo({
291
   uni.navigateTo({
297
-    url: '/pages/refund/detail?id=' + orderItem.refund_order_id
292
+    url: '/subPages/pages/refund/detail?id=' + orderItem.refund_order_id
298
   })
293
   })
299
 }
294
 }
300
 
295
 

+ 8 - 14
src/pages/order/components/OrderObligationItem.vue

@@ -76,7 +76,7 @@ function getStatusText(orderItem: OrderListModel) {
76
 
76
 
77
 function handleHeaderClick() {
77
 function handleHeaderClick() {
78
   uni.navigateTo({
78
   uni.navigateTo({
79
-    url: `/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
79
+    url: `/subPages/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
80
   })
80
   })
81
 }
81
 }
82
 
82
 
@@ -125,7 +125,7 @@ function handlePayment() {
125
 function handleShowOrderDetail(order) {
125
 function handleShowOrderDetail(order) {
126
   console.log(order)
126
   console.log(order)
127
   uni.navigateTo({
127
   uni.navigateTo({
128
-    url: '/pages/order/detail?detail=' + `${encodeBase64(order)}`
128
+    url: '/subPages/pages/order/detail?detail=' + `${encodeBase64(order)}`
129
   })
129
   })
130
 }
130
 }
131
 
131
 
@@ -141,7 +141,7 @@ function handleShowLogistics(orderItem) {
141
   // console.log(orderItem)
141
   // console.log(orderItem)
142
   // console.log('查看物流信息')
142
   // console.log('查看物流信息')
143
   uni.navigateTo({
143
   uni.navigateTo({
144
-    url: `/pages/order/logistics?id=${orderItem.order_id}`
144
+    url: `/subPages/pages/order/logistics?id=${orderItem.order_id}`
145
   })
145
   })
146
 }
146
 }
147
 
147
 
@@ -172,37 +172,31 @@ function handleTakeOrder(orderItem) {
172
 
172
 
173
 function handleComment(orderItem) {
173
 function handleComment(orderItem) {
174
   uni.navigateTo({
174
   uni.navigateTo({
175
-    url: '/pages/order/comment?detail=' + encodeBase64(orderItem)
175
+    url: '/subPages/pages/order/comment?detail=' + encodeBase64(orderItem)
176
   })
176
   })
177
 }
177
 }
178
 
178
 
179
 function handleProductItemClick(
179
 function handleProductItemClick(
180
   item
180
   item
181
 ) {
181
 ) {
182
-  // function navigateToDetail(params) {
183
-  //   let otherDetailUrl = `/pages/store/product/other`
184
-  //   return uni.navigateTo({
185
-  //     url: `${otherDetailUrl}?params=${params}`
186
-  //   })
187
-  // }
182
+  
188
   console.log(item)
183
   console.log(item)
189
   // 大仓
184
   // 大仓
190
   uni.navigateTo({
185
   uni.navigateTo({
191
-    url: `/pages/store/product/detail?id=${item.orderProduct[0].product_id}`
186
+    url: `/subPages/pages/store/product/detail?id=${item.orderProduct[0].product_id}`
192
   })
187
   })
193
 }
188
 }
194
 
189
 
195
 
190
 
196
 function handeRefund(orderItem) {
191
 function handeRefund(orderItem) {
197
   uni.navigateTo({
192
   uni.navigateTo({
198
-    // url: `/pages/refund/drawback?detail=${encodeBase64(orderItem)}`
199
-    url: `/pages/refund/option?detail=${encodeBase64(orderItem)}`
193
+    url: `/subPages/pages/refund/option?detail=${encodeBase64(orderItem)}`
200
   })
194
   })
201
 }
195
 }
202
 
196
 
203
 function handleShowObligationOrderDetail(orderItem) {
197
 function handleShowObligationOrderDetail(orderItem) {
204
   uni.navigateTo({
198
   uni.navigateTo({
205
-    url: '/pages/order/obligation-detail?detail=' + `${encodeBase64(orderItem)}&type=1`
199
+    url: '/subPages/pages/order/obligation-detail?detail=' + `${encodeBase64(orderItem)}&type=1`
206
   })
200
   })
207
 }
201
 }
208
 
202
 

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

@@ -35,7 +35,7 @@ const sourceType = computed(() => {
35
 })
35
 })
36
 
36
 
37
 function navigateToDetail(params) {
37
 function navigateToDetail(params) {
38
-  let otherDetailUrl = `/pages/store/product/other`
38
+  let otherDetailUrl = `/subPages/pages/store/product/other`
39
   return uni.navigateTo({
39
   return uni.navigateTo({
40
     url: `${otherDetailUrl}?params=${params}`
40
     url: `${otherDetailUrl}?params=${params}`
41
   })
41
   })

+ 7 - 12
src/pages/order/components/RefundOrderItem.vue

@@ -73,7 +73,7 @@ function getStatusText(orderItem) {
73
 
73
 
74
 function handleHeaderClick() {
74
 function handleHeaderClick() {
75
   uni.navigateTo({
75
   uni.navigateTo({
76
-    url: `/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
76
+    url: `/subPages/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
77
   })
77
   })
78
 }
78
 }
79
 
79
 
@@ -107,7 +107,7 @@ function handlePayment() {
107
 function handleShowOrderDetail(order) {
107
 function handleShowOrderDetail(order) {
108
   console.log(order)
108
   console.log(order)
109
   uni.navigateTo({
109
   uni.navigateTo({
110
-    url: '/pages/order/detail?detail=' + `${encodeBase64(order)}`
110
+    url: '/subPages/pages/order/detail?detail=' + `${encodeBase64(order)}`
111
   })
111
   })
112
 }
112
 }
113
 
113
 
@@ -123,7 +123,7 @@ function handleShowLogistics(orderItem) {
123
   // console.log(orderItem)
123
   // console.log(orderItem)
124
   // console.log('查看物流信息')
124
   // console.log('查看物流信息')
125
   uni.navigateTo({
125
   uni.navigateTo({
126
-    url: `/pages/order/logistics?id=${orderItem.order_id}`
126
+    url: `/subPages/pages/order/logistics?id=${orderItem.order_id}`
127
   })
127
   })
128
 }
128
 }
129
 
129
 
@@ -154,23 +154,18 @@ function handleTakeOrder(orderItem) {
154
 
154
 
155
 function handleComment(orderItem) {
155
 function handleComment(orderItem) {
156
   uni.navigateTo({
156
   uni.navigateTo({
157
-    url: '/pages/order/comment?detail=' + encodeBase64(orderItem)
157
+    url: '/subPages/pages/order/comment?detail=' + encodeBase64(orderItem)
158
   })
158
   })
159
 }
159
 }
160
 
160
 
161
 function handleProductItemClick(
161
 function handleProductItemClick(
162
   item
162
   item
163
 ) {
163
 ) {
164
-  // function navigateToDetail(params) {
165
-  //   let otherDetailUrl = `/pages/store/product/other`
166
-  //   return uni.navigateTo({
167
-  //     url: `${otherDetailUrl}?params=${params}`
168
-  //   })
169
-  // }
164
+  
170
   console.log(item)
165
   console.log(item)
171
   // 大仓
166
   // 大仓
172
   uni.navigateTo({
167
   uni.navigateTo({
173
-    url: `/pages/store/product/detail?id=${item.orderProduct[0].product_id}`
168
+    url: `/subPages/pages/store/product/detail?id=${item.orderProduct[0].product_id}`
174
   })
169
   })
175
 }
170
 }
176
 
171
 
@@ -178,7 +173,7 @@ function handleProductItemClick(
178
 function handleShowDetail(orderItem) {
173
 function handleShowDetail(orderItem) {
179
   console.log(orderItem)
174
   console.log(orderItem)
180
   uni.navigateTo({
175
   uni.navigateTo({
181
-    url: '/pages/refund/detail?id=' + orderItem.refund_order_id
176
+    url: '/subPages/pages/refund/detail?id=' + orderItem.refund_order_id
182
   })
177
   })
183
 }
178
 }
184
 </script>
179
 </script>

+ 0 - 642
src/pages/order_addcart/index-bak.vue

@@ -1,642 +0,0 @@
1
-<script lang="ts" setup>
2
-import {getRecommendList} from "~/apis/merchant";
3
-import MerchantProductCard from "~/pages/store/home/components/MerchantProductCard.vue";
4
-import {deleteCartItem, getCartList} from "~/apis/user";
5
-import type {ShoppingResult} from "~/apis/model/shopping.model";
6
-import FPrice from "~/components/FPrice/FPrice.vue";
7
-import FButton from "~/components/FButton/FButton.vue";
8
-import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
9
-import {
10
-  DyProductModel, IProductDetail,
11
-  JdProductModel,
12
-  SuNingProductModel,
13
-  TaobaoProductThirdPartyWaresModel, VipProductModel
14
-} from "~/apis/model/product.model";
15
-import {DcProductModel} from "~/apis/model/dacang.model";
16
-import {encodeBase64} from "~/utils/http/helper";
17
-import {CDN_URL} from "~/config/app";
18
-import {uniq} from "lodash-es";
19
-import {cartChange} from "~/apis/order.api";
20
-const gouwucheImage = CDN_URL + '/static/assets/gouwuche.png'
21
-const like_adorn_220628Image = CDN_URL + '/static/assets/like_adorn_220628.png'
22
-const state = reactive({
23
-  recommendList: [],
24
-  currentPage: 1,
25
-  pageSize: 10,
26
-  total: 0,
27
-  totalPage: 0,
28
-
29
-
30
-  totalCartCount: 0,
31
-  totalPrice: 0,
32
-  selectAllIndeterminate: false,
33
-
34
-  cart_id: [],
35
-  isManage: true,
36
-
37
-  currentType: '',
38
-})
39
-
40
-const shopping = ref<ShoppingResult>()
41
-
42
-onShow(() => {
43
-  state.cart_id = []
44
-  loadCartList()
45
-  if (!state.isManage) {
46
-    state.isManage = true
47
-  }
48
-
49
-  loadList('reload')
50
-})
51
-function loadList(action: 'page' | 'reload', callback?: (items) => void) {
52
-  const params = {
53
-    page: state.currentPage,
54
-    limit: state.pageSize
55
-  }
56
-
57
-  if (action === 'reload') {
58
-    params.page = 1
59
-  }
60
-
61
-  getRecommendList({
62
-    ...params
63
-  }).then(res => {
64
-    if (action === 'page') {
65
-      state.recommendList = state.recommendList.concat(res.list)
66
-    }
67
-    if (action === 'reload') {
68
-      // state.list = state.list.concat(res.list)
69
-      state.recommendList = res.list
70
-    }
71
-    state.totalPage = Math.ceil(res.count / state.pageSize);
72
-    state.status = 'more'
73
-    if (callback) {
74
-      callback(res.list)
75
-    }
76
-  })
77
-}
78
-
79
-function handleScrollToLower() {
80
-  state.status = 'loading';
81
-  state.currentPage += 1;
82
-  // console.log(state.totalPage)
83
-  if (state.currentPage > state.totalPage) {
84
-    state.status = 'noMore';
85
-  } else {
86
-    setTimeout(() => {
87
-      loadList('page')
88
-    }, 300)
89
-  }
90
-}
91
-
92
-onReachBottom(() => {
93
-  handleScrollToLower()
94
-
95
-})
96
-
97
-// 加载购物车数据
98
-function loadCartList() {
99
-  state.totalCartCount = 0
100
-  getCartList().then(res => {
101
-    shopping.value = res
102
-
103
-    console.log(res)
104
-    shopping.value?.list.forEach((shopItem, index) => {
105
-      // shopItem.allCheck = true
106
-
107
-      shopItem.allCheck = false
108
-      shopItem.indeterminate = false
109
-      shopItem.list.forEach(goodItem => {
110
-        goodItem.check = false
111
-        // state.cart_id.push(goodItem.cart_id)
112
-        // if (goodItem.cart_num === 1) {}
113
-        state.totalCartCount += Number.parseInt(goodItem.cart_num)
114
-      })
115
-      // console.log(shopItem)
116
-
117
-    })
118
-    // cartAllCheck("all")
119
-    // if (shopping.value) {
120
-    //   handleSelectAll()
121
-    // }
122
-  })
123
-}
124
-const hasShopping = computed(() => {
125
-  return shopping.value && shopping.value?.list.length > 0
126
-})
127
-
128
-const totalCartInfo = computed(() => {
129
-  let totalPrice = 0
130
-  let goodsNum = 0
131
-  if (shopping.value && shopping.value?.list.length > 0) {
132
-    for (let i = 0; i < shopping.value?.list.length; i++) {
133
-      for (let j = 0; j < shopping.value?.list[i].list.length; j++) {
134
-        let num = Number.parseInt(shopping.value?.list[i].list[j].cart_num);
135
-        let price = Number.parseFloat(shopping.value?.list[i].list[j].productAttr.price)
136
-        totalPrice += (num * price)
137
-        goodsNum += num
138
-      }
139
-    }
140
-  }
141
-
142
-  return {
143
-    totalPrice,
144
-    goodsNum
145
-  }
146
-})
147
-const totalMoney = ref(0)
148
-const isAllSelect = ref(false)
149
-
150
-function handleGoodsItemCheck(check) {
151
-  // console.log('good item check....')
152
-  // console.log(check)
153
-  // if (isAllSelect.value) {return}
154
-  // cartAllCheck('single')
155
-  _singleCheck()
156
-}
157
-
158
-function shopCheck(shopItem) {
159
-  console.log('shop check...')
160
-  // console.log(shopItem)
161
-  if (shopItem.allCheck && !shopItem.indeterminate) {
162
-    console.log(shopItem)
163
-    shopItem.list.forEach((good, index) => {
164
-      good.check = true
165
-    })
166
-
167
-  } else {
168
-    shopItem.list.forEach((good, index) => {
169
-      good.check = false
170
-    })
171
-  }
172
-}
173
-function cartAllCheck(type: 'single' | 'all') {
174
-  let allArr = []
175
-  let totalMoney = 0
176
-  let totalNum = 0
177
-  state.currentType = type
178
-
179
-  console.log(type)
180
-  shopping.value?.list.forEach((goods, index) => {
181
-    if (type === 'single') {
182
-      // 如果单选的情况下, 获取已选中的
183
-      let tempArr = goods.list.filter(goodItem => {
184
-        // if (goodItem.check) {
185
-          return goodItem.check === true
186
-        // }
187
-      })
188
-      console.log(goods.list.length + '购物车长度')
189
-      if (goods.list.length === tempArr.length) {
190
-        console.log('这里是全选状态了。。。。')
191
-        goods.allCheck = true
192
-        allArr.push(goods)
193
-        goods.indeterminate = false
194
-        return
195
-      }
196
-
197
-      console.log(tempArr.length + '---当长长度')
198
-      if (tempArr.length > 0) {
199
-        goods.indeterminate = true
200
-        return
201
-      }
202
-      if (tempArr.length <= 0) {
203
-        goods.allCheck = false
204
-        state.currentType = 'all'
205
-        state.indeterminate = false
206
-        return
207
-      }
208
-    } else {
209
-      console.log('alll type......')
210
-      goods.list.forEach(goodItem => {
211
-        goodItem.check = isAllSelect.value
212
-      })
213
-      goods.allCheck = isAllSelect.value
214
-      if (goods.allCheck) {
215
-        allArr.push(goods)
216
-      }
217
-    }
218
-
219
-    // 总金额|总数
220
-    goods.list.forEach(goodItem => {
221
-      if (goodItem.check) {
222
-        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
223
-        totalNum += Number.parseFloat(goodItem.cart_num)
224
-        state.cart_id.push(goodItem.cart_id)
225
-      }
226
-    })
227
-  })
228
-
229
-  isAllSelect.value = allArr.length === shopping.value?.list.length
230
-  // state.totalCartCount = totalNum
231
-  state.totalPrice = totalMoney
232
-}
233
-
234
-function _singleCheck() {
235
-  console.log(state.currentType)
236
-  if (state.currentType === 'all') {
237
-    return
238
-    //   _singleCheck()
239
-  }
240
-  state.currentType = 'single'
241
-  let allArr = []
242
-  let totalMoney = 0
243
-  let totalNum = 0
244
-  state.cart_id = []
245
-  shopping.value?.list.forEach((goods, index) => {
246
-      // 如果单选的情况下, 获取已选中的
247
-      let tempArr = goods.list.filter(goodItem => {
248
-        // if (goodItem.check) {
249
-        return goodItem.check === true
250
-        // }
251
-      })
252
-      if (goods.list.length === tempArr.length) {
253
-        goods.allCheck = true
254
-        allArr.push(goods)
255
-        goods.indeterminate = false
256
-      }
257
-
258
-      if (tempArr.length > 0) {
259
-        goods.indeterminate = true
260
-      }
261
-      if (tempArr.length <= 0) {
262
-        console.log('没有选中的了。。。')
263
-        goods.allCheck = false
264
-        state.currentType = 'all'
265
-        goods.indeterminate = false
266
-      }
267
-
268
-    // 总金额|总数
269
-    goods.list.forEach(goodItem => {
270
-      if (goodItem.check) {
271
-        console.log(goodItem)
272
-
273
-        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
274
-        console.log(totalMoney)
275
-        totalNum += Number.parseFloat(goodItem.cart_num)
276
-        state.cart_id.push(goodItem.cart_id)
277
-      }
278
-    })
279
-  })
280
-  if (allArr.length === shopping.value?.list.length) {
281
-    isAllSelect.value = true
282
-    state.currentType = 'all'
283
-  } else if (allArr.length > 0){
284
-    state.selectAllIndeterminate = true
285
-  } else {
286
-    isAllSelect.value = false
287
-
288
-  }
289
-  state.totalPrice = totalMoney
290
-}
291
-function _selectAll() {
292
-  // if current == single 说明刚才操作的置为多选是从这里来的?
293
-  state.currentType = 'all'
294
-  let allArr = []
295
-  let totalMoney = 0
296
-  let totalNum = 0
297
-  // state.currentType = type
298
-  //
299
-  // console.log(type)
300
-  shopping.value?.list.forEach((goods, index) => {
301
-
302
-      goods.list.forEach(goodItem => {
303
-        goodItem.check = isAllSelect.value
304
-      })
305
-      goods.allCheck = isAllSelect.value
306
-      if (goods.allCheck) {
307
-        allArr.push(goods)
308
-      }
309
-
310
-    // 总金额|总数
311
-    goods.list.forEach(goodItem => {
312
-      if (goodItem.check) {
313
-        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
314
-        totalNum += Number.parseFloat(goodItem.cart_num)
315
-        state.cart_id.push(goodItem.cart_id)
316
-      }
317
-    })
318
-  })
319
-
320
-  isAllSelect.value = allArr.length === shopping.value?.list.length
321
-  // state.totalCartCount = totalNum
322
-  state.totalPrice = totalMoney
323
-}
324
-
325
-// watch(() => isAllSelect.value, (val) => {
326
-//   if (!val) {
327
-//     state.cart_id = []
328
-//   }
329
-// })
330
-
331
-function reTotal() {
332
-  let allArr = []
333
-  let totalMoney = 0
334
-  let totalNum = 0
335
-
336
-  shopping.value?.list.forEach((goods, index) => {
337
-    // 总金额|总数
338
-    goods.list.forEach(goodItem => {
339
-      if (goodItem.check) {
340
-        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
341
-        totalNum += Number.parseFloat(goodItem.cart_num)
342
-        // state.cart_id.push(goodItem.cart_id)
343
-      }
344
-    })
345
-  })
346
-
347
-  // isAllSelect.value = allArr.length === shopping.value?.list.length
348
-  // state.totalCartCount = totalNum
349
-  state.totalPrice = totalMoney
350
-}
351
-function handleSelectAll(checked: boolean) {
352
-  // 如何区分是由当前的 checkbox 发起的?要区
353
-  // console.log(state.currentType + '这里是当前类型。。。。')
354
-
355
-  if (state.currentType === 'single') {
356
-    return
357
-  //   _singleCheck()
358
-  }
359
-  _selectAll()
360
-  // if (state.currentType == 'single') {
361
-  //   return
362
-  // }
363
-  // console.log(isAllSelect.value)
364
-  // if (isAllSelect.value) {
365
-  // cartAllCheck('all')
366
-
367
-  // }
368
-  // console.log('000')
369
-  // isAllSelect.value = !isAllSelect.value
370
-  // isAllSelect.value = checked
371
-  // 这里需要修改 checkbox 的检查
372
-}
373
-
374
-function handleManageCart() {
375
-  state.isManage = !state.isManage
376
-}
377
-
378
-function handleSubmit() {
379
-  console.log(state.isManage)
380
-
381
-  if (!state.isManage) {
382
-    handleDelete()
383
-  } else { // submit
384
-    state.cart_id = uniq(state.cart_id)
385
-
386
-    // console.log(state.cart_id)
387
-    if (state.cart_id && state.cart_id.length > 0) {
388
-      uni.navigateTo({
389
-        url: `/pages/order-confirm/index?cartId=${state.cart_id.join(',')}`
390
-      })
391
-    } else {
392
-      return uni.showToast({
393
-        title: '请选择商品',
394
-        icon: 'none'
395
-      })
396
-    }
397
-  }
398
-
399
-}
400
-
401
-function handleDelete() {
402
-  // const cart_id = <any>[]
403
-  shopping.value?.list.forEach(shopItem => {
404
-    shopItem.list.forEach(goodItem => {
405
-      if (goodItem.check) {
406
-        state.cart_id.push(goodItem.cart_id)
407
-      }
408
-    })
409
-  })
410
-  state.cart_id = uniq(state.cart_id)
411
-
412
-  // console.log(cart_id)
413
-  if (state.cart_id.length === 0) {
414
-    return uni.showToast({
415
-      title: '请选择产品',
416
-      icon: "none"
417
-    })
418
-  } else {
419
-    uni.showModal({
420
-      title: '温馨提示',
421
-      content: '确认将宝贝删除?',
422
-      success: (res) => {
423
-        if (res.confirm) {
424
-          deleteCartItem(state.cart_id).then(res => {
425
-            uni.showToast({
426
-              title: '删除成功'
427
-            })
428
-            state.isManage = true
429
-            state.cart_id = []
430
-            state.totalPrice = ''
431
-            loadCartList()
432
-          })
433
-
434
-        } else if (res.cancel) {
435
-        }
436
-      }
437
-    })
438
-  }
439
-}
440
-
441
-
442
-function handleProductItemClick(
443
-    item:
444
-        JdProductModel
445
-        & DcProductModel
446
-        & DyProductModel
447
-        & SuNingProductModel
448
-        & TaobaoProductThirdPartyWaresModel
449
-        & VipProductModel
450
-) {
451
-  // function navigateToDetail(params) {
452
-  //   let otherDetailUrl = `/pages/store/product/other`
453
-  //   return uni.navigateTo({
454
-  //     url: `${otherDetailUrl}?params=${params}`
455
-  //   })
456
-  // }
457
-  // 大仓
458
-    uni.navigateTo({
459
-      url: `/pages/store/product/detail?id=${item.product_id}`
460
-    })
461
-}
462
-
463
-function handleNumberChange(num, goodItem) {
464
-  console.log(goodItem)
465
-  uni.showLoading()
466
-  console.log(num)
467
-  cartChange(goodItem.cart_id, num).then(res => {
468
-    reTotal()
469
-    uni.hideLoading()
470
-  })
471
-  // console.log(goodItem)
472
-  // console.log(num)
473
-  // const
474
-  // goodItem.productAttr.price = goodItem.productAttr.price * num
475
-  // goodItem.productAttr.price = goodItem.productAttr.price * goodItem.cart_num
476
-}
477
-</script>
478
-<template>
479
-  <div class="">
480
-    <div
481
-        v-if="hasShopping"
482
-        class="bg-white h-10 fixed top-0 w-full z-1 flex justify-end "
483
-    >
484
-      <div class="pr-3">
485
-        <FButton size="small"
486
-                 @click="handleManageCart"
487
-        >
488
-          <div>{{ state.isManage ? '管理' : '完成'}}</div>
489
-        </FButton>
490
-      </div>
491
-    </div>
492
-    <div
493
-        v-if="!hasShopping"
494
-        class="flex flex-col justify-center items-center bg-white rounded-lg gap-3 text-xs py-8">
495
-      <div>
496
-        <image :src="gouwucheImage" mode="widthFix" class="w-20 h-20"></image>
497
-      </div>
498
-      <div>
499
-        暂无商品,去添加喜欢的商品
500
-      </div>
501
-    </div>
502
-    <div v-else class="mt-10">
503
-
504
-      <div
505
-          v-if="shopping && shopping.list"
506
-          class="flex flex-col gap-4 p-3"
507
-      >
508
-        <div
509
-            v-for="(shopItem, index) in shopping.list"
510
-            :key="index"
511
-            class="bg-white rounded-lg  "
512
-        >
513
-          <div
514
-              class="f-hairline-bottom flex  items-center font-bold p-3"
515
-          >
516
-            <nut-checkbox v-model="shopItem.allCheck"
517
-                          @change="shopCheck(shopItem)"
518
-                          :indeterminate="shopItem.indeterminate"
519
-                          label="全选"
520
-                          class="!text-primary"
521
-            >
522
-              {{ shopItem.mer_name }}
523
-            </nut-checkbox>
524
-          </div>
525
-          <div v-for="(goodItem, goodIndex) in shopItem.list"
526
-               :key="goodIndex"
527
-               class="flex f-hairline-bottom p-3 gap-2"
528
-          >
529
-            <div class="flex">
530
-              <nut-checkbox v-model="goodItem.check"
531
-                            @change="handleGoodsItemCheck"
532
-                            label="单选"
533
-                            class="!text-primary"
534
-              ></nut-checkbox>
535
-              <image
536
-                  :src="goodItem.product.image"
537
-                  mode="aspectFill" class="w-18 h-18 rounded"
538
-              ></image>
539
-            </div>
540
-
541
-            <div class="flex flex-col gap-1 w-full">
542
-              <div
543
-                  @click="handleProductItemClick(goodItem)"
544
-                  class="text-overflow line-clamp-2 text-xs">{{ goodItem.product.store_name }}</div>
545
-              <div class="flex flex-col justify-start gap-1">
546
-                <div
547
-                    class="text-[10px] text-gray min-w-5  p-1  items-center flex">
548
-                  {{ goodItem.productAttr.sku }}
549
-                </div>
550
-                <div class="flex">
551
-                  <CXBYaojinTag :amount="goodItem.yanglao"/>
552
-
553
-                </div>
554
-              </div>
555
-              <div class="flex  justify-between ">
556
-                <FPrice :price="goodItem.productAttr.price"
557
-                        ex-class="font-bold text-dark"
558
-                />
559
-                <nut-input-number v-model="goodItem.cart_num" @change="(num) => handleNumberChange(num, goodItem)"/>
560
-              </div>
561
-            </div>
562
-          </div>
563
-        </div>
564
-
565
-      </div>
566
-    </div>
567
-
568
-    <div class="pb-12">
569
-      <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
570
-        <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
571
-        <div>
572
-      精品推荐
573
-        </div>
574
-        <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
575
-      </div>
576
-
577
-      <div class="pb-3 px-3" v-if="state.recommendList">
578
-        <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
579
-          <div v-for="(item, index) in state.recommendList"
580
-               :key="index"
581
-               @click="handleProductItemClick(item)"
582
-          >
583
-            <MerchantProductCard :item="item" />
584
-
585
-          </div>
586
-        </grid-view>
587
-
588
-        <div class=" flex justify-center items-center text-[12px] text-gray-500"
589
-        >
590
-          <div v-if="state.status === 'loading'">
591
-            加载中...
592
-          </div>
593
-          <div v-if="state.status === 'noMore'">
594
-            没有更多了~
595
-          </div>
596
-        </div>
597
-
598
-      </div>
599
-    </div>
600
-  </div>
601
-
602
-  <div v-if="hasShopping"
603
-      class="fixed bottom-0 w-full z-3">
604
-    <div class="bg-white h-10 flex justify-between" v-if="shopping && shopping.list">
605
-      <div class="flex justify-center items-center gap-2 pl-3">
606
-        <nut-checkbox v-model="isAllSelect"
607
-                      @change="handleSelectAll"
608
-                      :indeterminate="state.selectAllIndeterminate"
609
-                      label="全选"
610
-                      class="!text-primary"
611
-        >全选
612
-        </nut-checkbox>
613
-        <div class="text-xs text-gray">共 {{ state.totalCartCount }} 件</div>
614
-      </div>
615
-
616
-      <div class="flex justify-center items-center gap-2 pr-3">
617
-        <div class="flex text-[12px]" v-if="state.isManage">
618
-          合计:
619
-          <FPrice :price="state.totalPrice"></FPrice>
620
-<!--          {{totalCartInfo.totalPrice}}-->
621
-        </div>
622
-        <FButton
623
-            @click="handleSubmit"
624
-            size="small"
625
-            :exClass="['rounded-full','!text-[14px]', 'text-white', 'bg-primary', 'w-full']"
626
-        >
627
-          {{ state.isManage? '去结算' : '删除'}}
628
-        </FButton>
629
-      </div>
630
-    </div>
631
-  </div>
632
-</template>
633
-<style>
634
-page {
635
-  background-color: #f8f8f8;
636
-}
637
-</style>
638
-<route lang="yaml">
639
-style:
640
-  navigationBarTitleText: 购物车
641
-  enablePullDownRefresh: false
642
-</route>

+ 0 - 511
src/pages/order_addcart/index-new.vue

@@ -1,511 +0,0 @@
1
-<script lang="ts" setup>
2
-import {getRecommendList} from "~/apis/merchant";
3
-import MerchantProductCard from "~/pages/store/home/components/MerchantProductCard.vue";
4
-import {deleteCartItem, getCartList} from "~/apis/user";
5
-import type {ShoppingResult} from "~/apis/model/shopping.model";
6
-import FPrice from "~/components/FPrice/FPrice.vue";
7
-import FButton from "~/components/FButton/FButton.vue";
8
-import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
9
-import {
10
-  DyProductModel, IProductDetail,
11
-  JdProductModel,
12
-  SuNingProductModel,
13
-  TaobaoProductThirdPartyWaresModel, VipProductModel
14
-} from "~/apis/model/product.model";
15
-import {DcProductModel} from "~/apis/model/dacang.model";
16
-import {encodeBase64} from "~/utils/http/helper";
17
-import {CDN_URL} from "~/config/app";
18
-import {uniq} from "lodash-es";
19
-import {cartChange} from "~/apis/order.api";
20
-const gouwucheImage = CDN_URL + '/static/assets/gouwuche.png'
21
-const like_adorn_220628Image = CDN_URL + '/static/assets/like_adorn_220628.png'
22
-const state = reactive({
23
-  recommendList: [],
24
-  currentPage: 1,
25
-  pageSize: 10,
26
-  total: 0,
27
-  totalPage: 0,
28
-
29
-
30
-  totalCartCount: 0,
31
-  totalPrice: 0,
32
-  selectAll: false,
33
-
34
-  cart_id: [],
35
-  isManage: true,
36
-})
37
-
38
-const shopping = ref<ShoppingResult>()
39
-
40
-onShow(() => {
41
-  state.cart_id = []
42
-  loadCartList()
43
-  if (!state.isManage) {
44
-    state.isManage = true
45
-  }
46
-
47
-  loadList('reload')
48
-})
49
-function loadList(action: 'page' | 'reload', callback?: (items) => void) {
50
-  const params = {
51
-    page: state.currentPage,
52
-    limit: state.pageSize
53
-  }
54
-
55
-  if (action === 'reload') {
56
-    params.page = 1
57
-  }
58
-
59
-  getRecommendList({
60
-    ...params
61
-  }).then(res => {
62
-    if (action === 'page') {
63
-      state.recommendList = state.recommendList.concat(res.list)
64
-    }
65
-    if (action === 'reload') {
66
-      // state.list = state.list.concat(res.list)
67
-      state.recommendList = res.list
68
-    }
69
-    state.totalPage = Math.ceil(res.count / state.pageSize);
70
-    state.status = 'more'
71
-    if (callback) {
72
-      callback(res.list)
73
-    }
74
-  })
75
-}
76
-
77
-function handleScrollToLower() {
78
-  state.status = 'loading';
79
-  state.currentPage += 1;
80
-  // console.log(state.totalPage)
81
-  if (state.currentPage > state.totalPage) {
82
-    state.status = 'noMore';
83
-  } else {
84
-    setTimeout(() => {
85
-      loadList('page')
86
-    }, 300)
87
-  }
88
-}
89
-
90
-onReachBottom(() => {
91
-  handleScrollToLower()
92
-
93
-})
94
-
95
-// 加载购物车数据
96
-function loadCartList() {
97
-  getCartList().then(res => {
98
-    shopping.value = res
99
-
100
-    console.log(res)
101
-    shopping.value?.list.forEach((shopItem, index) => {
102
-      // shopItem.allCheck = true
103
-      shopItem.indeterminate = false
104
-      shopItem.allCheck = false
105
-      shopItem.list.forEach(goodItem => {
106
-        goodItem.check = false
107
-        // state.cart_id.push(goodItem.cart_id)
108
-        // if (goodItem.cart_num === 1) {}
109
-      })
110
-      console.log(shopItem)
111
-    })
112
-    // cartAllCheck("all")
113
-    // if (shopping.value) {
114
-    //   handleSelectAll()
115
-    // }
116
-  })
117
-}
118
-const hasShopping = computed(() => {
119
-  return shopping.value && shopping.value?.list.length > 0
120
-})
121
-
122
-const totalCartInfo = computed(() => {
123
-  let totalPrice = 0
124
-  let goodsNum = 0
125
-  if (shopping.value && shopping.value?.list.length > 0) {
126
-    for (let i = 0; i < shopping.value?.list.length; i++) {
127
-      for (let j = 0; j < shopping.value?.list[i].list.length; j++) {
128
-        let num = Number.parseInt(shopping.value?.list[i].list[j].cart_num);
129
-        let price = Number.parseFloat(shopping.value?.list[i].list[j].productAttr.price)
130
-        totalPrice += (num * price)
131
-        goodsNum += num
132
-      }
133
-    }
134
-  }
135
-
136
-  return {
137
-    totalPrice,
138
-    goodsNum
139
-  }
140
-})
141
-const totalMoney = ref(0)
142
-const isAllSelect = ref(false)
143
-
144
-function handleGoodsItemCheck() {
145
-  cartAllCheck('single')
146
-}
147
-
148
-function shopCheck(shopItem) {
149
-  if (shopItem.allCheck) {
150
-    console.log(shopItem)
151
-    shopItem.list.forEach((good, index) => {
152
-      good.check = true
153
-    })
154
-  } else {
155
-    shopItem.list.forEach((good, index) => {
156
-      good.check = false
157
-    })
158
-  }
159
-}
160
-function cartAllCheck(type: 'single' | 'all') {
161
-  let allArr = []
162
-  let totalMoney = 0
163
-  let totalNum = 0
164
-
165
-  shopping.value?.list.forEach((goods, index) => {
166
-    if (type === 'single') {
167
-      let tempArr = goods.list.filter(goodItem => {
168
-        // if (goodItem.check) {
169
-          return goodItem.check === true
170
-        // }
171
-      })
172
-      if (tempArr && goods.list.length === tempArr.length) {
173
-        goods.allCheck = true
174
-        allArr.push(goods)
175
-      } else {
176
-        goods.allCheck = false
177
-      }
178
-    } else {
179
-      goods.list.forEach(goodItem => {
180
-        goodItem.check = isAllSelect.value
181
-      })
182
-      goods.allCheck = isAllSelect.value
183
-      if (goods.allCheck) {
184
-        allArr.push(goods)
185
-      }
186
-    }
187
-
188
-    // 总金额|总数
189
-    goods.list.forEach(goodItem => {
190
-      if (goodItem.check) {
191
-        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
192
-        totalNum += Number.parseFloat(goodItem.cart_num)
193
-        state.cart_id.push(goodItem.cart_id)
194
-      }
195
-    })
196
-  })
197
-
198
-  isAllSelect.value = allArr.length === shopping.value?.list.length
199
-  state.totalCartCount = totalNum
200
-  state.totalPrice = totalMoney
201
-}
202
-
203
-function reTotal() {
204
-  let allArr = []
205
-  let totalMoney = 0
206
-  let totalNum = 0
207
-
208
-  shopping.value?.list.forEach((goods, index) => {
209
-    // 总金额|总数
210
-    goods.list.forEach(goodItem => {
211
-      if (goodItem.check) {
212
-        totalMoney += (goodItem.productAttr.price * goodItem.cart_num)
213
-        totalNum += Number.parseFloat(goodItem.cart_num)
214
-        // state.cart_id.push(goodItem.cart_id)
215
-      }
216
-    })
217
-  })
218
-
219
-  isAllSelect.value = allArr.length === shopping.value?.list.length
220
-  state.totalCartCount = totalNum
221
-  state.totalPrice = totalMoney
222
-}
223
-function handleSelectAll(checked: boolean) {
224
-  // console.log('000')
225
-  // isAllSelect.value = !isAllSelect.value
226
-  // isAllSelect.value = checked
227
-  // 这里需要修改 checkbox 的检查
228
-  cartAllCheck('all')
229
-}
230
-
231
-function handleManageCart() {
232
-  state.isManage = !state.isManage
233
-}
234
-
235
-function handleSubmit() {
236
-  console.log(state.isManage)
237
-
238
-  if (!state.isManage) {
239
-    handleDelete()
240
-  } else { // submit
241
-    state.cart_id = uniq(state.cart_id)
242
-
243
-    // console.log(state.cart_id)
244
-    if (state.cart_id && state.cart_id.length > 0) {
245
-      uni.navigateTo({
246
-        url: `/pages/order-confirm/index?cartId=${state.cart_id.join(',')}`
247
-      })
248
-    } else {
249
-      return uni.showToast({
250
-        title: '请选择商品',
251
-        icon: 'none'
252
-      })
253
-    }
254
-  }
255
-
256
-}
257
-
258
-function handleDelete() {
259
-  // const cart_id = <any>[]
260
-  shopping.value?.list.forEach(shopItem => {
261
-    shopItem.list.forEach(goodItem => {
262
-      if (goodItem.check) {
263
-        state.cart_id.push(goodItem.cart_id)
264
-      }
265
-    })
266
-  })
267
-  state.cart_id = uniq(state.cart_id)
268
-
269
-  // console.log(cart_id)
270
-  if (state.cart_id.length === 0) {
271
-    return uni.showToast({
272
-      title: '请选择产品',
273
-      icon: "none"
274
-    })
275
-  } else {
276
-    uni.showModal({
277
-      title: '温馨提示',
278
-      content: '确认将宝贝删除?',
279
-      success: (res) => {
280
-        if (res.confirm) {
281
-          deleteCartItem(state.cart_id).then(res => {
282
-            uni.showToast({
283
-              title: '删除成功'
284
-            })
285
-            state.isManage = true
286
-            state.cart_id = []
287
-            state.totalPrice = ''
288
-            loadCartList()
289
-          })
290
-
291
-        } else if (res.cancel) {
292
-        }
293
-      }
294
-    })
295
-  }
296
-}
297
-
298
-
299
-function handleProductItemClick(
300
-    item:
301
-        JdProductModel
302
-        & DcProductModel
303
-        & DyProductModel
304
-        & SuNingProductModel
305
-        & TaobaoProductThirdPartyWaresModel
306
-        & VipProductModel
307
-) {
308
-  // function navigateToDetail(params) {
309
-  //   let otherDetailUrl = `/pages/store/product/other`
310
-  //   return uni.navigateTo({
311
-  //     url: `${otherDetailUrl}?params=${params}`
312
-  //   })
313
-  // }
314
-  // 大仓
315
-    uni.navigateTo({
316
-      url: `/pages/store/product/detail?id=${item.product_id}`
317
-    })
318
-}
319
-
320
-function handleNumberChange(num, goodItem) {
321
-  console.log(goodItem)
322
-  uni.showLoading()
323
-  console.log(num)
324
-  cartChange(goodItem.cart_id, num).then(res => {
325
-    reTotal()
326
-    uni.hideLoading()
327
-  })
328
-  // console.log(goodItem)
329
-  // console.log(num)
330
-  // const
331
-  // goodItem.productAttr.price = goodItem.productAttr.price * num
332
-  // goodItem.productAttr.price = goodItem.productAttr.price * goodItem.cart_num
333
-}
334
-</script>
335
-<template>
336
-  <div class="">
337
-    <div
338
-        v-if="hasShopping"
339
-        class="bg-white h-10 fixed top-0 w-full z-1 flex justify-end "
340
-    >
341
-      <div class="pr-3">
342
-        <FButton size="small"
343
-                 @click="handleManageCart"
344
-        >
345
-          <div>{{ state.isManage ? '管理' : '完成'}}</div>
346
-        </FButton>
347
-      </div>
348
-    </div>
349
-    <div
350
-        v-if="!hasShopping"
351
-        class="flex flex-col justify-center items-center bg-white rounded-lg gap-3 text-xs py-8">
352
-      <div>
353
-        <image :src="gouwucheImage" mode="widthFix" class="w-20 h-20"></image>
354
-      </div>
355
-      <div>
356
-        暂无商品,去添加喜欢的商品
357
-      </div>
358
-    </div>
359
-    <div v-else class="mt-10">
360
-
361
-      <div
362
-          v-if="shopping && shopping.list"
363
-          class="flex flex-col gap-4 p-3"
364
-      >
365
-        <div
366
-            v-for="(shopItem, index) in shopping.list"
367
-            :key="index"
368
-            class="bg-white rounded-lg  "
369
-        >
370
-
371
-<!--          <nut-cell-group>-->
372
-<!--            <nut-cell>-->
373
-<!--              <nut-checkbox :indeterminate="shopItem.indeterminate" v-model="shopItem.allCheck" @change="changeBox5">-->
374
-<!--                {{shopItem.mer_name}}-->
375
-<!--              </nut-checkbox>-->
376
-<!--            </nut-cell>-->
377
-<!--            <nut-checkbox-group v-model="checkboxgroup5" ref="group2" @change="changeBox6">-->
378
-<!--              <nut-cell><nut-checkbox label="1" style="margin: 2px 20px 0 0">组合复选框</nut-checkbox></nut-cell>-->
379
-<!--              <nut-cell><nut-checkbox label="2">组合复选框</nut-checkbox></nut-cell>-->
380
-<!--              <nut-cell><nut-checkbox label="3">组合复选框</nut-checkbox></nut-cell>-->
381
-<!--              <nut-cell><nut-checkbox label="4">组合复选框</nut-checkbox></nut-cell>-->
382
-<!--            </nut-checkbox-group>-->
383
-<!--          </nut-cell-group>-->
384
-
385
-
386
-          <div
387
-              class="f-hairline-bottom flex  items-center font-bold p-3"
388
-          >
389
-            <nut-checkbox v-model="shopItem.allCheck" @change="shopCheck(shopItem)" label="全选"
390
-                          class="!text-primary"
391
-            >
392
-              {{ shopItem.mer_name }}
393
-            </nut-checkbox>
394
-          </div>
395
-          <div v-for="(goodItem, goodIndex) in shopItem.list"
396
-               :key="goodIndex"
397
-               class="flex f-hairline-bottom p-3 gap-2"
398
-          >
399
-            <div class="flex">
400
-              <nut-checkbox v-model="goodItem.check"
401
-                            @change="handleGoodsItemCheck"
402
-                            label="单选"
403
-                            class="!text-primary"
404
-              ></nut-checkbox>
405
-              <image
406
-                  :src="goodItem.product.image"
407
-                  mode="aspectFill" class="w-18 h-18 rounded"
408
-              ></image>
409
-            </div>
410
-
411
-            <div class="flex flex-col gap-1 w-full">
412
-              <div
413
-                  @click="handleProductItemClick(goodItem)"
414
-                  class="text-overflow line-clamp-1">{{ goodItem.product.store_name }}</div>
415
-              <div class="flex flex-col justify-start gap-1">
416
-                <div
417
-                    class="text-[10px] text-gray min-w-5  p-1  items-center flex">
418
-                  {{ goodItem.productAttr.sku }}
419
-                </div>
420
-                <div class="flex">
421
-                  <CXBYaojinTag :amount="goodItem.yanglao"/>
422
-
423
-                </div>
424
-              </div>
425
-              <div class="flex  justify-between ">
426
-                <FPrice :price="goodItem.productAttr.price"
427
-                        ex-class="font-bold text-dark"
428
-                />
429
-                <nut-input-number v-model="goodItem.cart_num" @change="(num) => handleNumberChange(num, goodItem)"/>
430
-              </div>
431
-            </div>
432
-          </div>
433
-        </div>
434
-
435
-      </div>
436
-    </div>
437
-
438
-    <div class="pb-12">
439
-      <div class="flex flex-row justify-center items-center gap-3 font-bold text-sm p-3 ">
440
-        <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
441
-        <div>
442
-          精品推荐
443
-        </div>
444
-        <image :src="like_adorn_220628Image" mode="widthFix" class="w-6 h-6"></image>
445
-      </div>
446
-
447
-      <div class="pb-3 px-3" v-if="state.recommendList">
448
-        <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
449
-          <div v-for="(item, index) in state.recommendList"
450
-               :key="index"
451
-               @click="handleProductItemClick(item)"
452
-          >
453
-            <MerchantProductCard :item="item" />
454
-
455
-          </div>
456
-        </grid-view>
457
-
458
-        <div class=" flex justify-center items-center text-[12px] text-gray-500"
459
-        >
460
-          <div v-if="state.status === 'loading'">
461
-            加载中...
462
-          </div>
463
-          <div v-if="state.status === 'noMore'">
464
-            没有更多了~
465
-          </div>
466
-        </div>
467
-
468
-      </div>
469
-    </div>
470
-  </div>
471
-
472
-  <div v-if="hasShopping"
473
-      class="fixed bottom-0 w-full">
474
-    <div class="bg-white h-10 flex justify-between" v-if="shopping && shopping.list">
475
-      <div class="flex justify-center items-center gap-2 pl-3">
476
-        <nut-checkbox v-model="isAllSelect"
477
-                      @change="handleSelectAll"
478
-                      label="全选"
479
-                      class="!text-primary"
480
-        >全选
481
-        </nut-checkbox>
482
-        <div class="text-xs text-gray">共 {{ state.totalCartCount }} 件</div>
483
-      </div>
484
-
485
-      <div class="flex justify-center items-center gap-2 pr-3">
486
-        <div class="flex text-[12px]">
487
-          合计:
488
-          <FPrice :price="state.totalPrice"></FPrice>
489
-<!--          {{totalCartInfo.totalPrice}}-->
490
-        </div>
491
-        <FButton
492
-            @click="handleSubmit"
493
-            size="small"
494
-            :exClass="['rounded-full','!text-[14px]', 'text-white', 'bg-primary', 'w-full']"
495
-        >
496
-          {{ state.isManage? '去结算' : '删除'}}
497
-        </FButton>
498
-      </div>
499
-    </div>
500
-  </div>
501
-</template>
502
-<style>
503
-page {
504
-  background-color: #f8f8f8;
505
-}
506
-</style>
507
-<route lang="yaml">
508
-style:
509
-  navigationBarTitleText: 购物车
510
-  enablePullDownRefresh: true
511
-</route>

+ 8 - 39
src/pages/order_addcart/index.vue

@@ -16,7 +16,7 @@ import {
16
 import { DcProductModel } from "~/apis/model/dacang.model";
16
 import { DcProductModel } from "~/apis/model/dacang.model";
17
 import { createShopping, changeProdoctSku } from "~/apis/order.api";
17
 import { createShopping, changeProdoctSku } from "~/apis/order.api";
18
 import { encodeBase64 } from "~/utils/http/helper";
18
 import { encodeBase64 } from "~/utils/http/helper";
19
-import { CDN_URL } from "~/config/app";
19
+import { CDN_URL,ICON_CDN_URL } from "~/config/app";
20
 import { uniq, values } from "lodash-es";
20
 import { uniq, values } from "lodash-es";
21
 import { cartChange } from "~/apis/order.api";
21
 import { cartChange } from "~/apis/order.api";
22
 import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
22
 import type CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
@@ -61,42 +61,20 @@ const detail: any = ref(null)
61
 
61
 
62
 
62
 
63
 function onSelectedSku(currentSku: any) {
63
 function onSelectedSku(currentSku: any) {
64
-  console.log("item", currentSku);
65
-
66
   state.currentSku = currentSku
64
   state.currentSku = currentSku
67
-
68
 }
65
 }
69
 
66
 
70
 
67
 
71
 function handleCreateShopping() {
68
 function handleCreateShopping() {
72
-  // console.log(state.flag)
69
+
73
   console.log(state.currentSku.unique, '切换sku展示的商品', state.changeSkuCart_id)
70
   console.log(state.currentSku.unique, '切换sku展示的商品', state.changeSkuCart_id)
74
   uniqueclone.value = state.currentSku.unique
71
   uniqueclone.value = state.currentSku.unique
75
   changeProdoctSku(
72
   changeProdoctSku(
76
-    // product_attr_unique: JSON.stringify(state.currentSku),
77
-    // detail.value.unique
73
+   
78
     state.changeSkuCart_id,
74
     state.changeSkuCart_id,
79
     state.currentSku.unique
75
     state.currentSku.unique
80
   ).then(res => {
76
   ).then(res => {
81
-    console.log('我是res123', res)
82
-
83
-    // if (res.cart_id) {
84
-    //   // console.log(state.flag)
85
-    //   if (state.flag == '1' || state.flag == '3') {
86
-    //     uni.navigateTo({
87
-    //       url: `/pages/order-confirm/index?cartId=${res.cart_id}&type=${state.flag}&product_id=${detail.value.product_id}`
88
-    //     })
89
-    //   } else {
90
-    //     uni.$emit('cart-reload')
91
-    //     uni.showToast({
92
-    //       title: '添加购物车成功',
93
-    //       icon: 'none'
94
-    //     })
95
-    //     loadCartCount()
96
-    //     state.isShowSku = false
97
-    //   }
98
-    // }
99
-
77
+  
100
     if (res.status === 200) {
78
     if (res.status === 200) {
101
       state.isShowSku = false
79
       state.isShowSku = false
102
       console.log("修改后", state.currentSku);
80
       console.log("修改后", state.currentSku);
@@ -116,13 +94,9 @@ function handleCreateShopping() {
116
 }
94
 }
117
 
95
 
118
 function handleCountChange(val) {
96
 function handleCountChange(val) {
119
-  // console.log(val)
120
-  // detail.value.
121
-  // if (val > 0) {
122
-  console.log(val);
123
 
97
 
124
   state.cartNum = val
98
   state.cartNum = val
125
-  // }
99
+
126
 }
100
 }
127
 
101
 
128
 // 距离顶部距离
102
 // 距离顶部距离
@@ -583,15 +557,10 @@ function handleProductItemClick(
583
     & TaobaoProductThirdPartyWaresModel
557
     & TaobaoProductThirdPartyWaresModel
584
     & VipProductModel
558
     & VipProductModel
585
 ) {
559
 ) {
586
-  // function navigateToDetail(params) {
587
-  //   let otherDetailUrl = `/pages/store/product/other`
588
-  //   return uni.navigateTo({
589
-  //     url: `${otherDetailUrl}?params=${params}`
590
-  //   })
591
-  // }
560
+ 
592
   // 大仓
561
   // 大仓
593
   uni.navigateTo({
562
   uni.navigateTo({
594
-    url: `/pages/store/product/detail?id=${item.product_id}`
563
+    url: `/subPages/pages/store/product/detail?id=${item.product_id}`
595
   })
564
   })
596
 }
565
 }
597
 
566
 
@@ -784,7 +753,7 @@ function handlePageClick() {
784
                           {{ goodItem.productAttr.sku }}
753
                           {{ goodItem.productAttr.sku }}
785
                         </span>
754
                         </span>
786
                         <span class="m-lift">
755
                         <span class="m-lift">
787
-                          <img class="thumbnail_1" referrerpolicy="no-referrer" src="../../static/icon/下拉.png" />
756
+                          <img class="thumbnail_1" referrerpolicy="no-referrer" :src="ICON_CDN_URL+'下拉.png'" />
788
                         </span>
757
                         </span>
789
                       </div>
758
                       </div>
790
                     </div>
759
                     </div>

+ 8 - 14
src/pages/payment/index.vue

@@ -4,12 +4,7 @@ import { CDN_URL } from '~/config/app'
4
 import { checkGroupOrder } from '~/apis/order.api'
4
 import { checkGroupOrder } from '~/apis/order.api'
5
 import FNavBar from '~/components/FNavBar/FNavBar.vue'
5
 import FNavBar from '~/components/FNavBar/FNavBar.vue'
6
 
6
 
7
-// usePageStore.setPageConfig({
8
-//   orderBack: {
9
-//     type: 'page',
10
-//     url: '/pages/store/product/detail?id=' + state.id
11
-//   }
12
-// })
7
+
13
 
8
 
14
 const pageStore = usePageStoreWidthOut()
9
 const pageStore = usePageStoreWidthOut()
15
 
10
 
@@ -26,6 +21,8 @@ const state = reactive({
26
 onLoad((options) => {
21
 onLoad((options) => {
27
   // console.log('我是options',options)
22
   // console.log('我是options',options)
28
   if (options) {
23
   if (options) {
24
+	  
25
+	  console.log("===options",options);
29
     state.orderList = options.OrderList
26
     state.orderList = options.OrderList
30
     state.payPrice = options.pay_price
27
     state.payPrice = options.pay_price
31
     state.orderId = options.order_id
28
     state.orderId = options.order_id
@@ -65,7 +62,7 @@ function handleConfirm() {
65
       OrderLists: state.orderList,
62
       OrderLists: state.orderList,
66
       type: 'tdbaspzf',
63
       type: 'tdbaspzf',
67
     },
64
     },
68
-    envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
65
+    envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
69
     // envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
66
     // envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
70
     success(res) {
67
     success(res) {
71
       // 打开成功
68
       // 打开成功
@@ -97,10 +94,7 @@ function onClickLeft() {
97
       if (res.cancel) {
94
       if (res.cancel) {
98
         // uni.navigateBack()
95
         // uni.navigateBack()
99
         uni.$emit('cart-reload')
96
         uni.$emit('cart-reload')
100
-        // let url = '/pages/order/index?tabIndex=1'
101
-        // if (usePageStore.orderBack) {
102
-        //   url += `&from=${usePageStore.orderBack}`
103
-        // }
97
+        
104
         console.log(state.tabIndex)
98
         console.log(state.tabIndex)
105
 
99
 
106
         if (state.tabIndex) {
100
         if (state.tabIndex) {
@@ -114,7 +108,7 @@ function onClickLeft() {
114
         // setTimeout(() => {
108
         // setTimeout(() => {
115
         if (state.tabIndex == 0) {
109
         if (state.tabIndex == 0) {
116
           uni.navigateTo({
110
           uni.navigateTo({
117
-            url: '/pages/order/index',
111
+            url: '/subPages/pages/order/index',
118
           })
112
           })
119
         }
113
         }
120
         if (state.tabIndex > 0) {
114
         if (state.tabIndex > 0) {
@@ -125,13 +119,13 @@ function onClickLeft() {
125
           }
119
           }
126
           else {
120
           else {
127
             uni.navigateTo({
121
             uni.navigateTo({
128
-				  url: `/pages/order/index?tabIndex=${state.tabIndex}&from=payment`,
122
+				  url: `/subPages/pages/order/index?tabIndex=${state.tabIndex}&from=payment`,
129
             })
123
             })
130
           }
124
           }
131
         }
125
         }
132
         else {
126
         else {
133
           uni.navigateTo({
127
           uni.navigateTo({
134
-            url: '/pages/order/index?tabIndex=1&from=payment',
128
+            url: '/subPages/pages/order/index?tabIndex=1&from=payment',
135
           })
129
           })
136
         }
130
         }
137
         // const tabIndex =
131
         // const tabIndex =

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

@@ -7,7 +7,7 @@ const icon = 'https://cdn.bjtdba.com/vod/image/2023-09-21/20230921160115229.png'
7
 function onClickLeft() {
7
 function onClickLeft() {
8
   uni.redirectTo({
8
   uni.redirectTo({
9
     // url: '/pages/my-integral/index'
9
     // url: '/pages/my-integral/index'
10
-    url: '/pages/order/index'
10
+    url: '/subPages/pages/order/index'
11
   })
11
   })
12
 }
12
 }
13
 function goHome() {
13
 function goHome() {

+ 1 - 1
src/pages/product/dingshenglianmeng.vue

@@ -66,7 +66,7 @@ const list = ref([])
66
 
66
 
67
 function handleItemClick(item) {
67
 function handleItemClick(item) {
68
   uni.navigateTo({
68
   uni.navigateTo({
69
-    url: `/pages/store/product/detail?id=` + item.product_id
69
+    url: `/subPages/pages/store/product/detail?id=` + item.product_id
70
   })
70
   })
71
 }
71
 }
72
 
72
 

+ 1 - 1
src/pages/product/integral.vue

@@ -92,7 +92,7 @@ onPullDownRefresh(() => {
92
 function handleItemClick(item) {
92
 function handleItemClick(item) {
93
   // console.log(item)
93
   // console.log(item)
94
   uni.navigateTo({
94
   uni.navigateTo({
95
-    url: `/pages/store/product/detail?id=${item.product_id}&mer_id=148`
95
+    url: `/subPages/pages/store/product/detail?id=${item.product_id}&mer_id=148`
96
   })
96
   })
97
 }
97
 }
98
 </script>
98
 </script>

+ 1 - 2
src/pages/product/zibuyangsheng.vue

@@ -19,8 +19,7 @@ onLoad((options) => {
19
 
19
 
20
 function handleItemClick(item) {
20
 function handleItemClick(item) {
21
   uni.navigateTo({
21
   uni.navigateTo({
22
-    // url: `/pages/store/product/detail?id=${item.product_id}&mer_id=148`
23
-    url: `/pages/store/product/detail?id=`+item.product_id
22
+    url: `/subPages/pages/store/product/detail?id=`+item.product_id
24
   })
23
   })
25
 }
24
 }
26
 
25
 

+ 0 - 472
src/pages/quick-fuc/business.vue

@@ -1,472 +0,0 @@
1
-<template>
2
-	<view class="business-container">
3
-		<view class="lab-content">
4
-			<scroll-view scroll-x="true" class="lab-item">
5
-				<view class="lab-item-x" v-for="(item,index) in tabList" :key="'lab-item-x-'+index">
6
-					<view class="lab-item-small" @click="onTabClick(index,item.merchant_category_id)">
7
-						<text :class="currentIndex==index?'lab-title':'lab-default-title'">{{item.category_name}}</text>
8
-						<view :class="currentIndex==index?'lab-line':'lab-default-line'"></view>
9
-					</view>
10
-				</view>
11
-			</scroll-view>
12
-		</view>
13
-		<view class="banner-content">
14
-			<image class="top-banner" src="/static/img/img_banner_dslm.png" mode="aspectFill"></image>
15
-		</view>
16
-
17
-		<view class="fuc-content">
18
-			<view @click="onFucClick" class="fuc-item" v-for="(item,index) in MU_TABLE_LIST" :key="'fuc-item-'+index">
19
-				<text class="item-title">{{item.title}}</text>
20
-				<text class="item-des">{{item.des}}</text>
21
-				<image class="item-img" :src="item.icon" mode=""></image>
22
-			</view>
23
-		</view>
24
-
25
-		<view v-if="goodsList&& goodsList.length!=0" v-for="(item,index) in goodsList" :key="'goods-x-'+index">
26
-			<view class="vip-content" v-if="item.childList&& item.childList.length!=0"
27
-				@click="goShopClick(item.mer_id)">
28
-				<image class="vip-bg" src="/static/img/item_smq_bg.png" mode="aspectFill"></image>
29
-				<view class="left-lab-content">
30
-					<image class="lab-icon" :src="item.mer_avatar" mode="widthFix"></image>
31
-					<text class="lab-title">{{item.mer_name}}</text>
32
-					<view class="small-lab">补充养老</view>
33
-				</view>
34
-
35
-				<view class="right-lab-content">
36
-					<text class="right-tx">进入店铺</text>
37
-					<image class="right-icon" src="/static/icon/img_jt_right.png" mode="widthFix"></image>
38
-				</view>
39
-			</view>
40
-
41
-			<view class="goods-scoll-content">
42
-				<scroll-view scroll-x="true" class="goods-scoll-item">
43
-					<view @click="onDetailClick(childItem.product_id)" class="goods-scoll-item-x"
44
-						v-for="(childItem,childIndex) in item.childList" :key="'goods-scoll-item-x-'+childIndex">
45
-						<view class="goods-item">
46
-							<image class="goods-img" :src="childItem.image" mode="aspectFill"></image>
47
-							<text class="goods-title">{{childItem.store_name}}</text>
48
-							<view class="price-content">
49
-								<text class="goods-des">{{childItem.price}}</text>
50
-								<text class="goods-des">pv:{{childItem.pv?childItem.pv:0}}</text>
51
-							</view>
52
-						</view>
53
-					</view>
54
-				</scroll-view>
55
-			</view>
56
-		</view>
57
-		
58
-		<CXBEmpty v-else />
59
-	</view>
60
-</template>
61
-
62
-<script setup>
63
-	import {
64
-		MU_TABLE_LIST
65
-	} from "./constants.js"
66
-	import {
67
-		apiGetCategoryList,
68
-		apiGetProductType,
69
-		apiGetProductList
70
-	} from '~/apis/quickLink'
71
-	import { getProductShare } from "~/apis/common";
72
-	const currentIndex = ref(0)
73
-	const tabList = ref([])
74
-	const goodsList = ref([])
75
-	let id=''
76
-
77
-
78
-	onLoad((option) => {
79
-		console.log();
80
-		getCategoryList()
81
-		getProductType()
82
-		
83
-		if (option && option.shareId) {
84
-		  userStore.setShareId(option.shareId)
85
-		}
86
-		getProductShare().then(res => {
87
-		  if (res) userStore.setShareId(res.share_id)
88
-		}).catch(message => {
89
-		})
90
-	})
91
-
92
-	onShareAppMessage(() => {
93
-		const shareId = Cache.get('SHARE_ID')
94
-		return {
95
-			title: `消费储蓄 保障未来`,
96
-			path: `/pages/vip/index?shareId=${shareId}`,
97
-			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-09/20231009202402136.png'
98
-		}
99
-	})
100
-
101
-	onShareTimeline(() => {
102
-		const shareId = Cache.get('SHARE_ID')
103
-		return {
104
-			title: `消费储蓄 保障未来`,
105
-			query: `from=share&shareId=${shareId}`,
106
-			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-11/20231011062523504.png'
107
-		}
108
-	})
109
-
110
-	onReachBottom(() => {
111
-		console.log('到底了。。。')
112
-	})
113
-
114
-	onPullDownRefresh(() => {
115
-		getProductType()
116
-		uni.stopPullDownRefresh()
117
-	})
118
-
119
-	function onTabClick(position, id) {
120
-		currentIndex.value = position
121
-		id.value = id
122
-		getProductType()
123
-	}
124
-
125
-	function goShopClick(id) {
126
-		uni.navigateTo({
127
-			url: `/pages/store/home/index?id=${id}`
128
-		})
129
-	}
130
-
131
-	function onDetailClick(id) {
132
-		uni.navigateTo({
133
-			url: `/pages/store/product/detail?id=${id}`
134
-		})
135
-	}
136
-
137
-	function onFucClick() {
138
-		uni.showToast({
139
-			title: '升级中',
140
-			icon: 'none'
141
-		})
142
-	}
143
-
144
-	function getCategoryList() {
145
-		apiGetCategoryList().then((res) => {
146
-			let _list = new Array()
147
-			_list.push({
148
-				category_name: '全部',
149
-				merchant_category_id: ''
150
-			})
151
-			if (res.merchantCategory && res.merchantCategory.length != 0) {
152
-				_list.push(...res.merchantCategory)
153
-			}
154
-			tabList.value = _list
155
-		})
156
-	}
157
-
158
-	function getProductType() {
159
-		uni.showLoading({
160
-			title:'加载中...'
161
-		})
162
-		apiGetProductType(id.value).then((res) => {
163
-			if (res && res.pageInfo && res.pageInfo.list) {
164
-				goodsList.value = res.pageInfo.list
165
-				dealData()
166
-			}
167
-			uni.hideLoading()
168
-		})
169
-	}
170
-
171
-	function dealData() {
172
-		for (let i = 0; i < goodsList.value.length; i++) {
173
-			let _id = goodsList.value[i].mer_id
174
-			apiGetProductList(_id).then(resx => {
175
-				if (resx.pageInfo.list && resx.pageInfo.list.length != 0) {
176
-					goodsList.value[i].childList = resx.pageInfo.list
177
-				}
178
-			})
179
-		}
180
-	}
181
-</script>
182
-
183
-<style lang="scss" scoped>
184
-	.business-container {
185
-		display: flex;
186
-		flex-direction: column;
187
-		min-height: 100VH;
188
-		background-color: #f8f8f8;
189
-		box-sizing: border-box;
190
-
191
-		.goods-content {
192
-			display: flex;
193
-			flex-direction: row;
194
-			margin-left: 10rpx;
195
-			margin-right: 10rpx;
196
-
197
-
198
-		}
199
-
200
-		.goods-item {
201
-			display: flex;
202
-			margin-left: 10rpx;
203
-			margin-right: 10rpx;
204
-			width: 230rpx;
205
-			align-items: center;
206
-			justify-content: center;
207
-			flex-direction: column;
208
-			background-color: #fff;
209
-			border-radius: 20rpx;
210
-
211
-			.goods-img {
212
-				width: 230rpx;
213
-				height: 230rpx;
214
-				border-top-right-radius: 20rpx;
215
-				border-top-left-radius: 20rpx;
216
-				background-color: #333;
217
-			}
218
-
219
-			.goods-title {
220
-				width: 230rpx;
221
-				font-size: 28rpx;
222
-				color: #333;
223
-				margin-top: 10rpx;
224
-				text-overflow: ellipsis;
225
-				overflow: hidden;
226
-				margin-left: 10rpx;
227
-				margin-right: 10rpx;
228
-				word-break: break-all;
229
-				white-space: nowrap;
230
-			}
231
-
232
-			.price-content {
233
-				margin-top: 10rpx;
234
-				display: flex;
235
-				margin-bottom: 20rpx;
236
-				flex-direction: row;
237
-				align-items: center;
238
-				justify-content: space-between;
239
-				padding-left: 16rpx;
240
-				padding-right: 16rpx;
241
-				box-sizing: border-box;
242
-				width: 100%;
243
-
244
-				.price-left {
245
-					font-size: 28rpx;
246
-					color: #333;
247
-				}
248
-
249
-				.price-rifht {
250
-					font-size: 28rpx;
251
-					color: #333;
252
-				}
253
-			}
254
-
255
-
256
-		}
257
-
258
-		.vip-content {
259
-			margin: 20rpx;
260
-			position: relative;
261
-			height: 100rpx;
262
-			display: flex;
263
-			flex-direction: row;
264
-			align-items: center;
265
-			box-sizing: border-box;
266
-
267
-			.vip-bg {
268
-				position: absolute;
269
-				height: 100rpx;
270
-				width: 710rpx;
271
-				border-top-right-radius: 20rpx;
272
-				border-top-left-radius: 20rpx;
273
-			}
274
-
275
-			.right-lab-content {
276
-				display: flex;
277
-				flex-direction: row;
278
-				align-items: center;
279
-				flex: 1;
280
-				z-index: 22;
281
-				justify-content: flex-end;
282
-
283
-				.right-tx {
284
-					color: #fff;
285
-					font-size: 26rpx;
286
-					margin-right: 10rpx;
287
-				}
288
-
289
-				.right-icon {
290
-					width: 14rpx;
291
-					height: 10rpx;
292
-					margin-right: 20rpx;
293
-				}
294
-			}
295
-
296
-			.left-lab-content {
297
-				height: 50rpx;
298
-				background-color: #fff;
299
-				border-radius: 20rpx;
300
-				z-index: 222;
301
-				display: flex;
302
-				flex-direction: row;
303
-				align-items: center;
304
-				margin-left: 20rpx;
305
-
306
-				.lab-icon {
307
-					width: 30rpx;
308
-					height: 30rpx;
309
-					margin-left: 10rpx;
310
-				}
311
-
312
-				.lab-title {
313
-					font-size: 26rpx;
314
-					color: #333;
315
-					margin-left: 10rpx;
316
-				}
317
-
318
-				.small-lab {
319
-					border-radius: 20rpx;
320
-					background-color: #000;
321
-					margin-right: 10rpx;
322
-					color: #fff;
323
-					font-size: 24rpx;
324
-					padding-left: 6rpx;
325
-					padding-right: 6rpx;
326
-					margin-left: 20rpx;
327
-				}
328
-
329
-			}
330
-
331
-		}
332
-
333
-		.fuc-content {
334
-			display: flex;
335
-			padding-left: 14rpx;
336
-			padding-right: 14rpx;
337
-			margin-top: 20rpx;
338
-			flex-direction: row;
339
-
340
-			.fuc-item {
341
-				flex: 1;
342
-				display: flex;
343
-				flex-direction: column;
344
-				background-color: #fff;
345
-				border-radius: 10rpx;
346
-				margin-left: 6rpx;
347
-				margin-right: 6rpx;
348
-				padding-top: 30rpx;
349
-				padding-bottom: 30rpx;
350
-				align-items: center;
351
-				justify-content: center;
352
-
353
-				.item-img {
354
-					width: 80rpx;
355
-					height: 80rpx;
356
-				}
357
-
358
-				.item-title {
359
-					font-size: 30rpx;
360
-					font-weight: bolder;
361
-					color: #333;
362
-					margin-bottom: 10rpx;
363
-				}
364
-
365
-				.item-des {
366
-					font-size: 24rpx;
367
-					color: #999;
368
-					margin-bottom: 40rpx;
369
-				}
370
-
371
-			}
372
-		}
373
-
374
-		.banner-content {
375
-			background-color: #fff;
376
-			padding: 20rpx;
377
-			height: 360rpx;
378
-			display: flex;
379
-			flex-direction: column;
380
-			margin-top: 90rpx;
381
-			box-sizing: border-box;
382
-
383
-			.top-banner {
384
-				border-radius: 20rpx;
385
-				background: #999;
386
-				height: 360rpx;
387
-				width: 100%;
388
-			}
389
-		}
390
-
391
-		.goods-scoll-content {
392
-			width: 100%;
393
-			display: flex;
394
-			flex-direction: row;
395
-			align-items: center;
396
-
397
-			.goods-scoll-item {
398
-				display: flex;
399
-				flex-direction: row;
400
-				white-space: nowrap;
401
-				width: 100%;
402
-				margin-left: 10rpx;
403
-				margin-right: 10rpx;
404
-			}
405
-
406
-			.goods-scoll-item-x {
407
-				display: inline-block;
408
-				text-align: center;
409
-				width: 230rpx;
410
-				margin-right: 16rpx;
411
-			}
412
-		}
413
-
414
-		.lab-content {
415
-			width: 100%;
416
-			height: 90rpx;
417
-			display: flex;
418
-			flex-direction: row;
419
-			align-items: center;
420
-			position: fixed;
421
-			top: 0;
422
-			left: 0;
423
-			background-color: #fff;
424
-			z-index: 99999;
425
-
426
-			.lab-item {
427
-				display: flex;
428
-				flex-direction: row;
429
-				white-space: nowrap;
430
-				width: 100%;
431
-			}
432
-
433
-			.lab-item-x {
434
-				display: inline-block;
435
-				margin-right: 10px;
436
-				text-align: center;
437
-			}
438
-
439
-			.lab-item-small {
440
-				display: flex;
441
-				flex-direction: column;
442
-				align-items: center;
443
-				width: 124rpx;
444
-
445
-				.lab-default-title {
446
-					font-size: 28rpx;
447
-					margin-bottom: 10rpx;
448
-				}
449
-
450
-				.lab-title {
451
-					font-size: 32rpx;
452
-					margin-bottom: 10rpx;
453
-					color: #FE0032;
454
-				}
455
-
456
-				.lab-line {
457
-					width: 50rpx;
458
-					height: 6rpx;
459
-					background-color: #FE0032;
460
-					border-radius: 4rpx;
461
-				}
462
-
463
-				.lab-default-line {
464
-					width: 50rpx;
465
-					height: 6rpx;
466
-					border-radius: 4rpx;
467
-				}
468
-
469
-			}
470
-		}
471
-	}
472
-</style>

+ 0 - 26
src/pages/quick-fuc/constants.js

@@ -1,26 +0,0 @@
1
-import { KINGKONGKEY } from '~/apis/model/common.model'
2
-export const MU_TABLE_LIST =  [{
3
-	title:'商家入驻',
4
-	key:KINGKONGKEY.SJRZ,
5
-	icon:'/static/icon/icon_sm_sjrz.png',
6
-	des:'入驻流程指南'
7
-},
8
-{
9
-	title:'店铺推荐',
10
-	key:KINGKONGKEY.DPTJ,
11
-	icon:'/static/icon/icon_sm_dptj.png',
12
-	des:'优质店铺推荐'
13
-},
14
-{
15
-	title:'官方客服',
16
-	key:KINGKONGKEY.GFKF,
17
-	icon:'/static/icon/icon_sm_gfkf.png',
18
-	des:'用户专属客服'
19
-},
20
-{
21
-	title:'店铺管理',
22
-	key:KINGKONGKEY.DPGL,
23
-	icon:'/static/icon/icon_sm_dpgl.png',
24
-	des:'商品订单管理'
25
-},
26
-]

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

@@ -56,7 +56,7 @@ function handleToVipPage() {
56
 function handleImmediateWithdrawal() {
56
 function handleImmediateWithdrawal() {
57
   if (userStore.userInfo.is_ertification == 1) {
57
   if (userStore.userInfo.is_ertification == 1) {
58
     uni.navigateTo({
58
     uni.navigateTo({
59
-      url: '/pages/immediate-withdrawal/index?type=2'
59
+      url: '/subPages/pages/immediate-withdrawal/index?type=2'
60
     })
60
     })
61
   }else{
61
   }else{
62
     setTimeout(() => {
62
     setTimeout(() => {

+ 6 - 2
src/pages/refund/components/GoodStatusPopup.vue

@@ -1,12 +1,16 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
 import closeIcon from "~/static/icon/close.png";
2
 import closeIcon from "~/static/icon/close.png";
3
-import radioOffIcon from "~/static/icon/radio-off.png";
4
-import radioOnIcon from "~/static/icon/radio-on.png";
3
+
5
 import {computed} from "vue";
4
 import {computed} from "vue";
6
 import {PopupProps} from "~/components/FPopup";
5
 import {PopupProps} from "~/components/FPopup";
7
 import {CLOSE_EVENT, OPEN_EVENT, UPDATE_SHOW_EVENT} from "~/components/constants";
6
 import {CLOSE_EVENT, OPEN_EVENT, UPDATE_SHOW_EVENT} from "~/components/constants";
8
 import {CANCEL_EVENT, CONFIRM_EVENT} from "~/constants/event";
7
 import {CANCEL_EVENT, CONFIRM_EVENT} from "~/constants/event";
9
 import FPopup from "~/components/FPopup/FPopup.vue";
8
 import FPopup from "~/components/FPopup/FPopup.vue";
9
+import { ICON_CDN_URL } from "~/config/app";
10
+
11
+const radioOffIcon =ref(ICON_CDN_URL+'radio-off.png') 
12
+const radioOnIcon = ref(ICON_CDN_URL+'radio-on.png') 
13
+
10
 
14
 
11
 const emit = defineEmits()
15
 const emit = defineEmits()
12
 const props = defineProps({
16
 const props = defineProps({

+ 4 - 3
src/pages/refund/components/RefundReasonPopup.vue

@@ -1,13 +1,14 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
 import closeIcon from "~/static/icon/close.png";
2
 import closeIcon from "~/static/icon/close.png";
3
-import radioOffIcon from "~/static/icon/radio-off.png";
4
-import radioOnIcon from "~/static/icon/radio-on.png";
3
+
5
 import {computed} from "vue";
4
 import {computed} from "vue";
6
 import {PopupProps} from "~/components/FPopup";
5
 import {PopupProps} from "~/components/FPopup";
7
 import {CLOSE_EVENT, OPEN_EVENT, UPDATE_SHOW_EVENT} from "~/components/constants";
6
 import {CLOSE_EVENT, OPEN_EVENT, UPDATE_SHOW_EVENT} from "~/components/constants";
8
 import {CANCEL_EVENT, CONFIRM_EVENT} from "~/constants/event";
7
 import {CANCEL_EVENT, CONFIRM_EVENT} from "~/constants/event";
9
 import FPopup from "~/components/FPopup/FPopup.vue";
8
 import FPopup from "~/components/FPopup/FPopup.vue";
10
-
9
+import { ICON_CDN_URL } from "~/config/app";
10
+const radioOffIcon =ref(ICON_CDN_URL+'radio-off.png') 
11
+const radioOnIcon = ref(ICON_CDN_URL+'radio-on.png') 
11
 const emit = defineEmits()
12
 const emit = defineEmits()
12
 const props = defineProps({
13
 const props = defineProps({
13
   show: {
14
   show: {

+ 0 - 655
src/pages/search/index-bak.vue

@@ -1,655 +0,0 @@
1
-<script setup lang="ts">
2
-import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
3
-import {
4
-  getDyLiveList,
5
-  getDyProductList,
6
-  getJdProductList,
7
-  getPddProductList,
8
-  getSuProductList,
9
-  getTaobaoProductList,
10
-  getVipProductList,
11
-  searchDyProduct,
12
-  searchJdProduct,
13
-  searchPddProduct,
14
-  searchSuProduct, searchVipProduct
15
-} from "~/apis/product";
16
-import type {
17
-  DyProductModel,
18
-  IProductDetail,
19
-  JdProductModel,
20
-  SuNingProductModel,
21
-  TaobaoProductThirdPartyWaresModel,
22
-  VipProductModel
23
-} from "~/apis/model/product.model";
24
-import {getDcProductList} from "~/apis/dacang";
25
-import type {DcProductModel} from "~/apis/model/dacang.model";
26
-import FPrice from "~/components/FPrice/FPrice.vue";
27
-import {encodeBase64} from "~/utils/http/helper";
28
-import CXBDyLiveRecommend from "~/components/CXBDyLive/CXBDyLiveRecommend.vue";
29
-import {PLATFORM_NAME} from "~/apis/model/common.model";
30
-import {CDN_URL} from "~/config/app";
31
-
32
-const dyLeftImage = CDN_URL + '/static/assets/dy_zuo_230321.png'
33
-const dyRightImage = CDN_URL + '/static/assets/dy_you_230321.png'
34
-
35
-interface TabItem {
36
-  id: PLATFORM_NAME,
37
-  text: string,
38
-  iconPath: string,
39
-  selectedIconPath: string
40
-}
41
-
42
-const tabList = <Array<TabItem>>[{
43
-  id: PLATFORM_NAME.JD,
44
-  text: '京东',
45
-  iconPath: CDN_URL + '/static/assets/jingdong_x.png',
46
-  selectedIconPath: CDN_URL + '/static/assets/jingdong_d.png',
47
-}, {
48
-  id: PLATFORM_NAME.TB,
49
-  text: '淘宝',
50
-  iconPath: CDN_URL + '/static/assets/taobaoyanglao_x.png',
51
-  selectedIconPath: CDN_URL + '/static/assets/taobaoyanglao_d.png',
52
-}, {
53
-  id: PLATFORM_NAME.PDD,
54
-  text: '拼多多',
55
-  iconPath: CDN_URL + '/static/assets/pinduoduo_x.png',
56
-  selectedIconPath: CDN_URL + '/static/assets/pinduoduo_d.png',
57
-}, {
58
-  id: PLATFORM_NAME.DC,
59
-  text: '大仓',
60
-  iconPath: CDN_URL + '/static/assets/dacang_x_220914.png',
61
-  selectedIconPath: CDN_URL + '/static/assets/dacang_d_220914.png',
62
-}, {
63
-  id: PLATFORM_NAME.DY,
64
-  text: '抖音',
65
-  iconPath: CDN_URL + '/static/assets/douyin_x_230313.png',
66
-  selectedIconPath: CDN_URL + '/static/assets/douyin_d_230313.png',
67
-}, {
68
-  id: PLATFORM_NAME.VIP,
69
-  text: '唯品会',
70
-  iconPath: CDN_URL + '/static/assets/weipinhui_x.png',
71
-  selectedIconPath: CDN_URL + '/static/assets/weipinhui_d.png',
72
-}, {
73
-  id: PLATFORM_NAME.SU,
74
-  text: '苏宁',
75
-  iconPath: CDN_URL + '/static/assets/suningyigou_x.png',
76
-  selectedIconPath: CDN_URL + '/static/assets/suningyigou_d.png',
77
-}]
78
-const state = reactive({
79
-  currentTab: PLATFORM_NAME.JD,
80
-  // 列表高度
81
-  scrollHeight: 0,
82
-  triggered: false,
83
-  status: 'none',
84
-  currentPage: 1,
85
-  totalPage: 1
86
-})
87
-const { windowHeight } = uni.getSystemInfoSync()
88
-state.scrollHeight = windowHeight - 195
89
-const searchValue = ref('')
90
-
91
-onLoad((options) => {
92
-  const platform = options.platform
93
-  if (platform) {
94
-    state.currentTab = platform
95
-  }
96
-  loadProductList('reload')
97
-
98
-})
99
-const list = ref<Array<
100
-    JdProductModel
101
-    | DcProductModel
102
-    | DyProductModel
103
-    | SuNingProductModel
104
-    | TaobaoProductThirdPartyWaresModel
105
-    | VipProductModel
106
-    | any
107
->>()
108
-
109
-const dyLiveList = ref<Array<DyProductModel>>()
110
-
111
-function searchProduct() {
112
-  switch (state.currentTab) {
113
-    case PLATFORM_NAME.JD: {
114
-      searchJdProduct({keyword: searchValue.value, page: 1, limit: 20}).then(res => {
115
-        list.value = res
116
-      })
117
-      break;
118
-    }
119
-    case PLATFORM_NAME.DC: {
120
-      getDcProductList({
121
-        page: 1,
122
-        limit: 10,
123
-        classify: '',
124
-        keyword: searchValue.value
125
-      }).then(res => {
126
-        list.value = res
127
-      })
128
-      break;
129
-    }
130
-    case PLATFORM_NAME.DY: {
131
-      searchDyProduct({keyword: searchValue.value, page: 1, limit: 10}).then(res => {
132
-        list.value = res
133
-      })
134
-      break;
135
-    }
136
-    case PLATFORM_NAME.PDD: {
137
-      searchPddProduct({ keyword: searchValue.value, page: 1, limit: 10}).then(res => {
138
-        list.value = res
139
-      })
140
-      break;
141
-    }
142
-    case PLATFORM_NAME.SU: {
143
-      searchSuProduct({ keyword: searchValue.value, page: 1, limit: 10}).then(res => {
144
-        list.value = res
145
-      })
146
-      break;
147
-    }
148
-    case PLATFORM_NAME.TB: {
149
-      getTaobaoProductList({
150
-        pageNum: `1`,
151
-        pageSize: '10',
152
-        title: searchValue.value
153
-      }).then(res => {
154
-        list.value = res.thirdPartyWaresList
155
-      })
156
-      break;
157
-    }
158
-    case PLATFORM_NAME.VIP: {
159
-      searchVipProduct({ keyword: searchValue.value, page: 1, limit: 10}).then(res => {
160
-        list.value = res
161
-      })
162
-      break;
163
-    }
164
-  }
165
-}
166
-function loadProductList(action: 'page' | 'reload', callback?: (items) => void) {
167
-
168
-  switch (state.currentTab) {
169
-    case PLATFORM_NAME.JD: {
170
-      getJdProductList({
171
-        page: state.currentPage,
172
-        limit: 10
173
-      }).then(res => {
174
-        state.triggered = false
175
-
176
-        // list.value = res
177
-        if (action === 'page') {
178
-          list.value = list.value.concat(res)
179
-        }
180
-        if (action === 'reload') {
181
-          list.value = res
182
-        }
183
-        // state.totalPage = Math.ceil()
184
-        // res[0].
185
-        // console.log(res)
186
-      }).catch(error => {
187
-        uni.showToast({
188
-          title: error,
189
-          icon: "none"
190
-        })
191
-      })
192
-      break;
193
-    }
194
-    case PLATFORM_NAME.DC: {
195
-      getDcProductList({
196
-        page: state.currentPage,
197
-        limit: 10,
198
-        classify: '',
199
-        keyword: ''
200
-      }).then(res => {
201
-        list.value = res
202
-        state.triggered = false
203
-
204
-      })
205
-      break;
206
-    }
207
-    case PLATFORM_NAME.DY: {
208
-      getDyLiveList({
209
-        page: state.currentPage,
210
-        limit: 4,
211
-        // keyword: ''
212
-      }).then(res => {
213
-        // console.log(res)
214
-        // console.log(res.authorPic)
215
-      })
216
-      getDyLiveList({page: 1,limit: 4})
217
-          .then(res => {
218
-            // console.log(res)
219
-            if (res) {
220
-              dyLiveList.value = res
221
-            }
222
-          })
223
-      getDyProductList({
224
-        page: state.currentPage,
225
-        limit: 10,
226
-      }).then(res => {
227
-        list.value = res
228
-        state.triggered = false
229
-
230
-      })
231
-      break;
232
-    }
233
-    case PLATFORM_NAME.PDD: {
234
-      getPddProductList({
235
-        page: state.currentPage,
236
-        limit: 10
237
-      }).then(res => {
238
-        list.value = res
239
-      })
240
-      break;
241
-    }
242
-    case PLATFORM_NAME.SU: {
243
-      getSuProductList({
244
-        page: state.currentPage,
245
-        limit: 10
246
-      }).then(res => {
247
-        list.value = res
248
-        console.log(res)
249
-        state.triggered = false
250
-
251
-
252
-      })
253
-      break;
254
-    }
255
-    case PLATFORM_NAME.TB: {
256
-      getTaobaoProductList({
257
-        pageNum: `${state.currentPage}`,
258
-        pageSize: '10'
259
-      }).then(res => {
260
-        list.value = res.thirdPartyWaresList
261
-      })
262
-      break;
263
-    }
264
-    case PLATFORM_NAME.VIP: {
265
-      getVipProductList({
266
-        page: state.currentPage,
267
-        limit: 10
268
-      }).then(res => {
269
-        list.value = res
270
-        state.triggered = false
271
-
272
-
273
-      })
274
-      break;
275
-    }
276
-    // default: {
277
-    //   getJdProductList({
278
-    //     page: 1,
279
-    //     limit: 10
280
-    //   }).then(res => {
281
-    //     list.value = res
282
-    //   })
283
-    // }
284
-  }
285
-
286
-
287
-}
288
-
289
-function handleCategoryItemClick(item: TabItem) {
290
-  state.currentTab = item.id
291
-  loadProductList(item.id)
292
-}
293
-
294
-function handleProductItemClick(
295
-    item:
296
-        JdProductModel
297
-        & DcProductModel
298
-        & DyProductModel
299
-        & SuNingProductModel
300
-        & TaobaoProductThirdPartyWaresModel
301
-        & VipProductModel
302
-) {
303
-
304
-
305
-  function navigateToDetail(params) {
306
-    let otherDetailUrl = `/pages/store/product/other`
307
-    return uni.navigateTo({
308
-      url: `${otherDetailUrl}?params=${params}`
309
-    })
310
-  }
311
-  // 大仓
312
-  if (state.currentTab === PLATFORM_NAME.DC && item.type === '5') {
313
-    uni.navigateTo({
314
-      url: `/pages/store/product/detail?id=${item.product_id}`
315
-    })
316
-  }
317
-  // 京东
318
-  if (item.type === 6) {
319
-    // productParams.id = item.skuId
320
-    const productParams: Partial<IProductDetail> = {
321
-      platform: item.type,
322
-      id: item.skuId,
323
-      title: item.name,
324
-      featured: [item.thumb],
325
-      allowance: item.commission,
326
-      salePrice: item.lowestCouponPrice,
327
-      price: item.price,
328
-      coupon: {
329
-        amount: item.coupon_money[0].discount,
330
-        startTime: item.coupon_money[0].getStartTime,
331
-        endTime: item.coupon_money[0].getEndTime
332
-      },
333
-      spreadUrl: item.coupon_link
334
-    }
335
-    return navigateToDetail(encodeBase64(productParams))
336
-  }
337
-  // 淘宝
338
-  if (item.type === 5) {
339
-    const productParams: Partial<IProductDetail> = {
340
-      platform: item.type,
341
-      id: item.id,
342
-      title: item.name,
343
-      featured: [item.thumb],
344
-      allowance: item.commission,
345
-      salePrice: item.price,
346
-      // 原价
347
-      price: item.market_price,
348
-      coupon: {
349
-        amount: item.coupon_money
350
-        // amount: item.coupon_money[0].discount,
351
-        // startTime: item.coupon_money[0].getStartTime,
352
-        // endTime: item.coupon_money[0].getEndTime
353
-      },
354
-      spreadUrl: item.coupon_share_url
355
-    }
356
-
357
-    return navigateToDetail(encodeBase64(productParams))
358
-    // uni.navigateTo({
359
-    //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}`
360
-    // })
361
-  }
362
-
363
-  // 拼多多
364
-  if (item.type === 1) {
365
-    const productParams: Partial<IProductDetail> = {
366
-      platform: item.type,
367
-      id: item.id,
368
-      title: item.name,
369
-      featured: [item.thumb],
370
-      allowance: item.commission,
371
-      salePrice: item.price,
372
-      // 原价
373
-      price: item.market_price,
374
-      coupon: {
375
-        amount: item.coupon_money
376
-        // amount: item.coupon_money[0].discount,
377
-        // startTime: item.coupon_money[0].getStartTime,
378
-        // endTime: item.coupon_money[0].getEndTime
379
-      },
380
-      // spreadUrl: item.coupon_share_url
381
-    }
382
-    return navigateToDetail(encodeBase64(productParams))
383
-    // uni.navigateTo({
384
-    //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}&allowance=${item.commission}`
385
-    // })
386
-  }
387
-  // 唯品会
388
-  if (item.type === 2) {
389
-    const productParams: Partial<IProductDetail> = {
390
-      platform: item.type,
391
-      id: item.id,
392
-      title: item.name,
393
-      featured: [item.thumb],
394
-      allowance: item.commission,
395
-      salePrice: item.price,
396
-      // 原价
397
-      price: item.market_price,
398
-      // coupon: {
399
-        // amount: item.coupon_money
400
-      // },
401
-    }
402
-    return navigateToDetail(encodeBase64(productParams))
403
-  }
404
-
405
-  // 苏宁
406
-  if (item.type === 3) {
407
-    const productParams: Partial<IProductDetail> = {
408
-      platform: item.type,
409
-      id: item.id,
410
-      title: item.name,
411
-      featured: [item.thumb],
412
-      allowance: item.commission,
413
-      salePrice: item.price,
414
-      // 原价
415
-      price: item.market_price,
416
-      // coupon: {
417
-      //   amount: item.coupon_money
418
-      // },
419
-    }
420
-    return navigateToDetail(encodeBase64(productParams))
421
-  //
422
-  }
423
-
424
-  // 抖音 9
425
-  if (item.type === 9) {
426
-    console.log(item)
427
-    const productParams: Partial<IProductDetail> = {
428
-      platform: item.type,
429
-      id: item.id,
430
-      title: item.name,
431
-      featured: [item.thumb],
432
-      allowance: item.commission,
433
-      salePrice: item.price,
434
-      // 原价
435
-      price: item.market_price,
436
-      // coupon: {
437
-      //   amount: item.coupon_money
438
-      // },
439
-    }
440
-    return navigateToDetail(encodeBase64(productParams))
441
-  }
442
-}
443
-
444
-function handleLiveRecommendTitleClick() {
445
-  uni.navigateTo({
446
-    url: `/pages/store/product/dy-live`
447
-  })
448
-}
449
-
450
-// 下拉刷新被下拉
451
-const onRefresherPulling = e => {
452
-  state.triggered = true;
453
-};
454
-// 下拉刷新被复位
455
-const onRefresherRestore = e => {
456
-  state.triggered = false;
457
-};
458
-// 下拉刷新被中止
459
-const onRefresherAbort = e => {
460
-  state.triggered = false;
461
-}
462
-
463
-const onRefresherRefresh = e => {
464
-  loadProductList('reload')
465
-};
466
-
467
-function handleScrollToLower() {
468
-  state.status = 'loading';
469
-  state.currentPage += 1;
470
-  // if (state.currentPage > state.totalPage) {
471
-  //   state.status = 'noMore';
472
-  // } else {
473
-  //   // queryFavorites('page');
474
-  //   // loadSelectMerchant('page')
475
-  //   loadProductList(state.currentTab)
476
-  //
477
-  // }
478
-}
479
-</script>
480
-<template>
481
-
482
-    <div class="flex flex-col overflow-hidden fixed  h-fit z-1 bg-white">
483
-      <nut-searchbar
484
-          v-model="searchValue" @search="searchProduct" @clear="loadProductList('reload')">
485
-        <template v-slot:rightout>
486
-          <div @tap="searchProduct">
487
-            搜索
488
-          </div>
489
-        </template>
490
-      </nut-searchbar>
491
-      <div class="py-3">
492
-        <scroll-view
493
-            class="flex flex-row w-full gap-2 overflow-x whitespace-nowrap w-screen"
494
-            :scroll-with-animation="true"
495
-            :scroll-x="true"
496
-        >
497
-          <div
498
-              @tap="handleCategoryItemClick(item)"
499
-              v-for="(item, index) in tabList"
500
-              :key="index"
501
-              class="flex inline-flex pl-4 items-center justify-center relative "
502
-          >
503
-            <div class="flex flex-col justify-center items-center text-xs gap-2">
504
-              <image :src="item.id === state.currentTab ? item.selectedIconPath : item.iconPath" mode="widthFix"
505
-                     class="w-9 h-9"></image>
506
-              <div>{{ item.text }}</div>
507
-            </div>
508
-
509
-          </div>
510
-        </scroll-view>
511
-      </div>
512
-    </div>
513
-    <div class="pt-36 ">
514
-      <scroll-view
515
-          :scroll-y="true"
516
-          :style="{ height: `${state.scrollHeight}px` }"
517
-          scroll-with-animation
518
-          :refresher-enabled="true"
519
-          refresher-background="#f5f5f5"
520
-          refresher-default-style="black"
521
-          :refresher-triggered="state.triggered"
522
-          @scrolltolower="handleScrollToLower"
523
-          @refresherPulling="onRefresherPulling"
524
-          @refresherRestore="onRefresherRestore"
525
-          @refresherAbort="onRefresherAbort"
526
-          @refresherrefresh="onRefresherRefresh"
527
-
528
-      >
529
-      <div
530
-          v-if="state.currentTab === PLATFORM_NAME.DY"
531
-      >
532
-
533
-      <div
534
-          class="pb-4"
535
-      >
536
-        <CXBDyLiveRecommend :list="dyLiveList" v-if="dyLiveList" @title-click="handleLiveRecommendTitleClick"/>
537
-      </div>
538
-      <div class="flex justify-center items-center w-full pb-3">
539
-        <div class="flex justify-center items-center gap-2">
540
-          <image :src="dyLeftImage" mode="widthFix" class="w-12 h-2"></image>
541
-          <div class="font-bold">抖音好物</div>
542
-          <image :src="dyRightImage" mode="widthFix" class="w-12 h-2"></image>
543
-        </div>
544
-      </div>
545
-      </div>
546
-
547
-      <div class="px-3">
548
-        <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
549
-          <div v-for="(item, index) in list"
550
-               :key="index"
551
-               @tap="handleProductItemClick(item)"
552
-          >
553
-            <div class="bg-white rounded-lg text-dark">
554
-              <image :src="item.image"
555
-                     v-if="state.currentTab === PLATFORM_NAME.DC"
556
-                     mode="widthFix" :fade-in="true"
557
-                     class="rounded-t-lg  !w-full aspect-square" />
558
-              <image
559
-                  v-else
560
-                  :src="item.thumb"
561
-                  mode="widthFix" :fade-in="true"
562
-                  class="rounded-t-lg  !w-full aspect-square" />
563
-              <div class="text-sm p-2 flex flex-col gap-1">
564
-                <div class="line-clamp-2">
565
-                  <div v-if="state.currentTab === PLATFORM_NAME.DC">
566
-                    {{ item.store_name }}
567
-                  </div>
568
-                  <div v-else>
569
-                    {{ item.name }}
570
-                  </div>
571
-                </div>
572
-                <div
573
-                    class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
574
-                  <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
575
-                         mode="widthFix" class="!w-8.5"></image>
576
-                  <div class="px-2 flex items-center jusitify-center text-xs">
577
-                    <div>
578
-                      养老金 ¥{{ item.commission }}
579
-                    </div>
580
-                  </div>
581
-                </div>
582
-                <div class="flex flex-col justify-center gap-2">
583
-                  <div v-if="state.currentTab === PLATFORM_NAME.JD">
584
-                    <FPrice :price="item.lowestCouponPrice" ex-class="text-[20px]" need-symbol/>
585
-                    <FPrice :price="item.price" ex-class="text-gray text-xs" need-symbol strike-through/>
586
-                  </div>
587
-                  <div v-if="state.currentTab === PLATFORM_NAME.TB">
588
-                    <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
589
-                    <FPrice :price="item.market_price" ex-class="text-gray text-xs" need-symbol strike-through/>
590
-                  </div>
591
-
592
-                  <div v-if="state.currentTab === PLATFORM_NAME.PDD">
593
-                    <FPrice :price="item.market_price" ex-class="text-[20px]" need-symbol/>
594
-                    <FPrice :price="item.price" ex-class="text-gray text-xs" need-symbol strike-through/>
595
-                  </div>
596
-
597
-                  <div v-if="state.currentTab === PLATFORM_NAME.DC">
598
-
599
-                    <div class="flex flex-row gap-2">
600
-                      <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
601
-                      <div  class="bg-[#202020] text-[#FFDD99] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4">
602
-                        大仓
603
-                      </div>
604
-                    </div>
605
-
606
-                    <FPrice :price="item.ot_price" ex-class="text-gray text-xs" need-symbol strike-through/>
607
-
608
-
609
-                  </div>
610
-
611
-                  <div v-if="state.currentTab === PLATFORM_NAME.DY">
612
-                    <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
613
-                  </div>
614
-
615
-                  <div v-if="state.currentTab === PLATFORM_NAME.VIP">
616
-                    <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
617
-                    <FPrice :price="item.market_price" ex-class="text-gray text-xs" need-symbol strike-through/>
618
-                  </div>
619
-
620
-                  <div v-if="state.currentTab === PLATFORM_NAME.SU">
621
-                    <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
622
-                    <FPrice :price="item.market_price" ex-class="text-gray text-xs" need-symbol strike-through/>
623
-                  </div>
624
-<!--                  <div class="bg-[#202020] text-[#FFDD99] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4">-->
625
-
626
-
627
-<!--                  </div>-->
628
-
629
-                </div>
630
-              </div>
631
-
632
-            </div>
633
-          </div>
634
-        </grid-view>
635
-
636
-      </div>
637
-
638
-      </scroll-view>
639
-    </div>
640
-
641
-</template>
642
-
643
-<route lang="yaml">
644
-style:
645
-  navigationBarTitleText: 搜索
646
-  disableScroll: true
647
-</route>
648
-
649
-<style lang="scss">
650
-page {
651
-  //overflow: hidden;
652
-  //position: fixed;
653
-  background: #f8f8f8;
654
-}
655
-</style>

+ 0 - 859
src/pages/search/index.vue

@@ -1,859 +0,0 @@
1
-<script setup lang="ts">
2
-import {
3
-  getDyLiveList,
4
-  getDyProductList,
5
-  getJdProductList,
6
-  getPddProductList,
7
-  getSuProductList,
8
-  getTaobaoProductList,
9
-  getVipProductList,
10
-  searchDyProduct,
11
-  searchJdProduct,
12
-  searchPddProduct,
13
-  searchSuProduct,
14
-  searchVipProduct
15
-} from "~/apis/product";
16
-import type {
17
-  DyProductModel,
18
-  IProductDetail,
19
-  JdProductModel,
20
-  SuNingProductModel,
21
-  TaobaoProductThirdPartyWaresModel,
22
-  VipProductModel
23
-} from "~/apis/model/product.model";
24
-import {getDcProductList} from "~/apis/dacang";
25
-import type {DcProductModel} from "~/apis/model/dacang.model";
26
-import FPrice from "~/components/FPrice/FPrice.vue";
27
-import {encodeBase64} from "~/utils/http/helper";
28
-import CXBDyLiveRecommend from "~/components/CXBDyLive/CXBDyLiveRecommend.vue";
29
-import {PLATFORM_NAME} from "~/apis/model/common.model";
30
-import {CDN_URL} from "~/config/app";
31
-import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
32
-
33
-const dyLeftImage = CDN_URL + '/static/assets/dy_zuo_230321.png'
34
-const dyRightImage = CDN_URL + '/static/assets/dy_you_230321.png'
35
-
36
-interface TabItem {
37
-  id: PLATFORM_NAME,
38
-  text: string,
39
-  iconPath: string,
40
-  selectedIconPath: string
41
-}
42
-
43
-const tabList = <Array<TabItem>>[{
44
-  id: PLATFORM_NAME.JD,
45
-  text: '京东',
46
-  iconPath: CDN_URL + '/static/assets/jingdong_x.png',
47
-  selectedIconPath: CDN_URL + '/static/assets/jingdong_d.png',
48
-}, {
49
-  id: PLATFORM_NAME.TB,
50
-  text: '淘宝',
51
-  iconPath: CDN_URL + '/static/assets/taobaoyanglao_x.png',
52
-  selectedIconPath: CDN_URL + '/static/assets/taobaoyanglao_d.png',
53
-}, {
54
-  id: PLATFORM_NAME.PDD,
55
-  text: '拼多多',
56
-  iconPath: CDN_URL + '/static/assets/pinduoduo_x.png',
57
-  selectedIconPath: CDN_URL + '/static/assets/pinduoduo_d.png',
58
-}, {
59
-  id: PLATFORM_NAME.DC,
60
-  text: '大仓',
61
-  iconPath: CDN_URL + '/static/assets/dacang_x_220914.png',
62
-  selectedIconPath: CDN_URL + '/static/assets/dacang_d_220914.png',
63
-}, {
64
-  id: PLATFORM_NAME.DY,
65
-  text: '抖音',
66
-  iconPath: CDN_URL + '/static/assets/douyin_x_230313.png',
67
-  selectedIconPath: CDN_URL + '/static/assets/douyin_d_230313.png',
68
-}, {
69
-  id: PLATFORM_NAME.VIP,
70
-  text: '唯品会',
71
-  iconPath: CDN_URL + '/static/assets/weipinhui_x.png',
72
-  selectedIconPath: CDN_URL + '/static/assets/weipinhui_d.png',
73
-}, {
74
-  id: PLATFORM_NAME.SU,
75
-  text: '苏宁',
76
-  iconPath: CDN_URL + '/static/assets/suningyigou_x.png',
77
-  selectedIconPath: CDN_URL + '/static/assets/suningyigou_d.png',
78
-}]
79
-const state = reactive({
80
-  currentTab: PLATFORM_NAME.JD,
81
-  // 列表高度
82
-  scrollHeight: 0,
83
-  triggered: false,
84
-  status: 'none',
85
-  currentPage: 1,
86
-  totalPage: 1
87
-})
88
-const { windowHeight } = uni.getSystemInfoSync()
89
-state.scrollHeight = windowHeight - 195
90
-const searchValue = ref('')
91
-
92
-onLoad((options) => {
93
-  const platform = options.platform
94
-  if (platform) {
95
-    state.currentTab = platform
96
-  }
97
-  loadProductList('reload')
98
-
99
-})
100
-
101
-// onShow(() => {
102
-//
103
-// })
104
-const list = ref<Array<
105
-    JdProductModel
106
-    | DcProductModel
107
-    | DyProductModel
108
-    | SuNingProductModel
109
-    | TaobaoProductThirdPartyWaresModel
110
-    | VipProductModel
111
-    | any
112
->>()
113
-
114
-const dyLiveList = ref<Array<DyProductModel>>()
115
-
116
-function searchProduct() {
117
-  switch (state.currentTab) {
118
-    case PLATFORM_NAME.JD: {
119
-      searchJdProduct({keyword: searchValue.value, page: 1, limit: 20}).then(res => {
120
-        list.value = res
121
-      })
122
-      break;
123
-    }
124
-    case PLATFORM_NAME.DC: {
125
-      getDcProductList({
126
-        page: 1,
127
-        limit: 10,
128
-        classify: '',
129
-        keyword: searchValue.value
130
-      }).then(res => {
131
-        list.value = res
132
-      })
133
-      break;
134
-    }
135
-    case PLATFORM_NAME.DY: {
136
-      searchDyProduct({keyword: searchValue.value, page: 1, limit: 10}).then(res => {
137
-        list.value = res
138
-      })
139
-      break;
140
-    }
141
-    case PLATFORM_NAME.PDD: {
142
-      searchPddProduct({ keyword: searchValue.value, page: 1, limit: 10}).then(res => {
143
-		  
144
-		  
145
-		  console.log('11111111111')
146
-		  console.log(res)
147
-		  
148
-		  let pddData
149
-		  
150
-		  if (res.message.length > 20) {
151
-			  pddData = JSON.parse(res.message)
152
-		  }
153
-		  console.log('11111111112')
154
-		  
155
-		  console.log(pddData)
156
-		  
157
-		  if(pddData) {
158
-			  console.log('122222222')
159
-			modalVisible.value = true
160
-			pddPath.value = pddData.we_app_info.page_path
161
-			return
162
-		  }else {
163
-			  
164
-			  console.log('1222223333')
165
-			  console.log(res.data)
166
-			list.value = res.data
167
-		  }
168
-		  
169
-        if(res.data.we_app_info){
170
-          const pddWx = res.data.we_app_info
171
-          console.log(pddWx)
172
-          if (pddWx) {
173
-            uni.navigateToMiniProgram({
174
-              appId: pddWx.app_id,
175
-              path: pddWx.page_path,
176
-              envVersion: 'release',
177
-              success(res) {
178
-                // 打开成功
179
-              },
180
-              fail: (error) => {
181
-                console.log(error);
182
-              }
183
-            })
184
-          } else {
185
-            uni.showToast({
186
-              title: '跳转失败请重试',
187
-              icon: 'none'
188
-            })
189
-          }
190
-        }else{
191
-          list.value = res.data
192
-        }
193
-
194
-      })
195
-      break;
196
-    }
197
-    case PLATFORM_NAME.SU: {
198
-      searchSuProduct({ keyword: searchValue.value, page: 1, limit: 10}).then(res => {
199
-        list.value = res
200
-      })
201
-      break;
202
-    }
203
-    case PLATFORM_NAME.TB: {
204
-      getTaobaoProductList({
205
-        pageNum: `1`,
206
-        pageSize: '10',
207
-        title: searchValue.value
208
-      }).then(res => {
209
-        list.value = res.thirdPartyWaresList
210
-      })
211
-      break;
212
-    }
213
-    case PLATFORM_NAME.VIP: {
214
-      searchVipProduct({ keyword: searchValue.value, page: 1, limit: 10}).then(res => {
215
-        list.value = res
216
-      })
217
-      break;
218
-    }
219
-  }
220
-}
221
-function loadProductList(action: 'page' | 'reload', callback?: (items) => void) {
222
-  if (action == 'reload') {
223
-    state.currentPage = 1
224
-  }
225
-  switch (state.currentTab) {
226
-    case PLATFORM_NAME.JD: {
227
-      getJdProductList({
228
-        page: state.currentPage,
229
-        limit: 10
230
-      }).then(res => {
231
-        state.triggered = false
232
-
233
-        // list.value = res
234
-        if (action === 'page') {
235
-          list.value = list.value.concat(res)
236
-        }
237
-        if (action === 'reload') {
238
-          list.value = res
239
-        }
240
-        uni.hideLoading()
241
-
242
-        if (callback) {
243
-          callback(res)
244
-        }
245
-        // state.totalPage = Math.ceil()
246
-        // res[0].
247
-        // console.log(res)
248
-      }).catch(error => {
249
-        uni.showToast({
250
-          title: error,
251
-          icon: "none"
252
-        })
253
-      })
254
-      break;
255
-    }
256
-    case PLATFORM_NAME.DC: {
257
-      getDcProductList({
258
-        page: state.currentPage,
259
-        limit: 10,
260
-        classify: '',
261
-        keyword: ''
262
-      }).then(res => {
263
-        // list.value = res
264
-        state.triggered = false
265
-        if (action === 'page') {
266
-          list.value = list.value.concat(res)
267
-        }
268
-        if (action === 'reload') {
269
-          list.value = res
270
-        }
271
-        uni.hideLoading()
272
-
273
-        if (callback) {
274
-          callback(res)
275
-        }
276
-      })
277
-      break;
278
-    }
279
-    case PLATFORM_NAME.DY: {
280
-      // getDyLiveList({
281
-      //   page: state.currentPage,
282
-      //   limit: 4,
283
-      //   // keyword: ''
284
-      // }).then(res => {
285
-      //   // console.log(res)
286
-      //   // console.log(res.authorPic)
287
-      // })
288
-      getDyLiveList({page: 1,limit: 4})
289
-          .then(res => {
290
-            // console.log(res)
291
-            if (res) {
292
-              dyLiveList.value = res
293
-
294
-            }
295
-          })
296
-      getDyProductList({
297
-        page: state.currentPage,
298
-        limit: 10,
299
-      }).then(res => {
300
-        // list.value = res
301
-        state.triggered = false
302
-        if (action === 'page') {
303
-          list.value = list.value.concat(res)
304
-        }
305
-        if (action === 'reload') {
306
-          list.value = res
307
-        }
308
-        uni.hideLoading()
309
-
310
-        if (callback) {
311
-          callback(res)
312
-        }
313
-      })
314
-      break;
315
-    }
316
-    case PLATFORM_NAME.PDD: {
317
-
318
-      getPddProductList({
319
-        page: state.currentPage,
320
-        limit: 10
321
-      }).then(res => {
322
-        // list.value = res
323
-        if (action === 'page') {
324
-          list.value = list.value.concat(res)
325
-        }
326
-        if (action === 'reload') {
327
-          list.value = res
328
-        }
329
-        uni.hideLoading()
330
-
331
-        if (callback) {
332
-          callback(res)
333
-        }
334
-      })
335
-      break;
336
-    }
337
-    case PLATFORM_NAME.SU: {
338
-      getSuProductList({
339
-        page: state.currentPage,
340
-        limit: 10
341
-      }).then(res => {
342
-        // list.value = res
343
-        // console.log(res)
344
-        // state.triggered = false
345
-        if (action === 'page') {
346
-          list.value = list.value.concat(res)
347
-        }
348
-        if (action === 'reload') {
349
-          list.value = res
350
-        }
351
-        uni.hideLoading()
352
-
353
-        if (callback) {
354
-          callback(res)
355
-        }
356
-
357
-      })
358
-      break;
359
-    }
360
-    case PLATFORM_NAME.TB: {
361
-      getTaobaoProductList({
362
-        pageNum: `${state.currentPage}`,
363
-        pageSize: '10'
364
-      }).then(res => {
365
-        // list.value = res.thirdPartyWaresList
366
-        if (action === 'page') {
367
-          list.value = list.value.concat(res.thirdPartyWaresList)
368
-        }
369
-        if (action === 'reload') {
370
-          list.value = res.thirdPartyWaresList
371
-        }
372
-        uni.hideLoading()
373
-
374
-        if (callback) {
375
-          callback(res.thirdPartyWaresList)
376
-        }
377
-      })
378
-      break;
379
-    }
380
-    case PLATFORM_NAME.VIP: {
381
-      getVipProductList({
382
-        page: state.currentPage,
383
-        limit: 10
384
-      }).then(res => {
385
-        // list.value = res
386
-        // state.triggered = false
387
-        if (action === 'page') {
388
-          list.value = list.value.concat(res)
389
-        }
390
-        if (action === 'reload') {
391
-          list.value = res
392
-        }
393
-        uni.hideLoading()
394
-
395
-        if (callback) {
396
-          callback(res)
397
-        }
398
-
399
-      })
400
-      break;
401
-    }
402
-    // default: {
403
-    //   getJdProductList({
404
-    //     page: 1,
405
-    //     limit: 10
406
-    //   }).then(res => {
407
-    //     list.value = res
408
-    //   })
409
-    // }
410
-  }
411
-
412
-
413
-}
414
-
415
-function handleCategoryItemClick(item: TabItem) {
416
-  list.value = []
417
-  state.currentTab = item.id
418
-  // loadProductList(item.id)
419
-  uni.showLoading({
420
-    title: '数据加载中',
421
-    icon: 'none'
422
-  })
423
-  loadProductList('reload')
424
-}
425
-
426
-function handleProductItemClick(
427
-    item:
428
-        JdProductModel
429
-        & DcProductModel
430
-        & DyProductModel
431
-        & SuNingProductModel
432
-        & TaobaoProductThirdPartyWaresModel
433
-        & VipProductModel
434
-) {
435
-console.log(5);
436
-console.log("5");
437
-
438
-console.log(item.type);
439
-console.log(state.currentTab);
440
-
441
-  function navigateToDetail(params) {
442
-    let otherDetailUrl = `/pages/store/product/other`
443
-    return uni.navigateTo({
444
-      url: `${otherDetailUrl}?params=${params}`
445
-    })
446
-  }
447
-  
448
-  let itemType = 0
449
-  if (typeof item.type === 'string') {
450
-	  itemType = parseInt(item.type)
451
-  } else {
452
-	  itemType = item.type
453
-  }
454
-  
455
-  // 大仓
456
-  if (state.currentTab === PLATFORM_NAME.DC && itemType === 5) {
457
-	  
458
-	  console.log('进来了', state.currentTab);
459
-	  
460
-    uni.navigateTo({
461
-      url: `/pages/store/product/detail?id=${item.product_id}`
462
-    })
463
-  }
464
-  
465
-  // 京东
466
-  if (item.type === 6) {
467
-    // productParams.id = item.skuId
468
-    const productParams: Partial<IProductDetail> = {
469
-      platform: item.type,
470
-      id: item.skuId,
471
-      title: item.name,
472
-      featured: [item.thumb],
473
-      allowance: item.commission,
474
-      salePrice: item.lowestCouponPrice,
475
-      price: item.price,
476
-      coupon: {
477
-        amount: item.coupon_money[0].discount,
478
-        startTime: item.coupon_money[0].getStartTime,
479
-        endTime: item.coupon_money[0].getEndTime
480
-      },
481
-      spreadUrl: item.coupon_link
482
-    }
483
-    return navigateToDetail(encodeBase64(productParams))
484
-  }
485
-  // 淘宝PLATFORM_NAME.TB
486
-  if ( state.currentTab === PLATFORM_NAME.TB && item.type === 5) {
487
-    const productParams: Partial<IProductDetail> = {
488
-      platform: item.type,
489
-      id: item.id,
490
-      title: item.name,
491
-      featured: [item.thumb],
492
-      allowance: item.commission,
493
-      salePrice: item.price,
494
-      // 原价
495
-      price: item.market_price,
496
-      coupon: {
497
-        amount: item.coupon_money
498
-        // amount: item.coupon_money[0].discount,
499
-        // startTime: item.coupon_money[0].getStartTime,
500
-        // endTime: item.coupon_money[0].getEndTime
501
-      },
502
-      spreadUrl: item.coupon_share_url
503
-    }
504
-
505
-    return navigateToDetail(encodeBase64(productParams))
506
-    // uni.navigateTo({
507
-    //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}`
508
-    // })
509
-  }
510
-
511
-  // 拼多多
512
-  if (item.type == 1) {
513
-    const productParams: Partial<IProductDetail> = {
514
-      platform: item.type,
515
-      id: item.id,
516
-      title: item.name,
517
-      featured: [item.thumb],
518
-      allowance: item.commission,
519
-      salePrice: item.market_price,
520
-      // 原价
521
-      price: item.price,
522
-      coupon: {
523
-        amount: item.coupon_money
524
-        // amount: item.coupon_money[0].discount,
525
-        // startTime: item.coupon_money[0].getStartTime,
526
-        // endTime: item.coupon_money[0].getEndTime
527
-      },
528
-      // spreadUrl: item.coupon_share_url
529
-    }
530
-    return navigateToDetail(encodeBase64(productParams))
531
-    // uni.navigateTo({
532
-    //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}&allowance=${item.commission}`
533
-    // })
534
-  }
535
-  // 唯品会
536
-  if (item.type === 2) {
537
-    const productParams: Partial<IProductDetail> = {
538
-      platform: item.type,
539
-      id: item.id,
540
-      title: item.name,
541
-      featured: [item.thumb],
542
-      allowance: item.commission,
543
-      salePrice: item.price,
544
-      // 原价
545
-      price: item.market_price,
546
-      // coupon: {
547
-        // amount: item.coupon_money
548
-      // },
549
-    }
550
-    return navigateToDetail(encodeBase64(productParams))
551
-  }
552
-
553
-  // 苏宁
554
-  if (item.type === 3) {
555
-    const productParams: Partial<IProductDetail> = {
556
-      platform: item.type,
557
-      id: item.id,
558
-      title: item.name,
559
-      featured: [item.thumb],
560
-      allowance: item.commission,
561
-      salePrice: item.price,
562
-      // 原价
563
-      price: item.market_price,
564
-      // coupon: {
565
-      //   amount: item.coupon_money
566
-      // },
567
-    }
568
-    return navigateToDetail(encodeBase64(productParams))
569
-  //
570
-  }
571
-
572
-  // 抖音 9
573
-  if (item.type === 9) {
574
-    console.log(item)
575
-    const productParams: Partial<IProductDetail> = {
576
-      platform: item.type,
577
-      id: item.id,
578
-      title: item.name,
579
-      featured: [item.thumb],
580
-      allowance: item.commission,
581
-      salePrice: item.price,
582
-      // 原价
583
-      price: item.price,
584
-      // coupon: {
585
-      //   amount: item.coupon_money
586
-      // },
587
-    }
588
-    return navigateToDetail(encodeBase64(productParams))
589
-  }
590
-}
591
-
592
-function handleLiveRecommendTitleClick() {
593
-  uni.navigateTo({
594
-    url: `/pages/store/product/dy-live`
595
-  })
596
-}
597
-
598
-// 下拉刷新被下拉
599
-const onRefresherPulling = e => {
600
-  state.triggered = true;
601
-};
602
-// 下拉刷新被复位
603
-const onRefresherRestore = e => {
604
-  state.triggered = false;
605
-};
606
-// 下拉刷新被中止
607
-const onRefresherAbort = e => {
608
-  state.triggered = false;
609
-}
610
-
611
-const onRefresherRefresh = e => {
612
-  loadProductList('reload')
613
-};
614
-onPullDownRefresh(() => {
615
-  uni.showLoading({
616
-    title: '数据加载中',
617
-    icon: 'none'
618
-  })
619
-  loadProductList('reload', items => {
620
-    setTimeout(() => {
621
-      uni.stopPullDownRefresh()
622
-      uni.hideLoading()
623
-    }, 300)
624
-  })
625
-})
626
-function handleScrollToLower() {
627
-  uni.showLoading({
628
-    title: '数据加载中',
629
-    icon: 'none'
630
-  })
631
-
632
-  state.status = 'loading';
633
-  state.currentPage += 1;
634
-
635
-  setTimeout(() => {
636
-    loadProductList('page', (items) => {
637
-      uni.hideLoading()
638
-      // uni.hideLoading()
639
-      if (!items.length > 0) {
640
-        console.log('没有更多了')
641
-        state.status = 'noMore'
642
-        state.currentPage -= 1;
643
-      }
644
-    })
645
-  }, 300)
646
-
647
-}
648
-
649
-onReachBottom(() => {
650
-  handleScrollToLower()
651
-})
652
-
653
-const modalVisible = ref(false)
654
-const pddPath = ref('')
655
-
656
-function onCancel() {
657
-  modalVisible.value = false
658
-}
659
-
660
-function onOk() {
661
-	uni.navigateToMiniProgram({
662
-	  appId: 'wxa918198f16869201',
663
-	  path: pddPath.value,
664
-	  envVersion: 'release',
665
-	  success(res) {
666
-	    // 打开成功
667
-	    // console.log(res);
668
-	  },
669
-	  fail: (error) => {
670
-	    console.log(error);
671
-	  }
672
-	})
673
-}
674
-
675
-
676
-</script>
677
-<template>
678
-
679
-    <div class="flex flex-col  fixed  top-0 left-0  h-fit z-1 bg-white">
680
-      <nut-searchbar
681
-          v-model="searchValue" @search="searchProduct" @clear="loadProductList('reload')">
682
-        <template v-slot:rightout>
683
-          <div @tap="searchProduct">
684
-            搜索
685
-          </div>
686
-        </template>
687
-      </nut-searchbar>
688
-      <div class="py-3">
689
-        <scroll-view
690
-            class="flex flex-row w-full gap-2 overflow-x whitespace-nowrap w-screen"
691
-            :scroll-with-animation="true"
692
-            :scroll-x="true"
693
-        >
694
-          <div
695
-              @tap="handleCategoryItemClick(item)"
696
-              v-for="(item, index) in tabList"
697
-              :key="index"
698
-              class="flex inline-flex pl-4 items-center justify-center relative "
699
-          >
700
-            <div class="flex flex-col justify-center items-center text-xs gap-2">
701
-              <image :src="item.id === state.currentTab ? item.selectedIconPath : item.iconPath" mode="widthFix"
702
-                     class="w-9 h-9"></image>
703
-              <div>{{ item.text }}</div>
704
-            </div>
705
-
706
-          </div>
707
-        </scroll-view>
708
-      </div>
709
-    </div>
710
-    <div class="pt-36 pb-safe " v-if="list && list.length > 0">
711
-
712
-      <div
713
-          v-if="state.currentTab === PLATFORM_NAME.DY"
714
-      >
715
-
716
-      <div
717
-          class="pb-4"
718
-      >
719
-        <CXBDyLiveRecommend :list="dyLiveList" v-if="dyLiveList" @title-click="handleLiveRecommendTitleClick"/>
720
-      </div>
721
-      <div class="flex justify-center items-center w-full pb-3">
722
-        <div class="flex justify-center items-center gap-2">
723
-          <image :src="dyLeftImage" mode="widthFix" class="w-12 h-2"></image>
724
-          <div class="font-bold">抖音好物</div>
725
-          <image :src="dyRightImage" mode="widthFix" class="w-12 h-2"></image>
726
-        </div>
727
-      </div>
728
-      </div>
729
-
730
-      <div class="px-3" >
731
-        <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
732
-          <div v-for="(item, index) in list"
733
-               :key="index"
734
-               @click="handleProductItemClick(item)"
735
-          >
736
-            <div class="bg-white rounded-lg text-dark">
737
-              <image :src="item.image"
738
-                     v-if="state.currentTab === PLATFORM_NAME.DC"
739
-                     mode="widthFix" :fade-in="true"
740
-                     class="rounded-t-lg  !w-full aspect-square" />
741
-              <image
742
-                  v-else
743
-                  :src="item.thumb"
744
-                  mode="widthFix" :fade-in="true"
745
-                  class="rounded-t-lg  !w-full aspect-square" />
746
-              <div class="text-sm p-2 flex flex-col gap-1">
747
-                <div class="line-clamp-2">
748
-                  <div v-if="state.currentTab === PLATFORM_NAME.DC">
749
-                    {{ item.store_name }}
750
-                  </div>
751
-                  <div v-else>
752
-                    {{ item.name }}
753
-                  </div>
754
-                </div>
755
-                <div
756
-                    class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
757
-                  <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
758
-                         mode="widthFix" class="!w-8.5"></image>
759
-                  <div class="px-2 flex items-center jusitify-center text-xs">
760
-                    <div>
761
-                      养老金 ¥{{ state.currentTab === PLATFORM_NAME.DC ? item.yanglao : item.commission }}
762
-                    </div>
763
-                  </div>
764
-                </div>
765
-                <div class="flex flex-col justify-center gap-2">
766
-                  <div v-if="state.currentTab === PLATFORM_NAME.JD">
767
-                    <FPrice :price="item.lowestCouponPrice" ex-class="text-[20px]" need-symbol/>
768
-                    <FPrice :price="item.price" ex-class="text-gray text-xs" need-symbol strike-through/>
769
-                  </div>
770
-                  <div v-if="state.currentTab === PLATFORM_NAME.TB">
771
-                    <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
772
-                    <FPrice :price="item.market_price" ex-class="text-gray text-xs" need-symbol strike-through/>
773
-                  </div>
774
-
775
-                  <div v-if="state.currentTab === PLATFORM_NAME.PDD">
776
-                    <FPrice :price="item.market_price" ex-class="text-[20px]" need-symbol/>
777
-                    <FPrice :price="item.price" ex-class="text-gray text-xs" need-symbol strike-through/>
778
-                  </div>
779
-
780
-                  <div v-if="state.currentTab === PLATFORM_NAME.DC">
781
-
782
-                    <div class="flex flex-row gap-2">
783
-                      <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
784
-                      <div  class="bg-[#202020] text-[#FFDD99] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4">
785
-                        大仓
786
-                      </div>
787
-                    </div>
788
-
789
-                    <FPrice :price="item.ot_price" ex-class="text-gray text-xs" need-symbol strike-through/>
790
-
791
-
792
-                  </div>
793
-
794
-                  <div v-if="state.currentTab === PLATFORM_NAME.DY">
795
-                    <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
796
-                  </div>
797
-
798
-                  <div v-if="state.currentTab === PLATFORM_NAME.VIP">
799
-                    <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
800
-                    <FPrice :price="item.market_price" ex-class="text-gray text-xs" need-symbol strike-through/>
801
-                  </div>
802
-
803
-                  <div v-if="state.currentTab === PLATFORM_NAME.SU">
804
-                    <FPrice :price="item.price" ex-class="text-[20px]" need-symbol/>
805
-                    <FPrice :price="item.market_price" ex-class="text-gray text-xs" need-symbol strike-through/>
806
-                  </div>
807
-<!--                  <div class="bg-[#202020] text-[#FFDD99] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4">-->
808
-
809
-
810
-<!--                  </div>-->
811
-
812
-                </div>
813
-              </div>
814
-
815
-            </div>
816
-          </div>
817
-        </grid-view>
818
-        <div class=" flex justify-center items-center text-[12px] text-gray-500"
819
-             v-if="list && list.length > 0">
820
-          <div v-if="state.status === 'loading'">
821
-            加载中...
822
-          </div>
823
-          <div v-if="state.status === 'noMore'">
824
-            没有更多了~
825
-          </div>
826
-        </div>
827
-      </div>
828
-
829
-		
830
-		
831
-    </div>
832
-	
833
-	<div class="pt-36 flex flex-col justify-center items-center" v-else>
834
-		<CXBEmpty ></CXBEmpty>
835
-	</div>
836
-  
837
-	<nut-dialog
838
-		title="需要去拼多多授权"
839
-		v-model:visible="modalVisible"
840
-		@cancel="onCancel"
841
-		@ok="onOk"
842
-	/>
843
-  
844
-
845
-</template>
846
-
847
-<route lang="yaml">
848
-style:
849
-  navigationBarTitleText: 搜索
850
-  enablePullDownRefresh: true
851
-</route>
852
-
853
-<style lang="scss">
854
-page {
855
-  //overflow: hidden;
856
-  //position: fixed;
857
-  background: #f8f8f8;
858
-}
859
-</style>

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

@@ -7,10 +7,10 @@ import {reLogin} from "~/apis/user";
7
 const modalVisible = ref(false)
7
 const modalVisible = ref(false)
8
 const list = [{
8
 const list = [{
9
   title: '反馈回复',
9
   title: '反馈回复',
10
-  url: '/pages/feedback/index'
10
+  url: '/subPages/pages/feedback/index'
11
 }, {
11
 }, {
12
   title: '关于我们',
12
   title: '关于我们',
13
-  url: '/pages/user/about/index'
13
+  url: '/subPages/pages/user/about/index'
14
 }, {
14
 }, {
15
   title: '版本更新',
15
   title: '版本更新',
16
   url: '/pages/version-update/index'
16
   url: '/pages/version-update/index'

+ 1 - 1
src/pages/store/home/components/MerchantProductList.vue

@@ -15,7 +15,7 @@ const props = defineProps({
15
 
15
 
16
 function handleItemClick (item) {
16
 function handleItemClick (item) {
17
   uni.navigateTo({
17
   uni.navigateTo({
18
-    url: `/pages/store/product/detail?id=${item.product_id}`
18
+    url: `/subPages/pages/store/product/detail?id=${item.product_id}`
19
   })
19
   })
20
 }
20
 }
21
 </script>
21
 </script>

+ 1 - 1
src/pages/store/nearby/index-bak.vue

@@ -128,7 +128,7 @@ function loadSelectMerchant(action: 'page' | 'reload', callback?: (items) => voi
128
 function handleShowMerchant(merchant) {
128
 function handleShowMerchant(merchant) {
129
   console.log(merchant)
129
   console.log(merchant)
130
   uni.navigateTo({
130
   uni.navigateTo({
131
-    url: '/pages/store/home/index?id=' + merchant.mer_id
131
+    url: '/subPages/pages/store/home/index?id=' + merchant.mer_id
132
   })
132
   })
133
 }
133
 }
134
 
134
 

+ 4 - 13
src/pages/store/nearby/index.vue

@@ -6,7 +6,7 @@ import { USER_LATITUDE, USER_LONGITUDE } from '~/constants'
6
 import { getLocal, getProductShare } from '~/apis/common'
6
 import { getLocal, getProductShare } from '~/apis/common'
7
 import { useUserStore } from '~/stores/userStore'
7
 import { useUserStore } from '~/stores/userStore'
8
 import Cache from '~/utils/cache'
8
 import Cache from '~/utils/cache'
9
-
9
+import { ICON_CDN_URL } from '~/config/app'
10
 const usePageStore = usePageStoreWidthOut()
10
 const usePageStore = usePageStoreWidthOut()
11
 const userStore = useUserStore()
11
 const userStore = useUserStore()
12
 
12
 
@@ -56,28 +56,19 @@ const { windowHeight } = uni.getSystemInfoSync()
56
 state.scrollHeight = windowHeight - 45
56
 state.scrollHeight = windowHeight - 45
57
 
57
 
58
 onLoad(async (option) => {
58
 onLoad(async (option) => {
59
-  console.log('11', uni.getSystemInfoSync())
60
-  console.log('12', state.scrollHeight)
61
-
62
   await getLocal()
59
   await getLocal()
63
   if (option && option.shareId)
60
   if (option && option.shareId)
64
     userStore.setShareId(option.shareId)
61
     userStore.setShareId(option.shareId)
65
-
66
-  // getMerchantCategory()
67
   getSelectMerchantSort().then((res) => {
62
   getSelectMerchantSort().then((res) => {
68
     state.merchantCategory = res.merchantCategory
63
     state.merchantCategory = res.merchantCategory
69
-    // state.merchantCategory = state.merchantCategory.concat(res.merchantCategory)
70
   })
64
   })
71
   loadAll()
65
   loadAll()
72
   getProductShare().then((res) => {
66
   getProductShare().then((res) => {
73
     if (res)
67
     if (res)
74
       userStore.setShareId(res.share_id)
68
       userStore.setShareId(res.share_id)
75
   }).catch((message) => {
69
   }).catch((message) => {
76
-    // console.log(message)
77
   })
70
   })
78
   userStore.setRedirectPage('/pages/store/nearby/index', 'tab')
71
   userStore.setRedirectPage('/pages/store/nearby/index', 'tab')
79
-
80
-  // loadSelectMerchant('reload')
81
 })
72
 })
82
 onShareAppMessage(() => {
73
 onShareAppMessage(() => {
83
   const shareId = Cache.get('SHARE_ID')
74
   const shareId = Cache.get('SHARE_ID')
@@ -219,7 +210,7 @@ function loadSelectMerchant(action: 'page' | 'reload', callback?: (items) => voi
219
 function handleShowMerchant(merchant) {
210
 function handleShowMerchant(merchant) {
220
   // console.log(merchant)
211
   // console.log(merchant)
221
   uni.navigateTo({
212
   uni.navigateTo({
222
-    url: `/pages/store/home/index?id=${merchant.mer_id}`,
213
+    url: `/subPages/pages/store/home/index?id=${merchant.mer_id}`,
223
   })
214
   })
224
 }
215
 }
225
 
216
 
@@ -336,7 +327,7 @@ function searchAction() {
336
       </div>
327
       </div>
337
       <!-- 返回顶部 -->
328
       <!-- 返回顶部 -->
338
       <div v-show="flag" class="back-top">
329
       <div v-show="flag" class="back-top">
339
-        <img class="back-TopImg" src="../../static/icon/返回顶部@2x.png" alt="" @click="scrollToTop">
330
+        <img class="back-TopImg" :src="ICON_CDN_URL+'返回顶部@2x.png'" alt="" @click="scrollToTop">
340
       </div>
331
       </div>
341
       <scroll-view
332
       <scroll-view
342
         v-if="state.merchantList && state.merchantList.length > 0" :scroll-y="true" :style="{ height: `${state.scrollHeight - 60}px` }"
333
         v-if="state.merchantList && state.merchantList.length > 0" :scroll-y="true" :style="{ height: `${state.scrollHeight - 60}px` }"
@@ -349,7 +340,7 @@ function searchAction() {
349
         <div v-for="(item, index) in state.merchantList" :key="index" class="mb-3 " @click="handleShowMerchant(item)">
340
         <div v-for="(item, index) in state.merchantList" :key="index" class="mb-3 " @click="handleShowMerchant(item)">
350
           <div class="flex">
341
           <div class="flex">
351
             <div class="flex ">
342
             <div class="flex ">
352
-              <image :src="item.mer_avatar" mode="aspectFill" class="w-20 h-20 rounded-lg" />
343
+              <image :src="item.mer_avatar" mode="aspectFill" class="w-14 h-14 rounded-lg" />
353
             </div>
344
             </div>
354
 
345
 
355
             <div class="flex flex-col justify-between px-2">
346
             <div class="flex flex-col justify-between px-2">

Datei-Diff unterdrückt, da er zu groß ist
+ 768 - 736
src/pages/user/index.vue


+ 2 - 26
src/pages/vip/index.vue

@@ -1,15 +1,9 @@
1
 <template>
1
 <template>
2
-  <!--  <CXBBasePage :show="true" title="">-->
3
 
2
 
4
   <div class="flex flex-col gap-3 ">
3
   <div class="flex flex-col gap-3 ">
5
     <div style="height: 80rpx;">
4
     <div style="height: 80rpx;">
6
       <div style="background-color: transparent  " class="overflow-hidden fixed top-0 w-full z-10">
5
       <div style="background-color: transparent  " class="overflow-hidden fixed top-0 w-full z-10">
7
         <nut-searchbar v-model="state.keyword" @search="searchkwd" @clear="clearSearch">
6
         <nut-searchbar v-model="state.keyword" @search="searchkwd" @clear="clearSearch">
8
-          <!--      <template v-slot:leftout>-->
9
-          <!--        <div @tap="navBack">-->
10
-          <!--          <nut-icon name="left"></nut-icon>-->
11
-          <!--        </div>-->
12
-          <!--      </template>-->
13
           <template v-slot:rightout>
7
           <template v-slot:rightout>
14
             <div @tap="searchkwd">
8
             <div @tap="searchkwd">
15
               搜索
9
               搜索
@@ -20,8 +14,6 @@
20
     </div>
14
     </div>
21
 
15
 
22
 
16
 
23
-    <!--      <image :src="homeBanner" mode="widthFix" class="h-10 w-full "></image>-->
24
-
25
     <div class="w-screen h-32">
17
     <div class="w-screen h-32">
26
       <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
18
       <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
27
       <div class="px-3 h-32">
19
       <div class="px-3 h-32">
@@ -272,28 +264,12 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
272
     })
264
     })
273
 
265
 
274
   }
266
   }
275
-  // getVipAreaList({
276
-  //   ...params
277
-  // }).then(res => {
278
-  //   console.log(res.count)
279
-  //   // console.log(res.list)
280
-  //   count.value = res.count
281
-  //   console.log(action);
282
-  //   if (action === 'page') {
283
-  //     list.value = list.value.concat(res.list)
284
-  //   }
285
-  //   if (action === 'reload') {
286
-  //     list.value = res.list
287
-  //   }
288
-  //   if (callback) {
289
-  //     callback(res)
290
-  //   }
291
-  // })
267
+ 
292
 }
268
 }
293
 
269
 
294
 function handleItemClick(item) {
270
 function handleItemClick(item) {
295
   uni.navigateTo({
271
   uni.navigateTo({
296
-    url: `/pages/store/product/detail?id=${item.product_id}`
272
+    url: `/subPages/pages/store/product/detail?id=${item.product_id}`
297
   })
273
   })
298
 }
274
 }
299
 
275
 

+ 0 - 76
src/pages/withdrawal-record/index.vue

@@ -1,76 +0,0 @@
1
-<script setup lang="ts">
2
-import {getWithdrawal} from "~/apis/user";
3
-import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
4
-import dayjs from "dayjs";
5
-import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
6
-const list = ref([])
7
-onLoad((option) => {
8
-  getWithdrawal({
9
-    type: 1
10
-  }).then(res => {
11
-    console.log('提现记录')
12
-    console.log(res)
13
-    list.value = res
14
-  })
15
-})
16
-</script>
17
-<template>
18
-  <CXBBasePage>
19
-    <!-- <div v-if="list.length > 0" class="flex flex-col gap-3  p-3">
20
-      <div v-for="(item, index) in list" :key="index" class="flex-1 text-xs f-hairline-bottom bg-white p-3">
21
-        <div class="flex justify-between">
22
-          <div>
23
-            <div>提现至{{ item.widthdrawal_type === '1' ? '微信' : '支付宝' }}</div>
24
-            <div class="text-gray text-[11px]">{{ dayjs(item.create_time).format('YYYY-MM-DD') }}</div>
25
-          </div>
26
-          <div>
27
-            <div>-{{ item.extract_price }}</div>
28
-            <div class="text-[11px]"
29
-                 :class="item.status === '0' ? 'text-primary' : 'text-gray'"
30
-            >{{ item.status === '-1' ? '已失败' : item.status === '0' ? '提现中' : item.status === '1'? '已到账' : ''}}</div>
31
-          </div>
32
-        </div>
33
-
34
-
35
-      </div>
36
-    </div> -->
37
-    <!-- 提现日期添加时分秒  -->
38
-    <div v-if="list.length > 0" class="flex flex-col gap-3  p-3">
39
-      <div v-for="(item, index) in list" :key="index" class="flex-1 text-xs f-hairline-bottom bg-white p-3">
40
-        <div class="flex justify-between">
41
-          <div>
42
-            <div>{{item.title}}</div>
43
-            <div class="text-gray text-[11px]">{{ dayjs(item.create_time).format('YYYY-MM-DD HH:mm:ss') }}</div>
44
-          </div>
45
-          <div>
46
-            <div>-{{ item.extract_price }}</div>
47
-            <div class="text-[11px]"
48
-                 :class="item.status === '0' ? 'text-primary' : 'text-gray'"
49
-            >{{ item.status === '-1' ? '已失败' : item.status === '0' ? '提现中' : item.status === '1'? '已到账' : ''}}</div>
50
-          </div>
51
-        </div>
52
-
53
-
54
-      </div>
55
-    </div>
56
-    <div v-else>
57
-      <CXBEmpty />
58
-    </div>
59
-  </CXBBasePage>
60
-</template>
61
-
62
-<style>
63
-page {
64
-  background: #f8f8f8;
65
-}
66
-.wx-radio-input {
67
-  height: 16px !important;
68
-  width: 16px !important;
69
-}
70
-</style>
71
-<route lang="yaml">
72
-style:
73
-  navigationBarTitleText: 提现记录
74
-  enablePullDownRefresh: false
75
-
76
-</route>

+ 0 - 11
src/pages/zibuyangsheng/index.vue

@@ -1,11 +0,0 @@
1
-<script setup lang="ts">
2
-
3
-</script>
4
-<template>
5
-
6
-</template>
7
-
8
-<route lang="yaml">
9
-style:
10
-  navigationBarTitleText: 滋补保健
11
-</route>

BIN
src/static/icon/bangfu.png


BIN
src/static/icon/douyin_x_230313.png


BIN
src/static/icon/home_suningyigou_220920.png


BIN
src/static/icon/home_xianshimiaosha_220614.png


BIN
src/static/icon/icon_9_9by.png


BIN
src/static/icon/icon_aljk.png


BIN
src/static/icon/icon_bgy.png


BIN
src/static/icon/icon_bsk.png


BIN
src/static/icon/icon_cjyx.png


BIN
src/static/icon/icon_czjb.png


BIN
src/static/icon/icon_dd.png


BIN
src/static/icon/icon_djfw.png


BIN
src/static/icon/icon_dks.png


BIN
src/static/icon/icon_elm.png


BIN
src/static/icon/icon_fg.png


BIN
src/static/icon/icon_flqd.png


BIN
src/static/icon/icon_fz.png


BIN
src/static/icon/icon_hbw.png


BIN
src/static/icon/icon_hls.png


BIN
src/static/icon/icon_jcsh.png


BIN
src/static/icon/icon_jd.png


BIN
src/static/icon/icon_jdsx.png


BIN
src/static/icon/icon_jhs.png


BIN
src/static/icon/icon_jkd.png


BIN
src/static/icon/icon_jzfw.png


BIN
src/static/icon/icon_kdkf.png


BIN
src/static/icon/icon_kfc.png


BIN
src/static/icon/icon_klhg.png


BIN
src/static/icon/icon_ks.png


BIN
src/static/icon/icon_lxmp.png


BIN
src/static/icon/icon_mc.png


BIN
src/static/icon/icon_mdl.png


BIN
src/static/icon/icon_mtjd.png


BIN
src/static/icon/icon_mtwm.png


BIN
src/static/icon/icon_nxc.png


BIN
src/static/icon/icon_pdd.png


BIN
src/static/icon/icon_pv.png


+ 0 - 0
src/static/icon/icon_qiang.png


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.