wangguoyu 1 hari lalu
induk
melakukan
04fa50f5ae
4 mengubah file dengan 18 tambahan dan 27 penghapusan
  1. 6 0
      pages.json
  2. 9 11
      pages/bindPhone/bindPhone.vue
  3. 0 7
      pages/chanpinMy/my.vue
  4. 3 9
      pages/chanpinMy/order.vue

+ 6 - 0
pages.json

@@ -61,6 +61,12 @@
 			"style": {
 				"navigationStyle": "custom"
 			}
+		},	
+		{
+			"path": "pages/bindPhone/bindPhone",
+			"style": {
+				"navigationStyle": "custom"
+			}
 		},
 		{
 			"path": "pages/chanpinXuanze/cp1/banben",

+ 9 - 11
components/bindPhone/bindPhone.vue → pages/bindPhone/bindPhone.vue

@@ -1,6 +1,4 @@
 <template>
-	<uni-popup ref="dlRef" :animation="true" :is-mask-click="false" 
-	mask-background-color="rgba(255, 255, 255, 0.6);">
 		<view class="bind-tel-page">
 			<!-- 返回 -->
 			<view class="icon-title-navBar-box">
@@ -26,17 +24,13 @@
 					<text class="yzm-btn" @click="startCountdown"
 						:class="{ 'cxfs-btn-disabled': loginData.isDisabled}">{{loginData.buttonText}}</text>
 				</view>
-				<!-- 登录按钮 -->
-				<ezyActiveVue v-if="skipBtnFlag" class="ezy-btn-active login-btn yzm-btn" @aclick="skipFun" :class="loginData.yzmStatus">跳过
-				</ezyActiveVue>
 				<ezyActiveVue class="ezy-btn-active login-btn yzm-btn" @aclick="bangdingFun" :class="loginData.yzmStatus">确认绑定
 				</ezyActiveVue>
 			</view>
+			<!-- 图形验证码 -->
+			<captchaVue ref="captcha" :config="config" @captchaSuccess="captchaSuccess" @captchaError="captchaError"
+				@captchaFail="captchaFail" @captchaReady="captchaReady" @captchaClose="captchaClose"></captchaVue>
 		</view>
-	</uni-popup>
-	<!-- 图形验证码 -->
-	<captchaVue ref="captcha" :config="config" @captchaSuccess="captchaSuccess" @captchaError="captchaError"
-		@captchaFail="captchaFail" @captchaReady="captchaReady" @captchaClose="captchaClose"></captchaVue>
 </template>
 
 <script setup>
@@ -86,12 +80,16 @@
 		skipBtnFlag: {
 			type: Boolean,
 			default: true
-		}
+		},
+		openFangshi: {
+			type: String,
+			default: 'bottom'
+		},
 	})
 	const sliderData = reactive({})
 
 	function showDl() {
-		dlRef.value.open('bottom');
+		dlRef.value.open(props.openFangshi);
 	}
 
 	function closeDl() {

+ 0 - 7
pages/chanpinMy/my.vue

@@ -45,7 +45,6 @@
 		</view>
 
 		<goLogin ref="loginRef" @success="handleSuccess"></goLogin>
-		<bindPhone ref="bindPhoneRef" :skipBtnFlag='false' @success="bingPhoneSuccess"></bindPhone>
 		<!-- 底部 -->
 		<custom-tab-bar :show="true" :current-index="currentTabIndex" />
 	</view>
@@ -63,7 +62,6 @@
 	} from '@/api/my.js'
 	import CustomTabBar from '@/components/custom-tabbar/index.vue';
 	import goLogin from "@/components/goLogin/goLogin.vue"
-	import bindPhone from "@/components/bindPhone/bindPhone.vue"
 	import {
 		onLoad,
 		onShow
@@ -81,7 +79,6 @@
 	let currentPlatform = ref(null);
 	let authInfo = ref(null);
 	let loginRef = ref(null);
-	let bindPhoneRef = ref(null);
 	let currentTabIndex = ref(3)
 	let myInfoData = reactive({
 		userImg: '',
@@ -169,10 +166,6 @@
 		})
 	}
 
-	function bangPhone() {
-		bindPhoneRef.value.showDl();
-	}
-
 	function duihuamaDuihuan() {
 		// 兑换码兑换策略
 		if (getUserIsYouke()) {

+ 3 - 9
pages/chanpinMy/order.vue

@@ -34,15 +34,12 @@
 			<!-- <view @click="bangdingPhone">绑定手机号</view> -->
 		</view>
 	</view>
-	<bindPhone ref="bindPhoneRef" @success="bindSuccess"></bindPhone>
 </template>
 
 <script setup>
 	import { reactive, ref } from "vue";
 	import {orderList} from '@/api/shop.js'
 	import { onLoad, onShow } from "@dcloudio/uni-app"
-	import bindPhone from "@/components/bindPhone/bindPhone.vue"
-	const bindPhoneRef = ref(null);
     const data = reactive({
         page: 0,
         list: [],
@@ -60,9 +57,7 @@
 			url: '/pages/chanpinMy/my'
 		})
 	}
-	function  bindSuccess(){
-		
-	}
+
     function onScrolltolower() {
         getMore()
     }
@@ -129,11 +124,10 @@
 		})
 	}
 	
-	function bangdingPhone() {
-		bindPhoneRef.value.showDl();
-	}
+
 	onLoad(() => {
 		getMore();
+		// 判断游客 如果是弹出弹窗,忽略和绑定, 忽略删除缓存,绑定更新用户userName 删除缓存
 	})
 </script>