测试扫码支付
This commit is contained in:
1 parent
b1f0b230e3
commit
3576ec1206
3 files changed
+6
-13
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<span class="text-2xl text-[#333] mr-1 line-height-normal">¥</span>
|
||||
<span class="text-3xl font-medium text-[#333]">{{ displayAmount }}</span>
|
||||
</tm-sheet>
|
||||
|
||||
<view>{{ scanData }}</view>
|
||||
<tm-button class="mt-40" :block="true" @click="disabled ? '' : handlePay()" :disabled="disabled">支付</tm-button>
|
||||
|
||||
<view class="bg-[#f5f5f5] px-1 py-2 rounded-4 absolute bottom-0 w-full">
|
||||
@@ -72,9 +72,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { usePayStore } from "@/sheep/stores/pay"
|
||||
import { onShow } from "@dcloudio/uni-app"
|
||||
import { ref, computed } from "vue"
|
||||
import { onShow } from "@dcloudio/uni-app"
|
||||
import { usePayStore } from "@/sheep/stores/pay"
|
||||
|
||||
const amount = ref("")
|
||||
const keyboardLayout = ref([
|
||||
@@ -88,7 +88,7 @@ const disabled = ref(false)
|
||||
onShow(() => {
|
||||
scanData.value = usePayStore().payData
|
||||
if (scanData.value) {
|
||||
uni.showToast({ title: `扫码成功:${scanData.value}`, icon: "none" })
|
||||
disabled.value = false
|
||||
} else {
|
||||
uni.showToast({ title: "扫码信息不存在", icon: "none" })
|
||||
disabled.value = true
|
||||
|
||||
Reference in new issue
Block a user