feat:签署
This commit is contained in:
@@ -789,7 +789,17 @@ export default {
|
|||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 小程序
|
// 小程序
|
||||||
this.onGetMiniProgramSignUrl(this.flowId);
|
uni.showModal({
|
||||||
|
title: "请复制链接前往APP签署合同?",
|
||||||
|
content: `APP下载地址:https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/document/android/trustbridge.apk`,
|
||||||
|
confirmText: "复制链接",
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
copyData("https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/document/android/trustbridge.apk");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// this.onGetMiniProgramSignUrl(this.flowId);
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -818,7 +828,7 @@ export default {
|
|||||||
async onGetMiniProgramSignUrl(flowId) {
|
async onGetMiniProgramSignUrl(flowId) {
|
||||||
const params = {
|
const params = {
|
||||||
flowId: flowId,
|
flowId: flowId,
|
||||||
endPoint: "HTTP_SHORT_URL",
|
// endPoint: "APP",
|
||||||
};
|
};
|
||||||
const { bizcode, data } = await getMiniProgramSignUrl(params);
|
const { bizcode, data } = await getMiniProgramSignUrl(params);
|
||||||
console.log("明天查找第二步", data);
|
console.log("明天查找第二步", data);
|
||||||
@@ -842,11 +852,12 @@ export default {
|
|||||||
|
|
||||||
// 小程序签名
|
// 小程序签名
|
||||||
openTencentESign(signPath) {
|
openTencentESign(signPath) {
|
||||||
console.log("跳转至腾讯电子签小程序的签署链接", signPath);
|
console.log("跳转至腾讯电子签小程序的签署链接-1", signPath);
|
||||||
// 这个链接需要后端调用腾讯电子签 API 获取
|
// 这个链接需要后端调用腾讯电子签 API 获取
|
||||||
uni.navigateToMiniProgram({
|
uni.navigateToMiniProgram({
|
||||||
appId: "wxa023b292fd19d41d", // 腾讯电子签官方小程序的 appId
|
appId: "wxa023b292fd19d41d", // 腾讯电子签官方小程序的 appId
|
||||||
path: signPath, // 跳转到的页面路径 + 参数
|
path:"pages/guide?id="+this.flowId,
|
||||||
|
// path: signPath, // 跳转到的页面路径 + 参数
|
||||||
extraData: {}, // 如果需要传额外参数
|
extraData: {}, // 如果需要传额外参数
|
||||||
envVersion: "release", // 小程序版本 release / trial / develop
|
envVersion: "release", // 小程序版本 release / trial / develop
|
||||||
success(res) {
|
success(res) {
|
||||||
|
|||||||
@@ -134,7 +134,17 @@ export default {
|
|||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 小程序
|
// 小程序
|
||||||
this.onGetMiniProgramSignUrl(this.flowId)
|
uni.showModal({
|
||||||
|
title: "请复制链接前往APP签署合同?",
|
||||||
|
content: `APP下载地址:https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/document/android/trustbridge.apk`,
|
||||||
|
confirmText: "复制链接",
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
copyData('https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/document/android/trustbridge.apk');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// this.onGetMiniProgramSignUrl(this.flowId)
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -161,11 +171,11 @@ export default {
|
|||||||
async onGetMiniProgramSignUrl(flowId) {
|
async onGetMiniProgramSignUrl(flowId) {
|
||||||
const params = {
|
const params = {
|
||||||
flowId: flowId,
|
flowId: flowId,
|
||||||
endPoint: 'HTTP_SHORT_URL'
|
// endPoint: 'HTTP_SHORT_URL'
|
||||||
}
|
}
|
||||||
const { bizcode, data } = await getMiniProgramSignUrl(params);
|
const { bizcode, data } = await getMiniProgramSignUrl(params);
|
||||||
if (bizcode === 100) {
|
if (bizcode === 100) {
|
||||||
console.log("跳转至腾讯电子签小程序的签署链接", data);
|
console.log("", data);
|
||||||
this.openTencentESign(data.schemeUrl);
|
this.openTencentESign(data.schemeUrl);
|
||||||
} else {
|
} else {
|
||||||
this.$refs.uToastRef.show({
|
this.$refs.uToastRef.show({
|
||||||
@@ -186,7 +196,7 @@ export default {
|
|||||||
// 这个链接需要后端调用腾讯电子签 API 获取
|
// 这个链接需要后端调用腾讯电子签 API 获取
|
||||||
uni.navigateToMiniProgram({
|
uni.navigateToMiniProgram({
|
||||||
appId: 'wxa023b292fd19d41d', // 腾讯电子签官方小程序的 appId
|
appId: 'wxa023b292fd19d41d', // 腾讯电子签官方小程序的 appId
|
||||||
path: signPath, // 跳转到的页面路径 + 参数
|
path:"pages/home/home", // 跳转到的页面路径 + 参数
|
||||||
extraData: {}, // 如果需要传额外参数
|
extraData: {}, // 如果需要传额外参数
|
||||||
envVersion: 'release', // 小程序版本 release / trial / develop
|
envVersion: 'release', // 小程序版本 release / trial / develop
|
||||||
success(res) {
|
success(res) {
|
||||||
|
|||||||
Reference in New Issue
Block a user