Browse Source

fix:提交代码,修改测试反馈问题

longzhicheng 1 year ago
parent
commit
da928d0447

+ 25 - 4
src/pages/dacang/list/index.vue

@@ -94,11 +94,32 @@
94 94
 		if (option && option.shareId) {
95 95
 			userStore.setShareId(option.shareId)
96 96
 		}
97
-		getClassity()
98
-		getBanner()
99
-		getProduct()
100
-		getProductShareInfo()
97
+		
98
+	})
99
+	
100
+	
101
+	
102
+	onShow(() => {
103
+		if (uni.getStorageSync('UID')) {
104
+			getClassity()
105
+			getBanner()
106
+			getProduct()
107
+			getProductShareInfo()
108
+		} else {
109
+			pageStore.setPageConfig({
110
+				currentPage: {
111
+					type: 'tab',
112
+					url: '/pages/home/index'
113
+				}
114
+			})
115
+			return uni.redirectTo({
116
+				url: '/pages/user/login/index'
117
+			})
118
+		}
119
+	
101 120
 	})
121
+	
122
+	
102 123
 
103 124
 	function getProductShareInfo() {
104 125
 		getProductShare().then(res => {

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

@@ -175,6 +175,7 @@
175 175
 	}
176 176
 	function getUserToken() {
177 177
 		apiGetUserToken().then(res => {
178
+			console.log("===apiGetUserToken",res);
178 179
 			userTokenInfo.value = res
179 180
 		})
180 181
 	}
@@ -191,6 +192,7 @@
191 192
 	}) {
192 193
 		if (uni.getStorageSync('UID')) {
193 194
 			let _token = userTokenInfo.value
195
+			
194 196
 			console.log("===_token", _token);
195 197
 			if (item.text === '店铺管理') {
196 198
 				let params=

+ 7 - 22
src/subPages/pages/quick-fuc/business.vue

@@ -109,23 +109,7 @@
109 109
 		}).catch(message => {})
110 110
 	})
111 111
 
112
-	// onShareAppMessage(() => {
113
-	// 	const shareId = Cache.get('SHARE_ID')
114
-	// 	return {
115
-	// 		title: SHARE_TITLE,
116
-	// 		path: `/pages/vip/index?shareId=${shareId}`,
117
-	// 		imageUrl: SHARE_BANNER
118
-	// 	}
119
-	// })
120
-
121
-	// onShareTimeline(() => {
122
-	// 	const shareId = Cache.get('SHARE_ID')
123
-	// 	return {
124
-	// 		title: SHARE_TITLE,
125
-	// 		query: `from=share&shareId=${shareId}`,
126
-	// 		imageUrl: SHARE_ICON
127
-	// 	}
128
-	// })
112
+	
129 113
 
130 114
 	onReachBottom(() => {
131 115
 		console.log('到底了。。。')
@@ -284,24 +268,25 @@
284 268
 			display: flex;
285 269
 			margin-left: 10rpx;
286 270
 			margin-right: 10rpx;
287
-			width: 300rpx;
271
+			width: 226rpx;
288 272
 			align-items: center;
289 273
 			flex-direction: column;
290 274
 			background-color: #fff;
291 275
 			border-radius: 20rpx;
292 276
 
293 277
 			.goods-img {
294
-				width: 300rpx;
295
-				height: 320rpx;
278
+				width: 226rpx;
279
+				height: 280rpx;
296 280
 				border-top-right-radius: 20rpx;
297 281
 				border-top-left-radius: 20rpx;
298 282
 				background-color: #999;
299 283
 			}
300 284
 
301 285
 			.goods-title {
302
-				width: 280rpx;
286
+				width: 210rpx;
303 287
 				font-size: 28rpx;
304 288
 				color: #333;
289
+				margin-left: 10rpx;
305 290
 				margin-top: 10rpx;
306 291
 				text-overflow: ellipsis;
307 292
 				overflow: hidden;
@@ -487,7 +472,7 @@
487 472
 			.goods-scoll-item-x {
488 473
 				display: inline-block;
489 474
 				text-align: center;
490
-				width: 300rpx;
475
+				width: 226rpx;
491 476
 				margin-right: 16rpx;
492 477
 			}
493 478
 		}

+ 17 - 15
src/subPages/pages/store/product/other.vue

@@ -348,23 +348,27 @@ function handleBuyNow() {
348 348
 	return
349 349
   }
350 350
   
351
-  console.log("===product.platform",detail.value.platform);
352 351
   if (detail.value?.platform) {
352
+	  
353
+	  
354
+	  if (detail.value?.platform ==  6 && !state.JDUrl) {
355
+	     console.log("===platformName");
356
+	    return
357
+	  }
358
+	  
353 359
     // 京东
354
-    if (detail.value?.platform == 6 && detail.value?.materialUrl) {
355
-      // console.log(detail.value?.spreadUrl)
360
+    if (detail.value?.platform == 6 && state.JDUrl) {
356 361
       console.log(detail.value)
357
-      if (detail.value && detail.value.materialUrl) {
362
+      if (detail.value && state.JDUrl) {
358 363
         uni.navigateToMiniProgram({
359 364
           appId: 'wx91d27dbf599dff74',
360
-          path: `pages/union/proxy/proxy?spreadUrl=${detail.value.materialUrl}`,
365
+          path: `pages/union/proxy/proxy?spreadUrl=${state.JDUrl}`,
361 366
           extraData: {
362 367
             foo: 'bar',
363 368
           },
364 369
           envVersion: 'release',
365 370
           success(res) {
366 371
             // 打开成功
367
-            // console.log(res);
368 372
           },
369 373
           fail: (error) => {
370 374
             console.log(error)
@@ -390,9 +394,7 @@ function handleBuyNow() {
390 394
         uni.navigateToMiniProgram({
391 395
           appId: pddWx.app_id,
392 396
           path: pddWx.page_path,
393
-          // extraData: {
394
-          //  foo: 'bar'mobile_url: "https://p.pinduoduo.com/VHKD9VbP"  mobile.yangkeduo
395
-          // },
397
+          
396 398
           envVersion: 'release',
397 399
           success(res) {
398 400
             // 打开成功
@@ -409,18 +411,18 @@ function handleBuyNow() {
409 411
           icon: 'none',
410 412
         })
411 413
       }
412
-      // console.log(detail.value.pddlink)
413
-      // console.log(pddWx)
414 414
     }
415
+	
416
+	
415 417
     else {
416 418
            let platformName = ''
417 419
             let clipboardData = ''
418 420
 			
419
-			if (detail.value?.platform ==  6) {
420
-			  platformName = '京东'
421
-			  clipboardData = state.JDUrl
422
-			  console.log("===state.JDUrl",state.JDUrl);
421
+			if (detail.value?.platform ==  6 && !state.JDUrl) {
422
+			   console.log("===platformName");
423
+			  return
423 424
 			}
425
+			
424 426
             if (detail.value?.platform == 5) {
425 427
               platformName = '淘宝'
426 428
               clipboardData = detail.value?.spreadUrl