| | |
| | | } from '@life-payment/core-vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { Toast as NutToast } from '@nutui/nutui-taro'; |
| | | import { reactive } from 'vue'; |
| | | import { onMounted, reactive, ref, computed } from 'vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'SelectPayTypeView', |
| | |
| | | isInWeChat?: boolean; |
| | | isH5?: boolean; |
| | | appId?: string; |
| | | isFocus?: boolean; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | |
| | | if (res.err_msg == 'get_brand_wcpay_request:ok') { |
| | | // 使用以上方式判断前端返回,微信团队郑重提示: |
| | | //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠,商户需进一步调用后端查单确认支付结果。 |
| | | } else if (res.err_msg == 'system:access_denied') { |
| | | state.msg = '请在手机微信中打开'; |
| | | state.show = true; |
| | | } else { |
| | | state.msg = res.err_msg; |
| | | state.show = true; |
| | | } |
| | | }, |
| | | function (res) { |
| | | console.log('res: ', res); |
| | | } |
| | | ); |
| | | } |
| | |
| | | } |
| | | }, |
| | | refetchInterval: 1000 * 3, |
| | | enabled: computed(() => props.isFocus), |
| | | }); |
| | | </script> |