You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< script setup >
/**
* name:
* user: sa0ChunLuyu
* date: 2022-04-20 09:02:17
*/
import {
ref
} from 'vue'
const pat _test = ref ( '' )
const payTest = ( e ) => {
drawer _ref . value . open ( )
}
const payTestDo = ( ) => {
let pay _info = JSON . parse ( pat _test . value ) ;
wx . requestPayment ( {
'timeStamp' : pay _info . timeStamp ,
'nonceStr' : pay _info . nonceStr ,
'package' : pay _info . package ,
'signType' : 'RSA' ,
'paySign' : pay _info . paySign ,
'success' : function ( res ) {
console . log ( res )
} ,
'fail' : function ( res ) {
console . log ( res )
} ,
'complete' : function ( res ) { }
} ) ;
}
const drawer _ref = ref ( null )
const drawerRef = ( e ) => {
drawer _ref . value = e
}
< / script >
< template >
< uni -drawer :ref ="drawerRef" mode = "right" >
< view class = "navbar_wrapper" > < / view >
< textarea :maxlength ="-1" class = "textarea_wrapper" v-model ="pat_test" />
<button size="mini" @click="payTestDo()">测试</button>
</uni-drawer>
<uni-section title="支付测试" type="line">
<view class="uni-ma-5 uni-pb-5 example_item_wrapper">
<button size="mini" @click="payTest()" > 测 试 < / button >
< / view >
< / uni -section >
< / template >
< style scoped >
. textarea _wrapper {
margin - top : 100 rpx ;
height : 400 rpx ;
}
< / style >