wangxy 1 день назад
Родитель
Сommit
24137dd085
1 измененных файлов с 7 добавлено и 6 удалено
  1. 7 6
      pages/chanpinShop/cp1/dingdan.vue

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

@@ -101,10 +101,10 @@
 	const current = ref(0)
 	const items = ref([{
 		name: '微信',
-		value: 0
+		value: '0'
 	}, {
 		name: '支付宝',
-		value: 1
+		value: '1'
 	}])
 
 
@@ -153,11 +153,12 @@
 		if (currentPlatform.value == 'ios') {
 			// ios 无微信与支付宝
 			current.value = -1;
-			console.log('cccc', current.value)
 		}
 	})
 
-	function radioChange() {}
+	function radioChange(d) {
+    current.value = d.detail.value;
+  }
 
 	function handleSelectTaoCan(item) {
 		activeTaocan.value = item;
@@ -188,11 +189,11 @@
 				console.log('apple支付入参', options)
 				// 苹果
 				OrderPay('apple', options)
-			} else if (currentPlatform.value != 'ios' && current.value == 0) {
+			} else if (currentPlatform.value != 'ios' && current.value == '0') {
 				console.log('wx支付入参', options)
 				// 微信
 				OrderPay('wx', options)
-			} else if (currentPlatform.value != 'ios' && current.value == 1) {
+			} else if (currentPlatform.value != 'ios' && current.value == '1') {
 				console.log('ali支付入参', options)
 				// 支付宝
 				OrderPay('ali', options)