fix
This commit is contained in:
parent
41df0afa36
commit
dd1f40353a
1
code
1
code
@ -1 +0,0 @@
|
||||
Subproject commit 00898be4c9e74bf02da6c3263583eecb4b09fb9b
|
@ -1,43 +0,0 @@
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
data: {
|
||||
url: ''
|
||||
},
|
||||
|
||||
inputUrl(e) {
|
||||
this.setData({
|
||||
url: e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
goScanCode() {
|
||||
wx.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: ({result = ''}) => {
|
||||
if(!result) {
|
||||
wx.showToast({
|
||||
title: '扫码失败',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
url: result
|
||||
}, this.goUrl)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
goUrl() {
|
||||
const url = this.data.url
|
||||
wx.navigateTo({
|
||||
url: '/pagesFace/pages/webview/webview?url=' + encodeURIComponent(url),
|
||||
})
|
||||
},
|
||||
|
||||
clearUrl() {
|
||||
this.setData({
|
||||
url: '',
|
||||
})
|
||||
}
|
||||
})
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "人脸识别认证"
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<view class="container">
|
||||
<view class="container box1">
|
||||
<view class="title">
|
||||
在当前小程序内打开实名/签署页面,刷脸跳转到公证签小程序
|
||||
</view>
|
||||
<input class="weui-input" maxlength="-1" placeholder="输入链接" value="{{url}}" bindinput="inputUrl"/>
|
||||
<view class="btn-box">
|
||||
<button class="weui-btn my-btn" type="primary" bindtap="goScanCode">扫描二维码</button>
|
||||
<button class="weui-btn my-btn" type="primary" bindtap="goUrl">跳转</button>
|
||||
<button class="weui-btn my-btn" bindtap="clearUrl">清空</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -1,33 +0,0 @@
|
||||
.container {
|
||||
padding-top: 20rpx !important;
|
||||
}
|
||||
.box1 {
|
||||
margin-bottom: 100rpx;
|
||||
padding-bottom: 130rpx;
|
||||
}
|
||||
.title {
|
||||
margin-bottom: 20px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
.weui-input {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
.btn-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.weui-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
.my-btn {
|
||||
margin-top: 0 !important;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
Page({
|
||||
data: {
|
||||
/** 刷脸token */
|
||||
bizToken: "",
|
||||
/** 认证小程序appId */
|
||||
miniProgramAppId: "",
|
||||
/** 认证小程序跳转页地址 */
|
||||
miniProgramPath: "",
|
||||
/** 刷脸结束回调地址 */
|
||||
miniProgramCallBackUrl: "",
|
||||
/** 是否已跳转认证小程序 */
|
||||
goFaceDone: false,
|
||||
},
|
||||
|
||||
/** 点击前往认证 */
|
||||
onJump() {
|
||||
const { bizToken, miniProgramAppId, miniProgramPath } = this.data;
|
||||
wx.navigateToMiniProgram({
|
||||
appId: miniProgramAppId,
|
||||
path: miniProgramPath + "?bizToken=" + bizToken,
|
||||
success: (res) => {
|
||||
this.setData({
|
||||
goFaceDone: true,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
/** 生命周期函数--监听页面加载 */
|
||||
onLoad: function ({
|
||||
bizToken = "",
|
||||
miniProgramAppId = "",
|
||||
miniProgramPath = "",
|
||||
miniProgramCallBackUrl = "",
|
||||
}) {
|
||||
console.log("---middle onLoad");
|
||||
this.setData({
|
||||
bizToken: decodeURIComponent(bizToken),
|
||||
miniProgramAppId: decodeURIComponent(miniProgramAppId),
|
||||
miniProgramPath: decodeURIComponent(miniProgramPath),
|
||||
miniProgramCallBackUrl: decodeURIComponent(miniProgramCallBackUrl),
|
||||
});
|
||||
},
|
||||
|
||||
/** 生命周期函数--监听页面显示 */
|
||||
onShow: function () {
|
||||
console.log("---middle onShow");
|
||||
const { goFaceDone, miniProgramCallBackUrl } = this.data;
|
||||
/** 防止从认证进入后直接返回 */
|
||||
if (!goFaceDone) return;
|
||||
|
||||
/** 已跳转认证小程序,重置 */
|
||||
this.setData({
|
||||
goFaceDone: false,
|
||||
});
|
||||
|
||||
/** getEnterOptionsSync 基础库 2.9.4 开始支持,低版本需做兼容处理 */
|
||||
const options = wx.getEnterOptionsSync();
|
||||
console.log("---app onShow options", options);
|
||||
|
||||
/** 从认证小程序返回 */
|
||||
if (
|
||||
options.scene === 1038 &&
|
||||
options.referrerInfo.extraData &&
|
||||
options.referrerInfo.extraData.faceResult
|
||||
) {
|
||||
const pages = getCurrentPages();
|
||||
const previous = pages[pages.length - 2];
|
||||
/** 重新加载认证页面 */
|
||||
previous.$vm.reloadPage(
|
||||
miniProgramCallBackUrl.replace(
|
||||
"https://realnameverify-test.fadada.com",
|
||||
"https://realnameverify-test07.fadada.com"
|
||||
)
|
||||
);
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "人脸识别认证"
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,30 +0,0 @@
|
||||
.middle-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 250rpx;
|
||||
}
|
||||
.middle-page-icon {
|
||||
width: 200rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
.middle-page-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 48rpx 0;
|
||||
line-height: 42rpx;
|
||||
font-size: 28rpx;
|
||||
color: #595959;
|
||||
}
|
||||
.middle-page-button {
|
||||
width: 332rpx !important;
|
||||
height: 88rpx;
|
||||
padding: 0;
|
||||
line-height: 88rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: initial;
|
||||
color: #fff;
|
||||
border-radius: 16rpx;
|
||||
background: #276EF9;
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
"appid": "wx1e155fd041eda3be",
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.1.2",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"setting": {
|
||||
"coverView": true,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"enhance": true,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"packNpmRelationList": [],
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
}
|
||||
},
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 4
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "pages",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
Page({
|
||||
|
||||
data: {
|
||||
url: '',
|
||||
},
|
||||
|
||||
/** 初始打开实名认证页面 */
|
||||
onLoad(options) {
|
||||
console.log('---wevbiew onload', options)
|
||||
this.setData({
|
||||
url: decodeURIComponent(options.url),
|
||||
})
|
||||
},
|
||||
|
||||
/** 刷脸完成后重新加载实名认证页面 */
|
||||
reloadPage(url) {
|
||||
console.log('---webview reloadPage', url)
|
||||
this.setData({
|
||||
url,
|
||||
})
|
||||
},
|
||||
})
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "人脸识别认证"
|
||||
}
|
@ -1 +0,0 @@
|
||||
<web-view src="{{url}}"></web-view>
|
@ -1 +1 @@
|
||||
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":"wJAAA,MAGA,aACA,YAFAA,EAAGC,kCAAoCC,EAGvCC,EAAWC,a","file":"pagesFace/pages/middle/middle.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesFace/pages/middle/middle.vue'\ncreatePage(Page)"],"sourceRoot":""}
|
||||
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":"wJAAA,MAGA,aACA,qIAFAA,EAAGC,kCAAoCC,EAGvCC,EAAWC,a","file":"pagesFace/pages/middle/middle.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesFace/pages/middle/middle.vue'\ncreatePage(Page)"],"sourceRoot":""}
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
"appid": "wx1e155fd041eda3be",
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.1.2",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"setting": {
|
||||
"coverView": true,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"enhance": true,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"packNpmRelationList": [],
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
}
|
||||
},
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 4
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "pages",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
},
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": false,
|
||||
"es6": true,
|
||||
"postcss": false,
|
||||
"minified": false,
|
||||
"newFeature": true,
|
||||
@ -15,7 +15,8 @@
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
}
|
||||
},
|
||||
"enhance": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.1.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"u-line": "/uview-ui/components/u-line/u-line"
|
||||
}
|
||||
},
|
||||
"component": true
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
Loading…
Reference in New Issue
Block a user