更新
This commit is contained in:
parent
1b9724ada9
commit
ee27f6bf79
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import headers from '../../components/header/headers.vue'
|
import headers from '../../components/header/headers.vue'
|
||||||
|
import upload from '../../utils/upload';
|
||||||
import request from '@/utils/request.js'
|
import request from '@/utils/request.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -31,6 +32,7 @@ export default {
|
|||||||
},
|
},
|
||||||
contentTemp: '',
|
contentTemp: '',
|
||||||
content: '',
|
content: '',
|
||||||
|
userUrl: '',
|
||||||
List: [],
|
List: [],
|
||||||
show: false,
|
show: false,
|
||||||
status: 'loading',
|
status: 'loading',
|
||||||
@ -55,6 +57,21 @@ export default {
|
|||||||
}
|
}
|
||||||
this.callback = options.callback;
|
this.callback = options.callback;
|
||||||
this.userData = uni.getStorageSync('userInfo');
|
this.userData = uni.getStorageSync('userInfo');
|
||||||
|
// 监听 tempFilePath 事件
|
||||||
|
uni.$off('tempFilePath');
|
||||||
|
uni.$on('tempFilePath', (data) => {
|
||||||
|
console.log('Received tempFilePath:', data);
|
||||||
|
//上传图片
|
||||||
|
upload({
|
||||||
|
url: '/app-api/small-upload/common/upload',
|
||||||
|
filePath: data,
|
||||||
|
}).then((res) => {
|
||||||
|
this.userUrl = res.data.url
|
||||||
|
console.log(this.userUrl, 'userUrl');
|
||||||
|
this.signatureChange()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getdriveSchool()
|
this.getdriveSchool()
|
||||||
@ -91,8 +108,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 处理特殊格式的占位符(如下划线格式)
|
// 处理特殊格式的占位符(如下划线格式)
|
||||||
this.content = this.content.replace(/<u[^>]*>([^<]*)name([^<]*)<\/u>/g, `<u>$1${this.contractData.name}$2</u>`);
|
this.content = this.content.replace(/<u[^>]*>([^<]*)name([^<]*)<\/u>/g,
|
||||||
this.content = this.content.replace(/<u[^>]*>([^<]*)type([^<]*)<\/u>/g, `<u>$1${this.contractData.type}$2</u>`);
|
`<u>$1${this.contractData.name}$2</u>`);
|
||||||
|
this.content = this.content.replace(/<u[^>]*>([^<]*)type([^<]*)<\/u>/g,
|
||||||
|
`<u>$1${this.contractData.type}$2</u>`);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -110,6 +129,7 @@ export default {
|
|||||||
tenantId: this.tenantId,
|
tenantId: this.tenantId,
|
||||||
userId: this.userData.id,
|
userId: this.userData.id,
|
||||||
content: this.content,
|
content: this.content,
|
||||||
|
userUrl: this.userUrl,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@ -122,7 +142,8 @@ export default {
|
|||||||
const pages = getCurrentPages();
|
const pages = getCurrentPages();
|
||||||
const prevPage = pages[pages.length - 2];
|
const prevPage = pages[pages.length - 2];
|
||||||
|
|
||||||
if (prevPage && (prevPage.route === 'pagesA/register/index' || prevPage.route === '/pagesA/register/index')) {
|
if (prevPage && (prevPage.route === 'pagesA/register/index' || prevPage.route ===
|
||||||
|
'/pagesA/register/index')) {
|
||||||
if (this.callback) { // 从onLoad中获取的callback
|
if (this.callback) { // 从onLoad中获取的callback
|
||||||
try {
|
try {
|
||||||
const callback = decodeURIComponent(this.callback);
|
const callback = decodeURIComponent(this.callback);
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log(res, '签名');
|
console.log(res, '签名');
|
||||||
//强制返回base64
|
//强制返回base64
|
||||||
that.emit(res.tempFilePath)
|
uni.$emit('tempFilePath', res.tempFilePath)
|
||||||
},
|
},
|
||||||
fail(e) {
|
fail(e) {
|
||||||
console.log(JSON.stringify(e))
|
console.log(JSON.stringify(e))
|
||||||
@ -240,5 +240,4 @@
|
|||||||
font-size: 130rpx;
|
font-size: 130rpx;
|
||||||
transform: rotate(-20deg);
|
transform: rotate(-20deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue
Block a user