wangguoyu 1 일 전
부모
커밋
2ba99bcbb3
3개의 변경된 파일28개의 추가작업 그리고 11개의 파일을 삭제
  1. 4 2
      pages/chanpinMy/order.vue
  2. 5 2
      pages/chanpinShop/components/kaiTongFongShi.vue
  3. 19 7
      pages/chanpinShop/cp1/dingdan.vue

+ 4 - 2
pages/chanpinMy/order.vue

@@ -34,7 +34,7 @@
 			<!-- <view @click="bangdingPhone">绑定手机号</view> -->
 		</view>
 	</view>
-	<bindPhone ref="bindPhoneRef" @success="onLoginSuccess"></bindPhone>
+	<bindPhone ref="bindPhoneRef" @success="bindSuccess"></bindPhone>
 </template>
 
 <script setup>
@@ -60,7 +60,9 @@
 			url: '/pages/chanpinMy/my'
 		})
 	}
-	
+	function  bindSuccess(){
+		
+	}
     function onScrolltolower() {
         getMore()
     }

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

@@ -7,7 +7,7 @@
 			</view>
 
 			<view @click="handleKaitong">使用手机号快速登录</view>
-			<view v-if="currentPlatform== 'ios'">游客身份开通(限当前设备使用)</view>
+			<view @click="youkeKaitongIos"  v-if="currentPlatform== 'ios'">游客身份开通(限当前设备使用)</view>
 		</view>
 	</uni-popup>
 
@@ -24,7 +24,7 @@
 	const kaitongRef = ref(null); // 索引
 	const LoginRef = ref(null);
 	const currentPlatform = ref(null);
-  const emits = defineEmits(['success']);
+  const emits = defineEmits(['success','ykIoszhifu']);
 
 
 	function isIOSorAndroid() {
@@ -53,6 +53,9 @@
 			kaitongRef.value.close();
 		})
 	}
+	function youkeKaitongIos(){
+		    emits('ykIoszhifu')
+	}
 
   function onLoginSuccess() {
     emits('success')

+ 19 - 7
pages/chanpinShop/cp1/dingdan.vue

@@ -51,7 +51,7 @@
 		</view>
 	</view>
 
-	<kaiTongFongShiVue ref="kaiRef" @success="handlePay"></kaiTongFongShiVue>
+	<kaiTongFongShiVue ref="kaiRef" @ykIoszhifu="ykIoszhifu" @success="handlePay"></kaiTongFongShiVue>
 </template>
 
 <script setup>
@@ -140,10 +140,10 @@
 		checkError: () => {}, // 校验失败
 		payError: () => {}, // 支付失败
 		paySuccess: () => {
-      uni.navigateTo({
-        url: "/pages/chanpinMy/order"
-      })
-    }, //支付成功
+			uni.navigateTo({
+				url: "/pages/chanpinMy/order"
+			})
+		}, //支付成功
 		applePayError: () => {}, // 苹果内购失败
 	});
 
@@ -155,10 +155,22 @@
 			current.value = -1;
 		}
 	})
+	function ykIoszhifu(){
+		console.log('12311');
+		const options = {
+			chanpinId: data.chanpinId,
+			taocanId: activeTaocan.value.taocanId
+		};
+		options.applePid = activeTaocan.value.applePid;
+		console.log('options',options);
+		console.log('activeTaocan.value.applePid',activeTaocan.value.applePid);
+		OrderPay('apple', options)
+	}
+
 
 	function radioChange(d) {
-    current.value = d.detail.value;
-  }
+		current.value = d.detail.value;
+	}
 
 	function handleSelectTaoCan(item) {
 		activeTaocan.value = item;