wangxy před 3 dny
rodič
revize
c6830433da

+ 1 - 0
components/goLogin/goLogin.vue

@@ -195,6 +195,7 @@
 				cacheManager.set('auth', res.data)
 				// 返回重新支付
 				handleBack();
+        emits('success', res.data)
 			}
 		})
 	}

+ 3 - 8
pages/chanpinMy/my.vue

@@ -40,8 +40,7 @@
 			</view>
 		</view>
 
-		
-		<loginComp ref="loginRef" @success="handleSuccess"></loginComp>
+		<goLogin ref="loginRef" @success="handleSuccess"></goLogin>
 		<!-- 底部 -->
 		<custom-tab-bar :show="true" :current-index="currentTabIndex" />
 	</view>
@@ -58,7 +57,7 @@
 		commonCardList
 	} from '@/api/my.js'
 	import CustomTabBar from '@/components/custom-tabbar/index.vue';
-	import loginComp from "@/components/loginComp/index.vue"
+	import goLogin from "@/components/goLogin/goLogin.vue"
 	import {
 		onLoad,
 		onShow
@@ -157,7 +156,7 @@
 		// 兑换码兑换策略
 		if (getUserIsYouke()) {
 			// 非登录 -- 登录
-			loginRef.value.showPopup()
+			loginRef.value.showDl()
 		} else {
 			// 已登录
 			uni.navigateTo({
@@ -202,8 +201,4 @@
       url: '/pages/chanpinShop/index'
     })
   }
-
-	function test() {
-		loginRef.value.showPopup()
-	}
 </script>

+ 6 - 2
pages/chanpinShop/components/kaiTongFongShi.vue

@@ -11,7 +11,7 @@
 		</view>
 	</uni-popup>
 
-	<goLoginVue ref="LoginRef"></goLoginVue>
+	<goLoginVue ref="LoginRef" @success="onLoginSuccess"></goLoginVue>
 </template>
 
 <script setup>
@@ -23,8 +23,8 @@
 
 	const kaitongRef = ref(null); // 索引
 	const LoginRef = ref(null);
-	const $emit = defineEmits(['confirm-btn'])
 	const currentPlatform = ref(null);
+  const emits = defineEmits(['success']);
 
 
 	function isIOSorAndroid() {
@@ -54,6 +54,10 @@
 		})
 	}
 
+  function onLoginSuccess() {
+    emits('success')
+  }
+
 	defineExpose({
 		handleShow
 	})

+ 1 - 1
pages/chanpinShop/cp1/dingdan.vue

@@ -51,7 +51,7 @@
 		</view>
 	</view>
 
-	<kaiTongFongShiVue ref="kaiRef"></kaiTongFongShiVue>
+	<kaiTongFongShiVue ref="kaiRef" @success="handlePay"></kaiTongFongShiVue>
 </template>
 
 <script setup>