|
@@ -1,7 +1,8 @@
|
|
|
import request from '@/helpers/request'
|
|
|
-import { Button } from 'vant'
|
|
|
+import { Button, Toast } from 'vant'
|
|
|
import { defineComponent } from 'vue'
|
|
|
import styles from './index.module.less'
|
|
|
+import { postMessage } from '@/helpers/native-message'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'cash-protocol',
|
|
@@ -29,10 +30,39 @@ export default defineComponent({
|
|
|
'&btn=1'
|
|
|
} catch {}
|
|
|
},
|
|
|
+ methods: {
|
|
|
+ async onSubmit() {
|
|
|
+ try {
|
|
|
+ await request.get('/api-teacher/sysUserContractRecord/sign', {
|
|
|
+ params: {
|
|
|
+ contractType: 'WITHDRAW'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
+ Toast('签署成功')
|
|
|
+ }, 100)
|
|
|
+ setTimeout(() => {
|
|
|
+ postMessage({
|
|
|
+ api: 'openPageSuccess',
|
|
|
+ content: {
|
|
|
+ page: 'WITHDRAW'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }, 1000)
|
|
|
+ } catch {}
|
|
|
+ }
|
|
|
+ },
|
|
|
render() {
|
|
|
return (
|
|
|
<div class={styles.cashProtocol}>
|
|
|
- <Button type="primary" size="large" block round class={styles.submit}>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ size="large"
|
|
|
+ block
|
|
|
+ round
|
|
|
+ class={styles.submit}
|
|
|
+ onClick={this.onSubmit}
|
|
|
+ >
|
|
|
我已阅读并同意
|
|
|
</Button>
|
|
|
<iframe
|