|
@@ -0,0 +1,38 @@
|
|
|
+import request from '@/helpers/request'
|
|
|
+import { state } from '@/state'
|
|
|
+import { defineComponent } from 'vue'
|
|
|
+
|
|
|
+// 预览协议 - 原生实名认证使用
|
|
|
+export default defineComponent({
|
|
|
+ name: 'preview-protocol',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ protocolHTML: '' as any
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ try {
|
|
|
+ // 判断是否有协议内容
|
|
|
+ if (!this.protocolHTML) {
|
|
|
+ const res = await request.get(
|
|
|
+ state.platformApi + '/sysUserContractRecord/queryContract',
|
|
|
+ {
|
|
|
+ params: {
|
|
|
+ contractType: 'BUY_ORDER'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ this.protocolHTML = res.data
|
|
|
+ }
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ },
|
|
|
+ render() {
|
|
|
+ return (
|
|
|
+ <div id="mProtocol">
|
|
|
+ <div v-html={this.protocolHTML}></div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+})
|